:root {
  color-scheme: dark;
  --bg: #100f15;
  --sidebar: #15141c;
  --panel: #1a1922;
  --raised: #21202c;
  --line: #2e2c3a;
  --text: #f7f5fc;
  --muted: #aaa6bc;
  --purple: #baa9ff;
  --accent: #b29bff;
  --ink: #171226;
  --radius: 16px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #d4c6ff; outline-offset: 3px; }
h1,h2,h3,p,figure,dl,dd { margin: 0; }
h1,h2,h3 { line-height: 1.16; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 3vw, 3.25rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: .98rem; }
p { color: var(--muted); line-height: 1.55; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -50px; left: 12px; z-index: 10; padding: .65rem; background: var(--raised); }
.skip:focus { top: 12px; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100dvh; }
aside { position: sticky; top: 0; height: 100dvh; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.45rem 1rem 1rem; z-index: 2; }
.brand { display: flex; align-items: center; gap: .75rem; width: fit-content; margin: 0 .55rem 2.4rem; }
.brand-mark { width: 35px; height: 35px; background: #2a2047; border-radius: 11px; position: relative; flex: none; }
.brand-mark i { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #d0baff; left: 11px; top: 11px; }
.brand-mark::before { content: ""; width: 23px; height: 9px; position: absolute; left: 6px; top: 12px; border: 1px solid #d0baff; border-radius: 50%; transform: rotate(-33deg); z-index: 1; }
.brand-mark::after { content: "✦"; position: absolute; right: 4px; top: 2px; color: #e9dcff; font-size: 9px; }
.wordmark { font-weight: 800; font-size: 1.2rem; letter-spacing: -.06em; line-height: .85; }
.wordmark span { display: block; margin-top: 4px; color: #c2acd7; font-size: .68rem; text-transform: uppercase; letter-spacing: .22em; }
aside nav { flex: 1; overflow-y: auto; }
.side-heading { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin: 0 .6rem .6rem; }
.nav-link { display: flex; align-items: center; min-height: 43px; gap: .8rem; padding: 0 .65rem; border-radius: 9px; margin: .2rem 0; color: #cbc7d6; font-size: .88rem; }
.nav-link > span { display: grid; place-items: center; width: 24px; flex: none; font-size: 1rem; }
.nav-link:is(:hover,.active) { background: #282339; color: #e3d8ff; }
.nav-link.active { box-shadow: inset 2px 0 var(--purple); }
.rooms-heading { margin-top: 1.8rem; display: flex; align-items: center; justify-content: space-between; }
.rooms-heading button,.icon-button { border: 0; background: transparent; color: var(--muted); border-radius: 7px; font-size: 1.35rem; min-width: 34px; min-height: 34px; }
.rooms-heading button:hover,.icon-button:hover { background: var(--raised); color: var(--text); }
.tiny-avatar { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: #362952; color: #e5d8ff; font-size: .63rem; font-style: normal; font-weight: 800; }
.side-empty { font-size: .86rem; padding: .25rem .65rem; }
.aside-foot { border-top: 1px solid var(--line); padding: .95rem .42rem 0; display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .82rem; }
.aside-foot strong,.aside-foot small { display: block; }
.aside-foot strong { color: var(--text); margin-bottom: .22rem; }
.aside-foot .tertiary { padding-inline: 0; display: block; }
.user-avatar { border-radius: 50%; width: 32px; height: 32px; background: #2e2449; color: #e9dbff; display: grid; place-items: center; font-weight: 750; font-size: .72rem; }
.topbar { padding: 0 2.15rem; border-bottom: 1px solid var(--line); min-height: 64px; display: flex; align-items: center; gap: .8rem; font-size: .87rem; }
.top-end { margin-left: auto; color: var(--muted); white-space: nowrap; }
.breadcrumb { font-weight: 600; }
.breadcrumb b { color: #716985; margin: 0 .44rem; }
.menu { display: none; color: var(--text); background: none; border: 0; width: 37px; height: 37px; font-size: 1.2rem; }
.main-col > main { max-width: 1440px; margin: 0 auto; padding: 2rem 2.15rem 3rem; }
.hero { position: relative; overflow: hidden; min-height: 295px; display: flex; align-items: center; background: radial-gradient(ellipse at 80% 55%, #493278 0, #281d41 42%, #1b1728 76%); border: 1px solid #44355f; border-radius: 21px; padding: 2.65rem 2.85rem; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#e2d5fe30 1px, transparent 1px); background-size: 25px 25px; mask-image: linear-gradient(90deg, transparent 10%, #000 85%); }
.hero-copy { position: relative; z-index: 1; }
.hero-label { display: flex; gap: .5rem; align-items: center; color: #d9c9ff; text-transform: uppercase; font-size: .74rem; font-weight: 800; letter-spacing: .13em; }
.hero-label i { width: 6px; height: 6px; border-radius: 50%; background: #c8b1ff; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 5.5rem); font-weight: 830; letter-spacing: -.075em; margin: .58rem 0 .6rem; }
.hero h1 span,.gate h1 span { color: #ad88ff; }
.hero p { color: #d3c9e3; margin-bottom: 1.4rem; }
.orbital { width: 350px; height: 262px; position: absolute; right: 3.4%; top: 50%; transform: translateY(-50%); z-index: -1; }
.orb { position: absolute; top: 43px; left: 83px; width: 174px; height: 174px; border-radius: 50%; border: 1px solid #b08bfb;
  background: repeating-radial-gradient(ellipse at 66% 31%, #b894fe59 0 1px, transparent 2px 8px), radial-gradient(circle at 64% 34%, #a96bfa, #63409f 46%, #2c1e4d 73%);
  box-shadow: 0 0 52px #aa72ff79, inset 8px 0 28px #281947; }
.orbit-ring { position: absolute; border: 1px solid #af8cf4a8; border-radius: 50%; width: 315px; height: 94px; top: 83px; left: 12px; transform: rotate(-26deg); }
.ring-outer { height: 113px; width: 350px; top: 70px; left: -5px; border-color: #a47efe66; }
.ring-front { clip-path: inset(51% 0 0 0); border-color: #d4b5ff; box-shadow: 0 0 15px #ae83ff85; }
.star { position: absolute; font-style: normal; color: #e1ccff; text-shadow: 0 0 15px #a66eff; }
.star.a { left: 45px; top: 55px; font-size: 1.7rem; }
.star.b { top: 65px; right: 25px; font-size: 1.2rem; }
.star.c,.star.d { width: 4px; height: 4px; background: #dbc5ff; border-radius: 50%; }
.star.c { top: 193px; left: 58px; }
.star.d { top: 199px; right: 42px; }
.button { border: 1px solid transparent; display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: .45rem; border-radius: 9px; padding: .55rem .85rem; font-size: .86rem; font-weight: 720; white-space: nowrap; }
.button.primary { color: var(--ink); background: var(--accent); }
.button.primary:hover { background: #c8b6ff; }
.button.secondary { color: #e6e0f3; background: #242230; border-color: #3b3749; }
.button.secondary:hover { background: #302941; }
.button.tertiary { background: transparent; color: var(--purple); }
.button.tertiary:hover,.text-link:hover { color: white; }
.text-link { font-size: .86rem; font-weight: 700; color: var(--purple); white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .95rem; margin: 1.15rem 0; }
.metric,.panel,.sample-strip { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); }
.metric { padding: 1.05rem 1.15rem; display: grid; gap: .4rem; }
.metric > div { display: flex; align-items: center; gap: .35rem; justify-content: space-between; color: #ddd8e9; font-size: .88rem; font-weight: 650; }
.metric i,.file-icon { display: grid; place-items: center; color: #d1bfff; background: #2c2540; border: 1px solid #3a2e51; border-radius: 9px; width: 35px; height: 35px; font-size: 1.12rem; font-style: normal; flex: none; }
.metric strong { font-size: 1.95rem; letter-spacing: -.07em; }
.metric small { color: var(--muted); font-size: .79rem; }
.panel { min-width: 0; }
.panel-heading { padding: 1.2rem 1.35rem 1rem; display: flex; align-items: flex-start; gap: .8rem; justify-content: space-between; }
.panel-heading p,.sample-strip p { margin-top: .35rem; font-size: .88rem; }
.empty { min-height: 120px; padding: 1.2rem; display: grid; place-items: center; align-content: center; gap: .42rem; text-align: center; }
.empty > span { color: var(--purple); font-size: 1.18rem; }
.empty p { font-size: .87rem; }
.empty .button { margin-top: .42rem; }
.sample-strip { display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.2rem; margin-top: 1.1rem; }
.sample-strip > div { flex: 1; }
.workspace-row,.resource-row { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.35rem; min-height: 66px; border: 0; border-top: 1px solid var(--line); width: 100%; text-align: left; background: transparent; color: var(--text); }
.workspace-row:last-child,.resource-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.workspace-row:hover,.resource-row:hover { background: var(--raised); }
.client-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #352550; color: #e1d1ff; font-weight: 800; font-size: .88rem; flex: none; }
.client-avatar.sample { color: #f4d8b0; background: #563925; }
.client-avatar.large { width: 62px; height: 62px; font-size: 1.3rem; border-radius: 15px; }
.row-label { display: grid; gap: .3rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-label strong { font-size: .94rem; }
.row-label small { color: var(--muted); font-size: .82rem; }
em { font-size: .72rem; font-weight: 700; color: #d9c6fd; border: 1px solid #423557; border-radius: 30px; padding: .2rem .42rem; margin-left: .25rem; font-style: normal; vertical-align: middle; }
.row-arrow { font-size: 1.35rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: .39rem; border-radius: 25px; background: #282633; color: #d0c9de; padding: .32rem .52rem; font-size: .75rem; font-weight: 680; white-space: nowrap; }
.chip span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.purple { background: #33294b; color: #d7c4ff; }
.chip.green { background: #203a33; color: #a0e7c7; }
.chip.yellow { background: #3b311f; color: #ffdc9a; }
.chip.red { background: #432633; color: #ffc0d0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.section-head,.room-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.15rem; }
.section-head p,.room-heading p { margin-top: .38rem; }
.room-heading { justify-content: flex-start; }
.room-heading .actions { margin-left: auto; }
.tabs { display: flex; gap: .5rem; align-items: center; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 1.3rem; }
.tabs a { display: flex; gap: .45rem; align-items: center; white-space: nowrap; padding: .85rem .9rem; color: var(--muted); font-size: .89rem; font-weight: 650; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { border-color: var(--purple); color: var(--purple); }
.tabs a:hover { color: var(--text); }
.preview-note,.inline-note { background: #28203b; border: 1px solid #44365c; color: #e1d2ff; border-radius: 10px; padding: .75rem .9rem; margin-bottom: 1rem; font-size: .86rem; }
.phases { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); margin: .3rem 1.3rem 1.15rem; padding: 0; gap: .35rem; }
.phases li { display: grid; gap: .5rem; padding: .7rem .42rem; text-align: center; border-radius: 8px; color: var(--muted); font-size: .81rem; border-top: 2px solid #373342; }
.phases li.current { color: #e5d9ff; background: #302448; border-color: var(--accent); font-weight: 700; }
.phases li.done { border-color: #625481; color: #d1c5e6; }
.milestone { background: #211d2b; margin: 0 1.35rem 1.25rem; border-radius: 9px; padding: .9rem; display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.milestone p { font-size: .9rem; margin-top: .25rem; }
.milestone time { white-space: nowrap; font-size: .85rem; color: var(--purple); }
.split-panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 1rem 0; }
.page-section h1 { font-size: clamp(1.65rem, 3vw, 2.5rem); }
.brand-panel { margin-bottom: 1rem; }
.palette { display: grid; grid-template-columns: repeat(auto-fit,minmax(95px,1fr)); gap: .6rem; padding: 0 1.35rem 1.25rem; }
.swatch { padding: .45rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-align: left; background: var(--raised); }
.swatch > span { display: block; width: 100%; min-height: 77px; border-radius: 6px; border: 1px solid #ffffff22; }
.swatch strong,.swatch small { display: block; margin: .35rem .25rem .15rem; font-size: .82rem; }
.swatch small { color: var(--muted); }
.type-samples { padding: 0 1.35rem 1.2rem; }
.type-samples div { display: grid; gap: .3rem; margin: .65rem 0; }
.type-samples span { color: var(--muted); font-size: .8rem; }
.type-samples strong { font-size: 1.3rem; }
.prose { padding: 0 1.35rem 1.2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.logos { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .8rem; padding: .3rem 1.35rem 1.2rem; }
.logo-tile { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.logo-tile > div { display: grid; place-items: center; background: #ddd7e8; color: #302344; height: 140px; }
.logo-tile img { display: block; width: 80%; height: 90px; object-fit: contain; }
.logo-tile figcaption { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: space-between; padding: .6rem; }
.invoice-list .resource-row:first-child,.page-section > .panel > .resource-row:first-child { border-top: 0; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
dialog { padding: 0; border: 1px solid #4b415d; border-radius: 17px; color: var(--text); background: var(--panel); width: min(100% - 24px, 530px); max-height: 90dvh; }
dialog.wide { width: min(100% - 24px, 750px); }
dialog::backdrop { background: #0b0914bd; backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 1; padding: .85rem 1.35rem; display: flex; gap: .6rem; align-items: center; justify-content: space-between; background: var(--panel); border-bottom: 1px solid var(--line); }
.dialog-head h2 { overflow-wrap: anywhere; }
.dialog-content { padding: 1.25rem 1.35rem; display: grid; gap: .85rem; }
.dialog-actions { padding: .9rem 1.35rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.dialog-actions.spread { justify-content: space-between; }
.field { display: grid; gap: .35rem; min-width: 0; font-size: .88rem; font-weight: 650; }
.field :is(input,select,textarea) { width: 100%; color: var(--text); background: #14131b; border: 1px solid #3e3949; border-radius: 8px; min-height: 41px; padding: .57rem .68rem; }
.field textarea { min-height: 81px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .66rem; }
.form-hint { font-size: .84rem; }
.form-error { color: #ffb1c5; padding: .45rem 1.35rem .8rem; font-size: .9rem; }
.checkbox { display: flex; gap: .48rem; align-items: center; font-size: .88rem; color: #e1dcf0; }
.checkbox input { accent-color: var(--accent); width: 1rem; height: 1rem; }
.drop-zone { display: grid; gap: .7rem; padding: 1rem; background: #201b2b; border: 1px dashed #605178; border-radius: 10px; font-size: .88rem; }
.drop-zone small { color: var(--muted); display: block; margin-top: .3rem; }
.drop-zone input { max-width: 100%; }
.drop-zone input::file-selector-button { background: var(--raised); color: var(--text); border: 1px solid #544a66; border-radius: 5px; padding: .4rem; font: inherit; }
.asset-meta { display: flex; gap: .75rem; align-items: center; }
.asset-meta > div { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.asset-meta p { font-size: .85rem; }
#feedback-form .actions { margin-top: .65rem; }
.comments { list-style: none; padding: 0; margin: 0; }
.comments li { background: var(--raised); border-radius: 9px; margin: .45rem 0; padding: .65rem; overflow-wrap: anywhere; }
.comments p { white-space: pre-wrap; font-size: .9rem; }
.invoice-line { display: grid; grid-template-columns: minmax(0,2fr) minmax(58px,.5fr) minmax(85px,.8fr) 36px; align-items: end; gap: .5rem; margin-bottom: .58rem; }
.remove-line { height: 41px; }
.invoice-running { display: flex; justify-content: space-between; padding: .7rem .85rem; background: #2a233b; border-radius: 9px; }
.invoice-header { display: flex; gap: .6rem; justify-content: space-between; align-items: flex-start; }
.invoice-wordmark { color: var(--purple); font-size: .73rem; letter-spacing: .09em; font-weight: 800; margin-bottom: .46rem; }
.invoice-details { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.invoice-details dt,.totals dt { font-size: .78rem; color: var(--muted); font-weight: 750; }
.invoice-details dd { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .3rem; font-size: .88rem; line-height: 1.4; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
td,th { padding: .6rem .45rem; text-align: right; border-bottom: 1px solid var(--line); }
td:first-child,th:first-child { text-align: left; }
td:not(:first-child),th:not(:first-child) { white-space: nowrap; }
.totals { margin-left: auto; width: min(280px,100%); }
.totals div { display: flex; justify-content: space-between; align-items: center; gap: .55rem; margin: .5rem 0; }
.totals .balance { font-weight: 800; padding: .6rem 0; border-top: 1px solid var(--line); }
.invoice-notes p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .35rem; }
#toast:not(:empty) { position: fixed; z-index: 4; bottom: 1rem; right: 1rem; max-width: min(410px,calc(100vw - 2rem)); background: #332848; border: 1px solid #655481; border-radius: 10px; padding: .8rem 1rem; box-shadow: 0 8px 35px #0007; font-size: .92rem; }
.gate { min-height: 100vh; display: grid; justify-items: center; place-content: center; text-align: center; gap: 1rem; padding: 2rem; background: radial-gradient(ellipse at 50% 35%, #2b1f40, var(--bg) 68%); }
.gate h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 830; letter-spacing: -.075em; }
.gate .brand { margin: 0 0 .4rem; text-align: left; }
.gate-contact { font-size: .87rem; color: var(--muted); }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 194px minmax(0, 1fr); }
  .topbar { padding-inline: 1.35rem; }
  .main-col > main { padding-inline: 1.35rem; }
  .orbital { opacity: .62; right: -45px; }
  .room-heading .actions { margin-left: 0; }
  .room-heading { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .menu { display: block; }
  aside { display: none; position: fixed; top: 0; left: 0; height: 100dvh; width: min(250px, 72vw); box-shadow: 10px 0 35px #0008; }
  .open-menu aside { display: flex; }
  .open-menu .menu { position: fixed; left: min(258px, 74vw); z-index: 3; background: var(--raised); border-radius: 8px; }
  .topbar { min-height: 52px; padding-inline: .55rem .9rem; gap: .35rem; }
  .top-end { font-size: .74rem; }
  .main-col > main { padding: 1rem .9rem 2rem; }
  .hero { min-height: 245px; padding: 1.5rem 1.2rem; }
  .orbital { transform: translateY(-50%) scale(.75); right: -122px; opacity: .46; }
  .hero h1 { font-size: clamp(2.3rem,9vw,3.8rem); }
  .hero p { font-size: .92rem; }
  .metrics { gap: .45rem; }
  .metric { padding: .65rem .53rem; }
  .metric div { align-items: start; font-size: .79rem; }
  .metric i { display: none; }
  .metric strong { font-size: 1.45rem; }
  .metric small { font-size: .72rem; }
  .sample-strip,.section-head { flex-wrap: wrap; }
  .split-panels { grid-template-columns: 1fr; }
  .phases { grid-template-columns: repeat(3,1fr); }
  .tabs a { padding: .65rem .48rem; }
  .tabs { gap: .18rem; }
  .workspace-row,.resource-row,.panel-heading { padding-inline: .85rem; }
  .invoice-list .resource-row { flex-wrap: wrap; gap: .52rem; }
  .invoice-list .resource-row b { font-size: .85rem; }
  .invoice-list .row-arrow { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .button,.nav-link,.resource-row,.workspace-row { transition: background .16s ease; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  :root, body { color-scheme: light; background: white; color: #17131e; }
  #app, #toast, .skip, dialog .dialog-head, dialog .dialog-actions { display: none !important; }
  dialog[open] { position: static; width: 100%; height: auto; max-height: none; max-width: none; border: 0; overflow: visible; background: white; color: #17131e; }
  dialog::backdrop { display: none; }
  .printable { display: block; padding: 0; }
  .printable > * { margin-bottom: 15px; }
  .printable * { color: #17131e; }
  .printable table { break-inside: auto; }
  .printable tr,.invoice-notes { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  .invoice-wordmark { color: #512c81; }
}
.aside-foot .sign-out { margin-left: auto; font-size: 1rem; }
