/* =============================================
   TimeTracker — Booster Branded
   Dark sidebar with cyan accent, white content area.
   ============================================= */

/* ----- CSS Variables ----- */
:root {
    --navy:         #111111;
    --navy-light:   #1a1a1a;
    --navy-dark:    #000000;
    --accent:       #00F2EA;
    --accent-dark:  #00d4cd;
    --accent-hover: #00d4cd;
    --cta:          #3B82F6;
    --green:        #10b981;
    --yellow:       #f59e0b;
    --red:          #ef4444;
    --gray:         #737373;
    --gray-light:   #f5f5f5;
    --gray-dark:    #525252;
    --white:        #ffffff;
    --text:         #171717;
    --text-light:   #737373;
    --border:       #e5e5e5;
    --shadow:       0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius:       8px;
    --radius-sm:    4px;
    --mono:         'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ----- Global Reset & Base ----- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    color-scheme: light only !important;
    forced-color-adjust: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
    color: var(--text);
    background: var(--gray-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ----- Form Elements (replaces Pico CSS form styling) ----- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.15);
}

input::placeholder {
    color: var(--gray);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

label input,
label select {
    margin-top: 6px;
}

button,
input[type="submit"] {
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

a {
    color: var(--cta);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    color: var(--navy);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

table {
    border-collapse: collapse;
    width: 100%;
}

article {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

small {
    font-size: 0.8rem;
    color: var(--text-light);
}

.mono {
    font-family: var(--mono);
    font-size: 0.9em;
}

.hidden {
    display: none !important;
}


/* =============================================
   APP LAYOUT — Sidebar + Main Content
   ============================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}


/* ----- Sidebar ----- */
.sidebar {
    width: 220px;
    min-width: 220px;
    background: var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.sidebar-brand {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.sidebar-nav li a.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-left-color: var(--accent);
}

.nav-section-label {
    padding: 16px 16px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.nav-icon {
    font-size: 0.8em;
    width: 16px;
    text-align: center;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 4px;
}

.nav-logout {
    color: rgba(255, 255, 255, 0.5) !important;
}

.nav-logout:hover {
    color: var(--red) !important;
}


/* ----- Main Content ----- */
.main-content {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
    padding: 24px 32px;
    max-width: 1200px;
    width: 100%;
}

.app-footer {
    padding: 16px 32px;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    background: var(--white);
}


/* =============================================
   LOGIN PAGE
   ============================================= */

.login-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--navy);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.login-header h1 {
    margin: 0 0 2px;
    font-size: 1.5rem;
    color: var(--text);
}

.login-header p {
    margin: 0;
    color: var(--cta);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.login-card label {
    margin-bottom: 16px;
}

.login-card input {
    margin-top: 4px;
}

.login-btn {
    width: 100%;
    background: var(--cta);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.login-btn:hover {
    background: #2563eb;
}


/* =============================================
   ALERTS
   ============================================= */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fdeaea;
    color: var(--red);
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #eafde7;
    color: var(--green);
    border: 1px solid #c3e6cb;
}


/* =============================================
   PAGE HEADER & DATE NAV
   ============================================= */

.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--navy);
}

.page-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: -8px;
    margin-bottom: 20px;
}

.page-date {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-nav a {
    color: var(--text);
}

.date-nav a:hover {
    color: var(--gray-dark);
}

.date-arrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.date-arrow:hover {
    background: var(--gray-light);
    color: var(--text);
}

.date-picker-form {
    margin: 0;
}

.date-input {
    margin: 0 !important;
    padding: 6px 10px !important;
    font-size: 0.85rem !important;
    width: auto !important;
    border: 1px solid var(--border) !important;
}

.date-display {
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
}


/* =============================================
   STATUS DOTS (online/offline)
   ============================================= */

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 6px rgba(39, 174, 96, 0.5);
}

.status-dot.offline {
    background: var(--gray);
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
}

.status-label.online {
    background: #eafde7;
    color: var(--green);
}

.status-label.offline {
    background: var(--gray-light);
    color: var(--gray-dark);
}


/* =============================================
   ACTIVITY BARS
   ============================================= */

.activity-bar-container {
    background: var(--gray-light);
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.activity-bar-container.summary-bar {
    height: 16px;
    max-width: 200px;
}

.activity-bar-container.inline-bar {
    height: 22px;
    display: flex;
    align-items: center;
    position: relative;
}

.activity-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
    min-width: 0;
}

/* Color based on data-activity attribute — applied via JS on load */
.activity-bar[data-activity] {
    background: var(--gray);
}

.activity-pct-label {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
    z-index: 1;
}


/* =============================================
   DASHBOARD — Employee Cards
   ============================================= */

.employee-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.employee-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
    margin: 0;
    padding: 0;
}

.employee-card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-row h3 {
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
}

.card-body {
    padding: 16px 20px;
}

.card-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 12px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-screenshot {
    margin-top: 16px;
    position: relative;
}

.card-screenshot.empty {
    padding: 24px;
    text-align: center;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
}

.no-screenshot {
    color: var(--text-light);
    font-size: 0.85rem;
}

.screenshot-thumb {
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.screenshot-thumb:hover {
    box-shadow: var(--shadow-hover);
}

.screenshot-time {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    margin: 0;
}

.card-link {
    font-size: 0.85rem;
    color: var(--cta);
    text-decoration: none;
}

.card-link:hover {
    color: #2563eb;
    text-decoration: underline;
}


/* =============================================
   SUMMARY ROW (timesheet header)
   ============================================= */

.summary-row {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.summary-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* =============================================
   VIEW LINKS (Daily / Weekly / Screenshots tabs)
   ============================================= */

.view-links {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.view-links a {
    padding: 8px 16px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-light);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.view-links a:hover {
    background: var(--gray-light);
    color: var(--text);
}

.view-links a.active {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
}


/* =============================================
   TABLES — Segments, Weekly, Employees
   ============================================= */

.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.segments-table,
.weekly-table,
.employees-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.segments-table th,
.weekly-table th,
.employees-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: var(--gray-light);
    border-bottom: 2px solid var(--border);
}

.segments-table td,
.weekly-table td,
.employees-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.9rem;
}

.segments-table tbody tr:hover,
.weekly-table tbody tr:hover {
    background: rgba(74, 144, 217, 0.04);
}


/* Gap rows (no data segments) */
.gap-row {
    background: #f8f9fa;
}

.gap-row td {
    color: var(--gray-dark);
    font-style: italic;
}

.gap-label {
    text-align: center;
    font-size: 0.85rem;
}

/* Today highlight for weekly */
.today-row {
    background: rgba(74, 144, 217, 0.06);
}

.no-data-row td {
    color: var(--gray);
}

/* Totals row */
.totals-row td {
    padding: 14px 16px;
    background: var(--gray-light);
    border-top: 2px solid var(--border);
}

.empty-table {
    text-align: center;
    color: var(--text-light);
    padding: 32px 16px !important;
    font-style: italic;
}

/* Column widths for segments table */
.col-time        { width: 200px; white-space: nowrap; }
.col-activity    { width: 200px; }
.col-keys        { width: 80px; text-align: right; }
.col-clicks      { width: 80px; text-align: right; }
.col-screenshots { min-width: 200px; }

/* Segment screenshot thumbnails (small, in table) */
.segment-screenshots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.screenshot-thumb-sm {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

.screenshot-thumb-sm:hover {
    box-shadow: var(--shadow-hover);
    transform: scale(1.05);
}

/* Weekly table columns */
.col-day            { width: 60px; }
.col-date           { width: 160px; }
.col-hours          { width: 80px; text-align: right; }
.col-activity-weekly { width: 100px; text-align: right; }
.col-bar            { min-width: 150px; }


/* =============================================
   SCREENSHOT GALLERY
   ============================================= */

.screenshot-count {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.15s;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-thumb-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
    background: var(--navy-dark);
}

.gallery-thumb-wrapper:hover {
    box-shadow: var(--shadow-hover);
}

.gallery-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.gallery-time-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: var(--white);
    padding: 20px 10px 8px;
    font-size: 0.75rem;
}

.gallery-activity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
    /* Default background, overridden by JS based on data-activity */
    background: var(--gray);
}


/* =============================================
   SCREENSHOT MODAL (Lightbox)
   ============================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay:not(:empty) {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    color: var(--red);
}

.modal-image-wrapper {
    text-align: center;
    background: #000;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
}

.modal-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.modal-nav {
    display: flex;
    justify-content: space-between;
    padding: 8px 20px 16px;
}

.modal-nav-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s;
}

.modal-nav-btn:hover {
    background: var(--border);
}


/* =============================================
   EMPLOYEES PAGE
   ============================================= */

.add-employee-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    padding: 0;
}

.add-employee-card header {
    padding: 16px 20px 0;
    margin: 0;
}

.add-employee-card header h3 {
    margin: 0;
}

.add-employee-form {
    padding: 12px 20px 20px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-row label {
    flex: 1;
}

.add-btn {
    padding: 10px 20px;
    background: var(--cta);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    height: fit-content;
    transition: background 0.15s;
}

.add-btn:hover {
    background: #2563eb;
}

.api-key-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-key-cell code {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--gray-light);
    padding: 3px 8px;
    border-radius: 3px;
}

.small-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    background: var(--white);
    color: var(--text);
    transition: background 0.15s;
    white-space: nowrap;
}

