/* ==========================================================================
   Bento Sticky Notes - Modern System Theme Stylesheet
   ========================================================================== */

:root {
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;

  /* Light Theme (Default) */
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #3b82f6;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.08);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.08);

  /* Sticky Note Color Themes (Light Mode) */
  --note-yellow-bg: #fefce8;
  --note-yellow-border: #fef08a;
  --note-yellow-accent: #ca8a04;
  --note-yellow-tape: rgba(234, 179, 8, 0.35);

  --note-mint-bg: #f0fdf4;
  --note-mint-border: #bbf7d0;
  --note-mint-accent: #16a34a;
  --note-mint-tape: rgba(34, 197, 94, 0.3);

  --note-sky-bg: #f0f9ff;
  --note-sky-border: #bae6fd;
  --note-sky-accent: #0284c7;
  --note-sky-tape: rgba(14, 165, 233, 0.3);

  --note-lavender-bg: #faf5ff;
  --note-lavender-border: #e9d5ff;
  --note-lavender-accent: #9333ea;
  --note-lavender-tape: rgba(168, 85, 247, 0.3);

  --note-peach-bg: #fff7ed;
  --note-peach-border: #fed7aa;
  --note-peach-accent: #ea580c;
  --note-peach-tape: rgba(249, 115, 22, 0.3);

  --note-slate-bg: #f8fafc;
  --note-slate-border: #cbd5e1;
  --note-slate-accent: #475569;
  --note-slate-tape: rgba(100, 116, 139, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --shadow-bento: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
}

/* System Dark Theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-surface-elevated: #162032;
    --bg-subtle: #1e293b;
    --bg-hover: #283548;
    --border-color: #1f293d;
    --border-subtle: #2a374f;
    --border-focus: #60a5fa;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --danger: #f87171;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --success: #34d399;
    --success-soft: rgba(16, 185, 129, 0.15);

    /* Sticky Note Color Themes (Dark Mode - Rich moody tones with ambient glow) */
    --note-yellow-bg: #1c1808;
    --note-yellow-border: #42360f;
    --note-yellow-accent: #facc15;
    --note-yellow-tape: rgba(250, 204, 21, 0.35);

    --note-mint-bg: #091c12;
    --note-mint-border: #144528;
    --note-mint-accent: #4ade80;
    --note-mint-tape: rgba(74, 222, 128, 0.3);

    --note-sky-bg: #091a29;
    --note-sky-border: #133f63;
    --note-sky-accent: #38bdf8;
    --note-sky-tape: rgba(56, 189, 248, 0.3);

    --note-lavender-bg: #190e29;
    --note-lavender-border: #3b1d5c;
    --note-lavender-accent: #c084fc;
    --note-lavender-tape: rgba(192, 132, 252, 0.3);

    --note-peach-bg: #221208;
    --note-peach-border: #572a15;
    --note-peach-accent: #fb923c;
    --note-peach-tape: rgba(251, 146, 60, 0.3);

    --note-slate-bg: #111827;
    --note-slate-border: #293548;
    --note-slate-accent: #94a3b8;
    --note-slate-tape: rgba(148, 163, 184, 0.3);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.7);
    --shadow-bento: 0 2px 8px -2px rgba(0, 0, 0, 0.4), 0 1px 3px -1px rgba(0, 0, 0, 0.3);
  }
}

/* Explicit theme overrides */
:root[data-theme="dark"] {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #162032;
  --bg-subtle: #1e293b;
  --bg-hover: #283548;
  --border-color: #1f293d;
  --border-subtle: #2a374f;
  --border-focus: #60a5fa;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --success: #34d399;
  --success-soft: rgba(16, 185, 129, 0.15);

  --note-yellow-bg: #1c1808;
  --note-yellow-border: #42360f;
  --note-yellow-accent: #facc15;
  --note-yellow-tape: rgba(250, 204, 21, 0.35);

  --note-mint-bg: #091c12;
  --note-mint-border: #144528;
  --note-mint-accent: #4ade80;
  --note-mint-tape: rgba(74, 222, 128, 0.3);

  --note-sky-bg: #091a29;
  --note-sky-border: #133f63;
  --note-sky-accent: #38bdf8;
  --note-sky-tape: rgba(56, 189, 248, 0.3);

  --note-lavender-bg: #190e29;
  --note-lavender-border: #3b1d5c;
  --note-lavender-accent: #c084fc;
  --note-lavender-tape: rgba(192, 132, 252, 0.3);

  --note-peach-bg: #221208;
  --note-peach-border: #572a15;
  --note-peach-accent: #fb923c;
  --note-peach-tape: rgba(251, 146, 60, 0.3);

  --note-slate-bg: #111827;
  --note-slate-border: #293548;
  --note-slate-accent: #94a3b8;
  --note-slate-tape: rgba(148, 163, 184, 0.3);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.7);
  --shadow-bento: 0 2px 8px -2px rgba(0, 0, 0, 0.4), 0 1px 3px -1px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color-scheme: light dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  transition: background-color var(--duration-normal) var(--ease-spring), color var(--duration-normal) var(--ease-spring);
  position: relative;
  overflow-x: hidden;
}

/* Subtle background bento grid pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 1px 1px, var(--border-color) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.4;
  z-index: 0;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(var(--bg-canvas), 0.82);
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--duration-normal) var(--ease-spring);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.theme-pill-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all var(--duration-fast) var(--ease-spring);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   Hero / Controls Bar
   ========================================================================== */

