:root {
    --radius: 0.625rem;
    --background: oklch(1 0 0);
    --foreground: oklch(0.145 0 0);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.97 0 0);
    --secondary-foreground: oklch(0.205 0 0);
    --muted: oklch(0.97 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --accent: oklch(0.97 0 0);
    --accent-foreground: oklch(0.205 0 0);
    --destructive: oklch(0.577 0.245 27.325);
    --border: oklch(0.922 0 0);
    --input: oklch(0.922 0 0);
    --ring: oklch(0.708 0 0);
    --sidebar: oklch(0.985 0 0);
    --sidebar-foreground: oklch(0.145 0 0);
    --sidebar-accent: oklch(0.97 0 0);
    --sidebar-border: oklch(0.922 0 0);
    --ok: oklch(0.596 0.145 163.225);
    --ok-soft: oklch(0.979 0.021 166.113);
    --ok-border: oklch(0.905 0.093 164.15);
    --soon: oklch(0.666 0.179 58.318);
    --soon-soft: oklch(0.987 0.022 95.277);
    --soon-border: oklch(0.924 0.12 95.746);
    --late: oklch(0.577 0.245 27.325);
    --late-soft: oklch(0.971 0.013 17.38);
    --late-border: oklch(0.885 0.062 18.334);
    --unknown: oklch(0.554 0.046 257.417);
    --unknown-soft: oklch(0.968 0.007 247.896);
    --unknown-border: oklch(0.929 0.013 255.508);
    --sky-50: oklch(0.977 0.013 236.62);
    --sky-100: oklch(0.951 0.026 236.824);
    --sky-600: oklch(0.588 0.158 241.966);
    --chart-change: oklch(0.685 0.169 237.323);
    --chart-visit: oklch(0.696 0.17 162.48);
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--foreground);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: inherit; }
img { display: block; max-width: 100%; }
table { border-collapse: collapse; }
button, input, select { font: inherit; color: inherit; }

.icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.size-3 { width: 0.75rem; height: 0.75rem; }
.size-5 { width: 1.25rem; height: 1.25rem; }
.size-10 { width: 2.5rem; height: 2.5rem; }
.size-12 { width: 3rem; height: 3rem; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.025em; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.muted { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.tabular { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.card-content.center { align-items: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-xs { display: flex; flex-direction: column; gap: 0.125rem; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.min-w-0 { min-width: 0; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.separator { border-top-width: 1px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    background: var(--primary);
    color: var(--primary-foreground);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .checkbox:focus-visible {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent);
}
.btn-outline {
    background: var(--background);
    color: var(--foreground);
    border-width: 1px;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 2rem; padding: 0 0.75rem; gap: 0.375rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.label { font-size: 0.875rem; font-weight: 500; line-height: 1; }
.label-xs { font-size: 0.75rem; font-weight: 500; line-height: 1; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field-xs { display: flex; flex-direction: column; gap: 0.375rem; }

.input, .select {
    display: flex;
    width: 100%;
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    border-width: 1px;
    border-color: var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--muted-foreground); }
.select { appearance: auto; padding-right: 0.5rem; }
.checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--primary);
    border-radius: 4px;
}
.check-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }

.card {
    background: var(--card);
    color: var(--card-foreground);
    border-width: 1px;
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    overflow: hidden;
}
.card-header { padding: 1.25rem 1.5rem 0; }
.card-title { font-size: 1rem; font-weight: 600; line-height: 1.5rem; }
.card-description { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.375rem; }
.card-content { padding: 1.25rem 1.5rem; }

.alert {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.625rem 0.75rem;
    border-width: 1px;
    border-radius: var(--radius);
    font-size: 0.875rem;
}
.alert-error { color: var(--destructive); background: var(--late-soft); border-color: var(--late-border); }
.alert-info { color: var(--foreground); background: var(--muted); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    padding: 0.125rem 0.5rem;
    border-width: 1px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}
.badge-on-time { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.badge-due-soon { color: var(--soon); background: var(--soon-soft); border-color: var(--soon-border); }
.badge-overdue { color: var(--late); background: var(--late-soft); border-color: var(--late-border); }
.badge-unknown { color: var(--unknown); background: var(--unknown-soft); border-color: var(--unknown-border); }
.badge-outline { color: var(--foreground); background: transparent; }

.table-wrap { width: 100%; overflow-x: auto; border-width: 1px; border-radius: var(--radius); background: var(--card); }
.table { width: 100%; font-size: 0.875rem; }
.table th {
    height: 2.5rem;
    padding: 0 0.75rem;
    text-align: left;
    font-weight: 500;
    color: var(--muted-foreground);
    white-space: nowrap;
    border-bottom-width: 1px;
}
.table td { padding: 0.625rem 0.75rem; vertical-align: middle; border-bottom-width: 1px; }
.table tbody tr:last-child td { border-bottom-width: 0; }
.table tbody tr:hover { background: color-mix(in oklch, var(--muted) 50%, transparent); }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-end { justify-content: flex-end; }
.table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted-foreground); font-size: 0.875rem; }

.auth { display: flex; min-height: 100vh; }
.auth-image { display: none; position: relative; overflow: hidden; }
.auth-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-panel { position: relative; display: flex; width: 100%; align-items: center; justify-content: center; padding: 2rem; background: var(--background); }
.corner-action { position: absolute; top: 1rem; right: 1rem; }
.auth-box { width: 100%; max-width: 28rem; display: flex; flex-direction: column; gap: 2rem; }
.auth-logo { margin: 0 auto; max-width: 200px; height: auto; align-self: center; object-fit: contain; }
@media (min-width: 1024px) {
    .auth-image { display: block; width: 50%; }
    .auth-panel { width: 50%; }
}

.public {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, var(--sky-50), var(--background) 60%);
}
.public-column { width: 100%; max-width: 28rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.public-wide { max-width: 48rem; }
.public-column > .card { width: 100%; }
.public-logo { height: 4rem; width: auto; align-self: center; object-fit: contain; }
.powered { font-size: 11px; letter-spacing: 0.025em; color: var(--muted-foreground); }

.state-header { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem 1rem; text-align: center; }
.state-on-time { background: var(--ok-soft); color: var(--ok); }
.state-due-soon { background: var(--soon-soft); color: var(--soon); }
.state-overdue { background: var(--late-soft); color: var(--late); }
.state-unknown { background: var(--unknown-soft); color: var(--unknown); }
.state-header .hint { color: var(--muted-foreground); font-size: 0.875rem; max-width: 22rem; }

.info-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.info-row > .icon { margin-top: 0.15rem; color: var(--muted-foreground); }
.info-row .info-label { font-size: 0.75rem; color: var(--muted-foreground); }
.info-row .info-value { font-size: 0.875rem; font-weight: 500; }
.info-row .info-extra { font-size: 0.75rem; color: var(--muted-foreground); }

.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom-width: 1px; }
.timeline-item:last-child { border-bottom-width: 0; }
.timeline-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--muted);
    color: var(--muted-foreground);
    flex-shrink: 0;
}

