/* public/assets/css/app.css */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:      #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light:#eff6ff;
    --color-danger:       #dc2626;
    --color-success:      #16a34a;
    --color-warning:      #d97706;
    --color-text:         #111827;
    --color-muted:        #6b7280;
    --color-border:       #e5e7eb;
    --color-bg:           #f9fafb;
    --color-surface:      #ffffff;
    --color-nav-bg:       #1e293b;
    --color-nav-text:     #cbd5e1;
    --color-nav-active:   #ffffff;
    --radius:             6px;
    --shadow:             0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:          0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --font:               'Inter', system-ui, -apple-system, sans-serif;
    --nav-height:         56px;
}

html { font-size: 15px; }
body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    background: var(--color-nav-bg);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    overflow: visible;
}

.navbar-brand { flex-shrink: 0; }
.navbar-title {
    color: var(--color-nav-active);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.navbar-logo { height: 32px; }

.navbar-nav {
    display: flex;
    list-style: none;
    gap: .25rem;
    flex: 1;
    align-items: center;
}
.navbar-nav-right {
    flex: 0;
    margin-left: auto;
}
.navbar-nav a {
    color: var(--color-nav-text);
    padding: .4rem .75rem;
    border-radius: var(--radius);
    font-size: .9rem;
    transition: background .15s, color .15s;
    display: block;
}
.navbar-nav a:hover,
.navbar-nav a.active {
    background: rgba(255,255,255,.1);
    color: var(--color-nav-active);
    text-decoration: none;
}
.nav-divider { width: 1px; background: rgba(255,255,255,.15); margin: 0 .5rem; align-self: stretch; }
.navbar-user-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 .25rem;
    white-space: nowrap;
}
.navbar-username {
    font-size: .85rem;
    color: var(--color-nav-text);
    white-space: nowrap;
}

/* ── Dropdown nav ─────────────────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: .3rem;
    user-select: none;
    white-space: nowrap;
}
.nav-dropdown.open > .nav-dropdown-toggle {
    background: rgba(255,255,255,.1);
    color: var(--color-nav-active);
}
.nav-caret { font-size: .65rem; opacity: .75; transition: transform .2s; display: inline-block; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius);
    padding: .35rem 0;
    min-width: 170px;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    z-index: 150;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
    display: block;
    padding: .45rem 1rem;
    color: var(--color-nav-text);
    font-size: .875rem;
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a.active {
    background: rgba(255,255,255,.08);
    color: var(--color-nav-active);
    text-decoration: none;
}

.btn-link {
    color: var(--color-nav-text);
    font-size: .85rem;
    opacity: .75;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.btn-link:hover { opacity: 1; text-decoration: none; }

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.page-header { margin-bottom: 1.75rem; }
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.page-header p { color: var(--color-muted); margin-top: .25rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: .8rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
}

/* ── Alerts / flash ───────────────────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
    border: 1px solid transparent;
}
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem 1.1rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, box-shadow .15s, opacity .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

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

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover { background: var(--color-bg); color: var(--color-text); }

.btn-danger { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-link   { background: none; border: none; color: var(--color-primary); padding: 0; }
.btn-full   { width: 100%; }
.btn-sm     { padding: .3rem .7rem; font-size: .82rem; }

.btn-icon svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .35rem;
}
.form-actions { margin-top: 1.5rem; display: flex; gap: .75rem; align-items: center; }

.input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.input-code { font-family: 'Fira Code', 'Consolas', monospace; font-size: .82rem; }

/* ── Toggle (bool setting) ────────────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--color-border);
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: var(--shadow);
}
.toggle input:checked + .toggle-slider { background: var(--color-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Auth / login page ────────────────────────────────────────────────────── */
.auth-wrapper {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .25rem;
}
.auth-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: .9rem;
    margin-bottom: 1.75rem;
}
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--color-muted);
    font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.auth-sso { display: flex; flex-direction: column; gap: .6rem; }

.btn-google { justify-content: center; gap: .6rem; }

