﻿* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.app-shell {
    min-height: 100vh;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar,
.employee-sidebar {
    background: var(--sidebar);
    color: var(--sidebar-text);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    z-index: 1040;
}

.sidebar-brand {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 18px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f7cff, #2559d6);
    color: #fff;
    font-weight: 900;
    font-size: 1.15rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, .28);
}

.brand-mark-large {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 17px;
    font-size: 1.4rem;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    color: #fff;
    font-size: .96rem;
}

.brand-copy span {
    color: var(--sidebar-muted);
    font-size: .78rem;
    margin-top: 2px;
}

.sidebar-mobile-close {
    display: none !important;
    margin-inline-start: auto;
    color: #fff !important;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
}

.nav-section-title {
    color: var(--sidebar-muted);
    font-size: .7rem;
    font-weight: 700;
    padding: 18px 12px 7px;
}

.app-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .9rem;
    transition: .16s ease;
}

.app-nav-link:hover {
    background: var(--sidebar-soft);
    color: #fff;
}

.app-nav-link.is-active {
    background: rgba(91, 140, 255, .18);
    color: #fff;
    box-shadow: inset -3px 0 0 #5b8cff;
}

.app-nav-link.is-disabled {
    opacity: .48;
    cursor: not-allowed;
    user-select: none;
}

.nav-icon {
    width: 25px;
    display: inline-grid;
    place-items: center;
    font-size: 1.1rem;
}

.nav-badge {
    margin-inline-start: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--sidebar-muted);
    font-size: .65rem;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer strong,
.sidebar-footer small {
    display: block;
}

.sidebar-footer strong {
    color: #fff;
    font-size: .8rem;
}

.sidebar-footer small {
    color: var(--sidebar-muted);
    margin-top: 2px;
    font-size: .72rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 5px rgba(74, 222, 128, .1);
}

.app-page,
.employee-page {
    min-width: 0;
}

.app-topbar,
.employee-topbar {
    min-height: 78px;
    background: color-mix(in srgb, var(--surface) 93%, transparent);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(16px);
}

.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-heading {
    min-width: 0;
}

.page-heading h1,
.employee-topbar h1 {
    font-size: 1.05rem;
    margin: 2px 0 0;
    font-weight: 800;
    color: var(--text);
}

.page-kicker,
.eyebrow {
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: .16s ease;
}

.icon-button:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.danger-soft {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: transparent;
}

.sidebar-toggle {
    display: none;
}

.date-chip {
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.date-chip-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.date-chip strong,
.date-chip small {
    display: block;
}

.date-chip strong {
    font-size: .76rem;
}

.date-chip small {
    color: var(--text-soft);
    font-size: .69rem;
    margin-top: 1px;
}

.theme-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-soft);
    font-size: .78rem;
}

.theme-select {
    min-height: 40px;
    min-width: 84px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 6px 10px;
    color: var(--text);
    background: var(--surface);
    outline: none;
}

.theme-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
}

.user-chip-text strong,
.user-chip-text small {
    display: block;
}

.user-chip-text strong {
    font-size: .78rem;
}

.user-chip-text small {
    color: var(--text-soft);
    margin-top: 1px;
    font-size: .68rem;
}

.app-content {
    padding: 28px;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-hero,
.employee-welcome-card {
    background:
        radial-gradient(circle at 8% 15%, rgba(91, 140, 255, .2), transparent 28rem),
        linear-gradient(135deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-hero h2,
.employee-welcome-card h2 {
    margin: 8px 0 7px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 900;
}

.dashboard-hero p,
.employee-welcome-card p,
.surface-description {
    color: var(--text-soft);
    margin: 0;
    line-height: 2;
}

.hero-date-card,
.employee-today {
    min-width: 230px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.hero-date-card span,
.hero-date-card strong,
.hero-date-card small,
.employee-today span,
.employee-today strong,
.employee-today small {
    display: block;
}

.hero-date-card span,
.employee-today span {
    color: var(--text-soft);
    font-size: .72rem;
}

.hero-date-card strong,
.employee-today strong {
    margin-top: 5px;
    font-size: .9rem;
}

.hero-date-card small,
.employee-today small {
    color: var(--primary);
    font-weight: 800;
    margin-top: 5px;
}

.dashboard-grid,
.employee-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.employee-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
    min-height: 130px;
    padding: 20px;
    border-radius: 19px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.3rem;
}

.metric-card span,
.metric-card strong,
.metric-card small {
    display: block;
}

.metric-card span {
    color: var(--text-soft);
    font-size: .75rem;
}

.metric-card strong {
    margin-top: 4px;
    font-size: 1.2rem;
}

.metric-card small {
    color: var(--text-faint);
    margin-top: 4px;
    font-size: .7rem;
}

.content-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.surface-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.surface-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.surface-card h3 {
    font-size: 1rem;
    margin: 4px 0 0;
    font-weight: 900;
}

.surface-description {
    margin-top: 14px;
    font-size: .82rem;
}

.btn-app {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    font-size: .82rem;
    transition: .16s ease;
}

.btn-app:hover {
    transform: translateY(-1px);
}

.btn-app:disabled {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}

.btn-app-primary {
    background: var(--primary);
    color: #fff;
}

.btn-app-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-app-secondary {
    background: var(--surface-strong);
    color: var(--text);
}

.btn-app-block {
    width: 100%;
    min-height: 48px;
}

.phase-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.phase-chips span {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--text-soft);
    font-size: .75rem;
}

.sidebar-overlay {
    display: none;
    border: 0;
}

.employee-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
}

.employee-sidebar {
    min-height: 100vh;
    padding: 22px 18px;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.employee-topbar {
    position: sticky;
}

.employee-date {
    color: var(--text-soft);
    margin-top: 5px;
    font-size: .72rem;
}

.employee-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px;
}

.employee-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    height: 70px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border-top: 1px solid var(--border);
    z-index: 1030;
    backdrop-filter: blur(18px);
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
}

