/* MarketIntel HQ - Enterprise UI */

:root {
    --brand-primary: #0f172a;
    --brand-accent: #2563eb;
    --brand-accent-light: #3b82f6;
    --brand-success: #059669;
    --brand-success-light: #d1fae5;
    --brand-danger: #dc2626;
    --brand-danger-light: #fee2e2;
    --brand-warning: #d97706;
    --brand-warning-light: #fef3c7;
    --brand-gray-50: #f8fafc;
    --brand-gray-100: #f1f5f9;
    --brand-gray-200: #e2e8f0;
    --brand-gray-300: #cbd5e1;
    --brand-gray-400: #94a3b8;
    --brand-gray-500: #64748b;
    --brand-gray-600: #475569;
    --brand-gray-700: #334155;
    --brand-gray-800: #1e293b;
    --brand-gray-900: #0f172a;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

body {
    background-color: var(--brand-gray-50);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--brand-gray-800);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.navbar-brand .brand-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.navbar {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--brand-gray-200);
    box-shadow: var(--shadow-sm);
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    background: rgba(255,255,255,0.12);
}

.navbar .form-control {
    font-size: 0.8rem;
    border-radius: 20px;
    padding-left: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.navbar .form-control::placeholder { color: rgba(255,255,255,0.5); }
.navbar .form-control:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); color: #fff; }

/* ===== CARDS ===== */
.card {
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

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

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--brand-gray-100);
    font-weight: 600;
    padding: 0.85rem 1.15rem;
}

.card-body { padding: 1.15rem; }

/* ===== STAT CARDS ===== */
.stat-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-top: 0.25rem;
}

/* ===== STORE BADGES ===== */
.badge-fairway {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-weight: 600;
}

.badge-palace {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-weight: 600;
}

.badge-melcom {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #fff;
    font-weight: 600;
}

.badge-maxmart {
    background: linear-gradient(135deg, #7c2d12, #b45309);
    color: #fff;
    font-weight: 600;
}

.badge-noknok, .badge-noknok-spintex, .badge-noknok-osu {
    background: linear-gradient(135deg, #be123c, #e11d48);
    color: #fff;
    font-weight: 600;
}

.badge-ryno {
    background: linear-gradient(135deg, #065f46, #059669);
    color: #fff;
    font-weight: 600;
}

.badge-ryno-app {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    font-weight: 600;
}

.badge-konzoom {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #fff;
    font-weight: 600;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.7em;
    font-size: 0.75em;
    border-radius: 5px;
}

/* ===== PRICE TAGS ===== */
.price-tag {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-gray-900);
    letter-spacing: -0.02em;
}

.price-tag .currency {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--brand-gray-500);
}

.price-tag-small {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-gray-800);
}

.price-old {
    text-decoration: line-through;
    color: var(--brand-gray-400);
    font-size: 0.85em;
}

.price-diff {
    font-weight: 700;
    font-size: 0.85rem;
}

.price-diff.savings { color: var(--brand-success); }
.price-diff.expensive { color: var(--brand-danger); }

/* ===== CHEAPEST HIGHLIGHT ===== */
.cheapest-store {
    border-left: 3px solid var(--brand-success);
    background: var(--brand-success-light);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-card .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid var(--brand-gray-100);
}

.product-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
}

.product-card .card-title a { color: var(--brand-gray-800); }
.product-card .card-title a:hover { color: var(--brand-accent); }

/* ===== MATCH CARDS ===== */
.match-card {
    border-left: 3px solid var(--brand-accent);
    border-radius: var(--radius-md);
}

.match-card .store-prices {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.match-card .store-price-item {
    flex: 1;
    min-width: 130px;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--brand-gray-50);
    border: 1px solid var(--brand-gray-200);
    text-align: center;
    transition: border-color 0.15s;
}

.match-card .store-price-item.cheapest {
    background: var(--brand-success-light);
    border-color: #6ee7b7;
}

.match-card h5 a {
    color: var(--brand-gray-900);
    font-weight: 700;
}

.match-card h5 a:hover { color: var(--brand-accent); }

/* ===== COMPARISON TABLE ===== */
.comparison-table th {
    background: var(--brand-gray-50);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-gray-500);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--brand-gray-200);
}

.comparison-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

