* { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: #0f0f0f;
            color: #e0e0e0;
            line-height: 1.5;
            padding: 0 0 2rem 0;
        }
        a { color: #6cb4ee; text-decoration: none; }
        a:hover { text-decoration: underline; }

        .nav {
            background: #1a1a2e;
            border-bottom: 1px solid #333;
            padding: 0.75rem 1rem;
            display: flex;
            gap: 1.5rem;
            align-items: center;
            flex-wrap: wrap;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .nav .brand {
            font-weight: 700;
            font-size: 1.1rem;
            color: #fff;
            margin-right: auto;
        }
        .nav a { color: #aaa; font-size: 0.9rem; }
        .nav a:hover { color: #fff; text-decoration: none; }

        .container { max-width: 1200px; margin: 0 auto; padding: 1rem; }

        .stats {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        .stat-card {
            background: #1a1a2e;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 1rem 1.25rem;
            flex: 1;
            min-width: 140px;
        }
        .stat-card .label { font-size: 0.8rem; color: #888; text-transform: uppercase; }
        .stat-card .value { font-size: 1.8rem; font-weight: 700; color: #fff; }

        .progress-bar {
            width: 100%;
            background: #222;
            border-radius: 8px;
            height: 12px;
            margin-bottom: 1.5rem;
            overflow: hidden;
        }
        .progress-bar .fill {
            height: 100%;
            background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71);
            border-radius: 8px;
            transition: width 0.3s;
        }

        .month-section { margin-bottom: 1.5rem; }
        .month-section h3 {
            font-size: 0.95rem;
            color: #888;
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .day-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
            gap: 3px;
        }
        .day-cell {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            border-radius: 4px;
            cursor: pointer;
            transition: transform 0.1s;
            text-decoration: none;
            color: #aaa;
            border: 1px solid transparent;
        }
        .day-cell:hover { transform: scale(1.15); text-decoration: none; }
        .day-cell.empty { background: #1a1a1a; color: #555; }
        .day-cell.covered { background: #1a3a1a; color: #4ade80; border-color: #2d5a2d; }
        .day-cell.today { border: 2px solid #f39c12; }

        .btn {
            display: inline-block;
            padding: 0.5rem 1.25rem;
            border: none;
            border-radius: 6px;
            font-size: 0.9rem;
            cursor: pointer;
            text-decoration: none;
            font-weight: 500;
        }
        .btn:hover { text-decoration: none; opacity: 0.9; }
        .btn-primary { background: #2563eb; color: #fff; }
        .btn-danger { background: #dc2626; color: #fff; }
        .btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }

        .form-group { margin-bottom: 1rem; }
        .form-group label { display: block; font-size: 0.85rem; color: #aaa; margin-bottom: 0.3rem; }
        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 0.6rem 0.8rem;
            background: #1a1a2e;
            border: 1px solid #333;
            border-radius: 6px;
            color: #e0e0e0;
            font-size: 1rem;
        }
        .form-group textarea { min-height: 80px; resize: vertical; }
        .form-row { display: flex; gap: 1rem; }
        .form-row .form-group { flex: 1; }

        .alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
        .alert-error { background: #3a1a1a; border: 1px solid #dc2626; color: #f87171; }
        .alert-success { background: #1a3a1a; border: 1px solid #22c55e; color: #4ade80; }

        .person-card {
            background: #1a1a2e;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .person-card .name { font-weight: 600; color: #fff; }
        .person-card .notes { font-size: 0.85rem; color: #888; width: 100%; }
        .person-card .date { font-size: 0.85rem; color: #6cb4ee; }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .page-header h1 { font-size: 1.5rem; color: #fff; }

        .empty-state {
            text-align: center;
            padding: 3rem 1rem;
            color: #666;
        }
        .empty-state p { margin-bottom: 1rem; }

        @media (max-width: 480px) {
            .day-grid { grid-template-columns: repeat(7, 1fr); }
            .stat-card .value { font-size: 1.4rem; }
            .form-row { flex-direction: column; gap: 0; }
        }

        /* --- static-app additions --- */
        .view { display: none; }
        .view.active { display: block; }
        .loading { text-align: center; color: #888; padding: 2rem; }
        .nav a.active { color: #fff; }
        .badge { background:#2563eb; color:#fff; border-radius:10px; padding:0 .4rem; font-size:.75rem; }

/* ---- login gate (see auth.js) ---- */
.login-gate {
    position: fixed;
    inset: 0;
    background: var(--bg, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.login-box {
    width: 100%;
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.login-box h1 { margin: 0 0 .5rem; font-size: 1.25rem; }
.login-box label { font-size: .8rem; opacity: .75; }
.login-box input {
    padding: .6rem .7rem;
    font-size: 1rem; /* >=16px stops iOS zooming the page on focus */
    border-radius: .4rem;
    border: 1px solid rgba(128,128,128,.4);
    background: rgba(128,128,128,.08);
    color: inherit;
}
.login-box button {
    margin-top: .5rem;
    padding: .65rem;
    font-size: 1rem;
    border-radius: .4rem;
    cursor: pointer;
}
.login-box button[disabled] { opacity: .6; cursor: default; }
.login-error { color: #e5484d; min-height: 1.2em; margin: .25rem 0 0; font-size: .85rem; }
