/*
 * WORKER PORTAL — Elite Redesign
 * Codename: "Midnight Forge"
 *
 * Premium dark industrial aesthetic: precision, atmosphere, warmth.
 * Sharp corners preserved (Infinite DNA). Elevated with depth layers,
 * atmospheric grain, terracotta glow, and refined micro-interactions.
 */

/* ========================================
   PREMIUM TYPOGRAPHY
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ========================================
   WORKER DARK NAVY THEME — ELEVATED
   ======================================== */

body {
    --bg-primary: #0A1628;
    --bg-card: #111D35;
    --bg-card-elevated: #152545;
    --bg-hover: #1A2D52;
    --bg-input: #080E1C;
    --bg-surface: #0D1729;

    --border-color: rgba(212, 168, 130, 0.06);
    --border-light: rgba(212, 168, 130, 0.10);
    --border-active: rgba(212, 132, 90, 0.25);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(212, 132, 90, 0.08);

    /* Terracotta glow variants */
    --glow-terracotta: 0 0 30px rgba(212, 132, 90, 0.12);
    --glow-terracotta-strong: 0 0 40px rgba(212, 132, 90, 0.2);
    --glow-success: 0 0 20px rgba(67, 223, 167, 0.1);
    --glow-danger: 0 0 20px rgba(239, 68, 68, 0.1);

    background: #0A1628 !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* ========================================
   ATMOSPHERIC BACKGROUND TEXTURE
   ======================================== */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 600px 400px at 50% 0%, rgba(212, 132, 90, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 600px at 0% 50%, rgba(59, 130, 246, 0.02) 0%, transparent 70%),
        radial-gradient(ellipse 400px 600px at 100% 80%, rgba(212, 132, 90, 0.03) 0%, transparent 70%);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ========================================
   APP CONTAINER
   ======================================== */

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* ========================================
   HEADER — Premium Glass Bar
   ======================================== */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(17, 29, 53, 0.85);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid rgba(212, 168, 130, 0.08);
    position: sticky;
    top: 32px;
    z-index: var(--z-sticky);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #FAF3E1;
    letter-spacing: -0.03em;
}

.header-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #D4845A;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.worker-greeting {
    font-size: 12px;
    color: #9A8F85;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-out-btn {
    background: none;
    border: 1px solid #3D3530;
    color: #9A8F85;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sign-out-btn:hover {
    border-color: #D4845A;
    color: #D4845A;
}

.role-selector {
    padding: 6px 28px 6px 10px;
    background: rgba(10, 22, 40, 0.7);
    border: 1px solid rgba(212, 168, 130, 0.12);
    border-radius: 0;
    color: #C4B8A8;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23D4845A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.role-selector:hover {
    border-color: rgba(212, 132, 90, 0.35);
    background-color: rgba(21, 37, 69, 0.8);
}

.role-selector:focus {
    border-color: #D4845A;
    box-shadow: 0 0 0 2px rgba(212, 132, 90, 0.12);
}

/* ========================================
   STATUS CHIP — Refined with subtle glow
   ======================================== */

.status-chip {
    border-radius: 0 !important;
}

.status-chip.off-site {
    background: rgba(239, 68, 68, 0.1);
    color: #FF7683;
    border: 1px solid rgba(239, 68, 68, 0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.06);
}

