@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Modern clean palette replacing the old beige */
  --bg: #F8FAFC; /* Very light gray */
  --card: #FFFFFF;
  --card-dark: #0F172A;
  --card-blue: #1E3A8A; /* Deeper richer blue */
  --card-cream: #FEF3C7; /* Richer amber */
  --card-sage: #D1FAE5; /* Richer green */
  
  --text: #0F172A;
  --text-muted: #475569;
  
  --accent: #3B82F6;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #4F46E5 100%);
  --accent-light: #EFF6FF;
  --accent-hover: #4F46E5;
  
  --border: rgba(15, 23, 42, 0.08);
  --border-light: rgba(15, 23, 42, 0.04);
  
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-accent: 0 8px 16px -4px rgba(79, 70, 229, 0.25);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 12px;
}

h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 24px; font-weight: 500; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px 20px; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: #F8FAFC; transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--text); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn.primary { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: var(--shadow-accent); }
.btn.primary:hover { background: var(--accent-gradient); opacity: 0.95; box-shadow: 0 12px 20px -6px rgba(79, 70, 229, 0.4); color: #fff; transform: translateY(-2px); }

.btn.danger { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.btn.danger:hover { background: #FEE2E2; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15); }

.btn.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Forms */
.input, input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 120px; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}
input[disabled], select[disabled], textarea[disabled], button[disabled], .btn[disabled] {
  opacity: 0.6; cursor: not-allowed; pointer-events: none;
}

.label, label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
label.muted { color: var(--text-muted); font-weight: 500; }

.error {
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}
.error-list { color: #DC2626; margin-left: 20px; font-size: 14px; }

/* Flash messages */
.flash-wrap { max-width: 1440px; margin: 0 auto; padding: 16px 24px 0; }
.flash {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.flash-success { border-left: 4px solid #10B981; }
.flash-error { border-left: 4px solid #EF4444; }
.flash-warning { border-left: 4px solid #F59E0B; }

/* Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-ok { background: #DCFCE7; color: #166534; }
.pill-weak { background: #FEF3C7; color: #92400E; }

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.badge.status-ready { background: #DCFCE7; border-color: #BBF7D0; color: #166534; }
.badge.status-generating, .badge.status-step_waiting { background: var(--accent-light); border-color: #BFDBFE; color: var(--accent); }
.badge.status-error { background: #FEF2F2; border-color: #FECACA; color: #DC2626; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card.narrow { max-width: 560px; margin: 0 auto; padding: 40px; }

/* Layout Helpers */
.main { width: 100%; }
.main-auth { max-width: 1440px; margin: 0 auto; padding: 40px 24px 80px; }
.mt { margin-top: 24px; }
.stack { display: grid; gap: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }

/* Topbar */
.topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: 'Cormorant', serif;
  font-size: 26px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); }

/* Landing specific */
.landing-section { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 16px 6px 10px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 32px; box-shadow: var(--shadow-sm);
}
.hero-badge-dot { width: 8px; height: 8px; background: #10B981; border-radius: 50%; display: inline-block; }

.section-heading { max-width: 1440px; margin: 0 auto; padding: 0 24px 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 0; }
.section-heading p { font-size: 15px; color: var(--text-muted); max-width: 320px; text-align: right; margin: 0; }
@media (max-width: 600px) { .section-heading { flex-direction: column; align-items: flex-start; } .section-heading p { text-align: left; max-width: 100%; } }

.bento-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.bc-4 { grid-column: span 4; } .bc-5 { grid-column: span 5; } .bc-6 { grid-column: span 6; } .bc-7 { grid-column: span 7; } .bc-8 { grid-column: span 8; } .bc-12 { grid-column: span 12; }
@media (max-width: 960px) { .bc-4, .bc-5, .bc-6, .bc-7, .bc-8, .bc-12 { grid-column: span 12; } }

.bcard { background: var(--card); border-radius: var(--radius-lg); padding: 32px; position: relative; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.bcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bcard.dark { background: var(--card-dark); color: #fff; border-color: transparent; }
.bcard.blue { background: var(--card-blue); color: #fff; border-color: transparent; }
.bcard.cream { background: var(--card-cream); }
.bcard.sage { background: var(--card-sage); }
.bcard h3 { margin-bottom: 12px; }
.bcard p { color: var(--text-muted); margin: 0; }
.bcard.dark p, .bcard.blue p { color: rgba(255,255,255,0.7); }

.card-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 24px; }
.icon-blue { background: var(--accent-light); color: var(--accent); }
.icon-dark { background: rgba(255,255,255,0.1); color: #fff; }
.icon-green { background: #DCFCE7; color: #166534; }
.icon-amber { background: #FEF3C7; color: #92400E; }

.step-list { list-style: none; padding: 0; margin: 24px 0 0; }
.step-list li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-light); font-size: 15px; font-weight: 500; }
.step-list li:last-child { border-bottom: none; padding-bottom: 0; }
.bcard.dark .step-list li { border-color: rgba(255,255,255,0.1); }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bcard.dark .step-num { background: rgba(255,255,255,0.1); color: #fff; }

.doc-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.doc-pill { background: var(--accent-light); color: var(--accent); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.bcard.dark .doc-pill { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }
.bcard.blue .doc-pill { background: rgba(255,255,255,0.2); color: #fff; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1440px; margin: 0 auto; padding: 0 24px 80px; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; max-width: 480px; } }
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 32px; position: relative; transition: all 0.3s; box-shadow: var(--shadow-sm); }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.featured { background: var(--card-dark); color: #fff; border-color: transparent; }
.plan-name { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.price-card.featured .plan-name { color: rgba(255,255,255,0.6); }
.price-amount { font-family: 'Cormorant', serif; font-size: 56px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin: 0 0 8px; }
.price-period { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.price-card.featured .price-period { color: rgba(255,255,255,0.6); }
.feature-list { list-style: none; padding: 0; margin: 0 0 32px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.feature-list li:last-child { border-bottom: none; }
.price-card.featured .feature-list li { border-color: rgba(255,255,255,0.1); }
.check { color: #10B981; font-size: 16px; font-weight: 700; }
.badge-popular { position: absolute; top: -12px; right: 32px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 16px; border-radius: 999px; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

.cta-banner { background: var(--card-dark); border-radius: var(--radius-lg); padding: 80px 48px; text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-banner h2 { font-size: clamp(40px, 6vw, 56px); margin-bottom: 16px; color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.7); font-size: 18px; max-width: 560px; margin: 0 auto 40px; }
@media (max-width: 600px) { .cta-banner { padding: 48px 24px; } }

/* Cabinet / Dashboard Layout */
.cabinet-layout { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); background: var(--bg); }
.cabinet-sidebar { padding: 24px 20px; border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--card); }
.cabinet-brand a { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; font-family: 'Cormorant', serif; font-size: 20px; }
.cabinet-brand-mark { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); background: var(--accent); color: #fff; font-weight: 700; font-family: 'Golos Text', sans-serif; font-size: 16px; }
.cabinet-sub { display: block; margin-top: 6px; color: var(--text-muted); font-size: 13px; margin-left: 48px; }

.cabinet-preview-card { margin-top: 32px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.cabinet-preview-label { display: inline-flex; background: var(--accent-light); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px; }
.cabinet-preview-card strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cabinet-preview-card p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.cabinet-nav { margin-top: 32px; display: grid; gap: 4px; }
.cabinet-nav-label { margin: 0 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.cabinet-link { display: flex; align-items: center; padding: 10px 12px; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 14px; font-weight: 500; transition: all 0.2s; }
.cabinet-link:hover { background: var(--bg); color: var(--text); }
.cabinet-link.is-active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.cabinet-link-muted { color: var(--text-muted); }

.cabinet-user { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-light); padding-left: 12px; padding-right: 12px; }
.cabinet-user-name { display: block; font-weight: 600; font-size: 14px; }
.cabinet-user-role { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.cabinet-badge { display: inline-flex; margin-top: 8px; background: var(--card-dark); color: #fff; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 600; }

.cabinet-main { padding: 32px 48px 80px; }
.cabinet-content { max-width: 1440px; margin: 0 auto; width: 100%; }
.cabinet-flash { max-width: 1440px; margin: 0 auto 24px; }

@media (max-width: 1024px) {
  .cabinet-layout { grid-template-columns: 1fr; }
  .cabinet-sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 20px; }
  .cabinet-main { padding: 24px 20px 60px; }
}

/* Dashboard Specifics */
.dashboard-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.dashboard-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; display: block; }
.dashboard-hero h1 { margin-bottom: 12px; }
.dashboard-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 768px) { .dashboard-hero { flex-direction: column; align-items: flex-start; } }

.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dashboard-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s; }
.dashboard-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dashboard-stat-card span { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.dashboard-stat-card strong { display: block; font-family: 'Cormorant', serif; font-size: 48px; font-weight: 600; margin-top: 12px; line-height: 1; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 32px; }
@media (max-width: 860px) { .dashboard-grid { grid-template-columns: 1fr; } }
.dashboard-panel { padding: 24px; }
.dashboard-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dashboard-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 600px) { .dashboard-plan-grid { grid-template-columns: 1fr; } }
.dashboard-plan-card { border-radius: var(--radius-sm); border: 1px solid var(--border); padding: 16px; background: var(--bg); text-align: center; }
.dashboard-plan-card strong { display: block; font-weight: 600; font-size: 14px; }
.dashboard-plan-card span { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.dashboard-plan-card.featured { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.dashboard-plan-card.featured span { color: var(--accent); opacity: 0.8; }

.dashboard-checklist { margin: 16px 0 0; padding: 0; list-style: none; }
.dashboard-checklist li { position: relative; padding-left: 28px; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.dashboard-checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #10B981; font-weight: 700; font-size: 16px; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; margin-top: 24px; }
.project-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 32px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.project-card-head a { font-weight: 600; font-size: 18px; color: var(--text); line-height: 1.3; }
.project-meta-row { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; flex-grow: 1; }
.project-card-actions { display: flex; gap: 12px; margin-top: auto; }

/* Empty states */
.empty { background: var(--card); border: 1px dashed #D1D5DB; border-radius: var(--radius); padding: 48px 24px; text-align: center; }
.empty-title { font-family: 'Cormorant', serif; font-size: 28px; font-weight: 600; margin-bottom: 12px; }

/* Project Detail Specifics */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-light); }
@media (max-width: 768px) { .page-head { flex-direction: column; align-items: flex-start; } }

.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px 24px; margin: 24px 0 0; }
.kv dt { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.kv dd { margin: 0; font-size: 14px; font-weight: 500; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 4px 16px; margin-bottom: 16px; } .kv dt { margin-top: 12px; } }

.pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; }
.small-json { font-size: 12px; color: var(--text-muted); }

.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: none; }

.table-rpd { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }
.table-rpd th { background: var(--bg); }

/* RPD Generation Card */
.generation-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); padding: 24px; box-shadow: var(--shadow-sm); }
.generation-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.generation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.generation-percent { font-weight: 700; font-size: 24px; color: var(--accent); font-family: 'Golos Text', sans-serif; }
.generation-progress { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.generation-progress-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.generation-log { margin-top: 24px; display: grid; gap: 12px; }
.generation-log-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px 16px; }
.generation-log-item p { margin: 0; font-size: 14px; font-weight: 500; }
.generation-log-item span { color: var(--text-muted); font-size: 12px; display: block; margin-top: 4px; }
.generation-log-badge { display: inline-flex; align-items: center; justify-content: center; height: 28px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 700; }
.generation-card.is-active .generation-log-badge { background: var(--accent-light); color: var(--accent); border-color: transparent; }

/* Subnav */
.rpd-subnav { position: sticky; top: 16px; z-index: 30; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; display: flex; gap: 4px; flex-wrap: wrap; margin: 32px 0 24px; box-shadow: var(--shadow-md); }
.rpd-subnav a { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; color: var(--text-muted); font-size: 13px; font-weight: 600; transition: all 0.2s; }
.rpd-subnav a:hover { background: var(--bg); color: var(--text); }

.section-rpd { scroll-margin-top: 100px; margin-bottom: 24px; }

/* Score breakdown */
.quality-big { font-family: 'Cormorant', serif; font-size: 64px; font-weight: 600; line-height: 1; margin-bottom: 12px; }
.quality-big span { font-size: 24px; font-weight: 500; font-family: 'Golos Text', sans-serif; }

.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
@media (max-width: 768px) { .check-grid { grid-template-columns: 1fr; } }
.check-grid > div { background: var(--bg); padding: 20px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg); text-align: center; }
.footer span { display: block; font-size: 14px; color: var(--text-muted); }
.footer span:first-child { font-family: 'Cormorant', serif; font-size: 24px; color: var(--text); font-weight: 600; margin-bottom: 8px; }

/* Helpers */
.agent-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.agent-score { background: var(--card-dark); color: #fff; padding: 16px 24px; border-radius: var(--radius-sm); text-align: center; }
.agent-score strong { display: block; font-family: 'Cormorant', serif; font-size: 40px; line-height: 1; margin-bottom: 4px; }
.agent-score span { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

.agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
@media (max-width: 768px) { .agent-grid { grid-template-columns: 1fr; } }
.agent-grid > div { background: var(--bg); padding: 20px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }

.revision-list { display: grid; gap: 16px; margin-top: 16px; }
.revision-item { background: var(--bg); padding: 16px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }
.revision-item p { margin-bottom: 8px; }
/* Utility / Legacy classes mapped */
.dashboard-mini-list { list-style: none; padding: 0; margin: 12px 0 0; }
.dashboard-mini-list li { margin-bottom: 8px; font-size: 14px; }
.dashboard-mini-list a { font-weight: 500; color: var(--text); }
.dashboard-mini-list a:hover { color: var(--accent); text-decoration: underline; }

.hours-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-list { list-style: none; margin: 12px 0 0; padding: 0; }
.error-list li { color: #DC2626; font-size: 14px; position: relative; padding-left: 20px; margin-bottom: 8px; }
.error-list li::before { content: "!"; position: absolute; left: 0; font-weight: bold; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.admin-stat-value { display: block; font-family: 'Cormorant', serif; font-size: 40px; font-weight: 600; margin-top: 8px; line-height: 1; }
.admin-stat-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }

.admin-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.admin-link-item { background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; transition: background 0.2s; display: block; }
.admin-link-item:hover { background: var(--accent-light); border-color: var(--accent); }
.admin-link-app { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; display: block; }
.admin-link-name { font-weight: 600; color: var(--text); font-size: 15px; }

.audit-filters-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; align-items: flex-end; }
.audit-filters-grow { grid-column: span 2; }
@media (max-width: 768px) { .audit-filters-grow { grid-column: span 1; } }
.audit-filters-actions { display: flex; align-items: center; justify-content: flex-end; }
.audit-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: var(--border-light) 1px solid; }
.audit-page-status { color: var(--text-muted); font-size: 14px; font-weight: 500; }

.field-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* End of file */
