/* ==========================================================================
   PERSONAL HUB - COMPONENTS CSS (Desktop Command Center & Modern SaaS UI)
   ========================================================================== */

/* ==========================================================================
   1. DESKTOP SIDEBAR STYLING
   ========================================================================== */
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--indigo-500), var(--cyan-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: -0.02em;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.sidebar-brand-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--indigo-400);
  letter-spacing: 0.06em;
  margin-top: 1px;
}

/* Global Search Trigger Pill (Ctrl+K) */
.global-search-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(14, 16, 24, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-input);
}

.global-search-trigger:hover {
  border-color: var(--border-medium);
  background: rgba(22, 25, 38, 0.95);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.global-search-trigger kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  color: var(--text-muted);
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 10px 10px 4px 10px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.08));
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: linear-gradient(to bottom, var(--indigo-400), var(--cyan-400));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--indigo-400);
}

.sidebar-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item-left svg {
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}

.sidebar-counter-badge, .sidebar-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1.5px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item.active .sidebar-counter-badge,
.sidebar-nav-item.active .sidebar-badge {
  background: var(--indigo-500);
  color: #fff;
  border-color: var(--indigo-400);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.sidebar-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 16, 24, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ==========================================================================
   2. DESKTOP TOPBAR & HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-header);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
  .app-header {
    padding: 16px 36px;
  }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--indigo-500), var(--cyan-400));
  padding: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px -2px rgba(99, 102, 241, 0.45);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-shell);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--indigo-300);
}

.header-title-group .greeting-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-400);
}

.header-title-group .main-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.header-clock-group {
  text-align: right;
}

.live-time-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(18, 20, 30, 0.9);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: inline-block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  letter-spacing: 0.04em;
}

.live-date-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
}

/* ==========================================================================
   3. TODAY DASHBOARD & KPI COMMAND RIBBON (BENTO GRID)
   ========================================================================== */
.today-dashboard {
  background: linear-gradient(145deg, rgba(20, 23, 34, 0.85) 0%, rgba(14, 16, 24, 0.9) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.today-dashboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), rgba(34, 211, 238, 0.6), transparent);
}

.today-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.today-dash-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.today-dash-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.today-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .today-dash-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .today-dash-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }
}

