/* ============ DASHBOARD CORE STYLES ============ */
html, body { height: 100%; width: 100%; }
body {
    background: linear-gradient(180deg, #f5f8ff 0%, #e9eff9 55%, #f8fbff 100%);
    color: #1f2937;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    max-width: none;
    margin: 0;
    padding: 24px 20px;
    height: 100vh;
    box-sizing: border-box;
}

.dashboard-aside {
    background: #111827;
    color: #e2e8f0;
    border-radius: 32px;
    padding: 34px 26px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
    position: relative;
    top: 0;
    align-self: stretch;
    min-height: 100vh;
}

.dashboard-aside h2 {
    font-family: 'Marcellus', serif;
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 14px;
    color: #f8fafc;
}

.dashboard-aside p {
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 28px;
}

.dashboard-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.dashboard-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-nav-link.active {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #ffffff;
}

.dashboard-nav-link span.icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 16px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    overflow: auto;
}

.app-header { display: none !important; }

.dashboard-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

.dashboard-topbar, .dashboard-header {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 30px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.08);
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.dashboard-topbar h1, .dashboard-header h1 {
    font-family: 'Marcellus', serif;
    font-size: clamp(36px, 4vw, 54px);
    margin: 0;
    color: #111827;
}

.dashboard-topbar p, .dashboard-header p {
    max-width: 720px;
    margin: 0;
    font-family: 'Arimo', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.8;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f3f4ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.dashboard-button, .dashboard-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-family: 'Arimo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    text-decoration: none;
    cursor: pointer;
}

.dashboard-button {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.22);
}

.dashboard-link {
    background: rgba(148, 163, 184, 0.12);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.18);
}

.dashboard-button:hover, .dashboard-link:hover {
    transform: translateY(-1px);
}

.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th, .dashboard-table td { padding: 12px 14px; text-align: left; }
.dashboard-table thead { background: rgba(15,23,42,0.03); }

