@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("../fonts/NotoSansDevanagari-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("../fonts/NotoSansDevanagari-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f4f7fb;
  --ink: #102033;
  --muted: #5b6b80;
  --paper: #ffffff;
  --line: #d5e0ee;
  --accent: #1245A8;
  --accent-dark: #0B2F73;
  --hot: #c2410c;
  --warn: #9a6700;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(18, 69, 168, 0.08);
  --radius: 16px;
  --font: "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--accent); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
p { margin: 0 0 10px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 224, 238, 0.9);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand .logo { height: 34px; width: auto; display: block; }
.side .brand .logo, .footer .brand .logo { filter: brightness(0) invert(1); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: #3d4d63; font-size: 15px; font-weight: 700; }
.nav a.active, .nav a:hover { color: var(--accent); }
.top-actions { display: flex; gap: 8px; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer; font-weight: 700;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--accent); border: 1.5px solid #c5d4ee; }
.btn-ghost:hover { background: #f4f7fb; }
.ico { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-danger { background: var(--danger); }
.btn-small { padding: 7px 12px; font-size: 14px; }
.btn-hot { background: var(--hot); }

.panel, .stat, .design-tile, .price, .step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.grid-3, .grid-4 { display: grid; gap: 14px; }

.layout-public {
  background: #f4f8fd;
  overflow-x: hidden;
}
.layout-public::before,
.layout-public::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}
.layout-public::before {
  width: 560px;
  height: 560px;
  right: -180px;
  top: -120px;
  background: rgba(18, 69, 168, 0.09);
}
.layout-public::after {
  width: 320px;
  height: 320px;
  left: -120px;
  top: 220px;
  background: rgba(18, 69, 168, 0.06);
}
.layout-public .topbar,
.layout-public main,
.layout-public .footer { position: relative; z-index: 1; }
.layout-public .wrap { width: min(1180px, calc(100% - 40px)); }
.layout-public main { padding-bottom: 20px; }

.home-hero { display: grid; gap: 32px; padding: 42px 0 8px; align-items: center; }
.home-hero h1 { font-size: clamp(40px, 5.2vw, 62px); letter-spacing: -0.035em; max-width: 11ch; font-weight: 800; }
.home-hero h1 span { display: block; color: var(--accent); }
.kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.lede { font-size: 17px; max-width: 42ch; color: #5c6d84; }
.hero-stage { position: relative; display: grid; place-items: center; min-height: 240px; }
.hero-stage .fit-card { position: relative; width: min(100%, 460px); margin-inline: auto; }
.layout-public .idc { border-radius: 14px; box-shadow: 0 22px 48px rgba(11, 47, 115, 0.16); }
.layout-public .fit-card { overflow: visible; }

.chip-row { margin: 8px 0 18px; }
.section { padding: 36px 0 4px; }
.section h2, .section h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.03em; font-weight: 800; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; flex-wrap: wrap; }
.text-link { font-weight: 700; text-decoration: none; color: var(--accent); }
.text-link:hover { text-decoration: underline; }
.price-note {
  max-width: 300px; margin: 0; color: #5c6d84; background: #fff;
  border: 1px solid #e3ebf6; border-radius: 16px; padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  box-shadow: 0 10px 24px rgba(18, 69, 168, 0.06);
}
.price-note .ico { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; margin-top: 2px; }

.steps-public { display: grid; gap: 14px; }
.step-card { padding: 18px 18px 20px; background: #fff; border-radius: 20px; border: 1px solid #e4edf8; box-shadow: 0 12px 30px rgba(18, 69, 168, 0.06); }
.step-card h3 { margin-top: 14px; font-size: 18px; }
.step-card p { margin: 0; color: #5c6d84; font-size: 14.5px; }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-num {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: #e7f0fc; color: var(--accent); font-weight: 700; font-size: 14px;
}
.step-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #e7f0fc; color: var(--accent);
}
.step-ico .ico { width: 20px; height: 20px; }

.design-grid { display: grid; gap: 18px; }
.design-tile {
  padding: 14px; display: grid; gap: 12px; align-content: start; background: #fff;
  border-radius: 20px; border: 1px solid #e4edf8;
  box-shadow: 0 14px 32px rgba(18, 69, 168, 0.07);
}
.design-tile .btn { width: 100%; }
.design-tile .row .btn { width: auto; flex: 1; }
.design-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pill { color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }

.plan-grid { display: grid; gap: 16px; align-items: stretch; padding-top: 14px; }
.price { padding: 22px 18px 18px; display: grid; gap: 8px; align-content: start; position: relative; background: #fff; }
.price strong { font-size: 40px; letter-spacing: -0.03em; }
.price ul { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; }
.price li { position: relative; padding-left: 22px; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.price .btn { width: 100%; margin-top: auto; }
.plan-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: #e8f0fb; color: var(--accent);
}
.plan-icon .ico { width: 22px; height: 22px; }
.price.featured { border: 2px solid var(--accent); box-shadow: 0 18px 40px rgba(18, 69, 168, 0.14); }
.popular {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; border-radius: 999px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}

.footer { margin-top: 48px; background: var(--accent-dark); color: #e7eef8; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 22px 0; flex-wrap: wrap; }
.footer-copy p { margin: 0; color: #c5d4ee; }
.footer-copy strong { color: #fff; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #d7e4f8; text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: #fff; }

.auth-card { width: min(460px, 100%); margin: 28px auto; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 400;
}
textarea { min-height: 80px; }
.form-grid { display: grid; gap: 12px; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }

.flash, .report {
  border-radius: 12px; padding: 12px 14px; margin: 12px 0;
  background: #e8f0fb; border: 1px solid #c5d7f2;
}
.flash-error { background: #fde8e8; border-color: #f3c0c0; }
.flash-warn, .report { background: #fff6e8; border-color: #f0ddb4; }

.shell { min-height: 100vh; background: #f3f6fb; }
.side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 40;
  background: var(--accent-dark); color: #f4f7fb; padding: 18px 14px 16px;
  display: flex; flex-direction: column; gap: 6px; overflow: auto;
}
.side .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); width: 100%; }
.side .btn-ghost:hover { background: rgba(255,255,255,.12); }
.side-label {
  margin: 16px 10px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #9eb4d8; font-weight: 700;
}
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: #d7e4f8;
  padding: 9px 10px; border-radius: 12px; font-weight: 700;
}
.side-nav a .ico { width: 18px; height: 18px; flex: 0 0 auto; }
.side-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.side-nav a.active { background: #fff; color: var(--accent-dark); }
.side-nav a.active:hover { background: #fff; color: var(--accent-dark); }
.side-foot { margin-top: auto; padding-top: 14px; }
.shell-main { margin-left: 248px; min-width: 0; min-height: 100vh; }
.shell-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
}
.shell-who { margin-right: auto; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.shell-who .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell .nav-toggle { display: none; }
.shell-content { padding: 22px; width: min(1120px, 100%); }
.shell-content > h1, .page-head h1 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; font-weight: 800; }
.page-head { margin-bottom: 18px; }
.page-head p:last-child { margin: 0; }

.stat-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.stat-card {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid #e4edf8; border-radius: 18px; padding: 16px;
  box-shadow: 0 10px 24px rgba(18, 69, 168, 0.06);
}
.stat-card:hover { border-color: #b9cef0; }
.stat-card .muted { display: block; font-size: 13px; }
.stat-card strong { display: block; font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; }
.dash-split { display: grid; gap: 16px; margin-top: 16px; }
.panel h2 { font-size: 18px; margin: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.account-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.account-list li { display: flex; align-items: center; gap: 10px; }
.account-list li > span:nth-child(2) { min-width: 0; display: grid; }
.account-list strong, .account-list .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-list .plan-icon { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
.account-list .badge { margin-left: auto; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.steps a {
  text-decoration: none; text-align: center; padding: 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.steps a.on { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }

.split { display: grid; gap: 16px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.table-wrap select { width: auto; min-width: 140px; }
.table-wrap .row { flex-wrap: nowrap; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; color: var(--muted); background: #f7faff; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 8px; background: #e8eef8; font-size: 12px; }
.badge-ok { background: #e5f6ee; }
.badge-warn { background: #fff1d6; }
.badge-bad { background: #fde8e8; }

.fit-card { width: 100%; overflow: hidden; }
.idc { transform-origin: top left; }

.preview-sheet {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
}
.help { background: #fff; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 12px; }
.canvas-wrap { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 8px; }
canvas { width: 100%; height: 90px; touch-action: none; background: #fff; border-radius: 8px; }

.pager { display: flex; gap: 8px; justify-content: space-between; margin-top: 14px; }
.hidden-block { display: none; }
.hidden-block.open { display: block; }
details.extra { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
details.extra summary { cursor: pointer; font-weight: 700; }
details.extra .form-grid { margin-top: 12px; }

.shell-main { min-width: 0; }
.split { min-width: 0; }

@media (min-width: 720px) {
  .steps-public { grid-template-columns: repeat(2, 1fr); }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .home-hero { grid-template-columns: 1.05fr .95fr; gap: 36px; padding-top: 54px; }
  .topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .brand { justify-self: start; }
  .nav { margin-left: 0; justify-self: center; }
  .top-actions { justify-self: end; }
}
@media (min-width: 1080px) {
  .steps-public { grid-template-columns: repeat(4, 1fr); }
  .design-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .price.featured { transform: translateY(-10px); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .dash-split { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); align-items: start; }
}
@media (min-width: 800px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .split .sticky { position: sticky; top: 16px; }
}

@media (max-width: 879px) {
  .nav-toggle { display: inline-flex; margin-left: 8px; }
  .top-actions { margin-left: auto; }
  .nav { display: none; }
  .topbar { position: sticky; }
  .topbar-inner { position: relative; }
  body.nav-open .nav {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 8px 16px 16px; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(11, 47, 115, 0.08); z-index: 30;
  }
  body.nav-open .nav a { padding: 10px 4px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .price-note { max-width: none; }
  .footer-inner { align-items: flex-start; }
}

@media (max-width: 959px) {
  .shell-main { margin-left: 0; }
  .side { transform: translateX(-110%); transition: transform .2s ease; }
  body.nav-open .side { transform: none; }
  .shell .nav-toggle { display: inline-flex; }
  .nav-backdrop { display: none; }
  body.nav-open .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(8, 24, 58, .45);
  }
  .shell-content { padding: 16px; }
  .shell-top { padding: 12px 16px; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .shell-who .muted { display: none; }
}
