:root {
  color-scheme: light;
  --nav: #19162c;
  --ink: #201b34;
  --muted: #655f76;
  --accent: #6341d9;
  --line: #e8e4ef;
  --surface: #f7f6fb;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: 17px; letter-spacing: -.02em; margin-bottom: 10px; }
h3 { font-size: 13px; margin: 10px 0 5px; }
p { line-height: 1.6; color: var(--muted); }
.sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 238px; z-index: 3; background: var(--nav); color: #e4dff5; padding: 25px 16px 16px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: white; margin: 0 4px 24px; }
.brand strong { font-size: 17px; letter-spacing: -.4px; }
.brand small, .workspace small, .profile small { display: block; font-size: 10px; margin-top: 3px; }
.brand small { letter-spacing: .14em; color: #b5aaca; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; border-radius: 11px; color: white; background: #744dea; font-size: 19px; font-weight: 800; }
.workspace { display: flex; align-items: center; gap: 9px; padding: 11px; background: #252039; border: 1px solid #37304f; border-radius: 11px; margin-bottom: 21px; }
.workspace small { color: #b4a9cb; }
.workspace-icon { display: grid; place-items: center; width: 30px; height: 30px; background: #493674; color: #e5d8ff; border-radius: 8px; font-weight: 750; }
.nav-label { color: #a79bbd; letter-spacing: .11em; font-size: 10px; margin: 0 8px 7px; font-weight: 750; }
nav a { display: flex; gap: 9px; align-items: center; color: #ded6ef; font-size: 12px; padding: 9px 9px; min-height: 36px; border-radius: 8px; }
nav a:hover, nav .selected { background: #3c2e60; text-decoration: none; color: white; }
nav a svg { width: 17px; height: 17px; color: #beabf5; }
.subnav { margin: 3px 0 5px 18px; border-left: 1px solid #524265; padding-left: 8px; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 1px; color: #c4b9d8; font-size: 11px; }
.online { width: 7px; height: 7px; display: inline-block; background: #6bd4ac; border-radius: 50%; margin-right: 6px; }
.shell { margin-left: 238px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--line); }
.crumb { color: var(--muted); }
.crumb span { margin: 0 7px; color: #988cae; }
.top-actions, .profile summary, .actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile { position: relative; }
.profile summary { cursor: pointer; list-style: none; }
.profile small { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #eee8ff; color: #5c35c6; font-weight: 800; }
.bell { position: relative; padding: 8px; }
.bell span { position: absolute; top: 0; right: -4px; min-width: 17px; text-align: center; border-radius: 10px; color: white; background: #653ed5; font-size: 10px; padding: 2px; }
.popover { position: absolute; right: 0; top: 44px; z-index: 2; display: grid; gap: 10px; width: 185px; background: white; padding: 15px; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 30px #2415421a; }
.main { max-width: 1540px; padding: 28px 30px 0; margin: auto; }
.page-heading, .section-head, .invoice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-heading p:last-child { margin-top: 8px; }
.eyebrow { color: #6549af; font-size: 10px; font-weight: 800; letter-spacing: .14em; margin-bottom: 7px; text-transform: uppercase; }
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; background: radial-gradient(ellipse at 90% 65%,#5737a7,#2e2055 55%,#221b3a); padding: 25px 28px; border-radius: 17px; color: #fff; margin-bottom: 16px; }
.hero h2 { font-size: clamp(22px, 3vw, 31px); }
.hero p { color: #e1d8f8; }
.hero p span { margin: 0 4px; }
.hero .button { background: #f1eaff; color: #422289; margin-top: 14px; }
.hero-art { position: relative; display: grid; place-items: center; width: 30%; min-height: 100px; color: #e2d3ff; }
.hero-art i { position: absolute; width: 135px; height: 135px; border: 1px solid #c4a8ff72; border-radius: 30px; transform: rotate(28deg); }
.hero-art i:nth-child(2) { width: 105px; height: 105px; background: #9665ff31; transform: rotate(43deg); }
.hero-art i:nth-child(3) { width: 75px; height: 75px; background: #ad85ff70; transform: rotate(58deg); }
.hero-art svg { position: relative; width: 42px; height: 42px; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 17px; margin-bottom: 15px; min-width: 0; box-shadow: 0 3px 12px #321f5310; }
.card p + .button, .card form + .table-wrap { margin-top: 13px; }
.metrics, .two { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.metric-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; color: #6641cb; background: #f0eaff; margin-bottom: 9px; }
.metric strong, .large { display: block; font-size: clamp(15px,2vw,23px); letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.metric small { display: block; color: var(--muted); margin-top: 5px; line-height: 1.4; }
progress { display: block; width: 100%; height: 12px; appearance: none; margin: 13px 0 6px; border: 0; border-radius: 8px; overflow: hidden; background: #eee9f7; accent-color: #734de7; }
progress::-webkit-progress-bar { background: #eee9f7; }
progress::-webkit-progress-value { background: #734de7; border-radius: 8px; }
progress::-moz-progress-bar { background: #734de7; border-radius: 8px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 7px; }
.quick a { display: flex; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.quick span { margin-left: auto; }
.chart .bars { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; }
.bar { display: grid; gap: 5px; min-width: 85px; font-size: 11px; color: var(--muted); }
meter { width: 100%; accent-color: var(--accent); }
meter::-webkit-meter-optimum-value { background: var(--accent); }
.button, button { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; padding: 7px 12px; border: 1px solid transparent; background: var(--accent); color: white; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; }
.button:hover, button:hover { filter: brightness(.94); text-decoration: none; }
.secondary { background: #fff; color: #5735b5; border-color: #dfd7f0; }
:focus-visible { outline: 2px solid #936efa; outline-offset: 3px; }
label { display: grid; gap: 5px; color: #403754; font-weight: 600; font-size: 12px; margin-bottom: 10px; }
input, select, textarea { width: 100%; min-width: 0; padding: 8px; border: 1px solid #dcd6e8; border-radius: 7px; background: white; color: var(--ink); }
input[type=checkbox] { width: auto; }
.check { grid-template-columns: auto 1fr auto; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: 9px; margin: 0 0 14px; }
.filters, .form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 8px 12px; align-items: end; }
.filters label { margin-bottom: 0; }
.filters { margin-bottom: 12px; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { white-space: nowrap; color: #534966; background: #f7f5fb; }
td { overflow-wrap: anywhere; }
.empty { color: var(--muted); padding: 14px 9px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 20px; font-size: 11px; background: #eeeaf5; color: #4c4264; white-space: nowrap; }
.green { background: #e4f7ee; color: #0b6344; }
.amber { background: #fff2cf; color: #714d00; }
.red { background: #ffe8e8; color: #8b262f; }
.notice { background: #e8f6ef; color: #145840; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.notice.error { background: #ffeded; color: #8b262f; }
footer { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 15px 0 20px; color: var(--muted); font-size: 11px; }
.auth { min-height: 100svh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top,#eae1ff,#f7f6fb 62%); }
.auth-card { width: min(100%,420px); padding: 29px; }
.auth-card .brand-mark, .auth-card p { margin-bottom: 12px; }
.invoice-meta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 16px; }
.invoice-paper .table-wrap { margin-top: 12px; }
.totals { margin-left: auto; max-width: 290px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals div:last-child { font-weight: 800; }
.print { padding: 20px; }
.print main { max-width: 850px; margin: auto; }
.no-print, .pagination { margin: 10px 0; }
.mobile-menu { display: none; }
@media(max-width: 1050px) { .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 760px) {
  .sidebar { display: none; top: 58px; }
  .menu-open .sidebar { display: flex; box-shadow: 0 0 0 100vmax #19162c70; }
  .mobile-menu { display: inline-flex; position: absolute; z-index: 4; top: 11px; left: 12px; }
  .shell { margin: 0; }
  .top { height: 58px; padding: 0 12px 0 55px; }
  .main { padding: 17px 12px 0; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .hero { padding: 18px; }
  .hero-art { display: none; }
}
@media(max-width: 400px) { .profile summary > span:last-child { display: none; } .metrics { gap: 8px; } .metric { padding: 11px; } }
@media print { :root { background: white; } .no-print { display: none; } .print { padding: 0; } .card { border: 0; box-shadow: none; } }
.file-id { display: block; margin-top: 3px; color: var(--muted); }