.small-btn:hover {
    background: var(--gray-light);
}

.inline-select {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
}

.reveal-btn { }

.copy-btn {
    color: var(--cta);
    border-color: var(--cta);
}

.regen-btn {
    color: var(--yellow);
    border-color: var(--yellow);
}

.regen-btn:hover {
    background: #fef9e7;
}

.deactivate-btn {
    color: var(--red);
    border-color: var(--red);
}

.deactivate-btn:hover {
    background: #fdeaea;
}

.activate-btn {
    color: var(--green);
    border-color: var(--green);
}

.activate-btn:hover {
    background: #eafde7;
}

.actions-cell {
    display: flex;
    gap: 6px;
}

.actions-cell form {
    margin: 0;
    padding: 0;
}

/* Anti-cheat flag badges */
.flag-badges {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.flag-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.4;
}

.flag-jiggler {
    background: #fdeaea;
    color: var(--red);
    border: 1px solid var(--red);
}

.flag-no_keys {
    background: #fef9e7;
    color: var(--yellow);
    border: 1px solid var(--yellow);
}

.flag-perfect {
    background: #fef0e7;
    color: #e67e22;
    border: 1px solid #e67e22;
}

.flag-low_variety {
    background: #edf0fc;
    color: #5b6abf;
    border: 1px solid #5b6abf;
}

