/* F26 Strategy Tab Styles - Matches Dickies Dashboard Dark Theme */

/* ===== CSS Variables ===== */
:root {
    --f26-bg-primary: #0F172A;
    --f26-bg-surface: #1E293B;
    --f26-bg-surface-alt: #334155;
    --f26-text-primary: #E2E8F0;
    --f26-text-secondary: #94A3B8;
    --f26-text-muted: #64748B;
    --f26-border: #334155;
    
    /* Action colors */
    --f26-exit: #EF4444;
    --f26-exit-bg: rgba(239, 68, 68, 0.15);
    --f26-expand: #3B82F6;
    --f26-expand-bg: rgba(59, 130, 246, 0.15);
    --f26-add: #22C55E;
    --f26-add-bg: rgba(34, 197, 94, 0.15);
    --f26-gain: #F59E0B;
    --f26-gain-bg: rgba(245, 158, 11, 0.15);
    
    /* Trait colors */
    --f26-core: #3B82F6;
    --f26-urban: #A855F7;
    --f26-rural: #22C55E;
    --f26-lv: #F59E0B;
    
    /* Product colors */
    --f26-874perf: #06B6D4;
    --f26-loosefit: #8B5CF6;
    --f26-duck: #8B4513;
    --f26-flex874: #2563EB;
    --f26-highvis: #EAB308;
}

/* ===== F26 Tab Container ===== */
#f26-strategy-tab {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--f26-bg-primary);
    color: var(--f26-text-primary);
    padding: 24px;
    min-height: 100vh;
}

.f26-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Hero Section ===== */
.f26-hero {
    background: linear-gradient(135deg, var(--f26-bg-surface), var(--f26-bg-primary));
    border: 2px solid var(--f26-gain);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.f26-hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--f26-text-primary);
}

.f26-hero-subtitle {
    font-size: 20px;
    color: var(--f26-gain);
    margin-bottom: 24px;
}

/* Flow Diagram */
.f26-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.f26-flow-card {
    background: var(--f26-bg-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 140px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.f26-flow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.f26-flow-card.exit { border-color: var(--f26-exit); }
.f26-flow-card.expand { border-color: var(--f26-expand); }
.f26-flow-card.add { border-color: var(--f26-add); }
.f26-flow-card.gain { border-color: var(--f26-gain); background: var(--f26-gain-bg); }

.f26-flow-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.f26-flow-card.exit .f26-flow-label { color: var(--f26-exit); }
.f26-flow-card.expand .f26-flow-label { color: var(--f26-expand); }
.f26-flow-card.add .f26-flow-label { color: var(--f26-add); }
.f26-flow-card.gain .f26-flow-label { color: var(--f26-gain); }

.f26-flow-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.f26-flow-card.exit .f26-flow-value { color: var(--f26-exit); }
.f26-flow-card.expand .f26-flow-value { color: var(--f26-expand); }
.f26-flow-card.add .f26-flow-value { color: var(--f26-add); }
.f26-flow-card.gain .f26-flow-value { color: var(--f26-gain); }

.f26-flow-sub {
    font-size: 12px;
    color: var(--f26-text-secondary);
}

.f26-flow-arrow {
    font-size: 28px;
    color: var(--f26-text-muted);
}

.f26-hero-metrics {
    font-size: 14px;
    color: var(--f26-text-secondary);
    margin-top: 16px;
}

/* ===== Section Styles ===== */
.f26-section {
    background: var(--f26-bg-surface);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

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

.f26-section-header.exit { background: var(--f26-exit-bg); border-left: 4px solid var(--f26-exit); }
.f26-section-header.expand { background: var(--f26-expand-bg); border-left: 4px solid var(--f26-expand); }
.f26-section-header.add { background: var(--f26-add-bg); border-left: 4px solid var(--f26-add); }

.f26-section-title {
    font-size: 20px;
    font-weight: 700;
}

.f26-section-header.exit .f26-section-title { color: var(--f26-exit); }
.f26-section-header.expand .f26-section-title { color: var(--f26-expand); }
.f26-section-header.add .f26-section-title { color: var(--f26-add); }

.f26-section-subtitle {
    font-size: 14px;
    color: var(--f26-text-secondary);
    margin-top: 4px;
}

.f26-section-value {
    font-size: 24px;
    font-weight: 700;
}

.f26-section-header.exit .f26-section-value { color: var(--f26-exit); }
.f26-section-header.expand .f26-section-value { color: var(--f26-expand); }
.f26-section-header.add .f26-section-value { color: var(--f26-add); }

.f26-section-body {
    padding: 24px;
}

/* ===== Exit Cards ===== */
.f26-exit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.f26-exit-card {
    background: var(--f26-bg-primary);
    border: 1px solid var(--f26-exit);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.f26-exit-card:hover {
    transform: translateY(-2px);
}

.f26-exit-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--f26-exit);
    margin-bottom: 12px;
}

.f26-exit-card-pct {
    font-size: 28px;
    font-weight: 700;
    color: var(--f26-text-primary);
}

.f26-exit-card-label {
    font-size: 12px;
    color: var(--f26-text-secondary);
    margin-bottom: 8px;
}

.f26-exit-card-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--f26-exit);
}

