@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root { font-family: 'DM Sans', system-ui, sans-serif; color: #172033; background: #f6f8fc; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; padding: 26px 18px; background: #111827; color: #aeb8ca; display: flex; flex-direction: column; }
.brand { color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; padding: 0 12px 34px; letter-spacing: -.4px; }
.brand span { color: #818cf8; }
.nav-label { margin: 0 12px 10px; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #667085; font-weight: 700; }
.nav { display: grid; gap: 4px; }
.nav button { border: 0; background: transparent; color: inherit; text-align: left; padding: 11px 12px; border-radius: 9px; font-size: 14px; }
.nav button.active, .nav button:hover { background: #252f45; color: #fff; }
.sidebar-footer { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid #263146; font-size: 12px; line-height: 1.5; }
.sidebar-footer strong { display: block; color: #fff; font-size: 13px; margin-bottom: 3px; }
.content { flex: 1; min-width: 0; }
.topbar { height: 76px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #e8ebf2; }
.breadcrumb { color: #8993a7; font-size: 13px; }
.breadcrumb strong { color: #172033; }
.user { display: flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 600; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #6366f1; font-size: 12px; }
.page { padding: 38px 42px 60px; max-width: 1400px; }
.heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 700 30px 'Space Grotesk', sans-serif; letter-spacing: -.8px; }
.subtitle { margin: 0; color: #7b8497; font-size: 14px; }
.button { border: 0; border-radius: 8px; padding: 11px 16px; font-weight: 600; font-size: 13px; }
.button.primary { color: #fff; background: #6366f1; box-shadow: 0 4px 10px #6366f133; }
.button.secondary { color: #48536a; background: #eef1f7; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: #fff; border: 1px solid #e8ebf2; border-radius: 12px; box-shadow: 0 2px 5px #17203308; }
.stat { padding: 20px; }
.stat-top { display: flex; justify-content: space-between; color: #7b8497; font-size: 12px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #eef0ff; color: #6366f1; font-size: 16px; }
.stat strong { display: block; margin: 16px 0 8px; font: 700 25px 'Space Grotesk', sans-serif; }
.trend { color: #16a26c; font-size: 11px; font-weight: 600; }
.grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr)); gap: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid #edf0f5; }
.card-header h2 { margin: 0; font: 600 16px 'Space Grotesk', sans-serif; }
.card-header span { color: #8c96a9; font-size: 12px; }
.plan { padding: 22px; }
.plan-name { color: #6366f1; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.plan-price { margin: 8px 0 4px; font: 700 30px 'Space Grotesk', sans-serif; }
.plan-price small { color: #8993a7; font: 400 13px 'DM Sans', sans-serif; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 20px; color: #16885f; background: #e6f8f0; font-size: 11px; font-weight: 700; }
.plan-row { display: flex; justify-content: space-between; gap: 15px; padding: 15px 0; border-top: 1px solid #edf0f5; color: #69748a; font-size: 13px; }
.plan-row strong { color: #263146; }
.usage { padding: 21px 22px; }
.usage-item { margin-bottom: 22px; }
.usage-line { display: flex; justify-content: space-between; margin-bottom: 8px; color: #5d687d; font-size: 13px; }
.usage-line strong { color: #172033; }
.progress { height: 7px; overflow: hidden; border-radius: 10px; background: #edf0f5; }
.progress i { display: block; height: 100%; border-radius: inherit; background: #6366f1; }
.invoice-list { padding: 6px 22px 12px; }
.invoice { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #edf0f5; font-size: 13px; }
.invoice:last-child { border: 0; }
.invoice small { display: block; color: #8993a7; margin-top: 4px; }
.invoice-right { text-align: right; font-weight: 600; }
.paid { color: #16885f; font-size: 11px; }
.demo-banner { background: #6366f1; color: #fff; text-align: center; padding: 6px; font-size: 12px; font-weight: 600; }
/* Auth forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #48536a; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 11px 14px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 14px; font-family: inherit; color: #172033; }
.form-group input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px #6366f122; }
/* Checkout */
.checkout p { color: #5d687d; margin-bottom: 20px; }
.checkout .plan-row { padding: 10px 0; }
/* Webhooks */
.webhook-list { padding: 0 22px 12px; }
.webhook { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #edf0f5; font-size: 13px; }
.webhook:last-child { border: 0; }
.webhook-info { display: flex; flex-direction: column; gap: 4px; }
.webhook-event { font-weight: 600; color: #172033; }
.webhook-id { color: #8993a7; font-size: 12px; font-family: monospace; }
.webhook-right { text-align: right; }
.webhook-status { font-size: 11px; font-weight: 700; }
.webhook-status.failed { color: #dc2626; }
/* Subscriptions */
.sub-list { padding: 0 22px 12px; }
/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: #111827; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; z-index: 999; transition: opacity .3s; }
.toast.hidden { opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .sidebar { width: 72px; padding-inline: 8px; } .brand { font-size: 0; text-align: center; padding-inline: 0; } .brand span { font-size: 20px; } .nav-label, .nav button { font-size: 0; text-align: center; } .nav button::first-letter { font-size: 18px; } .sidebar-footer { display: none; } .topbar, .page { padding-inline: 22px; } .stats { grid-template-columns: repeat(2, 1fr); } .grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .heading { display: block; } .heading .button { margin-top: 16px; } .stats { grid-template-columns: 1fr; } }