.status-chip.on-site {
    background: rgba(67, 223, 167, 0.1);
    color: #43DFA7;
    border: 1px solid rgba(67, 223, 167, 0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    box-shadow: 0 0 12px rgba(67, 223, 167, 0.06);
    animation: statusGlow 3s ease-in-out infinite alternate;
}

@keyframes statusGlow {
    0% { box-shadow: 0 0 12px rgba(67, 223, 167, 0.06); }
    100% { box-shadow: 0 0 20px rgba(67, 223, 167, 0.12); }
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.app-main {
    padding: 20px 16px;
}

.section {
    margin-bottom: 28px;
    animation: sectionIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes sectionIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section:nth-child(1) { animation-delay: 0s; }
.section:nth-child(2) { animation-delay: 0.06s; }
.section:nth-child(3) { animation-delay: 0.12s; }
.section:nth-child(4) { animation-delay: 0.18s; }
.section:nth-child(5) { animation-delay: 0.24s; }
.section:nth-child(6) { animation-delay: 0.30s; }
.section:nth-child(7) { animation-delay: 0.36s; }
.section:nth-child(8) { animation-delay: 0.42s; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FAF3E1;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #D4845A, transparent);
}

.section-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8A8078;
    letter-spacing: 0.02em;
}

.subsection-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #8A8078;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========================================
   BADGE — Refined pill
   ======================================== */

.section .badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    letter-spacing: 0.02em;
}

/* ========================================
   CARD — Layered depth with edge highlight
   ======================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(212, 168, 130, 0.10);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 132, 90, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

/* ========================================
   CLOCK BUTTON — Hero element with depth
   ======================================== */

.clock-btn {
    padding: 20px 32px;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #D4845A, #C07248);
    border: none;
    box-shadow:
        0 4px 16px rgba(212, 132, 90, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.clock-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transition: left 0.6s ease;
}

.clock-btn:hover::before {
    left: 100%;
}

.clock-btn:hover {
    box-shadow:
        0 8px 28px rgba(212, 132, 90, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.clock-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(212, 132, 90, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition-duration: 0.1s;
}

.clock-btn.clocked-in {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    box-shadow:
        0 4px 16px rgba(220, 38, 38, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: clockedPulse 3s ease-in-out infinite;
}

@keyframes clockedPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 4px 24px rgba(220, 38, 38, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2); }
}

/* ========================================
   LIVE WORK TIMER
   ======================================== */
.work-timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.timer-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #C4B5A3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.timer-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 42px;
    font-weight: 600;
    color: #43DFA7;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ========================================
   LUNCH BREAK BUTTON & COUNTDOWN
   ======================================== */
.lunch-btn {
    margin-top: 12px;
    padding: 14px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(212, 132, 90, 0.12), rgba(212, 132, 90, 0.06));
    border: 1px solid rgba(212, 132, 90, 0.25);
    color: #D4845A;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    text-align: center;
}

.lunch-btn:hover {
    background: linear-gradient(135deg, rgba(212, 132, 90, 0.22), rgba(212, 132, 90, 0.12));
    border-color: rgba(212, 132, 90, 0.4);
}

.lunch-btn.on-lunch {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.08));
    border-color: rgba(234, 179, 8, 0.3);
    color: #eab308;
    cursor: default;
    animation: lunchPulse 2s ease-in-out infinite;
}

@keyframes lunchPulse {
    0%, 100% { border-color: rgba(234, 179, 8, 0.3); }
    50% { border-color: rgba(234, 179, 8, 0.6); }
}

.lunch-btn.lunch-taken {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

.lunch-countdown {
    text-align: center;
    padding: 14px;
    margin-top: 8px;
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.15);
}

.lunch-countdown-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #C4B5A3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.lunch-countdown-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 600;
    color: #eab308;
    line-height: 1;
}

/* ========================================
   CONFIRMATION MODALS
   ======================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal-body {
    background: rgba(43, 37, 32, 0.98);
    border: 1px solid rgba(212, 132, 90, 0.2);
    width: 100%;
    max-width: 380px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.confirm-modal-icon {
    font-size: 36px;
    text-align: center;
    margin-bottom: 16px;
}

.confirm-modal-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FAF3E1;
    text-align: center;
    margin-bottom: 8px;
}

.confirm-modal-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #C4B5A3;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
}

.confirm-modal-actions .btn-cancel {
    flex: 1;
    padding: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #C4B5A3;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal-actions .btn-cancel:hover {
    background: rgba(148, 163, 184, 0.2);
}

.confirm-modal-actions .btn-confirm {
    flex: 1;
    padding: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal-actions .btn-confirm.btn-danger {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #FAF3E1;
}

.confirm-modal-actions .btn-confirm.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.confirm-modal-actions .btn-confirm.btn-lunch {
    background: linear-gradient(135deg, #D4845A, #C97649);
    color: #FAF3E1;
}

.confirm-modal-actions .btn-confirm.btn-lunch:hover {
    box-shadow: 0 4px 16px rgba(212, 132, 90, 0.3);
}

/* GPS Toggle — Refined */
.gps-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-top: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #C4B8A8;
    transition: border-color 0.2s;
}