/* ===== Timeline ===== */
.f26-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--f26-bg-primary);
    border-radius: 8px;
    flex-wrap: wrap;
}

.f26-timeline-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.f26-timeline-badge {
    background: var(--f26-exit);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.f26-timeline-arrow {
    color: var(--f26-text-muted);
    font-size: 18px;
}

/* ===== Product Cards (Expand & Newness) ===== */
.f26-product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.f26-product-card {
    background: var(--f26-bg-primary);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid var(--f26-expand);
    transition: transform 0.2s;
}

.f26-product-card:hover {
    transform: translateY(-2px);
}

.f26-product-card.duck { border-color: var(--f26-duck); }
.f26-product-card.flex874 { border-color: var(--f26-flex874); }
.f26-product-card.highvis { border-color: var(--f26-highvis); }
.f26-product-card.perf874 { border-color: var(--f26-874perf); }
.f26-product-card.loosefit { border-color: var(--f26-loosefit); }

.f26-product-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.f26-product-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.f26-product-card.duck .f26-product-dot { background: var(--f26-duck); }
.f26-product-card.flex874 .f26-product-dot { background: var(--f26-flex874); }
.f26-product-card.highvis .f26-product-dot { background: var(--f26-highvis); }
.f26-product-card.perf874 .f26-product-dot { background: var(--f26-874perf); }
.f26-product-card.loosefit .f26-product-dot { background: var(--f26-loosefit); }

.f26-product-velocity {
    font-size: 24px;
    font-weight: 700;
    color: var(--f26-expand);
    margin: 12px 0;
}

.f26-product-action {
    font-size: 14px;
    color: var(--f26-text-secondary);
    padding: 12px;
    background: var(--f26-bg-surface);
    border-radius: 8px;
    margin-top: 12px;
}

.f26-product-retail {
    font-size: 14px;
    color: var(--f26-text-secondary);
    margin-bottom: 16px;
}

.f26-product-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.f26-product-stat-value {
    font-size: 28px;
    font-weight: 700;
}

.f26-product-card.perf874 .f26-product-stat-value { color: var(--f26-874perf); }
.f26-product-card.loosefit .f26-product-stat-value { color: var(--f26-loosefit); }

.f26-product-stat-label {
    font-size: 12px;
    color: var(--f26-text-secondary);
}

.f26-product-target {
    font-size: 13px;
    color: var(--f26-text-secondary);
}

.f26-product-target strong {
    color: var(--f26-text-primary);
}

.f26-product-priority {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.f26-trait-breakdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--f26-border);
    flex-wrap: wrap;
}

.f26-trait-item {
    font-size: 13px;
    color: var(--f26-text-secondary);
}

.f26-trait-item strong {
    color: var(--f26-text-primary);
}

