/* ═══════════════════════════════════════════════════════════════
   POLARIS - Commercial Underwriting Platform
   Professional, clean enterprise dashboard
   ═══════════════════════════════════════════════════════════════ */

/* CSS Variables */
:root {
    /* POLARIS Brand Colors */
    --color-primary: #006B5E;
    --color-primary-dark: #004D44;
    --color-primary-light: #008573;
    --color-accent: #00A67E;
    
    /* Neutral Colors */
    --color-bg: #F5F5F5;
    --color-surface: #FFFFFF;
    --color-surface-muted: #F0F0F0;
    --color-border: #E5E5E5;
    --color-border-light: #EEEEEE;
    
    /* Text Colors */
    --color-text: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;
    
    /* Status Colors */
    --color-success: #22C55E;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;
    
    /* Risk Colors */
    --color-risk-high: #EF4444;
    --color-risk-medium: #F59E0B;
    --color-risk-low: #22C55E;
    
    /* Phase Colors */
    --color-quoted: #22C55E;
    --color-received: #F59E0B;
    --color-in-progress: #3B82F6;
    --color-bound: #006B5E;
    --color-declined: #EF4444;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-xl);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.logo {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-primary);
    letter-spacing: -0.3px;
}

.logo strong {
    font-weight: 700;
}

.header-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    border-left: 1px solid var(--color-border);
    padding-left: var(--space-lg);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.btn-agent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-agent:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
}

