/* =========== CSS VARIABLES & DESIGN SYSTEM =========== */
:root {
    /* Colors - Deep Premium Dark Theme */
    --bg-base: #0a0c14;
    --bg-surface: #111422;
    --bg-glass: rgba(17, 20, 34, 0.45);
    --bg-glass-hover: rgba(26, 30, 48, 0.7);
    --bg-panel: rgba(13, 16, 26, 0.98);

    /* Accents - Vibrant & Impactful */
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-primary-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.35);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.1);

    /* Typography - Refined */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    /* Borders & Shadows - Subtle & Deep */
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --shadow-glass: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========== RESET & BASE =========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar - Professional & Subtle */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* =========== BACKGROUND EFFECTS (GLASSMORPHISM) =========== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #15182a 0%, var(--bg-base) 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 15s infinite alternate ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
    animation-duration: 20s;
}

.noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* =========== LAYOUT & STRUCTURAL =========== */
.app-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 7rem 2rem 2rem 2rem; /* Increased top padding for fixed header */
}

.active-view {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hidden-view {
    display: none;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* =========== TYPOGRAPHY =========== */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
}

/* =========== BUTTONS & FORMS =========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px 0 rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: var(--success);
    color: #0c0e16;
}

.btn-success:hover {
    background: #34d399;
    box-shadow: 0 4px 15px 0 rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    width: 38px;
    height: 38px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-glass) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
select,
textarea {
    background: rgba(5, 7, 15, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.8rem 1.1rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(10, 12, 24, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* =========== COMPONENTS =========== */
/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-open {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-started {
    background: var(--accent-glow);
    color: #fff;
    border: 1px solid rgba(99, 102, 241, 0.5);
}

.status-paused {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-completed,
.status-closed {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Loaders */
.line-loader {
    height: 3px;
    width: 50px;
    background: var(--border-glass);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin: 2rem auto;
}

.line-loader::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    background: var(--accent-primary);
    animation: load 1s infinite ease-in-out alternate;
}

@keyframes load {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

.w-full {
    width: 100%;
    max-width: 200px;
}

/* =========== SPECIFIC VIEWS =========== */

/* 1. Login & Register View */
#login-view,
#register-view {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-card {
    background: #111424;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.auth-brand-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.auth-logo h1 {
    font-size: 2.2rem;
    background: linear-gradient(90deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.floating-label {
    position: relative;
    margin-bottom: 0;
}

.floating-label input {
    width: 100%;
    padding: 1.25rem 1rem 0.75rem;
    background: #1e2235;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.2s ease;
    pointer-events: none;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
}

.floating-label input:focus~label,
.floating-label input:not(:placeholder-shown)~label {
    top: 1rem;
    font-size: 0.75rem;
    color: #818cf8;
}

.password-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    z-index: 10;
    font-size: 1.1rem;
    padding: 0.5rem;
    /* Increase touch area */
}

.password-toggle:hover {
    color: #818cf8;
}

.floating-label input[type="password"],
.floating-label input[type="text"].password-input {
    padding-right: 3.5rem;
}

.floating-label input:focus {
    border-color: #818cf8;
    background: #1e2235;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    background: #6366f1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
}

.auth-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--text-primary);
}

/* 2. Dashboard Header */
.dashboard-header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

#main-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 1000;
}

.header-main {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    min-height: 48px;
}

.tag-selector-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
    max-height: 180px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

/* Hide the native checkbox — the card IS the control */
.tag-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tag-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.5rem 0.55rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    position: relative;
    user-select: none;
    text-align: center;
}

.tag-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

/* Selected state */
.tag-option:has(input:checked) {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

/* Checkmark badge in top-right corner when selected */
.tag-option::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.55rem;
    position: absolute;
    top: 5px;
    right: 6px;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 14px;
    text-align: center;
}

.tag-option:has(input:checked)::after {
    opacity: 1;
    transform: scale(1);
}

/* Avatar inside tag-option — override mini-avatar to be bigger */
.tag-option .mini-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.75rem !important;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.2s ease;
}

.tag-option:has(input:checked) .mini-avatar {
    border-color: var(--accent-primary);
}

/* Name text */
.tag-option>span:last-child {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease;
}

.tag-option:has(input:checked)>span:last-child {
    color: var(--text-primary);
}

