/* FSE Cost Calculator - The Cozm Brand Theme */

:root {
    /* ===== THE COZM BRAND PALETTE ===== */

    /* Primary Colours */
    --cozm-teal: #40AEBC;           /* Teal Blue - primary accent, contrasting */
    --cozm-teal-dark: #3FAFBE;      /* Gradient Teal (darker end) */
    --cozm-dark-indigo: #181C31;    /* Dark Indigo - headings, bold text */
    --cozm-red: #BD4040;            /* Pastel Red - warnings, errors */

    /* Background Colours */
    --cozm-pastel-blue: #EDF5FF;    /* Pastel Blue - main background */
    --cozm-light-bg: #F9FBFF;       /* Gradient Light end */
    --cozm-light-teal: #EDF5FF;     /* Light background tint */

    /* Text Colours */
    --cozm-light-sky-blue: #83849E; /* Light Sky Blue - paragraphs, secondary text */
    --cozm-light-gray: #EEEEEE;     /* Light Gray - strokes, borders */

    /* Legacy variable mappings (for backward compatibility) */
    --cozm-gold: #BD8941;           /* Gold highlight colour */
    --cozm-dark: #181C31;           /* Same as dark-indigo */

    /* Semantic Variables */
    --bg-page: #EDF5FF;             /* Pastel Blue background */
    --bg-card: #ffffff;
    --text-primary: #181C31;        /* Dark Indigo for main text */
    --text-secondary: #83849E;      /* Light Sky Blue for secondary */
    --border-light: #EEEEEE;        /* Light Gray borders */

    /* Gradients */
    --gradient-dark: linear-gradient(135deg, #181C31 0%, #3FAFBE 100%);
    --gradient-light: linear-gradient(135deg, #EDF5FF 0%, #F9FBFF 100%);

    /* Shadows - Using brand teal */
    --shadow-soft: 0 4px 6px -1px rgba(24, 28, 49, 0.04), 0 2px 4px -1px rgba(24, 28, 49, 0.02);
    --shadow-card: 0 10px 15px -3px rgba(64, 174, 188, 0.08), 0 4px 6px -2px rgba(64, 174, 188, 0.04);
    --shadow-float: 0 20px 25px -5px rgba(24, 28, 49, 0.08), 0 10px 10px -5px rgba(24, 28, 49, 0.04);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* ===== LAYOUT & CARD STYLES ===== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px; /* Modern but not overly rounded */
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hero Section */
header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
}

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

h1, h2, h3 {
    letter-spacing: -0.025em; /* Tighter tracking for headings */
    color: var(--cozm-dark-indigo);
}

.text-label {
    font-size: 0.75rem; /* 12px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-secondary);
}

.text-value-lg {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    color: var(--cozm-dark-indigo);
    letter-spacing: -0.03em;
}

/* ===== BUTTONS & INPUTS ===== */

.btn-primary {
    background: var(--gradient-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem; /* 15px */
    border: none;
    box-shadow: 0 4px 6px -1px rgba(64, 174, 188, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(64, 174, 188, 0.35);
    background: linear-gradient(135deg, #181C31 0%, #40AEBC 100%);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--cozm-teal);
    color: var(--cozm-teal-dark);
    background-color: var(--cozm-light-teal);
}

.input-field {
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: all 0.2s;
    width: 100%;
}

.input-field:focus {
    outline: none;
    border-color: var(--cozm-teal);
    box-shadow: 0 0 0 3px rgba(68, 145, 156, 0.1);
}

/* Skill Chips for Staffing Engine */
.skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cozm-light-sky-blue);
    background-color: white;
    border: 1px solid var(--cozm-light-gray);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.skill-chip:hover {
    border-color: var(--cozm-teal);
    color: var(--cozm-teal);
    background-color: var(--cozm-pastel-blue);
}

.skill-chip.selected {
    background: var(--gradient-dark);
    border-color: var(--cozm-dark-indigo);
    color: white;
    box-shadow: 0 2px 4px rgba(24, 28, 49, 0.15);
}

/* ===== NAVIGATION ===== */

.nav-tab {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: var(--cozm-dark-indigo);
    background-color: var(--cozm-pastel-blue);
}

.nav-tab-active {
    background-color: var(--cozm-pastel-blue);
    color: var(--cozm-dark-indigo);
    font-weight: 600;
}

/* ===== TABLES ===== */

.breakdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.breakdown-table th {
    background-color: #f8fafc; /* Very light grey header */
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}

.breakdown-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

.breakdown-table .total-row {
    background-color: var(--cozm-light-teal);
}

.breakdown-table .total-row td {
    font-weight: 700;
    color: var(--cozm-teal-dark);
    border-top: 2px solid var(--cozm-teal); /* Accent line */
}

/* ===== VISUALIZATION COMPONENTS ===== */

/* Stacked Bar for Cost Breakdown */
.cost-bar-container {
    height: 12px;
    background-color: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin: 16px 0;
}

.cost-bar-segment {
    height: 100%;
    transition: width 0.5s ease-out;
}

.cost-bar-segment.tax { background-color: var(--cozm-teal); }
.cost-bar-segment.social { background-color: var(--cozm-gold); }
.cost-bar-segment.fees { background-color: var(--text-secondary); }

/* Legend Pills */
.legend-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.legend-pill.tax { background-color: var(--cozm-light-teal); color: var(--cozm-teal-dark); }
.legend-pill.social { background-color: #fefce8; color: #854d0e; } /* Gold tint */

/* ===== UTILITIES ===== */

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Removed custom .hidden rule - Tailwind CDN provides this, and !important was breaking responsive utilities like md:flex */

/* Custom Scrollbar for sleekness */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== RESULTS SECTION - TWO COLUMN LAYOUT ===== */

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

.currency-toggle {
    display: flex;
    background: var(--cozm-light-gray);
    border-radius: 8px;
    padding: 4px;
}

.currency-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-btn.active {
    background: white;
    color: var(--cozm-dark-indigo);
    box-shadow: 0 1px 3px rgba(24, 28, 49, 0.1);
}

.currency-btn:hover:not(.active) {
    color: var(--cozm-dark-indigo);
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.alert-banner.warning {
    background: rgba(189, 64, 64, 0.08);
    border: 1px solid rgba(189, 64, 64, 0.25);
    color: var(--cozm-red);
}

.alert-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Two-Column Container */
.results-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

@media (max-width: 1024px) {
    .results-container {
        grid-template-columns: 1fr;
    }

    .results-right-column {
        order: -1; /* Chart goes first on mobile */
    }

    .chart-panel {
        position: static !important;
    }

    .chart-wrapper {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* Left Column */
.results-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Assignment Summary Card */
.assignment-summary-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px 24px;
}

.summary-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Breakdown Groups */
.breakdown-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-group {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.breakdown-group:hover {
    box-shadow: var(--shadow-card);
}

.breakdown-group.expanded {
    box-shadow: var(--shadow-card);
}

.breakdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.breakdown-header:hover {
    background-color: #f8fafc;
}

.breakdown-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.breakdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.breakdown-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.breakdown-warning-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(189, 64, 64, 0.1);
    color: var(--cozm-red);
    text-decoration: none;
    cursor: pointer;
}

.breakdown-warning-badge:hover {
    background: rgba(189, 64, 64, 0.2);
    text-decoration: underline;
}

.breakdown-exempt-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    margin-left: 8px;
}

.breakdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.breakdown-group.expanded .breakdown-chevron {
    transform: rotate(90deg);
}

.breakdown-details {
    display: none;
    padding: 0 20px 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 0;
}

.breakdown-group.expanded .breakdown-details {
    display: block;
    padding-top: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

.detail-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-value.detail-link {
    color: var(--cozm-teal);
}

.detail-value.detail-warning {
    color: var(--cozm-red);
}

/* Tax bracket breakdown table */
.tax-bracket-breakdown {
    margin: 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.tax-bracket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.tax-bracket-row:not(:last-child) {
    border-bottom: 1px dashed #e2e8f0;
}

.tax-bracket-range {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
}

.tax-bracket-rate {
    width: 50px;
    text-align: center;
    color: var(--cozm-teal);
    font-weight: 500;
}

.tax-bracket-amount {
    width: 90px;
    text-align: right;
    font-weight: 500;
    color: var(--text-primary);
}

.tax-total-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--cozm-teal) !important;
    border-bottom: none !important;
}

.effective-rate-badge {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Social Security calculation breakdown */
.ss-calculation-group {
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px dashed #e2e8f0;
}

.ss-calculation-group:first-of-type {
    margin-top: 12px;
}

.ss-calculation-row .detail-calc {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.ss-calculation-row .detail-label.detail-calc {
    padding-left: 12px;
}

.ss-cap-row .detail-calc {
    font-size: 11px;
    color: var(--cozm-gold);
    font-style: italic;
}

.ss-total-row {
    margin-top: 4px;
    padding-top: 8px;
}

.ss-grand-total-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--cozm-teal) !important;
    border-bottom: none !important;
}

/* Right Column - Chart Panel */
.results-right-column {
    position: relative;
}

.chart-panel {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 100px;
    text-align: center;
}

.chart-total-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.chart-total-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--cozm-dark-indigo);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.chart-daily-rate {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.chart-daily-rate strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Chart Wrapper */
.chart-wrapper {
    position: relative;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 24px;
}

.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.chart-center-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.chart-center-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--cozm-dark-indigo);
}

/* Chart Legend */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-legend-label {
    flex: 1;
    text-align: left;
    color: var(--text-secondary);
}

.chart-legend-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Chart Actions */
.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
}

.chart-action-btn svg {
    flex-shrink: 0;
}

/* ===== LEGACY STYLES (keeping for backward compatibility) ===== */

/* Old stacked bar styles - keeping in case of fallback */
.cost-breakdown-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--border-light);
}

.cost-breakdown-bar .segment {
    height: 100%;
    transition: width 0.5s ease-out;
}

/* Brand colour segments for cost breakdown */
.cost-breakdown-bar .segment.tax { background-color: var(--cozm-dark-indigo); }
.cost-breakdown-bar .segment.social { background-color: var(--cozm-teal); }
.cost-breakdown-bar .segment.perdiem { background-color: var(--cozm-light-sky-blue); }
.cost-breakdown-bar .segment.admin { background-color: var(--cozm-red); }

.cost-breakdown-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

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

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Brand colour legend dots */
.legend-dot.tax { background-color: var(--cozm-dark-indigo); }
.legend-dot.social { background-color: var(--cozm-teal); }
.legend-dot.perdiem { background-color: var(--cozm-light-sky-blue); }
.legend-dot.admin { background-color: var(--cozm-red); }

.legend-label {
    color: var(--text-secondary);
}

.legend-value {
    font-weight: 600;
    color: var(--text-primary);
}

.legend-percent {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===== SETTINGS PANEL ===== */

.settings-panel {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.settings-panel:hover {
    box-shadow: var(--shadow-soft);
}

.settings-panel.expanded {
    box-shadow: var(--shadow-card);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid transparent;
    transition: all 0.15s ease;
}

.settings-panel.expanded .settings-header {
    border-bottom-color: var(--border-light);
}

.settings-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
}

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

.settings-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.settings-panel.expanded .settings-chevron {
    transform: rotate(180deg);
}

.settings-content {
    display: none;
    padding: 20px;
    background: #fafbfc;
}

.settings-panel.expanded .settings-content {
    display: block;
}

.settings-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .settings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.15s ease;
}

.setting-item:hover {
    border-color: var(--cozm-teal);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.setting-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .setting-label {
        font-size: 12px;
        white-space: normal;
    }
}

.setting-help {
    flex-shrink: 0;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.25s ease;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.25s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--cozm-teal);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(64, 174, 188, 0.2);
}

/* ===== SETTINGS MODAL ===== */

.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(24, 28, 49, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}

.settings-modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.settings-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(24, 28, 49, 0.25);
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.2s ease;
}

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

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

