:root {
    --primary: #fc8019;
    --primary-hover: #e26f0f;
    --primary-light: #fff3e9;
    --secondary: #2563eb;
    --secondary-light: #eff6ff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-dark: #047857;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-dark: #b91c1c;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-dark: #b45309;
    --purple: #8b5cf6;
    --purple-light: #f5f3ff;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-focus: #fc8019;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Back to Portal Button */
.btn-back-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-back-portal:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateX(-2px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    padding: 30px 16px;
    min-height: 100vh;
}

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

/* App Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    width: 46px;
    height: 46px;
    background: rgba(252, 128, 25, 0.2);
    border: 2px solid rgba(252, 128, 25, 0.6);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-title p {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.header-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.04em;
}

/* Search Card */
.search-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-wrapper {
    display: flex;
    gap: 12px;
    position: relative;
}

.input-group {
    position: relative;
    flex: 1;
}

.input-group svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    padding: 13px 16px 13px 44px;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.2s ease;
    background: #fff;
    color: var(--text-main);
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(252, 128, 25, 0.15);
}

input.valid {
    border-color: var(--success);
    background-color: var(--success-light);
}

input.invalid {
    border-color: var(--danger);
    background-color: var(--danger-light);
}

button.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 26px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: linear-gradient(135deg, #fc8019 0%, #eb6800 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(252, 128, 25, 0.3);
    transition: all 0.2s ease;
    min-width: 120px;
}

button.btn-search:hover:not(:disabled) {
    background: linear-gradient(135deg, #eb6800 0%, #d85900 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(252, 128, 25, 0.35);
}

button.btn-search:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.status-msg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-valid {
    color: var(--success-dark);
}

.status-invalid {
    color: var(--danger);
}

.error-msg {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--danger-light);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: var(--danger-dark);
    font-size: 13px;
    font-weight: 500;
    display: none;
}

.error-msg:not(:empty) {
    display: block;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }

@media (max-width: 900px) {
    .col-8, .col-7, .col-6, .col-5, .col-4 {
        grid-column: span 12;
    }
}

/* Base Card / Box */
.box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.box:hover {
    box-shadow: var(--shadow-md);
}

.box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

/* Stats Highlight Strip */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    /* margin-bottom: 20px; */
    margin-top: 24px;    /* Adds space from the card above */
    margin-bottom: 24px
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card.stat-purple::before { background: var(--purple); }
.stat-card.stat-blue::before { background: var(--secondary); }
.stat-card.stat-green::before { background: var(--success); }

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Key-Value Details */
.kv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
}

.kv-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kv-item.full-width {
    grid-column: span 2;
}

.kv-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kv-value {
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

/* Location Journey Connector */
.location-step {
    position: relative;
    padding-left: 32px;
    margin-bottom: 18px;
}

.location-step:last-child {
    margin-bottom: 0;
}

.location-step::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: -18px;
    width: 2px;
    background: #cbd5e1;
    border-left: 2px dashed #cbd5e1;
}

.location-step:last-child::before {
    display: none;
}

.step-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--border);
}

