/* WorkPulse - Modern Clean Theme */

:root {
    --navbar-height: 56px;

    /* Color palette - Modern slate/indigo theme */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-navbar: #0f172a;

    /* Primary colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;

    /* Semantic colors */
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-info: #3b82f6;
    --color-info-light: #dbeafe;

    /* Text colors */
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    /* Borders */
    --color-border: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    padding-top: var(--navbar-height);
    line-height: 1.6;
}

/* ===== LAYOUT STRUCTURE ===== */
body > .d-flex {
    min-height: calc(100vh - var(--navbar-height));
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--color-navbar) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
    min-height: var(--navbar-height);
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.025em;
}

.navbar-brand i {
    color: var(--color-primary-light);
}

.version-label {
    font-family: 'Consolas', 'SF Mono', 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    padding-left: 28px;
}

/* Header nav items */
.navbar-nav .nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 12px;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff;
}

.navbar-nav .nav-link.active {
    color: #ffffff;
}

/* Dropdown menus in header */
.navbar .dropdown-menu {
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
}

.navbar .dropdown-item {
    font-size: 0.825rem;
    padding: 8px 16px;
    color: #cbd5e1;
    transition: all 0.15s ease;
}

.navbar .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.navbar .dropdown-item.active {
    background: var(--color-primary);
    color: #ffffff;
}

.navbar .dropdown-item i {
    width: 20px;
    opacity: 0.7;
}

.navbar .dropdown-header {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 8px 16px;
}

.navbar .dropdown-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* Avatar circle */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

#headerTimerIndicator {
    background: var(--color-warning);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

#headerTimerIndicator:empty {
    display: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 24px;
    min-height: calc(100vh - var(--navbar-height));
    width: 100%;
    flex: 1 1 auto;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.025em;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.row {
    --bs-gutter-x: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.row > * {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* ===== CARDS ===== */
.card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* ===== DASHBOARD SUMMARY CARDS ===== */
.summary-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.summary-card h6 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    letter-spacing: -0.02em;
}

.summary-card.income {
    border-left: 4px solid var(--color-success);
}
.summary-card.income .amount {
    color: var(--color-success);
}

.summary-card.expenses {
    border-left: 4px solid var(--color-danger);
}
.summary-card.expenses .amount {
    color: var(--color-danger);
}

.summary-card.net {
    border-left: 4px solid var(--color-primary);
}
.summary-card.net .amount {
    color: var(--color-primary);
}

.summary-card.pending {
    border-left: 4px solid var(--color-warning);
}
.summary-card.pending .amount {
    color: var(--color-warning);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-bar .form-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: 8px;
    border-color: var(--color-border);
    font-size: 0.85rem;
}

.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Quick filter buttons */
.btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-outline-secondary:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 500;
    border-radius: 8px;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
    padding: 12px 8px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    padding: 12px 8px;
    border-color: var(--color-border);
    font-size: 0.85rem;
}

.table-sm td, .table-sm th {
    padding: 8px;
}

.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.04);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
}

.alert-warning {
    background: var(--color-warning-light);
    color: #92400e;
}

.alert-danger {
    background: var(--color-danger-light);
    color: #991b1b;
}

.alert-heading {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.badge-active, .badge-paid { background-color: var(--color-success); }
.badge-inactive, .badge-draft { background-color: var(--color-text-light); }
.badge-open, .badge-sent { background-color: var(--color-info); }
.badge-processed { background-color: var(--color-warning); }

/* ===== TIMER DISPLAY ===== */
.timer-display {
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 2px;
}

/* ===== FORM ELEMENTS ===== */
.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--color-border);
    padding: 10px 14px;
    font-size: 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ===== ACTION BUTTONS ===== */
.btn-actions {
    white-space: nowrap;
}

.btn-actions .btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ===== UTILITY CLASSES ===== */
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-muted { color: var(--color-text-muted) !important; }

.fw-bold { font-weight: 600; }

