/* ============================================================
   Design tokens — "Ghat Press" identity
   A newsroom crossed with Varanasi's sandstone-and-brass palette.
   Signature element: the rotated wax-seal "status stamp" used for
   draft/final press release states throughout the app.
   ============================================================ */
:root {
  --bg-paper:     #F7F1E4;
  --bg-paper-dim: #EFE6D3;
  --ink:          #241F1A;
  --ink-soft:     #5B5145;
  --accent:       #A13D2C;   /* Banarasi vermillion — primary action */
  --accent-dark:  #7E2E20;
  --brass:        #B08628;   /* brass accent — org branding / secondary */
  --brass-soft:   #E4D2A0;
  --border:       #D9CBA8;
  --success:      #4B6B3A;
  --danger:       #A13D2C;
  --white:        #FFFDF8;

  --font-display: 'Playfair Display', 'Noto Serif Devanagari', serif;
  --font-hindi:   'Noto Serif Devanagari', serif;
  --font-body:    'Inter', 'Noto Sans Devanagari', sans-serif;

  --radius: 3px;
  --shadow: 0 2px 10px rgba(36, 31, 26, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: var(--accent-dark); }

/* ---------------- Masthead ---------------- */
.masthead {
  border-bottom: 3px double var(--ink);
  background: var(--white);
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.masthead .brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}
.masthead .brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}
.masthead .org-tag {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius);
  background: var(--bg-paper-dim);
}

/* ---------------- Layout ---------------- */
.shell { display: flex; min-height: calc(100vh - 76px); }
.sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
}
.sidebar a {
  display: block;
  padding: 11px 24px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  border-left: 3px solid transparent;
}
.sidebar a:hover, .sidebar a.active {
  background: var(--bg-paper-dim);
  border-left-color: var(--accent);
  color: var(--accent-dark);
}
.main { flex: 1; padding: 32px 40px; max-width: 980px; }

/* ---------------- Auth pages ---------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(var(--bg-paper), var(--bg-paper));
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}
.auth-card .eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.7rem;
  color: var(--brass);
  margin-bottom: 6px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 24px;
}

/* ---------------- Forms ---------------- */
label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
input[type=text], input[type=password], input[type=email], input[type=date],
input[type=tel], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 18px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 90px; font-family: var(--font-hindi); }
.hindi-text { font-family: var(--font-hindi); font-size: 1.05rem; line-height: 1.9; }

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--white); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-paper-dim); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- Cards / tables ---------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
h1.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 4px;
}
.subtitle { color: var(--ink-soft); margin: 0 0 24px; font-size: 0.95rem; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
th { color: var(--ink-soft); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.alert-success { background: #E8EFE3; border: 1px solid var(--success); color: var(--success); }
.alert-error   { background: #F5E4E0; border: 1px solid var(--danger); color: var(--accent-dark); }

/* ---------------- Signature element: the status stamp ---------------- */
.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 2px solid currentColor;
  border-radius: 40px;
  transform: rotate(-4deg);
}
.stamp-draft    { color: var(--brass); }
.stamp-review   { color: var(--ink-soft); }
.stamp-final    { color: var(--success); }

/* ---------------- Wizard / recorder ---------------- */
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.step-indicator span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.step-indicator span.done { background: var(--accent); }

.recorder {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-paper-dim);
  margin-bottom: 18px;
  text-align: center;
}
.rec-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}
.rec-btn.recording { background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(161,61,44,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(161,61,44,0); }
  100% { box-shadow: 0 0 0 0 rgba(161,61,44,0); }
}
.rec-status { margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); }

.helper-text { font-size: 0.8rem; color: var(--ink-soft); margin-top: -12px; margin-bottom: 16px; }

/* ---------------- Print / PDF view ---------------- */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .print-sheet { box-shadow: none; border: none; padding: 0; }
}
.print-sheet {
  background: white;
  max-width: 720px;
  margin: 0 auto;
  padding: 50px;
  border: 1px solid var(--border);
}
.print-sheet .letterhead-logo { max-height: 70px; margin-bottom: 16px; }
.print-sheet .dateline { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 20px; }
.print-sheet .release-body { font-family: var(--font-hindi); font-size: 1.05rem; white-space: pre-wrap; line-height: 2; }

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 8px; }
  .sidebar a { white-space: nowrap; }
  .main { padding: 20px; }
}
