/* MineTime – Basis-Stylesheet. Keine externen Abhängigkeiten (CSP: nur 'self'). */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --border: #e4e8f0;
    --border-strong: #cfd6e3;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --success: #059669;
    --success-soft: #ecfdf5;
    --warning: #b45309;
    --warning-soft: #fffbeb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --info: #0369a1;
    --info-soft: #f0f9ff;
    --sidebar-bg: #111827;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #64748b;
    --sidebar-active: #1f2937;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
    --sidebar-width: 248px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: .8125rem; }
.mono { font-family: var(--mono); font-size: .8125rem; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; word-break: break-word; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right; }
.grow { flex: 1 1 auto; min-width: 0; }
.link { font-weight: 500; }

/* ---------- App-Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 40;
    display: flex; flex-direction: column; background: var(--sidebar-bg); color: var(--sidebar-text);
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1rem; }
.brand-text small { color: var(--sidebar-muted); font-size: .75rem; }

.nav { padding: .25rem .75rem 1rem; flex: 1; }
.nav-section { margin-top: 1rem; }
.nav-title { padding: 0 .75rem .375rem; font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--sidebar-muted); }
.nav-link {
    display: flex; align-items: center; gap: .625rem; padding: .5rem .75rem; margin-bottom: 2px;
    border-radius: var(--radius-sm); color: var(--sidebar-text); text-decoration: none; font-weight: 500;
}
.nav-link:hover { background: var(--sidebar-active); color: #fff; text-decoration: none; }
.nav-link.is-active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.nav-link.is-planned { color: #475569; cursor: default; }
.nav-link.is-planned:hover { background: transparent; color: #475569; }
.nav-badge { margin-left: auto; font-size: .625rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: #1e293b; color: #64748b; }
.sidebar-footer { padding: 1rem 1.25rem; font-size: .75rem; color: var(--sidebar-muted); border-top: 1px solid #1f2937; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
    height: 60px; padding: 0 1.5rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}
.topbar-spacer { flex: 1; }
.content { padding: 1.5rem; max-width: 1280px; width: 100%; }

.project-switch { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.project-switch select { border: 0; background: transparent; font-weight: 600; padding: .25rem 1.25rem .25rem 0; cursor: pointer; max-width: 220px; }
.project-switch select:disabled { cursor: default; appearance: none; padding-right: 0; }
.project-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--primary)); flex: none; vertical-align: middle; }

.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; gap: .625rem; cursor: pointer; list-style: none; padding: .25rem .5rem; border-radius: var(--radius-sm); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-alt); }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta small { color: var(--text-muted); font-size: .75rem; }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: .375rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.user-dropdown a, .user-dropdown button {
    display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .625rem; border: 0; background: none;
    border-radius: var(--radius-sm); color: var(--text); text-align: left; cursor: pointer; text-decoration: none;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-alt); text-decoration: none; }

.avatar {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
    background: var(--primary-soft); color: var(--primary); font-weight: 650; font-size: .8125rem;
}
.avatar-sm { width: 28px; height: 28px; font-size: .6875rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }

.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.only-mobile { display: none; }
.sidebar-backdrop { display: none; }

/* ---------- Seitenelemente ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-header p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: .25rem; font-size: .8125rem; color: var(--text-muted); margin-bottom: .375rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card-flush { padding: 0; overflow: hidden; }
.card-narrow { max-width: 720px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.card-header h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-actions { display: flex; gap: .5rem; margin-top: .75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 1.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .875rem; align-items: center;
    padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text); text-decoration: none;
}
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--text-muted); font-size: .8125rem; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.project-grid .card { margin: 0; }
.project-card.is-inactive { opacity: .65; }

.profile-head { display: flex; align-items: center; gap: 1.25rem; }
.profile-head h1 { margin-bottom: .5rem; }

.facts { margin: 0; display: grid; gap: .75rem; }
.facts dt { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.facts dd { margin: 0; font-weight: 500; }
.facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.facts-inline { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.facts-stacked { grid-template-columns: 1fr; }
.facts-stacked > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.facts-stacked > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem 1.5rem; margin-bottom: .75rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: thin; }
.tab { padding: .625rem .875rem; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab.is-planned { color: #b6bfcc; cursor: default; }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .625rem 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.list li:last-child .list-row, .list li.list-row:last-child { border-bottom: 0; }
a.list-row:hover { text-decoration: none; color: var(--primary); }

.empty { text-align: center; padding: 2rem 1rem; color: var(--text-muted); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-alt); padding: .625rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.card:not(.card-flush) .table th:first-child, .card:not(.card-flush) .table td:first-child { padding-left: 0; }
.card:not(.card-flush) .table th { background: transparent; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.table-hover tbody tr:hover { background: var(--surface-alt); }
.person { display: inline-flex; align-items: center; gap: .625rem; color: var(--text); font-weight: 500; }
.diff-old { color: var(--danger); background: var(--danger-soft); font-family: var(--mono); font-size: .8125rem; }
.diff-new { color: var(--success); background: var(--success-soft); font-family: var(--mono); font-size: .8125rem; }

/* ---------- Badges & Hinweise ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #f1f5f9; color: var(--text-muted); }
.badge-primary { background: var(--primary); color: #fff; }

.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent; margin-bottom: 1rem; }
.alert-success { background: var(--success-soft); color: #065f46; border-color: #a7f3d0; }
.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-warning { background: var(--warning-soft); color: #92400e; border-color: #fde68a; }
.alert-info { background: var(--info-soft); color: #075985; border-color: #bae6fd; }

/* ---------- Formulare ---------- */
.form .field, .filters .field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.form label, .filters label { font-weight: 550; font-size: .8125rem; }
.input, .form input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .form select, .form textarea {
    width: 100%; padding: .5rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.is-invalid, .form .is-invalid { border-color: var(--danger) !important; }
.input-sm { padding: .3rem .5rem !important; }
.input-color { height: 38px; padding: .2rem !important; }
.field-error { color: var(--danger); font-size: .8125rem; margin: 0; }
.hint { color: var(--text-muted); font-size: .8125rem; margin: 0 0 .75rem; }
.field .hint { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.form-row .field { min-width: 220px; }
.form-row .btn { margin-bottom: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.checks { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 400 !important; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; padding: 1rem; }
.filters .field { margin: 0; min-width: 160px; }
.filters .field.grow { flex: 1 1 260px; }
.filter-actions { display: flex; gap: .5rem; }

.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button, .segmented label { padding: .45rem .875rem; border: 0; background: var(--surface); cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: .375rem; }
.segmented button + button, .segmented label + label { border-left: 1px solid var(--border-strong); }
.segmented button.is-active, .segmented label:has(input:checked) { background: var(--primary-soft); color: var(--primary); }
.segmented-inline { margin-bottom: .5rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .9rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
    color: var(--text); font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-alt); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-sm { padding: .3rem .65rem; font-size: .8125rem; }
.btn-block { width: 100%; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; }

/* ---------- Minimal-Layout (Login, Fehler) ---------- */
.minimal { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #eef2ff, var(--bg) 55%); }
.minimal-wrap { width: 100%; max-width: 400px; padding: 1.5rem; }
.minimal-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.minimal-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.minimal-brand strong { font-size: 1.125rem; }
.minimal-brand small { color: var(--text-muted); }
.auth-card { padding: 1.75rem; }
.auth-card h1 { font-size: 1.25rem; }
.minimal-footer { text-align: center; color: var(--text-muted); font-size: .75rem; margin-top: 1rem; }
.error-card { text-align: center; }
.error-code { font-size: 2.5rem; font-weight: 800; color: var(--primary); }

/* ---------- Zeitwirtschaft ---------- */
.icon-flip { transform: scaleX(-1); }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.pager { display: flex; gap: .375rem; }
.card-header-padded { padding: 1rem 1.25rem; margin: 0; }
.section-title { font-size: .875rem; margin: 1.25rem 0 .75rem; }
.link-plain { color: var(--text); }
.input-short { max-width: 180px; }
.alert-compact { padding: .5rem .75rem; margin: .75rem 0 0; font-size: .8125rem; }
.btn-danger-ghost { color: var(--danger); border-color: #fecaca; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.inline-form .grow { min-width: 160px; }
.form-inline-card { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.balance-plus { color: var(--success); }
.balance-minus { color: var(--danger); }
.balance-zero { color: var(--text-muted); }

.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .0625rem .45rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; white-space: nowrap; margin-right: .25rem; }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-muted { background: #f1f5f9; color: var(--text-muted); }

.month-table td, .month-table th { padding-top: .45rem; padding-bottom: .45rem; }
.month-table tr.is-weekend td { background: #fafbfd; color: var(--text-muted); }
.month-table tr.is-today td { background: var(--primary-soft); }
.month-table tr.is-future td { opacity: .55; }
.month-table tfoot th { background: var(--surface-alt); border-top: 1px solid var(--border-strong); text-transform: none; font-size: .8125rem; color: var(--text); }
tr.is-voided td { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(100, 116, 139, .5); }
tr.is-current td { background: var(--primary-soft); }

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.account-card { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.account-card-total { border-color: #c7d2fe; background: linear-gradient(180deg, #fff, #f5f7ff); }
.account-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.account-main { font-size: 1.5rem; font-weight: 700; margin: .125rem 0; font-variant-numeric: tabular-nums; }
.account-main small { font-size: .875rem; font-weight: 500; color: var(--text-muted); }
.account-meta { font-size: .8125rem; }

.stamp-card { display: flex; flex-direction: column; gap: 1rem; }
.stamp-card-compact { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stamp-status { display: flex; align-items: center; gap: .875rem; }
.stamp-dot { width: 14px; height: 14px; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 5px #f1f5f9; flex: none; }
.stamp-working .stamp-dot { background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }
.stamp-break .stamp-dot { background: #f59e0b; box-shadow: 0 0 0 5px var(--warning-soft); }
.stamp-state { font-size: 1.125rem; font-weight: 650; }
.stamp-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-stamp { min-width: 180px; padding: .9rem 1.25rem; font-size: 1rem; border-radius: var(--radius); }
.btn-stamp-in { background: var(--success); border-color: var(--success); color: #fff; }
.btn-stamp-in:hover { background: #047857; }
.btn-stamp-break { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.btn-stamp-out { background: var(--text); border-color: var(--text); color: #fff; }
.btn-stamp-out:hover { background: #1e293b; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 .5rem; border-left: 2px solid var(--border); }
.timeline-item { position: relative; display: flex; align-items: center; gap: .75rem; padding: .4rem 0 .4rem 1rem; }
.timeline-item::before { content: ""; position: absolute; left: -.55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.timeline-clock_in::before { border-color: var(--success); background: var(--success); }
.timeline-clock_out::before { border-color: var(--text); background: var(--text); }
.timeline-break_start::before, .timeline-break_end::before { border-color: #f59e0b; }
.timeline-time { font-weight: 600; min-width: 3.25rem; }

.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.radio-card { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500 !important; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.weekday-picker { display: flex; gap: .375rem; flex-wrap: wrap; }
.weekday { cursor: pointer; }
.weekday input { position: absolute; opacity: 0; pointer-events: none; }
.weekday span { display: inline-grid; place-items: center; width: 40px; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 600; }
.weekday input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.weekday input:focus-visible + span { box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.schedule-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .375rem; }
.schedule-day { display: flex; flex-direction: column; gap: .25rem; font-weight: 600 !important; text-align: center; }
.core-grid { display: grid; grid-template-columns: 2.5rem 1fr 1fr; gap: .375rem .5rem; align-items: center; max-width: 360px; }
.core-day { font-weight: 600; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .375rem .75rem; max-width: 420px; margin-bottom: 1rem; }
.check-block { align-items: flex-start !important; padding: .5rem 0; }
.check-block input { margin-top: .2rem; }
.reopen summary { list-style: none; display: inline-flex; }
.reopen summary::-webkit-details-marker { display: none; }
.reopen-form { display: flex; flex-direction: column; gap: .375rem; margin-top: .5rem; min-width: 260px; text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
    .sidebar-open .sidebar { transform: none; }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 35; }
    .main { margin-left: 0; }
    .only-mobile { display: inline-grid; }
    .topbar { padding: 0 1rem; gap: .5rem; }
    .content { padding: 1rem; }
    .user-meta { display: none; }
    .hide-mobile { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .profile-head { flex-wrap: wrap; }
    .project-switch select { max-width: 150px; }
    .radio-cards { grid-template-columns: 1fr; }
    .schedule-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .btn-stamp { flex: 1 1 140px; min-width: 0; }
}