/* ── Settings page ────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s;
}
.tab:hover { color: var(--color-text); text-decoration: none; }
.tab.active {
    color: var(--color-primary);
    border-color: var(--color-border);
    background: var(--color-surface);
    border-bottom-color: var(--color-surface);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.settings-grid { display: flex; flex-direction: column; gap: 0; }
.setting-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}
.setting-row:last-child { border-bottom: none; }
.setting-label label { font-weight: 500; font-size: .9rem; }
.setting-desc { font-size: .8rem; color: var(--color-muted); margin-top: .25rem; line-height: 1.4; }

/* ── Error pages ──────────────────────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}
.error-page h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-page p  { color: var(--color-muted); margin-bottom: 2rem; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.table th {
    text-align: left;
    padding: .65rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--color-bg); }
.row-inactive td { opacity: .5; }
.table-actions { display: flex; gap: .4rem; justify-content: flex-end; white-space: nowrap; }
.table-empty { text-align: center; color: var(--color-muted); padding: 2rem !important; }
.employee-name { font-weight: 500; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-hourly   { background: #eff6ff; color: #1d4ed8; }
.badge-salary   { background: #f0fdf4; color: #15803d; }
.badge-contract { background: #fef9c3; color: #a16207; }

/* ── Page header row ──────────────────────────────────────────────────────── */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.page-header-actions { display: flex; gap: .5rem; flex-shrink: 0; padding-top: .25rem; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Form grid (admin forms) ──────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}
.form-group-full { grid-column: 1 / -1; }
.field-hint { font-size: .78rem; color: var(--color-muted); margin-top: .25rem; display: block; }
.required { color: var(--color-danger); }

/* ── LDAP search ──────────────────────────────────────────────────────────── */
.ldap-search-row { display: flex; gap: .5rem; }
.ldap-search-row .input { flex: 1; }
.ldap-results {
    margin-top: .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}
.ldap-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background .12s;
}
.ldap-result-item:last-child { border-bottom: none; }
.ldap-result-item:hover:not(.ldap-result-exists) { background: var(--color-primary-light); }
.ldap-result-exists { opacity: .5; cursor: default; }
.ldap-result-name { font-weight: 500; font-size: .9rem; flex: 1; }
.ldap-result-meta { font-size: .8rem; color: var(--color-muted); }
.ldap-result-badge {
    font-size: .72rem;
    background: var(--color-border);
    color: var(--color-muted);
    padding: .1rem .4rem;
    border-radius: 999px;
    white-space: nowrap;
}
.ldap-no-results { padding: 1rem; color: var(--color-muted); font-size: .875rem; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: .3rem; }
.filter-group label { font-size: .8rem; font-weight: 500; color: var(--color-muted); }
.filter-group .input { min-width: 180px; }

/* ── Table extras ─────────────────────────────────────────────────────────── */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    font-size: .875rem;
}
.badge-open {
    display: inline-block;
    padding: .1rem .5rem;
    background: #dcfce7;
    color: #15803d;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.corrected-badge {
    display: inline-block;
    margin-left: .35rem;
    font-size: .8rem;
    color: var(--color-warning);
    cursor: default;
}

/* ── Time grid (punch edit form) ──────────────────────────────────────────── */
.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

