/* ==========================================================================
   Atelier PMS — Design System
   ========================================================================== */

:root {
  /* Palette */
  --ink: #1c1a17;
  --charcoal: #2b2822;
  --charcoal-soft: #423d34;
  --cream: #faf7f2;
  --paper: #ffffff;
  --line: #e8e2d6;
  --line-soft: #f0ebe1;
  --muted: #8a8375;
  --muted-soft: #b3ac9d;

  --brass: #ab8248;
  --brass-dark: #8d6836;
  --brass-light: #d8c19a;
  --brass-wash: #f7f0e3;

  --green: #55744f;
  --green-wash: #eaf0e6;
  --amber: #b8853a;
  --amber-wash: #f9efdf;
  --red: #a44f42;
  --red-wash: #f6e9e6;
  --blue: #4f6a80;
  --blue-wash: #e9eef2;
  --gray: #93897a;
  --gray-wash: #efece5;

  /* Type */
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 6px 20px rgba(28, 26, 23, 0.08);
  --shadow-lg: 0 20px 48px rgba(28, 26, 23, 0.14);

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--brass-dark);
  font-weight: 600;
}

/* ---- Layout shell -------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--ink);
  color: var(--cream);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
  padding: 0 4px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--brass-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  color: var(--brass-light);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.03em;
  color: var(--paper);
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted-soft);
  margin-top: 3px;
  text-transform: uppercase;
}

.nav-group { margin-bottom: 28px; }
.nav-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d6558;
  padding: 0 12px;
  margin-bottom: 8px;
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #c9c2b2;
  font-size: 14px;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 2px solid transparent;
}
.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--paper); }
.nav-link.active {
  background: rgba(171, 130, 72, 0.16);
  color: var(--paper);
  border-left-color: var(--brass-light);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.user-chip:hover { background: rgba(255,255,255,0.05); }
.user-chip .avatar { width: 34px; height: 34px; font-size: 13px; }
.user-chip-meta { min-width: 0; }
.user-chip-name { font-size: 13.5px; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { font-size: 11px; color: var(--muted-soft); }

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  width: 340px;
  color: var(--muted);
  font-size: 13.5px;
}
.topbar-search svg { width: 15px; height: 15px; opacity: 0.6; }
.topbar-search input {
  border: none; background: none; outline: none; width: 100%;
  font-size: 13.5px; color: var(--ink);
}

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

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--charcoal-soft);
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn:hover { border-color: var(--brass); color: var(--brass-dark); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--paper);
}

.content { padding: 40px; flex: 1; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 32px; }
.page-head .sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* ---- Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brass-dark); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brass); color: var(--brass-dark); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-brass { background: var(--brass); color: var(--paper); }
.btn-brass:hover { background: var(--brass-dark); }

/* ---- Cards ------------------------------------------------------------ */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
}
.card-flush { padding: 0; overflow: hidden; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 17px; height: 17px; }
.stat-value { font-family: var(--display); font-size: 30px; }
.stat-label { color: var(--muted); font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase; }
.stat-trend { font-size: 12px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

/* ---- Status badges ----------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ontrack { background: var(--green-wash); color: var(--green); }
.badge-risk { background: var(--amber-wash); color: var(--amber); }
.badge-delayed { background: var(--red-wash); color: var(--red); }
.badge-complete { background: var(--brass-wash); color: var(--brass-dark); }
.badge-pending { background: var(--gray-wash); color: var(--gray); }
.badge-review { background: var(--blue-wash); color: var(--blue); }

/* ---- Progress ----------------------------------------------------------- */

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brass);
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.progress-fill.green { background: var(--green); }
.progress-fill.amber { background: var(--amber); }
.progress-fill.red { background: var(--red); }

.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .progress-track { flex: 1; }
.progress-pct { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

.ring {
  --pct: 0;
  --size: 148px;
  --thickness: 10px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  position: relative;
  background: conic-gradient(var(--brass) calc(var(--pct) * 1%), var(--line-soft) 0);
  display: flex; align-items: center; justify-content: center;
}
.ring::before {
  content: '';
  position: absolute;
  inset: var(--thickness);
  background: var(--paper);
  border-radius: 50%;
}
.ring-inner { position: relative; text-align: center; }
.ring-inner .num { font-family: var(--display); font-size: 34px; line-height: 1; }
.ring-inner .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

/* ---- Tabs ---------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.tab {
  padding: 12px 4px;
  margin-right: 28px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  position: relative;
  top: 1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-color: var(--brass); font-weight: 500; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein 0.25s ease; }

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

/* ---- Avatars ----------------------------------------------------------- */

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--paper);
  background: var(--charcoal-soft);
  flex-shrink: 0;
}
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--paper); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---- Milestone timeline (stepper) --------------------------------------- */

.stepper {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 6px 2px 18px;
}
.step {
  flex: 1;
  min-width: 150px;
  text-align: center;
  position: relative;
  padding: 0 8px;
}
.step-line {
  position: absolute;
  top: 15px; left: -50%; width: 100%;
  height: 2px; background: var(--line);
  z-index: 0;
}
.step:first-child .step-line { display: none; }
.step.done .step-line { background: var(--brass); }
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  position: relative; z-index: 1;
  font-family: var(--display);
  font-size: 13px;
  color: var(--muted);
}
.step.done .step-dot { background: var(--brass); border-color: var(--brass); color: var(--paper); }
.step.current .step-dot { border-color: var(--brass); color: var(--brass-dark); box-shadow: 0 0 0 4px var(--brass-wash); }
.step-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.step-date { font-size: 11.5px; color: var(--muted-soft); }

