:root {
  --navy: #0f172a;
  --blue: #2563eb;
  --gold: #c9a227;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 35%),
    linear-gradient(145deg, #f8fafc, #eef2ff);
}

.login-card {
  width: min(520px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.login-card h1 { font-size: 38px; margin-top: 18px; }
.login-card p { color: var(--muted); line-height: 1.55; }
.login-card form { display: grid; gap: 16px; margin-top: 22px; }
.login-card .primary-btn { width: 100%; }
.login-hint {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--navy), #111827);
  color: white;
  padding: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 42px;
}

.login-brand { margin-bottom: 8px; }

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold);
  font-size: 26px;
  border: 1px solid rgba(201, 162, 39, 0.4);
}

.brand-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-title span { color: var(--gold); }

.brand-subtitle {
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 2px;
}

.nav { display: grid; gap: 10px; }

.nav-item {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: rgba(255,255,255,0.12);
}

.sidebar-card {
  margin-top: 34px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
}

.sidebar-card p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.45;
}

.logout-btn {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.main {
  padding: 34px;
  max-width: 1280px;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
}

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.04em;
}

h1 { font-size: clamp(34px, 4vw, 58px); line-height: 1.03; max-width: 850px; }
h2 { font-size: 34px; }
h3 { font-size: 27px; }

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 760px;
}

.primary-btn,
.secondary-btn,
.hero-card button,
.price-card button {
  border: 0;
  border-radius: 16px;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  background: var(--blue);
  color: white;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
}

.secondary-btn {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.hero-card,
.panel,
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.hero-card.dark {
  background: linear-gradient(145deg, var(--navy), #1e3a8a);
  color: white;
}

.hero-card.dark h2,
.hero-card.dark p { color: white; }

.hero-card p,
.price-card p,
.section-title p {
  color: var(--muted);
  line-height: 1.55;
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  font-size: 25px;
  margin-bottom: 16px;
}

.hero-card.dark .card-icon { background: rgba(255,255,255,0.12); }

.hero-card button {
  margin-top: 8px;
  background: #eff6ff;
  color: var(--blue);
}

.hero-card.dark button {
  background: white;
  color: var(--navy);
}

.section-title { margin-bottom: 20px; }
.plans { margin-bottom: 24px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.price-card {
  position: relative;
  min-height: 290px;
}

.price-card .price {
  color: var(--navy);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-top: 24px;
}

.price-card span {
  color: var(--gold);
  font-weight: 800;
}

.price-card button {
  margin-top: 24px;
  width: 100%;
  background: #eff6ff;
  color: var(--blue);
}

.price-card.featured {
  border: 2px solid var(--blue);
  transform: translateY(-8px);
}

.price-card.featured button {
  background: var(--blue);
  color: white;
}

.badge {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--blue);
  color: white;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 900;
}

.price-card.premium {
  background: linear-gradient(145deg, var(--navy), #111827);
  border-color: rgba(201,162,39,0.45);
}

.price-card.premium h3,
.price-card.premium .price { color: white; }

.price-card.premium p { color: #cbd5e1; }
.price-card.premium span { color: var(--gold); }

.price-card.premium button {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201,162,39,0.65);
}

.panel { margin-bottom: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 800;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}

.wide { grid-column: 1 / -1; }

.upload-box,
.saos-actions {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.saos-actions {
  grid-template-columns: 220px auto auto;
}

.result-box,
.document-preview {
  margin-top: 18px;
  background: #0b1220;
  color: #e5e7eb;
  padding: 20px;
  border-radius: 18px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 480px;
}

.cases-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.case-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: white;
}

.case-card strong {
  color: var(--navy);
  font-size: 18px;
}

.case-card p {
  color: var(--muted);
  margin: 6px 0 0;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .hero-grid,
  .pricing-grid,
  .form-grid,
  .upload-box,
  .saos-actions { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .wide { grid-column: auto; }
}


.billing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.mini-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.mini-plan {
  border: 1px solid var(--line);
  background: white;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.mini-plan h3 {
  font-size: 22px;
}

.mini-plan p {
  color: var(--muted);
  font-weight: 800;
}

.featured-mini {
  border: 2px solid var(--blue);
}

.dark-mini {
  background: linear-gradient(145deg, var(--navy), #111827);
  border-color: rgba(201,162,39,.45);
}

.dark-mini h3,
.dark-mini p {
  color: white;
}

.dark-mini .secondary-btn {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201,162,39,.6);
}

@media (max-width: 980px) {
  .mini-plan-grid {
    grid-template-columns: 1fr;
  }
}