.today-tile {
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.today-tile:hover {
  background: rgba(22, 26, 38, 0.9);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.today-tile-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.today-tile-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

/* KPI Ribbon (4 Main Hero Cards) */
.desktop-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}

@media (min-width: 1024px) {
  .desktop-kpi-ribbon {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 8px;
  }
}

.kpi-card {
  background: linear-gradient(145deg, rgba(18, 21, 30, 0.8) 0%, rgba(12, 14, 20, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.kpi-card:hover {
  border-color: var(--border-medium);
  background: linear-gradient(145deg, rgba(24, 28, 42, 0.9) 0%, rgba(16, 19, 28, 0.95) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kpi-icon-box.focus {
  background: var(--indigo-bg);
  color: var(--indigo-400);
  border: 1px solid var(--indigo-border);
}

.kpi-icon-box.tasks {
  background: var(--emerald-bg);
  color: var(--emerald-400);
  border: 1px solid var(--emerald-border);
}

.kpi-icon-box.finance {
  background: var(--amber-bg);
  color: var(--amber-400);
  border: 1px solid var(--amber-border);
}

.kpi-icon-box.server {
  background: var(--cyan-bg);
  color: var(--cyan-400);
  border: 1px solid var(--cyan-border);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kpi-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ==========================================================================
   4. GLASSMORPHISM CARDS & BENTO GRID
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.22s ease, 
              box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.card-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Category Filter Bar (Visible on Mobile, or Sticky Top Bar) */
.category-tab-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  position: sticky;
  top: 68px;
  z-index: 35;
  background: rgba(7, 8, 11, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}
.category-tab-bar::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .category-tab-bar {
    display: none;
  }
}

.category-tab-chip {
  background: rgba(14, 16, 24, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.category-tab-chip:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  background: rgba(24, 28, 42, 0.9);
}

.category-tab-chip.active {
  background: var(--indigo-bg);
  border-color: var(--indigo-500);
  color: #fff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

/* View Sections for Field Classification */
.view-category-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .view-category-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }

  .grid-full-width {
    grid-column: 1 / -1 !important;
  }
}

.category-section-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 2px 2px;
}

.category-section-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-badge-focus {
  background: var(--indigo-bg);
  border: 1px solid var(--indigo-border);
  color: var(--indigo-400);
}

.cat-badge-tasks {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-400);
}

.cat-badge-journal {
  background: var(--purple-bg);
  border: 1px solid var(--purple-border);
  color: var(--purple-400);
}

.cat-badge-graph {
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--indigo-400);
}

.cat-badge-learning {
  background: var(--rose-bg);
  border: 1px solid var(--rose-border);
  color: var(--rose-400);
}

.cat-badge-finance {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-400);
}

.cat-badge-ai {
  background: var(--indigo-bg);
  border: 1px solid var(--indigo-border);
  color: var(--indigo-300);
}

.cat-badge-dev {
  background: var(--cyan-bg);
  border: 1px solid var(--cyan-border);
  color: var(--cyan-400);
}

/* ==========================================================================
   5. BUTTON UI COMPONENTS (Linear / Vercel Precision Style)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  line-height: 1.2;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--indigo-500), #7c3aed);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-success:hover {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500));
  transform: translateY(-1px);
}

.btn-amber {
  background: linear-gradient(135deg, var(--amber-500), #d97706);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: linear-gradient(135deg, var(--rose-500), #e11d48);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(22, 25, 36, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(30, 35, 50, 0.95);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.btn-icon:active {
  transform: scale(0.92);
}

.btn-delete-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: color 0.18s, background 0.18s;
}
.btn-delete-item:hover {
  color: var(--rose-400);
  background: var(--rose-bg);
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--cyan-400);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: opacity 0.18s, background 0.18s;
}
.btn-link-action:hover {
  opacity: 1;
  background: var(--cyan-bg);
}

/* Form Inputs & Controls */
.input-text, .textarea-custom, .select-custom {
  width: 100%;
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: var(--shadow-input);
}

.input-text:hover, .textarea-custom:hover, .select-custom:hover {
  border-color: var(--border-medium);
}

.input-text:focus, .textarea-custom:focus, .select-custom:focus {
  background: rgba(14, 16, 24, 0.98);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 0 16px rgba(99, 102, 241, 0.15);
}

.input-text::placeholder, .textarea-custom::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.select-custom {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 28px;
}

/* Badges */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}
.badge-emerald {
  background: var(--emerald-bg);
  color: var(--emerald-400);
  border: 1px solid var(--emerald-border);
}
.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-400);
  border: 1px solid var(--amber-border);
}
.badge-rose {
  background: var(--rose-bg);
  color: var(--rose-400);
  border: 1px solid var(--rose-border);
}
.badge-indigo {
  background: var(--indigo-bg);
  color: var(--indigo-400);
  border: 1px solid var(--indigo-border);
}
.badge-cyan {
  background: var(--cyan-bg);
  color: var(--cyan-400);
  border: 1px solid var(--cyan-border);
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: #11131c;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes slideUp {
  from { transform: translateY(18px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* ==========================================================================
   6. MOBILE BOTTOM NAVIGATION (Floating Glass Dock)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px;
  background: rgba(9, 10, 15, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.18s ease;
}

.nav-item.active, .nav-item:hover {
  color: var(--indigo-400);
  background: var(--indigo-bg);
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

/* Toast Component */
.toast-container {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 100;
  background: rgba(20, 24, 36, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-active);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1024px) {
  .toast-container {
    bottom: 24px;
    right: 28px;
    left: auto;
    transform: translateY(10px);
  }
  .toast-container.show {
    transform: translateY(0);
  }
}

.toast-container.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