.app { display: flex; min-height: 100vh; background: var(--sidebar); }
.sidebar {
    display: none;
    flex-direction: column;
    width: 16rem;
    flex-shrink: 0;
    background: var(--sidebar);
    color: var(--sidebar-foreground);
}
.sidebar-header { padding: 1rem; border-bottom-width: 1px; border-color: var(--sidebar-border); }
.sidebar-header img { height: 3.5rem; width: auto; max-width: 100%; object-fit: contain; }
.sidebar-content { flex: 1; min-height: 0; overflow: auto; }
.sidebar-group { padding: 0 0.5rem; margin-top: 0.5rem; }
.sidebar-group-label { padding: 0 0.25rem; margin-bottom: 0.25rem; font-size: 11px; font-weight: 500; color: color-mix(in oklch, var(--muted-foreground) 60%, transparent); }
.sidebar-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    height: 2rem;
    padding: 0.5rem;
    overflow: hidden;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    text-align: left;
    color: var(--sidebar-foreground);
    cursor: pointer;
    transition: background-color 0.15s;
}
.sidebar-button:hover, .sidebar-button[data-active="true"], .user-menu[open] > .sidebar-button { background: var(--sidebar-accent); }
.sidebar-button[data-active="true"] { font-weight: 500; }
.sidebar-button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-button-lg { height: 3rem; }
.sidebar-footer { padding: 0.5rem; }
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}
.user-menu { position: relative; }
.user-menu > summary { list-style: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.user-name { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-scope { font-size: 0.75rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-right { margin-left: auto; }
.badge-xs { font-size: 10px; padding: 0 0.375rem; margin-top: 0.125rem; }

.dropdown {
    position: absolute;
    z-index: 50;
    min-width: 8rem;
    padding: 0.25rem;
    border-width: 1px;
    border-radius: calc(var(--radius) - 2px);
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.dropdown-top { left: 0; right: 0; bottom: calc(100% + 0.25rem); }
.dropdown-label { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.375rem 0.5rem; }
.dropdown-separator { height: 1px; margin: 0.25rem -0.25rem; background: var(--border); }
.dropdown-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.875rem;
    text-align: left;
    background: transparent;
    cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--accent); outline: none; }

.sidebar-backdrop { display: none; }
.inset { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--background); }
.topbar { display: flex; align-items: center; gap: 0.75rem; height: 3.5rem; padding: 0 1rem; border-bottom-width: 1px; }
.btn-icon-7 { width: 1.75rem; height: 1.75rem; padding: 0; }
.page { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) {
    .sidebar { display: flex; position: sticky; top: 0; height: 100vh; }
    .app[data-sidebar="collapsed"] .sidebar { display: none; }
    .inset { margin: 0.5rem 0.5rem 0.5rem 0; border-radius: calc(var(--radius) + 4px); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); overflow: hidden; }
    .app[data-sidebar="collapsed"] .inset { margin-left: 0.5rem; }
}
@media (max-width: 767px) {
    .page { padding: 1rem; }
    .app[data-sidebar-mobile="open"] .sidebar {
        display: flex;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: 18rem;
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    }
    .app[data-sidebar-mobile="open"] .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / 0.5); }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    border-width: 1px;
    border-radius: var(--radius);
    background: color-mix(in oklch, var(--muted) 30%, transparent);
}
.filters-grid { flex: 1 1 32rem; min-width: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.filters-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.filters-check { height: 2.25rem; }
@media (max-width: 767px) {
    .filters { flex-direction: column; align-items: stretch; }
    .filters-grid { flex: none; }
    .filters-actions > * { flex: 1; }
}



.size-3-5 { width: 0.875rem; height: 0.875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.break-all { word-break: break-all; }
.btn-icon-sm { width: 2rem; height: 2rem; padding: 0; }
.btn-square { font-variant-numeric: tabular-nums; }
.select-sm { height: 2rem; width: auto; padding: 0 0.5rem; border-radius: calc(var(--radius) - 4px); }

.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.pagination .row { gap: 0.75rem; }
.pagination .pager-buttons { gap: 0.25rem; }

.dialog {
    margin: auto;
    width: min(28rem, calc(100% - 2rem));
    padding: 1.5rem;
    border-width: 1px;
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    white-space: normal;
    text-align: left;
}
.dialog:popover-open { display: flex; flex-direction: column; gap: 1rem; }
.dialog::backdrop { background: rgb(0 0 0 / 0.5); }
.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    padding: 0;
    background: transparent;
    border-radius: 0.125rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 150ms;
}
.dialog-close:hover { opacity: 1; }
.dialog-close:focus-visible { opacity: 1; outline: 2px solid var(--ring); outline-offset: 2px; }
.dialog-header { display: flex; flex-direction: column; gap: 0.375rem; text-align: center; }
.dialog-title { font-size: 1.125rem; font-weight: 600; line-height: 1.2; }
.dialog-description { font-size: 0.875rem; color: var(--muted-foreground); }
.dialog-body { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 0.5rem 0; }
.dialog-footer { display: flex; flex-direction: column-reverse; gap: 0.5rem; }
@media (min-width: 640px) {
    .dialog-header { text-align: left; }
    .dialog-footer { flex-direction: row; justify-content: flex-end; }
}
.qr-image { width: 240px; height: 240px; border-width: 1px; border-radius: calc(var(--radius) - 2px); background: #fff; image-rendering: pixelated; }

.page-heading { display: flex; flex-direction: column; gap: 0.25rem; }
.kpi-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.kpi { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem; transition: box-shadow 150ms; }
.kpi:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.kpi:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.kpi-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: calc(var(--radius) - 2px); }
.kpi-total { background: var(--sky-100); color: var(--sky-600); }
.kpi-overdue { background: var(--late-soft); color: var(--late); }
.kpi-due-soon { background: var(--soon-soft); color: var(--soon); }
.kpi-on-time { background: var(--ok-soft); color: var(--ok); }
.kpi-unknown { background: var(--unknown-soft); color: var(--unknown); }
.kpi-text { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 0.75rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-value { font-size: 1rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }

.dashboard-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1280px) { .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card-header-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.card-content-flush { padding: 1rem 0 0.5rem; }
.card-content-flush .table td:first-child, .card-content-flush .table th:first-child { padding-left: 1.5rem; }
.card-content-flush .table td:last-child, .card-content-flush .table th:last-child { padding-right: 1.5rem; }
.scroll-x { overflow-x: auto; }
.table-link { font-weight: 500; }
.table-link:hover { text-decoration: underline; }
.empty-state { padding: 2rem 1.5rem; text-align: center; color: var(--muted-foreground); font-size: 0.875rem; }
.timeline-flush { padding: 0 1.5rem; }

.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.75rem; color: var(--muted-foreground); }
.legend-item { display: inline-flex; align-items: center; gap: 0.375rem; }
.legend-swatch { width: 0.625rem; height: 0.625rem; border-radius: 2px; }
.legend-change { background: var(--chart-change); }
.legend-visit { background: var(--chart-visit); }
.chart-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 14rem auto; column-gap: 0.5rem; min-width: 26rem; }
.chart { grid-row: 1; grid-column: 2; display: block; width: 100%; height: 14rem; overflow: visible; }
.chart-y-axis { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; height: 15rem; margin-top: -0.5rem; }
.chart-x-axis { grid-row: 2; grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-top: 0.375rem; text-align: center; }
.chart-y-axis, .chart-x-axis { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-change { fill: var(--chart-change); }
.chart-visit { fill: var(--chart-visit); }
.chart-bar:hover rect { opacity: 0.85; }

.alert-warning { color: var(--soon); background: var(--soon-soft); border-color: var(--soon-border); font-size: 0.875rem; }
.tabs { display: flex; flex-direction: column; gap: 0.75rem; }
.tab-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem; padding: 0.25rem; border-radius: var(--radius); background: var(--muted); }
.tab { display: flex; align-items: center; justify-content: center; height: 2rem; padding: 0 0.5rem; border-radius: calc(var(--radius) - 4px); font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); cursor: pointer; text-align: center; }
.tab-input-customer:checked ~ .tab-list .tab-customer,
.tab-input-manager:checked ~ .tab-list .tab-manager { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.tab-input-customer:focus-visible ~ .tab-list .tab-customer,
.tab-input-manager:focus-visible ~ .tab-list .tab-manager { outline: 2px solid var(--ring); outline-offset: 2px; }
.tab-panel { display: none; flex-direction: column; align-items: center; gap: 0.75rem; }
.tab-input-customer:checked ~ .tab-panel-customer,
.tab-input-manager:checked ~ .tab-panel-manager { display: flex; }

.social { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding-top: 1rem; border-top-width: 1px; width: 100%; }
.social-site { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.social-site:hover { text-decoration: underline; }
.social-icons { display: flex; gap: 0.5rem; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-width: 1px; border-radius: 9999px; background: var(--background); color: var(--foreground); transition: background 150ms; }
.social-icon:hover { background: var(--accent); }
.social-icon:focus-visible, .social-site:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.card-tabs { gap: 0; }
.card-tabs .tab-list { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.25rem 1.5rem 0; }
.card-tabs .tab { height: auto; min-height: 2.25rem; padding: 0.375rem 0.5rem; line-height: 1.2; }
.card-tabs .tab-panel { align-items: stretch; }
@media (max-width: 767px) { .card-tabs .tab-list { margin: 1rem 1rem 0; } }
.tab-input-summary:checked ~ .tab-list .tab-summary,
.tab-input-parts:checked ~ .tab-list .tab-parts,
.tab-input-history:checked ~ .tab-list .tab-history { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.tab-input-summary:focus-visible ~ .tab-list .tab-summary,
.tab-input-parts:focus-visible ~ .tab-list .tab-parts,
.tab-input-history:focus-visible ~ .tab-list .tab-history { outline: 2px solid var(--ring); outline-offset: 2px; }
.tab-input-summary:checked ~ .tab-panel-summary,
.tab-input-parts:checked ~ .tab-panel-parts,
.tab-input-history:checked ~ .tab-panel-history { display: flex; }

.alert-success { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); font-size: 0.875rem; }
.settings-card { max-width: 36rem; }
.field-error { font-size: 0.75rem; color: var(--destructive); }
.input[aria-invalid="true"] { border-color: var(--destructive); }

.settings-card-wide { max-width: 48rem; }
.user-list { max-height: 20rem; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.user-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.user-row:last-child { border-bottom: 0; }
.user-row[hidden] { display: none; }
.settings-tabs { max-width: 48rem; }
.settings-tabs .tab-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-tabs .tab { height: auto; min-height: 2.25rem; padding: 0.375rem 0.5rem; line-height: 1.2; }
.settings-tabs .tab-panel { align-items: stretch; }
.settings-tabs .settings-card { max-width: none; }
@media (max-width: 767px) { .settings-tabs .tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tab-input-contact:checked ~ .tab-list .tab-contact,
.tab-input-conductivity:checked ~ .tab-list .tab-conductivity,
.tab-input-password:checked ~ .tab-list .tab-password,
.tab-input-users:checked ~ .tab-list .tab-users { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.tab-input-contact:focus-visible ~ .tab-list .tab-contact,
.tab-input-conductivity:focus-visible ~ .tab-list .tab-conductivity,
.tab-input-password:focus-visible ~ .tab-list .tab-password,
.tab-input-users:focus-visible ~ .tab-list .tab-users { outline: 2px solid var(--ring); outline-offset: 2px; }
.tab-input-contact:checked ~ .tab-panel-contact,
.tab-input-conductivity:checked ~ .tab-panel-conductivity,
.tab-input-password:checked ~ .tab-panel-password,
.tab-input-users:checked ~ .tab-panel-users { display: flex; }
.input-number { width: 6rem; }
.row-invalid td { background: var(--late-soft); }