.board-controls {
  max-width: 1400px;
  margin: 1.5rem auto 1rem;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.board-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-number {
  font-weight: 700;
  color: var(--text-primary);
}

.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-input {
  width: 100%;
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  font-size: 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  transition: all var(--duration-fast) ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
   Bento Grid Layout
   ========================================================================== */

.bento-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 4rem;
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 5;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  grid-auto-flow: dense;
}

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

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

@media (min-width: 1280px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card Spanning Styles for Bento Rhythm */
.bento-card.span-wide {
  grid-column: span 1;
}

@media (min-width: 640px) {
  .bento-card.span-wide {
    grid-column: span 2;
  }
}

.bento-card.span-tall {
  grid-row: span 2;
}

/* ==========================================================================
   Sticky Note Card
   ========================================================================== */

.bento-card {
  position: relative;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: var(--shadow-bento);
  transition: transform var(--duration-normal) var(--ease-spring), box-shadow var(--duration-normal) var(--ease-spring);
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Sticky Tape / Pin Aesthetic Indicator */
.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 9px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  opacity: 0.75;
}

/* Color Accent Variants */
.bento-card.accent-yellow {
  background: var(--note-yellow-bg);
  border-color: var(--note-yellow-border);
}
.bento-card.accent-yellow::before {
  background: var(--note-yellow-tape);
}

.bento-card.accent-mint {
  background: var(--note-mint-bg);
  border-color: var(--note-mint-border);
}
.bento-card.accent-mint::before {
  background: var(--note-mint-tape);
}

.bento-card.accent-sky {
  background: var(--note-sky-bg);
  border-color: var(--note-sky-border);
}
.bento-card.accent-sky::before {
  background: var(--note-sky-tape);
}

.bento-card.accent-lavender {
  background: var(--note-lavender-bg);
  border-color: var(--note-lavender-border);
}
.bento-card.accent-lavender::before {
  background: var(--note-lavender-tape);
}

.bento-card.accent-peach {
  background: var(--note-peach-bg);
  border-color: var(--note-peach-border);
}
.bento-card.accent-peach::before {
  background: var(--note-peach-tape);
}

.bento-card.accent-slate {
  background: var(--note-slate-bg);
  border-color: var(--note-slate-border);
}
.bento-card.accent-slate::before {
  background: var(--note-slate-tape);
}

/* Card Header */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.accent-yellow .card-dot { background: var(--note-yellow-accent); }
.accent-mint .card-dot { background: var(--note-mint-accent); }
.accent-sky .card-dot { background: var(--note-sky-accent); }
.accent-lavender .card-dot { background: var(--note-lavender-accent); }
.accent-peach .card-dot { background: var(--note-peach-accent); }
.accent-slate .card-dot { background: var(--note-slate-accent); }

.card-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.report-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
  opacity: 0.6;
}

.bento-card:hover .report-btn {
  opacity: 1;
}

.report-btn:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Card Content */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  word-break: break-word;
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.card-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Media Attachment in Card */
.card-media-wrapper {
  margin-top: 0.35rem;
  border-radius: 12px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-media-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.card-media-img:hover {
  transform: scale(1.015);
}

.card-media-video {
  width: 100%;
  max-height: 380px;
  display: block;
  background: #000;
  border-radius: 12px;
  outline: none;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
}

/* ==========================================================================
   Composer Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-spring);
  position: relative;
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
}

.modal-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-canvas);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  font-size: 0.925rem;
  font-family: inherit;
  outline: none;
  transition: all var(--duration-fast) ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

/* Color Accent Picker */
.color-picker-grid {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  transition: transform var(--duration-fast) ease, border-color var(--duration-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  transform: scale(1.15);
  border-color: var(--text-primary);
}

.color-option::after {
  content: "";
  display: none;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.color-option.selected::after {
  display: block;
}

.color-option[data-color="yellow"] { background: #fef08a; color: #713f12; }
.color-option[data-color="mint"] { background: #bbf7d0; color: #14532d; }
.color-option[data-color="sky"] { background: #bae6fd; color: #0c4a6e; }
.color-option[data-color="lavender"] { background: #e9d5ff; color: #581c87; }
.color-option[data-color="peach"] { background: #fed7aa; color: #7c2d12; }
.color-option[data-color="slate"] { background: #cbd5e1; color: #1e293b; }

/* Drag & Drop Upload Zone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-canvas);
  transition: all var(--duration-fast) ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dropzone:hover, .dropzone.drag-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Compression Progress & Preview Component
   ========================================================================== */

.compression-status-card {
  border-radius: 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.compression-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.compression-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.compression-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.remove-attachment-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.remove-attachment-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #10b981);
  border-radius: 9999px;
  width: 0%;
  transition: width 150ms ease;
}

.compression-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-thumb {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 0.25rem;
  background: #000;
  align-self: center;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   Global Drag & Drop Overlay
   ========================================================================== */

.global-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 4px dashed var(--accent);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) ease;
}

.global-drop-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drop-overlay-box {
  background: var(--bg-surface);
  padding: 2.5rem 3.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Image Lightbox
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Toasts Notification
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: slideIn 0.25s var(--ease-spring);
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


