/* ===============================================
   STYLES-UNIFIED.CSS - Single Source of Truth
   ===============================================
   
   Consolidated component styles for the entire application.
   Replaces scattered definitions across 10+ CSS files.
   
   ORGANIZATION:
   1. BUTTONS - All button variants
   2. BADGES & STATUS - All status indicators
   3. DATA TABLES - Grid-based table layouts
   4. METRIC CARDS - KPI and metric displays
   5. ACTIVITY FEEDS - Timeline and activity items
   6. EXPANDABLE LISTS - List items with expand/collapse
   7. FORMS & INPUTS - All form elements
   8. FILTERS - Filter bars and controls
   9. MODALS - Modal dialogs
   10. PROGRESS & STATES - Progress bars, loading, empty states
   11. CHECKLISTS - Checkbox lists
   12. PERMISSION MATRICES - Radio button grids
   13. DROPZONES - File upload areas
   14. DETAIL GRIDS - Information display grids
   15. ALERTS - Info/warning/error boxes
   16. CHARTS - Chart containers
   17. CALENDARS - Calendar-specific styles
   18. SPECIAL LAYOUTS - Three-panel, bulk actions, etc.
   
   COLOR SYSTEM: Uses variables from base.css
   --color-primary: #16a34a (Green)
   --bg-workspace: #f5f4f2 (Soft beige)
*/


/* ===============================================
   1. BUTTONS - Single Source of Truth
   =============================================== */

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    line-height: 1.2;
    min-height: 40px;
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2), var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-body);
    border: 1px solid var(--border-medium);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    line-height: 1.2;
    min-height: 40px;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--border-focus);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--color-error);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    line-height: 1.2;
    min-height: 40px;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

/* Button style modifiers - ONE HEIGHT ONLY (40px) */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-600);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-weight: 500;
    min-height: auto;
}

.btn-link:hover {
    color: var(--primary-700);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: var(--space-sm);
    min-width: 40px;
    aspect-ratio: 1;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}


/* ===============================================
   2. BADGES & STATUS - Single Source of Truth
   =============================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: capitalize;
    line-height: 1.2;
    gap: var(--space-xs);
}

.status-badge.status-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge.status-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-badge.status-danger,
.status-badge.status-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-badge.status-info {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge.status-muted,
.status-badge.status-neutral {
    background: #f9fafb;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Compliance-specific status */
.status-badge.status-excellent {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
    font-weight: 700;
}