.worker-group {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.worker-group .worker-avatar {
    margin-left: -8px;
    border: 2px solid var(--bg-card);
}

.worker-group .worker-avatar:first-child {
    margin-left: 0;
}

/* Stopwatch UI Refinement */
.stopwatch-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    transition: var(--transition);
}

.stopwatch-container:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
}

.stopwatch-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success);
}

.stopwatch-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stopwatch-info .mono {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.stopwatch-info .divider {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.desc-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stopwatch-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-pause {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.btn-pause:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.stopwatch-timer-wrap {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    min-width: 85px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-display {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.02em;
}

/* ----------- DASHBOARD HEADER & BRANDING ----------- */
.dashboard-header {
    background: rgba(13, 16, 26, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-meta span:first-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* User Avatar SM */

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(244, 63, 94, 0.3);
}

@keyframes fadeIn-timer {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.section-header.small {
    margin-bottom: 1rem;
    align-items: center;
}

/* JO Controls Section */
.jo-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-box-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#jo-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem 0.7rem 2.8rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

#jo-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.view-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 38px;
    height: 34px;
    border-radius: 7px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.view-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Job Orders Containers Mapping */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Job List Row Styling */
.job-list-row {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.5rem;
    display: grid;
    grid-template-columns: 80px 2fr 1.2fr 1.2fr 1fr 1.2fr 110px;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
}

.job-list-row:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-strong);
    transform: translateX(5px);
}

.list-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.list-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.list-meta i {
    width: 14px;
    color: var(--text-muted);
}

.job-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.job-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-strong);
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-glass), 0 0 20px rgba(99, 102, 241, 0.1);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.job-id {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
}

.job-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.4rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.job-card-meta>span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.job-card-meta i {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

/* Active Work Status Indicator */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-animation 1.5s infinite;
    display: inline-block;
}

.pulse-dot-paused {
    width: 8px;
    height: 8px;
    background-color: var(--warning);
    border-radius: 50%;
    display: inline-block;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.work-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-glass);
}

.indicator-paused {
    color: var(--warning);
}

.worker-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.02em;
}

/* Modals Refinement */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 5, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
    opacity: 1;
    transition: var(--transition);
}

