/* ============================================================
   Buckeye Payroll System — Auth & Dashboard Styles
   ============================================================ */

/* ── Auth Pages (login, register, mfa, reset) ─────────────── */
.auth-main {
    min-height: calc(100vh - 72px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: var(--cream);
}

.auth-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
}

.auth-card-wide { max-width: 560px; }

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-img {
    height: 64px;
    width: auto;
    margin: 0 auto 8px;
    display: block;
}

.auth-subsidiary {
    font-size: 11px;
    color: var(--warm-gray);
    text-align: center;
}

.auth-subsidiary a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .3rem;
    color: var(--charcoal);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--warm-gray);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
}

/* Label with inline link */
label { display: flex; justify-content: space-between; align-items: center; }
.label-link {
    font-size: 12px;
    font-weight: 400;
    color: var(--red);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}
.label-link:hover { text-decoration: underline; }

/* Input with icon button */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap input {
    width: 100%;
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--warm-gray);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.toggle-pw:hover { color: var(--red); }

/* Checkbox row */
.form-check { flex-direction: row; align-items: center; gap: 0; margin-bottom: 1.25rem; }
.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--warm-gray);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}
.check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--red); }

/* Submit button */
.btn-auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    margin-top: .5rem;
}
.btn-auth-submit:hover { background: var(--red-hover); transform: translateY(-1px); }

/* Password strength */
.pw-strength {
    font-size: 12px;
    margin-top: 4px;
    min-height: 18px;
}

/* Field hint */
.field-hint {
    font-size: 11px;
    color: var(--warm-gray);
    margin-top: 3px;
    display: block;
}

/* Switch link */
.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 13px;
    color: var(--warm-gray);
}
.auth-switch a { color: var(--red); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* Security note */
.auth-security-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 11px;
    color: var(--warm-gray);
    padding: 8px;
    background: var(--cream);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* Alert info */
.alert-info {
    background: #EEF4FF;
    border-color: #B8D0F8;
    color: #1a3a6b;
}

/* MFA icon */
.mfa-icon {
    text-align: center;
    margin: 0 auto 1rem;
    width: 72px;
    height: 72px;
    background: var(--red-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MFA code input */
.mfa-code-input {
    text-align: center !important;
    font-size: 2rem !important;
    letter-spacing: .5em;
    font-weight: 700;
    font-family: monospace !important;
    padding: 16px !important;
}

/* MFA actions */
.mfa-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.link-subtle {
    font-size: 13px;
    color: var(--warm-gray);
    text-decoration: none;
}
.link-subtle:hover { color: var(--red); text-decoration: underline; }

/* ── Dashboard Layout ─────────────────────────────────────── */
.dash-wrap {
    display: flex;
    min-height: calc(100vh - 72px);
    background: var(--cream);
}

/* Sidebar */
.dash-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--charcoal);
    color: rgba(255,255,255,.75);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-role-badge {
    display: inline-block;
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.sidebar-name  { font-size: 14px; font-weight: 600; color: white; margin-bottom: 2px; }
.sidebar-email { font-size: 11px; color: rgba(255,255,255,.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-nav { padding: .75rem 0; flex: 1; }

.sidebar-nav ul { list-style: none; }

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 1.25rem;
    font-size: 13.5px;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background: rgba(255,255,255,.06);
    color: white;
    border-left-color: var(--red);
}

.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: .5rem 0; }

.sidebar-logout { color: rgba(255,80,80,.7) !important; }
.sidebar-logout:hover { color: #ff8080 !important; }

.badge-count {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 100px;
}

/* Main content */
.dash-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.dash-topbar {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 72px;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--charcoal);
    padding: 4px 8px;
}

.topbar-title h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--charcoal);
}

.topbar-date {
    font-size: 12px;
    color: var(--warm-gray);
    display: block;
}

.topbar-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-ip {
    font-size: 12px;
    color: var(--warm-gray);
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 100px;
}

.topbar-logout {
    font-size: 13px;
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}
.topbar-logout:hover { text-decoration: underline; }

/* Dash content */
.dash-content { padding: 2rem; flex: 1; }

/* Stat cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--red); }
.stat-card-alert { border-color: var(--gold) !important; background: var(--gold-pale); }

.stat-card-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card-num   { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-card-label { font-size: 12px; color: var(--warm-gray); margin-top: 2px; }

/* Panels */
.dash-panel {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cream);
}

.panel-header h2 { font-size: 15px; font-weight: 600; margin: 0; }
.panel-link { font-size: 13px; color: var(--red); text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

/* Tables */
.table-wrap { overflow-x: auto; }

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.dash-table th {
    background: var(--cream);
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--warm-gray);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.dash-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--charcoal);
}

.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--cream); }

.dash-table code {
    font-family: monospace;
    font-size: 12px;
    background: var(--light-warm);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    white-space: nowrap;
}

.badge-green { background: #e8f3e8; color: #2a5c2a; }
.badge-red   { background: var(--red-pale); color: #7c2b2b; }
.badge-gold  { background: var(--gold-pale); color: #7a5200; }
.badge-gray  { background: var(--light-warm); color: var(--warm-gray); }

/* Action buttons in table */
.action-cell { display: flex; gap: 6px; align-items: center; }
.btn-sm {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
}
.btn-sm:hover { opacity: .85; }
.btn-green { background: #e8f3e8; color: #2a5c2a; }
.btn-red   { background: var(--red-pale); color: #7c2b2b; }

/* Employee quick links */
.employee-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 1.5rem 1rem;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--charcoal);
    transition: border-color var(--transition), transform var(--transition);
}

.quick-link-card:hover { border-color: var(--red); transform: translateY(-2px); }
.quick-link-card span  { font-size: 28px; }
.quick-link-card strong { font-size: 14px; font-weight: 600; }
.quick-link-card small  { font-size: 12px; color: var(--warm-gray); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dash-sidebar {
        position: fixed;
        left: -240px;
        top: 72px;
        height: calc(100vh - 72px);
        z-index: 300;
        transition: left .25s ease;
    }

    .dash-sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.2); }

    .sidebar-toggle { display: block; }
    .dash-content   { padding: 1rem; }
    .dash-topbar    { padding: 0 1rem; }
    .topbar-ip      { display: none; }
    .auth-card      { padding: 2rem 1.5rem; }
}