/* ===== Ike Jacket Note ===== */
.f26-ike-note {
    background: var(--f26-bg-primary);
    border: 1px dashed var(--f26-border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}

.f26-ike-note h4 {
    font-size: 14px;
    color: var(--f26-gain);
    margin-bottom: 8px;
}

.f26-ike-note p {
    font-size: 13px;
    color: var(--f26-text-secondary);
    margin: 0;
}

/* ===== Financial Impact Section ===== */
.f26-financial-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.f26-trait-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.f26-trait-card {
    background: var(--f26-bg-primary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.f26-trait-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.f26-trait-card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.f26-trait-card.core .f26-trait-card-header { background: rgba(59, 130, 246, 0.15); }
.f26-trait-card.urban .f26-trait-card-header { background: rgba(168, 85, 247, 0.15); }
.f26-trait-card.rural .f26-trait-card-header { background: rgba(34, 197, 94, 0.15); }
.f26-trait-card.lv .f26-trait-card-header { background: rgba(245, 158, 11, 0.15); }

.f26-trait-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.f26-trait-card.core .f26-trait-badge { background: var(--f26-core); }
.f26-trait-card.urban .f26-trait-badge { background: var(--f26-urban); }
.f26-trait-card.rural .f26-trait-badge { background: var(--f26-rural); }
.f26-trait-card.lv .f26-trait-badge { background: var(--f26-lv); }

.f26-trait-stores {
    font-size: 13px;
    color: var(--f26-text-secondary);
}

.f26-trait-card-body {
    padding: 20px;
}

.f26-trait-flow-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.f26-trait-flow-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--f26-bg-surface);
    border-radius: 8px;
}

.f26-trait-flow-label {
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.f26-trait-flow-value {
    font-size: 20px;
    font-weight: 700;
}

/* Financial row in trait card */
.f26-trait-financial-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--f26-border);
}

.f26-trait-fin-item {
    text-align: center;
    padding: 8px 4px;
}

.f26-trait-fin-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--f26-text-muted);
    margin-bottom: 4px;
}

.f26-trait-fin-value {
    font-size: 16px;
    font-weight: 700;
}

/* Newness row in trait card */
.f26-trait-newness {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--f26-border);
}

.f26-trait-newness-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--f26-bg-surface);
    border-radius: 6px;
    margin-bottom: 8px;
}

.f26-trait-newness-item:last-child {
    margin-bottom: 0;
}

.f26-trait-newness-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.f26-trait-newness-stats {
    font-size: 12px;
    color: var(--f26-text-secondary);
}

.f26-trait-newness-stats strong {
    color: var(--f26-text-primary);
}

.f26-no-newness {
    text-align: center;
    padding: 16px;
    background: var(--f26-bg-surface);
    border-radius: 8px;
    color: var(--f26-text-muted);
    font-size: 13px;
}

/* ===== Planogram Section ===== */
.f26-planogram-container {
    margin-bottom: 24px;
}

.f26-planogram-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.f26-planogram-selector select {
    background: var(--f26-bg-primary);
    color: var(--f26-text-primary);
    border: 1px solid var(--f26-border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
}

.f26-planogram-selector select:focus {
    outline: none;
    border-color: var(--f26-expand);
}

.f26-planogram-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .f26-planogram-grid {
        grid-template-columns: 1fr;
    }
}

.f26-planogram-panel {
    background: var(--f26-bg-primary);
    border-radius: 12px;
    padding: 20px;
}

.f26-planogram-panel.before {
    border: 2px solid var(--f26-exit);
}

.f26-planogram-panel.after {
    border: 2px solid var(--f26-add);
}

.f26-planogram-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.f26-planogram-panel.before .f26-planogram-title { color: var(--f26-exit); }
.f26-planogram-panel.after .f26-planogram-title { color: var(--f26-add); }