.step-pickup .step-icon {
    background: var(--success);
    color: white;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.step-drop .step-icon {
    background: var(--secondary);
    color: white;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.location-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.location-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.location-address {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* Product Item List */
.product-list-wrapper {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.product-name {
    font-weight: 600;
    color: var(--text-main);
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-qty {
    font-size: 12px;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.product-price {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
}

/* Leaflet Map */
#mapContainer {
    height: 380px;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    z-index: 1;
}

.map-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.legend-item strong {
    color: var(--text-main);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.custom-pin {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-yes {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid #fecaca;
}

.badge-no {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid #a7f3d0;
}

.pill-tag {
    background: #f1f5f9;
    color: #334155;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Alert Boxes */
.cancel-box {
    border-color: #fca5a5;
    background: #fffafa;
}

.cancel-box .box-title {
    color: var(--danger-dark);
    border-bottom-color: #fee2e2;
}

.delivery-box {
    border-color: #86efac;
    background: #f7fee7;
}

.delivery-box .box-title {
    color: var(--success-dark);
    border-bottom-color: #dcfce7;
}

.earnings-box {
    border-color: #86efac;
    background: #fcfffc;
}

.earnings-box .box-title {
    color: var(--success-dark);
    border-bottom-color: #e2fbe8;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

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

tbody tr:hover {
    background: #f8fafc;
}

.log-box {
    background: #eff6ff;
    border-left: 3px solid var(--secondary);
    padding: 6px 10px;
    margin-top: 4px;
    border-radius: 0 4px 4px 0;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: #1e40af;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

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


/* =========================================================
   EXECUTIVE OPS VERDICT CARD (ORANGE / WARNING CONTAINER)
   ========================================================= */

/* Base Card Container */
#ops-verdict-card.verdict-card,
.verdict-card {
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-md, 12px) !important;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.06)) !important;
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.2s ease-in-out;
}

/* Hide helper when d-none is present */
.d-none {
    display: none !important;
}

/* Card Header Bar */
#ops-verdict-card .card-header,
.verdict-card .card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
}

#ops-verdict-card .card-header .d-flex {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Terminal Status Typography */
#verdict-terminal-status {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
}

/* Card Body & 3-Column Layout */
#ops-verdict-card .card-body,
.verdict-card .card-body {
    padding: 20px 24px !important;
}

#ops-verdict-card .row,
.verdict-card .row {
    display: grid !important;
    grid-template-columns: 2.8fr 5fr 4.2fr !important; /* 3-column breakdown */
    gap: 24px !important;
    align-items: start;
    margin: 0 !important;
}

/* Vertical Divider Lines Between Columns */
#ops-verdict-card .border-end,
.verdict-card .border-end {
    border-right: 1px solid var(--border, #e2e8f0) !important;
    padding-right: 20px;
}

/* Column 1: Financial Attribution */
#verdict-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--text-main, #0f172a);
    margin-top: 8px !important;
    margin-bottom: 4px !important;
}

#verdict-subtitle {
    font-size: 12.5px !important;
    color: var(--text-muted, #64748b);
    line-height: 1.5 !important;
    word-break: break-word;
}

/* Column 2: Core Audit Evidence List */
#verdict-findings-list.list-unstyled,
.verdict-card ul.list-unstyled {
    list-style: none !important;
    padding-left: 0 !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#verdict-findings-list li {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #334155 !important;
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    padding: 8px 12px;
    border-radius: 6px;
}

/* Column 3: Ops Action Directive Box */
#verdict-action-box {
    margin-top: 8px !important;
    padding: 14px 16px !important;
    border-radius: var(--radius-sm, 8px) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
    border: 1px solid transparent;
}

/* =========================================================
   DYNAMIC COLOR STATES (WARNING / FRAUD / CLEAN)
   ========================================================= */

/* 1. WARNING ORDER / SDC RISK (The Orange Container) */
.verdict-card.warning-order,
#ops-verdict-card.warning-order {
    border-left: 6px solid #f59e0b !important;
    background-color: #fffdf5 !important;
}

.verdict-card.warning-order .card-header {
    background-color: #ffffff !important;
    border-bottom-color: #fef3c7 !important;
}

.verdict-card.warning-order #verdict-badge {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fcd34d !important;
    font-weight: 700;
}

.verdict-card.warning-order #verdict-sdc-pill {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
    font-weight: 700;
}

.verdict-card.warning-order #verdict-action-box {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}

.verdict-card.warning-order #verdict-findings-list li {
    background: #ffffff;
    border-color: #fef3c7;
}

/* 2. FRAUD FLAGGED (Red State) */
.verdict-card.fraud-flagged,
#ops-verdict-card.fraud-flagged {
    border-left: 6px solid #ef4444 !important;
    background-color: #fffafb !important;
}

.verdict-card.fraud-flagged #verdict-badge {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
}

.verdict-card.fraud-flagged #verdict-action-box {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

