h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.auth-page {
    min-height: 100vh;
    padding: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f8faff, #f3f0ff);
    color: #16213e;
}

.auth-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 28px;
}

.auth-brand-panel,
.auth-card {
    border: 1px solid #e6eaf2;
    border-radius: 28px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 18px 45px rgba(24, 36, 68, .10);
}

.auth-brand-panel {
    padding: 36px;
    background: linear-gradient(135deg, #efeaff, #ffffff);
}

.logo {
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(104,66,244,.25);
}

.auth-brand-panel h1 {
    font-size: 48px;
    margin: 0 0 10px;
}

.auth-brand-panel p {
    max-width: 520px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.6;
}

.auth-feature {
    margin-top: 14px;
    padding: 15px 18px;
    border-radius: 18px;
    background: white;
    border: 1px solid #e6eaf2;
    font-weight: 850;
}

.auth-card {
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: #efeaff;
    font-size: 32px;
}

.auth-header h2 {
    margin: 0;
    font-size: 32px;
}

.auth-header p {
    margin: 8px 0 0;
    color: #718096;
}

.auth-field {
    margin-bottom: 16px;
}

    .auth-field label {
        display: block;
        margin-bottom: 7px;
        font-size: 14px;
        font-weight: 850;
        color: #334155;
    }

.auth-input {
    width: 100%;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    padding: 15px 16px;
    background: #fff;
    font-size: 15px;
    outline: none;
}

    .auth-input:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
    }

