/* ==========================================================================
   EU Cosmetic Market Entry Decision - Customer Self-Service Web App (V0.1)
   Responsive, Clean, Professional & Print-Optimized Stylesheet
   ========================================================================== */

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;

    --brand-navy: #0f2744;
    --brand-blue: #1e40af;
    --brand-blue-hover: #1d4ed8;

    --status-critical-bg: #fee2e2;
    --status-critical-text: #991b1b;
    --status-critical-border: #ef4444;

    --status-not-ready-bg: #fef3c7;
    --status-not-ready-text: #92400e;
    --status-not-ready-border: #f59e0b;

    --status-ready-bg: #dcfce7;
    --status-ready-text: #166534;
    --status-ready-border: #22c55e;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    padding: 24px 16px;
}

.app-layout {
    max-width: 960px;
    margin: 0 auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
    background: linear-gradient(135deg, #0a192f 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.brand-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-system {
    background-color: #3b82f6;
    color: #ffffff;
}

.badge-version {
    background-color: #10b981;
    color: #ffffff;
}

.badge-official {
    background-color: #0f172a;
    color: #ffffff;
    border: 1px solid #334155;
}

.badge-demo {
    background-color: #f59e0b;
    color: #000000;
    font-weight: 800;
}

.app-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.header-tagline {
    font-size: 1.05rem;
    color: #93c5fd;
    font-weight: 500;
    margin-bottom: 16px;
}

.disclaimer-banner {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.disclaimer-header {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   CUSTOMER PRIVACY NOTICE & FIELD CALLOUTS
   ========================================================================== */
.privacy-banner {
    margin-top: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 8px;
    overflow: hidden;
}

.privacy-details {
    width: 100%;
}

.privacy-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #e2e8f0;
    user-select: none;
    list-style: none;
    transition: background 0.15s ease;
}

.privacy-summary::-webkit-details-marker {
    display: none;
}

.privacy-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.privacy-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.privacy-summary-teaser {
    color: #a7f3d0;
    font-size: 0.82rem;
}

.privacy-toggle-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #6ee7b7;
    white-space: nowrap;
}

.privacy-toggle-badge::after {
    content: "Açıklamayı Oku ▾";
}

.privacy-details[open] .privacy-toggle-badge::after {
    content: "Kapat ▴";
}

.privacy-body {
    padding: 14px 18px;
    background: rgba(10, 25, 47, 0.6);
    border-top: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 0.85rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.privacy-body h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.privacy-body p {
    margin-bottom: 8px;
}

.privacy-highlight-box {
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.12);
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    color: #fef3c7;
    font-size: 0.82rem;
}

.privacy-legal-disclaimer {
    display: block;
    margin-top: 10px;
    font-size: 0.74rem;
    color: #94a3b8;
    font-style: italic;
}

/* Field-level privacy hints */
.field-privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 4px;
    padding: 6px 10px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #166534;
    line-height: 1.4;
}

.field-privacy-notice strong {
    color: #14532d;
}

/* ==========================================================================
   DEMO & ACTION SELECTION BAR
   ========================================================================== */
.action-selection-bar {
    margin-bottom: 24px;
}

.bar-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.bar-info h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.bar-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   WIZARD STEPPER
   ========================================================================== */
.wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 600;
}

.step-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

.step-item.active {
    color: var(--brand-blue);
}

.step-item.active .step-circle {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
}

.step-item.completed {
    color: #059669;
}

.step-item.completed .step-circle {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

.step-divider {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 12px;
}

/* ==========================================================================
   PANELS & FORMS
   ========================================================================== */
.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
}

