/**
 * FlowBoard — Mobil Özel Görünüm (MobileView)
 * Masaüstü panosunun küçültülmüş hali DEĞİL, bağımsız bir arayüz:
 * tek sütun kayan akış (feed) + alt navigasyon çubuğu.
 */

.mobile-workspace {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  font-family: 'Inter', sans-serif;
}

/* ─── Üst Çubuk ─── */
.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.mobile-topbar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #334155;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #ffffff;
}

.mobile-topbar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mobile-topbar-title span:first-child {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mobile-topbar-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ─── Arama ─── */
.mobile-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  flex-shrink: 0;
  color: #94a3b8;
}

.mobile-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: #0f172a;
  background: transparent;
}

/* ─── Akış (Feed) ─── */
.mobile-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 84px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.mobile-feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20vh;
  color: #94a3b8;
  font-size: 0.88rem;
  text-align: center;
}

.mobile-feed-empty i {
  font-size: 2.4rem;
  color: #cbd5e1;
}

/* ─── Sticker Kartı ─── */
.mobile-card {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  touch-action: pan-y;
}

.mobile-card.dragging {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  opacity: 0.95;
}

.mobile-card-placeholder {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f1f5f9;
}

.mobile-card-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
  color: #cbd5e1;
  background: #f8fafc;
  border-right: 1px solid #f1f5f9;
  touch-action: none;
  cursor: grab;
}

.mobile-card-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  cursor: pointer;
}

.mobile-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mobile-card-type-icon {
  color: #7c3aed;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mobile-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.mobile-card-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.mobile-card-due {
  background: #f1f5f9;
  color: #64748b;
}

.mobile-card-text {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mobile-card.expanded .mobile-card-text {
  -webkit-line-clamp: unset;
}

.mobile-card-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 4px;
  display: block;
}

.mobile-card-widget-note,
.mobile-card-link {
  font-size: 0.78rem;
  color: #7c3aed;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.mobile-card-todos {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
}

.mobile-card-delete-btn {
  width: 40px;
  flex-shrink: 0;
  border: none;
  background: #fef2f2;
  color: #ef4444;
  font-size: 0.85rem;
  border-left: 1px solid #fee2e2;
}

/* ─── Alt Navigasyon ─── */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 501;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid #e2e8f0;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: #64748b;
  font-size: 0.63rem;
  font-weight: 600;
  padding: 4px 8px;
  flex: 1;
}

.mobile-nav-btn i {
  font-size: 1.05rem;
}

.mobile-nav-btn-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
  flex: 0 0 auto;
  margin: -18px 4px 0;
  font-size: 1.2rem;
}

/* ─── Alt Sayfalar (Bottom Sheets) ─── */
.mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-end;
}

.mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  animation: mobileSheetFade 0.2s ease;
}

@keyframes mobileSheetFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-sheet-panel {
  position: relative;
  width: 100%;
  max-height: 75vh;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: flex;
  flex-direction: column;
  animation: mobileSheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes mobileSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #e2e8f0;
  margin: 4px auto 12px;
  flex-shrink: 0;
}

.mobile-sheet-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 12px;
}

.mobile-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mobile-sheet-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
}

.mobile-sheet-grid button i {
  font-size: 1.1rem;
  color: #7c3aed;
}

.mobile-sheet-grid button.mobile-sheet-danger {
  color: #ef4444;
}

.mobile-sheet-grid button.mobile-sheet-danger i {
  color: #ef4444;
}

.mobile-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
}

.mobile-sheet-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mobile-sheet-row-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-sheet-row-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-sheet-row-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.mobile-sheet-action-btn {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
}

.mobile-sheet-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

.mobile-invite-body {
  padding-bottom: 8px;
}

.mobile-invite-body .share-code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
}

.mobile-invite-body .share-code-val {
  flex: 1;
  font-weight: 700;
  color: #0f172a;
}