.status-chip { padding: 6px 10px; border-radius: 999px; font-weight:700; font-size:13px; }
.status-chip.completed { background: #d1fae5; color: #065f46; }
.status-chip.pending { background: #fef3c7; color: #92400e; }
.status-chip.review { background: #fee2e2; color: #991b1b; }
.status-chip.draft { background: #f3f4ff; color: #3730a3; }

.metric-card { display: grid; gap: 14px; position: relative; }
.metric-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; }
.metric-value { font-size: 2.8rem; font-weight: 800; color: #111827; }
.metric-note { font-size: 13px; color: #6b7280; }
.metrics-row { grid-template-columns: repeat(4, 1fr); gap: 18px; }

.chart-card { min-height: 320px; display: flex; flex-direction: column; justify-content: space-between; }

/* Forms - Grid Layout for Registration */
.dashboard-form-card { padding: 24px; }
.dashboard-form-card h3 { margin-bottom: 22px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-family: 'Arimo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: capitalize;
}

.form-input, .form-select, .form-textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e6e9ef;
    background: #ffffff;
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Arimo', sans-serif;
}

.dashboard-fieldset {
    grid-column: 1 / -1;
    margin-bottom: 18px;
}

.dashboard-fieldset .form-textarea {
    width: 100%;
}

.form-file {
    gap: 10px;
}

.form-file input[type="file"] {
    padding: 10px 12px;
    border: 1px dashed rgba(15,23,42,0.12);
    border-radius: 12px;
    background: #fcfcfe;
}

.form-file input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

.form-file input[type="file"]::file-selector-button {
    border: none;
    padding: 10px 14px;
    margin-right: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-file input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.file-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.file-preview .file-item {
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    font-size: 13px;
    color: #334155;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.dashboard-card form { gap: 0; }

/* Responsive form grid */
@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
    .dashboard-fieldset { grid-column: 1; }
}

/* Mobile nav */
body.nav-open .dashboard-aside {
    display: block !important;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 1200;
}
body.nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.45);
    z-index: 1100;
}
.mobile-nav-toggle {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 1300;
    background: linear-gradient(135deg,#f97316,#fb923c);
    color:#fff;
    border:0;
    padding:10px 12px;
    border-radius:10px;
    font-size:20px;
    display:none;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-shell { grid-template-columns: 1fr; padding: 16px; }
    .dashboard-aside { display: none; }
    .dashboard-main { padding: 0; }
    .dashboard-header { padding: 18px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-card { padding: 18px; }
    .dashboard-card form { grid-template-columns: 1fr !important; }
    .dashboard-card form input, .dashboard-card form select { width: 100%; }
    .mobile-nav-toggle { display: block; }
    .metrics-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .dashboard-table { display: none; }
    .attendance-cards { display: block !important; }
    .attendance-card { margin-bottom: 12px; padding: 14px; }
    .metrics-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .dashboard-topbar h1, .dashboard-header h1 { font-size: 22px; }
    .dashboard-button { width: 100%; display: block; }
    .metric-value { font-size: 1.8rem; }
    .dashboard-table th, .dashboard-table td { padding: 10px 8px; }
}

/* ============ AUTH PAGE STYLES ============ */
.auth-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    max-width: 1200px;
    margin: 6vh auto;
    min-height: 72vh;
    padding: 28px;
    background: transparent;
    align-items: center;
}

.auth-panel {
    background: #ffffff;
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.12);
}

/* make forms inside the standalone app consistent and responsive */
.dashboard-card form input,
.dashboard-card form select,
.dashboard-card form textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e6e9ef;
    background: #fff;
}
.dashboard-card form { gap: 12px; }
.dashboard-card form button.dashboard-button { min-width: 140px; }

/* small-screen adjustments for the standalone employee-management app */
@media (max-width: 900px) {
    .auth-shell, .dashboard-shell { padding: 16px; }
    .dashboard-card { padding: 18px; }
}

.auth-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #f8fafc;
}

.auth-brand h1 {
    font-family: 'Marcellus', serif;
    font-size: clamp(34px, 4vw, 52px);
    margin-bottom: 16px;
}

.auth-brand p {
    font-family: 'Arimo', sans-serif;
    font-size: 16px;
    color: #cbd5e1;
    max-width: 460px;
}

.auth-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.auth-stat {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 22px;
    text-align: center;
}

.auth-stat strong {
    display: block;
    font-size: 2rem;
    color: #f8fafc;
    margin-bottom: 8px;
}

.auth-stat span {
    display: block;
    color: #cbd5e1;
    font-size: 14px;
}

.tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 30px;
        background: #f8fafc;
        padding: 8px;
        border-radius: 22px;
        border: 1px solid rgba(15, 23, 42, 0.05);
    }

    .tab-button {
        padding: 14px 20px;
        border-radius: 18px;
        border: 1px solid transparent;
        background: #ffffff;
        font-family: 'Arimo', sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
        cursor: pointer;
        transition: all 0.25s ease;
    }

    .tab-button:hover {
        transform: translateY(-1px);
        background: #eef2ff;
    }

    .tab-button.active {
        background: linear-gradient(135deg, #0f172a, #1e293b);
        color: #ffffff;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    }

    .tab-content { display: none; }
    .tab-content.active { display: block; }

    .tab-content h2 {
        font-family: 'Marcellus', serif;
        font-size: clamp(30px, 3vw, 38px);
        margin-bottom: 10px;
    }

    .tab-content p {
        font-family: 'Arimo', sans-serif;
        color: #475569;
        margin-bottom: 24px;
        max-width: 620px;
    }

    .tab-content form {
        display: grid;
        gap: 18px;
    }

    .tab-content label {
        display: block;
        font-family: 'Arimo', sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #0f172a;
    }

    .tab-content input,
    .tab-content select {
        width: 100%;
        padding: 14px 18px;
        border-radius: 16px;
        border: 1px solid #d1d5db;
        font-family: 'Arimo', sans-serif;
        font-size: 14px;
        color: #111827;
        background: #f8fafc;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .tab-content input:focus,
    .tab-content select:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
        outline: none;
    }

    .tab-content button.dashboard-button {
        width: 100%;
        padding: 15px 18px;
        border-radius: 16px;
        font-size: 14px;
        letter-spacing: 0.8px;
        background: linear-gradient(135deg, #f97316, #fb923c);
        border: none;
        color: #ffffff;
        font-weight: 700;
        text-transform: uppercase;
        box-shadow: 0 18px 45px rgba(249, 115, 22, 0.24);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        cursor: pointer;
    }

    .tab-content button.dashboard-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 22px 52px rgba(249, 115, 22, 0.28);
    }

    .auth-helper {
        margin-top: 10px;
        color: #64748b;
        font-size: 13px;
    }

    .dashboard-button,
    .dashboard-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 22px;
        border-radius: 16px;
        border: 1px solid transparent;
        font-family: 'Arimo', sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        transition: all 0.25s ease;
        text-decoration: none;
    }

    .dashboard-button {
        background: linear-gradient(135deg, #f97316, #fb923c);
        color: #ffffff;
        box-shadow: 0 18px 45px rgba(249, 115, 22, 0.22);
    }

    .dashboard-link {
        background: rgba(148, 163, 184, 0.12);
        color: #0f172a;
        border-color: rgba(148, 163, 184, 0.18);
    }

    .dashboard-button:hover,
    .dashboard-link:hover {
        transform: translateY(-1px);
    }

    .chart-placeholder {
        min-height: 280px;
        background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
        border-radius: 28px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        padding: 24px;
        display: grid;
        gap: 18px;
    }

    .chart-row {
        display: grid;
        gap: 12px;
    }

    .chart-bar-row {
        display: grid;
        grid-template-columns: 90px 1fr 70px;
        align-items: center;
        gap: 14px;
    }

    .chart-bar-track {
        height: 14px;
        border-radius: 999px;
        background: #e2e8f0;
        overflow: hidden;
    }

    .chart-bar-value {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, #6366f1, #38bdf8);
    }

    .details-widget {
        display: grid;
        gap: 14px;
        margin-top: 20px;
    }

    details {
        border-radius: 18px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        padding: 18px 20px;
        background: #ffffff;
    }

    summary {
        font-family: 'Arimo', sans-serif;
        font-weight: 700;
        color: #111827;
        cursor: pointer;
        list-style: none;
        outline: none;
    }

    details[open] summary {
        color: #1d4ed8;
    }

    details p {
        margin: 12px 0 0;
        color: #475569;
        font-family: 'Arimo', sans-serif;
        line-height: 1.75;
    }

    .app-header {
        width: 100%;
        padding: 22px 40px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .header-brand a {
        font-family: 'Marcellus', serif;
        color: #111827;
        font-size: 18px;
        text-decoration: none;
    }

    .header-status {
        font-family: 'Arimo', sans-serif;
        color: #475569;
        font-size: 14px;
    }

    .app-footer {
        padding: 20px 40px;
        text-align: center;
        font-family: 'Arimo', sans-serif;
        color: #64748b;
    }

    html, body { height: 100%; width: 100%; }
    main { padding-top: 0; min-height: 100vh; width: 100%; }

    /* force dashboard shell to occupy full viewport inside this standalone app */
    .dashboard-shell {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 28px;
        max-width: none;
        margin: 0;
        padding: 24px 32px;
        height: calc(100vh - 0px);
        box-sizing: border-box;
    }

    @media (max-width: 960px) {
        .auth-shell { grid-template-columns: 1fr; }
        .auth-hero { grid-template-columns: 1fr; }
    }

    @media (max-width: 720px) {
        .chart-bar-row { grid-template-columns: 70px 1fr 60px; }
        .tabs { grid-template-columns: 1fr; }


    /* file input styling */
    .form-file input[type="file"] {
        width: 100%;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px dashed rgba(15,23,42,0.08);
        background: #fcfcfe;
    }
    .form-file input[type="file"]:focus { outline: none; box-shadow: 0 0 0 4px rgba(99,102,241,0.08); }
    .form-file input[type="file"]::-webkit-file-upload-button { visibility: hidden; }
    .form-file input[type="file"]::file-selector-button {
        border: none;
        padding: 10px 14px;
        margin-right: 10px;
        border-radius: 10px;
        background: linear-gradient(135deg,#f97316,#fb923c);
        color: #fff;
        font-weight: 700;
        cursor: pointer;
    }
    .form-file { display: flex; align-items: center; gap: 10px; }
    .file-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
    .file-preview .file-item { background: #f8fafc; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(15,23,42,0.04); font-size: 13px; color: #334155; }