/* ── PTO status badges ────────────────────────────────────────────────────── */
.pto-status {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.pto-status-pending   { background: #fef9c3; color: #a16207; }
.pto-status-approved  { background: #dcfce7; color: #15803d; }
.pto-status-denied    { background: #fee2e2; color: #b91c1c; }
.pto-status-cancelled { background: #f1f5f9; color: #64748b; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-card {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.text-muted   { color: var(--color-muted); }
.text-sm      { font-size: .875rem; }
.text-right   { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .setting-row { grid-template-columns: 1fr; }
    .navbar-nav  { display: none; }
    .main-content { padding: 1.25rem 1rem; }
}

/* ── Status badges ────────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.status-0 { background: #f1f5f9; color: #475569; }
.status-1 { background: #dcfce7; color: #15803d; }
.status-2 { background: #fef9c3; color: #a16207; }

/* ── Punch card ───────────────────────────────────────────────────────────── */
.punch-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}
.punch-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}
.punch-info-item { text-align: center; }
.punch-info-label { display: block; font-size: .78rem; color: var(--color-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.punch-info-value { display: block; font-size: 1.25rem; font-weight: 700; margin-top: .15rem; }

.punch-buttons {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.punch-form { width: 100%; }
.btn-punch {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.btn-punch:active { transform: scale(.98); }
.btn-punch-clockin  { background: #16a34a; color: #fff; }
.btn-punch-clockin:hover  { background: #15803d; }
.btn-punch-lunchout { background: #d97706; color: #fff; }
.btn-punch-lunchout:hover { background: #b45309; }
.btn-punch-lunchin  { background: #2563eb; color: #fff; }
.btn-punch-lunchin:hover  { background: #1d4ed8; }
.btn-punch-clockout { background: #dc2626; color: #fff; }
.btn-punch-clockout:hover { background: #b91c1c; }

/* ── Dashboard grid ───────────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dash-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}
.dash-card-label { font-size: .8rem; color: var(--color-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.dash-card-value { font-size: 2rem; font-weight: 700; margin-top: .25rem; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.section-header h2 { font-size: 1.1rem; font-weight: 600; }

/* ── Kiosk selector ───────────────────────────────────────────────────────── */
.kiosk-wrapper { max-width: 900px; margin: 0 auto; }
.kiosk-header { text-align: center; margin-bottom: 2rem; }
.kiosk-header h1 { font-size: 2rem; font-weight: 700; }
.kiosk-header p  { color: var(--color-muted); margin-top: .25rem; }

.kiosk-search-wrap { max-width: 400px; margin: 0 auto 2rem; }
.kiosk-search { font-size: 1rem; padding: .65rem 1rem; }

.kiosk-employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.kiosk-employee-tile {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    cursor: pointer;
}
.kiosk-employee-tile:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}
.kiosk-employee-initials {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kiosk-employee-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}
.kiosk-employee-status { font-size: .75rem; }

/* ── Kiosk punch screen ───────────────────────────────────────────────────── */
.kiosk-punch-wrapper { max-width: 480px; margin: 0 auto; }
.kiosk-punch-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.kiosk-punch-name { font-size: 1.3rem; font-weight: 700; flex: 1; }
.kiosk-punch-form { margin-top: 1rem; }
.input-lg { font-size: 1.1rem; padding: .7rem 1rem; }
.kiosk-back { flex-shrink: 0; }

/* ── Device type selector (login page) ───────────────────────────────────── */
.device-type-select { margin-bottom: .25rem; }
.device-type-label  { font-size: .82rem; font-weight: 500; color: var(--color-muted); margin-bottom: .6rem; display: block; }
.device-type-options { display: flex; gap: .6rem; }
.device-option { flex: 1; cursor: pointer; }
.device-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.device-option-box {
    display: flex;
    flex-direction: column;
    padding: .65rem .75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color .15s, background .15s;
    gap: .1rem;
}
.device-option input:checked + .device-option-box {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
.device-option-title { font-size: .85rem; font-weight: 600; color: var(--color-text); }
.device-option-desc  { font-size: .75rem; color: var(--color-muted); line-height: 1.3; }

/* ── Settings: checkbox grid ─────────────────────────────────────────────── */
.checkbox-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .4rem .75rem; }
.checkbox-label    { display: flex; align-items: center; gap: .45rem; font-size: .9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 1rem; height: 1rem; flex-shrink: 0; cursor: pointer; }

/* ── Settings: full-width single-panel row (PTO types, etc.) ────────────── */
.setting-row-full               { display: block; }
.setting-full-header            { margin-bottom: .75rem; }
.setting-full-label             { font-weight: 500; font-size: .9rem; }

/* ── PTO types table editor ──────────────────────────────────────────────── */
.pto-types-editor   { width: 100%; }
.pto-types-table    { margin-bottom: 0; }
.pto-types-table td { vertical-align: middle; padding: .4rem .6rem; }
.pto-types-table .input-sm { padding: .25rem .45rem; font-size: .875rem; }
.setting-checkbox   { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: var(--color-primary); }

/* ── Employee PTO: balance summary bar ───────────────────────────────────── */
.pto-summary-bar        { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.pto-summary-card       { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: .75rem 1.25rem; min-width: 8rem; text-align: center; }
.pto-summary-value      { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); line-height: 1.2; }
.pto-summary-label      { font-size: .75rem; color: var(--color-muted); margin-top: .2rem; }
.pto-balance-hint       { display: inline-flex; align-items: center; gap: .35rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: .5rem 1rem; font-size: .875rem; color: #1e40af; flex-wrap: wrap; }
.pto-balance-value      { font-weight: 700; font-size: 1rem; }

/* ── PTO working-day count badge ─────────────────────────────────────────── */
.pto-count-badge { display: inline-block; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: var(--radius); padding: .3rem .75rem; font-size: .875rem; font-weight: 500; }

/* ── Dashboard PTO cards ─────────────────────────────────────────────────── */
.dash-card-unit { font-size: .7em; font-weight: 400; color: var(--color-muted); }
.dash-card-sub  { font-size: .8rem; color: var(--color-muted); margin-top: .1rem; }

/* ── Flatpickr: non-working days (weekends + holidays) ───────────────────── */
.flatpickr-day.fp-nonwork                           { color: #bbb !important; text-decoration: line-through; }
.flatpickr-day.fp-nonwork.inRange                   { background: transparent !important; box-shadow: none !important; color: #ccc !important; }
.flatpickr-day.fp-nonwork.startRange,
.flatpickr-day.fp-nonwork.endRange                  { background: #ddd !important; border-color: #bbb !important; color: #888 !important; }

/* ── Employee list: negative balance ─────────────────────────────────────── */
.text-danger  { color: #dc2626 !important; }
.font-bold    { font-weight: 700; }

/* ── My Time: pay period navigation ─────────────────────────────────────── */
.period-nav            { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.period-nav-label      { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.period-dates          { font-size: 1rem; font-weight: 600; color: var(--color-text); }
.badge-current         { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; font-size: .7rem; padding: .15rem .5rem; border-radius: 99px; }

/* ── My Time: table row variants ─────────────────────────────────────────── */
.row-weekend td        { background: #fafafa; color: var(--color-muted); }
.table-total-row td    { border-top: 2px solid var(--color-border); background: var(--color-bg); padding-top: .6rem; }
.dash-card-warning     { border-color: #fbbf24; background: #fffbeb; }
.dash-card-warning .dash-card-value { color: #b45309; }

/* ── Holidays ─────────────────────────────────────────────────────────────── */
.badge-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.text-warning  { color: #b45309; }
.row-shifted td { background: #fffbeb; }
.input-sm      { padding: .25rem .5rem; font-size: .875rem; }

/* ── Sortable table headers ───────────────────────────────────────────────── */
.sort-link        { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover  { color: var(--color-primary); }
.sort-active      { color: var(--color-primary); font-weight: 600; }
.sort-idle        { opacity: .4; font-size: .8em; }

/* ── External punch badge ─────────────────────────────────────────────────── */
.badge-external { background:#fef2f2; color:#dc2626; border:1px solid #fecaca;
                  font-size:.7rem; padding:.1rem .4rem; border-radius:99px;
                  white-space:nowrap; margin-left:.25rem; cursor:help; }

/* ── Punch grid: holiday tint, week divider & subtotals ─────────────────── */
.row-holiday td             { background: #dbeafe !important; }
.row-week-divider td        { padding: 0; height: 4px; background: #94a3b8; border: none; }
.row-week-divider:hover td  { background: #94a3b8 !important; cursor: default; }
.row-week-subtotal td       { background: var(--color-bg); font-size: .8rem;
                               color: var(--color-muted); font-weight: 600;
                               padding-top: .35rem; padding-bottom: .35rem;
                               border-top: 1px solid var(--color-border); }
.row-week-subtotal:hover td { background: var(--color-bg) !important; }
/* Prevent an empty table-actions cell from showing a phantom column gap */
td.table-actions:empty      { min-width: 0; padding: 0; width: 0; }

/* ── Dashboard section labels ─────────────────────────────────────────────── */
.dash-section-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em;
                      text-transform: uppercase; color: var(--color-muted);
                      margin-bottom: .5rem; margin-top: .25rem; }

/* ── Active (clocked-in) dash card ───────────────────────────────────────── */
.dash-card-active       { border-color: #bfdbfe; background: #eff6ff; }
.dash-card-active .dash-card-value { color: var(--color-primary); }

/* ── Admin impersonation banner ─────────────────────────────────────────── */
.impersonate-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.5rem;
    background: #92400e;
    color: #fef3c7;
    font-size: .875rem;
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 2px solid #b45309;
}
.impersonate-banner-icon { font-size: 1rem; flex-shrink: 0; }
.impersonate-banner-text { flex: 1; }
.impersonate-banner-text strong { color: #fff; }
.impersonate-banner-sub  { opacity: .75; font-size: .8rem; }
.impersonate-stop-form   { flex-shrink: 0; }
.impersonate-stop-btn {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    padding: .3rem .85rem;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.impersonate-stop-btn:hover { background: rgba(255,255,255,.25); }

/* ── Icon-only button variant ────────────────────────────────────────────── */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .45rem;
}
