:root {
    --primary: #111111;
    --secondary: #000000;
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #263447;
    --muted: #758396;
    --border: #dde5ef;
    --line: #ecf1f7;
    --success: #21a36a;
    --warning: #f0a12b;
    --danger: #df4b4b;
    --radius: 8px;
    --shadow: 0 14px 32px rgba(30, 43, 62, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(31, 77, 120, .08), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, var(--bg) 48%, #eef3f9 100%);
    color: var(--ink);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: 0; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 17px; font-weight: 750; color: #3a4b61; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.mobile-menu-backdrop,
.mobile-menu-btn,
.mobile-bottom-nav {
    display: none;
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, var(--secondary), color-mix(in srgb, var(--secondary) 82%, #000 18%));
    color: white;
    padding: 22px 16px;
    box-shadow: 8px 0 28px rgba(20, 30, 45, .12);
}
.brand {
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 22px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.82);
    padding: 11px 12px;
    margin: 3px 0;
    border-radius: var(--radius);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sidebar a:hover {
    background: rgba(255,255,255,.12);
    color: white;
    transform: translateX(2px);
}
.sidebar a.capture-cta {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 58%, #21a36a));
    color: white;
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
    margin-bottom: 10px;
}
.top-capture {
    background: linear-gradient(135deg, #f0a12b, #df4b4b);
    color: white;
    box-shadow: 0 14px 30px rgba(223, 75, 75, .24);
    white-space: nowrap;
}
.top-capture svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.btn svg, .calendar-panel svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.btn svg rect, .calendar-panel svg rect {
    fill: none;
}
.install-btn {
    background: #edf3f9;
    color: var(--primary);
    box-shadow: none;
    border: 1px solid var(--border);
}
.install-btn[hidden] { display: none; }
.push-btn {
    background: #f8fafc;
    color: var(--secondary);
    box-shadow: none;
    border: 1px solid var(--border);
}
.nav-icon svg, .metric-card > svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.main { padding: 24px 28px 36px; min-width: 0; }
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #526173;
}
.mobile-menu-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(30,43,62,.06);
    place-items: center;
}
.mobile-menu-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.topbar > div {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(221,229,239,.86);
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: 0 8px 20px rgba(30,43,62,.04);
}
.card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(221,229,239,.92);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    animation: riseIn .32s ease both;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
    border-color: rgba(17,17,17,.25);
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(30, 43, 62, .12);
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid.two { grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr); }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analytics-grid .wide { grid-column: 1 / -1; }

.metric { font-size: 27px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.muted { color: var(--muted); }
.page-help {
    max-width: 980px;
    color: var(--muted);
    margin-top: -4px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.metric-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 96px;
}
.metric-card > svg {
    width: 42px;
    height: 42px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, white);
    border-radius: var(--radius);
    padding: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius);
    padding: 10px 14px;
    min-height: 38px;
    background: var(--primary);
    color: white;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 24%, transparent);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn.secondary {
    background: #edf3f9;
    color: var(--primary);
    box-shadow: none;
}
.page-actions {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 14px;
}
.hero-action {
    min-height: 44px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #21a36a));
    box-shadow: 0 14px 32px color-mix(in srgb, var(--primary) 28%, transparent);
}
.hero-action.pulse {
    animation: softPulse 2.2s ease-in-out infinite;
}
@keyframes softPulse {
    0%, 100% { box-shadow: 0 14px 32px color-mix(in srgb, var(--primary) 25%, transparent); }
    50% { box-shadow: 0 18px 42px color-mix(in srgb, var(--primary) 42%, transparent); }
}
.inline-form { display: inline-block; margin: 2px 0; }
.notifications { position: relative; }
.notifications summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    box-shadow: 0 8px 20px rgba(30,43,62,.05);
}
.notifications summary::-webkit-details-marker { display: none; }
.badge {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 11px;
}
.notification-list {
    position: absolute;
    right: 0;
    top: 48px;
    width: min(360px, 90vw);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(30,43,62,.16);
    padding: 10px;
    z-index: 20;
}
.notification-item {
    border-left: 4px solid var(--primary);
    padding: 10px;
    border-radius: 6px;
    background: #f8fafc;
    margin-bottom: 8px;
}
.notification-item p { margin: 4px 0 0; color: var(--muted); line-height: 1.35; }
.notification-item.warning { border-left-color: var(--warning); }
.notification-item.danger { border-left-color: var(--danger); }
.alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow);
}
.alert.warning { border-color: #f7d79b; background: #fff8eb; color: #7c520c; }
.alert.danger { border-color: #ffc3c3; background: #fff1f1; color: #8d1f1f; }
.alert.info { border-color: #b9d8f3; background: #eef7ff; color: #111111; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 11px;
    margin: 6px 0 14px;
    background: white;
    color: var(--ink);
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
textarea { resize: vertical; min-height: 96px; }
label { font-weight: 750; font-size: 13px; color: #3d4e62; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
th {
    color: #4c5f76;
    background: #f2f6fb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}
tr:hover td { background: #fbfdff; }

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login .card { width: min(420px, 100%); }
.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf3f9;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin: 2px;
}
.form-grid { display: grid; gap: 0 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}
.toolbar input, .toolbar select { margin-bottom: 0; }

.hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    margin: -8px 0 14px;
}
.help {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin-left: 4px;
    border-radius: 50%;
    background: #e8eef5;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    cursor: help;
}
.input-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}
.input-action input, .input-action textarea { margin-bottom: 14px; }
.voice-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--primary);
    min-width: 46px;
    min-height: 40px;
    margin-top: 6px;
    cursor: pointer;
}
.icon-btn { display: inline-grid; place-items: center; }
.icon-btn svg, .timer-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.timer-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
}
.timer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
}
.timer-label svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.timer-display { font-size: 34px; font-weight: 800; letter-spacing: 0; margin: 6px 0; }
.timer-actions { display: flex; gap: 8px; }
.timer-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: transform .16s ease;
}
.timer-btn:hover { transform: translateY(-1px); }
.timer-btn.start { background: var(--success); }
.timer-btn.pause { background: var(--warning); }
.timer-btn.stop { background: var(--danger); }
.nested-capture-btn {
    margin: -4px 0 16px;
}
.stack-notice {
    border: 1px solid rgba(223, 75, 75, .45);
    background: linear-gradient(135deg, #df4b4b, #f0a12b);
    color: #fff;
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 0 0 12px;
    font-weight: 850;
    box-shadow: 0 14px 30px rgba(223, 75, 75, .24);
    animation: stackPulse 1.4s ease-in-out infinite;
}
.floating-timer-alert {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 140;
    max-width: min(360px, calc(100vw - 36px));
    box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
    animation: floatIn .22s ease both;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    margin: 6px 0 16px;
}
@keyframes floatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes stackPulse {
    0%, 100% { transform: translateY(0); filter: saturate(1); }
    50% { transform: translateY(-1px); filter: saturate(1.16); }
}

.chart-card { overflow: hidden; }
.chart-card canvas {
    width: 100% !important;
    height: 260px !important;
}
.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.analytics-grid.rich {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.chart-card-wide {
    margin-bottom: 16px;
}
.bar-row {
    display: block;
    margin: 13px 0;
    padding: 8px;
    border-radius: var(--radius);
    color: var(--ink);
}
.bar-row.interactive:hover {
    background: #f5f9fd;
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 var(--primary);
}
.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 7px;
}
.bar-track {
    height: 12px;
    background: #e8eef5;
    border-radius: 999px;
    overflow: hidden;
}
.bar-track.alt { background: #edf7f1; }
.bar-track.warm { background: #fff3de; }
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 64%, #33bfd1));
    border-radius: 999px;
    animation: growBar .48s ease both;
}
.bar-track.alt .bar-fill { background: linear-gradient(90deg, var(--success), #75c799); }
.bar-track.warm .bar-fill { background: linear-gradient(90deg, var(--warning), #f6ca77); }
@keyframes growBar { from { transform: scaleX(.15); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }

.detail-panel {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 100;
}
.modal-form-card {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(7px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 90;
}
.modal-form-card.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-form-card .form-panel {
    width: min(820px, 96vw);
    max-height: 88vh;
    overflow: auto;
    transform: translateY(18px) scale(.98);
    transition: transform .24s ease;
}
.modal-form-card.open .form-panel {
    transform: translateY(0) scale(1);
}
.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-panel {
    width: min(1080px, 96vw);
    max-height: 86vh;
    overflow: auto;
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .26);
    padding: 22px;
    transform: translateY(18px) scale(.98);
    transition: transform .24s ease;
}
.modal-backdrop.open .modal-panel {
    transform: translateY(0) scale(1);
}
.modal-close {
    float: right;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #eef3f9;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.detail-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.detail-kpis div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}
.detail-kpis strong {
    display: block;
    color: var(--primary);
    font-size: 24px;
}
.detail-kpis span {
    color: var(--muted);
    font-size: 12px;
}
.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.detail-meta p {
    margin: 0;
    border-left: 4px solid var(--primary);
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px;
    color: #46586e;
}
.semaphore {
    position: relative;
    padding-left: 36px !important;
}
.semaphore::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #9aa7b5;
    box-shadow: 0 0 0 5px rgba(154,167,181,.14);
}
.semaphore.green::before { background: var(--success); box-shadow: 0 0 0 5px rgba(33,163,106,.16); }
.semaphore.yellow::before { background: var(--warning); box-shadow: 0 0 0 5px rgba(240,161,43,.18); }
.semaphore.red::before { background: var(--danger); box-shadow: 0 0 0 5px rgba(223,75,75,.18); }
.modal-table-wrap {
    overflow: auto;
    max-height: 380px;
}
.budget-indicator {
    padding: 12px;
    margin: -2px 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #f8fafc;
}
.budget-indicator strong { display: block; color: var(--ink); }
.budget-indicator span { display: block; margin: 3px 0 8px; }
.budget-indicator.ok { border-color: #a8ddc4; background: #f0fbf6; }
.budget-indicator.warning { border-color: #f5cf88; background: #fff8ea; }
.budget-indicator.danger { border-color: #f0a3a3; background: #fff1f1; }
.mini-meter {
    height: 9px;
    border-radius: 999px;
    background: rgba(0,0,0,.08);
    overflow: hidden;
}
.mini-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    transition: width .35s ease;
}
.voice-btn.listening { background: var(--primary); color: white; }
.voice-btn:disabled { opacity: .55; cursor: not-allowed; }
.calendar-panel {
    margin: 18px 0;
    overflow: hidden;
}
.calendar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}
.calendar-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.calendar-head svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}
.calendar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.calendar-events {
    display: grid;
    gap: 10px;
}
.calendar-event {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #f9fbfe);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.calendar-event:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
}
.calendar-date {
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}
.calendar-date strong,
.calendar-date span {
    display: block;
}
.calendar-date span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}
.calendar-event h3 {
    margin: 0 0 4px;
    font-size: 15px;
}
.checkline { display: block; font-weight: 400; margin: 8px 0; }
.checkline input { width: auto; margin: 0 8px 0 0; }
.check-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin: 6px 0 14px;
}
.check-grid .checkline {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfdff;
    text-align: center;
}
.error {
    color: #9b1c1c;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    padding: 10px;
    border-radius: var(--radius);
}
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--primary); font-weight: 750; }

@media (max-width: 1080px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-grid { grid-template-columns: 1fr; }
    .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    body {
        padding-bottom: 76px;
    }
    body.mobile-menu-open {
        overflow: hidden;
    }
    .shell { display: block; }
    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 75;
    }
    body.mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .sidebar {
        position: fixed !important;
        inset: 0 auto 0 0;
        width: min(82vw, 320px);
        height: 100vh;
        overflow-y: auto;
        padding: 20px 14px 90px;
        transform: translateX(-105%);
        transition: transform .24s ease;
        z-index: 80;
        box-shadow: 18px 0 48px rgba(15, 23, 42, .26);
    }
    body.mobile-menu-open .sidebar {
        transform: translateX(0);
    }
    .brand {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .mobile-menu-btn {
        display: inline-grid;
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        color: white;
        background: rgba(255,255,255,.13);
        border-color: rgba(255,255,255,.24);
        box-shadow: none;
    }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        margin: -14px -14px 14px;
        padding: 6px 10px;
        min-height: 54px;
        background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #111827));
        color: white;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255,255,255,.18);
        box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 22%, transparent);
    }
    .topbar > div {
        margin-left: auto;
        max-width: 42vw;
        padding: 6px 8px;
        font-size: 12px;
        overflow: hidden;
        color: white;
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.2);
        box-shadow: none;
    }
    .topbar .muted { color: rgba(255,255,255,.78); }
    .topbar > div strong,
    .topbar > div span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .top-capture {
        display: none;
    }
    .notifications summary {
        min-height: 38px;
        padding: 8px 9px;
        font-size: 0;
        color: white;
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.22);
        box-shadow: none;
    }
    .notifications summary .nav-icon {
        margin: 0;
    }
    .notification-list {
        position: fixed;
        right: 10px;
        left: 10px;
        top: 64px;
        width: auto;
        max-height: 70vh;
        overflow: auto;
    }
    h1 {
        font-size: 24px;
        line-height: 1.15;
    }
    h2 {
        font-size: 16px;
    }
    .card {
        padding: 14px;
        margin-bottom: 12px;
    }
    .grid, .grid.two, .form-grid.two, .toolbar { grid-template-columns: 1fr; }
    .toolbar .btn {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    .grid {
        gap: 10px;
    }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .timer-panel { grid-template-columns: 1fr; }
    .timer-actions { justify-content: flex-start; }
    .main { padding: 14px; }
    .metric-card {
        min-height: 82px;
        gap: 10px;
    }
    .metric {
        font-size: 23px;
    }
    .metric-card > svg {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    .chart-card {
        overflow: visible;
    }
    .chart-card canvas {
        height: 320px !important;
    }
    .chart-head {
        align-items: flex-start;
    }
    .chart-head h2 {
        line-height: 1.2;
    }
    table {
        min-width: 720px;
    }
    .card:has(table),
    .modal-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .analytics-grid.rich, .detail-kpis, .detail-meta { grid-template-columns: 1fr; }
    .calendar-head, .calendar-event { grid-template-columns: 1fr; }
    .calendar-head { display: grid; }
    .calendar-actions { justify-content: flex-start; }
    .modal-backdrop, .modal-form-card { padding: 10px; }
    .modal-panel,
    .modal-form-card .form-panel {
        width: min(100%, 96vw);
        max-height: 88dvh;
        padding: 16px;
    }
    .timer-display {
        font-size: 30px;
    }
    .page-actions { justify-content: stretch; }
    .page-actions .btn { width: 100%; }
    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 4px;
        padding: 8px;
        background: rgba(255,255,255,.94);
        border: 1px solid rgba(221,229,239,.94);
        border-radius: 18px;
        box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
        backdrop-filter: blur(12px);
    }
    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        min-width: 0;
        border: 0;
        background: transparent;
        color: #526173;
        display: grid;
        justify-items: center;
        gap: 3px;
        font: inherit;
        font-size: 11px;
        font-weight: 750;
        padding: 4px 2px;
    }
    .mobile-bottom-nav svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }
    .mobile-bottom-nav .mobile-capture-fab {
        color: white;
        background: linear-gradient(135deg, #f0a12b, #df4b4b);
        border-radius: 14px;
        min-height: 54px;
        transform: translateY(-10px);
        box-shadow: 0 12px 28px rgba(223, 75, 75, .28);
    }
    .mobile-bottom-nav .mobile-capture-fab span {
        font-size: 10px;
    }
    .floating-timer-alert {
        right: 10px;
        bottom: 92px;
    }
}
