:root {
    --ink: #18181b;
    --ink-soft: #3f3f46;
    --muted: #71717a;
    --muted-light: #a1a1aa;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --surface: #ffffff;
    --surface-muted: #fafafa;
    --canvas: #f6f6f7;
    --accent: #5e6ad2;
    --accent-dark: #4f5bc2;
    --accent-soft: #eff0ff;
    --visitor: #3b82f6;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --success: #16845b;
    --success-soft: #ebf8f2;
    --warning: #9a6700;
    --warning-soft: #fff8e6;
    --sidebar: #111113;
    --sidebar-raised: #19191c;
    --sidebar-line: rgba(255, 255, 255, 0.09);
    --sidebar-ink: #f4f4f5;
    --sidebar-muted: #a1a1aa;
    --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
    --shadow-md: 0 12px 32px rgba(24, 24, 27, 0.09);
    font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    min-width: 320px;
    background: var(--canvas);
}

body {
    color: var(--ink);
    background: var(--canvas);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
strong,
b {
    font-weight: 650;
}

h1 {
    font-size: clamp(24px, 3vw, 29px);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.22);
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 12px;
    padding: 9px 12px;
    border-radius: 6px;
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Login */

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
    color: var(--sidebar-ink);
    background: #09090b;
}

.auth-shell {
    display: grid;
    width: min(1060px, 100%);
    min-height: 620px;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.74fr);
    overflow: hidden;
    border: 1px solid var(--sidebar-line);
    border-radius: 12px;
    background: var(--sidebar);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.auth-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(42px, 7vw, 76px);
}

.auth-intro-label {
    margin: 0 0 22px;
    color: #9da7ff;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.16em;
}

.auth-intro h2 {
    max-width: 550px;
    margin: 0;
    color: #fafafa;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 560;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.auth-intro > p:not(.auth-intro-label) {
    max-width: 500px;
    margin: 24px 0 0;
    color: var(--sidebar-muted);
    font-size: 15px;
    line-height: 1.7;
}

.auth-proof-list {
    display: grid;
    margin: 52px 0 0;
    border-top: 1px solid var(--sidebar-line);
}

.auth-proof-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--sidebar-line);
}

.auth-proof-list dt,
.auth-proof-list dd {
    margin: 0;
    font-size: 12px;
}

.auth-proof-list dt {
    color: var(--sidebar-muted);
}

.auth-proof-list dd {
    color: #e4e4e7;
    font-variant-numeric: tabular-nums;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 38px;
    color: var(--ink);
    background: #f7f7f8;
}

