/* ===== Stitch Design System: "The Editorial Juris" ===== */
/* Generated by Stitch MCP + Gemini 3.1 Pro */

:root {
  /* Primary palette */
  --primary: #6b38d4;
  --primary-container: #8455ef;
  --primary-light: #d0bcff;
  --on-primary: #ffffff;

  /* Surface hierarchy */
  --surface: #f8f9fa;
  --surface-low: #f3f4f5;
  --surface-lowest: #ffffff;
  --surface-container: #edeeef;
  --surface-high: #e7e8e9;

  /* Text */
  --on-surface: #191c1d;
  --on-surface-variant: #494454;
  --outline: #7b7486;
  --outline-variant: #cbc3d7;

  /* Semantic */
  --error: #ba1a1a;
  --tertiary: #855000;
  --tertiary-container: #a76500;

  /* Typography */
  --font-display: 'Manrope', 'Pretendard', sans-serif;
  --font-body: 'Inter', 'Pretendard', sans-serif;
}

/* ===== Global resets ===== */
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
}

/* ===== "No-Line" Rule: borders → background shifts ===== */
.sidebar {
  border-right: none !important;
  background: var(--surface-low);
}

/* ===== Typography Scale ===== */
h1, .page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

h2, .section-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--on-surface);
}

.label, .blog-card-meta, .stat-label {
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Cards: tonal layering, no hard borders ===== */
.blog-card,
.stat-card,
.blog-prompt-form,
.blog-header,
.blog-editor,
.section {
  background: var(--surface-lowest);
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(25, 28, 29, 0.04);
}

.blog-card:hover {
  box-shadow: 0 12px 32px -4px rgba(107, 56, 212, 0.12);
  transform: translateY(-3px);
}

/* ===== Buttons: gradient primary ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(107, 56, 212, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(107, 56, 212, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-high);
  color: var(--on-surface);
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--surface-container);
}

.btn-danger {
  background: var(--error);
  color: white;
  border: none;
  border-radius: 8px;
}

/* ===== Input fields: light-up on focus ===== */
.input,
.select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"] {
  background: var(--surface-high);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.2s;
  color: var(--on-surface);
}

.input:focus,
.select:focus,
textarea:focus,
input[type="text"]:focus {
  background: var(--surface-lowest);
  border-color: rgba(107, 56, 212, 0.2);
  box-shadow: 0 0 0 4px rgba(107, 56, 212, 0.06);
  outline: none;
}

/* ===== Blog editor content ===== */
.blog-editor-content {
  line-height: 1.85;
  font-size: 15px;
  color: var(--on-surface);
}

.blog-editor-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== Stat cards: tonal distinction ===== */
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ===== Status badges ===== */
.blog-status-badge {
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== Sidebar navigation ===== */
.nav-item {
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--on-surface-variant);
}

.nav-item:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}

.nav-item.active {
  background: rgba(107, 56, 212, 0.08);
  color: var(--primary);
  font-weight: 600;
}

/* ===== Tone/Length selector pills ===== */
.blog-tone-option input[type="radio"]:checked + .blog-tone-label,
.blog-length-option input[type="radio"]:checked + .blog-length-label {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: white;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(107, 56, 212, 0.3);
}

/* ===== File dropzone ===== */
.file-dropzone {
  border: 2px dashed var(--outline-variant);
  border-radius: 12px;
  background: var(--surface-low);
  transition: all 0.2s;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(107, 56, 212, 0.04);
}

/* ===== Schedule table ===== */
.schedule-table th {
  background: var(--surface-low);
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
}

.schedule-table td {
  border-bottom: 1px solid rgba(203, 195, 215, 0.15);
  padding: 14px 12px;
  font-size: 13px;
}

.schedule-table tr:hover td {
  background: rgba(107, 56, 212, 0.03);
}

/* ===== Priority ribbon for urgent items ===== */
.schedule-table tr.urgent td:first-child {
  border-left: 4px solid var(--tertiary);
}

/* ===== Scrollbar (refined) ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

/* ===== Mobile responsive ===== */
@media (max-width: 768px) {
  h1, .page-title { font-size: 1.5rem; }

  .blog-cards { grid-template-columns: 1fr; }

  .blog-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}

/* ===== Google Fonts import ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* Fix: sidebar logo must be white */
.sidebar h1,
.sidebar .logo h1,
.logo h1 {
  color: white !important;
  font-family: var(--font-display, Manrope, sans-serif);
}


/* AI Chat message markdown rendering */
.ai-chat-message.assistant .message-text {
  line-height: 1.7;
  font-size: 13.5px;
}
.ai-chat-message.assistant .message-text p {
  margin: 0 0 8px 0;
}
.ai-chat-message.assistant .message-text strong {
  font-weight: 700;
  color: var(--on-surface, #191c1d);
}
.ai-chat-message.assistant .message-text ul,
.ai-chat-message.assistant .message-text ol {
  margin: 8px 0;
  padding-left: 20px;
}
.ai-chat-message.assistant .message-text li {
  margin: 4px 0;
}
.ai-chat-message.assistant .message-text code {
  background: rgba(107, 56, 212, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