.gps-toggle:hover {
    border-color: var(--border-light);
}

/* Toggle switch polish */
.toggle-switch {
    border-radius: 14px;
}

.toggle-switch::after {
    border-radius: 50%;
}

/* ========================================
   REMINDER ITEMS — Elevated urgency design
   ======================================== */

.reminders-list > div {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminders-list > div:hover {
    transform: translateX(2px);
}

/* ========================================
   JOBS LIST — Premium cards with depth
   ======================================== */

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 18px 20px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.job-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4845A, #F5D5B8);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-card:hover {
    border-color: rgba(212, 132, 90, 0.2);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

.job-card:hover::after {
    width: 100%;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.job-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FAF3E1;
}

.job-details {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #8A8078;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.job-status {
    margin-bottom: 14px;
}

/* Status chip refinement for jobs */
.job-status .status-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
}

/* Type chip refinement */
.type-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid var(--border-color);
}

/* View Job button refinement */
.job-card .btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.job-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.job-card .btn:hover::before {
    left: 100%;
}

/* ========================================
   CHECKLIST — Refined interaction design
   ======================================== */

.checklist {
    margin-bottom: 16px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 168, 130, 0.04);
    transition: all 0.2s;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    padding-left: 4px;
}

.checklist-text {
    flex: 1;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #E8DDD0;
    transition: all 0.25s;
}

.checklist-text.completed {
    text-decoration: line-through;
    color: #5A5550;
}

/* Checkbox polish */
.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 168, 130, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox:hover {
    border-color: rgba(212, 132, 90, 0.4);
}

.checkbox.checked {
    background: #43DFA7;
    border-color: #43DFA7;
    box-shadow: 0 0 8px rgba(67, 223, 167, 0.2);
}

.checklist-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-buttons .btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 16px;
}

/* ========================================
   UPLOAD AREA — Elevated drop zone
   ======================================== */

.upload-area {
    border: 1px dashed rgba(212, 132, 90, 0.2);
    border-radius: 0;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    background: rgba(212, 132, 90, 0.02);
    position: relative;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(212, 132, 90, 0.1), transparent, rgba(212, 132, 90, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.upload-area:hover {
    border-color: rgba(212, 132, 90, 0.35);
    background: rgba(212, 132, 90, 0.04);
    box-shadow: inset 0 0 30px rgba(212, 132, 90, 0.03);
    transform: scale(1.005);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
    filter: grayscale(0.2);
}

.upload-area p {
    color: #8A8078;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

/* Recent Uploads */
.uploads-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-item:hover {
    border-color: var(--border-light);
    background: rgba(10, 22, 40, 0.7);
    transform: translateX(2px);
}

.upload-thumb {
    width: 44px;
    height: 44px;
    border-radius: 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.upload-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}

.upload-info {
    flex: 1;
    min-width: 0;
}

.upload-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #D4845A;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: #6B6560;
}

/* ========================================
   MESSAGES — Refined conversation feel
   ======================================== */

.message-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 0;
    margin-bottom: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid transparent;
}

.message-item:hover {
    background: rgba(212, 168, 130, 0.03);
    border-left-color: rgba(212, 132, 90, 0.3);
}

.message-unread {
    background: rgba(212, 132, 90, 0.04);
    border-left-color: #D4845A;
}

.message-unread::before {
    display: none; /* remove the old dot, using border-left instead */
}

.message-sender {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
}

.message-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #8A8078;
}

.message-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5A5550;
}

/* Avatar refinement */
.avatar {
    border: 1px solid rgba(212, 132, 90, 0.15);
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
}

/* ========================================
   TRAINING LIST — Progress-driven design
   ======================================== */

.training-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.training-item:hover {
    border-color: var(--border-light);
    transform: translateX(2px);
}

.training-info {
    flex: 1;
}

.training-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #E8DDD0;
}

.training-duration {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6B6560;
}

.training-progress {
    margin-top: 8px;
}

.training-progress .progress-bar {
    height: 4px;
    background: rgba(212, 168, 130, 0.06);
    overflow: hidden;
}

.training-progress .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4845A, #E8A87C);
    box-shadow: 0 0 8px rgba(212, 132, 90, 0.2);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Training Status Badges */