.login-card {
    width: min(100%, 390px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.brand {
    gap: 10px;
    color: inherit;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.brand-mark,
.brand--compact .brand-mark {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 6px;
    color: #fff;
    background: #676fd5;
    box-shadow: none;
    font-size: 12px;
    font-weight: 750;
}

.login-heading {
    margin: 38px 0 25px;
}

.login-heading h1 {
    font-size: 27px;
}

.login-heading > p:last-child,
.error-card > p:last-of-type {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.login-form {
    gap: 16px;
}

.login-form .button {
    width: 100%;
    margin-top: 2px;
}

.security-note {
    margin: 21px 0 0;
    color: var(--muted-light);
    font-size: 11px;
}

.error-card .eyebrow {
    margin-top: 36px;
}

.error-card .button {
    width: 100%;
    margin-top: 18px;
}

/* Application frame */

.app-frame {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    width: 248px;
    flex-direction: column;
    padding: 16px 12px 14px;
    border-right: 1px solid var(--sidebar-line);
    color: var(--sidebar-ink);
    background: var(--sidebar);
}

.sidebar-header {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
}

.brand--compact {
    min-width: 0;
}

.brand-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.brand-copy strong,
.brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy strong {
    color: #fafafa;
    font-size: 13px;
}

.brand-copy small {
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 500;
}

.sidebar-close {
    display: none;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid var(--sidebar-line);
    border-radius: 5px;
    color: var(--sidebar-muted);
    background: transparent;
    font-size: 11px;
    cursor: pointer;
}

.workspace-switcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 14px 0 21px;
    padding: 10px;
    border: 1px solid var(--sidebar-line);
    border-radius: 7px;
    background: var(--sidebar-raised);
}

.workspace-avatar,
.account-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 6px;
    color: #e4e4e7;
    background: #252529;
    font-size: 9px;
    font-weight: 700;
}

.workspace-avatar {
    width: 28px;
    height: 28px;
}

.workspace-switcher > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.workspace-switcher small,
.workspace-switcher strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-switcher small {
    color: var(--sidebar-muted);
    font-size: 9px;
}

.workspace-switcher strong {
    color: #f4f4f5;
    font-size: 12px;
}

.workspace-state {
    color: #86efac;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.primary-nav {
    display: grid;
    gap: 3px;
}

.nav-section-label {
    margin: 0 0 7px;
    padding: 0 10px;
    color: #71717a;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.primary-nav a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #c4c4cc;
    text-decoration: none;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.primary-nav a > span {
    overflow: hidden;
    font-size: 12px;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.primary-nav a > small {
    color: #63636b;
    font-size: 9px;
}

.primary-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}

.primary-nav a[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.075);
    color: #fff;
    background: #242428;
}

.primary-nav a[aria-current="page"] > small {
    color: #9da7ff;
}

.sidebar-spacer {
    flex: 1 1 auto;
}

.sidebar-status {
    display: grid;
    gap: 4px;
    margin: 0 4px 12px;
    padding: 12px;
    border: 1px solid var(--sidebar-line);
    border-radius: 7px;
}

.sidebar-status span,
.sidebar-status small {
    color: var(--sidebar-muted);
    font-size: 10px;
}

.sidebar-status strong {
    color: #d1fae5;
    font-size: 12px;
}

.sidebar-account {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 12px 7px 0;
    border-top: 1px solid var(--sidebar-line);
}

.account-avatar {
    width: 27px;
    height: 27px;
    border-radius: 50%;
}

.account-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.account-copy strong,
.account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong {
    color: #e4e4e7;
    font-size: 11px;
}

.account-copy small {
    color: var(--sidebar-muted);
    font-size: 9px;
}

.sidebar-logout {
    min-height: 27px;
    padding: 0 7px;
    border: 1px solid var(--sidebar-line);
    border-radius: 5px;
    color: var(--sidebar-muted);
    background: transparent;
    font-size: 9px;
    cursor: pointer;
}

.sidebar-logout:hover,
.sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.app-workspace {
    min-width: 0;
    min-height: 100vh;
    margin-left: 248px;
}

.workspace-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.workspace-context {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.workspace-context span {
    color: var(--muted-light);
}

.workspace-context i {
    color: #d4d4d8;
    font-style: normal;
}

.workspace-context strong {
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-topbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-status {
    padding: 4px 7px;
    border: 1px solid #cce9dc;
    border-radius: 5px;
    color: var(--success);
    background: var(--success-soft);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.signed-in-user {
    max-width: 220px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-toggle {
    display: none;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--ink-soft);
    background: var(--surface);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-backdrop {
    display: none;
}

.dashboard-shell {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 30px clamp(22px, 3vw, 38px) 64px;
}

/* Shared controls */

.eyebrow,
.panel-label {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.13em;
}

.button {
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 620;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.button--primary {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    box-shadow: 0 1px 2px rgba(51, 60, 150, 0.2);
}

.button--primary:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.button--ghost {
    min-height: 34px;
    border-color: var(--line-strong);
    color: var(--ink-soft);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.button--ghost:hover {
    border-color: #c7c7cc;
    background: var(--surface-muted);
}

.button--danger {
    border-color: #f3c6c1;
    color: var(--danger);
    background: var(--danger-soft);
}

.button--danger:hover {
    border-color: #eaa9a2;
    background: #ffe8e5;
}

.alert {
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.55;
}

.alert--error {
    border-color: #f3c6c1;
    color: var(--danger);
    background: var(--danger-soft);
}

.alert--success {
    border-color: #c6e8d9;
    color: var(--success);
    background: var(--success-soft);
}

.page-heading {
    gap: 28px;
    margin-bottom: 22px;
}

.page-heading p:last-child {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.page-heading--compact {
    margin-bottom: 20px;
}

.breadcrumb {
    margin-bottom: 17px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.heading-actions {
    gap: 7px;
}

.site-title-line {
    gap: 10px;
}

.analytics-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card-heading {
    gap: 20px;
    margin-bottom: 20px;
}

.card-heading h2,
.data-management-card h2,
.settings-guide h2 {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.card-heading p:last-child,
.data-management-card p,
.settings-guide p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.card-heading > a:not(.button) {
    color: var(--accent);
    font-size: 11px;
    font-weight: 650;
}

/* Metrics and layout */

.metric-strip {
    gap: 0;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.metric-card {
    min-width: 0;
    padding: 18px 19px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
}

.metric-card:last-child {
    border-right: 0;
}

.metric-card p {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.metric-card > strong {
    margin-top: 9px;
    color: var(--ink);
    font-size: 27px;
}

.metric-card > span,
.metric-card > small {
    margin-top: 5px;
    color: var(--muted-light);
    font-size: 10px;
}

.metric-card .metric-delta {
    margin-top: 11px;
    color: var(--success);
    font-weight: 650;
}

.metric-card .metric-delta--down {
    color: var(--warning);
}

.compact-metrics {
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.compact-metrics > div {
    min-width: 0;
    padding: 14px 17px;
    border-right: 1px solid var(--line);
}

.compact-metrics span {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
}

.compact-metrics strong {
    flex: 0 0 auto;
    font-size: 16px;
}

.analytics-grid {
    gap: 14px;
    margin-bottom: 14px;
}

.analytics-grid--wide {
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
}

.sites-preview,
.recent-events-card,
.data-management-card,
.site-trend-card,
.apache-detail-grid,
.source-card {
    margin-top: 14px;
}

.freshness,
.source-note {
    color: var(--muted-light);
    font-size: 10px;
}

.freshness {
    max-width: 190px;
}

.source-note {
    margin-top: 16px;
    line-height: 1.55;
}

/* Charts */

.line-chart {
    min-height: 260px;
    padding: 0 34px 20px;
}

.line-chart--large {
    min-height: 286px;
}

.line-chart--interactive {
    border-radius: 6px;
}

.chart-grid-line {
    stroke: #ededf0;
}

.chart-line {
    stroke-width: 2.25;
}

.chart-line--visitors,
.chart-line--human {
    stroke-width: 2;
}

.chart-line--visitors {
    stroke-dasharray: 6 5;
}

.chart-line--bots {
    stroke: #d97706;
    stroke-width: 2;
    stroke-dasharray: 6 5;
}

.chart-hover-point {
    stroke-width: 2.5;
}

.chart-tooltip {
    min-width: 190px;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #2f2f34;
    border-radius: 7px;
    color: #f4f4f5;
    background: #18181b;
    box-shadow: 0 14px 32px rgba(24, 24, 27, 0.24);
    font-size: 11px;
}

.chart-tooltip > strong {
    color: #fff;
    font-size: 12px;
}

.chart-tooltip-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    color: #a1a1aa;
}

.chart-tooltip-row b {
    color: #fff;
    font-size: 12px;
}

.chart-tooltip-swatch {
    width: 7px;
    height: 7px;
}

.chart-legend {
    gap: 14px;
    margin: -2px 0 11px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.legend-dot {
    width: 16px;
    height: 2px;
}

.legend-dot--bots {
    background: #d97706;
}

.axis-value,
.chart-labels {
    color: var(--muted-light);
    font-size: 9px;
}

.axis-value--bottom {
    bottom: 31px;
}

/* Lists and tables */

.ranking-list,
.bar-list,
.device-list,
.daily-bars {
    gap: 13px;
}

.ranking-row {
    grid-template-columns: minmax(96px, 0.9fr) minmax(74px, 1fr) auto;
    gap: 10px;
    padding: 3px 0;
}

.ranking-label strong {
    color: var(--ink-soft);
    font-size: 11px;
}

.ranking-label small {
    color: var(--muted-light);
    font-size: 9px;
}

.ranking-value {
    font-size: 11px;
}

progress,
progress::-webkit-progress-bar {
    height: 5px;
    background: #ececf0;
}

.empty-note {
    color: var(--muted);
    font-size: 11px;
}

.empty-state {
    padding: 46px 18px;
}

.empty-state h3 {
    font-size: 15px;
}

.empty-state p {
    margin: 8px 0 18px;
    font-size: 12px;
}

.table-wrap {
    margin: 0 -22px -22px;
}

.data-table {
    font-size: 11px;
}

.data-table th,
.data-table td {
    padding: 11px 14px;
    border-bottom-color: #ededf0;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 22px;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 22px;
}

.data-table th {
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 9px;
    font-weight: 700;
}

.data-table tbody tr:hover td {
    background: #f8f8fa;
}

.data-table small {
    color: var(--muted-light);
    font-size: 9px;
}

.table-primary,
.table-action a {
    color: var(--ink-soft);
    font-weight: 650;
}

.table-action a {
    color: var(--accent);
    font-size: 10px;
}

.status-badge,
.event-badge {
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
}

.status-badge--active {
    border-color: #c6e8d9;
    color: var(--success);
    background: var(--success-soft);
}

.status-badge--paused,
.event-badge {
    border-color: #dedee2;
    color: #61616a;
    background: #f2f2f4;
}

.directory-card .table-wrap,
.sites-preview .table-wrap,
.recent-events-card .table-wrap,
.source-card .table-wrap,
.apache-detail-grid .table-wrap {
    border-top: 1px solid var(--line);
}

/* Forms */

.field {
    gap: 7px;
}

.field label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 650;
}

.field input,
.field textarea,
.field select,
.search-field input,
.log-filter-form select {
    border-color: var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: var(--surface);
}

.field input,
.field select {
    height: 40px;
    padding: 0 11px;
}

.field textarea {
    min-height: 124px;
    padding: 11px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-field input:focus,
.log-filter-form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.13);
}

.field small {
    color: var(--muted);
    font-size: 10px;
}

.search-field input {
    width: min(300px, 42vw);
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
}

.settings-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.75fr);
    gap: 14px;
}

.form-grid {
    gap: 18px;
}

.check-list {
    gap: 9px;
    margin-top: 17px;
    padding-left: 18px;
    color: var(--muted);
    font-size: 11px;
    list-style: disc;
}

.check-list li {
    padding-left: 0;
}

.check-list li::before {
    content: none;
}

.check-list li::marker {
    color: var(--accent);
}

.tracking-install-card {
    margin-bottom: 14px;
    border-color: #d9daf4;
}

.form-actions {
    align-self: end;
    align-items: center;
    gap: 7px;
}

.form-actions .button {
    align-self: center;
}

pre {
    padding: 14px;
    border-color: #29292e;
    border-radius: 6px;
    color: #dcdcf8;
    background: #17171a;
    font-size: 11px;
}

.custom-event-help summary {
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 650;
}

.period-toolbar {
    min-height: 42px;
    gap: 4px;
    margin: 19px 0 13px;
    padding: 4px 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.period-toolbar > span:first-child {
    margin: 0 6px;
    font-size: 10px;
    font-weight: 600;
}

.period-toolbar a {
    padding: 6px 9px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 650;
}

.period-toolbar a:hover {
    color: var(--ink-soft);
    background: var(--surface-muted);
}

.period-toolbar a.is-active {
    background: var(--accent);
}

.period-date {
    padding-right: 7px;
    color: var(--muted-light);
    font-size: 9px;
}

.bar-row {
    grid-template-columns: minmax(100px, 1.3fr) minmax(62px, 1fr) auto;
    gap: 9px;
}

.bar-row strong {
    color: var(--ink-soft);
    font-size: 10px;
}

.bar-row div > span {
    color: var(--muted-light);
    font-size: 9px;
}

.bar-row b,
.device-row {
    font-size: 10px;
}

.data-management-card {
    gap: 28px;
    margin-bottom: 18px;
}

/* Apache */

.log-filter-form {
    grid-template-columns: auto minmax(210px, 330px) auto;
    gap: 7px;
}

.log-filter-form label {
    font-size: 10px;
    font-weight: 650;
}

.log-filter-form select {
    height: 34px;
    padding: 0 32px 0 10px;
    font-size: 11px;
}

.quality-banner {
    gap: 11px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-color: #c6e8d9;
    border-radius: 7px;
    color: #176747;
    background: var(--success-soft);
    font-size: 11px;
}

.quality-banner--warning {
    border-color: #ead59f;
    color: #7a5512;
    background: var(--warning-soft);
}

.quality-stats > div {
    padding: 11px 0;
    border-bottom-color: #ededf0;
}

.quality-stats dt {
    color: var(--muted);
    font-size: 10px;
}

.quality-stats dd {
    font-size: 11px;
    font-weight: 650;
}

.source-card code {
    font-size: 9px;
}

@media (max-width: 1120px) {
    .metric-card:nth-child(2),
    .compact-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .metric-card:nth-child(-n + 2),
    .compact-metrics > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .analytics-grid--wide,
    .analytics-grid--three,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-card {
        grid-row: auto;
    }
}

@media (max-width: 860px) {
    .app-sidebar {
        width: min(276px, calc(100vw - 44px));
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .is-nav-open {
        overflow: hidden;
    }

    .is-nav-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.24);
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 25;
        inset: 0;
        display: block;
        border: 0;
        opacity: 0;
        visibility: hidden;
        background: rgba(9, 9, 11, 0.45);
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .is-nav-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .app-workspace {
        margin-left: 0;
    }

    .workspace-topbar {
        padding: 0 18px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
    }

    .workspace-context {
        flex: 1 1 auto;
    }

    .dashboard-shell {
        padding-top: 24px;
    }
}

@media (max-width: 680px) {
    .auth-page {
        padding: 0;
        background: #f7f7f8;
    }

    .auth-shell {
        min-height: 100vh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        background: #f7f7f8;
        box-shadow: none;
    }

    .auth-intro {
        display: none;
    }

    .auth-panel {
        padding: 24px;
    }

    .page-heading,
    .site-detail-heading,
    .data-management-card,
    .card-heading {
        display: grid;
    }

    .page-heading {
        gap: 16px;
    }

    .heading-actions {
        justify-content: flex-start;
    }

    .freshness {
        max-width: none;
        text-align: left;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--full {
        grid-column: auto;
    }

    .directory-toolbar .search-field,
    .search-field input {
        width: 100%;
    }

    .log-filter-form {
        width: 100%;
        grid-template-columns: 1fr auto;
    }

    .log-filter-form label {
        grid-column: 1 / -1;
    }

    .quality-banner {
        display: grid;
    }

    .workspace-topbar-meta .signed-in-user {
        display: none;
    }
}

@media (max-width: 520px) {
    .workspace-topbar {
        gap: 10px;
        padding: 0 12px;
    }

    .workspace-context span,
    .workspace-context i,
    .topbar-status {
        display: none;
    }

    .dashboard-shell {
        width: 100%;
        padding: 20px 12px 48px;
    }

    .metric-strip,
    .compact-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card,
    .metric-card:nth-child(2),
    .compact-metrics > div,
    .compact-metrics > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .metric-card:last-child,
    .compact-metrics > div:last-child {
        border-bottom: 0;
    }

    .analytics-card {
        padding: 17px;
    }

    .table-wrap {
        margin: 0 -17px -17px;
    }

    .data-table th:first-child,
    .data-table td:first-child {
        padding-left: 17px;
    }

    .data-table th:last-child,
    .data-table td:last-child {
        padding-right: 17px;
    }

    .period-toolbar {
        flex-wrap: wrap;
    }

    .period-date {
        width: 100%;
        margin: 4px 6px 2px;
        padding: 0;
    }

    .line-chart {
        min-height: 225px;
        padding: 0 20px 18px 27px;
    }

    .line-chart svg,
    .line-chart--large svg {
        height: 195px;
    }

    .chart-legend {
        justify-content: flex-start;
    }

    .ranking-row {
        grid-template-columns: minmax(86px, 1fr) 62px auto;
    }

    .bar-row {
        grid-template-columns: minmax(86px, 1fr) 54px auto;
    }

    .login-card {
        padding: 28px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