/* ---- Vertical timeline ---------------------------------------------------- */

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -30px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.timeline-item.done .timeline-dot { background: var(--brass); border-color: var(--brass); }
.timeline-item.done .timeline-dot svg { width: 10px; height: 10px; stroke: var(--paper); }
.timeline-item.current .timeline-dot { border-color: var(--brass); box-shadow: 0 0 0 4px var(--brass-wash); }
.timeline-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.timeline-title { font-weight: 500; font-size: 15px; }
.timeline-date { font-size: 12.5px; color: var(--muted); }
.timeline-desc { color: var(--muted); font-size: 13.5px; max-width: 60ch; }

/* ---- Tables --------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--cream); }

/* ---- Task list -------------------------------------------------------- */

.task-group { margin-bottom: 30px; }
.task-group-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.task-group-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.task-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  margin-bottom: 8px;
}
.task-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--muted-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.task-row.complete .task-check { background: var(--brass); border-color: var(--brass); }
.task-row.complete .task-check svg { width: 11px; height: 11px; stroke: var(--paper); }
.task-row.complete .task-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted-soft); }
.task-name { flex: 1 1 160px; min-width: 0; font-size: 14px; }
.task-meta { display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--muted); flex-shrink: 0; margin-left: auto; }
.task-priority { padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 500; }
.priority-high { background: var(--red-wash); color: var(--red); }
.priority-med { background: var(--amber-wash); color: var(--amber); }
.priority-low { background: var(--gray-wash); color: var(--gray); }

/* ---- Files -------------------------------------------------------------- */

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.file-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--paper);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.file-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-soft); }
.file-icon {
  width: 42px; height: 42px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.file-icon svg { width: 20px; height: 20px; }
.file-name { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; word-break: break-word; }
.file-meta { font-size: 11.5px; color: var(--muted); }

.folder-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--paper);
}
.folder-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--brass-wash); color: var(--brass-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.folder-icon svg { width: 18px; height: 18px; }
.folder-name { font-weight: 500; font-size: 14px; }
.folder-meta { font-size: 12px; color: var(--muted); }

.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: var(--cream);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone.drag { border-color: var(--brass); background: var(--brass-wash); color: var(--brass-dark); }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 10px; opacity: 0.6; }

/* ---- Photo placeholders (moodboard style, no external assets) ----------- */

.photo-tile {
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
}
.photo-tile .cap {
  position: relative; z-index: 1;
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  width: 100%;
}
.p1 { background: linear-gradient(135deg,#d9c9ad,#a9835a 60%,#6b4a33); }
.p2 { background: linear-gradient(135deg,#c9d0c2,#8a9a7c 55%,#556349); }
.p3 { background: linear-gradient(135deg,#e3d9cd,#b9a488 55%,#7c6748); }
.p4 { background: linear-gradient(135deg,#d3c4bd,#a17f74 55%,#5f463f); }
.p5 { background: linear-gradient(135deg,#cfd6d8,#8fa0a4 55%,#4f6266); }
.p6 { background: linear-gradient(135deg,#ded2b8,#b59760 55%,#79602f); }

/* ---- Forms ---------------------------------------------------------------- */

.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 500;
  margin-bottom: 7px; color: var(--charcoal-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); }

/* ---- Modal ------------------------------------------------------------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,26,23,0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.modal-close:hover { background: var(--cream); }

/* ---- Notification dropdown --------------------------------------------- */

.dropdown-panel {
  position: absolute;
  top: 54px; right: 40px;
  width: 340px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 50;
  overflow: hidden;
}
.dropdown-panel.open { display: block; }
.dropdown-head { padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; display:flex; justify-content: space-between; align-items:center; }
.notif-item { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-top: 6px; flex-shrink: 0; }
.notif-text { font-size: 13px; }
.notif-time { font-size: 11.5px; color: var(--muted-soft); margin-top: 2px; }

/* ---- Theme switcher ------------------------------------------------------ */

.theme-switcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 300;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.theme-switcher button {
  border: none;
  background: transparent;
  color: #c9c2b2;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.theme-switcher button.active { background: var(--brass); color: #fff; }

/* ---- Utility ------------------------------------------------------------ */

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-8{margin-bottom:8px;} .mb-16{margin-bottom:16px;} .mb-24{margin-bottom:24px;}
.muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px; }
.section-title { font-size: 18px; margin-bottom: 4px; }
.divider { height: 1px; background: var(--line); margin: 28px 0; border: none; }

/* ---- Login page --------------------------------------------------------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-visual {
  background: radial-gradient(circle at 20% 20%, #3a3428, #1c1a17 70%);
  position: relative;
  color: var(--cream);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 80%, rgba(171,130,72,0.25), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 60px);
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-quote { font-family: var(--serif); font-size: 30px; line-height: 1.4; max-width: 22ch; font-style: italic; color: #f1ece1; }
.auth-quote-by { margin-top: 18px; font-size: 12.5px; letter-spacing: 0.06em; color: var(--brass-light); text-transform: uppercase; }

.auth-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--paper);
}
.auth-box { width: 100%; max-width: 380px; }
.role-tabs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 32px; }
.role-tab { flex: 1; text-align: center; padding: 9px 0; border-radius: 999px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.role-tab.active { background: var(--ink); color: var(--paper); }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
.mobile-nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--charcoal-soft);
  flex-shrink: 0;
}
.mobile-nav-toggle svg { width: 18px; height: 18px; }
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,26,23,0.5);
  z-index: 150;
}

@media (max-width: 900px) {
  .topbar > div:first-child { min-width: 0; flex: 1; }
  .topbar .eyebrow, .topbar .text-sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: 264px; height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-backdrop.open { display: block; }
  .mobile-nav-toggle { display: flex; }
  .content { padding: 24px; }
  .topbar { padding: 16px 20px; gap: 14px; }
  .topbar-search { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}
