:root {
    color-scheme: light;
    --app-ink: #263348;
    --app-muted: #708098;
    --app-soft: #f4f7fb;
    --app-line: #e5ebf3;
    --app-accent: #18b8c7;
    --app-accent-2: #35caa2;
    --app-blue: #24589b;
    --app-blue-2: #2f67aa;
    --app-dark: #193f76;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--app-ink);
}

.font-black {
    font-weight: 700 !important;
}

.font-bold,
.font-semibold {
    font-weight: 600 !important;
}

.tracking-wide {
    letter-spacing: 0 !important;
}

.app-shell {
    background: #eef2f7;
}

.auth-page {
    position: relative;
    overflow: hidden;
    background: #dfe9f2;
}

.auth-page::before {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    width: min(38vw, 44rem);
    height: 100vh;
    background: #113c6a;
}

.auth-page-main {
    position: relative;
    z-index: 2;
}

.auth-shell {
    display: grid;
    position: relative;
    width: min(58rem, 100%);
    min-height: 31rem;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 0;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 42px 110px rgba(15, 35, 65, .34), 0 12px 32px rgba(15, 35, 65, .18);
}

.auth-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: inherit;
}

.auth-visual {
    position: relative;
    display: flex;
    min-height: 31rem;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 76% 46%, rgba(24, 184, 199, .24), transparent 8rem),
        linear-gradient(145deg, var(--app-blue) 0%, var(--app-dark) 100%);
    padding: 1.9rem;
    color: #fff;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(255,255,255,.045) 0 1px, transparent 1px 24px),
        radial-gradient(circle at 75% 40%, rgba(255,255,255,.08), transparent 12rem);
    opacity: .9;
}

.auth-brand,
.auth-visual-content,
.auth-dots,
.auth-mark {
    position: relative;
    z-index: 1;
}

.auth-brand {
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: .35rem;
    padding: .55rem .9rem;
    color: rgba(255, 255, 255, .82);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
}

.auth-visual-content {
    max-width: 23rem;
    margin-top: 2.1rem;
    margin-bottom: auto;
}