.status-badge.status-good {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge.status-fair {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-badge.status-poor {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 700;
}

/* Badge size variants */
.status-badge.sm {
    font-size: 10px;
    padding: 2px 6px;
}

.status-badge.lg {
    font-size: var(--text-sm);
    padding: 4px var(--space-md);
}

/* Selection count badge */
.selection-count {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #15803d;
    background: #dcfce7;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* Priority badges */
.priority-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

.priority-badge.high {
    background: var(--color-error);
    color: white;
}

.priority-badge.normal {
    background: var(--color-info);
    color: white;
}

.priority-badge.low {
    background: var(--color-secondary);
    color: white;
}

.priority-badge.urgent {
    background: #dc2626;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}


/* ===============================================
   3. DATA TABLES - Grid-Based Tables
   =============================================== */

.data-table {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

.data-row {
    display: grid;
    align-items: center;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    min-height: 40px;
    gap: var(--space-sm);
    transition: all 0.2s var(--ease-out);
}

.data-row.header {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    border-bottom: 2px solid var(--border-light);
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: var(--space-sm) var(--space-md);
}

.data-row.interactive {
    cursor: pointer;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: var(--space-sm) var(--space-md);
}

.data-row.interactive:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.data-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.data-cell {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.data-status {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

/* Data status color backgrounds */
.data-status.status-excellent,
.data-status.status-good {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.data-status.status-fair {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.data-status.status-poor {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* Standard column patterns */
.data-table[data-columns="3"] .data-row {
    grid-template-columns: 2fr 1fr 1fr;
}

.data-table[data-columns="4"] .data-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.data-table[data-columns="5"] .data-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

.data-table[data-columns="6"] .data-row {
    grid-template-columns: 150px 2fr 1fr 1fr 1fr 120px;
}

/* Legacy compatibility */
.data-table.table-4-col .data-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.data-table.table-5-col .data-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

.data-table.table-responsive {
    overflow-x: auto;
}

/* Line Items Table (HTML table element for invoices) */
.line-items-section {
    margin-bottom: var(--space-lg);
}

.line-items-section h4 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-secondary);
}

.line-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.line-items-table thead tr {
    background: #f9fafb;
    border-bottom: 2px solid var(--border-medium);
}

.line-items-table th {
    padding: var(--space-sm);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.line-items-table th:last-child,
.line-items-table td:last-child {
    text-align: right;
}

.line-items-table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.line-items-table tbody tr:hover {
    background: #fafaf9;
}

.line-items-table td {
    padding: var(--space-sm);
    color: var(--text-primary);
}

.line-items-table tfoot tr {
    border-top: 2px solid var(--border-medium);
}

.line-items-table tfoot td {
    padding: var(--space-sm);
    color: var(--text-secondary);
}

.line-items-table tfoot .total-row {
    background: #f9fafb;
    font-size: var(--text-base);
}

.line-items-table tfoot .total-row td {
    padding: var(--space-sm);
    font-weight: 700;
    color: var(--text-primary);
}

/* Config Data Table (for ConfigItemList) */
.config-endpoint-container {
    border-bottom: 1px solid var(--border-light);
}

.config-endpoint-container:last-child {
    border-bottom: none;
}

.config-endpoint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.config-endpoint-row:hover {
    background: var(--bg-secondary);
}

.config-endpoint-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.config-endpoint-name {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.config-endpoint-count {
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.config-endpoint-count.has-data {
    background: #dcfce7;
    color: #15803d;
}

.config-endpoint-count.no-data {
    background: #f3f4f6;
    color: #6b7280;
}

.config-endpoint-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.config-endpoint-arrow.expanded {
    transform: rotate(90deg);
}

.config-data-table-container {
    padding: 0 0 var(--space-md) 0;
    background: var(--bg-secondary);
}

.config-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.config-data-table thead {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.config-data-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.config-data-table tbody tr:last-child td {
    border-bottom: none;
}

.config-data-table tbody tr:hover {
    background: var(--bg-white);
}

.config-data-table td:first-child {
    font-family: 'Courier New', monospace;
    font-size: var(--text-xs);
    color: var(--text-muted);
    width: 120px;
}

.config-data-table td:nth-child(2) {
    font-weight: 500;
    width: 200px;
}

.config-data-table td:nth-child(3) {
    color: var(--text-secondary);
    width: 150px;
}


/* ===============================================
   4. METRIC CARDS - KPI Displays
   =============================================== */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.metric-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.2s var(--ease-out);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card.interactive {
    cursor: pointer;
}

.metric-card.interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #86efac;
}

.metric-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.metric-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    flex: 1;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.metric-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin: var(--space-xs) 0;
}

.metric-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-xs);
    font-weight: 600;
}

.trend-up {
    color: var(--color-success);
}

.trend-up::before {
    content: "↗";
    margin-right: var(--space-xs);
}

.trend-down {
    color: var(--color-error);
}

.trend-down::before {
    content: "↘";
    margin-right: var(--space-xs);
}

.trend-neutral {
    color: var(--text-muted);
}

.trend-neutral::before {
    content: "→";
    margin-right: var(--space-xs);
}

/* Quick action cards (Accounting) */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.action-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.action-card:hover {
    background: var(--bg-secondary);
    border-color: #86efac;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-card svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.action-card h3 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.action-card p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}


/* ===============================================
   5. ACTIVITY FEEDS - Timeline Items
   =============================================== */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.activity-item {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 10px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-light);
    transition: all 0.2s var(--ease-out);
}

.activity-item.interactive {
    cursor: pointer;
}

.activity-item.interactive:hover {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.activity-type-group {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
    flex-wrap: wrap;
}

.activity-type {
    padding: 3px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.activity-type.status-excellent { background: #dcfce7; color: #15803d; }
.activity-type.status-good { background: #dcfce7; color: #15803d; }
.activity-type.status-fair { background: #fef3c7; color: #b45309; }
.activity-type.status-poor { background: #fee2e2; color: #b91c1c; }

.activity-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.activity-content {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.5;
}


/* ===============================================
   6. EXPANDABLE LISTS - Single Source of Truth
   =============================================== */

.expandable-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

.expandable-list-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s var(--ease-out);
}

.expandable-list-item.expanded {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.expandable-list-item[draggable="true"] {
    cursor: grab;
}

.expandable-list-item[draggable="true"]:active {
    cursor: grabbing;
}

.expandable-list-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    box-shadow: var(--shadow-md);
}

.expandable-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    min-height: 32px;
}

.header-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* Task headers */
.task-header-left,
.employee-header-left,
.request-header-left,
.invoice-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.task-header-right,
.employee-header-right,
.request-header-right,
.invoice-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Info clusters (title + meta) */
.task-info,
.employee-info,
.request-info,
.invoice-info {
    min-width: 0;
    white-space: nowrap;
}

.task-title,
.employee-name,
.request-title,
.invoice-number {
    display: inline;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.task-meta,
.employee-meta,
.request-meta,
.invoice-vendor {
    display: inline;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: var(--space-sm);
}

/* Special badges within headers */
.task-duration-badge,
.task-duration {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: nowrap;
}

/* Icon actions in expandable headers */
.icon-action {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-action:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.icon-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drag-hint {
    font-size: 10px;
    color: var(--text-light);
    font-style: italic;
}

.assigned-badge {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.priority-indicator {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-error);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.priority-indicator.high {
    background: var(--color-error);
}

/* Employee classification badges */
.employee-classification {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
    padding: 2px var(--space-xs);
    background: #f3f4f6;
    border-radius: var(--radius-sm);
}

/* Invoice specific */
.invoice-status {
    padding: 3px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: capitalize;
}

.invoice-status.status-success {
    background: #dcfce7;
    color: #15803d;
}

.invoice-status.status-warning {
    background: #fef3c7;
    color: #b45309;
}

.invoice-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    min-width: 100px;
}

.invoice-total {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-base);
    min-width: 100px;
    text-align: right;
}

/* Item details (expanded content) */
.item-details,
.task-details,
.employee-details,
.invoice-details {
    margin-top: 0;
    padding: 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* Expand toggle button */
.expand-toggle {
    background: none;
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease-out);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.expand-toggle:hover {
    background: #f3f4f6;
}

.expand-icon {
    color: var(--text-muted);
    transition: transform 0.2s var(--ease-out);
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.expand-icon.expanded {
    transform: rotate(0deg);
}

/* Checkbox within expandable items */
.item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}


/* ===============================================
   7. FORMS & INPUTS - Single Standard
   =============================================== */

.form-section {
    margin-bottom: 8px;
}

.form-section h3 {
    margin: 0 0 var(--space-lg) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--space-sm);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-control,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-body);
    transition: all 0.2s var(--ease-out);
    box-sizing: border-box;
}

.form-control:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-control:invalid,
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: var(--color-error);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Form layouts */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-grid {
    display: grid;
    gap: var(--space-md);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-xl);
}

/* Read-only fields */
.read-only-field {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.read-only-field:focus {
    border-color: var(--border-medium);
    box-shadow: none;
}

/* Input groups */
.input-group {
    margin-bottom: var(--space-md);
}

.input-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}


/* ===============================================
   8. FILTERS - Single Standard
   =============================================== */

.filter-bar {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    flex-wrap: wrap;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.filter-bar-inline {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0 var(--space-md);
    background: transparent;
}

.filter-bar-inline .filter-group {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 150px;
    flex: 1 1 150px;
    max-width: 250px;
}

.filter-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    padding: var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background: var(--bg-white);
    color: var(--text-body);
    font-family: inherit;
    transition: all 0.2s var(--ease-out);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.filter-select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-body);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.filter-select:hover {
    border-color: var(--border-dark);
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}


/* ===============================================
   9. MODALS - Standard Dialog System
   =============================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content,
.modal-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s var(--ease-out);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal size variants */
.modal-container.modal-small,
.modal-content[style*="max-width: 400px"],
.modal-content[style*="max-width: 500px"] {
    width: 500px;
    max-width: 90vw;
}

.modal-container.modal-medium,
.modal-content[style*="max-width: 600px"],
.modal-content[style*="max-width: 700px"] {
    width: 700px;
    max-width: 90vw;
}

.modal-container.modal-large,
.modal-content[style*="max-width: 800px"] {
    width: 800px;
    max-width: 90vw;
}

.modal-container.modal-xl,
.modal-content[style*="max-width: 900px"],
.modal-content[style*="max-width: 1000px"] {
    width: 1000px;
    max-width: 95vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.modal-footer-left {
    display: flex;
    gap: var(--space-sm);
}

.modal-footer-right {
    display: flex;
    gap: var(--space-sm);
    margin-left: auto;
}

/* Template Selection UI - for Request/Task creation */
.template-selection-container {
    padding: var(--space-lg);
}

.template-selection-header {
    margin-bottom: var(--space-lg);
}

.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.template-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.template-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-card.blank-template {
    border-style: dashed;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
}

.template-card.blank-template:hover {
    border-color: var(--color-primary);
    background: #f0fdf4;
}

.template-icon {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}

.template-card h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.template-description {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
}

.template-meta {
    display: flex;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}


/* ===============================================
   10. PROGRESS & STATES
   =============================================== */

/* Progress Bars */
.progress-container,
.progress-container-expanded {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #15803d);
    border-radius: var(--radius-full);
    transition: width 0.4s var(--ease-out);
    position: relative;
}

.progress-label,
.progress-text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 42px;
    text-align: right;
}

/* Progress variants */
.progress-bar.sm {
    height: 6px;
}

.progress-bar.md {
    height: 8px;
}

.progress-bar.lg {
    height: 12px;
}

/* Progress color variants */
.progress-fill.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.error {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    min-height: 200px;
}

.empty-state h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.5;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
}

.loading-spinner {
    font-size: 32px;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-md);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    margin: 0;
    font-size: var(--text-base);
    color: var(--text-muted);
}


/* ===============================================
   11. CHECKLISTS - New Standard
   =============================================== */

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.checklist-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    transition: all 0.2s var(--ease-out);
}

.checklist-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    width: 100%;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-content {
    flex: 1;
    min-width: 0;
}

.checkbox-title {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.checkbox-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.checklist-status {
    font-size: var(--text-sm);
    color: var(--text-primary);
}


/* ===============================================
   12. PERMISSION MATRICES - New Standard
   =============================================== */

.permissions-matrix {
    width: 100%;
    margin-top: var(--space-md);
}

.permissions-table {
    width: 100%;
}

.permissions-table .table-header {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
}

.permissions-table .table-header .col-tab {
    text-align: left;
}

.permissions-table .table-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    transition: background 0.2s var(--ease-out);
}

.permissions-table .table-row:hover {
    background: var(--bg-secondary);
}

.permissions-table .col-tab {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.permissions-table .col-permission {
    text-align: center;
}

.permissions-table .col-permission input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.matrix-description {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.quick-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}


/* ===============================================
   13. DROPZONES - File Upload Areas
   =============================================== */

.file-dropzone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    background: #fafaf9;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    min-height: 150px;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-dropzone:hover {
    border-color: #86efac;
    background: #f0fdf4;
}

.file-dropzone.drag-over {
    border-color: var(--color-primary);
    background: #dcfce7;
    border-width: 3px;
    transform: scale(1.01);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.dropzone-content svg {
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    margin-bottom: var(--space-xs);
}

.dropzone-content h3 {
    margin: 0 0 var(--space-xs) 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-secondary);
}

.dropzone-content p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.dropzone-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-style: italic;
}

/* CSV Import Area */
.csv-import-area {
    padding: var(--space-md);
}

.csv-import-area .file-dropzone {
    min-height: 150px;
}

/* Parsed File Info */
.parsed-file-info {
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border-left: 3px solid var(--color-primary);
}

.parsed-file-info .info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm) var(--space-lg);
}

.parsed-file-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.parsed-file-info .info-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parsed-file-info .info-value {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.parsed-file-info .info-value.file-name {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    word-break: break-all;
}

/* Tour Operator Mapping Tables */
.mapping-details {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.mapping-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.mapping-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mapping-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.mapping-table th {
    text-align: left;
    padding: var(--space-xs) var(--space-sm);
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mapping-table td {
    padding: 0 var(--space-sm);
    border-bottom: none;
}

.mapping-table tbody tr:hover {
    background: var(--bg-secondary);
}

.mapping-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: var(--space-md);
}

.mapping-table .empty-row:hover {
    background: transparent;
}

.mapping-table .form-input {
    width: 100%;
    padding: 2px var(--space-sm);
    font-size: var(--text-sm);
    line-height: 1.2;
}

.mapping-table th:last-child,
.mapping-table td:last-child {
    width: 40px;
    text-align: center;
}

.btn-danger-ghost {
    background: transparent;
    color: var(--color-danger);
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-danger-ghost:hover {
    opacity: 1;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}


/* ===============================================
   14. DETAIL GRIDS - Information Display
   =============================================== */

.employee-details-grid,
.invoice-details-grid,
.onboarding-progress-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.employee-details-grid {
    grid-template-columns: repeat(4, 1fr);
}

.onboarding-progress-grid {
    grid-template-columns: repeat(4, 1fr);
}

.detail-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.detail-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.detail-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.detail-group label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-group span,
.detail-group .detail-value {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

/* Employee specific */
.employee-id {
    font-family: 'Courier New', monospace;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.employee-actions,
.detail-actions,
.invoice-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-lg);
}

.invoice-actions {
    justify-content: flex-end;
}


/* ===============================================
   15. ALERTS - Info/Warning/Error Boxes
   =============================================== */

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.alert.alert-info {
    background: #f0fdf4;
    border-color: var(--color-primary);
    color: #166534;
}

.alert.alert-success {
    background: #f0fdf4;
    border-color: var(--color-success);
    color: #15803d;
}

.alert.alert-warning {
    background: #fffbeb;
    border-color: var(--color-warning);
    color: #b45309;
}

.alert.alert-error {
    background: #fef2f2;
    border-color: var(--color-error);
    color: #991b1b;
}

.alert strong {
    font-weight: 600;
}

.alert p {
    margin: var(--space-xs) 0 0 0;
}


/* ===============================================
   16. TASK STEPS - New Standard
   =============================================== */

.task-steps-section {
    margin-top: var(--space-md);
}

.task-steps-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-sm) 0;
}

.task-steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-medium);
    transition: all 0.2s var(--ease-out);
}

.step-item.completed {
    border-left-color: var(--color-success);
    background: #f0fdf4;
}

.step-item.active {
    border-left-color: var(--color-primary);
    background: #f0fdf4;
}

.step-item.pending {
    border-left-color: var(--border-medium);
}

.step-status-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 600;
    flex-shrink: 0;
    color: var(--text-muted);
}

.step-item.completed .step-status-icon {
    color: var(--color-success);
}

.step-item.active .step-status-icon {
    color: var(--color-primary);
}

.step-title {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

/* Task assets section */
.task-assets-section {
    margin-top: var(--space-md);
}

.task-assets-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-sm) 0;
}

.asset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.asset-tag {
    padding: 4px var(--space-sm);
    background: #f3f4f6;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* Task metadata */
.task-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.task-description {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.task-description p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.5;
}


/* ===============================================
   17. CHARTS & VISUALIZATIONS
   =============================================== */

.chart-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    max-height: 400px;
    padding: var(--space-md);
}

canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Simple chart bars */
.chart-bar {
    height: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.chart-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.3s var(--ease-out);
}

.chart-fill.primary {
    background: var(--color-primary);
}

.chart-fill.success {
    background: var(--color-success);
}

.chart-fill.warning {
    background: var(--color-warning);
}

.chart-fill.error {
    background: var(--color-error);
}


/* ===============================================
   18. CALENDARS - Day & Week Views
   =============================================== */

.calendar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fcfcfd;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 2px solid var(--border-medium);
    background: var(--bg-secondary);
    gap: var(--space-md);
    flex-shrink: 0;
    z-index: 1;
}

.calendar-date-display,
.calendar-header h4,
.calendar-date {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-nav {
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease-out);
}

.calendar-nav:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Calendar grids */
.week-calendar {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    background: var(--bg-white);
    overflow: auto;
}

.day-calendar {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    width: 100%;
}

.staff-calendar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    min-height: 0;
    max-height: 100%;
}

