
:root {
    color-scheme: dark;
    --base: #10131c;
    --sidebar: #151924;
    --surface: #181d29;
    --raised: #1d2331;
    --line: #2b3242;
    --ink: #f1f4fa;
    --muted: #a1abc0;
    --mint: #65e6bf;
    --rose: #ff91a5;
    --violet: #b2a3fb;
    --amber: #ffd28b;
    --nav-width: 242px;
    font-family: system-ui, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--base);
    font-size: 14px;

}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
.sr-only, .skip:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 12px; z-index: 20; padding: 12px; color: #10221d; background: var(--mint); border-radius: 8px; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--nav-width); padding: 29px 17px 17px; background: var(--sidebar); border-right: 1px solid #272e3d; display: flex; flex-direction: column; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; line-height: 1.13; letter-spacing: -.045em; font-weight: 760; width: fit-content; }
.sidebar .brand { margin-left: 7px; }
.brand-mark { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border-radius: 11px; background: #65e6bf; color: #113229; box-shadow: 0 3px 14px #65e6bf25; }
.brand-accent { color: var(--mint); }
.brand small { display: block; margin-top: 5px; font-size: 8.5px; font-weight: 720; color: var(--muted); letter-spacing: .135em; white-space: nowrap; }
.side-content { margin-top: 48px; }
.side-label { color: #9aa5ba; font-size: 10px; letter-spacing: .13em; font-weight: 720; padding-left: 11px; margin-bottom: 13px; }
nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; color: #b1bbce; font-size: 13.5px; font-weight: 560; transition: background .18s, color .18s, border-color .18s; }
.nav-link svg { color: #a0acc2; flex: none; }
.nav-link:hover { color: var(--ink); background: #202635; }
.nav-link.active { border-color: #315247; background: #213831; color: #87efcc; font-weight: 680; }
.nav-link.active svg { color: #87efcc; }
.sidebar-bottom { margin-top: auto; }
.owner { width: 100%; border: 0; color: var(--ink); background: transparent; text-align: left; display: flex; align-items: center; gap: 10px; padding: 13px 6px 6px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.owner:hover { background: #202635; }
.avatar { display: grid; place-items: center; border-radius: 50%; height: 34px; width: 34px; background: #30314b; border: 1px solid #44476a; color: #d4cdff; font-weight: 750; }
.owner strong, .owner small { display: block; }
.owner strong { font-size: 12.5px; }
.owner small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.owner > svg { margin-left: auto; color: var(--muted); }

.workspace { margin-left: var(--nav-width); min-height: 100vh; }
.workspace.guest { margin-left: 0; }
.workspace.guest .topbar { display: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 66px; padding: 0 32px; border-bottom: 1px solid #272e3d; background: #141824; }
.breadcrumbs, .crumb-home, .top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumbs { color: var(--muted); font-size: 13px; white-space: nowrap; }
.breadcrumbs > svg { color: #8490a6; flex: none; }
.crumb-current, .crumb-domain { color: #e3e8f2; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.main { max-width: 1650px; margin: 0 auto; padding: 25px 32px 42px; }
.main:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
h1 { font-size: clamp(27px, 2.5vw, 38px); letter-spacing: -.043em; line-height: 1.12; font-weight: 760; overflow-wrap: anywhere; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
.page-actions, .section-actions, .dialog-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.page-actions { justify-content: flex-end; flex: none; }
.btn, .compact { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 12px; border: 1px solid #333b4d; border-radius: 8px; background: #1b2130; color: #e8edf7; font-size: 12.5px; font-weight: 630; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.btn:hover, .compact:hover { background: #272f42; border-color: #515d75; }
.btn svg { flex: none; }
.btn.primary { color: #102b24; background: var(--mint); border-color: var(--mint); font-weight: 750; }
.btn.primary:hover { background: #9af4d8; border-color: #9af4d8; }
.btn.danger { color: #ffc1cc; border-color: #663c4a; background: #362330; }
.btn.danger:hover { background: #553141; }
.btn.small { min-height: 33px; }
.top-export { min-height: 34px; background: #1b2130; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; color: #aeb9ce; background: transparent; transition: color .18s, background .18s; }
.icon-btn:hover { background: #293244; color: var(--ink); }
.mobile-menu { display: none; }
.period-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-height: 23px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 690; color: #bac4d7; background: #293142; }
.badge.mint { color: #81ecc9; background: #223b36; }
.badge.rose { color: #ffa0b1; background: #3a2839; }
.badge.amber { color: #ffd494; background: #3a312a; }
.text-mint { color: var(--mint); }
.text-rose { color: var(--rose); }

.metrics { display: grid; grid-template-columns: 1.12fr repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric { display: flex; flex-direction: column; min-width: 0; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 13px 15px 12px; color: var(--ink); position: relative; overflow: hidden; }
.metric-interactive { transition: background .18s, border-color .18s; }
.metric-interactive:hover { background: #222a3a; border-color: #505d73; }
.metric.featured { border-color: #37645a; background: radial-gradient(ellipse at top right, #255348 0%, transparent 73%), #1a302e; }
.metric.featured:hover { border-color: #70c8ad; background-color: #21413a; }
.metric.featured::before { content: ""; position: absolute; width: 170px; height: 170px; top: -104px; right: -42px; border: 1px solid #72dcbc29; border-radius: 50%; box-shadow: 0 0 0 14px #72dcbc10, 0 0 0 29px #72dcbc0c, 0 0 0 44px #72dcbc08; pointer-events: none; }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; position: relative; }
.metric-icon, .overview-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #283346; color: #bcc6d9; }
.metric-icon.mint, .metric-icon.hero { background: #254139; color: #79eac8; }
.metric-icon.hero { background: #345e50; color: #9bf1d5; }
.metric-icon.violet { background: #322e4a; color: var(--violet); }
.metric-icon.rose { background: #3e2c3d; color: var(--rose); }
.metric-arrow { color: #a1abc0; padding-top: 2px; }
.featured .metric-arrow { color: #a0dac9; }
.metric-label, .metric-foot { color: #b1bed1; font-size: 12px; font-weight: 580; line-height: 1.3; position: relative; }
.metric-value { margin-top: 4px; font-size: clamp(17px, 1.79vw, 28px); font-weight: 750; letter-spacing: -.045em; line-height: 1.13; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; position: relative; }
.metric-value.hero { color: #92f4d2; }
.metric-value.rose { color: var(--rose); }
.metric-foot { margin-top: 8px; min-height: 14px; color: #a0adc2; font-size: 10.5px; font-weight: 490; }
.featured .metric-label, .featured .metric-foot { color: #badad2; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, 2.48fr) minmax(230px, 1fr); align-items: stretch; gap: 18px; margin-bottom: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 19px 15px; }
.panel-head h2 { color: #f0f3f9; line-height: 1.2; font-size: 16px; font-weight: 710; letter-spacing: -.018em; }
.panel-head p { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 5px; }
.compact { min-height: 33px; color: #dee5f2; font-size: 11.5px; }
select { color-scheme: dark; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 19px; color: #bcc6d8; font-size: 11px; line-height: 1.5; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 13px; height: 3px; border-radius: 4px; background: var(--mint); }
.legend i.purple-dot { background: var(--violet); }
.chart-body { padding: 0 10px 10px 19px; }
.chart { width: 100%; display: block; overflow: visible; height: auto; max-height: 215px; }
.chart text { fill: #a8b4c8; font-size: 11px; font-family: inherit; font-weight: 530; }
.chart-grid { stroke: #333c50; stroke-dasharray: 3 4; stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2.65; stroke-linecap: round; stroke-linejoin: round; }
.chart-income { stroke: var(--mint); }
.chart-cost { stroke: var(--violet); stroke-width: 2.25; }
.chart-point circle { fill: var(--surface); stroke-width: 2; }
.income-dot { stroke: var(--mint); }
.cost-dot { stroke: var(--violet); }
.chart-point:hover circle, .chart-point:focus-visible circle { fill: #effffb; }
.overview { display: flex; flex-direction: column; }
.overview-icon { background: #273346; color: #aabde1; }
.overview-total { display: flex; align-items: baseline; gap: 8px; padding: 0 19px; margin: 1px 0 10px; }
.overview-total strong { font-size: 36px; line-height: 1; font-weight: 740; letter-spacing: -.06em; }
.overview-total span { color: var(--muted); font-size: 12px; }
.meter { display: flex; gap: 4px; height: 7px; background: #303747; margin: 0 19px 10px; border-radius: 6px; overflow: hidden; }
.meter i { border-radius: 6px; }
.meter i.mint, .status-row i.mint { background: var(--mint); }
.meter i.rose, .status-row i.rose { background: var(--rose); }
.meter i.neutral, .status-row i.neutral { background: #a0acc0; }
.meter i.amber, .status-row i.amber { background: var(--amber); }
.status-rows { padding: 0 12px 10px; display: grid; gap: 0; }
.status-row { display: grid; grid-template-columns: 7px 1fr auto auto; gap: 9px; align-items: center; text-align: left; padding: 8px 7px; min-height: 34px; border: 0; border-bottom: 1px solid #2c3446; color: #c4cde0; background: transparent; font-size: 12px; }
.status-row:last-child { border-bottom-color: transparent; }
.status-row:hover, .status-row.selected { background: #252e40; }
.status-row i { width: 7px; height: 7px; border-radius: 50%; }
.status-row strong { color: var(--ink); }
.status-row svg { color: #9da9c1; }

.performance { scroll-margin-top: 16px; }
.performance:focus { outline-color: #4f9a85; }
.table-wrap { position: relative; overflow: auto; border-radius: 0 0 11px 11px; max-width: 100%; scrollbar-color: #536079 #1a2030; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; color: #e3e9f5; }
th { font-size: 11px; color: #aebbd1; font-weight: 660; background: #1e2534; border-block: 1px solid var(--line); }
th, td { padding: 10px 12px; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
td { border-bottom: 1px solid var(--line); font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1d2432; }
.align-right { text-align: right; }
.number { font-variant-numeric: tabular-nums; font-weight: 650; }
.domain-link { display: inline-flex; align-items: center; gap: 8px; border-radius: 6px; }
.domain-link:hover, .text-button:hover, .back-link:hover { color: #a1f5da; }
.domain-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: #243c38; color: #82eacb; flex: none; }
.domain-icon.purple { background: #302e48; color: #c0b4ff; }
.domain-link strong { font-size: 12.5px; font-weight: 680; }
.domain-link small { display: block; color: var(--muted); }
.empty { display: grid; justify-items: center; text-align: center; padding: 32px 16px; color: var(--muted); gap: 10px; }
.empty svg { color: var(--violet); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.back-link, .text-button { display: inline-flex; align-items: center; gap: 7px; color: #89e5c9; font-weight: 650; }
.back-link { margin-bottom: 13px; }
.text-button { padding: 0; border: 0; background: transparent; text-align: left; }
.panel-content { padding: 17px 19px; }
.panel-content + .table-wrap { border-radius: 0; }
.panel-content .fields { max-width: 610px; }
.adsense-month-nav { display: grid; grid-template-columns: 38px minmax(140px, auto) 38px; gap: 5px; }
.month-step { padding: 0; }
.month-step[data-month-step="previous"] svg { transform: rotate(180deg); }
.month-step:disabled { opacity: .45; cursor: not-allowed; }
.month-step:disabled:hover { background: #1b2130; border-color: #333b4d; }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.month-grid button { min-height: 42px; }
.month-grid button[aria-current] { color: var(--mint); border-color: #4c8f7e; background: #223b36; }
.final-value { display: block; font-size: 18px; font-weight: 740; padding: 4px 0; }
.login-panel { max-width: 450px; margin: 54px auto; }
.login-panel .panel-content { padding: 26px; }
.login-panel h1 { font-size: 26px; margin-top: 27px; }
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }
.password-toggle { align-self: stretch; }
.login-panel p { color: var(--muted); margin: 8px 0 20px; line-height: 1.5; }

dialog { max-height: min(92dvh, 860px); width: min(570px, calc(100vw - 28px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid #444f65; border-radius: 14px; box-shadow: 0 22px 80px #050710c9; overflow: auto; }
dialog:has(.month-picker) { width: 400px; max-width: calc(100vw - 28px); }
dialog::backdrop { background: #080b14b5; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 19px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; letter-spacing: -.025em; }
.dialog-body { padding: 18px 19px; }
.dialog-body > p { margin-bottom: 12px; }
.dialog-actions { justify-content: flex-end; margin-top: 16px; }
.dialog-separator { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.wide { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; color: #d4deee; font-size: 12px; font-weight: 650; min-width: 0; margin: 0; }
input:not([type="checkbox"]), select, textarea { min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid #3b455b; border-radius: 7px; background: #111624; color: var(--ink); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #929eb4; opacity: 1; }
input:disabled, select:disabled { opacity: .65; cursor: not-allowed; }
select.compact, input.compact { min-height: 33px; padding: 5px 8px; background: #1e2534; color: #dbe4f3; }
select.compact { padding-right: 7px; }
table input[data-money] { width: min(185px, 100%); }
input[type="checkbox"] { accent-color: var(--mint); width: 15px; height: 15px; margin: 0; flex: none; }
.check-line { display: flex; align-items: center; gap: 9px; margin-top: 14px; line-height: 1.5; }
.form-hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0; }
.form-error { margin: 10px 0 0; color: #ffc1cc; background: #3b2330; padding: 9px 11px; border-radius: 7px; line-height: 1.45; }
.recipients { border: 1px solid #3b455b; border-radius: 8px; min-width: 0; padding: 8px 10px; }
.recipients legend { color: #d4deee; font-size: 12px; font-weight: 650; }
.allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, 135px); min-height: 30px; align-items: center; gap: 9px; }
.allocation-row + .allocation-row { margin-top: 5px; }
.allocation-row label { display: flex; align-items: center; overflow-wrap: anywhere; gap: 7px; }
.allocation-preview { border-radius: 8px; padding: 10px; background: #202b37; color: #c7d4e8; font-size: 12px; }
.allocation-preview strong { color: var(--ink); display: block; margin-bottom: 5px; }
.allocation-preview div { display: flex; justify-content: space-between; gap: 9px; margin-top: 3px; }
.allocation-preview p { color: var(--muted); margin-top: 5px; }
.detail-line { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dialog-amount { font-size: 29px; display: block; margin: 10px 0 0; letter-spacing: -.035em; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.audit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.audit-grid h3 { font-size: 13px; }
.audit-grid pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #c8d4e6; padding: 8px; background: #111624; border-radius: 7px; font-size: 11px; }
.toast { position: fixed; bottom: 22px; right: 22px; max-width: min(410px, calc(100vw - 30px)); display: flex; align-items: center; gap: 9px; padding: 13px 15px; color: var(--ink); border: 1px solid #3c6359; background: #233931; border-radius: 9px; z-index: 10; box-shadow: 0 10px 30px #06081280; }
.toast svg { color: var(--mint); flex: none; }
.scrim { position: fixed; inset: 0; padding: 0; border: 0; background: #090e19ad; z-index: 4; }
@media (max-width: 1250px) {
    :root { --nav-width: 214px; }
    .main, .topbar { padding-inline: 24px; }
    .metrics { gap: 9px; }
    .metric { padding-inline: 12px; }
}
@media (max-width: 1060px) {
    :root { --nav-width: 193px; }
    .sidebar { padding-inline: 12px; }
    .nav-link { font-size: 12px; gap: 8px; }
    .main, .topbar { padding-inline: 19px; }
    .analysis-grid { gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr); }
    .metric-foot { padding-right: 0; }
}
@media (max-width: 900px) {
    :root { --nav-width: 237px; }
    .workspace { margin-left: 0; }
    .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; padding-inline: 17px; }
    .sidebar.open { transform: translateX(0); visibility: visible; }
    .mobile-menu { display: inline-grid; margin-left: -6px; }
    .nav-link { font-size: 13.5px; gap: 11px; }
    .metric-value { font-size: clamp(18px, 2.55vw, 26px); }
}
@media (max-width: 660px) {
    .topbar { height: 56px; }
    .main, .topbar { padding-inline: 14px; }
    .main { padding-top: 22px; }
    .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
    .page-actions { justify-content: flex-start; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
    .metric.featured, .detail-metrics .metric:first-child { grid-column: 1 / -1; }
    .metric-value { font-size: 22px; }
    .metric.featured .metric-value { font-size: 28px; }
    .analysis-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; margin-bottom: 14px; }
    .panel-head { padding-inline: 12px; }
    .performance .panel-head, .adsense-panel > .panel-head { flex-wrap: wrap; }
    .performance :is(th, td):nth-child(n+2):nth-child(-n+5), .performance :is(th, td):last-child { display: none; }
    .performance .table-wrap td { padding-block: 13px; }
    .legend, .overview-total { padding-inline: 12px; }
    .meter { margin-inline: 12px; }
    .chart-body { padding: 0 9px 9px 12px; }
    .chart text { font-size: 16px; }
    .chart-line { stroke-width: 3.3; }
    .chart-grid { stroke-width: 1.2; }
    .section-actions { gap: 6px; }
    th:first-child, td:first-child { padding-left: 12px; }
    th:last-child, td:last-child { padding-right: 12px; }
    .crumb-home span, .crumb-domain { display: none; }
    .crumb-current:has(+ svg) + svg { display: none; }
    .owner { min-height: 50px; }
}
@media (max-width: 380px) {
    .adsense-month-nav { grid-template-columns: 34px minmax(132px, auto) 34px; gap: 4px; }
    .btn { gap: 5px; padding-inline: 8px; }
    .top-export { width: 36px; }
    .top-export span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}