.training-status {
    padding: 3px 10px;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.training-status.complete {
    background: rgba(67, 223, 167, 0.1);
    color: #43DFA7;
    border: 1px solid rgba(67, 223, 167, 0.1);
}

.training-status.in-progress {
    background: rgba(212, 132, 90, 0.1);
    color: #D4845A;
    border: 1px solid rgba(212, 132, 90, 0.1);
}

.training-status.not-started {
    background: rgba(138, 128, 120, 0.08);
    color: #6B6560;
    border: 1px solid rgba(138, 128, 120, 0.08);
}

/* ========================================
   SCHEDULE MANAGER (On-Site Leader)
   ======================================== */

.schedule-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: #6B6560;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.schedule-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: #E8DDD0;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4845A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.schedule-select:hover {
    border-color: var(--border-light);
}

.schedule-select:focus {
    border-color: #D4845A;
    box-shadow: 0 0 0 2px rgba(212, 132, 90, 0.1);
}

/* Week Picker */
.schedule-week-picker {
    margin-bottom: 16px;
}

.week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.week-nav-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: #8A8078;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.week-nav-btn:hover {
    border-color: rgba(212, 132, 90, 0.3);
    color: #D4845A;
    background: var(--bg-hover);
}

.week-nav-btn:active {
    transform: scale(0.94);
    transition-duration: 0.08s;
}

.week-label {
    flex: 1;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FAF3E1;
    letter-spacing: -0.01em;
}

/* Day Cards */
.schedule-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.day-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    transition: border-color 0.2s;
}

.day-card:hover {
    border-color: var(--border-light);
}

.day-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(212, 132, 90, 0.03);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.day-card-header:hover {
    background: rgba(212, 132, 90, 0.07);
}

.day-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #D4845A;
    letter-spacing: -0.01em;
}

.day-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6B6560;
}

.day-task-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6B6560;
    font-weight: 500;
}

.day-card-body {
    padding: 12px 16px;
}

.day-card-body.collapsed {
    display: none;
}

/* Task Input Rows */
.task-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.task-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: #E8DDD0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-input::placeholder {
    color: rgba(196, 181, 163, 0.3);
    font-weight: 400;
}

.task-input:focus {
    border-color: rgba(212, 132, 90, 0.35);
    background: rgba(8, 14, 28, 0.8);
    box-shadow: 0 0 0 2px rgba(212, 132, 90, 0.06);
}

.task-remove-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 0;
    color: #FF7683;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-remove-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    transform: scale(1.05);
}

.task-remove-btn:active {
    transform: scale(0.95);
    transition-duration: 0.08s;
}

.task-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(212, 132, 90, 0.04);
    border: 1px dashed rgba(212, 132, 90, 0.15);
    border-radius: 0;
    color: #D4845A;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-add-btn:hover {
    background: rgba(212, 132, 90, 0.08);
    border-color: rgba(212, 132, 90, 0.3);
}

/* Leader Daily Tasks View */
.leader-task-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-task-card:hover {
    border-color: rgba(212, 132, 90, 0.2);
    background: var(--bg-hover);
    transform: translateX(2px);
}

.leader-task-card.completed {
    opacity: 0.5;
}

.leader-task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(196, 181, 163, 0.2);
    border-radius: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-task-card.completed .leader-task-checkbox {
    background: rgba(67, 223, 167, 0.15);
    border-color: #43DFA7;
    box-shadow: 0 0 8px rgba(67, 223, 167, 0.1);
}

.leader-task-card.completed .leader-task-checkbox::after {
    content: '✓';
    color: #43DFA7;
    font-size: 13px;
    font-weight: bold;
}

.leader-task-text {
    flex: 1;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #E8DDD0;
    transition: all 0.25s;
}

.leader-task-card.completed .leader-task-text {
    text-decoration: line-through;
    color: #5A5550;
}