/* 3. CLEAN ORDER (Green State) */
.verdict-card.clean-order,
#ops-verdict-card.clean-order {
    border-left: 6px solid #10b981 !important;
    background-color: #f8faf9 !important;
}

.verdict-card.clean-order #verdict-badge {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.verdict-card.clean-order #verdict-action-box {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}

/* Responsive adjustment for screens <= 900px */
@media (max-width: 900px) {
    #ops-verdict-card .row,
    .verdict-card .row {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    #ops-verdict-card .border-end,
    .verdict-card .border-end {
        border-right: none !important;
        border-bottom: 1px solid var(--border, #e2e8f0) !important;
        padding-right: 0 !important;
        padding-bottom: 16px !important;
    }
}
/* Modern Enterprise Console Header */
.ops-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a; /* Deep slate */
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 14px 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-symbol {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-bold {
    color: #ffffff;
}

.brand-accent {
    color: #38bdf8;
}

.env-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 2px 7px;
    border-radius: 5px;
}

.brand-sub {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #94a3b8;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

.status-dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: #334155;
}

.network-tags {
    display: flex;
    gap: 6px;
}

.network-chip {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 9px;
    border-radius: 12px;
}
.network-tags {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Default state: subtle, waiting for search */
.network-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    border: 1px solid #1e293b;
    padding: 4px 11px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.65;
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
    transition: all 0.3s ease;
}

/* --- ACTIVE DETECTED BRAND STYLING --- */

/* Swiggy: Signature Orange */
.network-chip.chip-swiggy.active {
    opacity: 1;
    background: #fc8019;
    color: #ffffff;
    border-color: #fc8019;
    box-shadow: 0 0 16px rgba(252, 128, 25, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-swiggy.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Zomato: Signature Crimson Red */
.network-chip.chip-zomato.active {
    opacity: 1;
    background: #cb202d;
    color: #ffffff;
    border-color: #cb202d;
    box-shadow: 0 0 16px rgba(203, 32, 45, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-zomato.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Instamart: Signature Deep Violet */
.network-chip.chip-instamart.active {
    opacity: 1;
    background: #6d28d9;
    color: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 0 16px rgba(109, 40, 217, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-instamart.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Non-Brand: Modern Cool Emerald/Teal */
.network-chip.chip-nonbrand.active {
    opacity: 1;
    background: #0f766e;
    color: #ffffff;
    border-color: #14b8a6;
    box-shadow: 0 0 16px rgba(20, 184, 166, 0.55);
    transform: scale(1.05);
}
.network-chip.chip-nonbrand.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Dim remaining non-active chips when one is active */
.network-tags.has-active .network-chip:not(.active) {
    opacity: 0.35;
    filter: grayscale(0.6);
}
.network-tags {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Default state: subtle, waiting for search */
.network-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    border: 1px solid #1e293b;
    padding: 4px 11px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.65;
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
    transition: all 0.3s ease;
}

/* --- ACTIVE DETECTED BRAND STYLING --- */

/* Swiggy: Signature Orange */
.network-chip.chip-swiggy.active {
    opacity: 1;
    background: #fc8019;
    color: #ffffff;
    border-color: #fc8019;
    box-shadow: 0 0 16px rgba(252, 128, 25, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-swiggy.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Zomato: Signature Crimson Red */
.network-chip.chip-zomato.active {
    opacity: 1;
    background: #cb202d;
    color: #ffffff;
    border-color: #cb202d;
    box-shadow: 0 0 16px rgba(203, 32, 45, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-zomato.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Instamart: Signature Deep Violet */
.network-chip.chip-instamart.active {
    opacity: 1;
    background: #6d28d9;
    color: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 0 16px rgba(109, 40, 217, 0.65);
    transform: scale(1.05);
}
.network-chip.chip-instamart.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Non-Brand: Modern Cool Emerald/Teal */
.network-chip.chip-nonbrand.active {
    opacity: 1;
    background: #0f766e;
    color: #ffffff;
    border-color: #14b8a6;
    box-shadow: 0 0 16px rgba(20, 184, 166, 0.55);
    transform: scale(1.05);
}
.network-chip.chip-nonbrand.active .chip-dot {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Dim remaining non-active chips when one is active */
.network-tags.has-active .network-chip:not(.active) {
    opacity: 0.35;
    filter: grayscale(0.6);
}
/* Card Shell */
.audit-report-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

/* Top Summary Banner */
.audit-summary-banner {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.audit-summary-banner.banner-danger {
    background: #fff5f5;
    border-bottom-color: #fed7d7;
}

.audit-summary-banner.banner-success {
    background: #f0fdf4;
    border-bottom-color: #bbf7d0;
}

.audit-summary-banner.banner-neutral {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}

.verdict-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
}

.verdict-headline {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.verdict-subtext {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    margin-top: 2px;
}

/* Inspector Button */
.btn-inspector {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-inspector:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Section Panel Headers */
.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Left Evidence Rows */
.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evidence-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
}

.evidence-key {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.evidence-val {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
}

/* Right Ownership Box */
.ownership-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

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

.ownership-label {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

.ownership-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

/* Directive Box */
.action-alert-box {
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.action-alert-box.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.action-alert-box.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.action-alert-box.alert-neutral {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}
/* Ops Audit Ticket Container */
.ops-audit-ticket {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

/* Header Themes */
.ticket-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
}
.ticket-header.theme-danger {
    background: #fff1f2;
    border-bottom: 2px solid #f43f5e;
}
.ticket-header.theme-success {
    background: #f0fdf4;
    border-bottom: 2px solid #10b981;
}
.ticket-header.theme-neutral {
    background: #f8fafc;
    border-bottom: 2px solid #94a3b8;
}

.ticket-badge {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 8px;
    border-radius: 4px;
}
.pill-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.ticket-title {
    font-size: 18px;
    font-weight: 800;
    margin: 4px 0 0 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.btn-inspector-ghost {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Grid Layout */
.ticket-body {
    padding: 18px 20px;
}
.ticket-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
}
@media (max-width: 991px) {
    .ticket-grid {
        grid-template-columns: 1fr;
    }
}

.section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Data Rows */
.data-sheet {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    min-height: 38px;
}
.data-key {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}
.data-val {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}
.data-val-reason {
    font-weight: 600;
    color: #334155;
    max-width: 60%;
    line-height: 1.3;
}
.font-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
}

/* Action Directive Box */
.ticket-action-box {
    padding: 12px 14px;
    border-radius: 8px;
}
.ticket-action-box.action-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.ticket-action-box.action-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.ticket-action-box.action-neutral {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}
.action-heading {
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 3px;
}
.action-body {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* Dispute Action Badges */
.badge-dispute-accepted {
    background-color: #dc2626 !important; /* Crimson Red */
    color: #ffffff !important;
    border: 1px solid #b91c1c;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.badge-dispute-rejected {
    background-color: #16a34a !important; /* Forest Green */
    color: #ffffff !important;
    border: 1px solid #15803d;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.badge-dispute-na {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1;
}

.escalation-decision-box {
    margin-right: 8px;
}
.ticket-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.ticket-header.theme-danger {
    background: #fff5f5;
    border-bottom: 2px solid #ef4444;
}

.ticket-header.theme-success {
    background: #f0fdf4;
    border-bottom: 2px solid #22c55e;
}

.ticket-header.theme-neutral {
    background: #f8fafc;
    border-bottom: 2px solid #94a3b8;
}

.header-left {
    display: flex;
    align-items: center;
}

.status-chip {
    font-size: 12px;
    font-weight: 700;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.sdc-chip {
    font-size: 13px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

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

.dispute-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
}

.dispute-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.dispute-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-accepted {
    background-color: #dc2626;
    color: #ffffff;
}

.badge-rejected {
    background-color: #16a34a;
    color: #ffffff;
}

.badge-na {
    background-color: #64748b;
    color: #ffffff;
}

.btn-inspector-ghost {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}