.btn-agent svg {
    stroke: currentColor;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.user-dropdown:hover {
    border-color: var(--color-text-secondary);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.dropdown-icon {
    color: var(--color-text-muted);
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.2s;
}

.header-icon-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-border);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-new-submission {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-new-submission:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
}

.btn-new-submission svg {
    stroke: currentColor;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* ═══════════════════════════════════════════════════════════════
   WELCOME BANNER
   ═══════════════════════════════════════════════════════════════ */

.welcome-banner {
    background: linear-gradient(105deg, #1B4D47 0%, #2A6B62 40%, #5A9E94 80%, #8BC4BA 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-2xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.welcome-content {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.welcome-greeting {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.3px;
}

.welcome-subtitle {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 4px;
}

.welcome-subtitle .highlight {
    font-weight: 600;
}

.welcome-pipeline {
    font-size: 13px;
    opacity: 0.8;
}

.welcome-stats {
    display: flex;
    align-items: stretch;
    background: rgba(20, 60, 55, 0.5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
    min-width: 140px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: var(--space-sm);
    font-weight: 400;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-value-large {
    font-size: 36px;
}

.stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
    align-self: stretch;
}

/* ═══════════════════════════════════════════════════════════════
   ACTION SECTION
   ═══════════════════════════════════════════════════════════════ */

.action-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.action-count-badge {
    width: 24px;
    height: 24px;
    background: var(--color-text);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--space-lg);
}

.action-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.action-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #C5E8E3;
}

.action-card-content {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.action-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
}

.action-card-left {
    flex: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--space-sm);
}

.tag {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-property {
    background: #BBF7D0;
    color: #171717;
    border: none;
}

.tag-broker {
    background: #CEE4D9;
    color: #171717;
    border: none;
}

.tag-status {
    background: var(--color-surface-muted);
    color: #0A0A0A;
    border: 1px solid #E5E5E5;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 4px;
}

.risk-badge.risk-high {
    background: #FEE2E2;
    color: #B91C1C;
}

.risk-badge.risk-medium {
    background: #FEF3C7;
    color: #B45309;
}

.risk-badge.risk-low {
    background: #D1FAE5;
    color: #065F46;
}

.card-meta {
    display: flex;
    gap: var(--space-lg);
    flex-shrink: 0;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.meta-label {
    font-size: 12px;
    color: #696969;
}

.meta-value {
    font-size: 15px;
    font-weight: 600;
    color: #021B1A;
}

.meta-value.meta-highlight {
    color: #B91C1C;
}

.meta-value.meta-teal {
    color: #064539;
}

.card-description {
    font-size: 14px;
    color: #0A0A0A;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

.btn-review:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   ANALYTICS SECTION
   ═══════════════════════════════════════════════════════════════ */

.analytics-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-lg);
}

.analytics-card {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

/* Pipeline Table */
.pipeline-table {
    width: 100%;
    border-collapse: collapse;
}

.pipeline-table th,
.pipeline-table td {
    text-align: left;
    padding: 12px 8px;
    font-size: 14px;
}

.pipeline-table th {
    color: #737373;
    font-weight: 400;
    font-size: 13px;
    padding-bottom: 16px;
}

.pipeline-table th:nth-child(2),
.pipeline-table th:nth-child(3),
.pipeline-table td:nth-child(2),
.pipeline-table td:nth-child(3) {
    text-align: right;
}

.pipeline-table tbody td {
    color: #0A0A0A;
    font-weight: 500;
}

.pipeline-table tbody td:nth-child(2) {
    font-weight: 700;
}

.pipeline-table tbody td:nth-child(3) {
    font-weight: 500;
}

.pipeline-table tfoot tr {
    border-top: 1px solid #E5E5E5;
}

.pipeline-table tfoot td {
    padding-top: 16px;
    font-weight: 700;
    color: #0A0A0A;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-bar {
    width: 120px;
    height: 8px;
    border-radius: 4px;
    background: #E5E5E5;
    position: relative;
    overflow: hidden;
}

.status-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 4px;
    background: #6FB68A;
}

.status-bar.status-received::after { width: 70%; background: #6FB68A; }
.status-bar.status-in-progress::after { width: 90%; background: #6FB68A; }
.status-bar.status-quoted::after { width: 50%; background: #6FB68A; }
.status-bar.status-bound::after { width: 15%; background: #6FB68A; }
.status-bar.status-declined::after { width: 30%; background: #6FB68A; }

/* Timeline Chart */
.timeline-card {
    display: flex;
    flex-direction: column;
}

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

.timeline-header .analytics-title {
    margin-bottom: 0;
}

.timeline-legend {
    display: flex;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0A0A0A;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-dot.legend-new {
    background: #0C5A3E;
}

.legend-dot.legend-renewal {
    background: repeating-linear-gradient(
        45deg,
        #6FB68A,
        #6FB68A 3px,
        #FFFFFF 3px,
        #FFFFFF 6px
    );
    border: 1px solid #6FB68A;
}

.timeline-chart {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 24px 0;
    min-height: 240px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bars-wrapper {
    display: flex;
    gap: 4px;
    align-items: flex-end;
}

.bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bar-value {
    font-size: 14px;
    font-weight: 600;
    color: #0A0A0A;
}

.bar {
    width: 48px;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    min-height: 4px;
}

.bar.bar-new {
    background: #0C5A3E;
}

.bar.bar-renewal {
    background: repeating-linear-gradient(
        45deg,
        #6FB68A,
        #6FB68A 4px,
        #FFFFFF 4px,
        #FFFFFF 8px
    );
    border: 1px solid #6FB68A;
    border-bottom: none;
}

.bar-label {
    font-size: 13px;
    color: #525252;
    margin-top: 8px;
}

.timeline-x-label {
    text-align: center;
    font-size: 13px;
    color: #737373;
    padding-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   SUBMISSIONS SECTION
   ═══════════════════════════════════════════════════════════════ */

.submissions-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.submissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submissions-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
}

.tab {
    padding: var(--space-md) var(--space-xl);
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

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

.tab.active {
    color: var(--color-text);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.pill:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
    color: var(--color-text);
}

.pill.pill-active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: white;
}

.pill.pill-active .pill-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

/* Search and Filters */
.search-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.search-group {
    display: flex;
    gap: var(--space-sm);
}

.dropdown-select {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}

.dropdown-select:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
}

.search-input {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 200px;
}

.search-input svg {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-input input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    background: transparent;
}

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

.filter-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-date-range {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-date-range:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
    color: var(--color-text);
}

.btn-filter-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter-icon:hover {
    background: #E5E5E5;
    border-color: var(--color-text-secondary);
    color: var(--color-text);
}

/* Submissions Table */
.table-container {
    overflow-x: auto;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.submissions-table th,
.submissions-table td {
    text-align: left;
    padding: var(--space-md);
    font-size: 13px;
    white-space: nowrap;
}

.submissions-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 12px;
    background: #FAFAFA;
    border-bottom: 1px solid var(--color-border);
}

.submissions-table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.submissions-table tbody tr:hover {
    background: #FAFAFA;
}

.insured-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
}

.appetite-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.appetite-badge.appetite-a,
.appetite-badge.appetite-b,
.appetite-badge.appetite-c {
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.phase-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.phase-badge.phase-quoted,
.phase-badge.phase-received,
.phase-badge.phase-in-progress,
.phase-badge.phase-bound,
.phase-badge.phase-declined {
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.primary-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .analytics-section {
        grid-template-columns: 1fr;
    }
    
    .action-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-lg);
    }
    
    .welcome-banner {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: stretch;
    }
    
    .welcome-stats {
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 100px;
        padding: var(--space-md) var(--space-lg);
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .header {
        padding: 0 var(--space-lg);
    }
    
    .submissions-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
    
    .action-card-header {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .card-meta {
        flex-wrap: wrap;
    }
    
    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    color: var(--color-text-muted);
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: var(--space-sm);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--color-text-muted);
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN MENU (Search Field Selector)
   ═══════════════════════════════════════════════════════════════ */

.dropdown-select {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    min-width: 160px;
}

.dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--color-bg);
}

.dropdown-item.active {
    background: var(--color-text);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   DATE RANGE PICKER
   ═══════════════════════════════════════════════════════════════ */

.date-range-picker {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    width: 280px;
    overflow: hidden;
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.date-picker-header span {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.close-picker {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-picker:hover {
    color: var(--color-text);
}

.date-picker-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.date-input-group input[type="date"] {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
    width: 100%;
    box-sizing: border-box;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: var(--color-text-secondary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.date-picker-footer {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.btn-clear-dates,
.btn-apply-dates {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.btn-clear-dates:hover {
    background: #E5E5E5;
    color: var(--color-text);
}

.btn-apply-dates {
    background: var(--color-text);
    border: none;
    color: white;
}

.btn-apply-dates:hover {
    background: #333333;
}

/* ═══════════════════════════════════════════════════════════════
   ADVANCED FILTERS PANEL
   ═══════════════════════════════════════════════════════════════ */

.advanced-filters-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    width: 300px;
    overflow: hidden;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.filters-header span {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.close-filters {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-filters:hover {
    color: var(--color-text);
}

.filters-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group > label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.filter-options {
    display: flex;
    gap: 16px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}

.filter-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-text);
    cursor: pointer;
}

.filter-group select {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-text-secondary);
}

.filters-footer {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.btn-reset-filters,
.btn-apply-filters {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.btn-reset-filters:hover {
    background: #E5E5E5;
    color: var(--color-text);
}

.btn-apply-filters {
    background: var(--color-text);
    border: none;
    color: white;
}

.btn-apply-filters:hover {
    background: #333333;
}

/* ═══════════════════════════════════════════════════════════════
   SORT INDICATORS
   ═══════════════════════════════════════════════════════════════ */

.submissions-table th {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.submissions-table th:hover {
    background: rgba(26, 26, 26, 0.04);
}

.sort-indicator {
    color: var(--color-text);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   NEW SUBMISSION MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.15s;
}

.modal-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.modal-body {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-select {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color 0.15s;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-text-secondary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-text);
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.btn-modal-cancel {
    padding: 10px 20px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-modal-cancel:hover {
    background: #E5E5E5;
    color: var(--color-text);
}

.btn-modal-create {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--color-text);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-modal-create:hover {
    background: #333333;
}

.btn-modal-create:disabled {
    background: var(--color-text-muted);
    cursor: not-allowed;
}

.btn-modal-create svg {
    stroke: white;
}