/* ===== PROFILE PAGE ===== */
.profile-card {
    max-width: 600px;
}

/* ===== NOTIFICATION BELL ===== */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--color-navbar);
    animation: notif-pulse 2s ease-in-out infinite;
}
@keyframes notif-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

.notif-item {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover {
    background: rgba(255,255,255,0.05);
}
.notif-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.notif-item-message {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2px;
}
.notif-item-time {
    font-size: 0.65rem;
    color: #64748b;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-heading {
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
    color: var(--color-primary-light);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #475569;
}

.footer-version {
    font-family: 'Consolas', monospace;
    opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* ===== SIDEBAR NAVIGATION ===== */
:root {
    --sidebar-width: 240px;
    --sidebar-collapsed: 0px;
    --topbar-height: 48px;
}

/* Override old navbar height for new topbar */
body {
    padding-top: var(--topbar-height) !important;
}

body > .d-flex {
    min-height: calc(100vh - var(--topbar-height)) !important;
}

/* Top bar */
.wp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--color-navbar);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1040;
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-toggle {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
}
.topbar-toggle:hover { color: #fff; background: rgba(255,255,255,0.08); }

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}
.topbar-brand i { color: var(--color-primary-light); font-size: 1.1rem; }
.brand-version {
    font-family: monospace;
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    align-self: flex-end;
    margin-bottom: 1px;
}

.topbar-center {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.topbar-search {
    position: relative;
    width: 100%;
}
.topbar-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.8rem;
}
.topbar-search input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 5px 12px 5px 32px;
    color: #e2e8f0;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.15s;
}
.topbar-search input::placeholder { color: #475569; }
.topbar-search input:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.topbar-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    position: relative;
}
.topbar-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.topbar-timer { text-decoration: none; }
.timer-badge:not(:empty) {
    background: var(--color-warning);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: monospace;
    padding: 2px 8px;
    border-radius: 10px;
}

.topbar-avatar {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
}

/* Sidebar */
.wp-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-navbar);
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    transition: transform 0.2s ease;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    min-height: 100%;
}

.sidebar-spacer { flex: 1; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.12s;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: #fff; background: rgba(99,102,241,0.2); border-right: 3px solid var(--color-primary); }
.sidebar-link i:first-child { font-size: 1.05rem; width: 20px; text-align: center; }

.sidebar-toggle { position: relative; }
.sidebar-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.2s;
    opacity: 0.5;
}
.sidebar-section.open > .sidebar-toggle .sidebar-arrow { transform: rotate(180deg); }

.sidebar-submenu {
    display: none;
    padding: 2px 0 6px;
}
.sidebar-section.open > .sidebar-submenu { display: block; }

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 46px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.12s;
}
.sidebar-sublink:hover { color: #e2e8f0; background: rgba(255,255,255,0.03); }
.sidebar-sublink.active { color: var(--color-primary-light); font-weight: 600; }
.sidebar-sublink i { font-size: 0.85rem; width: 16px; text-align: center; opacity: 0.7; }

/* Main content offset for sidebar */
.main-content {
    margin-left: var(--sidebar-width) !important;
    transition: margin-left 0.2s ease;
}

/* Sidebar collapsed state */
body.sidebar-collapsed .wp-sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .main-content { margin-left: 0 !important; }

/* FAB */
.wp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
}