.f26-planogram-subtitle {
    font-size: 12px;
    color: var(--f26-text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

.f26-shelf-grid {
    display: grid;
    gap: 4px;
}

.f26-shelf-row {
    display: grid;
    gap: 4px;
}

.f26-position {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.f26-position:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 10;
}

/* Position status styles */
.f26-position.keep { background: var(--f26-bg-surface); border: 1px solid var(--f26-border); }
.f26-position.exit { background: var(--f26-exit-bg); border: 2px solid var(--f26-exit); opacity: 0.7; }
.f26-position.expand { background: var(--f26-expand-bg); border: 2px solid var(--f26-expand); box-shadow: 0 0 8px var(--f26-expand); }
.f26-position.add { background: var(--f26-add-bg); border: 2px solid var(--f26-add); box-shadow: 0 0 8px var(--f26-add); }

/* Product color overlays */
.f26-position.duck { background: rgba(139, 69, 19, 0.4); }
.f26-position.flex874 { background: rgba(37, 99, 235, 0.4); }
.f26-position.highvis { background: rgba(234, 179, 8, 0.4); }
.f26-position.cargo { background: rgba(22, 163, 74, 0.4); }
.f26-position.bibs { background: rgba(31, 41, 55, 0.6); }
.f26-position.perf874 { background: rgba(6, 182, 212, 0.4); }
.f26-position.loosefit { background: rgba(139, 92, 246, 0.4); }

.f26-planogram-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.f26-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--f26-text-secondary);
}

.f26-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.f26-legend-dot.exit { background: var(--f26-exit); }
.f26-legend-dot.expand { background: var(--f26-expand); }
.f26-legend-dot.add { background: var(--f26-add); }
.f26-legend-dot.duck { background: var(--f26-duck); }
.f26-legend-dot.flex874 { background: var(--f26-flex874); }
.f26-legend-dot.highvis { background: var(--f26-highvis); }

/* ===== Execution Detail Table ===== */
.f26-table-container {
    overflow-x: auto;
}

.f26-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.f26-table th {
    background: var(--f26-bg-primary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--f26-text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--f26-border);
    cursor: pointer;
    user-select: none;
}

.f26-table th:hover {
    color: var(--f26-text-primary);
}

.f26-table th.sorted-asc::after { content: ' ▲'; }
.f26-table th.sorted-desc::after { content: ' ▼'; }

.f26-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--f26-border);
}

.f26-table tr:hover {
    background: var(--f26-bg-surface-alt);
}

.f26-table .text-center { text-align: center; }
.f26-table .text-right { text-align: right; }

.f26-table .exit-val { color: var(--f26-exit); }
.f26-table .expand-val { color: var(--f26-expand); }
.f26-table .perf-val { color: var(--f26-874perf); }
.f26-table .loose-val { color: var(--f26-loosefit); }
.f26-table .gain-val { color: var(--f26-add); }

/* Trait filter buttons */
.f26-trait-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.f26-trait-filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--f26-border);
    background: var(--f26-bg-primary);
    color: var(--f26-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.f26-trait-filter-btn:hover {
    border-color: var(--f26-text-secondary);
}

.f26-trait-filter-btn.active {
    background: var(--f26-expand);
    border-color: var(--f26-expand);
    color: white;
}

.f26-trait-filter-btn.active.core { background: var(--f26-core); border-color: var(--f26-core); }
.f26-trait-filter-btn.active.urban { background: var(--f26-urban); border-color: var(--f26-urban); }
.f26-trait-filter-btn.active.rural { background: var(--f26-rural); border-color: var(--f26-rural); }
.f26-trait-filter-btn.active.lv { background: var(--f26-lv); border-color: var(--f26-lv); }

/* ===== Export Buttons ===== */
.f26-export-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.f26-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.f26-btn-primary:hover {
    background: #2563EB;
}

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

.f26-btn-secondary:hover {
    background: var(--f26-bg-surface-alt);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #f26-strategy-tab {
        padding: 16px;
    }
    
    .f26-hero {
        padding: 20px;
    }
    
    .f26-hero-title {
        font-size: 24px;
    }
    
    .f26-flow-card {
        min-width: 100px;
        padding: 12px 16px;
    }
    
    .f26-flow-value {
        font-size: 24px;
    }
    
    .f26-exit-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .f26-product-cards {
        grid-template-columns: 1fr;
    }
    
    .f26-trait-cards {
        grid-template-columns: 1fr;
    }
}