.settings-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.settings-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.settings-modal-close:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.settings-modal-body {
    padding: 24px;
}

.settings-modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.settings-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== UTILITY CLASSES ===== */

.text-cozm-teal {
    color: var(--cozm-teal);
}

.text-cozm-gold {
    color: var(--cozm-gold);
}

.text-cozm-red {
    color: var(--cozm-red);
}

.bg-cozm-light-teal {
    background-color: var(--cozm-light-teal);
}

/* Form label styling */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Tooltip styles */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    margin-left: 4px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-light);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: help;
}

.tooltip-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cozm-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 4px;
}

.tooltip-wrapper:hover .tooltip-content {
    display: block;
}

.tooltip-wrapper:focus-within .tooltip-content {
    display: block;
}

/* Fix for tooltips in breakdown headers - ensure they're hidden by default */
.breakdown-header .tooltip-content,
.breakdown-header-left .tooltip-content {
    display: none !important;
    visibility: hidden;
}

.breakdown-header .tooltip-wrapper:hover .tooltip-content,
.breakdown-header-left .tooltip-wrapper:hover .tooltip-content {
    display: block !important;
    visibility: visible;
}

.help-icon:focus,
.help-icon:focus-visible {
    outline: 2px solid var(--cozm-teal);
    outline-offset: 2px;
}