.fab-trigger {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.fab-trigger:hover { background: var(--color-primary-dark); transform: scale(1.05); }
.wp-fab.open .fab-trigger { transform: rotate(45deg); }

.fab-menu {
    position: absolute;
    bottom: 64px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}
.wp-fab.open .fab-menu { display: flex; }

.fab-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--color-navbar);
    color: #e2e8f0;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    transition: all 0.15s;
}
.fab-action:hover { background: var(--color-primary); color: #fff; }
.fab-action i { font-size: 1rem; }

/* Mobile: sidebar overlay */
@media (max-width: 992px) {
    .wp-sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-open .wp-sidebar {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1029;
    }
    .topbar-center { display: none; }
    .brand-text { display: none; }
}

/* Hide old navbar styles when new topbar is active */
.navbar.fixed-top { display: none !important; }


/* ===== VISUAL POLISH ===== */

/* Refined main content spacing with sidebar */
.main-content {
    padding: 28px 32px !important;
}

/* Page header refinement */
.page-header h2 {
    font-size: 1.4rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card refinements */
.card {
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04) !important;
}

/* Dashboard action cards */
.card.bg-primary.bg-opacity-10:hover,
.card.bg-success.bg-opacity-10:hover,
.card.bg-warning.bg-opacity-10:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

/* Summary cards — subtle gradient backgrounds */
.summary-card.income { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important; }
.summary-card.expenses { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important; }
.summary-card.net { background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important; }
.summary-card.pending { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important; }

/* Table refinements */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--color-border) !important;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody tr {
    transition: background 0.1s ease;
}
.table tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.5);
}
.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.06) !important;
}
.table td:first-child { border-radius: 8px 0 0 8px; }
.table td:last-child { border-radius: 0 8px 8px 0; }

/* Status badges — pill style */
.badge {
    font-weight: 600 !important;
    font-size: 0.68rem !important;
    padding: 5px 10px !important;
    border-radius: 20px !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Better form inputs */
.form-control, .form-select {
    border-radius: 10px !important;
    transition: all 0.15s ease;
}
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
    border-color: var(--color-primary) !important;
}

/* Button refinements */
.btn {
    border-radius: 10px !important;
    font-weight: 500;
    transition: all 0.15s ease;
}
.btn-primary {
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}
.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Empty state styling */
.text-muted.text-center.py-3,
p.text-muted.mb-0.small {
    padding: 40px 20px !important;
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
}