.flag-overlap {
    background: #fdeaea;
    color: #c0392b;
    border: 1px solid #c0392b;
}

.flag-multi_ip {
    background: #fdeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.flag-duplicate_screen {
    background: #fef0e7;
    color: #d35400;
    border: 1px solid #d35400;
}

.flag-unusual_hours {
    background: #edf0fc;
    color: #7f8c8d;
    border: 1px solid #7f8c8d;
}

.flag-overnight {
    background: #f4ecf7;
    color: #8e44ad;
    border: 1px solid #8e44ad;
}

.flagged-row {
    background: #fffaf5 !important;
}

.flagged-row:hover {
    background: #fff3e8 !important;
}

/* Audit log */
.audit-filter select {
    padding: 6px 10px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 0.85rem;
}

.audit-table td {
    font-size: 0.8rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.pagination a {
    color: var(--cta);
    text-decoration: none;
    font-weight: 600;
}

.page-num {
    color: var(--text-light);
    font-size: 0.85rem;
}

.employee-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-name-cell .edit-btn {
    font-size: 0.7rem;
    padding: 2px 6px;
    color: var(--text-light);
    border-color: var(--gray);
}

.rename-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.rename-form input[type="text"] {
    padding: 4px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    width: 160px;
}

.rename-form .save-btn {
    color: var(--green);
    border-color: var(--green);
}

/* Reports */
.report-actions {
    margin-bottom: 20px;
}

.export-btn {
    display: inline-block;
    background: var(--cta);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.export-btn:hover {
    background: #2563eb;
}

.report-agency-card {
    background: var(--white);
    border: 1px solid var(--gray);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.report-agency-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--gray-light);
    border-bottom: 1px solid var(--gray);
}

.report-agency-card header h3 {
    margin: 0;
    font-size: 1rem;
}

.agency-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.report-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    background: var(--white);
}

.report-table tfoot td {
    border-top: 2px solid var(--gray);
    background: var(--gray-light);
}

.employee-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.employee-status.active {
    background: #eafde7;
    color: var(--green);
}

.employee-status.inactive {
    background: var(--gray-light);
    color: var(--gray-dark);
}


/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state a {
    color: var(--cta);
}


/* =============================================
   ACTIVITY BAR COLORING — JavaScript-driven
   Applies colors based on data-activity attribute.
   ============================================= */

/* Keyboard shortcut: Escape to close modal */
/* Handled inline, but also here for good measure */


/* =============================================
   RESPONSIVE (mostly desktop, basic mobile)
   ============================================= */

@media (max-width: 900px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
    }

    .sidebar-brand,
    .nav-section-label,
    .sidebar-nav li a span:not(.status-dot):not(.nav-icon) {
        display: none;
    }

    .sidebar-nav li a {
        justify-content: center;
        padding: 12px 8px;
    }

    .main-content {
        margin-left: 60px;
    }

    .content-wrapper {
        padding: 16px;
    }

    .employee-cards {
        grid-template-columns: 1fr;
    }

    .summary-row {
        flex-direction: column;
        gap: 16px;
    }

    .page-header {
        flex-direction: column;
    }

    .date-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }
}


/* =============================================
   JAVASCRIPT COLORIZATION
   Script runs on page load and after HTMX swaps.
   ============================================= */