.auth-visual-content h1 {
    margin-top: .6rem;
    font-size: clamp(2.45rem, 4.3vw, 3.7rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .015em;
}

.auth-visual-content p:last-child {
    margin-top: 1.2rem;
    max-width: 20rem;
    color: rgba(255, 255, 255, .72);
    font-size: .95rem;
    line-height: 1.7;
}

.auth-kicker {
    color: #9eeef4;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-dots i {
    position: absolute;
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: var(--app-accent);
    opacity: .86;
}

.auth-dots i:nth-child(1) { left: 69%; top: 36%; background: #5ba8ff; }
.auth-dots i:nth-child(2) { left: 82%; top: 49%; }
.auth-dots i:nth-child(3) { left: 64%; top: 47%; background: rgba(255,255,255,.32); }
.auth-dots i:nth-child(4) { left: 86%; top: 41%; background: #35d18d; }
.auth-dots i:nth-child(5) { left: 74%; top: 59%; background: rgba(255,255,255,.25); }

.auth-mark {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    font-size: .92rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.auth-mark span {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 28% 70%, #7ce7f1 0 .28rem, transparent .3rem),
        radial-gradient(circle at 70% 35%, #4f9cf5 0 .38rem, transparent .4rem),
        linear-gradient(135deg, #35d18d, #4f9cf5);
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: clamp(2.15rem, 5vw, 4.4rem);
}

.auth-form-panel > * {
    width: min(17.5rem, 100%);
}

.auth-form-panel h1 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-form-panel form {
    margin-top: 2rem;
    width: 100%;
    display: grid;
    gap: .95rem;
}

.auth-form-panel .app-input {
    margin-top: .42rem;
    background: #f5f8fc;
    border-color: #dfe7f1;
}

.auth-form-panel .app-button {
    width: 8.8rem;
    min-height: 2.6rem;
    margin-top: .75rem;
    border-radius: .35rem;
    background: var(--app-accent);
    box-shadow: 0 8px 18px rgba(24, 184, 199, .2);
}

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #8a94a6;
    font-size: .78rem;
    font-weight: 600;
}

.auth-form-options a {
    color: #9aa3b2;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #334155;
}

.auth-remember input {
    width: .82rem;
    height: .82rem;
    accent-color: #35caa2;
}

.auth-switch {
    margin-top: 2.25rem;
    color: #8a94a6;
    font-size: .78rem;
    font-weight: 600;
}

.auth-switch a {
    color: var(--app-blue);
    font-weight: 700;
}

.app-nav {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-bottom: 2px solid transparent;
    padding: .35rem 0;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .72);
    transition: border-color .16s ease, color .16s ease;
}

.app-nav svg,
.mobile-nav svg {
    height: 1rem;
    width: 1rem;
    fill: currentColor;
}

.app-nav.is-active,
.app-nav:hover {
    border-color: #fff;
    color: #fff;
}

.app-sidebar .app-nav {
    display: flex;
    border-bottom: 0;
    border-radius: .35rem;
    padding: .72rem .8rem;
    color: rgba(255, 255, 255, .74);
}

.app-sidebar .app-nav.is-active,
.app-sidebar .app-nav:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.app-surface {
    background: #f8fafc;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: .7rem;
    box-shadow: 0 18px 54px rgba(38, 51, 72, .12);
}

.app-sidebar {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .7rem;
    background: var(--app-blue);
    box-shadow: 0 18px 48px rgba(36, 88, 155, .22);
}

.app-avatar-initial,
.app-page-title {
    color: var(--app-blue);
}

.app-brand-mark,
.app-profile-avatar {
    background: var(--app-accent);
}

.app-panel,
.app-card {
    border: 1px solid var(--app-line);
    border-radius: .45rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(44, 62, 86, .07);
}

.app-panel {
    padding: 1rem;
}

.app-card {
    background: #fff;
}

.app-themed-card,
.app-themed-panel {
    background: var(--app-blue);
    color: #fff;
}

.app-themed-link {
    color: var(--app-accent);
}

.app-themed-pill {
    background: var(--app-accent);
    color: #fff;
}

.app-input {
    width: 100%;
    border-radius: .35rem;
    border: 1px solid #dfe7f1;
    background: #f5f8fc;
    padding: .78rem .9rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--app-ink);
    outline: none;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.app-input:focus {
    border-color: rgba(24, 184, 199, .65);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 184, 199, .14);
}

.app-label {
    display: block;
    font-size: .76rem;
    font-weight: 700;
    color: #5d6d82;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: .8rem;
    border: 1px solid var(--app-line);
    border-radius: .45rem;
    background: #f8fafc;
    padding: .75rem;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-option strong {
    font-size: .86rem;
}

.theme-option.is-selected,
.theme-option:has(input:checked) {
    border-color: var(--app-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 184, 199, .12);
}

.theme-swatch {
    display: flex;
    overflow: hidden;
    width: 4.2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: .35rem;
    border: 1px solid rgba(0, 0, 0, .05);
}

.theme-swatch i {
    display: block;
    flex: 1;
}

.app-button,
.app-mini-button,
.app-month-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .35rem;
    background: var(--app-accent);
    padding: .82rem 1rem;
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 18px rgba(24, 184, 199, .2);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.app-button:hover,
.app-mini-button:hover,
.app-month-submit:hover {
    background: #149cab;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(24, 184, 199, .22);
}

.app-mini-button {
    padding: .54rem .78rem;
    font-size: .72rem;
}

.mobile-bottom-nav {
    border: 1px solid rgba(229, 235, 243, .96);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .94);
    padding: .45rem;
    box-shadow: 0 16px 42px rgba(38, 51, 72, .18);
    backdrop-filter: blur(16px);
}

.mobile-nav {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    border-radius: .35rem;
    padding: .45rem .2rem;
    font-size: .62rem;
    font-weight: 700;
    color: #8a98ab;
}

.mobile-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav.is-active {
    background: var(--app-blue);
    color: #fff;
}

.icon-button {
    display: grid;
    height: 2rem;
    width: 2rem;
    place-items: center;
    border-radius: .35rem;
    background: #eef3f8;
    font-size: .78rem;
    font-weight: 800;
    color: #5c6d84;
}

.icon-button.danger {
    background: #fff0ee;
    color: #d65b4a;
}

.icon-button svg {
    height: 1rem;
    width: 1rem;
    fill: currentColor;
}

table thead {
    background: var(--app-blue) !important;
}

.app-month-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--app-line);
    border-radius: .45rem;
    background: #fff;
    padding: .45rem;
}

.app-month-trigger {
    display: inline-flex;
    min-width: 9.5rem;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-radius: .35rem;
    background: #f4f7fb;
    padding: .62rem .75rem;
    font-size: .86rem;
    font-weight: 800;
    color: var(--app-ink);
}

.app-month-trigger svg {
    height: 1rem;
    width: 1rem;
    flex: 0 0 auto;
    fill: currentColor;
}

.app-month-popover {
    position: absolute;
    right: 0;
    top: calc(100% + .55rem);
    z-index: 40;
    width: min(18rem, calc(100vw - 2rem));
    border: 1px solid var(--app-line);
    border-radius: .55rem;
    background: #fff;
    padding: .85rem;
    color: var(--app-ink);
    box-shadow: 0 20px 44px rgba(38, 51, 72, .2);
}

.app-month-top {
    display: grid;
    grid-template-columns: 2rem 1fr 2rem;
    align-items: center;
    margin-bottom: .65rem;
    color: var(--app-ink);
}

.app-month-top strong {
    text-align: center;
    font-size: .86rem;
}

.app-month-top button,
.app-month-actions button {
    border-radius: .35rem;
    padding: .35rem .55rem;
    font-size: .8rem;
    font-weight: 800;
    color: #5d6d82;
}

.app-month-top button:hover,
.app-month-actions button:hover {
    background: #eef3f8;
}

.app-month-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
}

.app-month-grid button {
    min-height: 2.35rem;
    border-radius: .35rem;
    background: #f4f7fb;
    font-size: .78rem;
    font-weight: 800;
    color: var(--app-ink);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.app-month-grid button:hover {
    background: #eaf0f7;
    transform: translateY(-1px);
}

.app-month-grid button.is-selected {
    background: var(--app-accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(24, 184, 199, .24);
}

.app-month-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: .7rem;
}

@media (max-width: 640px) {
    .auth-page::before {
        width: 76vw;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 18rem;
        padding: 1.25rem;
    }

    .auth-visual-content h1 {
        font-size: 2rem;
    }

    .auth-preview {
        display: none;
    }

    .auth-form-panel {
        padding: 1.5rem;
    }

    .app-month-picker {
        width: 100%;
    }

    .app-month-trigger {
        min-width: 0;
        flex: 1;
    }

    .app-month-popover {
        left: 0;
        right: auto;
    }
}