/* Timer display refinement */
.timer-display {
    font-size: 3.5rem !important;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Slim footer for app context */
.site-footer {
    padding: 16px 0 !important;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.2s ease;
}
body.sidebar-collapsed .site-footer { margin-left: 0; }
.site-footer .row { display: none; }
.site-footer::after {
    content: '© 2026 WorkPulse · acarr.org';
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: #475569;
    padding: 8px;
}

/* Smooth page load animation */
.main-content {
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar refinement */
.wp-sidebar::-webkit-scrollbar { width: 4px; }
.wp-sidebar::-webkit-scrollbar-track { background: transparent; }
.wp-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.wp-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Dropdown menu refinement */
.dropdown-menu-dark {
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
    padding: 8px !important;
}
.dropdown-menu-dark .dropdown-item {
    border-radius: 8px;
    margin: 1px 0;
    font-size: 0.82rem;
}
.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Alert refinement */
.alert {
    border-radius: 12px !important;
    border-left: 4px solid !important;
}
.alert-warning { border-left-color: var(--color-warning) !important; }
.alert-danger { border-left-color: var(--color-danger) !important; }

/* Cash position card on dashboard */
.card h6.text-muted {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}


/* ===== ENTITY LIST PAGES — UNIFIED STYLING ===== */

/* Page header — icon accent + description area */
.page-header {
    padding-bottom: 20px !important;
    margin-bottom: 28px !important;
    border-bottom: 1px solid var(--color-border);
}
.page-header .btn-primary {
    padding: 8px 20px;
    font-size: 0.85rem;
    gap: 6px;
}

/* Filter card — make it feel like a toolbar, not a card */
.card.mb-3 > .card-body > .filter-bar,
.card.mb-3 > .card-body > form.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.card.mb-3 > .card-body > .filter-bar .form-label,
.card.mb-3 > .card-body > form.filter-bar .form-label {
    font-size: 0.68rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}
.card.mb-3 > .card-body > .filter-bar .form-select-sm,
.card.mb-3 > .card-body > .filter-bar .form-control-sm {
    min-width: 140px;
    font-size: 0.82rem;
}

/* Quick filter button groups */
.btn-group .btn-outline-primary {
    border-color: var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}
.btn-group .btn-outline-primary:hover,
.btn-group .btn-outline-primary.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

/* Data table card — the main content area */
.card > .card-body > .table {
    margin: -20px;
    width: calc(100% + 40px);
}
.card > .card-body > .table thead th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 14px 16px !important;
    font-size: 0.68rem !important;
    font-weight: 700;
    color: #475569;
}
.card > .card-body > .table tbody td {
    padding: 14px 16px !important;
    font-size: 0.84rem;
    color: var(--color-text);
}
.card > .card-body > .table tbody tr {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.card > .card-body > .table tbody tr:last-child {
    border-bottom: none;
}

/* Table action buttons — cleaner look */
.btn-actions .btn,
td .btn-sm,
td .btn-outline-primary,
td .btn-outline-danger,
td .btn-outline-warning,
td .btn-outline-secondary,
td .btn-outline-success {
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Status badges in tables — consistent colors */
td .badge,
td span.badge {
    font-size: 0.65rem !important;
    padding: 4px 10px !important;
}

/* Money amounts in tables — monospace */
td:has(> :is(.text-success, .text-danger, .text-warning)),
td.text-end.fw-bold,
td.text-success,
td.text-danger,
td.text-end {
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 0.82rem;
    letter-spacing: -0.02em;
}

/* Empty state — friendly, not just text */
.card > .card-body > p.text-muted.text-center,
.card > .card-body > .text-muted.text-center {
    padding: 60px 20px !important;
    font-size: 0.95rem !important;
}
.card > .card-body > p.text-muted.text-center::before,
.card > .card-body > .text-muted.text-center.py-3::before {
    content: '\F5A0';  /* bi-inbox Bootstrap Icon */
    font-family: 'bootstrap-icons';
    display: block;
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ===== FORM PAGES ===== */
.card > .card-body > form .row.g-3 {
    gap: 0 !important;
}
.card > .card-body > form .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.card > .card-body > form .form-control,
.card > .card-body > form .form-select {
    padding: 10px 14px;
    font-size: 0.85rem;
    background: #fafbfc;
    border: 1.5px solid var(--color-border);
}
.card > .card-body > form .form-control:focus,
.card > .card-body > form .form-select:focus {
    background: #fff;
}

/* Form section headers */
.card > .card-body > h6.fw-bold,
.card > .card-body > .fw-bold.mb-3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
    margin-bottom: 16px !important;
}

/* ===== DETAIL/VIEW PAGES ===== */
/* Invoice view, contract view, pay period view */
.card > .card-body > dl,
.card > .card-body > .row > .col-md-6 > dl {
    margin-bottom: 0;
}
.card > .card-body > dl dt,
.card > .card-body > .row > .col-md-6 > dl dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.card > .card-body > dl dd,
.card > .card-body > .row > .col-md-6 > dl dd {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

/* ===== TIMER PAGE ===== */
.card > .card-body.text-center.py-4 {
    padding: 48px 20px !important;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
#startStopBtn.btn-success {
    padding: 12px 48px !important;
    font-size: 1rem !important;
    font-weight: 700;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
#startStopBtn.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}
#startStopBtn.btn-danger {
    padding: 12px 48px !important;
    font-size: 1rem !important;
    font-weight: 700;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== FORM CHECK (show inactive toggle) ===== */
.form-check {
    padding: 8px 12px 8px 36px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.form-check-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* ===== RESPONSIVE REFINEMENTS ===== */
@media (max-width: 768px) {
    .main-content {
        padding: 16px !important;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .page-header .btn-primary {
        width: 100%;
        text-align: center;
    }
    .card > .card-body > .table {
        margin: -20px -12px;
        width: calc(100% + 24px);
    }
    .card > .card-body > .table thead th,
    .card > .card-body > .table tbody td {
        padding: 10px 8px !important;
        font-size: 0.78rem !important;
    }
}