.leader-task-project {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #D4845A;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Leader Progress Bar */
.leader-progress {
    margin-bottom: 16px;
}

.leader-progress-bar {
    height: 6px;
    background: rgba(212, 168, 130, 0.06);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 8px;
}

.leader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4845A, #43DFA7);
    box-shadow: 0 0 12px rgba(212, 132, 90, 0.15);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-progress-label {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6B6560;
}

/* ========================================
   PROJECT CHAT & BULLETIN
   ======================================== */

.project-chat-messages {
    padding: 14px;
    min-height: 120px;
}

.chat-msg {
    margin-bottom: 14px;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.chat-msg-sender {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #D4845A;
}

.chat-msg-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #6B6560;
    padding: 1px 6px;
    background: rgba(212, 168, 130, 0.06);
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-msg-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5A5550;
    margin-left: auto;
}

.chat-msg-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #C4B8A8;
    padding-left: 0;
    line-height: 1.5;
}

.project-chat-input {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--border-color);
}

.project-chat-input .task-input {
    flex: 1;
}

.project-chat-input .btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
}

/* Bulletin */
.bulletin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid #D4845A;
    border-radius: 0;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bulletin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #D4845A, #E8A87C);
}

.bulletin-card:hover {
    border-color: rgba(212, 132, 90, 0.2);
    transform: translateX(2px);
}

.bulletin-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #D4845A;
    margin-bottom: 4px;
}

.bulletin-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5A5550;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.bulletin-body {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #C4B8A8;
    line-height: 1.6;
}

/* ========================================
   CHAT PHOTO ATTACHMENTS
   ======================================== */

.chat-attach-btn {
    padding: 6px 8px;
    background: rgba(212, 168, 130, 0.08);
    border: 1px solid rgba(212, 168, 130, 0.15);
    color: #9A8F85;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-attach-btn:hover {
    background: rgba(212, 132, 90, 0.15);
    color: #D4845A;
    border-color: rgba(212, 132, 90, 0.25);
}

.chat-photo-preview {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    background: rgba(10, 22, 40, 0.3);
}

.chat-photo-thumb {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border: 1px solid rgba(212, 168, 130, 0.12);
    overflow: hidden;
}

.chat-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Photos in messages */
.chat-photos {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.chat-photo-item {
    width: 120px;
    height: 90px;
    border: 1px solid rgba(212, 168, 130, 0.12);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.chat-photo-item:hover {
    border-color: rgba(212, 132, 90, 0.4);
}

.chat-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.4);
    gap: 4px;
}

.chat-photo-placeholder span {
    font-size: 9px;
    color: #6B6560;
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Photo Lightbox */
.photo-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.photo-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.photo-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border: 1px solid rgba(212, 168, 130, 0.15);
}

.photo-lightbox-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9A8F85;
    text-align: center;
    margin-top: 8px;
}

.photo-lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: rgba(212, 132, 90, 0.9);
    color: #FAF3E1;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MY PHOTOS BIN
   ======================================== */

.photo-bin-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.photo-filter-btn {
    padding: 5px 12px;
    background: rgba(10, 22, 40, 0.3);
    border: 1px solid rgba(212, 168, 130, 0.1);
    color: #9A8F85;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.photo-filter-btn.active {
    background: rgba(212, 132, 90, 0.15);
    color: #D4845A;
    border-color: rgba(212, 132, 90, 0.3);
}

.photo-filter-btn:hover:not(.active) {
    background: rgba(212, 168, 130, 0.08);
    color: #C4B8A8;
}

.photo-bin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.photo-bin-card {
    border: 1px solid rgba(212, 168, 130, 0.08);
    background: rgba(10, 22, 40, 0.3);
    overflow: hidden;
}

.photo-bin-thumb {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.photo-bin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.15s ease;
}

.photo-bin-thumb:hover img {
    transform: scale(1.05);
}

.photo-bin-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.5);
}