.panel-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.panel-badge {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.panel-instruction {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.req {
    color: #dc2626;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.92rem;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-top: 4px;
}

.conditional-alert-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.conditional-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
}

.conditional-desc {
    font-size: 0.85rem;
    color: #78350f;
    margin-bottom: 12px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #1e293b;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-demo {
    background-color: #f59e0b;
    color: #000000;
}

.btn-demo:hover {
    background-color: #d97706;
}

.btn-action {
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid var(--border-color);
}

.btn-action:hover {
    background-color: #f1f5f9;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.step-navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================================================
   V1 RESULT SCREEN
   ========================================================================== */
.v1-signal-box {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.v1-signal-box.strong {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #22c55e;
}

.v1-signal-box.borderline {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
}

.v1-signal-box.weak {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 5px solid #ef4444;
}

.v1-signal-heading {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.v1-signal-box.strong .v1-signal-heading { color: #166534; }
.v1-signal-box.borderline .v1-signal-heading { color: #92400e; }
.v1-signal-box.weak .v1-signal-heading { color: #991b1b; }

.v1-reasons-list {
    margin-left: 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
}

.v1-open-point {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

/* ==========================================================================
   P01 DECISION CARD (FINAL RESULT)
   ========================================================================== */
.card-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    padding: 12px 18px;
    margin-bottom: 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toolbar-right {
    display: flex;
    gap: 8px;
}

.decision-card-wrapper {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.demo-watermark {
    position: absolute;
    top: 15px;
    right: -30px;
    background: #f59e0b;
    color: #000000;
    font-weight: 900;
    font-size: 0.72rem;
    padding: 4px 35px;
    transform: rotate(45deg);
    letter-spacing: 0.08em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.p01-card-table {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.p01-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    align-items: baseline;
}

.p01-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.p01-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.p01-val {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-main);
}

.p01-val.route {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
}

.p01-val.action {
    font-size: 1.15rem;
    font-weight: 800;
    color: #047857;
}

.status-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 2px solid transparent;
}

.status-pill.critical {
    background-color: var(--status-critical-bg);
    color: var(--status-critical-text);
    border-color: var(--status-critical-border);
}

.status-pill.not-ready {
    background-color: var(--status-not-ready-bg);
    color: var(--status-not-ready-text);
    border-color: var(--status-not-ready-border);
}

.status-pill.ready-prep {
    background-color: var(--status-ready-bg);
    color: var(--status-ready-text);
    border-color: var(--status-ready-border);
}

.card-legal-footer {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-top: 20px;
    line-height: 1.45;
}

/* REJECTION CARD */
.rejection-panel {
    background: #fff1f2;
    border: 2px solid #e11d48;
    border-radius: 0 0 12px 12px;
    padding: 36px 24px;
    text-align: center;
}

.rejection-icon {
    font-size: 2.75rem;
    margin-bottom: 10px;
}

.rejection-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #9f1239;
    margin-bottom: 8px;
}

.rejection-reason {
    font-size: 1.05rem;
    font-weight: 600;
    color: #881337;
    margin-bottom: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.rejection-rule-box {
    background: #ffe4e6;
    border: 1px dashed #f43f5e;
    border-radius: 6px;
    padding: 10px 14px;
    display: inline-block;
    font-size: 0.85rem;
    color: #9f1239;
}

/* APP FOOTER */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   PRINT STYLESHEET (PDF & PAPER OPTIMIZED)
   ========================================================================== */
.print-only {
    display: none !important;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .app-layout {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .wizard-panel {
        display: none !important;
    }

    #panel-step-4 {
        display: block !important;
    }

    .print-official-header {
        border-bottom: 2px solid #000000;
        padding-bottom: 12px;
        margin-bottom: 24px;
    }

    .print-brand {
        font-size: 1.3rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #000000;
    }

    .print-meta {
        font-size: 0.85rem;
        color: #444444;
        margin-top: 4px;
    }

    .decision-card-wrapper {
        border: 2px solid #000000 !important;
        border-radius: 6px !important;
        padding: 24px !important;
        box-shadow: none !important;
    }

    .p01-row {
        border-bottom: 1px solid #cccccc !important;
        padding-bottom: 10px !important;
        gap: 12px !important;
    }

    .status-pill {
        border: 2px solid #000000 !important;
        color: #000000 !important;
        background: transparent !important;
        font-weight: 800 !important;
    }

    .card-legal-footer {
        background: #ffffff !important;
        border: 1px solid #aaaaaa !important;
        color: #333333 !important;
        font-size: 0.75rem !important;
        margin-top: 20px !important;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 680px) {
    body {
        padding: 12px 8px;
    }

    .app-header {
        padding: 20px 16px;
    }

    .panel-card {
        padding: 18px 14px;
    }

    .p01-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .p01-label {
        font-size: 0.75rem;
    }

    .bar-card {
        flex-direction: column;
        align-items: stretch;
    }

    .bar-buttons {
        flex-direction: column;
    }

    .wizard-stepper {
        padding: 10px 12px;
    }

    .step-text {
        display: none;
    }

    .privacy-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .privacy-toggle-badge {
        align-self: flex-end;
    }
}

/* ==========================================================================
   TWO-DOOR NAVIGATION & DOOR 2 STYLING
   ========================================================================== */
.door-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.door-tab {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.door-tab:hover {
    border-color: var(--brand-blue);
    background: #f8fafc;
}

.door-tab.active {
    border-color: var(--brand-blue);
    background: #eff6ff;
    box-shadow: var(--shadow-md);
}

.door-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.door-tab-text {
    display: flex;
    flex-direction: column;
}

.door-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.door-tab.active .door-title {
    color: var(--brand-blue);
}

.door-subtitle {
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-top: 2px;
}

/* Warnings and Banners */
.synthetic-warning-banner {
    background: #fffbeb;
    border-left: 5px solid #d97706;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.synthetic-warning-banner .warning-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #92400e;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.synthetic-warning-banner p {
    font-size: 0.86rem;
    color: #78350f;
    line-height: 1.45;
}

/* Action Grid */
.door2-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 20px 0;
}

.action-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}

.box-step {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 800;
    background: var(--brand-navy);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.action-box h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.action-box p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-grow: 1;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-outline:hover {
    background: #eff6ff;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--brand-blue);
    background-color: #f0f7ff;
}

.file-input-hidden {
    display: none;
}

.file-drop-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-icon {
    font-size: 2rem;
}

.file-name-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand-blue);
}

.file-hint-text {
    font-size: 0.75rem;
    color: var(--text-soft);
}

.door2-submit-area {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 10px;
}

/* Stat Cards */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-navy);
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.color-badge-group {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

/* 9-Column Table */
.table-responsive {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
    min-width: 1000px;
}

.portfolio-table th {
    background: #0f2744;
    color: #ffffff;
    padding: 10px 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.portfolio-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    line-height: 1.4;
}

.portfolio-table tbody tr:hover {
    background-color: #f8fafc;
    cursor: pointer;
}

/* Color Status Badges */
.status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-pill.badge-siyah {
    background: #111827;
    color: #ffffff;
}

.status-pill.badge-kirmizi {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.status-pill.badge-turuncu {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #f97316;
}

.status-pill.badge-sari {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #eab308;
}

.status-pill.badge-yesil {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}

.status-pill.badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    text-transform: none;
    white-space: normal;
    line-height: 1.3;
    padding: 4px 10px;
    font-size: 0.72rem;
    display: inline-block;
}

/* Table Legend */
.table-legend-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 16px;
}

.table-legend-box h4 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.table-legend-box ul {
    list-style-type: disc;
    padding-left: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
}

.modal-content {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 760px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.modal-header {
    background: var(--brand-navy);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
}

.btn-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 0.86rem;
    line-height: 1.5;
}

.modal-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.modal-section h5 {
    font-size: 0.88rem;
    color: var(--brand-navy);
    margin-bottom: 6px;
    font-weight: 700;
}

.tag-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tag-pill {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-subtitle {
    font-size: 0.82rem;
    color: var(--text-soft);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .door-nav {
        flex-direction: column;
    }
    .door2-action-grid {
        grid-template-columns: 1fr;
    }
    .door2-submit-area {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========================================================= */
/* P1 GÖRSEL VE TİCARİ SUNUM DÜZELTMELERİ */
/* ========================================================= */

/* 1. Global Hidden Utility */
.hidden {
    display: none !important;
}

/* 2. Alert Boxes */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 16px;
}
.alert-box.hidden {
    display: none !important;
}
.alert-box.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-box.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.alert-box.alert-info {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
}

/* 3. Portfolio Source & Audit Meta Header */
.portfolio-meta-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.portfolio-meta-header .meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
}
.badge-source-type {
    display: inline-block;
    background: #0284c7;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.meta-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-size: 0.82rem;
    color: #475569;
}
.meta-label {
    font-weight: 600;
    color: #64748b;
}
.meta-hash {
    font-family: monospace;
    font-size: 0.75rem;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    color: #334155;
    word-break: break-all;
}

/* 4. External Unmapped Records Card (Demo Context) */
.unmapped-info-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.unmapped-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.unmapped-icon {
    font-size: 1.25rem;
}
.unmapped-header-content strong {
    color: #166534;
    font-size: 0.92rem;
}
.unmapped-subtext {
    margin: 4px 0 10px 0;
    font-size: 0.82rem;
    color: #15803d;
    line-height: 1.45;
}
.unmapped-records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dcfce7;
}
.unmapped-records-table th {
    background: #dcfce7;
    color: #14532d;
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
}
.unmapped-records-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0fdf4;
    color: #334155;
}

/* 5. Desktop Results Table & Column Truncation (1366px / 1920px) */
.portfolio-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1100px;
}
.portfolio-table th:nth-child(1) { width: 9%; }   /* SKU */
.portfolio-table th:nth-child(2) { width: 14%; }  /* Ürün Adı */
.portfolio-table th:nth-child(3) { width: 8%; }   /* Alerjen */
.portfolio-table th:nth-child(4) { width: 14%; }  /* Kısıtlı Madde */
.portfolio-table th:nth-child(5) { width: 7%; }   /* Lot */
.portfolio-table th:nth-child(6) { width: 13%; }  /* Genel Tarama */
.portfolio-table th:nth-child(7) { width: 12%; }  /* Eksik Kanıt */
.portfolio-table th:nth-child(8) { width: 11%; }  /* Değerlendirilmeyen Bileşenler */
.portfolio-table th:nth-child(9) { width: 12%; }  /* Sonraki Kontrol */

.cell-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    font-size: 0.80rem;
}
.sub-disclaimer {
    font-size: 0.70rem;
    color: #991b1b;
    font-weight: 500;
    margin-top: 4px;
    line-height: 1.25;
}

/* 6. Mobile 390px Experience */
.table-scroll-hint {
    display: none;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 10px;
}
.hint-icon {
    font-size: 1rem;
    color: #0284c7;
}

@media (max-width: 768px) {
    .table-scroll-hint {
        display: flex;
    }
}

@media (max-width: 640px) {
    /* KPI Cards 2x2 Grid on Mobile (390px) */
    .summary-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .stat-card {
        padding: 12px 10px !important;
    }
    .stat-num {
        font-size: 1.5rem !important;
    }
    .stat-label {
        font-size: 0.72rem !important;
    }
    .color-badge-group {
        gap: 4px !important;
    }
    .color-badge-group .status-pill {
        font-size: 0.65rem !important;
        padding: 2px 5px !important;
    }
}