/* Time cells */
.time-cell {
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    min-height: 60px;
    padding: var(--space-xs);
    background: var(--bg-white);
    cursor: pointer;
    transition: background 0.15s var(--ease-out);
    position: relative;
}

.time-cell:hover:not(.has-task) {
    background: var(--bg-secondary);
}

.calendar-hour-block {
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-rows: repeat(4, 20px);
    border-bottom: 1px solid var(--border-medium);
    width: 100%;
    flex-shrink: 0;
}

.hour-label {
    grid-row: 1 / -1;
    background: #f8fafc;
    border-right: 1px solid var(--border-medium);
    padding: var(--space-xs);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}

.time-slot {
    background: #fefefe;
    border-right: 1px solid var(--border-light);
    position: relative;
    min-height: 20px;
    height: 20px;
    width: 100%;
}

.time-slot.quarter {
    border-bottom: 1px dotted var(--border-medium);
}

.time-slot.half {
    border-bottom: 1px solid var(--border-medium);
}

.time-slot.three-quarter {
    border-bottom: 1px dotted var(--border-medium);
}

/* Drop zones in calendar */
.drop-zone {
    width: 100%;
    height: 100%;
    transition: all 0.2s var(--ease-out);
    position: relative;
}

.drop-zone:hover:not(.has-task) {
    background: rgba(22, 163, 74, 0.05);
}