.bottom-nav-item {
    color: var(--text-soft);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: .66rem;
}

.bottom-nav-icon {
    font-size: 1.15rem;
}

.bottom-nav-item.is-active {
    color: var(--primary);
    font-weight: 800;
}

.bottom-nav-item.is-disabled {
    opacity: .45;
}

.bottom-nav-primary .bottom-nav-icon {
    width: 38px;
    height: 38px;
    margin-top: -20px;
    border-radius: 13px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 9px 24px rgba(37, 99, 235, .28);
}

.auth-body {
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    padding: 52px;
    background:
        radial-gradient(circle at 10% 10%, rgba(96, 165, 250, .35), transparent 26rem),
        radial-gradient(circle at 90% 90%, rgba(37, 99, 235, .45), transparent 32rem),
        #0d1b35;
    color: #fff;
}

.auth-showcase::after {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    left: -120px;
    bottom: -140px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    box-shadow:
        0 0 0 60px rgba(255,255,255,.025),
        0 0 0 120px rgba(255,255,255,.018);
}

.auth-showcase-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.auth-showcase-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-showcase-brand strong,
.auth-showcase-brand span {
    display: block;
}

.auth-showcase-brand strong {
    font-size: 1.05rem;
}

.auth-showcase-brand span {
    margin-top: 3px;
    color: rgba(255,255,255,.65);
    font-size: .76rem;
}

.auth-showcase-copy {
    margin-block: auto;
    max-width: 560px;
}

.auth-showcase-copy .eyebrow {
    color: #9ab8ff;
}

.auth-showcase-copy h1 {
    margin: 14px 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.45;
    font-weight: 950;
}

.auth-showcase-copy p {
    color: rgba(255,255,255,.7);
    line-height: 2.1;
    font-size: .95rem;
}

.auth-showcase-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-showcase-features span {
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    border-radius: 999px;
    font-size: .72rem;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 28px;
    background: var(--bg);
}

.auth-card {
    width: min(100%, 450px);
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 28px;
}

.auth-mobile-brand strong,
.auth-mobile-brand span {
    display: block;
}

.auth-mobile-brand span {
    color: var(--text-soft);
    font-size: .72rem;
}

.auth-header h2 {
    margin: 8px 0 6px;
    font-size: 1.45rem;
    font-weight: 950;
}

.auth-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: .8rem;
    line-height: 1.9;
}

.auth-form {
    margin-top: 22px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: .78rem;
    font-weight: 800;
}

.app-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 9px 12px;
    outline: none;
    transition: .15s ease;
}

.app-input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.field-error {
    color: var(--danger);
    display: block;
    margin-top: 5px;
    font-size: .7rem;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    margin: 4px 0 18px;
    font-size: .75rem;
}

.app-alert {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-radius: 13px;
    padding: 11px 13px;
    margin-top: 16px;
    font-size: .75rem;
    line-height: 1.8;
}

.app-alert:empty {
    display: none;
}

.app-alert.success {
    background: var(--success-soft);
    color: var(--success);
}

.app-alert.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.auth-footer {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-faint);
    font-size: .69rem;
}

@media (max-width: 1199.98px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .admin-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        inset-block: 0;
        right: 0;
        width: min(86vw, 290px);
        transform: translateX(105%);
        transition: transform .2s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-mobile-close,
    .sidebar-toggle {
        display: inline-grid !important;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(0, 0, 0, .48);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .employee-shell {
        display: block;
    }

    .employee-content {
        padding-bottom: 96px;
    }

    .auth-shell {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .app-topbar,
    .employee-topbar {
        min-height: 68px;
        padding: 10px 15px;
    }

    .app-content,
    .employee-content {
        padding: 16px;
    }

    .dashboard-hero,
    .employee-welcome-card {
        display: block;
        padding: 20px;
        border-radius: 19px;
    }

    .hero-date-card,
    .employee-today {
        min-width: 0;
        margin-top: 18px;
    }

    .dashboard-grid,
    .employee-metric-grid,
    .content-grid-two {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 108px;
    }

    .surface-card {
        padding: 18px;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 18px;
    }

    .auth-card {
        padding: 22px;
        border-radius: 20px;
    }

    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
