@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* ════════════════════════════════════════════════════════════════════════════════════
   WASH42 APPROVALHUB DESIGN SYSTEM
   ════════════════════════════════════════════════════════════════════════════════════ */

/* ────────────────────────────── CSS CUSTOM PROPERTIES ────────────────────────────── */
:root {
    /* Brand Colors */
    --brand-green: #84BD00;
    --brand-green-hover: #6a9c00;
    --brand-green-light: #f0f9e8;
    --brand-dark-gray: #333F48;

    /* Gray Scale */
    --gray-50: #FAFBFC;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #DCDDDE;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #525252;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --white: #FFFFFF;

    /* Semantic Colors */
    --color-primary: var(--brand-green);
    --color-primary-hover: var(--brand-green-hover);
    --color-primary-light: var(--brand-green-light);

    /* Status Colors */
    --color-success: #16a34a;
    --color-success-bg: #dcfce7;
    --color-success-border: #86efac;
    --color-success-text: #166534;

    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fecaca;
    --color-danger-text: #991b1b;

    --color-warning: #d97706;
    --color-warning-bg: #fef3c7;
    --color-warning-border: #fcd34d;
    --color-warning-text: #92400e;

    --color-info: #0d9488;
    --color-info-bg: #ccfbf1;
    --color-info-border: #5eead4;
    --color-info-text: #115e59;

    /* UI Colors */
    --color-bg: var(--gray-50);
    --color-surface: var(--white);
    --color-text: var(--brand-dark-gray);
    --color-subtitle: var(--gray-600);
    --color-muted: var(--gray-400);
    --color-border: var(--gray-300);

    /* Radii */
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-focus: 0 0 0 3px rgba(132, 189, 0, 0.25);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
}

/* ────────────────────────────── GLOBAL RESET & BASE ────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Acumin Variable Concept', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─────────────────────── LOGIN PAGE ─────────────────────── */
.login-page-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg),
                inset 0 1px 0 rgba(255,255,255,0.8);
    text-align: center;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.login-subtitle {
    color: var(--color-subtitle);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.login-btn--microsoft {
    display: inline-block;
    padding: 0.875rem 2.25rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.login-btn--microsoft:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-disclaimer {
    margin-top: 2.5rem;
    font-size: 0.75rem;
    color: var(--brand-dark-gray);
    line-height: 1.4;
}

/* ─────────────────────── UNAUTHORIZED PAGE ─────────────────────── */
.unauthorized-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: #991b1b;
}

.unauthorized-message p {
    margin: 0 0 0.5rem 0;
}

.unauthorized-message p:last-child {
    margin-bottom: 0;
}

.unauthorized-email {
    font-size: 0.875rem;
    color: #7f1d1d;
    font-family: monospace;
}

/* ─────────────────────── DASHBOARD LAYOUT ─────────────────────── */
.dash-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--color-bg);
}

/* Override body centering for dashboard pages */
body:has(.dash-wrapper) {
    display: block;
    align-items: initial;
    justify-content: initial;
}