/* Tab styles */
.tab-active {
    font-weight: 600;
    color: var(--cozm-dark-indigo);
    border-bottom: 2px solid var(--cozm-teal);
}

.tab-inactive {
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.tab-inactive:hover {
    color: var(--cozm-dark-indigo);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--cozm-teal);
    background-color: var(--cozm-light-teal);
}

/* Nav tab flex alignment */
.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Tablet breakpoint */
@media (max-width: 768px) {
    /* Header adjustments */
    header .max-w-7xl {
        padding-left: 16px;
        padding-right: 16px;
    }

    header .flex.items-center.justify-between {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    header .flex.items-center.gap-8 {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }

    header .flex.items-center.gap-8 > div[style*="border-left"] {
        border-left: none !important;
        padding-left: 0 !important;
    }

    /* Hide text labels on nav tabs, show icons only */
    .nav-tab {
        padding: 10px 12px;
        font-size: 12px;
    }

    .nav-tab svg {
        width: 18px;
        height: 18px;
    }

    /* Header right side buttons */
    header .flex.items-center.gap-4 {
        border-left: none !important;
        padding-left: 0 !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Main content padding */
    main.max-w-7xl {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    /* Card padding */
    .card.p-8 {
        padding: 20px !important;
    }

    /* Form grid - stack on mobile */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Results header */
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .currency-toggle {
        align-self: center;
    }

    /* Results container - already handled at 1024px but reinforce */
    .results-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Chart panel */
    .chart-panel {
        padding: 20px;
        position: static !important;
    }

    .chart-total-amount {
        font-size: 28px;
    }

    .chart-wrapper {
        max-width: 200px;
    }

    /* Chart actions - stack on small screens */
    .chart-actions {
        flex-direction: column;
    }

    .chart-action-btn {
        width: 100%;
    }

    /* Assignment summary card */
    .assignment-summary-card {
        padding: 16px 20px;
    }

    /* Breakdown groups */
    .breakdown-header {
        padding: 14px 16px;
    }

    .breakdown-details {
        padding: 0 16px 14px;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
    }

    /* Form button alignment */
    .mt-10.flex.justify-end {
        justify-content: stretch;
    }

    .mt-10.flex.justify-end .btn-primary {
        width: 100%;
    }

    /* Tab buttons */
    .flex.border-b-2 {
        flex-direction: row;
        width: 100%;
    }

    .flex.border-b-2 button {
        flex: 1;
        text-align: center;
        padding: 12px 8px;
        font-size: 13px;
    }

    /* Section title and tab header */
    .card .flex.items-center.justify-between.mb-8 {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    /* Breakdown table - make scrollable */
    .card.overflow-hidden {
        overflow-x: auto;
    }

    .breakdown-table td,
    .breakdown-table th {
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Export buttons */
    .mt-12.flex.justify-end.gap-4 {
        flex-direction: column;
    }

    .mt-12.flex.justify-end.gap-4 .btn-secondary {
        width: 100%;
    }

    /* Alert banner */
    .alert-banner {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* View toggle */
    .view-toggle {
        width: 100%;
    }

    .view-toggle button {
        flex: 1;
        padding: 10px 8px;
        font-size: 12px;
    }

    /* Result cards grid */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .result-card-light {
        padding: 14px;
    }

    .result-card-light p.text-xl {
        font-size: 18px;
    }

    /* Drop zone */
    .drop-zone {
        padding: 32px 20px;
    }

    .drop-zone svg {
        width: 48px;
        height: 48px;
    }

    .drop-zone p.text-lg {
        font-size: 16px;
    }

    /* Hero total card */
    .hero-total-card {
        padding: 20px;
    }

    .hero-total-amount {
        font-size: 32px;
    }

    /* Legend wrapping */
    .cost-breakdown-legend {
        gap: 12px;
    }

    .legend-item {
        font-size: 12px;
    }

    /* Tooltip - position below on mobile */
    .tooltip-content {
        bottom: auto;
        top: 100%;
        margin-top: 4px;
        margin-bottom: 0;
        max-width: 250px;
        white-space: normal;
        text-align: left;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    /* Even smaller padding */
    header .max-w-7xl {
        padding: 12px;
    }

    main.max-w-7xl {
        padding: 12px;
    }

    .card.p-8 {
        padding: 16px !important;
    }

    /* Logo sizing */
    .logo-container img {
        height: 36px !important;
    }

    /* Title sizing */
    header h1 {
        font-size: 16px !important;
    }

    header p.text-\\[13px\\] {
        font-size: 11px !important;
    }

    /* Hide nav tab text on very small screens */
    .nav-tab span:not(.nav-tab svg) {
        display: none;
    }

    /* Smaller chart */
    .chart-wrapper {
        max-width: 160px;
    }

    .chart-total-amount {
        font-size: 24px;
    }

    .chart-center-value {
        font-size: 14px;
    }

    /* Result cards - single column */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* Breakdown values */
    .breakdown-value {
        font-size: 14px;
    }

    .breakdown-label {
        font-size: 14px;
    }

    /* Legend - 2 columns on very small */
    .chart-legend {
        gap: 8px;
    }

    .chart-legend-item {
        font-size: 12px;
    }

    /* Input fields */
    .input-field {
        padding: 12px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    select.input-field {
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Buttons larger touch targets */
    .btn-primary,
    .btn-secondary {
        padding: 14px 16px;
        min-height: 48px;
    }

    /* Workings/assumptions toggles */
    .mt-10.space-y-6 button {
        font-size: 13px;
    }

    /* Staffing section */
    #section-staffing .card {
        padding: 32px 20px !important;
    }

    #section-staffing h2 {
        font-size: 20px;
    }

    #section-staffing p {
        font-size: 14px;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Prevent input zoom on iOS */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Better touch scrolling */
    .breakdown-table {
        -webkit-overflow-scrolling: touch;
    }
}

/* Safe area insets for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 896px) and (orientation: landscape) {
    header .flex.items-center.justify-between {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .chart-wrapper {
        max-width: 150px;
    }

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

/* Additional mobile refinements */
@media (max-width: 768px) {
    /* Results container - use flexbox on mobile for better ordering */
    .results-container {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    /* Chart panel sticky positioning disabled on mobile */
    .results-right-column {
        position: static !important;
    }

    /* Chart centered on mobile */
    .chart-wrapper {
        margin-left: auto;
        margin-right: auto;
    }

    /* Summary card compact */
    .summary-card-title {
        font-size: 13px;
    }

    .summary-row {
        padding: 8px 0;
    }

    .summary-label,
    .summary-value {
        font-size: 13px;
    }

    /* Breakdown groups compact */
    .breakdown-groups {
        gap: 8px;
    }

    .breakdown-group {
        border-radius: 10px;
    }

    /* Detail rows in breakdown */
    .detail-row {
        padding: 6px 0;
    }

    .detail-label,
    .detail-value {
        font-size: 12px;
    }

    /* Ensure touch-friendly tap targets */
    .breakdown-header {
        min-height: 48px;
        cursor: pointer;
    }

    /* Form labels */
    .form-label {
        font-size: 12px;
    }

    /* Currency toggle */
    .currency-toggle {
        padding: 3px;
    }

    .currency-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Very small screens - further refinements */
@media (max-width: 360px) {
    .chart-total-amount {
        font-size: 22px !important;
    }

    .chart-wrapper {
        max-width: 140px !important;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 13px;
        padding: 12px 14px;
    }

    .nav-tab {
        padding: 8px 10px;
    }

    .nav-tab svg {
        width: 16px;
        height: 16px;
    }
}

/* ===== VOICE COMMANDS UI ===== */

/* Voice button */
.voice-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-btn:hover {
    background: #f3f4f6;
}

.voice-btn.listening {
    background: #fef2f2;
    color: #dc2626;
    animation: voicePulse 1s infinite;
}

.voice-btn .mic-icon {
    font-size: 1rem;
}

/* TTS Status indicator */
.tts-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tts-status.loading {
    color: #f59e0b;
}

.tts-status.ready {
    color: #10b981;
}

.tts-status.error {
    color: #dc2626;
}

.tts-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #f59e0b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Voice feedback toast */
.voice-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--cozm-dark-indigo);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
}

.voice-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Voice controls container */
.voice-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile voice button listening state */
#voiceBtnMobile.listening {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
    animation: voicePulse 1s infinite;
}

/* Mobile adjustments for voice UI */
@media (max-width: 768px) {
    .voice-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Keep voice button text visible on mobile for better UX */
    .voice-btn span:not(.mic-icon) {
        display: inline; /* Changed from 'none' to keep text visible */
        font-size: 0.75rem;
    }

    .tts-status {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Keep TTS status text visible on mobile */
    .tts-status span:not(.tts-spinner):last-child {
        display: inline; /* Changed from 'none' to keep text visible */
    }

    .voice-toast {
        font-size: 0.8rem;
        padding: 10px 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .voice-controls {
        flex-direction: column;
        gap: 4px;
    }

    .voice-btn,
    .tts-status {
        width: 100%;
        justify-content: center;
    }
}

/* Voice Chat Panel */
.voice-chat-panel {
    position: fixed;
    right: 20px;
    top: 100px;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    border: 1px solid #e5e7eb;
}

.voice-chat-panel.hidden {
    display: none;
}

.voice-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #181C31;
    color: white;
    border-radius: 12px 12px 0 0;
}

.voice-chat-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.voice-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
}

.voice-chat-close:hover {
    opacity: 1;
}

.voice-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-chat-empty {
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

.voice-chat-message {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 85%;
}

.voice-chat-message.user {
    background: #f3f4f6;
    color: #374151;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.voice-chat-message.assistant {
    background: var(--cozm-light-teal);
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.voice-chat-message.system {
    background: #EDF5FF;
    color: #181C31;
    font-size: 0.75rem;
    align-self: center;
    max-width: 100%;
}

.voice-chat-message.function {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-family: monospace;
    align-self: center;
    max-width: 100%;
}

/* Sentiment display styles */
.voice-chat-sentiment {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 4px;
    align-self: flex-end;
    max-width: fit-content;
}

.voice-chat-sentiment .sentiment-label {
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.voice-chat-sentiment .sentiment-score {
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.voice-chat-sentiment .sentiment-topic {
    opacity: 0.6;
    font-size: 0.65rem;
}

/* Sentiment color coding based on score */
.voice-chat-sentiment.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.voice-chat-sentiment.neutral {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.voice-chat-sentiment.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Sentiment score bar (optional visual) */
.sentiment-bar {
    width: 40px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.sentiment-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sentiment-bar-fill.positive {
    background: #10b981;
}

.sentiment-bar-fill.neutral {
    background: #6b7280;
}

.sentiment-bar-fill.negative {
    background: #ef4444;
}

@media (max-width: 768px) {
    .voice-chat-panel {
        right: 10px;
        left: 10px;
        width: auto;
        top: 80px;
        max-height: 400px;
    }
}

/* ===== ANALYTICS DASHBOARD CHARTS ===== */

.analytics-chart-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s ease;
}

.analytics-chart-card:hover {
    box-shadow: var(--shadow-card);
}

.analytics-chart-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.analytics-chart-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.analytics-chart-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.analytics-bar-container {
    position: relative;
    width: 100%;
    height: 280px;
}

.analytics-map-card {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2d3548;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#analytics-map {
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
}

/* Chart hover effects */
.analytics-chart-card canvas {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .analytics-chart-container {
        max-width: 220px;
    }

    .analytics-bar-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .analytics-chart-card {
        padding: 16px;
    }

    .analytics-chart-container {
        max-width: 200px;
    }

    .analytics-bar-container {
        height: 220px;
    }

    #analytics-map {
        height: 280px;
    }

    .analytics-map-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .analytics-chart-container {
        max-width: 180px;
    }

    .analytics-bar-container {
        height: 200px;
    }

    #analytics-map {
        height: 250px;
    }
}

/* ===== STAFFING ENGINE - BRAND COLOURS ===== */

/* Risk Badges */
.risk-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
}

.risk-badge.critical {
    background-color: rgba(189, 64, 64, 0.1);
    color: var(--cozm-red);
    font-weight: 700;
}

.risk-badge.warning {
    background-color: rgba(189, 137, 65, 0.1);
    color: var(--cozm-gold);
}

.risk-badge.note {
    background-color: rgba(64, 174, 188, 0.1);
    color: var(--cozm-teal);
}

/* Skills Match Badges */
.skills-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.skills-badge.full-match {
    background-color: rgba(64, 174, 188, 0.15);
    color: var(--cozm-teal);
}

.skills-badge.partial-match {
    background-color: rgba(189, 137, 65, 0.15);
    color: var(--cozm-gold);
}

.skills-badge.low-match {
    background-color: rgba(189, 64, 64, 0.1);
    color: var(--cozm-red);
}

.skills-badge.no-match {
    background-color: var(--cozm-light-gray);
    color: var(--cozm-light-sky-blue);
}

/* Compliance Score Bar */
.compliance-bar {
    height: 8px;
    background-color: var(--cozm-light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.compliance-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.compliance-bar-fill.high {
    background: var(--cozm-teal);
}

.compliance-bar-fill.medium {
    background: var(--cozm-gold);
}

.compliance-bar-fill.low {
    background: var(--cozm-red);
}

/* Score Progress Bar - Staffing Engine */
.score-bar {
    height: 10px;
    background-color: var(--cozm-light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--gradient-dark);
    border-radius: 5px;
    transition: width 0.4s ease-out;
}

/* Visa Type Badge */
.visa-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.visa-badge.in-country {
    background-color: rgba(64, 174, 188, 0.15);
    color: var(--cozm-teal);
}

.visa-badge.processing {
    background-color: rgba(189, 137, 65, 0.15);
    color: var(--cozm-gold);
}

/* Carbon Footprint Indicator */
.carbon-indicator {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.carbon-indicator.low {
    color: var(--cozm-teal);
}

.carbon-indicator.medium {
    color: var(--cozm-gold);
}

.carbon-indicator.high {
    color: var(--cozm-red);
}

/* ===== OPTIMISATION PRESET CARDS ===== */

.optimization-presets {
    background: var(--cozm-pastel-blue);
    border: 1px solid var(--cozm-light-gray);
    border-radius: 12px;
    padding: 1.25rem;
}

.optimization-presets-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cozm-dark-indigo);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.preset-card {
    background: white;
    border: 2px solid var(--cozm-light-gray);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preset-card:hover {
    border-color: var(--cozm-teal);
    background-color: rgba(64, 174, 188, 0.03);
}

.preset-card.selected {
    border-color: var(--cozm-teal);
    background: var(--gradient-light);
    box-shadow: 0 4px 12px rgba(64, 174, 188, 0.15);
}

.preset-card.selected .preset-icon {
    transform: scale(1.1);
}

.preset-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--cozm-light-sky-blue);
}

.preset-card.selected .preset-icon {
    color: var(--cozm-teal);
}

.preset-card:hover .preset-icon {
    color: var(--cozm-teal);
}

.preset-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cozm-dark-indigo);
}

.preset-desc {
    font-size: 0.7rem;
    color: var(--cozm-light-sky-blue);
    line-height: 1.3;
}

/* Mobile responsive for preset cards */
@media (max-width: 640px) {
    .preset-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .preset-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 0.75rem 1rem;
        gap: 12px;
    }

    .preset-icon {
        font-size: 1.25rem;
    }

    .preset-card-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
}