.modal-content {
    width: 100%;
    max-width: 520px;
    background: var(--bg-panel);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    padding: 2.5rem;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    position: relative;
    transform: scale(1);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.modal-large {
    max-width: 850px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: -2.5rem;
    /* Matches parent padding */
    z-index: 50;
    margin: -2.5rem -2.5rem 2.5rem -2.5rem;
    padding: 2.5rem 2.5rem 1.5rem 2.5rem;
    background: var(--bg-panel);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    border-bottom: 1px solid var(--border-glass);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-header h2 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.job-detail-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.job-detail-title h2 {
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.mt-4 {
    margin-top: 1rem;
}

/* Detail Meta Layout */
.job-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.meta-val {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.job-desc {
    margin-bottom: 2rem;
}

.job-desc p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.divider {
    height: 1px;
    background: var(--border-glass);
    margin: 2rem 0;
}

.row-right {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Work Orders List */
.work-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.work-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.work-item.active-work {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Subtle pulse for active work badge */
.active-work .badge-success {
    animation: pulse-active 2s infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

@keyframes pulse-active {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-strong);
}

.work-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.work-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.work-desc {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.work-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

.work-hours {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.work-hours i {
    color: var(--accent-primary);
}

.work-hours strong {
    color: var(--text-primary);
    font-weight: 600;
}

.work-user {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.work-user i {
    font-size: 0.75rem;
}

/* Job Card User Breakdown (Mini) */
.job-card-breakdown {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mini-user-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.2rem 0.6rem 0.2rem 0.3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.mini-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.work-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Time Pipeline (Timeline) */
.time-pipeline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

/* Vertical line connecting dots */
.time-pipeline::before {
    content: '';
    position: absolute;
    left: calc(1.25rem + 6px);
    /* padding-left + dot radius = center of every dot */
    transform: translateX(-50%);
    /* offset half the line width so it's perfectly bisected */
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 0;
}

.pipeline-event {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
    padding: 0.25rem 0;
}

/* Priority Levels (1=Critical, 5=Low) */
.prio-5 {
    color: #4ade80;
}

/* Low - Green */
.prio-4 {
    color: #60a5fa;
}

/* Normal - Blue */
.prio-3 {
    color: #fbbf24;
}

/* Medium - Yellow */
.prio-2 {
    color: #fb923c;
}

/* High - Orange */
.prio-1 {
    color: #f87171;
}

/* Critical - Red */

.priority-flag {
    margin-right: 4px;
    font-size: 0.85em;
}

/* Badge variants for priority */
.badge-prio {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.65rem;
    min-width: 100px;
}

.btn-timeline-edit {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.2rem;
    opacity: 0;
    transition: var(--transition);
    border-radius: 4px;
}

.pipeline-event:hover .btn-timeline-edit {
    opacity: 1;
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.pipeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--bg-surface);
    box-sizing: border-box;
    /* exact 12px total, 6px radius → lines up with ::before calc */
    display: block;
}

.dot-start {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.dot-pause {
    background: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.dot-resume {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.dot-end {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.pipeline-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 75px;
}

.pipeline-time {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

/* Admin View Specific Styles */
.admin-nav {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.btn-nav-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.admin-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.tab-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Admin List Layout */
.admin-work-orders-container {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    position: relative;
}

.admin-list-content {
    max-height: 600px;
    overflow-y: auto;
}

.admin-list-header {
    display: flex;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-list-row {
    display: flex;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
    align-items: center;
}

.admin-list-row:last-child {
    border-bottom: none;
}

.admin-list-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Column Widths */
.col-id {
    width: 100px;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.col-info {
    flex: 1;
    padding-right: 1.5rem;
}

.col-user {
    width: 150px;
    flex-shrink: 0;
}

.col-job {
    width: 220px;
    flex-shrink: 0;
}

.col-time {
    width: 140px;
    flex-shrink: 0;
}

.col-status {
    width: 120px;
    flex-shrink: 0;
    text-align: right;
}

/* Content Styles */
.admin-desc {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.admin-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-avatar {
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}

.admin-job-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-job-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.admin-job-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-time-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Utilities */
/* Job Summary Specific Styles */
.job-summary-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    padding: 2rem;
    margin: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1.8fr 1.2fr 2.5fr;
    gap: 2.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.job-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.job-summary-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.job-info-main h3 {
    font-size: 1.35rem;
    margin: 0.75rem 0 0.4rem 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.job-info-main .job-id-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

/* Admin Dashboard Filter Enhancements */
.admin-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-picker-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: var(--transition);
    height: 46px;
    /* Unified height */
}

.date-picker-wrapper.search-box {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.05);
}

.date-picker-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.date-picker-wrapper i {
    color: var(--accent-primary);
    font-size: 0.95rem;
    opacity: 0.8;
}

.btn-clear-filters {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: var(--danger);
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-filters:hover {
    background: var(--danger);
    color: white;
    transform: rotate(-15deg);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.tab-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.tab-stats span {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-date-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    cursor: pointer;
    width: 100%;
}

.admin-date-input::placeholder {
    color: var(--text-muted);
}


/* Ensure dropdown options are readable in dark mode across all selects */
select option {
    background-color: #1a1c2e !important;
    /* Forces dark background in most browsers */
    color: #ffffff !important;
    /* Forces white text */
}

/* Specific styling for the admin filter controls */
.admin-date-input option {
    background-color: #1a1c2e;
    color: #ffffff;
    padding: 12px;
}

/* Specific fix to ensure the select text remains white while the dropdown list is managed by the OS/Browser */
select#admin-user-filter {
    background-color: transparent;
    color: #ffffff;
}


/* Custom Calendar Icon (Webkit) */
.admin-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.admin-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Date Group Header */
.date-group-section {
    margin-bottom: 2rem;
}

.date-group-header {
    margin: 1.5rem 1.5rem 0.75rem 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-group-header i {
    color: var(--accent-primary);
    font-size: 0.9rem;
}


.job-stats-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border-left: 1px solid var(--border-glass);
    border-right: 1px solid var(--border-glass);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.hours {
    color: var(--success);
}

.job-user-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.user-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-breakdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(6px);
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    /* Allow text truncate if needed */
}

.user-meta span {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-breakdown-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    color: white;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.user-breakdown-time {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 80px;
    text-align: right;
}

.hidden {
    display: none !important;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    animation: toast-in 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.toast-success i {
    color: var(--success);
}

.toast.toast-error i {
    color: var(--danger);
}

@keyframes toast-in {
    to {
        transform: translateX(0);
    }
}

@keyframes toast-out {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* =========== RESPONSIVE DESIGN =========== */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .job-summary-card {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .view {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 0.5rem 1rem;
        margin: -1rem -1rem 1.5rem -1rem;
    }

    .header-main {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 1rem;
    }

    .user-profile-nav {
        justify-content: space-between;
    }

    .stopwatch-container {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }

    .desc-text {
        max-width: 120px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .section-header h1 {
        font-size: 1.8rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .job-meta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Admin Mobile Layout */
    .admin-tabs-container {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .admin-list-header {
        display: none;
    }

    .admin-list-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1.5rem;
    }

    .col-id,
    .col-user,
    .col-job,
    .col-time,
    .col-status {
        width: 100%;
        text-align: left;
    }

    .col-status {
        display: flex;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .job-summary-card {
        grid-template-columns: 1fr;
        margin: 1rem;
        gap: 1.5rem;
    }

    .job-stats-summary {
        border: none;
        padding: 1rem 0;
        border-top: 1px solid var(--border-glass);
        border-bottom: 1px solid var(--border-glass);
    }
}

@media (max-width: 480px) {

    .stopwatch-info .divider,
    .active-label {
        display: none;
    }

    .stopwatch-info {
        gap: 0.4rem;
    }

    .desc-text {
        max-width: 80px;
    }

    .stopwatch-timer-wrap {
        min-width: 75px;
        padding: 0.2rem 0.5rem;
    }

    .time-display {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.7rem 1.25rem;
    }
}

/* =========== PRINT STYLES & JO BRIEF =========== */
#job-brief-print-area {
    display: none;
    padding: 2rem;
    background: white;
    color: #000;
}

@media print {
    body * {
        visibility: hidden;
    }

    #job-brief-print-area,
    #job-brief-print-area * {
        visibility: visible;
    }

    #job-brief-print-area {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .no-print {
        display: none !important;
    }
}

.brief-container {
    font-family: 'Inter', Arial, sans-serif;
    color: #111;
}

.brief-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #333;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.brief-title-area h1 {
    font-size: 2rem;
    margin: 0;
    color: #111;
}

.brief-job-id {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.brief-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.brief-meta-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.brief-meta-item .value {
    font-size: 1rem;
    font-weight: 600;
}

.brief-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.brief-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2.5rem;
}

.brief-table th {
    text-align: left;
    background: #f8f9fa;
    padding: 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid #dee2e6;
}

.brief-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
    vertical-align: top;
}

.brief-summary-area {
    display: flex;
    justify-content: flex-end;
}

.brief-summary-box {
    width: 300px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px solid #333;
    font-weight: 800;
    font-size: 1.1rem;
}

/* =========== FOOTER & BRANDING =========== */
.main-footer {
    width: 100%;
    margin-top: 4rem;
    padding: 1.25rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(13, 16, 26, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.footer-content:hover {
    transform: translateY(-1px);
}

.powered-by {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.footer-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer-content:hover .footer-brand-logo {
    transform: scale(1.05);
}

/* =========== RESPONSIVE ADJUSTMENTS =========== */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 0.5rem 1rem;
        margin: -1rem -1rem 1.5rem -1rem;
    }

    .header-main {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .header-logo {
        order: 1; /* Move logo to the top */
        width: 100%;
        justify-content: center;
    }

    .nav-brand-logo {
        height: 32px;
    }

    .user-profile-nav {
        order: 2;
        justify-content: space-between;
        width: 100%;
        gap: 0.75rem;
        padding: 0.4rem 0.75rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
    }

    .user-info {
        gap: 0.5rem;
    }

    .avatar-sm {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .user-meta span:first-child {
        font-size: 0.8rem;
    }

    .my-work-nav .btn-nav-item span {
        display: none; /* Icon only on mobile */
    }

    .my-work-nav .btn-nav-item {
        padding: 0.5rem;
        min-width: 40px;
    }

    #active-work-stopwatch {
        order: 3;
        width: 100%;
        margin: 0;
        padding: 0.4rem 0.75rem;
        border-radius: 12px;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.03);
    }

    .stopwatch-info {
        gap: 0.5rem;
    }
    
    #stopwatch-desc {
        display: none; /* Hide long description on mobile */
    }

    .stopwatch-timer-wrap {
        min-width: 75px;
        padding: 0.25rem 0.6rem;
    }

    .time-display {
        font-size: 0.8rem;
    }

    .main-footer {
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .footer-brand-logo {
        height: 30px;
    }

    .powered-by {
        font-size: 0.75rem;
    }
}