﻿        :root {
            --ink: #17324d;
            --muted: #64748b;
            --line: #d8e4ef;
            --paper: #ffffff;
            --sea: #1d8db8;
            --coral: #ff7a59;
            --sun: #ffc857;
            --mint: #61c9a8;
            --lilac: #8d7cf6;
            --sky: #e9f7fb;
            --cream: #fff8e6;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            color: var(--ink);
            background:
                linear-gradient(180deg, rgba(233, 247, 251, 0.96), rgba(255, 248, 230, 0.9)),
                repeating-linear-gradient(90deg, rgba(29, 141, 184, 0.08) 0 1px, transparent 1px 72px);
            font-family: Arial, Helvetica, sans-serif;
            min-height: 100vh;
        }

        .login-page {
            align-items: center;
            display: flex;
            justify-content: center;
            padding: 24px;
        }

        .login-card {
            background: var(--paper);
            border: 1px solid var(--line);
            border-radius: 12px;
            box-shadow: 0 22px 60px rgba(23, 50, 77, 0.16);
            overflow: hidden;
            padding: 36px;
            position: relative;
            width: min(100%, 430px);
        }

        .login-card::before {
            background: linear-gradient(90deg, var(--sea), var(--mint), var(--sun), var(--coral), var(--lilac));
            content: "";
            height: 8px;
            inset: 0 0 auto;
            position: absolute;
        }

        .login-card h1 {
            font-size: clamp(2rem, 8vw, 3rem);
            margin: 0;
        }

        .login-mark {
            border: 6px solid #ffffff;
            border-radius: 50%;
            box-shadow: 0 8px 24px rgba(29, 141, 184, 0.2);
            display: block;
            margin: 0 0 22px auto;
            width: 86px;
        }

        .login-intro {
            color: var(--muted);
            line-height: 1.55;
            margin: 12px 0 24px;
        }

        .login-form {
            display: grid;
            gap: 10px;
        }

        .login-form label {
            font-size: 0.9rem;
            font-weight: 700;
            margin-top: 4px;
        }

        .login-form input[type="text"],
        .login-form input[type="password"] {
            background: #ffffff;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--ink);
            font: inherit;
            outline: none;
            padding: 12px 14px;
            width: 100%;
        }

        .login-form input:focus {
            border-color: var(--sea);
            box-shadow: 0 0 0 3px rgba(29, 141, 184, 0.16);
        }

        .login-button {
            margin-top: 10px;
            min-height: 46px;
            width: 100%;
        }

        .login-error {
            background: #fff2ed;
            border: 1px solid rgba(255, 122, 89, 0.45);
            border-radius: 8px;
            color: #8a2f1e;
            margin-bottom: 18px;
            padding: 12px 14px;
        }

        .page {
            width: min(1180px, calc(100% - 32px));
            margin: 0 auto;
            padding: 126px 0 48px;
        }

        .masthead {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 24px;
            align-items: end;
            padding: 28px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: var(--paper);
            box-shadow: 0 18px 45px rgba(23, 50, 77, 0.11);
            overflow: hidden;
            position: relative;
        }

        .masthead::before {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: 8px;
            background: linear-gradient(90deg, var(--sea), var(--mint), var(--sun), var(--coral), var(--lilac));
        }

        .eyebrow {
            color: var(--sea);
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            margin: 0 0 8px;
            text-transform: uppercase;
        }

        h1 {
            font-size: clamp(2rem, 5vw, 4.4rem);
            line-height: 1;
            margin: 0;
        }

        .intro {
            color: var(--muted);
            font-size: 1rem;
            line-height: 1.6;
            max-width: 760px;
            margin: 14px 0 0;
        }

        .class-mark {
            width: 126px;
            aspect-ratio: 1;
            border-radius: 50%;
            border: 8px solid #ffffff;
            display: block;
            object-fit: cover;
            box-shadow: 0 10px 30px rgba(29, 141, 184, 0.22);
        }

        .masthead-actions {
            align-items: center;
            display: grid;
            gap: 10px;
            justify-items: center;
        }

        .logout-button {
            background: transparent;
            border: 0;
            color: var(--sea);
            cursor: pointer;
            font: inherit;
            font-size: 0.86rem;
            font-weight: 700;
            padding: 4px 8px;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .logout-button:focus-visible {
            border-radius: 4px;
            outline: 3px solid rgba(29, 141, 184, 0.2);
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
            margin: 22px 0;
        }

        .stat {
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            padding: 16px;
        }

        .stat strong {
            display: block;
            font-size: 2rem;
            line-height: 1;
        }

        .stat span {
            color: var(--muted);
            display: block;
            font-size: 0.9rem;
            margin-top: 6px;
        }

        .tools {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 0 0 14px;
            flex-wrap: wrap;
        }

        .search {
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--ink);
            flex: 1;
            font: inherit;
            padding: 12px 14px;
            outline: none;
            background: #ffffff;
        }

        .search:focus {
            border-color: var(--sea);
            box-shadow: 0 0 0 3px rgba(29, 141, 184, 0.16);
        }

        .filter-controls,
        .highlight-controls {
            border: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin: 0;
            padding: 0;
        }

        .filter-controls legend,
        .highlight-controls legend {
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            margin: 0 8px 0 0;
            padding: 12px 0;
            text-transform: uppercase;
        }

        .filter-controls label,
        .highlight-controls label {
            cursor: pointer;
            display: inline-flex;
        }

        .filter-controls input,
        .highlight-controls input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .filter-controls span,
        .highlight-controls span {
            align-items: center;
            background: #ffffff;
            border: 1px solid var(--line);
            color: var(--ink);
            display: inline-flex;
            font-size: 0.9rem;
            font-weight: 700;
            min-height: 43px;
            padding: 9px 12px;
        }

        .filter-controls label:first-of-type span,
        .highlight-controls label:first-of-type span {
            border-radius: 8px 0 0 8px;
        }

        .filter-controls label:last-of-type span,
        .highlight-controls label:last-of-type span {
            border-radius: 0 8px 8px 0;
        }

        .filter-controls input:checked + span,
        .highlight-controls input:checked + span {
            background: var(--ink);
            border-color: var(--ink);
            color: #ffffff;
        }

        .filter-controls input:focus-visible + span,
        .highlight-controls input:focus-visible + span {
            box-shadow: 0 0 0 3px rgba(29, 141, 184, 0.16);
        }

        .command-panel {
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #ffffff;
            box-shadow: 0 18px 45px rgba(23, 50, 77, 0.08);
            margin: 0 0 22px;
            padding: 18px;
        }

        .command-heading {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 12px;
        }

        .command-heading h2 {
            font-size: 1.15rem;
            margin: 0;
        }

        .command-heading span {
            color: var(--muted);
            font-size: 0.9rem;
        }

        .command-form {
            display: flex;
            gap: 10px;
        }

        .command-input {
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--ink);
            flex: 1;
            font: inherit;
            padding: 12px 14px;
            outline: none;
            background: #ffffff;
        }

        .command-input:focus {
            border-color: var(--sea);
            box-shadow: 0 0 0 3px rgba(29, 141, 184, 0.16);
        }

        .button {
            border: 0;
            border-radius: 8px;
            background: var(--sea);
            color: #ffffff;
            cursor: pointer;
            font: inherit;
            font-weight: 700;
            padding: 12px 16px;
            white-space: nowrap;
        }

        .button-secondary {
            background: var(--ink);
        }

        .page-actions {
            display: grid;
            gap: 8px;
            position: fixed;
            right: 14px;
            top: 14px;
            width: min(168px, calc(100vw - 28px));
            z-index: 50;
        }

        .page-action {
            align-items: center;
            border: 1px solid rgba(23, 50, 77, 0.14);
            border-radius: 8px;
            box-shadow: 0 12px 28px rgba(23, 50, 77, 0.16);
            cursor: pointer;
            display: inline-flex;
            font: inherit;
            font-weight: 800;
            justify-content: center;
            min-height: 46px;
            padding: 10px 14px;
            text-align: center;
            text-decoration: none;
            white-space: nowrap;
        }

        .page-action-refresh {
            background: #ffffff;
            color: var(--ink);
        }

        .page-action-back {
            background: var(--ink);
            color: #ffffff;
        }

        .page-action:hover {
            transform: translateY(-1px);
        }

        .page-action:focus-visible {
            outline: 3px solid rgba(29, 141, 184, 0.28);
            outline-offset: 2px;
        }

        .preview-box,
        .feedback {
            border-radius: 8px;
            margin-top: 14px;
            padding: 14px;
        }

        .preview-box {
            background: #f3fbfd;
            border: 1px solid rgba(29, 141, 184, 0.25);
        }

        .preview-box strong,
        .feedback strong {
            display: block;
            margin-bottom: 8px;
        }

        .change-line {
            color: var(--muted);
            margin: 0 0 12px;
        }

        .feedback-success {
            background: rgba(97, 201, 168, 0.16);
            border: 1px solid rgba(97, 201, 168, 0.36);
            color: #17614e;
        }

        .feedback-error {
            background: #fff2ed;
            border: 1px solid rgba(255, 122, 89, 0.45);
            color: #8a2f1e;
        }

        .table-wrap {
            border: 1px solid var(--line);
            border-radius: 8px;
            background: var(--paper);
            overflow: auto;
            box-shadow: 0 18px 45px rgba(23, 50, 77, 0.09);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1140px;
        }

        th,
        td {
            padding: 13px 16px;
            text-align: left;
            border-bottom: 1px solid var(--line);
            vertical-align: middle;
        }

        th {
            background: #f3fbfd;
            color: #244762;
            font-size: 0.78rem;
            letter-spacing: 0.06em;
            position: sticky;
            text-transform: uppercase;
            top: 0;
            z-index: 1;
        }

        th.sortable {
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
        }

        th.sortable::after {
            color: var(--muted);
            content: " \2195";
            font-size: 0.78rem;
        }

        th.sortable[aria-sort="ascending"]::after {
            color: var(--sea);
            content: " \2191";
        }

        th.sortable[aria-sort="descending"]::after {
            color: var(--sea);
            content: " \2193";
        }

        th.sortable:focus {
            outline: 3px solid rgba(29, 141, 184, 0.18);
            outline-offset: -3px;
        }

        tbody tr.no-whatsapp {
            background: rgba(255, 122, 89, 0.12);
        }

        tbody tr.highlight-0 {
            background: rgba(255, 200, 87, 0.18);
        }

        tbody tr.highlight-1 {
            background: rgba(97, 201, 168, 0.18);
        }

        tbody tr.highlight-2 {
            background: rgba(141, 124, 246, 0.16);
        }

        tbody tr.highlight-3 {
            background: rgba(29, 141, 184, 0.14);
        }

        tbody tr.highlight-4 {
            background: rgba(255, 122, 89, 0.13);
        }

        tbody tr:hover {
            background: rgba(29, 141, 184, 0.12);
        }

        .number {
            color: var(--sea);
            font-weight: 700;
            width: 60px;
        }

        .child-name {
            font-weight: 700;
        }

        .muted {
            color: var(--muted);
        }

        .badge {
            border-radius: 999px;
            display: inline-flex;
            min-width: 78px;
            justify-content: center;
            padding: 5px 10px;
            font-size: 0.85rem;
            font-weight: 700;
        }

        .badge-yes {
            background: rgba(97, 201, 168, 0.2);
            color: #17614e;
        }

        .badge-no {
            background: rgba(255, 122, 89, 0.18);
            color: #8a2f1e;
        }

        .badge-muted {
            background: #edf2f7;
            color: var(--muted);
        }

        .error {
            border: 1px solid rgba(255, 122, 89, 0.45);
            border-radius: 8px;
            background: #fff2ed;
            color: #8a2f1e;
            padding: 16px;
            margin: 20px 0;
        }

        .readonly-notice {
            background: rgba(29, 141, 184, 0.08);
            border: 1px solid rgba(29, 141, 184, 0.25);
            border-radius: 8px;
            color: var(--ink);
            margin: 0 0 18px;
            padding: 14px 16px;
        }

        .readonly-notice strong {
            display: block;
            margin-bottom: 3px;
        }

        .section-title {
            margin: 28px 0 12px;
            font-size: 1.35rem;
        }

        .change-log {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid var(--line);
            border-radius: 8px;
            overflow: hidden;
        }

        .change-log ol {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .change-log li {
            border-bottom: 1px solid var(--line);
            padding: 15px 18px;
        }

        .change-log li:last-child {
            border-bottom: 0;
        }

        .change-log-heading {
            align-items: center;
            display: flex;
            gap: 10px;
            justify-content: space-between;
        }

        .change-log p {
            margin: 6px 0;
        }

        .change-log small {
            color: var(--muted);
        }

        .change-type {
            border-radius: 999px;
            display: inline-flex;
            font-size: 0.75rem;
            font-weight: 800;
            padding: 4px 9px;
        }

        .change-type-added {
            background: rgba(97, 201, 168, 0.2);
            color: #17614e;
        }

        .change-type-amended {
            background: rgba(29, 141, 184, 0.16);
            color: #135875;
        }

        .change-type-removed {
            background: rgba(255, 122, 89, 0.18);
            color: #8a2f1e;
        }

        @media (max-width: 760px) {
            .page {
                width: min(100% - 20px, 1180px);
                padding-top: 116px;
            }

            .page-actions {
                right: 10px;
                top: 10px;
                width: min(150px, calc(100vw - 20px));
            }

            .page-action {
                min-height: 42px;
                padding: 9px 12px;
            }

            .masthead {
                grid-template-columns: 1fr;
                padding: 22px;
            }

            .class-mark {
                width: 88px;
            }

            .stats {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .command-heading,
            .command-form,
            .filter-controls,
            .highlight-controls {
                align-items: stretch;
                flex-direction: column;
            }

            .filter-controls legend,
            .highlight-controls legend {
                padding: 0;
            }

            .filter-controls label span,
            .filter-controls label:first-of-type span,
            .filter-controls label:last-of-type span,
            .highlight-controls label span,
            .highlight-controls label:first-of-type span,
            .highlight-controls label:last-of-type span {
                border-radius: 8px;
                justify-content: center;
                width: 100%;
            }
        }

        @media (max-width: 460px) {
            .stats {
                grid-template-columns: 1fr;
            }
        }