/* ===== TABLES ===== */
.table { font-size: 0.85rem; }
.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-gray-500);
    border-bottom-width: 2px;
}

/* ===== CHART ===== */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    color: var(--brand-accent);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
}

/* ===== BUTTONS ===== */
.btn { font-weight: 500; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-success { background: var(--brand-success); border-color: var(--brand-success); }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-primary { background: var(--brand-accent); border-color: var(--brand-accent); }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* ===== LIST GROUPS ===== */
.list-group-item { font-size: 0.85rem; padding: 0.85rem 1.15rem; }
.list-group-item-action:hover { background: var(--brand-gray-50); }

/* ===== PROGRESS BAR ===== */
.progress { border-radius: 10px; background: var(--brand-gray-100); }
.progress-bar { border-radius: 10px; }

/* ===== FEATURE LOCKED (Dashboard Teasers) ===== */
.feature-locked {
    position: relative;
    overflow: hidden;
    min-height: 180px;
}
.feature-locked .feature-locked-content {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
}
.feature-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-md);
}
.feature-locked-overlay .teaser-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.feature-locked-overlay .teaser-stat {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--brand-primary);
}
.feature-locked-overlay .teaser-hook {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-gray-700);
    margin: 0.25rem 0 0.25rem;
}
.feature-locked-overlay .teaser-sub {
    font-size: 0.78rem;
    color: var(--brand-gray-500);
    max-width: 320px;
    margin-bottom: 1rem;
}
.feature-locked-overlay .btn-unlock {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s;
}
.feature-locked-overlay .btn-unlock:hover {
    background: var(--brand-gray-800);
    color: #fff;
}
.stat-locked {
    position: relative;
}
.stat-locked .lock-hint {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.7rem;
    color: var(--brand-gray-400);
}

/* ===== OMNISEARCH ===== */
.omni-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    max-height: 480px;
    overflow-y: auto;
    margin-top: 4px;
}
.omni-section-label {
    padding: 8px 14px 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-gray-400);
    text-align: left;
}
.omni-item {
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.1s;
}
.omni-item:hover { background: var(--brand-gray-50); }
.omni-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.omni-item-meta {
    font-size: 0.68rem;
    color: var(--brand-gray-500);
    text-align: left;
}
.omni-item-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-gray-800);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}
.omni-viewall {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-accent);
    cursor: pointer;
    border-top: 1px solid var(--brand-gray-100);
}
.omni-viewall:hover { background: var(--brand-gray-50); }
.omni-empty {
    padding: 20px 14px;
    text-align: left;
    font-size: 0.82rem;
    color: var(--brand-gray-400);
}
.omni-dropdown::-webkit-scrollbar { width: 4px; }
.omni-dropdown::-webkit-scrollbar-thumb { background: var(--brand-gray-300); border-radius: 2px; }

/* ===== NOTIFICATIONS ===== */
.notif-item { transition: background 0.15s; color: #e2e8f0; }
.notif-item .fw-600 { color: #f1f5f9; }
.notif-body { color: #cbd5e1; }
.notif-time { color: #64748b; }
.notif-item:hover { background: rgba(255,255,255,0.06); }
.notif-unread { background: rgba(37, 99, 235, 0.15); border-left: 3px solid var(--brand-accent); }
.notif-badge { min-width: 16px; padding: 2px 4px; line-height: 1; }
#notif-list::-webkit-scrollbar { width: 4px; }
#notif-list::-webkit-scrollbar-thumb { background: var(--brand-gray-600); border-radius: 2px; }

/* ===== ADMIN ===== */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ===== FOOTER ===== */
footer {
    font-size: 0.8rem;
    border-top: 1px solid var(--brand-gray-200);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stat-card .stat-number { font-size: 1.6rem; }
    .product-card .card-img-top { height: 120px; }
    .match-card .store-prices { flex-direction: column; }
    .price-tag { font-size: 1.1rem; }
}

/* ===== UTILITIES ===== */
.text-brand { color: var(--brand-accent); }
.bg-brand { background: var(--brand-primary); }
.border-brand { border-color: var(--brand-accent) !important; }
.fw-800 { font-weight: 800; }
.fs-xs { font-size: 0.75rem; }
.letter-tight { letter-spacing: -0.02em; }