.photo-bin-info {
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.photo-bin-source {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #6B6560;
    padding: 1px 5px;
    background: rgba(212, 168, 130, 0.06);
    border: 1px solid rgba(212, 168, 130, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.photo-bin-project {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #D4845A;
    padding: 1px 5px;
    background: rgba(212, 132, 90, 0.08);
    border: 1px solid rgba(212, 132, 90, 0.15);
}

.photo-bin-untagged {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #5A5550;
    font-style: italic;
}

.photo-bin-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #5A5550;
    margin-left: auto;
}

.photo-bin-tag-btn {
    width: 100%;
    padding: 5px;
    background: rgba(212, 132, 90, 0.08);
    border: none;
    border-top: 1px solid rgba(212, 168, 130, 0.08);
    color: #D4845A;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.photo-bin-tag-btn:hover {
    background: rgba(212, 132, 90, 0.18);
}

/* Photo Tag Modal */
.photo-tag-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.photo-tag-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    max-width: 280px;
    width: 90%;
}

.photo-tag-option {
    width: 100%;
    padding: 10px 14px;
    background: rgba(10, 22, 40, 0.3);
    border: 1px solid rgba(212, 168, 130, 0.1);
    color: #C4B8A8;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.15s ease;
}

.photo-tag-option:hover {
    background: rgba(212, 132, 90, 0.12);
    color: #D4845A;
    border-color: rgba(212, 132, 90, 0.25);
}

/* ========================================
   SCHEDULE TEMPLATES
   ======================================== */

.template-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.template-actions .btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.template-card {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
}

.template-card:hover {
    border-color: rgba(212, 132, 90, 0.3);
    background: var(--bg-hover);
    transform: translateX(2px);
}

.template-card-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #E8DDD0;
    margin-bottom: 4px;
}

.template-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #6B6560;
}

.template-type-chip {
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(212, 132, 90, 0.1);
    color: #D4845A;
    border: 1px solid rgba(212, 132, 90, 0.1);
}

.template-day-bars {
    display: flex;
    gap: 3px;
    margin-top: 10px;
}

.template-day-bar {
    flex: 1;
    height: 3px;
    background: rgba(212, 132, 90, 0.15);
    position: relative;
    transition: background 0.3s;
}

.template-card:hover .template-day-bar {
    background: rgba(212, 132, 90, 0.3);
}

/* ========================================
   ACCOUNTABILITY ALERTS (On-Site Leader)
   ======================================== */

.alert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid #ef4444;
    border-radius: 0;
    padding: 18px 20px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.2s;
}

.alert-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ef4444, #FF7683);
}

.alert-card.responded {
    border-left-color: #43DFA7;
    opacity: 0.7;
}

.alert-card.responded::after {
    background: linear-gradient(180deg, #43DFA7, #86efac);
}

.alert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.alert-severity {
    padding: 3px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.alert-severity.critical {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.06);
}

.alert-severity.warning {
    background: rgba(212, 132, 90, 0.1);
    color: #D4845A;
    border: 1px solid rgba(212, 132, 90, 0.1);
}

.alert-severity.info {
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.alert-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #FAF3E1;
    margin-bottom: 4px;
}

.alert-message {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #8A8078;
    margin-bottom: 14px;
}

.alert-tasks-list {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.08);
    margin-bottom: 14px;
}

.alert-tasks-list li {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #8A8078;
    padding: 3px 0;
    list-style: none;
}

.alert-tasks-list li::before {
    content: '✕ ';
    color: #FF7683;
    font-weight: 600;
}

.alert-response-area textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: #E8DDD0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    resize: vertical;
    min-height: 80px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-response-area textarea:focus {
    border-color: rgba(212, 132, 90, 0.35);
    box-shadow: 0 0 0 2px rgba(212, 132, 90, 0.06);
}

.alert-response-area textarea::placeholder {
    color: rgba(196, 181, 163, 0.3);
}

.alert-response-submitted {
    padding: 12px 14px;
    background: rgba(67, 223, 167, 0.04);
    border: 1px solid rgba(67, 223, 167, 0.1);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #86efac;
}

.alert-response-submitted .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #43DFA7;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ========================================
   NOTIFICATION BAR — Premium drawer
   ======================================== */