.dash-sidebar {
    position: fixed;
    inset: 0 0 0 0;
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    transition: width 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.dash-sidebar--collapsed {
    width: 65px;
}

.dash-sidebar--collapsed .dash-sidebar__label,
.dash-sidebar--collapsed .dash-user__name {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
}

/* Navigation */
.dash-nav {
    flex: 1;
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.dash-nav__item { margin-bottom: 0.25rem; }

.dash-nav__link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dash-nav__link:hover,
.dash-nav__link--active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}

/* Icons (Feather) */
.dash-nav__icon {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dash-nav__icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dash-sidebar--collapsed .dash-nav__icon {
    margin-right: 0;
}

.dash-sidebar--collapsed .dash-nav__icon svg {
    width: 22px;
    height: 22px;
}

/* Notification badge */
.dash-nav__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Toggle button icon */
.dash-sidebar__toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* User profile row */
.dash-nav__item--user .dash-nav__link {
    font-weight: 500;
    color: var(--color-text);
}

.dash-nav__item--user .dash-nav__link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Logout */
.dash-sidebar__logout {
    border-top: 1px solid var(--color-border);
}

.dash-sidebar__logout .dash-nav__link:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

/* Toggle button */
.dash-sidebar__toggle {
    position: absolute;
    top: 1.5rem;
    right: -12px;
    width: 32px;
    height: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-muted);
}

.dash-sidebar__toggle:hover {
    background: var(--gray-100);
}

/* Main content area */
.dash-main,
.user-form-wrapper {
    margin-left: 260px;
    padding: 3rem;
    flex: 1;
    min-height: 100vh;
    background: var(--color-bg);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dash-main > *,
.user-form-wrapper > * {
    width: 70%;
}

.dash-sidebar--collapsed ~ .dash-main,
.dash-sidebar--collapsed ~ .user-form-wrapper {
    margin-left: 65px;
}

/* Mobile sidebar - collapsed by default, overlay when open */
@media (max-width: 768px) {
    .dash-sidebar {
        left: -260px;
        width: 260px;
        transition: left 0.3s ease;
    }

    .dash-sidebar:not(.dash-sidebar--collapsed) {
        left: 0;
    }

    .dash-sidebar--collapsed {
        left: -260px;
        width: 260px;
    }

    .dash-main,
    .user-form-wrapper {
        margin-left: 0;
        padding: 2rem 1rem;
        padding-top: 4rem;
    }

    .dash-sidebar--collapsed ~ .dash-main,
    .dash-sidebar--collapsed ~ .user-form-wrapper {
        margin-left: 0;
    }

    .dash-sidebar__toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        right: auto;
        z-index: 1001;
        background: var(--color-surface);
        box-shadow: var(--shadow-md);
    }

    .dash-sidebar:not(.dash-sidebar--collapsed) .dash-sidebar__toggle {
        left: 270px;
    }

    .dash-sidebar:not(.dash-sidebar--collapsed) ~ .dash-main::before,
    .dash-sidebar:not(.dash-sidebar--collapsed) ~ .user-form-wrapper::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }
}

/* Welcome text */
.dash-main > h1 {
    text-align: center;
    font-size: 2.4rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.dash-main > p:first-of-type {
    text-align: center;
    color: var(--color-subtitle);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ─────────────────────── LOGIN / REGISTER FORM FIELDS ─────────────────────── */
.login-field {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.95rem;
}

.login-required {
    color: #dc2626;
    font-weight: 600;
}

.login-input,
.login-input:disabled {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font-size: 1rem;
    transition: var(--transition);
}

.login-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.login-input:disabled {
    background: var(--color-bg);
    color: var(--color-muted);
    cursor: not-allowed;
    opacity: 0.85;
}

.login-error {
    background: var(--color-danger);
    color: #991b1b;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
}

/* ─────────────────────── Sidebar Logo ─────────────────────── */
.dash-sidebar__logo {
    width: 60px;
    padding-bottom: 2rem;
    margin: 0 auto;
    transition: var(--transition);
    border-bottom: none;
}

.dash-sidebar__logo img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
    transform: scale(1);
    transform-origin: center;
}

.dash-sidebar:not(.dash-sidebar--collapsed) .dash-sidebar__logo {
    width: 120px;
}

.dash-sidebar:not(.dash-sidebar--collapsed) .dash-sidebar__logo img {
    max-height: none;
    transform: none;
}

/* ─────────────────────── Ticket History Header & Toggle ─────────────────────── */

.ticket-detail-history__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.ticket-detail-history__toggle-text {
    color: var(--color-primary);
    text-decoration: none;
}

.ticket-detail-history__toggle-text:hover {
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────── PAGE HEADER ─────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header-left { flex: 1; }

.page-header-right {
    display: flex;
    gap: 0.75rem;
}

.page-title {
    font-size: 1.75rem;
    margin: 0 0 0.25rem 0;
    color: var(--color-text);
}

.page-subtitle {
    color: var(--color-subtitle);
    margin: 0;
}

/* ─────────────────────── BUTTONS ─────────────────────── */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

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

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

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

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

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

.btn-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
    border: 1px solid var(--color-danger-border);
}

.btn-danger:hover {
    background: #fee2e2;
}

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

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

.btn-block {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.btn-approve {
    background: var(--color-success);
    color: white;
}

.btn-approve:hover {
    background: #15803d;
}

.btn-reject {
    background: var(--color-danger);
    color: white;
}

.btn-reject:hover {
    background: #b91c1c;
}

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

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ─────────────────────── BANNERS ─────────────────────── */
.success-banner {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-success-text);
}

.error-banner {
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-danger-text);
}

.error-banner ul {
    margin: 0;
    padding-left: 1.25rem;
}

.warning-banner {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-warning-text);
}