.auth-submit {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    margin-top: 8px;
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
    color: white;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

    .auth-submit:hover {
        filter: brightness(.98);
    }

.auth-error,
.auth-validation {
    color: #dc2626;
    font-size: 13px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 18px;
    color: #718096;
    font-weight: 800;
    font-size: 13px;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e6eaf2;
    }

.external-login-box {
    border: 1px solid #e6eaf2;
    border-radius: 18px;
    padding: 16px;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .auth-page {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel h1 {
        font-size: 36px;
    }
}

.access-card {
    width: 100%;
    max-width: 550px;
    margin: auto;
    padding: 40px;
    text-align: center;
    border-radius: 28px;
    background: rgba(255,255,255,.88);
    border: 1px solid #e6eaf2;
    box-shadow: 0 18px 45px rgba(24,36,68,.10);
}

.access-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    font-size: 56px;
    border-radius: 28px;
    background: linear-gradient( 135deg, #fee2e2, #fff1f2 );
}

.access-card h1 {
    margin: 0 0 12px;
    font-size: 42px;
    font-weight: 900;
    color: #16213e;
}

.access-card p {
    margin: 0;
    font-size: 17px;
    color: #64748b;
    line-height: 1.6;
}

.access-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

    .access-actions button {
        flex: 1;
    }

.access-secondary {
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    background: white;
    color: #334155;
    font-weight: 800;
    padding: 15px;
    cursor: pointer;
    transition: .2s;
}

    .access-secondary:hover {
        background: #f8fafc;
    }

@media (max-width: 600px) {
    .access-actions {
        flex-direction: column;
    }

    .access-card {
        padding: 30px 20px;
    }

        .access-card h1 {
            font-size: 32px;
        }
}

.confirm-status {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e6eaf2;
}

.access-icon.success {
    background: linear-gradient(135deg, #dcfce7, #ecfdf5);
}

.confirm-status {
    margin-top: 24px;
}

.success-message {
    padding: 16px;
    border-radius: 18px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 700;
}

.error-message {
    padding: 16px;
    border-radius: 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 700;
}

.external-info {
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-weight: 700;
    line-height: 1.5;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

    .auth-links a {
        color: #6842f4;
        font-weight: 700;
        text-decoration: none;
    }

        .auth-links a:hover {
            text-decoration: underline;
        }

.access-icon.error {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 18px;
    color: #334155;
    font-weight: 750;
}

    .auth-checkbox input {
        width: 18px;
        height: 18px;
        accent-color: #6842f4;
    }

.passkey-box {
    display: grid;
}

.passkey-button {
    width: 100%;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    background: white;
    color: #334155;
    font-weight: 850;
    padding: 14px 16px;
    cursor: pointer;
    text-decoration: none;
}

    .passkey-button:hover {
        background: #f8fafc;
    }

.auth-code-input {
    text-align: center;
    font-size: 28px;
    letter-spacing: 8px;
    font-weight: 800;
}

.recovery-code-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.dev-link-box {
    margin-top: 20px;
    margin-bottom: 24px;
}

.dev-link {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
    color: white;
    transition: .2s;
}

    .dev-link:hover {
        filter: brightness(.95);
        color: white;
    }

.mt-3 {
    margin-top: 16px;
}

.role-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.role-description {
    margin-top: 5px;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

.approval-card {
    max-width: 680px;
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.approval-user-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.approval-avatar {
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.approval-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .approval-user-info strong {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.approval-badge {
    width: fit-content;
}

.approval-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.small-button {
    width: auto;
    padding: 9px 13px;
    font-size: 13px;
}

.approve-button {
    border: none;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.danger-button {
    border: none;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.secondary-button {
    border: none;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 700px) {
    .approval-user-card {
        align-items: stretch;
        flex-direction: column;
    }

    .approval-actions {
        justify-content: flex-end;
    }
}

.admin-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f6f7fb;
    color: #16213e;
}

.admin-sidebar {
    padding: 28px;
    background: white;
    border-right: 1px solid #e6eaf2;
}

.admin-menu-item {
    padding: 13px 15px;
    border-radius: 14px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 8px;
}

    .admin-menu-item.active {
        background: #efeaff;
        color: #6842f4;
    }

.admin-content {
    padding: 34px;
}

.admin-header {
    margin-bottom: 24px;
}

    .admin-header h1 {
        margin: 0;
        font-size: 34px;
        font-weight: 900;
    }

    .admin-header p {
        margin: 6px 0 0;
        color: #64748b;
    }

.admin-card {
    background: white;
    border: 1px solid #e6eaf2;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(24, 36, 68, .08);
}

.admin-card-header {
    margin-bottom: 16px;
}

    .admin-card-header h2 {
        margin: 0;
        font-size: 22px;
        font-weight: 900;
    }

    .admin-card-header p {
        margin: 4px 0 0;
        color: #64748b;
    }

.user-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .user-info strong {
        display: block;
        font-size: 15px;
        margin-bottom: 5px;
    }

.approval-avatar {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #eef2ff;
    color: #4f46e5;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.approval-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

    .approval-badge.approved {
        color: #15803d;
        background: #dcfce7;
    }

    .approval-badge.pending {
        color: #c2410c;
        background: #ffedd5;
    }

.user-actions {
    display: flex;
    gap: 8px;
}

.secondary-button,
.approve-button,
.danger-button {
    border: none;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.secondary-button {
    background: #e5e7eb;
    color: #111827;
}

.approve-button {
    background: #16a34a;
    color: white;
}

.danger-button {
    background: #dc2626;
    color: white;
}

@media (max-width: 800px) {
    .admin-page {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        border-right: none;
        border-bottom: 1px solid #e6eaf2;
    }

    .user-row {
        grid-template-columns: 1fr;
    }

    .user-actions {
        justify-content: flex-end;
    }
}

.admin-detail-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background: linear-gradient(135deg, #f8faff, #f3f0ff);
}

.user-detail-card {
    width: min(760px, 100%);
    padding: 34px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e6eaf2;
    box-shadow: 0 18px 45px rgba(24, 36, 68, .10);
}

.user-detail-header {
    text-align: center;
    position: relative;
    margin-bottom: 28px;
}

.back-link {
    position: absolute;
    left: 0;
    top: 0;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    cursor: pointer;
    background: #e5e7eb;
    color: #111827;
}

.user-detail-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.user-detail-header h1 {
    margin: 0;
    font-size: 30px;
    word-break: break-word;
}

.user-detail-header p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.detail-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.detail-label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.roles-header {
    margin: 28px 0 14px;
}

    .roles-header h2 {
        margin: 0;
        font-size: 24px;
    }

    .roles-header p {
        margin: 6px 0 0;
        color: #64748b;
    }

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.role-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

    .role-tile.selected {
        background: #eef2ff;
        border-color: #8b5cf6;
    }

    .role-tile strong {
        display: block;
        margin-bottom: 5px;
    }

    .role-tile span {
        font-size: 13px;
        color: #64748b;
        font-weight: 700;
    }

@media (max-width: 700px) {
    .user-detail-card {
        padding: 24px;
    }

    .back-link {
        position: static;
        margin-bottom: 18px;
    }

    .detail-section {
        flex-direction: column;
        align-items: stretch;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --bg: #f6f7fb;
    --panel: #fff;
    --text: #16213e;
    --muted: #718096;
    --line: #e6eaf2;
    --primary: #6842f4;
    --primary2: #8b5cf6;
    --shadow: 0 18px 45px rgba(24, 36, 68, .10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: linear-gradient(135deg, #f8faff, #f3f0ff);
    color: var(--text);
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #2f80ed);
    display: grid;
    place-items: center;
    color: white;
}

.nav a {
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 16px;
    font-weight: 750;
    color: #334155;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 15px;
}

    .nav a.active {
        background: #efeaff;
        color: #4f32d5;
    }

.app-sidebar small {
    color: #8a94a6;
    font-weight: 800;
    letter-spacing: .06em;
    margin: 22px 14px 0;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    font-weight: 900;
}

.tiny {
    font-size: 13px;
    color: var(--muted);
}

.app-main {
    padding: 28px 34px 40px;
}

.card {
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.mobile-topbar,
.mobile-nav-backdrop {
    display: none;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-button {
    border: 0;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.external-login-box button {
    width: 100%;
    height: 54px;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    background: white;
    color: #334155;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .external-login-box button:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        transform: translateY(-1px);
    }

    .external-login-box button:active {
        transform: translateY(0);
    }

    .external-login-box button::before {
        content: "";
        width: 18px;
        height: 18px;
        display: inline-block;
        background: linear-gradient(#f25022 0 0) top left / 8px 8px no-repeat, linear-gradient(#7fba00 0 0) top right / 8px 8px no-repeat, linear-gradient(#00a4ef 0 0) bottom left / 8px 8px no-repeat, linear-gradient(#ffb900 0 0) bottom right / 8px 8px no-repeat;
    }

.profile-link {
    text-decoration: none;
    color: inherit;
    transition: .2s;
}

    .profile-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(24, 36, 68, .08);
    }

.logout-button {
    width: 100%;
    border: 1px solid #fee2e2;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 900;
    cursor: pointer;
}

    .logout-button:hover {
        background: #fee2e2;
    }

.calendar-page {
    color: #16213e;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

    .calendar-header h1 {
        margin: 0;
        font-size: 36px;
        font-weight: 900;
    }

    .calendar-header p {
        margin: 8px 0 0;
        color: #718096;
        font-size: 18px;
    }

.calendar-card,
.calendar-side-card {
    background: white;
    border: 1px solid #e6eaf2;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 18px 45px rgba(24,36,68,.08);
}

.calendar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

    .calendar-card-header h2,
    .calendar-side-card h2 {
        margin: 0;
        font-size: 26px;
        font-weight: 900;
    }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

    .calendar-day strong {
        display: block;
        margin-bottom: 12px;
        font-size: 17px;
    }

.calendar-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

    .calendar-list-item p {
        margin: 6px 0 0;
        color: #718096;
    }

@media (max-width: 1100px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .calendar-nav strong {
        min-width: 150px;
        text-align: center;
    }

.month-grid {
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 130px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 10px;
    font-weight: 800;
    color: #64748b;
}

    .calendar-weekdays div {
        text-align: center;
        padding: 8px;
    }

.other-month {
    opacity: .35;
    background: #f8fafc;
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.calendar-side-card {
    max-height: calc(100vh - 170px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-event-list {
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-add-button {
    width: auto;
    margin-top: 0;
}

.calendar-day {
    cursor: pointer;
}

    .calendar-day:hover {
        border-color: #8b5cf6;
    }

.calendar-event {
    width: 100%;
    border: none;
    text-align: left;
    margin-top: 6px;
    padding: 8px;
    border-radius: 10px;
    background: #dbeafe;
    color: #3154d4;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.calendar-list-item {
    width: 100%;
    border: 1px solid #e6eaf2;
    border-radius: 18px;
    padding: 14px;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
}

    .calendar-list-item:hover,
    .calendar-event:hover {
        filter: brightness(.97);
    }

.event-modal {
    width: min(520px, 100%);
    border-radius: 28px;
    background: white;
    border: 1px solid #e6eaf2;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .25);
    padding: 26px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

    .modal-header h2 {
        margin: 0;
        font-size: 26px;
        font-weight: 900;
    }

    .modal-header p {
        margin: 6px 0 0;
        color: #64748b;
    }

.modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 24px;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.today {
    background: #ede9fe;
    border: 2px solid #8b5cf6;
}

    .today strong {
        color: #6842f4;
    }

.today-number {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #6842f4;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

    .calendar-tabs button {
        border: 1px solid #e6eaf2;
        background: white;
        border-radius: 999px;
        padding: 12px 18px;
        font-weight: 900;
        cursor: pointer;
        color: #64748b;
    }

        .calendar-tabs button.active {
            background: linear-gradient(135deg, #6842f4, #8b5cf6);
            color: white;
            border-color: transparent;
        }

.save-meal-button {
    margin-top: 18px;
}

.meal-list-card {
    margin-top: 24px;
}

.meal-card {
    padding: 16px;
    border-radius: 18px;
    margin-top: 12px;
}

    .meal-card p {
        margin: 6px 0 10px;
        color: #64748b;
    }

.meal-chip {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 800px) {
    .meal-ingredient-row {
        grid-template-columns: 1fr;
    }
}

.meal-card {
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid #e6eaf2;
    background: #f8fafc;
}

    .meal-card:hover {
        border-color: #8b5cf6;
    }

.chore-user-option {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}

    .chore-user-option:hover {
        background: #f9fafb;
    }

.inventory-warning {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    margin-bottom: 8px;
}

    .inventory-warning strong {
        color: #9a3412;
    }

    .inventory-warning span {
        color: #7c2d12;
        font-size: 13px;
    }

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.inventory-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inventory-stat-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.inventory-stat-card strong {
    font-size: 28px;
    font-weight: 800;
}

.stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

    .stock-row:last-child {
        border-bottom: none;
    }

    .stock-row p {
        margin: 4px 0;
        color: #6b7280;
    }

.stock-actions {
    display: flex;
    gap: 8px;
}

.barcode-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .barcode-add-row .auth-input {
        flex: 1;
    }

.barcode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.barcode-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-left: 6px;
    font-weight: 900;
    color: #3730a3;
}

.meal-ingredient-row {
    display: grid;
    grid-template-columns: 1.5fr 110px 130px 110px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.ingredient-remove-button {
    height: 48px;
    align-self: center;
}

.meal-modal {
    width: min(1400px, 95vw);
    max-width: 1400px;
}

.inventory-article-image {
    margin-bottom: 10px;
}

.inventory-preview-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 10px;
}

.inventory-article-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.inventory-article-info {
    flex: 1;
    text-align: left;
}

.inventory-article-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
}

.inventory-modal {
    width: min(1100px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inventory-modal-body {
    margin-right: -12px;
}

.inventory-modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 12px;
}

.inventory-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.inventory-form-section {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    background: #f9fafb;
}

    .inventory-form-section h3 {
        margin: 0 0 14px;
        font-size: 16px;
        font-weight: 900;
        color: #111827;
    }

    .inventory-form-section .auth-field:last-child {
        margin-bottom: 0;
    }

.inventory-modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.stock-detail-modal {
    width: min(1200px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
}

.stock-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .stock-detail-grid {
        grid-template-columns: 1fr;
    }
}

.chore-modal {
    width: min(1400px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.chore-modal-body {
    overflow-y: auto;
    padding-right: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.chore-modal-section {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 18px;
}

    .chore-modal-section h3 {
        margin: 0 0 14px;
        font-size: 1rem;
    }

.modal-actions {
    flex-shrink: 0;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.chore-assignees-section {
    grid-column: 1 / -1;
}

.chore-user-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.chore-user-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chore-user-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

    .chore-user-right input {
        width: 80px;
        text-align: right;
    }

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--line);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}

.brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 10px 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-account {
    flex-shrink: 0;
    background: rgba(255, 255, 255, .9);
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 0;
}

.nav-section-title {
    color: #8a94a6;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .06em;
    margin: 18px 14px 4px;
}

.profile {
    margin-top: 0;
}

.logout-form {
    margin-top: 10px;
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    color: #16213e;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a94a6;
}

/* =========================================================
   Kids screen + child themes
   Supports all themes: dino, ballerina, princess, knight,
   unicorn, space, pirate and jungle.
   ========================================================= */

.kid-screen {
    min-height: 100vh;
    padding: 28px;
    border-radius: 28px;
    color: var(--theme-dark);
    background: var(--theme-page-bg);
    border: 1px solid var(--theme-border);
}

.kid-banner {
    position: relative;
    width: 100%;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    line-height: normal;
    background: var(--theme-banner-bg);
}

.kid-banner-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
}

.kid-banner-text {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 0 24px;
    text-align: center;
    line-height: 1.15;
    z-index: 3;
    color: var(--theme-dark);
}

    .kid-banner-text h1 {
        margin: 0;
        font-size: clamp(32px, 5vw, 64px);
        font-weight: 900;
        line-height: 1.05;
    }

    .kid-banner-text p {
        margin: 10px 0 0;
        font-size: clamp(15px, 1.6vw, 22px);
        font-weight: 800;
        line-height: 1.2;
    }

.kid-score-card {
    width: min(620px, 85%);
    margin: clamp(-82px, -5vw, -42px) auto 24px;
    background: white;
    border-radius: 22px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    position: relative;
    z-index: 5;
}

    .kid-score-card > div {
        display: grid;
        gap: 6px;
    }

    .kid-score-card strong {
        font-size: 38px;
        font-weight: 900;
        color: var(--theme-dark);
    }

.score-icon {
    font-size: 42px;
}

.progress-bar {
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

    .progress-bar div {
        height: 100%;
        border-radius: 999px;
        background: var(--theme-primary);
    }

.kid-content-card {
    background: rgba(255, 255, 255, .84);
    border-radius: 26px;
    padding: 26px;
    margin-bottom:20px;
}

.kid-task {
    display: grid;
    grid-template-columns: 54px 1fr 42px 70px;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    margin-top: 12px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

.task-icon {
    font-size: 30px;
}

.task-title {
    font-size: 17px;
    font-weight: 800;
}

.task-check {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid currentColor;
    background: white;
    color: var(--theme-primary);
    font-weight: 900;
}

.task-points {
    color: var(--theme-primary);
    font-weight: 900;
    text-align: right;
}

.encouragement-card {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 86px 1fr 72px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 22px;
    border: 1px solid var(--theme-border);
    background: linear-gradient(135deg, var(--theme-card-start), var(--theme-card-end));
}

    .encouragement-character,
    .encouragement-card img {
        width: 72px;
        height: 72px;
        object-fit: contain;
        align-self: end;
    }

    .encouragement-text strong,
    .encouragement-card strong {
        display: block;
        font-size: 18px;
        font-weight: 900;
        color: var(--theme-dark);
        margin-bottom: 4px;
    }

    .encouragement-text p,
    .encouragement-card p {
        margin: 0;
        color: var(--theme-dark);
        opacity: .9;
    }

    .encouragement-badge,
    .encouragement-card span {
        justify-self: end;
        font-size: 38px;
        opacity: .9;
    }

.kid-character {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

.kid-theme-dino {
    --theme-primary: #45a847;
    --theme-secondary: #8bd46f;
    --theme-border: #a7e0a3;
    --theme-dark: #075f22;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #e8f6de;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #d8f7c8, #8bd46f);
    --theme-card-start: #f1fbec;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-ballerina {
    --theme-primary: #ec4899;
    --theme-secondary: #ffb4d8;
    --theme-border: #f9a8d4;
    --theme-dark: #db2777;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #fff0f7;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #ffe4f1, #ffb4d8);
    --theme-card-start: #fff0f7;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-princess {
    --theme-primary: #a855f7;
    --theme-secondary: #d8b4fe;
    --theme-border: #d8b4fe;
    --theme-dark: #7e22ce;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #faf0ff;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #f8e7ff, #d8b4fe);
    --theme-card-start: #faf0ff;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-knight {
    --theme-primary: #475569;
    --theme-secondary: #94a3b8;
    --theme-border: #cbd5e1;
    --theme-dark: #1e293b;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #eef2f7;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #e2e8f0, #94a3b8);
    --theme-card-start: #f1f5f9;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-unicorn {
    --theme-primary: #d946ef;
    --theme-secondary: #f9a8d4;
    --theme-border: #f0abfc;
    --theme-dark: #a21caf;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #fdf4ff;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #fae8ff, #f9a8d4);
    --theme-card-start: #fdf4ff;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-space {
    --theme-primary: #2563eb;
    --theme-secondary: #7c3aed;
    --theme-border: #bfdbfe;
    --theme-dark: #1e3a8a;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #eff6ff;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #dbeafe, #c4b5fd);
    --theme-card-start: #eff6ff;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-pirate {
    --theme-primary: #b45309;
    --theme-secondary: #ef4444;
    --theme-border: #fed7aa;
    --theme-dark: #7c2d12;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #fff7ed;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #ffedd5, #fca5a5);
    --theme-card-start: #fff7ed;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

.kid-theme-jungle {
    --theme-primary: #16a34a;
    --theme-secondary: #84cc16;
    --theme-border: #86efac;
    --theme-dark: #166534;
    /* Solid color until below the arch, then fade to white */
    --theme-solid-bg: #f0fdf4;
    --theme-page-bg: linear-gradient( to bottom, var(--theme-solid-bg) 0, var(--theme-solid-bg) 520px, #ffffff 100% );
    --theme-banner-bg: linear-gradient(135deg, #dcfce7, #bef264);
    --theme-card-start: #f0fdf4;
    --theme-card-end: #ffffff;
    /* The arch uses the same solid color as the top part of the page */
    --theme-arch-bg: var(--theme-solid-bg);
}

@media (max-width: 700px) {
    .kid-screen {
        padding: 14px;
        border-radius: 18px;
    }

    .kid-banner {
        border-radius: 20px 20px 0 0;
    }

    .kid-banner-text {
        top: 18px;
        padding: 0 14px;
    }

    .kid-score-card {
        width: 94%;
        grid-template-columns: 1fr;
        margin-top: -28px;
        padding: 18px;
    }

    .kid-task {
        grid-template-columns: 42px 1fr 36px 52px;
        padding: 12px;
    }

    .encouragement-card {
        grid-template-columns: 64px 1fr 44px;
        padding: 14px;
    }

        .encouragement-character,
        .encouragement-card img {
            width: 58px;
            height: 58px;
        }
}

.child-form {
    display: grid;
    grid-template-columns: 1fr 120px 220px auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.children-card {
    margin-top: 24px;
}

.children-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

    .children-header h2 {
        margin: 0;
    }

    .children-header p {
        margin: 4px 0 0;
        color: #64748b;
    }

.child-create-hero {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(104, 66, 244, .18), transparent 34%), linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e0e7ff;
    margin-bottom: 24px;
}

.child-create-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255,255,255,.75);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

    .child-create-preview strong {
        display: block;
        font-size: 20px;
        font-weight: 900;
    }

    .child-create-preview span {
        color: #64748b;
        font-weight: 700;
    }

.child-create-avatar,
.child-big-icon,
.child-modal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 38px;
    background: white;
    box-shadow: 0 10px 24px rgba(24, 36, 68, .12);
}

.child-create-fields {
    display: grid;
    grid-template-columns: 1fr 240px auto;
    gap: 14px;
    align-items: end;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .form-field label {
        font-size: 12px;
        font-weight: 900;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

.pretty-input {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 13px 15px;
    font-size: 14px;
    font-weight: 700;
    background: white;
    outline: none;
}

    .pretty-input:focus {
        border-color: #6842f4;
        box-shadow: 0 0 0 4px rgba(104, 66, 244, .12);
    }

.child-create-button {
    border: none;
    border-radius: 18px;
    padding: 14px 20px;
    font-weight: 900;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
    box-shadow: 0 12px 24px rgba(104, 66, 244, .24);
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.child-profile-card {
    padding: 20px;
    border-radius: 26px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .child-profile-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
    }

.child-card-info h3 {
    margin: 14px 0 4px;
    font-size: 22px;
    font-weight: 900;
}

.child-card-info p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.child-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.empty-children {
    text-align: center;
    padding: 32px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
}

    .empty-children div {
        font-size: 42px;
        margin-bottom: 8px;
    }

    .empty-children strong {
        display: block;
        color: #0f172a;
        font-size: 20px;
    }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 20px;
}

.child-modal {
    width: min(560px, 100%);
    border-radius: 30px;
    background: white;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
    overflow: hidden;
}

.child-modal-header {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #e5e7eb;
}

    .child-modal-header h2 {
        margin: 0;
        font-size: 24px;
    }

    .child-modal-header p {
        margin: 4px 0 0;
        color: #64748b;
    }

.modal-close-button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}

.child-modal-body {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.child-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 22px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 900px) {
    .child-create-hero,
    .child-create-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-layout {
        display: block;
        min-height: 100vh;
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 12px;
        background: rgba(255, 255, 255, .95);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--line);
    }

        .mobile-topbar .logo {
            width: 34px;
            height: 34px;
            font-size: 18px;
            border-radius: 12px;
        }

        .mobile-topbar .brand-title {
            font-size: 18px;
        }

        .mobile-topbar .brand-subtitle {
            display: none;
        }

    .mobile-menu-button {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 21px;
    }

    .app-main {
        padding: 56px 0 0;
    }

    .admin-content {
        padding: 12px;
    }

    .admin-header {
        margin-bottom: 14px;
    }

        .admin-header h1 {
            font-size: 26px;
        }

        .admin-header p {
            font-size: 14px;
        }

    .app-sidebar {
        position: fixed;
        z-index: 1300;
        top: 0;
        left: 0;
        width: min(84vw, 330px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 24px 0 60px rgba(15, 23, 42, .18);
    }

    .mobile-nav-open .app-sidebar {
        transform: translateX(0);
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1250;
        border: 0;
        background: rgba(15, 23, 42, .38);
    }

    .nav a {
        min-height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .calendar-page {
        width: 100%;
        overflow-x: hidden;
    }

    .calendar-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 18px;
    }

        .calendar-header h1 {
            font-size: 28px;
        }

        .calendar-header p {
            font-size: 14px;
        }

        .calendar-add-button,
        .calendar-header .approve-button {
            width: 100%;
            padding: 13px 16px;
        }

    .calendar-tabs {
        overflow-x: auto;
        padding-bottom: 4px;
        margin-bottom: 14px;
    }

        .calendar-tabs button {
            flex: 0 0 auto;
            padding: 10px 14px;
            white-space: nowrap;
        }

    .calendar-layout {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .calendar-card,
    .calendar-side-card {
        padding: 14px;
        border-radius: 18px;
    }

    .calendar-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 14px;
    }

        .calendar-card-header h2,
        .calendar-side-card h2 {
            font-size: 22px;
        }

    .calendar-nav {
        justify-content: space-between;
        gap: 8px;
    }

        .calendar-nav strong {
            min-width: 0;
            flex: 1;
            font-size: 15px;
        }

        .calendar-nav button {
            flex-shrink: 0;
            padding: 9px 12px;
        }

    .calendar-weekdays {
        display: none;
    }

    .month-grid,
    .calendar-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .calendar-day {
        min-height: unset;
        padding: 12px;
        border-radius: 14px;
    }

        .calendar-day strong {
            margin-bottom: 6px;
        }

    .other-month {
        display: none;
    }

    .calendar-event {
        font-size: 13px;
        padding: 8px 10px;
        white-space: normal;
    }

    .calendar-side-card {
        max-height: none;
    }

    .calendar-event-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .calendar-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .event-modal {
        width: 100%;
        max-height: 90dvh;
        overflow-y: auto;
        padding: 18px;
        border-radius: 22px;
    }

    .modal-header {
        align-items: flex-start;
    }

        .modal-header h2 {
            font-size: 22px;
        }

    .modal-actions {
        flex-direction: column-reverse;
    }

        .modal-actions button {
            width: 100%;
        }
}

@media (max-width: 900px) {
    .mobile-past-day {
        display: none !important;
    }
}

.child-today-card {
    margin-bottom: 40px;
}

.child-today-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

    .child-today-header h2 {
        margin: 0;
    }

    .child-today-header p {
        margin: 4px 0 0;
        color: #64748b;
        font-weight: 700;
    }

.today-chore-list {
    display: grid;
    gap: 10px;
}

.today-chore-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

    .today-chore-row.completed {
        background: #ecfdf5;
        border-color: #bbf7d0;
    }

.today-chore-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: white;
    display: grid;
    place-items: center;
    font-size: 24px;
}

.today-chore-row strong {
    display: block;
    font-size: 16px;
}

.today-chore-row p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
}

.completed-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: #16a34a;
    color: white;
    font-size: 13px;
    font-weight: 900;
}

.stock-upload-panel {
    margin-bottom: 24px;
    overflow: hidden;
}

.stock-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

    .stock-upload-header h2 {
        margin: 0;
        font-size: 24px;
        font-weight: 900;
    }

    .stock-upload-header p {
        margin: 5px 0 0;
        color: #64748b;
        font-weight: 700;
    }

.stock-upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    font-size: 28px;
}

.store-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.store-upload-tile {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 18px;
    background: radial-gradient(circle at top right, rgba(104, 66, 244, .12), transparent 34%), #f8fafc;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

    .store-upload-tile:hover {
        transform: translateY(-2px);
        border-color: #c4b5fd;
        box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
    }

.store-upload-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

    .store-upload-top strong {
        display: block;
        font-size: 18px;
        font-weight: 900;
    }

    .store-upload-top p {
        margin: 3px 0 0;
        color: #64748b;
        font-size: 13px;
        font-weight: 700;
    }

.store-upload-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: white;
    box-shadow: 0 10px 24px rgba(24, 36, 68, .10);
    font-size: 24px;
}

.store-upload-dropzone {
    min-height: 120px;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    background: rgba(255,255,255,.75);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 16px;
    cursor: pointer;
    transition: .15s ease;
}

    .store-upload-dropzone:hover {
        border-color: #8b5cf6;
        background: white;
    }

.store-upload-input {
    display: none;
}

.store-upload-cloud {
    font-size: 30px;
    margin-bottom: 6px;
}

.store-upload-dropzone b {
    color: #111827;
    font-weight: 900;
}

.store-upload-dropzone small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 700;
}

.home-page {
    padding: 34px;
}

.home-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding: 30px;
    border-radius: 30px;
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
    color: white;
    box-shadow: 0 22px 55px rgba(104,66,244,.25);
}

    .home-hero h1 {
        margin: 0;
        font-size: 42px;
        font-weight: 950;
    }

    .home-hero p {
        margin: 8px 0 0;
        opacity: .9;
    }

.home-eyebrow {
    font-weight: 900;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.home-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid #e6eaf2;
    border-radius: 24px;
    background: white;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(24,36,68,.07);
}

    .home-stat-card span {
        width: 54px;
        height: 54px;
        display: grid;
        place-items: center;
        border-radius: 18px;
        background: #f3f0ff;
        font-size: 28px;
    }

    .home-stat-card strong {
        display: block;
        font-size: 30px;
        line-height: 1;
    }

    .home-stat-card p {
        margin: 4px 0 0;
        color: #64748b;
        font-weight: 800;
    }

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
}

    .home-panel-header h2 {
        margin: 0;
        font-size: 24px;
        font-weight: 950;
    }

    .home-panel-header p {
        margin: 4px 0 0;
        color: #64748b;
    }

.home-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2f7;
}

    .home-list-item:last-child {
        border-bottom: none;
    }

.home-list-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #f8fafc;
    font-size: 23px;
    flex: 0 0 auto;
}

.home-list-item strong {
    display: block;
}

.home-list-item p {
    margin: 4px 0 0;
    color: #64748b;
}

.home-empty {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
}

@media (max-width: 1050px) {
    .home-stats,
    .home-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .home-page {
        padding: 18px;
    }

    .home-hero {
        align-items: stretch;
        flex-direction: column;
    }

        .home-hero h1 {
            font-size: 34px;
        }

    .home-stats,
    .home-grid {
        grid-template-columns: 1fr;
    }
}

.clickable-brand {
    cursor: pointer;
    transition: .15s ease;
}

    .clickable-brand:hover {
        opacity: .9;
        transform: translateY(-1px);
    }

.store-article-edit {
    grid-template-columns: auto 100px 90px 130px auto auto;
    gap: 10px;
    align-items: center;
}

.store-article-header,
.store-article-row {
    display: grid;
    grid-template-columns: 400px 220px 120px 100px 140px 280px;
    gap: 12px;
    align-items: center;
}

.store-article-header {
    position: sticky;
    top: 0;
    background: #eef2ff;
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
    color: #64748b;
}

.store-article-row {
    padding: 14px 16px;
    border-radius: 14px;
    margin-top: 8px;
}

    .store-article-row:nth-child(even) {
        background: #f8fafc;
    }

    .store-article-row:nth-child(odd) {
        background: white;
    }

.store-article-product {
    min-width: 0;
}

.store-article-edit {
    display: contents;
}

.store-article-actions button {
    min-width: 120px;
}

.unknown-store-article-row {
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
}

    .unknown-store-article-row:nth-child(even) {
        background: #f8fafc;
    }

    .unknown-store-article-row:nth-child(odd) {
        background: white;
    }

.unknown-article-help {
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

    .unknown-article-help p {
        margin: 6px 0 0;
        color: #64748b;
        font-weight: 700;
        line-height: 1.4;
    }

.store-article-product {
    margin-bottom: 14px;
}

.store-article-title {
    font-weight: 900;
    font-size: 16px;
}

.store-article-code {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.unknown-article-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.unknown-field:first-child {
    grid-column: span 2;
}

.unknown-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
}

.unknown-field .auth-input,
.unknown-field input {
    width: 100%;
    min-width: 0;
}

.store-article-table {
    overflow-x: hidden;
}

.store-article-table-header > div {
    text-align: left;
}

.store-article-table-row:nth-child(odd) {
    background: white;
}

.store-article-table-row p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.store-article-actions button {
    flex: 1;
}

@media (max-width: 1200px) {
    .store-article-table-header {
        display: none;
    }

    .store-article-table-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-article-actions {
        grid-column: 1 / -1;
    }
}

.store-article-table-row > div {
    align-self: center;
}

.store-article-table {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.store-article-table-header,
.store-article-table-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) 120px 80px 100px 120px;
    gap: 12px;
    align-items: center;
}

.store-article-table-header {
    padding: 12px 16px;
    border-radius: 16px;
    background: #eef2ff;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.store-article-table-row {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-top: 8px;
    background: white;
}

    .store-article-table-row:nth-child(even) {
        background: #f8fafc;
    }

    .store-article-table-row > div {
        min-width: 0;
    }

.store-product-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.store-article-actions {
    display: grid;
    gap: 6px;
}

    .store-article-actions button {
        width: 100%;
        padding: 8px 10px;
        font-size: 12px;
    }

.store-article-table-row .auth-input {
    width: 100%;
    min-width: 0;
    padding: 12px;
}

@media (max-width: 1300px) {
    .store-article-table-header {
        display: none;
    }

    .store-article-table-row {
        grid-template-columns: 1fr 1fr;
    }

    .store-article-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, 1fr);
    }
}

.kid-banner {
    position: relative;
    overflow: hidden;
    border-radius: 26px 26px 0 0;
}

    .kid-banner::after {
        content: "";
        position: absolute;
        left: -8%;
        right: -8%;
        bottom: -76px;
        height: 150px;
        background: var(--theme-arch-bg);
        border-radius: 50% 50% 0 0;
        z-index: 2;
        pointer-events: none;
    }

.kid-banner-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
}

.kid-banner-text {
    position: absolute;
    z-index: 3;
}

.kid-score-card {
    position: relative;
    z-index: 5;
}

.encouragement-character {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

    .encouragement-character.mirrored {
        justify-self: end;
        transform: scaleX(-1);
        opacity: 0.75;
    }

.score-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.level-badge {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.points-block {
    display: flex;
    flex-direction: column;
}

    .points-block strong {
        font-size: 3.5rem;
        line-height: 1;
    }

    .points-block span {
        font-size: 1.1rem;
    }

.level-info {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.translation-missing {
    background: rgba(255, 193, 7, 0.12);
}

.table-wrapper {
    overflow-x: auto;
}

.admin-table input {
    width: 100%;
}

/* TRANSLATIONS */

.admin-page {
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

    .page-header h1 {
        margin: 0;
        font-size: 2rem;
    }

    .page-header p {
        margin: 6px 0 0;
        color: #6b7280;
    }

.form-row {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 16px;
    margin-bottom: 20px;
    align-items: end;
}

    .form-row label {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-weight: 700;
        color: #374151;
    }

    .form-row input,
    .form-row select,
    .admin-table input {
        border: 1px solid #d1d5db;
        border-radius: 14px;
        padding: 11px 13px;
        font: inherit;
        background: white;
        outline: none;
    }

        .form-row input:focus,
        .form-row select:focus,
        .admin-table input:focus {
            border-color: #7c3aed;
            box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
        }

.table-wrapper {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

    .admin-table th {
        background: #f9fafb;
        text-align: left;
        padding: 14px 16px;
        color: #6b7280;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .admin-table td {
        padding: 14px 16px;
        border-top: 1px solid #eef2f7;
        vertical-align: middle;
    }

        .admin-table td:first-child {
            width: 260px;
        }

        .admin-table td:nth-child(2) {
            color: #4b5563;
        }

    .admin-table input {
        width: 100%;
    }

.translation-missing {
    background: #fff7ed;
}

    .translation-missing td:first-child strong::after {
        content: " missing";
        margin-left: 8px;
        padding: 3px 8px;
        border-radius: 999px;
        background: #fed7aa;
        color: #9a3412;
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
    }

.tiny {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 10px 0 16px;
}

@media (max-width: 800px) {
    .admin-page {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header .approve-button {
        width: 100%;
    }
}

.translation-summary {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 700;
    margin-bottom: 16px;
}

/* TRANSLATIONS PAGE */

.admin-page {
    padding: 28px;
    max-width: 1500px;
}

.admin-card {
    border-radius: 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

    .page-header h1 {
        margin: 0;
        font-size: 2.4rem;
        line-height: 1;
        color: #172033;
    }

    .page-header p {
        max-width: 520px;
        margin: 10px 0 0;
        color: #6b7280;
        font-size: 1.05rem;
    }

    .page-header .approve-button {
        min-width: 190px;
        border-radius: 999px;
        padding: 14px 22px;
        white-space: normal;
    }

.form-row {
    display: grid;
    grid-template-columns: 220px minmax(320px, 1fr) 220px;
    gap: 20px;
    margin-bottom: 24px;
}

    .form-row label {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-weight: 800;
        color: #263247;
    }

    .form-row input,
    .form-row select {
        height: 56px;
        border: 1px solid #dde2ea;
        border-radius: 18px;
        padding: 0 18px;
        background: #fff;
        font: inherit;
        font-weight: 700;
        outline: none;
    }

        .form-row input:focus,
        .form-row select:focus,
        .translation-input:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.14);
        }

.translation-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 22px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f3f4f8;
    color: #374151;
    font-weight: 900;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #edf0f5;
    border-radius: 24px;
    background: #fff;
}

.admin-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
}

    .admin-table th {
        padding: 18px 20px;
        background: #f8fafc;
        color: #7b8496;
        text-align: left;
        font-size: 0.8rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .admin-table td {
        padding: 18px 20px;
        border-top: 1px solid #eef2f7;
        vertical-align: middle;
    }

        .admin-table th:first-child,
        .admin-table td:first-child {
            width: 260px;
        }

        .admin-table th:nth-child(2),
        .admin-table td:nth-child(2) {
            width: 360px;
        }

        .admin-table th:last-child,
        .admin-table td:last-child {
            width: 120px;
            text-align: right;
        }

    .admin-table strong {
        color: #172033;
    }

.translation-default {
    color: #4b5563;
    line-height: 1.4;
}

.translation-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dde2ea;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    resize: vertical;
    outline: none;
}

.translation-missing {
    background: #fff8ed;
}

.translation-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fed7aa;
    color: #9a3412;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    vertical-align: middle;
}

.translation-status {
    margin-top: 16px;
    color: #4b5563;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

        .form-row label:nth-child(2) {
            grid-column: 1 / -1;
            order: 3;
        }
}

@media (max-width: 700px) {
    .admin-page {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
    }

        .page-header .approve-button {
            width: 100%;
        }

    .form-row {
        grid-template-columns: 1fr;
    }

        .form-row label:nth-child(2) {
            grid-column: auto;
            order: unset;
        }
}

/* TRANSLATIONS */

.translation-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.translation-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.translation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

    .translation-header h1 {
        margin: 0;
        font-size: 42px;
        font-weight: 900;
        color: var(--text);
    }

    .translation-header p {
        margin: 10px 0 0;
        color: var(--muted);
        font-size: 18px;
        line-height: 1.45;
    }

    .translation-header .approve-button {
        flex-shrink: 0;
        padding: 16px 26px;
        font-size: 15px;
    }

.translation-toolbar {
    display: grid;
    grid-template-columns: 240px minmax(320px, 1fr) 240px;
    gap: 18px;
    margin-bottom: 24px;
}

    .translation-toolbar label {
        display: grid;
        gap: 8px;
        font-weight: 900;
        color: #263247;
    }

    .translation-toolbar input,
    .translation-toolbar select {
        height: 56px;
        border: 1px solid #dbe3ef;
        border-radius: 18px;
        padding: 0 18px;
        background: white;
        font: inherit;
        font-weight: 800;
        outline: none;
    }

        .translation-toolbar input:focus,
        .translation-toolbar select:focus,
        .translation-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(104, 66, 244, .12);
        }

.translation-summary {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 900;
}

.translation-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e6eaf2;
    border-radius: 22px;
}

.translation-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

    .translation-table th {
        padding: 16px 18px;
        background: #f8fafc;
        color: #64748b;
        text-align: left;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .translation-table td {
        padding: 16px 18px;
        border-top: 1px solid #eef2f7;
        vertical-align: middle;
    }

        .translation-table th:nth-child(1),
        .translation-table td:nth-child(1) {
            width: 260px;
        }

        .translation-table th:nth-child(2),
        .translation-table td:nth-child(2) {
            width: 360px;
        }

        .translation-table th:nth-child(4),
        .translation-table td:nth-child(4) {
            width: 110px;
            text-align: right;
        }

.translation-default {
    color: #475569;
    line-height: 1.45;
}

.translation-input {
    width: 100%;
    min-height: 54px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 12px 14px;
    background: white;
    font: inherit;
    font-weight: 700;
    resize: vertical;
    outline: none;
}

.translation-missing {
    background: #fff7ed;
}

.translation-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fed7aa;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.translation-status {
    margin: 16px 0 0;
    color: #334155;
    font-weight: 800;
}

@media (max-width: 900px) {
    .translation-card {
        padding: 20px;
        border-radius: 22px;
    }

    .translation-header {
        flex-direction: column;
    }

        .translation-header h1 {
            font-size: 32px;
        }

        .translation-header .approve-button {
            width: 100%;
        }

    .translation-toolbar {
        grid-template-columns: 1fr;
    }
}

.family-selector {
    padding: 12px;
}

    .family-selector label {
        display: block;
        font-size: 0.75rem;
        opacity: 0.7;
        margin-bottom: 4px;
    }

    .family-selector select {
        width: 100%;
        padding: 8px;
        border-radius: 8px;
    }

.admin-section {
    margin-top: 1.5rem;
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.family-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.family-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: rgba(99, 102, 241, 0.12);
    margin-bottom: 0.75rem;
}

.family-card h3 {
    margin: 0;
}

.family-card p {
    margin: 0.35rem 0 0;
    color: #64748b;
}

.family-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.family-list-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.family-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, 0.12);
    font-size: 1.25rem;
}

.status-message {
    margin-top: 0.85rem;
    color: #334155;
}

.empty-state {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.family-page {
    min-height: calc(100vh - 56px);
    padding: 34px;
    background: linear-gradient(135deg, #f8faff, #f3f0ff);
}

.family-panel {
    width: min(1100px, 100%);
    margin: 0 auto;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e6eaf2;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 18px 45px rgba(24, 36, 68, .10);
}

.family-form-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 260px auto;
    gap: 14px;
    align-items: end;
}

    .family-form-row label {
        display: flex;
        flex-direction: column;
        gap: 7px;
        font-size: 12px;
        font-weight: 900;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .family-form-row input,
    .family-form-row select {
        width: 100%;
        border: 1px solid #dbe3ef;
        border-radius: 16px;
        padding: 13px 15px;
        font-size: 14px;
        font-weight: 700;
        background: white;
        outline: none;
    }

        .family-form-row input:focus,
        .family-form-row select:focus {
            border-color: #6842f4;
            box-shadow: 0 0 0 4px rgba(104, 66, 244, .12);
        }

.family-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 1rem;
}

.family-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

    .family-list-item strong {
        word-break: break-word;
    }

.family-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.25rem;
}

@media (max-width: 800px) {
    .family-page {
        padding: 14px;
    }

    .family-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .family-form-row {
        grid-template-columns: 1fr;
    }

        .family-form-row .approve-button {
            width: 100%;
        }
}

.family-form-row.single {
    grid-template-columns: minmax(260px, 420px);
}

.brand-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
}

.mobile-topbar .brand-logo {
    width: 34px;
    height: 34px;
}

.auth-brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
}

/* =========================================================
   Consordo account pages
   ========================================================= */

.auth-brand-panel .brand {
    padding: 0 0 22px;
    margin-bottom: 26px;
}

    .auth-brand-panel .brand span {
        font-size: 26px;
        font-weight: 950;
        color: #16213e;
    }

.auth-card,
.auth-brand-panel,
.access-card {
    backdrop-filter: blur(18px);
}

.auth-links {
    display: grid;
    gap: 9px;
}

.auth-submit,
a.auth-submit,
.access-secondary,
a.access-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.text-decoration-none {
    text-decoration: none !important;
}

.text-center {
    text-align: center !important;
}

.account-page {
    min-height: 100vh;
    padding: 30px;
    color: #16213e;
    background: radial-gradient(circle at top left, rgba(104, 66, 244, .14), transparent 34rem), linear-gradient(135deg, #f8faff, #f3f0ff);
}

.account-hero-card,
.account-side-card,
.account-content-card {
    border: 1px solid #e6eaf2;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 45px rgba(24, 36, 68, .10);
    backdrop-filter: blur(18px);
}

.account-hero-card {
    width: min(1180px, 100%);
    margin: 0 auto 24px;
    border-radius: 30px;
    padding: 26px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.account-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

    .account-brand img {
        width: 52px;
        height: 52px;
        object-fit: contain;
    }

.account-brand-title {
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.account-brand-subtitle,
.account-kicker,
.account-side-title {
    color: #8a94a6;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-hero-text {
    text-align: right;
}

    .account-hero-text h1 {
        margin: 5px 0 6px;
        font-size: clamp(32px, 5vw, 48px);
        font-weight: 950;
        letter-spacing: -.04em;
    }

    .account-hero-text p {
        margin: 0;
        color: #64748b;
        font-size: 17px;
        line-height: 1.6;
    }

.account-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.account-side-card,
.account-content-card {
    border-radius: 28px;
    padding: 22px;
}

.account-side-card {
    position: sticky;
    top: 24px;
}

.account-side-title {
    margin: 2px 10px 16px;
}

.account-nav {
    display: grid;
    gap: 8px;
}

    .account-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 14px;
        border-radius: 16px;
        color: #334155;
        font-size: 15px;
        font-weight: 850;
        text-decoration: none;
        transition: .2s ease;
    }

        .account-nav a:hover {
            background: #f8fafc;
            transform: translateY(-1px);
        }

        .account-nav a.active {
            background: #efeaff;
            color: #4f32d5;
        }

.account-content-card h3 {
    margin: 0 0 18px;
    font-size: 30px;
    font-weight: 950;
    letter-spacing: -.03em;
}

.account-content-card h4 {
    margin: 28px 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.account-content-card p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

.account-content-card hr {
    border: none;
    border-top: 1px solid #e6eaf2;
    margin: 20px 0;
}

.account-content-card .row,
.account-content-card .col-xl-6,
.account-content-card .col-lg-6,
.account-content-card .col-md-6 {
    width: 100%;
    max-width: 640px;
}

.account-content-card form {
    max-width: 640px;
}

.account-content-card .form-floating,
.account-content-card .mb-3 {
    margin-bottom: 16px;
}

    .account-content-card .form-floating:not(.input-group) {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

.account-content-card .form-label,
.account-content-card label {
    color: #334155;
    font-size: 14px;
    font-weight: 850;
}

.account-content-card .form-control,
.account-content-card input[type="text"],
.account-content-card input[type="email"],
.account-content-card input[type="password"],
.account-content-card input[type="tel"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    color: #16213e;
    font-size: 15px;
    outline: none;
}

    .account-content-card .form-control:focus,
    .account-content-card input:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
    }

    .account-content-card .form-control:disabled,
    .account-content-card input:disabled {
        background: #f8fafc;
        color: #64748b;
    }

.account-content-card .validation-message,
.account-content-card .text-danger {
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 750;
}

.account-content-card .btn,
.account-content-card button.btn,
.account-content-card a.btn {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

    .account-content-card .btn:hover {
        filter: brightness(.98);
        transform: translateY(-1px);
    }

.account-content-card .btn-primary {
    background: linear-gradient(135deg, #6842f4, #8b5cf6);
}

.account-content-card .btn-danger {
    background: #dc2626;
}

.account-content-card .btn-link {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #6842f4;
    font-weight: 850;
}

.account-content-card .btn-lg {
    min-height: 52px;
    font-size: 15px;
}

.account-content-card .w-100 {
    width: 100%;
}

.account-content-card .alert,
.alert {
    margin: 0 0 18px;
    padding: 15px 17px;
    border-radius: 18px;
    border: 1px solid #e6eaf2;
    background: #f8fafc;
    color: #334155;
    font-weight: 750;
    line-height: 1.5;
}

.account-content-card .alert-success,
.alert-success {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}

.account-content-card .alert-danger,
.alert-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.account-content-card .alert-warning,
.alert-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.account-content-card .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

    .account-content-card .table td {
        padding: 14px;
        background: #f8fafc;
        border-top: 1px solid #e6eaf2;
        border-bottom: 1px solid #e6eaf2;
        vertical-align: middle;
    }

        .account-content-card .table td:first-child {
            border-left: 1px solid #e6eaf2;
            border-radius: 16px 0 0 16px;
            font-weight: 850;
        }

        .account-content-card .table td:last-child {
            border-right: 1px solid #e6eaf2;
            border-radius: 0 16px 16px 0;
            text-align: right;
        }

.account-content-card code,
.account-content-card kbd {
    display: inline-block;
    border-radius: 10px;
    padding: 3px 7px;
    background: #f1f5f9;
    color: #4f32d5;
    font-weight: 800;
}

@media (max-width: 900px) {
    .account-page {
        padding: 18px;
    }

    .account-hero-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-hero-text {
        text-align: left;
    }

    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-side-card {
        position: static;
    }

    .account-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-shell {
        display: block;
    }

    .auth-card {
        padding: 24px;
    }

    .account-nav {
        grid-template-columns: 1fr;
    }

    .account-content-card {
        padding: 18px;
    }

        .account-content-card .table,
        .account-content-card .table tbody,
        .account-content-card .table tr,
        .account-content-card .table td {
            display: block;
            width: 100%;
        }

            .account-content-card .table td,
            .account-content-card .table td:first-child,
            .account-content-card .table td:last-child {
                border: 1px solid #e6eaf2;
                border-radius: 16px;
                text-align: left;
            }
}

.global-error-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, rgba(104, 66, 244, .14), transparent 45%), #f8fafc;
}
.global-error-card {
    width: min(620px, 100%);
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: white;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .14);
    text-align: center;
}
.global-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 34px;
    font-weight: 950;
}
.global-error-eyebrow { color: #6842f4; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.global-error-card h1 { margin: 8px 0 12px; }
.global-error-card p { color: #64748b; }
.global-error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