.notif-bar {
    position: sticky;
    top: 88px;
    z-index: 90;
    background: rgba(13, 23, 41, 0.92);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 1px solid rgba(212, 168, 130, 0.06);
    margin: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.notif-bar-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.notif-bar-toggle:hover {
    background: rgba(212, 168, 130, 0.03);
}

.notif-bell {
    font-size: 16px;
    line-height: 1;
    filter: grayscale(0.3);
    transition: filter 0.2s;
}

.notif-bar-toggle:hover .notif-bell {
    filter: grayscale(0);
}

.notif-count {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.notif-count.zero {
    background: rgba(212, 168, 130, 0.08);
    color: #5A5550;
    box-shadow: none;
}

.notif-bar-label {
    flex: 1;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #C4B8A8;
    letter-spacing: -0.01em;
}

.notif-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6B6560;
}

.notif-chevron.open {
    transform: rotate(180deg);
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid rgba(212, 168, 130, 0.04);
}

/* Custom scrollbar for notification list */
.notif-list::-webkit-scrollbar {
    width: 4px;
}

.notif-list::-webkit-scrollbar-track {
    background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
    background: rgba(212, 132, 90, 0.2);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(212, 168, 130, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid transparent;
}

.notif-item:hover {
    background: rgba(212, 168, 130, 0.03);
    border-left-color: rgba(212, 132, 90, 0.3);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.unread {
    background: rgba(212, 132, 90, 0.04);
    border-left-color: #D4845A;
}

.notif-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    padding-top: 1px;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #E8DDD0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: #6B6560;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5A5550;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.notif-empty {
    padding: 24px 20px;
    text-align: center;
    color: #5A5550;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
}

.notif-severity-critical .notif-icon { color: #FF7683; }
.notif-severity-warning .notif-icon { color: #D4845A; }
.notif-severity-info .notif-icon { color: #94a3b8; }
.notif-severity-success .notif-icon { color: #43DFA7; }

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.notif-count.pulse {
    animation: notifPulse 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL BUTTON REFINEMENTS
   ======================================== */

.btn {
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

.btn-primary {
    box-shadow: 0 2px 8px rgba(212, 132, 90, 0.15);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(212, 132, 90, 0.25);
}

.btn-secondary {
    border-color: var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgba(212, 132, 90, 0.2);
    background: var(--bg-hover);
}

/* ========================================
   SCROLLBAR — Minimal
   ======================================== */

*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

*::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 130, 0.12);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 130, 0.2);
}

/* ========================================
   SMOOTH SCROLL BEHAVIOR
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   SELECTION COLOR
   ======================================== */

::selection {
    background: rgba(212, 132, 90, 0.3);
    color: #FAF3E1;
}

/* ========================================
   TOAST REFINEMENT (injected via JS)
   ======================================== */

.worker-toast {
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: -0.01em !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(212, 132, 90, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (min-width: 768px) {
    .app-container {
        padding: 24px;
    }

    .app-header {
        margin-bottom: 16px;
    }
}

/* ========================================
   FOCUS VISIBLE — Accessibility
   ======================================== */

*:focus-visible {
    outline: 2px solid rgba(212, 132, 90, 0.5);
    outline-offset: 2px;
}

/* ========================================
   REDUCED MOTION — Respect user preference
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* === Loading Spinner === */
.loading-container {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary, #7A8BA7);
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(212, 132, 90, 0.2);
    border-top-color: #D4845A;
    animation: spin 0.7s linear infinite;
}

.loading-spinner-text {
    font-size: 13px;
    margin-top: 8px;
    color: var(--text-tertiary, #7A8BA7);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   @ MENTION DROPDOWN & TAGS
   ======================================== */

.mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #1A1613;
    border: 1px solid rgba(212, 132, 90, 0.25);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    margin-bottom: 4px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.mention-item:hover,
.mention-item.active {
    background: rgba(212, 132, 90, 0.15);
}

.mention-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #D4845A, #B86E4A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #FAF3E1;
    flex-shrink: 0;
}

.mention-name {
    font-size: 14px;
    font-weight: 600;
    color: #FAF3E1;
    flex: 1;
}

.mention-role {
    font-size: 11px;
    color: #9A8F85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mention-tag {
    color: #D4845A;
    font-weight: 600;
    background: rgba(212, 132, 90, 0.12);
    padding: 1px 4px;
}

/* Message reply area */
.message-reply-area {
    padding: 8px 16px 12px;
    border-top: 1px solid rgba(212, 132, 90, 0.08);
    background: rgba(10, 22, 40, 0.3);
}

.message-reply-input-wrap {
    display: flex;
    gap: 8px;
    position: relative;
}

.message-reply-input-wrap .reply-input {
    flex: 1;
    font-size: 13px;
    padding: 8px 12px;
}

.message-reply-input-wrap .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.message-item {
    cursor: pointer;
}
