:root {
  --ink: #172033;
  --muted: #69748a;
  --line: #e4e9f1;
  --soft: #f5f7fb;
  --white: #fff;
  --navy: #101a2e;
  --blue: #356ae6;
  --blue-dark: #2855c4;
  --green: #11865d;
  --amber: #c47a08;
  --red: #bf3f4a;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(30, 48, 82, .07);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.muted { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }
.mobile-only { display: none !important; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, 1.08fr) minmax(440px, .92fr); background: #fff; }
.auth-art { position: relative; display: flex; min-height: 100vh; overflow: hidden; align-items: center; padding: 10%; color: #fff; background: linear-gradient(145deg, #101a2e 0%, #182a54 58%, #254b9b 100%); }
.auth-art::after { position: absolute; inset: 0; content: ""; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom right, black, transparent 80%); }
.art-orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.art-orb-one { width: 360px; height: 360px; right: -110px; top: -90px; background: rgba(81, 131, 255, .33); }
.art-orb-two { width: 250px; height: 250px; left: -80px; bottom: -70px; background: rgba(80, 222, 181, .15); }
.auth-copy { position: relative; z-index: 1; max-width: 620px; }
.auth-copy h1 { margin: 90px 0 22px; font-size: clamp(44px, 5vw, 68px); line-height: 1.03; letter-spacing: -2.5px; }
.auth-copy p { max-width: 540px; margin: 0; color: #c4d0e8; font-size: 19px; line-height: 1.65; }
.auth-form-side { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 48px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h2 { margin: 10px 0 8px; font-size: 31px; letter-spacing: -.7px; }
.launch-steps { display: grid; gap: 9px; margin: 27px 0 21px; padding: 0; list-style: none; }
.launch-steps li { display: flex; gap: 13px; border-top: 1px solid var(--line); padding: 15px 0 5px; }
.launch-steps li > span { display: flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border-radius: 50%; color: #315fd0; background: #eaf0ff; font-size: 12px; font-weight: 800; }
.launch-steps strong { font-size: 14px; }
.launch-steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.launch-address { border: 1px solid #dbe5f9; border-radius: 11px; padding: 14px; color: #52617c; background: #f0f5ff; font-size: 13px; }
.launch-address strong { display: block; margin-top: 4px; color: #3159ad; font-family: Consolas, monospace; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 1.7px; }

.brand { display: flex; align-items: center; gap: 11px; min-height: 72px; color: #fff; font-size: 18px; font-weight: 750; letter-spacing: -.3px; }

.stack-form { display: grid; gap: 18px; margin-top: 32px; }
label { display: grid; gap: 7px; color: #3b465b; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #d6ddea; border-radius: 10px; outline: none; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 43px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #7397ee; box-shadow: 0 0 0 3px rgba(53, 106, 230, .12); }
input::placeholder, textarea::placeholder { color: #a2aabd; }
.label-help { color: #929bad; font-weight: 450; }
.form-error { min-height: 20px; color: var(--red); font-size: 13px; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 0 16px; cursor: pointer; text-decoration: none; font-weight: 700; transition: transform .12s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(53,106,230,.18); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { border-color: #d5dceb; color: #33415c; background: #fff; }
.button.secondary:hover { border-color: #afbdd5; background: #fafbfe; }
.button.danger { border-color: #efc3c7; color: var(--red); background: #fff7f7; }
.button.danger:hover { border-color: #df9da4; background: #ffeded; }
.button.ghost { color: var(--muted); background: transparent; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.full { width: 100%; min-height: 46px; }
.button:disabled { cursor: wait; opacity: .65; transform: none; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 248px; flex-direction: column; padding: 0 16px 18px; color: #fff; background: var(--navy); }
.sidebar .brand { padding: 0 13px; }
.main-nav { display: grid; gap: 5px; margin-top: 25px; }
.nav-item { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 0 13px; cursor: pointer; color: #9eabc3; background: transparent; text-align: left; font-weight: 600; transition: color .15s, background .15s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: linear-gradient(100deg, rgba(60,111,230,.28), rgba(53,106,230,.12)); box-shadow: inset 3px 0 #5c87ed; }
.nav-icon { display: inline-flex; width: 22px; justify-content: center; color: currentColor; font-family: Consolas, monospace; font-size: 17px; }
.sidebar-bottom { display: grid; gap: 5px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: 86px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 34px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.4px; }
.topbar-caption { color: #8993a7; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.application-picker { display: flex; align-items: center; gap: 9px; color: #7b869a; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.application-picker select { width: 220px; min-height: 40px; color: #2f3c55; background: #f8faff; font-size: 13px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }

.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 30px 34px 50px; }
.page { display: none; animation: page-in .18s ease-out; }
.page.active { display: block; }
@keyframes page-in { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.welcome-row, .page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.welcome-row h2, .page-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.6px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.metric-card { display: flex; min-height: 118px; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: var(--radius); padding: 21px; background: #fff; box-shadow: var(--shadow); }
.metric-card .metric-icon { display: flex; width: 48px; height: 48px; flex: 0 0 48px; align-items: center; justify-content: center; border-radius: 13px; font-family: Consolas, monospace; font-size: 21px; font-weight: 800; }
.metric-card span { display: block; color: var(--muted); font-size: 13px; }
.metric-card strong { display: block; margin-top: 4px; font-size: 29px; letter-spacing: -.8px; }
.metric-card.blue .metric-icon { color: #315fd0; background: #eaf0ff; }
.metric-card.violet .metric-icon { color: #7450c8; background: #f0eafb; }
.metric-card.green .metric-icon { color: #11865d; background: #e5f6ef; }
.metric-card.amber .metric-icon { color: #b46b00; background: #fff2dc; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 22px; }
.connection-banner { display: flex; align-items: center; gap: 14px; min-height: 72px; margin-bottom: 20px; border: 1px solid #d9e1ee; border-radius: 13px; padding: 14px 18px; color: #56627a; background: #f8faff; }
.connection-banner.compact { min-height: 60px; margin-bottom: 16px; padding: 11px 16px; }
.connection-banner.success { border-color: #bee5d5; color: #376b59; background: #effaf6; }
.connection-banner.warning { border-color: #ecd7ad; color: #7d622e; background: #fff9ec; }
.connection-banner.neutral { color: #56627a; background: #f8faff; }
.connection-banner .connection-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: #9ba7bb; box-shadow: 0 0 0 5px rgba(155,167,187,.12); }
.connection-banner.success .connection-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(17,134,93,.11); }
.connection-banner.warning .connection-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(196,122,8,.11); }
.connection-banner strong, .connection-banner p { display: block; margin: 0; }
.connection-banner p { margin-top: 3px; font-size: 12px; line-height: 1.45; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 22px 22px; }
.quick-action { display: grid; min-height: 150px; align-content: center; justify-items: start; gap: 6px; border: 1px solid var(--line); border-radius: 13px; padding: 20px; cursor: pointer; color: var(--ink); background: #fafbfe; text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.quick-action:hover { border-color: #b9c9e9; background: #f4f7ff; transform: translateY(-2px); }
.quick-action > span { display: flex; width: 39px; height: 39px; align-items: center; justify-content: center; margin-bottom: 4px; border-radius: 10px; color: var(--blue); background: #eaf0ff; font-size: 18px; }
.quick-action strong { font-size: 14px; }
.quick-action small { color: var(--muted); line-height: 1.45; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 23px 18px; }
.panel-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.text-button { border: 0; cursor: pointer; color: var(--blue); background: transparent; font-size: 13px; font-weight: 700; }
.activity-list { min-height: 290px; padding: 0 23px 13px; }
.activity-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-top: 1px solid #edf0f5; padding: 14px 0; }
.activity-icon { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; color: #315fd0; background: #edf2ff; font-weight: 800; }
.activity-main strong, .activity-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-main span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.activity-main .badge { display: inline-flex; width: auto; margin: 0 0 0 4px; vertical-align: middle; }
.activity-date { color: #8993a7; font-size: 12px; }
.activity-empty { display: flex; min-height: 270px; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.steps { display: grid; gap: 8px; margin: 0; padding: 0 23px 20px; list-style: none; }
.steps li { display: flex; gap: 13px; border-top: 1px solid #edf0f5; padding: 15px 0 8px; }
.steps li > span { display: flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border-radius: 50%; color: #315fd0; background: #eaf0ff; font-size: 12px; font-weight: 800; }
.steps strong { font-size: 13px; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.table-panel { overflow: hidden; }
.batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; border: 1px solid #cfdafa; border-radius: 13px; padding: 12px 15px; color: #314c8f; background: #f2f6ff; }
.batch-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.batch-toolbar .button { min-height: 36px; padding: 0 12px; font-size: 12px; }
.table-tools { display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 12px 18px; }
.search { position: relative; width: min(390px, 100%); }
.search span { position: absolute; left: 13px; top: 9px; color: #8f99ad; font-size: 18px; }
.search input { padding-left: 39px; background: #fafbfd; }
.count-label { color: var(--muted); font-size: 13px; }
.license-tools { justify-content: flex-start; }
.license-tools select { width: 180px; margin-left: auto; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 45px; padding: 0 17px; color: #7b869a; background: #fafbfd; text-align: left; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
td { height: 59px; border-top: 1px solid #edf0f5; padding: 8px 17px; color: #3c475c; white-space: nowrap; }
.select-cell { width: 48px; padding-right: 4px; text-align: center; }
.select-cell input { width: 17px; height: 17px; accent-color: var(--blue); }
tbody tr:hover { background: #fbfcff; }
.cell-title { color: var(--ink); font-weight: 680; }
.cell-subtitle { display: block; margin-top: 3px; color: #8a94a6; font-size: 12px; }
.actions-cell { width: 118px; text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-button { display: inline-flex; min-width: 34px; height: 32px; align-items: center; justify-content: center; border: 1px solid #dce2ed; border-radius: 8px; cursor: pointer; color: #536078; background: #fff; font-size: 12px; font-weight: 700; }
.row-button:hover { border-color: #b9c4d7; color: var(--blue); background: #f7f9ff; }
.row-button.danger:hover { border-color: #efc3c7; color: var(--red); background: #fff7f7; }
.inline-code, .license-key { display: inline-block; max-width: 300px; overflow: hidden; color: #3159ad; background: #edf2ff; text-overflow: ellipsis; vertical-align: middle; }
.license-key { max-width: 360px; color: #344258; background: #f1f4f8; }
.secret-hint { display: inline-flex; border-radius: 999px; padding: 6px 10px; color: #425376; background: #eef2f8; font-family: Consolas, monospace; font-size: 12px; }
.badge { display: inline-flex; min-width: 68px; height: 27px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 10px; font-size: 11px; font-weight: 800; }
.badge.active { color: #0b7954; background: #e5f6ef; }
.badge.expired { color: #a56100; background: #fff0d5; }
.badge.revoked { color: #ad3440; background: #fdebec; }
.empty-state { min-height: 320px; padding: 60px 20px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { display: flex; width: 54px; height: 54px; align-items: center; justify-content: center; margin: 0 auto 14px; border-radius: 15px; color: var(--blue); background: #edf2ff; font-family: Consolas, monospace; font-size: 24px; }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 16px; }
.empty-state p { margin: 7px 0 0; }
.compact-empty { min-height: 220px; padding: 38px 20px; }
.compact-empty strong { color: var(--ink); }
.security-callout { display: flex; gap: 13px; margin: -4px 0 19px; border: 1px solid #f0cfb8; border-radius: 13px; padding: 15px 18px; color: #75543b; background: #fff7f0; }
.security-callout > span { display: flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #c46d37; font-weight: 900; }
.security-callout strong, .security-callout p { display: block; margin: 0; }
.security-callout p { margin-top: 4px; font-size: 12px; line-height: 1.5; }
.heading-actions { display: flex; gap: 9px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.guide-card { min-height: 230px; padding: 25px; }
.guide-card h3 { margin: 18px 0 9px; font-size: 17px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.guide-number { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 11px; color: #315fd0; background: #eaf0ff; font-weight: 900; }
.info-banner, .warning-banner { display: flex; gap: 13px; margin-top: 18px; border: 1px solid #dbe5f9; border-radius: 12px; padding: 16px 18px; color: #52617c; background: #f0f5ff; font-size: 13px; line-height: 1.5; }
.info-banner strong, .warning-banner strong { flex: 0 0 auto; color: #3159ad; }
.warning-banner { border-color: #eadcbf; background: #fffaef; }
.warning-banner strong { color: #94600d; }

.integration-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 20px; margin-bottom: 20px; }
.integration-card { overflow: hidden; }
.integration-card .panel-heading { padding-bottom: 13px; }
.code-box { overflow: auto; min-height: 112px; max-height: 240px; margin: 0 22px 17px; border: 1px solid #25334c; border-radius: 11px; padding: 15px; color: #dce8ff; background: #111a2b; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-box.tall { max-height: 420px; }
.download-link { width: fit-content; margin: 0 22px 22px; }
.machine-id { margin: 5px 22px 14px; border-radius: 11px; padding: 18px; color: #254c9f; background: #edf2ff; font-family: Consolas, monospace; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.helper { margin: 0 22px 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
code { border-radius: 5px; padding: 2px 5px; color: #334f91; background: #eef2fa; font-family: Consolas, monospace; }
.code-card { margin-top: 0; }

.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.settings-card { display: flex; min-height: 240px; align-items: flex-start; gap: 16px; padding: 24px; }
.settings-icon { display: flex; width: 45px; height: 45px; flex: 0 0 45px; align-items: center; justify-content: center; border-radius: 12px; color: var(--blue); background: #eaf0ff; font-size: 20px; }
.settings-card h3 { margin: 2px 0 7px; font-size: 17px; }
.settings-card p { min-height: 64px; margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.settings-card .download-link { margin: 0; }
.file-button { position: relative; width: fit-content; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.modal { width: min(580px, calc(100vw - 28px)); max-height: calc(100vh - 40px); border: 0; border-radius: 18px; padding: 0; color: var(--ink); box-shadow: 0 28px 80px rgba(17, 28, 51, .3); }
.modal.wide { width: min(720px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(13, 22, 41, .62); backdrop-filter: blur(3px); }
.modal > form, .modal > div:not(.success-mark), .modal > textarea { margin-left: 25px; margin-right: 25px; }
.modal > form { margin: 0; padding: 25px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.modal-header h2 { margin: 6px 0 0; font-size: 23px; letter-spacing: -.5px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 8px; cursor: pointer; color: #6b768b; background: #f3f5f9; font-size: 23px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.full-span { grid-column: 1 / -1; }
.span-2 { grid-column: span 2; }
.check-label { display: flex; min-height: 43px; align-items: center; gap: 9px; padding-top: 22px; }
.check-label input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--blue); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); }
.modal-actions.centered { justify-content: center; margin: 18px 25px 25px; }
.modal-note { margin-top: 18px; border-radius: 10px; padding: 12px 14px; color: #65728a; background: #f5f7fb; font-size: 12px; line-height: 1.5; }
.success-mark { display: flex; width: 58px; height: 58px; align-items: center; justify-content: center; margin: 27px auto 12px; border-radius: 50%; color: #fff; background: var(--green); font-size: 27px; font-weight: 800; box-shadow: 0 9px 20px rgba(17,134,93,.22); }
.modal-centered { text-align: center; }
.modal-centered h2 { margin: 6px 0 0; }
.generated-key { display: block; width: calc(100% - 50px); height: 130px; margin-top: 20px; color: #dce8ff; background: #111a2b; font-family: Consolas, monospace; font-size: 12px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 30px)); border-radius: 11px; padding: 14px 18px; pointer-events: none; opacity: 0; color: #fff; background: #17233a; box-shadow: 0 14px 35px rgba(19,32,56,.24); transform: translateY(14px); transition: opacity .2s, transform .2s; font-size: 13px; font-weight: 650; }
.toast.show, .toast.visible { opacity: 1; transform: none; }
.toast.error { background: #a93440; }
.sidebar-overlay { display: none; }

@media (max-width: 1160px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card { min-height: auto; }
  .settings-card p { min-height: auto; }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form-side { padding: 28px; }
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .sidebar-overlay { position: fixed; z-index: 25; inset: 0; display: none; background: rgba(13,22,41,.48); }
  .sidebar-overlay.open, .sidebar-overlay.visible { display: block; }
  .mobile-only { display: inline-flex !important; }
  .topbar { padding: 0 20px; }
  .topbar > div:first-of-type { margin-right: auto; margin-left: 12px; }
  .content { padding: 25px 20px 45px; }
  .dashboard-grid, .integration-grid { grid-template-columns: 1fr; }
  .picker-meta span { display: none; }
  .application-picker select { width: 170px; }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { height: 76px; }
  .topbar-caption, #quick-license-button .button-label { display: none; }
  #quick-license-button { min-height: 37px; padding: 0 11px; font-size: 12px; }
  .topbar h1 { font-size: 18px; }
  .content { padding: 20px 13px 38px; }
  .metric-grid { grid-template-columns: 1fr; gap: 12px; }
  .metric-card { min-height: 95px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .heading-actions { flex-direction: column; }
  .quick-grid { grid-template-columns: 1fr; }
  .application-picker { display: none; }
  .table-tools, .license-tools { align-items: stretch; flex-direction: column; }
  .batch-toolbar, .batch-actions { align-items: stretch; flex-direction: column; }
  .search, .license-tools select { width: 100%; margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .full-span { grid-column: span 1; }
  .span-2 { grid-column: span 1; }
  .check-label { padding-top: 0; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .info-banner, .warning-banner { flex-direction: column; }
  .settings-card { flex-direction: column; }
}

/* Dark control-center redesign */
:root {
  color-scheme: dark;
  --ink: #f5f1fb;
  --muted: #918b9d;
  --line: #27232d;
  --soft: #08080b;
  --white: #121114;
  --navy: #09090c;
  --blue: #9b5cff;
  --blue-dark: #8644eb;
  --green: #45d495;
  --amber: #f1b14b;
  --red: #ff6577;
  --purple: #a45fff;
  --purple-soft: #6f3fc4;
  --surface: #121114;
  --surface-high: #17151a;
  --surface-low: #0d0c0f;
  --radius: 13px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

body { background: #08080b; color: var(--ink); font-size: 14px; }
.muted { color: var(--muted); }
.eyebrow, .panel-kicker { color: #a976ff; }

.auth-screen { background: #08080b; }
.auth-art { color: #fff; background: radial-gradient(circle at 26% 24%, rgba(150, 77, 255, .22), transparent 32%), linear-gradient(145deg, #0d0c11, #070709 72%); }
.auth-art::after { opacity: .28; background-size: 54px 54px; background-image: linear-gradient(rgba(175,112,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(175,112,255,.08) 1px, transparent 1px); }
.art-orb-one { background: rgba(154, 80, 255, .25); filter: blur(30px); }
.art-orb-two { background: rgba(92, 218, 178, .1); filter: blur(35px); }
.auth-copy p { color: #a59dac; }
.auth-form-side { background: #0d0c10; }
.auth-card { border: 1px solid #242029; border-radius: 20px; padding: 34px; background: rgba(20, 18, 23, .84); box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.launch-steps li { border-color: #29242f; }
.launch-steps li > span { color: #d9bdff; background: #2b1a42; }
.launch-address { border-color: #392853; color: #a69caf; background: #17121d; }
.launch-address strong { color: #bf91ff; }

label { color: #b8b1c1; }
input, select, textarea { border-color: #302b35; color: #f4eff9; background: #121115; }
input:focus, select:focus, textarea:focus { border-color: #9d63f3; box-shadow: 0 0 0 3px rgba(157, 99, 243, .15); }
input::placeholder, textarea::placeholder { color: #665f6d; }
.label-help { color: #766f7f; }

.button { border-radius: 8px; font-size: 13px; }
.button.primary { color: #fff; background: linear-gradient(135deg, #a963ff, #7a38da); box-shadow: 0 10px 24px rgba(132, 60, 224, .22); }
.button.primary:hover { background: linear-gradient(135deg, #b577ff, #8b48e8); }
.button.secondary { border-color: #35303a; color: #d1c9da; background: #17151a; }
.button.secondary:hover { border-color: #5c4c6f; background: #1e1a23; }
.button.danger { border-color: #57313a; color: #ff8390; background: #211317; }
.button.danger:hover { border-color: #8f4754; background: #2d171d; }
.button.ghost { color: #8f8798; }

.app-shell { grid-template-columns: 214px minmax(0, 1fr); background: #08080b; }
.sidebar { width: 214px; border-right: 1px solid #201d24; padding: 0 14px 18px; color: #fff; background: #09090c; }
.sidebar .brand { min-height: 66px; border-bottom: 1px solid #1d1a20; padding: 0 7px; }
.brand { gap: 10px; font-size: 15px; }
.brand-logo-only { justify-content: center; overflow: hidden; }
.brand-logo-only .brand-logo { display: block; width: 138px; height: auto; flex: 0 0 auto; }
.sidebar .sidebar-brand { min-height: 78px; border-bottom: 1px solid #1d1a20; padding: 0; }
.auth-brand-logo { width: 210px; height: 94px; min-height: 94px; justify-content: center; }
.auth-brand-logo .brand-logo { width: 205px; }
.auth-copy .auth-brand-logo + h1 { margin-top: 42px; }
.main-nav { gap: 4px; margin-top: 23px; }
.nav-item { min-height: 39px; gap: 10px; border-radius: 8px; padding: 0 10px; color: #76717e; font-size: 12px; font-weight: 650; }
.nav-item:hover { color: #d8d0df; background: #141217; }
.nav-item.active { color: #e7d6ff; background: linear-gradient(90deg, rgba(143, 71, 238, .24), rgba(143, 71, 238, .08)); box-shadow: inset 2px 0 #a65fff; }
.nav-icon { width: 18px; color: #8c8396; font-size: 14px; }
.nav-item.active .nav-icon { color: #b980ff; }
.sidebar-bottom { border-color: #201d24; }

.workspace { grid-column: 2; background: radial-gradient(circle at 48% -20%, rgba(109, 52, 168, .08), transparent 30%), #08080b; }
.topbar { height: 66px; border-color: #201d24; padding: 0 28px; background: rgba(9, 9, 12, .92); }
.topbar h1 { color: #f4eff8; font-size: 18px; font-weight: 650; }
.topbar-caption { color: #625c69; font-size: 9px; }
.topbar-actions { gap: 12px; }
.application-picker { color: #716a78; }
.application-picker select { width: 205px; min-height: 36px; border-color: #302a36; color: #dcd3e4; background: #121015; font-size: 12px; }
.icon-button { border-color: #302a36; color: #ddd3e4; background: #141217; }

.content { max-width: 1720px; padding: 24px 28px 48px; }
.welcome-row, .page-heading { margin-bottom: 18px; }
.welcome-row h2, .page-heading h2 { color: #f4eff8; font-size: 21px; font-weight: 650; }
.panel { border-color: #242128; background: linear-gradient(150deg, #131215, #0f0e11); box-shadow: var(--shadow); }
.panel-heading { padding: 18px 19px 14px; }
.panel-heading h3 { color: #eee7f3; font-size: 14px; font-weight: 650; }
.panel-heading p { color: #77707f; font-size: 11px; }
.panel-kicker { display: block; margin-bottom: 6px; font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }

.connection-banner { min-height: 58px; margin-bottom: 16px; border-color: #2b2730; border-radius: 10px; padding: 11px 15px; color: #a29aa9; background: #111014; }
.connection-banner.compact { border-radius: 9px; }
.connection-banner.success { border-color: #214537; color: #8bcdb1; background: #0d1915; }
.connection-banner.warning { border-color: #543f22; color: #d6ae6f; background: #1a150e; }
.connection-banner.neutral { color: #8f8898; background: #111014; }
.connection-banner .connection-dot { width: 8px; height: 8px; flex-basis: 8px; background: #69616f; box-shadow: 0 0 0 4px rgba(105,97,111,.12); }

.metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.metric-card { position: relative; display: block; min-height: 94px; overflow: hidden; border-color: #242128; border-radius: 11px; padding: 15px 16px; background: linear-gradient(145deg, #141316, #0e0d10); box-shadow: 0 14px 38px rgba(0,0,0,.2); }
.metric-card::after { position: absolute; right: -20px; bottom: -38px; width: 82px; height: 82px; border-radius: 50%; content: ""; background: rgba(157, 86, 246, .05); filter: blur(2px); }
.metric-card.accent { border-color: #3a2851; background: linear-gradient(145deg, #18121f, #0f0d12); }
.metric-card .metric-label { display: block; color: #8a8391; font-size: 10px; font-weight: 700; letter-spacing: .2px; }
.metric-card strong { display: block; margin-top: 9px; color: #f6f1fa; font-size: 20px; font-weight: 650; letter-spacing: -.5px; }
.metric-card.accent strong, .metric-card strong.status-online { color: #b97dff; }
.metric-card small { display: block; margin-top: 5px; color: #5f5965; font-size: 9px; }

.analytics-grid { display: grid; grid-template-columns: minmax(360px, 1.25fr) minmax(310px, 1fr) minmax(250px, .72fr); gap: 14px; margin-bottom: 16px; }
.analytics-panel { min-height: 292px; overflow: hidden; }
.chart-chip { display: inline-flex; height: 25px; align-items: center; border: 1px solid #31263d; border-radius: 999px; padding: 0 9px; color: #b78be8; background: #17121d; font-size: 9px; font-weight: 700; }
.trend-chart { position: relative; height: 213px; margin: 0 18px 16px; overflow: hidden; border: 1px solid #201e23; border-radius: 9px; background: #0c0b0e; }
.trend-chart canvas { position: absolute; inset: 0 0 29px; width: 100%; height: calc(100% - 29px); }
.chart-empty { position: absolute; inset: 0 18px 29px; display: grid; place-items: center; color: #746d73; font-size: 11px; text-align: center; }
.chart-legend { position: absolute; right: 13px; bottom: 8px; display: flex; gap: 14px; color: #756e74; font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 16px; height: 2px; border-radius: 999px; }
.legend-red { background: #df3540; }
.legend-silver { background: #c9c5c7; }

.bar-chart { display: flex; height: 220px; align-items: flex-end; justify-content: space-around; gap: 14px; margin: 0 20px 18px; border-bottom: 1px solid #2c2731; padding: 18px 10px 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 100% 45px; }
.bar-column { display: grid; width: 19%; height: 100%; align-content: end; justify-items: center; gap: 8px; }
.bar-value { width: min(38px, 72%); min-height: 5%; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #b76cff, #7434cc); box-shadow: 0 0 24px rgba(158,82,242,.14); transition: height .35s ease; }
.bar-value.bright { background: linear-gradient(180deg, #cf92ff, #8d47e0); }
.bar-value.dim { background: linear-gradient(180deg, #75647e, #3a303e); }
.bar-column span { color: #665f6c; font-size: 8px; }

.donut-wrap { display: grid; place-items: center; padding: 3px 0 16px; }
.license-donut { --donut-angle: 0deg; position: relative; display: grid; width: 132px; height: 132px; place-items: center; border-radius: 50%; background: conic-gradient(#ad68ff 0 var(--donut-angle), #29242f var(--donut-angle) 360deg); box-shadow: 0 0 35px rgba(160,88,241,.09); }
.license-donut::after { position: absolute; width: 84px; height: 84px; border: 1px solid #28232d; border-radius: 50%; content: ""; background: #100f12; }
.license-donut span { position: relative; z-index: 1; color: #e9def1; font-size: 20px; font-weight: 650; }
.status-list { display: grid; gap: 8px; padding: 0 18px 16px; }
.status-list > div { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid #242027; padding-top: 8px; color: #7f7786; font-size: 9px; }
.status-list strong { color: #d9d0df; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-dot.purple { background: #aa63ff; }
.status-dot.slate { background: #6f6675; }
.status-dot.green { background: #42cd90; }

.dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 14px; }
.quick-grid { gap: 10px; padding: 0 18px 18px; }
.quick-action { min-height: 116px; border-color: #28242d; border-radius: 10px; color: #e8e0ee; background: #111014; }
.quick-action:hover { border-color: #4f3767; background: #17121d; }
.quick-action > span { width: 34px; height: 34px; color: #bf8bff; background: #241535; }
.quick-action small { color: #716a78; }
.steps { padding: 0 19px 17px; }
.steps li { border-color: #252129; }
.steps li > span { color: #d6b3ff; background: #29183d; }
.steps p { color: #716a78; }

.table-panel { border-radius: 11px; }
.table-tools { min-height: 58px; border-color: #27232d; padding: 10px 14px; }
.search span { color: #655f6d; }
.search input { background: #0e0d10; }
.count-label { color: #746d7b; }
th { height: 41px; padding: 0 14px; color: #6e6775; background: #0f0e11; font-size: 9px; }
td { height: 55px; border-color: #242027; padding: 8px 14px; color: #aba3b2; }
tbody tr:hover { background: #151218; }
.cell-title { color: #e5dde9; }
.cell-subtitle { color: #6d6673; }
.row-button { border-color: #312c35; color: #a49cab; background: #141216; }
.row-button:hover { border-color: #60457b; color: #cfa4ff; background: #1d1625; }
.inline-code, .license-key { color: #c89aff; background: #21162d; }
.secret-hint { color: #bca7ce; background: #1b171f; }
.badge.active { color: #70d6ac; background: #10251d; }
.badge.expired { color: #e5b96f; background: #2b2010; }
.badge.revoked { color: #ff8290; background: #2d151b; }
.empty-state { color: #716a78; }
.empty-state .empty-icon { color: #bc84ff; background: #221532; }

.batch-toolbar { border-color: #44305b; color: #d4b6f7; background: #18111f; }
.select-cell input { accent-color: #a65fff; }
.security-callout { border-color: #513a24; color: #c4a47b; background: #1c150e; }
.security-callout > span { background: #9d652b; }
.guide-card, .settings-card { background: linear-gradient(145deg, #131215, #0f0e11); }
.settings-icon { color: #c18dff; background: #231533; }
.info-banner, .warning-banner { border-color: #372b45; color: #a199a9; background: #17121c; }
.warning-banner { border-color: #4d3c24; background: #1a150e; }

.modal { border: 1px solid #312b36; border-radius: 14px; color: #eee7f3; background: #121014; box-shadow: 0 34px 100px rgba(0,0,0,.64); }
.modal::backdrop { background: rgba(2,2,4,.78); backdrop-filter: blur(6px); }
.modal-header h2 { color: #f3edf7; }
.modal-close { color: #958c9e; background: #1d1a20; }
.modal-close:hover { color: #fff; background: #28222d; }
.modal-actions { border-color: #2b2730; }
.modal-note { color: #938a9c; background: #19161d; }
.generated-key { border-color: #332942; color: #d8b8ff; background: #0b090d; }
.success-mark { color: #b873ff; }
.toast { border: 1px solid #46325d; color: #f6effb; background: #1a1221; box-shadow: 0 18px 50px rgba(0,0,0,.42); }
.toast.error { border-color: #713944; background: #35171e; }

@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .health-panel { grid-column: span 2; }
  .health-panel { display: grid; grid-template-columns: 1fr 180px 1fr; align-items: center; }
  .health-panel .panel-heading { align-self: start; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .workspace { grid-column: 1; }
  .sidebar { width: 214px; }
  .analytics-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .health-panel { display: block; grid-column: auto; }
}

@media (max-width: 640px) {
  .content { padding: 18px 12px 34px; }
  .topbar { padding: 0 13px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 88px; padding: 13px; }
  .analytics-grid { gap: 10px; }
  .analytics-panel { min-height: 260px; }
  .application-picker { display: none; }
  .auth-form-side { padding: 20px; }
  .auth-card { padding: 25px 20px; }
}

/* STS dark-red brand palette */
:root {
  --blue: #bd1e29;
  --blue-dark: #8f111a;
  --purple: #d52b36;
  --purple-soft: #7d151d;
}

.eyebrow, .panel-kicker { color: #df3a45; }
.auth-art { background: radial-gradient(circle at 26% 24%, rgba(190, 24, 36, .22), transparent 32%), linear-gradient(145deg, #110b0d, #070708 72%); }
.auth-art::after { background-image: linear-gradient(rgba(205,43,54,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(205,43,54,.075) 1px, transparent 1px); }
.art-orb-one { background: rgba(188, 22, 34, .25); }
.launch-steps li > span { color: #ffb4b8; background: #3b1116; }
.launch-address { border-color: #512229; background: #1c0e11; }
.launch-address strong { color: #ef6d75; }

input:focus, select:focus, textarea:focus { border-color: #c82934; box-shadow: 0 0 0 3px rgba(200, 41, 52, .15); }
.button.primary { background: linear-gradient(135deg, #c8222e, #861019); box-shadow: 0 10px 24px rgba(139, 14, 23, .26); }
.button.primary:hover { background: linear-gradient(135deg, #df303b, #a01520); }
.button.secondary:hover { border-color: #674047; background: #211719; }

.nav-item.active { color: #ffe0e2; background: linear-gradient(90deg, rgba(181, 22, 33, .27), rgba(116, 12, 20, .09)); box-shadow: inset 2px 0 #d52b36; }
.nav-item.active .nav-icon { color: #ed6069; }
.workspace { background: radial-gradient(circle at 48% -20%, rgba(137, 13, 23, .12), transparent 31%), #08080b; }
.application-picker select { border-color: #38292c; }

.metric-card::after { background: rgba(201, 32, 44, .055); }
.metric-card.accent { border-color: #512128; background: linear-gradient(145deg, #1d0f12, #100d0e); }
.metric-card.accent strong, .metric-card strong.status-online { color: #e64b55; }
.chart-chip { border-color: #4a2228; color: #df737a; background: #1c0e11; }
.trend-chart { background: linear-gradient(180deg, rgba(190,25,37,.025), transparent), #0c0b0e; }

.bar-value { background: linear-gradient(180deg, #df3944, #90141d); box-shadow: 0 0 24px rgba(193,31,42,.16); }
.bar-value.bright { background: linear-gradient(180deg, #f05a63, #b51e29); }
.bar-value.dim { background: linear-gradient(180deg, #806166, #453034); }
.bar-value.danger-bar { background: linear-gradient(180deg, #b92430, #651018); }
.license-donut { background: conic-gradient(#d62d38 0 var(--donut-angle), #2d2426 var(--donut-angle) 360deg); box-shadow: 0 0 35px rgba(186,25,37,.1); }
.status-dot.red, .status-dot.purple { background: #dc3540; }

.quick-action:hover { border-color: #643139; background: #1d1013; }
.quick-action > span { color: #ed6870; background: #351116; }
.steps li > span { color: #ff9ca2; background: #3b1217; }
.row-button:hover { border-color: #734148; color: #f38d94; background: #231316; }
.inline-code, .license-key { color: #f08289; background: #2b1116; }
.secret-hint { color: #cda8ab; background: #201518; }
.empty-state .empty-icon { color: #e86a72; background: #321116; }

.batch-toolbar { border-color: #5b2930; color: #e2b8bb; background: #211013; }
.select-cell input { accent-color: #c82934; }
.settings-icon { color: #e76b73; background: #321116; }
.info-banner { border-color: #4b292e; background: #1b1113; }
.generated-key { border-color: #4d252b; color: #f09aa0; background: #0d090a; }
.success-mark { color: #df3a45; }
.toast { border-color: #632c34; background: #260f14; }

/* Refined top command bar */
.topbar {
  height: 78px;
  padding: 0 24px 0 28px;
  background: rgba(8, 8, 11, .96);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .16);
}
.topbar-title { min-width: 130px; }
.topbar-title h1 { margin-top: 3px; }
.topbar-actions { gap: 8px; }
.application-picker {
  display: grid;
  min-height: 46px;
  grid-template-columns: auto minmax(148px, 188px);
  align-items: center;
  gap: 11px;
  border: 1px solid #332529;
  border-radius: 11px;
  padding: 5px 7px 5px 12px;
  color: #81777a;
  background: linear-gradient(145deg, #151113, #100e0f);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
  letter-spacing: 0;
  text-transform: none;
}
.picker-meta { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #7e7477; font-size: 9px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; }
.picker-meta i { width: 6px; height: 6px; border-radius: 50%; background: #d42b36; box-shadow: 0 0 0 4px rgba(202, 36, 48, .1); }
.application-picker select {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-left: 1px solid #35282b;
  border-radius: 0;
  padding: 0 27px 0 12px;
  color: #eee8e9;
  background-color: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}
.application-picker select:focus { border-color: #5e272e; box-shadow: none; }
.header-tool {
  display: inline-flex;
  width: auto;
  min-width: 108px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #392d30;
  border-radius: 10px;
  padding: 0 14px;
  color: #b9afb2;
  background: linear-gradient(145deg, #171416, #100f10);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.header-tool:hover { border-color: #6a3038; color: #f06d75; background: #211316; transform: translateY(-1px); }
.header-tool:disabled { cursor: wait; opacity: .72; transform: none; font-size: 11px; }
.header-primary { min-height: 46px; border-radius: 10px; padding: 0 17px; box-shadow: 0 8px 20px rgba(133, 14, 23, .22); }
.header-primary .button-symbol { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 5px; background: rgba(255,255,255,.11); font-size: 14px; line-height: 1; }
.header-primary .button-label { white-space: nowrap; }
.welcome-row { min-height: auto; margin-bottom: 14px; }

@media (max-width: 1180px) {
  .application-picker { grid-template-columns: 8px minmax(145px, 175px); gap: 7px; padding-left: 10px; }
  .picker-meta span { display: none; }
  .application-picker select { border-left: 0; padding-left: 7px; }
}

@media (max-width: 900px) {
  .topbar { height: 72px; padding: 0 14px; }
  .topbar > div:first-of-type { margin-left: 10px; }
  .application-picker { grid-template-columns: 7px minmax(130px, 155px); }
  .topbar-actions { gap: 6px; }
}

@media (max-width: 640px) {
  .topbar { height: 68px; }
  .topbar > div:first-of-type { margin-left: 7px; }
  .header-tool { width: auto; min-width: 84px; height: 40px; flex-basis: auto; padding: 0 10px; font-size: 10px; }
  .header-primary { min-width: 40px; min-height: 40px; padding: 0 9px; }
  #quick-license-button .button-symbol { display: inline-grid; }
}

/* Neutral sidebar inspired by the supplied reference */
.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { width: 224px; border-right-color: #1b1b1d; padding: 0 12px 18px; background: #09090a; }
.sidebar .sidebar-brand { margin: 0 3px; }
.main-nav { gap: 4px; margin-top: 18px; }
.nav-item {
  min-height: 40px;
  gap: 12px;
  border-radius: 8px;
  padding: 0 12px;
  color: #8c8b94;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0;
}
.nav-item:hover { color: #d3d2d6; background: #141415; }
.nav-item.active { color: #f4f3f4; background: #1b1b1c; box-shadow: none; }
.nav-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #92919a;
  font-family: inherit;
  font-size: 0;
}
.nav-item.active .nav-icon { color: #ededee; }
.nav-icon::before, .nav-icon::after { position: absolute; box-sizing: border-box; content: ""; }

.icon-overview::before {
  top: 2px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  background: currentColor;
  box-shadow: 9px 0 currentColor, 0 9px currentColor, 9px 9px currentColor;
}
.icon-applications::before {
  top: 3px;
  left: 5px;
  width: 11px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
  transform: rotate(8deg);
}
.icon-applications::after {
  top: 1px;
  left: 2px;
  width: 10px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
  transform: rotate(-24deg);
}
.icon-users::before {
  top: 1px;
  left: 6px;
  width: 6px;
  height: 6px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}
.icon-users::after {
  bottom: 1px;
  left: 3px;
  width: 12px;
  height: 7px;
  border: 1.4px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 2px 2px;
}
.icon-licenses::before {
  top: 2px;
  left: 1px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.icon-licenses::after {
  top: 9px;
  left: 6px;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 5px 3px 0 -0.4px currentColor;
  transform: rotate(-42deg);
  transform-origin: left center;
}
.icon-guide::before {
  inset: 1.5px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}
.icon-guide::after {
  inset: 0;
  display: grid;
  place-items: center;
  content: "?";
  color: currentColor;
  font-family: "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 650;
}
.icon-settings::before {
  inset: 2px;
  border: 1.5px dashed currentColor;
  border-radius: 50%;
}
.icon-settings::after {
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}
.icon-logout::before {
  top: 2px;
  left: 2px;
  width: 9px;
  height: 14px;
  border: 1.4px solid currentColor;
  border-right: 0;
  border-radius: 2px 0 0 2px;
}
.icon-logout::after {
  top: 6px;
  right: 0;
  width: 9px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg) skew(8deg, 8deg);
}
.sidebar-bottom { margin-right: 3px; margin-left: 3px; border-top-color: #1d1d1f; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 224px; }
}

/* Professional dashboard actions and setup checklist */
.dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(420px, .85fr); gap: 14px; align-items: stretch; }
.command-panel, .configuration-panel { overflow: hidden; border-color: #252326; background: #0f0f11; box-shadow: 0 14px 36px rgba(0, 0, 0, .16); }
.command-panel .panel-heading, .configuration-panel .panel-heading { min-height: 70px; align-items: center; border-bottom: 1px solid #242225; padding: 16px 18px; }
.command-panel .panel-heading p, .configuration-panel .panel-heading p { margin-top: 4px; }

.command-panel .quick-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0 18px 10px; }
.command-panel .quick-action {
  display: grid;
  min-height: 76px;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-content: initial;
  align-items: center;
  justify-items: stretch;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #242225;
  border-radius: 0;
  padding: 10px 7px;
  color: #e5e2e3;
  background: transparent;
  text-align: left;
  transform: none;
}
.command-panel .quick-action:last-child { border-bottom: 0; }
.command-panel .quick-action:hover { border-color: #242225; border-radius: 8px; padding-right: 10px; padding-left: 10px; background: #151416; transform: none; }
.command-panel .quick-action > .quick-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin: 0;
  border: 1px solid #3d292d;
  border-radius: 9px;
  color: #d64a54;
  background: #1c1013;
  font-size: 0;
}
.quick-action-icon .nav-icon { display: block; color: currentColor; transform: scale(.88); }
.command-panel .quick-action > .quick-action-copy { display: grid; width: auto; height: auto; min-width: 0; gap: 4px; margin: 0; border-radius: 0; color: inherit; background: transparent; font-size: inherit; }
.quick-action-copy strong { color: #e9e6e7; font-size: 13px; font-weight: 650; }
.quick-action-copy small { color: #777176; font-size: 11px; line-height: 1.35; }
.command-panel .quick-action > .quick-action-arrow { display: block; width: auto; height: auto; margin: 0; color: #565156; background: transparent; font-size: 15px; text-align: right; transition: color .15s, transform .15s; }
.command-panel .quick-action:hover .quick-action-arrow { color: #c74650; transform: translateX(2px); }

.configuration-panel .professional-steps { display: grid; gap: 0; padding: 0 18px 10px; }
.professional-steps li {
  display: grid;
  min-height: 62px;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-top: 0;
  border-bottom: 1px solid #242225;
  padding: 9px 5px;
}
.professional-steps li:last-child { border-bottom: 0; }
.professional-steps li > .step-number {
  display: block;
  width: auto;
  height: auto;
  flex: initial;
  border-radius: 0;
  color: #6e696d;
  background: transparent;
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .6px;
}
.professional-steps strong { color: #e6e3e4; font-size: 12px; font-weight: 650; }
.professional-steps p { margin-top: 3px; color: #777176; font-size: 10px; }
.professional-steps li > .step-state {
  display: inline-flex;
  width: auto;
  height: 24px;
  flex: initial;
  align-items: center;
  border: 1px solid #302d30;
  border-radius: 999px;
  padding: 0 8px;
  color: #777176;
  background: #131214;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .25px;
}

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .command-panel .quick-grid, .configuration-panel .professional-steps { padding-right: 12px; padding-left: 12px; }
  .professional-steps li { grid-template-columns: 27px minmax(0, 1fr); }
  .professional-steps li > .step-state { display: none; }
}

/* Custom dark application selector */
.product-switcher { position: relative; width: 100%; min-width: 188px; }
.product-selector-button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-left: 1px solid #35282b;
  border-radius: 0;
  padding: 0 9px 0 12px;
  color: #eee9ea;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.product-selector-button:hover { color: #fff; }
.product-selector-button:focus-visible { outline: 1px solid #8d3039; outline-offset: 3px; border-radius: 4px; }
#product-selector-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-selector-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid #8d8487;
  border-bottom: 1.5px solid #8d8487;
  transform: rotate(45deg) translateY(-2px);
  transition: border-color .15s, transform .18s;
}
.product-selector-button[aria-expanded="true"] .product-selector-chevron { border-color: #e35b65; transform: rotate(225deg) translate(-1px, -1px); }
.product-selector-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 13px);
  right: -8px;
  width: 270px;
  overflow: hidden;
  border: 1px solid #342e31;
  border-radius: 12px;
  padding: 6px;
  background: rgba(15, 14, 16, .98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
  animation: selector-in .14s ease-out;
}
@keyframes selector-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
.product-option {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 8px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  color: #989195;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .14s, background .14s, border-color .14s;
}
.product-option:hover, .product-option:focus-visible { border-color: #30272a; outline: none; color: #ddd8da; background: #191618; }
.product-option.active { border-color: #51262d; color: #fff; background: #231316; }
.product-option-dot { width: 6px; height: 6px; border-radius: 50%; background: #4b4649; }
.product-option.active .product-option-dot { background: #dc3540; box-shadow: 0 0 0 4px rgba(210,42,53,.1); }
.product-option-copy { display: grid; min-width: 0; gap: 3px; }
.product-option-copy strong { overflow: hidden; color: inherit; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.product-option-copy small { overflow: hidden; color: #696367; font-family: Consolas, monospace; font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.product-option-check { color: #e95862; font-size: 12px; font-weight: 800; text-align: center; }

@media (max-width: 1180px) {
  .product-switcher { min-width: 160px; }
  .product-selector-button { border-left: 0; padding-left: 7px; }
}

/* PurinCash financial workspace */
.finance-hidden { display: none !important; }
.icon-finance::before { left: 2px; bottom: 2px; width: 3px; height: 7px; border-radius: 1px; background: currentColor; box-shadow: 5px -4px currentColor, 10px -8px currentColor; }
.icon-finance::after { left: 1px; right: 1px; bottom: 1px; border-bottom: 1.4px solid currentColor; }
.finance-kicker { display: block; margin-bottom: 7px; color: #dc3c47; font-size: 8px; font-weight: 800; letter-spacing: 1.5px; }
.finance-heading { align-items: center; }
.finance-controls { align-items: flex-end; }
.period-control { display: grid; gap: 5px; color: #716b70; font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.period-control select { width: 175px; min-height: 40px; border-color: #302c31; color: #d8d3d6; background: #111013; font-size: 11px; text-transform: none; }
.finance-empty { min-height: 390px; display: grid; place-items: center; align-content: center; padding: 50px 24px; text-align: center; }
.finance-empty-mark, .purin-mark { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 18px; border: 1px solid #4d2228; border-radius: 14px; color: #f06a73; background: #1d0f12; font-size: 23px; font-weight: 900; }
.finance-empty h3 { margin: 0; color: #f2edef; font-size: 21px; }
.finance-empty p { max-width: 540px; margin: 10px 0 22px; color: #817a80; font-size: 12px; line-height: 1.7; }
.finance-coverage { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; border: 1px solid #302b30; border-radius: 10px; padding: 12px 14px; color: #817a80; background: #111013; }
.finance-coverage > span { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border: 1px solid #563038; border-radius: 50%; color: #d45a64; font-family: Georgia, serif; font-size: 11px; font-weight: 700; }
.finance-coverage strong { display: block; color: #b9b1b5; font-size: 10px; }.finance-coverage p { margin: 3px 0 0; color: #746d72; font-size: 9px; line-height: 1.5; }
.finance-warnings { display: flex; gap: 9px; margin-bottom: 13px; border: 1px solid #553326; border-radius: 10px; padding: 11px 14px; color: #a8988c; background: #18120f; font-size: 10px; }
.finance-warnings strong { flex: 0 0 auto; color: #dc9e70; }

.finance-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 22px 2px 12px; border-bottom: 1px solid #282428; padding: 0 1px 12px; }
.finance-section-heading:first-of-type { margin-top: 18px; }
.finance-section-heading h3 { margin: 0; color: #ece6e9; font-size: 15px; font-weight: 690; letter-spacing: -.2px; }
.finance-section-heading p { margin: 5px 0 0; color: #716a6f; font-size: 9px; line-height: 1.5; }
.finance-section-heading .panel-kicker { margin-bottom: 6px; }
.finance-source-chip { flex: 0 0 auto; border: 1px solid #393338; border-radius: 999px; padding: 6px 9px; color: #8c8489; background: #121113; font-size: 8px; font-weight: 750; white-space: nowrap; }
.finance-source-chip.confirmed { border-color: #54252c; color: #d76069; background: #1c1114; }
.finance-section-heading.api-heading { margin-top: 26px; }
.finance-confirmed-row { display: grid; margin-bottom: 12px; }
.finance-confirmed-row .finance-list-panel { min-height: 0; }
.finance-confirmed-row .finance-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; }

.finance-summary-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.6fr); gap: 12px; margin-bottom: 12px; }
.balance-card { position: relative; min-height: 285px; overflow: hidden; border-color: #4b2026; padding: 23px; background: linear-gradient(145deg, #281115, #170d10 62%, #0f0e10); }
.balance-card::after { position: absolute; right: -70px; top: -100px; width: 260px; height: 260px; border-radius: 50%; content: ""; background: radial-gradient(circle, rgba(197,35,47,.2), transparent 68%); }
.balance-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; color: #b8adb0; font-size: 11px; }
.estimate-chip { border: 1px solid #603039; border-radius: 999px; padding: 5px 8px; color: #dc6670; background: #251216; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.balance-card > strong { position: relative; z-index: 1; display: block; margin: 23px 0 7px; color: #fff; font-size: clamp(30px, 3vw, 44px); font-weight: 700; letter-spacing: -1.8px; }
.balance-card > strong.unavailable { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.8px; }
.balance-card > p { position: relative; z-index: 1; max-width: 410px; margin: 0; color: #827579; font-size: 10px; line-height: 1.55; }
.balance-details { position: absolute; z-index: 2; right: 23px; bottom: 20px; left: 23px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.balance-details span { display: grid; gap: 3px; }
.balance-details small { color: #786f72; font-size: 9px; }
.balance-details b { color: #ded7da; font-size: 12px; }
.reconciliation-details { row-gap: 11px; }
.finance-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.finance-metric { position: relative; min-height: 111px; overflow: hidden; padding: 18px 19px; }
.finance-metric span { display: block; color: #797278; font-size: 10px; }
.finance-metric strong { display: block; margin: 10px 0 6px; color: #f1ecee; font-size: 24px; font-weight: 680; letter-spacing: -.8px; }
.finance-metric strong.unavailable { font-size: 16px; letter-spacing: -.3px; }
.finance-metric small { color: #666064; font-size: 9px; }
.finance-metric.featured { border-color: #442228; background: linear-gradient(150deg, #1b1113, #100f11); }
.finance-metric.featured strong { color: #f15d67; }

.finance-charts-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr); gap: 12px; margin-bottom: 12px; }
.weekday-panel, .approval-panel { min-height: 325px; }
.weekday-chart { display: flex; height: 240px; align-items: stretch; justify-content: space-around; gap: 10px; margin: 0 20px 17px; border-bottom: 1px solid #2c282c; padding: 13px 8px 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 100% 47px; }
.weekday-column { display: grid; width: 11%; height: 100%; grid-template-rows: 18px minmax(0, 1fr) 24px; align-items: end; justify-items: center; color: #756e73; }
.weekday-column > span { color: #8b8186; font-size: 9px; }
.weekday-column > div { display: flex; width: 100%; height: 100%; align-items: flex-end; justify-content: center; }
.weekday-column i { width: min(34px, 70%); border: 1px solid #a52933; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #d73743, #68141b); box-shadow: 0 7px 20px rgba(178,28,40,.18); transition: height .28s ease; }
.weekday-column small { align-self: center; font-size: 9px; }
.finance-donut-row { display: grid; min-height: 240px; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px; padding: 0 23px 20px; }
.finance-donut { position: relative; display: grid; width: 140px; height: 140px; place-items: center; border-radius: 50%; background: conic-gradient(#d83440 var(--approval-angle, 0deg), #2a2428 0); }
.finance-donut::after { position: absolute; width: 100px; height: 100px; border: 1px solid #302a2e; border-radius: 50%; content: ""; background: #100f11; }
.finance-donut span { position: relative; z-index: 1; color: #fff; font-size: 23px; font-weight: 750; }
.approval-legend { display: grid; gap: 0; }
.approval-legend > div { display: grid; min-height: 42px; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #292529; color: #817a80; font-size: 10px; }
.approval-legend > div:last-child { border: 0; }
.approval-legend i { width: 6px; height: 6px; border-radius: 50%; background: #555056; }
.approval-legend i.approved { background: #dc3b47; }.approval-legend i.pending { background: #b18b69; }.approval-legend i.failed { background: #575156; }
.approval-legend strong { color: #e2dcdf; font-size: 11px; }

.finance-lower-grid { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(300px, .8fr) minmax(440px, 1.25fr); gap: 12px; }
.finance-lower-grid.api-lower-grid { grid-template-columns: minmax(300px, .8fr) minmax(500px, 1.4fr); }
.api-lower-grid .recent-sales-panel { grid-column: auto; }
.finance-list-panel { min-height: 300px; overflow: hidden; }
.finance-methods, .rank-list, .recent-sales { padding: 0 19px 18px; }
.method-row { margin-bottom: 19px; }
.method-row > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px; }
.method-row strong { color: #e7e1e4; font-size: 12px; }.method-row span { grid-row: 2; color: #70696e; font-size: 9px; }.method-row b { grid-row: 1 / span 2; align-self: center; color: #d6cfd3; font-size: 11px; }
.method-track { height: 6px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #252226; }
.method-track i { display: block; height: 100%; border-radius: inherit; background: #d63642; }.method-track i.secondary { background: #80777e; }
.rank-row { display: grid; min-height: 54px; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #282428; }
.rank-row:last-child { border: 0; }.rank-number { color: #625c61; font-family: Consolas, monospace; font-size: 10px; }.rank-row div { display: grid; min-width: 0; gap: 3px; }.rank-row strong { overflow: hidden; color: #e5dfe2; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.rank-row small { color: #6f686d; font-size: 9px; }.rank-row b { color: #d7d0d4; font-size: 10px; }
.sale-row { display: grid; min-height: 56px; grid-template-columns: 31px minmax(0, 1fr) 70px auto; align-items: center; gap: 9px; border-bottom: 1px solid #282428; }
.sale-row:last-child { border: 0; }.sale-method { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #3c292d; border-radius: 8px; color: #d94b55; background: #1b1113; font-size: 10px; font-weight: 800; }.sale-row > div { display: grid; min-width: 0; gap: 3px; }.sale-row > div strong, .sale-row > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sale-row > div strong { color: #e3dde0; font-size: 10px; }.sale-row > div small { color: #6a6468; font-size: 8px; }.sale-row > b { color: #d9d3d6; font-size: 10px; }.sale-status { color: #958d92; font-size: 8px; }.sale-status.aprovada { color: #d74a55; }.sale-status.pendente { color: #ba9271; }.sale-status.falhou, .sale-status.estornada { color: #777176; }
.finance-list-empty { display: grid; min-height: 150px; place-items: center; width: 100%; color: #696368; font-size: 10px; text-align: center; }

.purin-settings-card { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(380px, 1.15fr); gap: 34px; margin-bottom: 19px; padding: 27px; border-color: #3a2529; background: linear-gradient(145deg, #151113, #0f0f11); }
.purin-settings-title { display: flex; gap: 14px; align-items: flex-start; }.purin-settings-title .purin-mark { width: 44px; height: 44px; flex: 0 0 44px; margin: 0; border-radius: 11px; font-size: 19px; }.purin-settings-title h3 { margin: 1px 0 6px; color: #f0eaed; font-size: 17px; }.purin-settings-title p { max-width: 530px; margin: 0; color: #7a7378; font-size: 10px; line-height: 1.6; }.purin-settings-title p strong { color: #aaa1a6; }
.purin-status { display: inline-flex; align-items: center; gap: 7px; margin: 17px 0 9px; border: 1px solid #302c30; border-radius: 999px; padding: 6px 9px; color: #7d767b; background: #121113; font-size: 9px; }.purin-status i { width: 6px; height: 6px; border-radius: 50%; background: #625b60; }.purin-status.connected { border-color: #4c2429; color: #d66a72; }.purin-status.connected i { background: #df3d49; box-shadow: 0 0 0 4px rgba(216,48,60,.09); }
.purin-doc-link { display: block; width: fit-content; color: #837a80; font-size: 9px; text-decoration: none; }.purin-doc-link:hover { color: #d55b64; }
.purin-settings-form { align-self: center; border-left: 1px solid #2b272b; padding-left: 34px; }.purin-settings-form label { color: #aaa2a7; font-size: 10px; }.purin-settings-form input { margin-top: 8px; font-family: Consolas, monospace; font-size: 11px; }.field-note { margin: 8px 0 16px; color: #666065; font-size: 9px; line-height: 1.5; }.purin-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reconciliation-settings-card { margin-bottom: 19px; padding: 25px 27px; border-color: #33272b; background: linear-gradient(145deg, #131113, #0f0f11); }
.reconciliation-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 21px; border-bottom: 1px solid #2b272b; padding-bottom: 18px; }
.reconciliation-settings-heading h3 { margin: 0 0 7px; color: #f0eaed; font-size: 16px; }
.reconciliation-settings-heading p { max-width: 760px; margin: 0; color: #797278; font-size: 10px; line-height: 1.6; }
.reconciliation-form { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 15px 13px; align-items: end; }
.reconciliation-form label { color: #8f878c; font-size: 9px; font-weight: 650; }
.reconciliation-form input { margin-top: 7px; min-height: 39px; font-size: 10px; }
.reconciliation-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; padding-top: 2px; }

@media (max-width: 1280px) {
  .finance-summary-grid { grid-template-columns: 1fr; }
  .finance-lower-grid { grid-template-columns: 1fr 1fr; }
  .recent-sales-panel { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .finance-charts-grid, .purin-settings-card { grid-template-columns: 1fr; }
  .finance-lower-grid.api-lower-grid { grid-template-columns: 1fr; }
  .purin-settings-form { border-top: 1px solid #2b272b; border-left: 0; padding-top: 24px; padding-left: 0; }
  .reconciliation-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .finance-heading { align-items: stretch; }.finance-controls { align-items: stretch; }.period-control select { width: 100%; }.finance-section-heading { align-items: flex-start; }.finance-summary-grid { grid-template-columns: 1fr; }.finance-metrics { grid-template-columns: 1fr 1fr; }.finance-lower-grid { grid-template-columns: 1fr; }.recent-sales-panel { grid-column: auto; }.finance-donut-row { grid-template-columns: 1fr; justify-items: center; }.approval-legend { width: 100%; }.balance-card { min-height: 365px; }.balance-details { grid-template-columns: 1fr; }.sale-row { grid-template-columns: 31px minmax(0, 1fr) auto; }.sale-status { display: none; }.reconciliation-settings-heading { display: grid; }.reconciliation-form { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .finance-section-heading { display: grid; }.finance-source-chip { width: fit-content; }.finance-metrics { grid-template-columns: 1fr; }.weekday-chart { gap: 3px; margin-right: 10px; margin-left: 10px; }.weekday-column i { width: 16px; }.purin-settings-card { padding: 20px; }.purin-form-actions .button { width: 100%; }
}
