/* Posts+ — Mobile-first Dark Black & Deep Blue Social UI */

:root {
  --bg-black: #000000;
  --bg-deep: #050a14;
  --bg-surface: #0b1426;
  --bg-card: #0f1c34;
  --bg-elevated: #152645;
  --border-subtle: rgba(56, 151, 240, 0.14);
  --border-strong: rgba(56, 151, 240, 0.35);

  --blue-primary: #1877f2;
  --blue-bright: #0095f6;
  --blue-glow: rgba(24, 119, 242, 0.35);
  --blue-soft: rgba(24, 119, 242, 0.16);

  --green-clean: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --amber-warn: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --red-danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(circle at top, #0a1933 0%, #000000 55%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Mobile-first App Shell */
.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-black) 100%);
  position: relative;
  overflow: hidden;
}

@media (min-width: 520px) {
  .app-shell {
    height: min(94dvh, 880px);
    margin-top: max(16px, calc((100dvh - min(94dvh, 880px)) / 2));
    border-radius: 28px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(24, 119, 242, 0.12);
  }
}

/* Icons */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.icon-xs {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.icon-xl {
  width: 36px;
  height: 36px;
  color: var(--blue-bright);
}

/* Topbar */
.topbar {
  height: calc(56px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 10, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.brand-text {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.brand-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-bright));
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 0 14px var(--blue-glow);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: var(--green-soft);
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pill-btn.has-meta {
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--amber-soft);
  color: #fcd34d;
}
.pill-btn:active {
  transform: scale(0.96);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

/* Main Scrollable Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.main-content::-webkit-scrollbar {
  display: none;
}

.view {
  display: none;
  min-height: 100%;
}
.view.active {
  display: block;
}

/* Upload Stage (Empty State) */
.upload-stage {
  padding: 20px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-card {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.upload-card.drag-over {
  border-color: var(--blue-bright);
  background: rgba(24, 119, 242, 0.14);
  transform: scale(0.99);
}

.upload-icon-ring {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 149, 246, 0.28), rgba(15, 28, 52, 0.9));
  border: 1px solid rgba(0, 149, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(24, 119, 242, 0.2);
}

.upload-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.upload-subtitle {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 300px;
}

.privacy-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
}

.quick-logos-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-logos-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-logos-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.quick-logos-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-bright) 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px var(--blue-glow);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 0.98rem;
}
.btn-full {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-secondary:active {
  transform: scale(0.97);
}

.text-btn {
  background: none;
  border: none;
  color: var(--blue-bright);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 6px;
  cursor: pointer;
}

.danger-text-btn {
  background: none;
  border: none;
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 6px;
  cursor: pointer;
}

/* Editor Workspace */
.editor-workspace {
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(11, 20, 38, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-clean);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.post-file-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.canvas-stage {
  width: 100%;
  min-height: 220px;
  background: #02050c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

#editorCanvas,
#videoCanvas {
  display: block;
  border-radius: 10px;
  touch-action: none;
  cursor: grab;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  max-width: 100%;
}
#editorCanvas:active,
#videoCanvas:active {
  cursor: grabbing;
}

/* Video Playback Controls Bar */
.video-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(11, 20, 38, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.video-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.video-ctrl-btn:active {
  transform: scale(0.93);
}

.video-seek {
  flex: 1;
}

.video-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Video Export Progress */
.export-progress-card {
  margin: 10px 16px 4px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

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

.progress-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-surface);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-bright));
  transition: width 0.15s linear;
}

/* Active Layers Bar */
.active-layers-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.active-layers-bar::-webkit-scrollbar {
  display: none;
}

.mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.active-layers-chips {
  display: flex;
  gap: 6px;
}

.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.layer-chip.active {
  border-color: var(--blue-bright);
  background: var(--blue-soft);
  color: #ffffff;
}
.layer-chip-close {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* Panel Sections */
.panel-section {
  padding: 12px 16px 4px;
}

.section-header,
.controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Logos Horizontal Strip (IG Story/Filter Style) */
.logos-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.logos-strip::-webkit-scrollbar {
  display: none;
}

.logo-tile {
  width: 74px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  cursor: pointer;
}

.logo-tile-thumb {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-card);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.logo-tile:active .logo-tile-thumb {
  transform: scale(0.94);
}

.logo-tile.in-use .logo-tile-thumb {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.25);
}

.logo-tile-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.logo-tile-add .logo-tile-thumb {
  background: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  color: var(--blue-bright);
}

.logo-tile-name {
  font-size: 0.72rem;
  font-weight: 500;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Controls Card */
.controls-card {
  margin: 10px 16px 4px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.control-row {
  margin-bottom: 14px;
}
.control-row:last-child {
  margin-bottom: 0;
}

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.control-value {
  color: var(--blue-bright);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.control-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Custom Range Slider */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-bright));
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px var(--blue-glow);
  cursor: pointer;
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-bright));
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px var(--blue-glow);
  cursor: pointer;
}

.drag-hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Export Format Row */
.format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 10px;
}

.segmented {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--blue-primary);
  color: #ffffff;
}

/* Sticky Save CTA */
.save-cta-wrap {
  position: sticky;
  bottom: 0;
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(5, 10, 20, 0.96) 28%, #050a14 100%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.btn-save-clean {
  flex: 1;
  height: 52px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1877f2 0%, #0095f6 100%);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(24, 119, 242, 0.42);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-save-clean:active {
  transform: scale(0.98);
}
.btn-save-clean:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-share-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-share-icon:active {
  transform: scale(0.96);
}

/* Settings & Logos View */
.settings-container {
  padding: 18px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-hero h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
}

.settings-hero p {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.logo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.logo-card-preview {
  height: 112px;
  background-color: #0b1528;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.logo-card-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-card-footer {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-card-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-card-dims {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-delete-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-delete-logo:active {
  transform: scale(0.92);
}

.empty-logos-state {
  text-align: center;
  padding: 26px 16px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}
.empty-logos-state p {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
.empty-logos-state span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.settings-card-title {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.about-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge-clean {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 700;
}

.about-version {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.about-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Bottom Navigation Bar */
.bottom-nav {
  height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(5, 10, 20, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex-shrink: 0;
  z-index: 20;
}

.nav-item {
  border: none;
  background: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-item.active {
  color: var(--blue-bright);
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -10px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--blue-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modal Bottom Sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 75dvh;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fcd34d;
}

.meta-item-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.meta-status-tag {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: #86efac;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: calc(66px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 200;
}

.toast {
  background: rgba(15, 28, 52, 0.96);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.22s ease;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.45);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