.drop-zone.drag-over {
    background: rgba(22, 163, 74, 0.15);
    border: 1px dashed var(--color-primary);
}

.drop-zone.has-task {
    background: transparent;
    pointer-events: none;
}

.drop-zone.spanned-slot {
    background: rgba(0, 0, 0, 0.02);
}

.slot-occupied-indicator {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.03) 3px,
        rgba(0, 0, 0, 0.03) 6px
    );
}

/* Assigned tasks in calendar */
.assigned-task {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    z-index: 2;
}

.assigned-task:active {
    cursor: grabbing;
}

.assigned-task.priority-high {
    background: var(--color-error);
    color: white;
}

.assigned-task.priority-normal {
    background: var(--color-info);
    color: white;
}

.assigned-task.priority-low {
    background: var(--color-secondary);
    color: white;
}

.assigned-task.priority-urgent {
    background: #dc2626;
    color: white;
    animation: pulse 2s infinite;
}

.assigned-task-title {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.assigned-task-duration {
    font-size: 9px;
    opacity: 0.9;
    line-height: 1;
}

.remove-task-btn {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 50%;
    font-size: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s var(--ease-out);
    line-height: 1;
}

.assigned-task:hover .remove-task-btn {
    opacity: 1;
}

.remove-task-btn:hover {
    background: rgba(220, 38, 38, 0.8);
}

/* Day headers */
.day-header {
    border-bottom: 2px solid var(--border-medium);
    border-right: 1px solid var(--border-light);
    padding: var(--space-sm);
    text-align: center;
    background: var(--bg-secondary);
}

.day-header.is-today {
    background: #f0fdf4;
    color: var(--color-primary);
    font-weight: 600;
}


/* ===============================================
   19. SPECIAL LAYOUTS
   =============================================== */

/* Three-Panel Layout */
.three-panel-layout {
    display: grid;
    grid-template-columns: var(--left-panel-width, calc(65% - 8px)) var(--right-panel-width, calc(35% - 8px));
    grid-template-rows: var(--top-panel-height, calc(50% - 8px)) var(--bottom-panel-height, calc(50% - 8px));
    gap: var(--space-md);
    flex: 1;
    min-height: 0;
    position: relative;
    grid-template-areas: 
        "left-top right"
        "left-bottom right";
}

.three-panel-layout .dashboard-section,
.three-panel-layout .service-category-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.requests-area {
    grid-area: left-top;
}

.tasks-area {
    grid-area: left-bottom;
}

.allocation-area {
    grid-area: right;
}

/* Resizable Handle - Universal Component */
.resizable-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.resizable-handle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Vertical Handle (adjusts width) */
.resizable-handle.vertical {
    top: 0;
    bottom: 0;
    width: var(--space-md);
    cursor: col-resize;
    left: calc(var(--left-panel-width, 65%) + 8px);
    margin-left: calc(var(--space-md) / -2);
}

.resizable-handle.vertical::before {
    content: "⋮⋮";
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: -2px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.resizable-handle.vertical:hover::before {
    opacity: 1;
    color: var(--text-secondary);
}

/* Horizontal Handle (adjusts height) */
.resizable-handle.horizontal {
    left: 0;
    right: calc(var(--right-panel-width, calc(35% - 8px)) + var(--space-md));
    height: var(--space-md);
    cursor: row-resize;
    top: calc(var(--top-panel-height, calc(50% - 8px)) + 8px + var(--space-md) / 2);
    margin-top: calc(var(--space-md) / -2);
}

.resizable-handle.horizontal::before {
    content: "⋯";
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    transform: scaleX(1.5);
}

.resizable-handle.horizontal:hover::before {
    opacity: 1;
    color: var(--text-secondary);
}

/* Size Display */
.size-display {
    position: absolute;
    background: var(--bg-white);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.resizable-handle.vertical .size-display {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.resizable-handle.horizontal .size-display {
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
}

.resizable-handle:hover .size-display {
    opacity: 1;
}

/* Legacy support - old class names */
.panel-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--space-md);
    background: transparent;
    cursor: col-resize;
    z-index: 10;
    left: calc(var(--left-panel-width) + 8px);
    margin-left: calc(var(--space-md) / -2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.panel-resize-handle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.panel-resize-handle::before {
    content: "⋮⋮";
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: -2px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.panel-resize-handle:hover::before {
    opacity: 1;
    color: var(--text-secondary);
}

.width-display {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.panel-resize-handle:hover .width-display {
    opacity: 1;
}

/* Two-Panel Layout */
.two-panel-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    flex: 1;
    min-height: 0;
}

.two-panel-layout .dashboard-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.bulk-actions-bar .selection-count {
    margin-right: auto;
}


/* ===============================================
   20. TIMEKEEPING SPECIFIC
   =============================================== */

.timeline-stats {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: 500;
}

.stat-indicator {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.stat-item.stat-success .stat-indicator {
    background: var(--color-success);
}

.stat-item.stat-warning .stat-indicator {
    background: var(--color-warning);
}

.stat-item.stat-danger .stat-indicator {
    background: var(--color-error);
}

.stat-item.stat-total {
    color: var(--text-secondary);
}


/* ===============================================
   21. ONBOARDING SPECIFIC
   =============================================== */

.onboarding-status-summary {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: #f9fafb;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.status-text-expanded {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.status-expired {
    color: #b91c1c;
    font-weight: 500;
}

.onboarding-progress-section {
    margin-bottom: var(--space-lg);
}

.onboarding-progress-section h4,
.onboarding-link-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onboarding-link-section {
    margin-bottom: var(--space-lg);
}

.link-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.link-url {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.link-url label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.link-url code {
    font-family: 'Courier New', monospace;
    font-size: var(--text-xs);
    color: #15803d;
    background: #f0fdf4;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid #bbf7d0;
    word-break: break-all;
}

.link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.link-meta span {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* Blockers */
.blockers-section {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
}

.blockers-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #b45309;
    margin: 0 0 var(--space-sm) 0;
}

.blockers-list {
    margin: 0;
    padding-left: var(--space-lg);
    list-style-type: disc;
}

.blockers-list li {
    font-size: var(--text-sm);
    color: #78350f;
    margin-bottom: var(--space-xs);
}


/* ===============================================
   22. EMPLOYEES TAB SPECIFIC
   =============================================== */

.add-employee-section {
    flex-shrink: 0;
}

.add-employee-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
    align-items: start;
}

.download-actions-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dropzone-column {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.dropzone-column .file-dropzone {
    width: 100%;
    padding: var(--space-md);
}


/* ===============================================
   23. REQUEST/TASK ITEMS (Workspace)
   =============================================== */

.incoming-requests-container,
.task-queue-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.request-list,
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 6px;
    margin-right: -6px;
}

.request-item,
.task-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s var(--ease-out);
    min-height: auto;
}

.request-item:hover,
.task-item:hover {
    box-shadow: 3px 3px 6px 0 rgba(0, 0, 0, 0.15);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.request-header,
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
    gap: var(--space-sm);
}

.request-header h4,
.task-header h4 {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-time {
    color: var(--text-light);
    font-size: 10px;
    white-space: nowrap;
}

.task-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.task-item[draggable="true"] {
    cursor: move;
}

.task-item[draggable="true"]:hover {
    box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.queue-count {
    background: var(--color-warning);
    color: var(--bg-white);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}


/* ===============================================
   24. STAFF SELECTOR & CONTROLS
   =============================================== */

.staff-selector-section {
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.staff-dropdown {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    background: var(--bg-white);
}


/* ===============================================
   25. USER CONFIGURATION SPECIFIC
   =============================================== */

.user-summary {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.user-summary p {
    margin: 0 0 var(--space-xs) 0;
    font-size: var(--text-sm);
}

.user-summary strong {
    color: var(--text-primary);
}

.tab-permissions-summary {
    margin-bottom: var(--space-lg);
}

.tab-permissions-summary h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-md) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permissions-all {
    padding: var(--space-md);
    background: #f0fdf4;
    border-radius: var(--radius-md);
    border: 1px solid #bbf7d0;
}

.permissions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
}

.permission-badge.badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.permission-badge.badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.role-badge {
    padding: 4px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-badge.badge-gold {
    background: #fef3c7;
    color: #b45309;
}

.role-badge.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.badge-purple,
.role-badge.badge-purple-light {
    background: #f3e8ff;
    color: #6b21a8;
}

.role-badge.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.role-badge.badge-teal {
    background: #ccfbf1;
    color: #115e59;
}

.role-badge.badge-gray,
.role-badge.badge-gray-light {
    background: #f3f4f6;
    color: #4b5563;
}

.role-badge.badge-default {
    background: #f9fafb;
    color: #6b7280;
}

.permissions-editor {
    margin-top: var(--space-md);
}


/* ===============================================
   26. RESPONSIVE ADJUSTMENTS
   =============================================== */

@media (max-width: 1024px) {
    .metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .employee-details-grid,
    .onboarding-progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        max-width: none;
    }
    
    .metric-grid,
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-details-grid,
    .invoice-details-grid,
    .onboarding-progress-grid,
    .detail-grid-2,
    .detail-grid-3,
    .detail-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .three-panel-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 
            "left-top"
            "left-bottom"
            "right";
    }
    
    .panel-resize-handle {
        display: none;
    }
    
    .add-employee-layout {
        grid-template-columns: 1fr;
    }
    
    .task-header-left,
    .employee-header-left,
    .request-header-left,
    .invoice-header-left,
    .task-header-right,
    .employee-header-right,
    .request-header-right,
    .invoice-header-right {
        flex-wrap: wrap;
    }
    
    .permissions-table .table-header,
    .permissions-table .table-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .permissions-table .col-permission {
        text-align: left;
        padding-left: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .modal-content,
    .modal-container {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .calendar-header {
        flex-wrap: wrap;
    }
}


/* ===============================================
   27. UTILITY CLASSES
   =============================================== */

.interactive {
    cursor: pointer;
}

.clickable {
    cursor: pointer;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--text-primary);
}


/* ===============================================
   28. ACCESSIBILITY
   =============================================== */

@media (prefers-reduced-motion: reduce) {
    .metric-card,
    .activity-item,
    .expandable-list-item,
    .data-row,
    .button,
    .expand-icon,
    .progress-fill,
    .assigned-task {
        transition: none;
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
.expandable-header:focus-visible,
.data-row.interactive:focus-visible,
.metric-card.interactive:focus-visible,
.time-cell:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===============================================
   19. TOUR OPERATOR MAPPING FEATURES
   =============================================== */

/* Operator Cards Grid */
.operator-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
}

.operator-card {
    min-height: 140px;
}

.operator-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.operator-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.operator-card .metric-stats {
    display: flex;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.operator-card .metric-stats span:not(:last-child)::after {
    content: '•';
    margin-left: var(--space-md);
    color: var(--border-color);
}

/* Modal Form Sections */
.form-section {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.form-section h4 {
    margin: 0 0 var(--space-md) 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

/* Mapping Tables in Modal */
.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.mapping-table thead tr {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
}

.mapping-table th {
    padding: var(--space-sm);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.mapping-table td {
    padding: 0 var(--space-sm);
    border-bottom: none;
}

.mapping-table tbody tr:hover {
    background: var(--bg-secondary);
}

.mapping-table tbody tr.empty-row td {
    text-align: center;
    padding: var(--space-md);
    color: var(--text-muted);
}

.mapping-table tbody tr.empty-row:hover {
    background: transparent;
}

.mapping-table .form-input {
    width: 100%;
    margin: 0;
    padding: 2px var(--space-sm);
    line-height: 1.2;
}

.mapping-table .btn-icon {
    padding: 4px;
}


/* Mapping Preview Section (in reservation details) */
.mapping-preview-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.mapping-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.mapping-preview-header h4 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.mapping-status {
    font-size: var(--text-sm);
    font-weight: 600;
}

.mapping-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.mapping-preview-table td {
    padding: var(--space-xs) var(--space-sm);
    vertical-align: middle;
}

.mapping-preview-table .label-col {
    color: var(--text-muted);
    width: 100px;
}

.mapping-preview-table .code-col {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.mapping-preview-table .arrow-col {
    color: var(--text-muted);
    text-align: center;
    width: 30px;
}

.mapping-preview-table .pms-col {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.mapping-preview-table .pms-col.mapped {
    color: var(--success);
}

.mapping-preview-table .pms-col.unmapped {
    color: var(--danger);
}

/* Unmapped Warnings Section */
.unmapped-warnings {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.warning-header {
    margin-bottom: var(--space-md);
}

.warning-header h4 {
    margin: 0 0 var(--space-xs) 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: #856404;
}

.warning-header p {
    margin: 0;
    font-size: var(--text-sm);
    color: #856404;
}

.warning-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.warning-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: white;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
}

.warning-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 600;
    min-width: 100px;
}

.warning-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.warning-row .btn-sm {
    padding: 4px 12px;
    font-size: var(--text-sm);
    white-space: nowrap;
}