.resubmit-banner {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-warning-text);
}

.info-banner {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-info-text);
    font-size: 0.875rem;
}

.rejection-banner {
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-danger-text);
}

.rejection-banner strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* ─────────────────────── STATUS BADGES ─────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #e9ecef;
    color: #495057;
}

.status-submitted {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.status-inreview {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.status-approved {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.status-rejected {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

.status-cancelled {
    background: var(--gray-100);
    color: var(--gray-500);
}

.status-approvedtopay {
    background: var(--color-primary-light);
    color: var(--brand-green-hover);
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-pendingapproval {
    background: var(--color-info-bg, #cfe2ff);
    color: var(--color-info-text, #084298);
}

.status-open {
    background: #d1fae5;
    color: #065f46;
}

.status-orderplaced {
    background: #fef3c7;
    color: #92400e;
}

.status-partiallyreceived {
    background: #fef3c7;
    color: #92400e;
}

.status-closed {
    background: #e0f2fe;
    color: #0369a1;
}

/* ─────────────────────── PRIORITY BADGES ─────────────────────── */
.priority-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-low {
    background: var(--gray-100);
    color: var(--gray-500);
}

.priority-normal {
    background: var(--color-primary-light);
    color: var(--brand-green-hover);
}

.priority-high {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.priority-urgent {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

/* ─────────────────────── FORMS ─────────────────────── */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    width: 100%;
}

.form-section + .form-section {
    margin-top: 2rem;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

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

.form-row-full {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label,
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-size: 0.875rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--color-subtitle);
    font-weight: 400;
}

.required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--color-surface);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

textarea.form-control,
.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.help-text {
    font-size: 0.875rem;
    color: var(--color-subtitle);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

/* ─────────────────────── CARDS ─────────────────────── */
.detail-card,
.approve-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-card-title,
.approve-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.detail-label {
    font-weight: 500;
    color: var(--color-subtitle);
}

.detail-value {
    color: var(--color-text);
}

.detail-value-amount {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ─────────────────────── TABLES ─────────────────────── */
.table-container,
.submissions-table-container,
.admin-table-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.submissions-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.submissions-table th,
.submissions-table td,
.admin-table th,
.admin-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.submissions-table th,
.admin-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-subtitle);
}

.submissions-table tbody tr:hover,
.admin-table tbody tr:hover {
    background: var(--gray-50);
}

.submissions-table tbody tr:last-child td,
.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.amount-cell {
    font-weight: 600;
    color: var(--color-text);
}

.date-cell {
    color: var(--color-subtitle);
}

.action-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.action-link:hover {
    text-decoration: underline;
}

/* ─────────────────────── TIMELINE ─────────────────────── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
}

.timeline-marker-complete {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.timeline-marker-rejected {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.timeline-marker-current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(132, 189, 0, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(132, 189, 0, 0); }
}

.timeline-marker-pending {
    background: var(--color-surface);
    border-color: var(--color-border);
}

.timeline-content {
    padding-left: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.timeline-meta {
    font-size: 0.875rem;
    color: var(--color-subtitle);
}

.timeline-comment {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-style: italic;
    color: var(--color-text);
}

/* ─────────────────────── ATTACHMENTS ─────────────────────── */
.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.attachment-item:last-child {
    margin-bottom: 0;
}

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

.attachment-icon {
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.attachment-name {
    font-weight: 500;
    color: var(--color-text);
}

.attachment-size {
    font-size: 0.875rem;
    color: var(--color-subtitle);
}

.attachment-download {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.attachment-download:hover {
    text-decoration: underline;
}

/* ─────────────────────── EMPTY STATE ─────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-subtitle);
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
}

/* ─────────────────────── FILE UPLOAD ─────────────────────── */
.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.file-list {
    margin-top: 1rem;
    text-align: left;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.file-item-remove {
    color: var(--color-danger);
    cursor: pointer;
    font-weight: bold;
}

/* ─────────────────────── MISC ─────────────────────── */
.invoice-summary {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.5;
}

.approver-role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.row-inactive {
    opacity: 0.6;
}

.row-inactive td {
    background: var(--gray-100);
}

/* ─────────────────────── RESPONSIVE SHARED ─────────────────────── */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-header-right {
        width: 100%;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .table-container,
    .submissions-table-container,
    .admin-table-wrapper {
        overflow-x: auto;
    }

    .submissions-table,
    .admin-table {
        min-width: 600px;
    }
}