﻿/* =========================================
   GLOBAL
========================================= */

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 0;
    color: #111;
}

a {
    text-decoration: none;
    color: inherit;
}

* {
    transition: none;
}

/* =========================================
   NAVBAR
========================================= */

.navbar * {
    pointer-events: auto;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.7);
}

    .navbar.scrolled {
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .navbar:hover {
        background: rgba(255,255,255,0.85);
    }

.logo {
    font-weight: 800;
    font-size: 20px;
    color: #111;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-hint {
    font-size: 13px;
    color: #666;
}

/* =========================================
   SEARCH
========================================= */

.navbar,
.nav-center,
.search-box,
.search-input-wrapper {
    overflow: visible;
}

.search-box {
    width: 600px;
    max-width: 90vw;
    position: relative;
    z-index: 500;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 100%;
}

    .search-input-wrapper:hover {
        box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    }

    .search-input-wrapper:focus-within {
        box-shadow: 0 0 0 3px rgba(59,130,246,0.12), 0 8px 20px rgba(0,0,0,0.06);
        border-color: rgba(59,130,246,0.35);
    }

    .search-input-wrapper input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        padding: 12px 18px;
        min-width: 0;
        font-size: 14px;
    }

.search-box input::placeholder {
    font-size: 14px;
    opacity: 0.7;
}

.search-box input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.search-icon {
    margin-right: 10px;
    opacity: 0.6;
}

.clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
}

.search-btn {
    border-radius: 999px;
    padding: 8px 16px;
    border: none;
    background: linear-gradient(135deg, #5B8DEF, #6C63FF);
    color: white;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.14);
    z-index: 9999;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    background: white;
}

    .search-item:last-child {
        border-bottom: none;
    }

    .search-item:hover {
        background: #f8f9fc;
    }

    .search-item img {
        width: 45px;
        height: 45px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .search-item .info {
        flex: 1;
        min-width: 0;
    }

    .search-item strong {
        display: block;
        font-size: 14px;
        color: #111;
    }

    .search-item p {
        font-size: 12px;
        color: #777;
        margin: 0;
    }

    .search-item .price {
        font-weight: 700;
        font-size: 14px;
        color: #5B8DEF;
        white-space: nowrap;
    }

/* =========================================
   BUTTON SYSTEM
========================================= */

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    transition: all .2s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        background: linear-gradient(135deg, #000, #222);
        box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    }

    .btn-primary:active {
        transform: scale(0.97);
    }

    .btn-primary.full {
        width: 100%;
        text-align: center;
    }

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

    .btn-success:hover {
        background: linear-gradient(135deg, #16a34a, #15803d);
    }

/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
    max-width: 1250px;
    margin: auto;
    padding: 30px 20px;
}

.product-wrapper {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* =========================================
   TYPOGRAPHY
========================================= */

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

h4 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

/* =========================================
   HOMEPAGE HERO
========================================= */

.hero {
    text-align: center;
    padding: 80px 40px;
    background: radial-gradient(circle at 30% 20%, #6366f1 0%, transparent 40%), radial-gradient(circle at 70% 80%, #3b82f6 0%, transparent 40%), linear-gradient(135deg, #0f172a, #020617);
    color: white;
    max-width: 1200px;
    margin: 40px auto;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1;
    }

    .hero::after {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(59,130,246,0.35), transparent 70%);
        top: -200px;
        right: -200px;
        z-index: 0;
        filter: blur(60px);
        opacity: 0.6;
    }

    .hero h1,
    .hero p,
    .hero .hero-stats {
        position: relative;
        z-index: 2;
    }

    .hero h1 {
        font-size: 48px;
        font-weight: 800;
        margin-bottom: 10px;
        letter-spacing: -0.5px;
        color: #fff;
        text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    .hero p {
        color: #e5e7eb;
        font-size: 18px;
        max-width: 720px;
        margin: 0 auto;
    }

.hero-stats {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    opacity: 0.95;
}

    .hero-stats div {
        color: #fff;
        text-shadow: 0 2px 6px rgba(0,0,0,0.5);
        font-weight: 600;
        font-size: 16px;
        background: rgba(255,255,255,0.08);
        padding: 10px 16px;
        border-radius: 999px;
        backdrop-filter: blur(10px);
        transition: all 0.2s ease;
    }

        .hero-stats div:hover {
            background: rgba(255,255,255,0.18);
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(59,130,246,0.4);
        }

    .hero-stats span {
        margin-right: 6px;
        font-size: 18px;
    }

/* =========================================
   RETAILERS
========================================= */

.retailers {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 18px 0 10px;
    align-items: center;
    flex-wrap: wrap;
}

    .retailers img {
        height: 22px;
        width: 90px;
        object-fit: contain;
        opacity: 0.5;
        filter: grayscale(100%);
    }

        .retailers img:hover {
            opacity: 1;
            filter: grayscale(0%);
            transform: scale(1.08);
        }

/* =========================================
   HOME SECTIONS
========================================= */

.home-section {
    margin-top: 42px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 10px;
}

.section-sub {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
    max-width: 700px;
}

/* =========================================
   POPULAR BRANDS
========================================= */

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 18px 0 8px;
}

.brand-card-link {
    color: inherit;
    display: block;
}

.brand-card {
    background: white;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    transition: 0.2s ease;
}

    .brand-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(0,0,0,0.10);
    }

.brand-image-wrap {
    width: 100%;
    height: 140px;
    background: #f3f4f6;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .brand-image-wrap img {
        max-width: 80%;
        max-height: 80%;
        object-fit: contain;
    }

.brand-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.brand-content p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.brand-arrow {
    margin-top: auto;
    font-weight: 600;
    color: #5B8DEF;
    font-size: 14px;
}

/* =========================================
   PRODUCT GRID
========================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 18px;
    align-items: start;
}

.product-link {
    color: inherit;
    display: block;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 25px 60px rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.08);
    }

    .product-card::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 16px;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,0.05));
        opacity: 0;
        transition: .3s;
    }

    .product-card:hover::after {
        opacity: 1;
    }

    .product-card img {
        width: 100%;
        height: 220px;
        object-fit: contain;
        border-radius: 10px;
        padding: 16px;
        background: radial-gradient(circle at top, rgba(255,255,255,0.95), rgba(241,245,249,0.95)), linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
        transition: 0.3s;
    }

    .product-card:hover img {
        transform: scale(1);
    }

    .product-card.featured {
        transform: scale(1.06);
        box-shadow: 0 20px 50px rgba(0,0,0,0.15);
        border: 2px solid #22c55e;
        z-index: 2;
    }

.product-info {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .product-info h3 {
        margin: 0;
        min-height: 42px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.product-brand {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5B8DEF;
    margin-bottom: 8px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin-top: 0;
    line-height: 1.1;
}

    .price small {
        font-size: 12px;
        color: #64748b;
        font-weight: 600;
    }

.retailer-name {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    margin-bottom: 10px;
}

.product-stats-line {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: #166534;
    font-weight: 700;
    font-size: 13px;
    background: #dcfce7;
    padding: 6px 10px;
    border-radius: 999px;
    margin-top: 2px;
}

.badge-hot {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff3b3b, #ff0000);
    color: white;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255,0,0,0.28);
    z-index: 2;
}

/* =========================================
   PRODUCT HERO
========================================= */

.product-hero {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================================
   IMAGE AREA
========================================= */

.image-container {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1/1;
    background: #f3f4f6;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .image-container img {
        max-width: 85%;
        max-height: 85%;
        object-fit: contain;
    }

.thumbnail-row {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

    .thumbnail-row img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 10px;
        cursor: pointer;
        transition: .2s;
    }

        .thumbnail-row img:hover {
            transform: scale(1.05);
        }

        .thumbnail-row img.active-thumb {
            border: 2px solid #2563eb;
        }

/* =========================================
   VARIANTS
========================================= */

.variant-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 500;
    transition: .15s;
}

    .variant-btn:hover {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .variant-btn.active {
        background: #2563eb;
        color: white;
    }

/* =========================================
   BEST PRICE BOX
========================================= */

.best-price-box {
    border: 2px solid #2ecc71;
    background: #f6fff9;
    padding: 24px;
    border-radius: 12px;
    max-width: 340px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.price-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.price-value {
    font-size: 36px;
    font-weight: 700;
}

/* =========================================
   PRICE + CHART
========================================= */

.price-layout {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 28px;
    margin-top: 25px;
}

.price-column,
.chart-column {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* =========================================
   PRICE ROWS
========================================= */

.price-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.best-deal {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 2px solid #22c55e;
    box-shadow: 0 8px 25px rgba(34,197,94,0.2);
    transform: scale(1.01);
    border-left: 6px solid #22c55e;
    font-weight: 600;
}

.retailer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.retailer-logo {
    height: 26px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
}

.price-amount {
    white-space: nowrap;
    font-weight: 700;
    font-size: 18px;
}

.price-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .price-actions a {
        font-size: 14px;
    }

.price-row img {
    filter: grayscale(100%);
    opacity: .7;
}

.best-deal img {
    filter: none;
    opacity: 1;
}

.deal-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff3b3b, #ff0000);
    box-shadow: 0 6px 15px rgba(255,0,0,0.4);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.deal-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2ecc71;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
}

.badge-best {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    z-index: 2;
}

/* =========================================
   CHART
========================================= */

.chart-container {
    position: relative;
    height: 260px;
}

.period-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

    .period-buttons button {
        padding: 6px 12px;
        border: 1px solid #ddd;
        background: white;
        border-radius: 6px;
        cursor: pointer;
    }

        .period-buttons button.active {
            background: #3498db;
            color: white;
            border-color: #3498db;
        }

/* =========================================
   SEARCH PAGE LAYOUT
========================================= */

.search-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: auto;
    padding: 30px 20px;
    align-items: start;
}

.filters {
    top: 90px;
    position: sticky;
    background: white;
    border-radius: 14px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

    .filters h3 {
        margin-top: 0;
    }

.filter-note {
    font-size: 14px;
    color: #777;
}

.search-page {
    width: 100%;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .sort-box select {
        padding: 6px 10px;
        border-radius: 6px;
        border: 1px solid #ddd;
    }

.result-count {
    margin-bottom: 10px;
    color: #666;
}

.search-empty {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.brand-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.brand-dropdown {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.filter-reset {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: #f1f1f1;
    cursor: pointer;
}

/* =========================================
   SECTION EXTRA
========================================= */

.how-it-works {
    margin-top: 60px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step {
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: 0.2s;
}

    .step:hover {
        transform: translateY(-5px);
    }

.product-card,
.step,
.buy-button {
    will-change: transform;
}

/* =========================================
   ADMIN
========================================= */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    .admin-table th,
    .admin-table td {
        padding: 10px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    .admin-table th {
        background: #f8f8f8;
        font-weight: 600;
    }

.filter-bar {
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 14px;
    margin-right: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

    .filter-btn.active {
        background: black;
        color: white;
        border-color: black;
    }

.admin-table .btn-primary {
    padding: 8px 14px;
    font-size: 14px;
}

/* =========================================
   FOOTER
========================================= */

.footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

    .footer a {
        margin: 0 10px;
        color: #666;
        font-size: 14px;
    }

        .footer a:hover {
            color: #000;
        }

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {
    .product-hero {
        grid-template-columns: 1fr;
    }

    .best-price-box {
        max-width: 100%;
    }

    .price-layout {
        grid-template-columns: 1fr;
    }

    .search-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 56px 24px;
        margin: 24px auto;
    }

        .hero h1 {
            font-size: 34px;
        }

        .hero p {
            font-size: 16px;
        }

    .hero-stats {
        gap: 12px;
        flex-wrap: wrap;
    }

        .hero-stats div {
            font-size: 14px;
            padding: 9px 14px;
        }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .search-box {
        max-width: 100%;
    }

    .logo {
        font-size: 16px;
    }

    .product-card img {
        height: 190px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 20px 14px;
    }

    .hero {
        border-radius: 16px;
    }

        .hero h1 {
            font-size: 28px;
        }

    .product-card {
        padding: 14px;
    }

        .product-card img {
            height: 160px;
        }

    .brand-image-wrap {
        height: 120px;
    }

    .section-sub {
        font-size: 14px;
    }
}

.feed-sync-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

.feed-sync-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 22px;
}

    .feed-sync-header h1 {
        margin: 0 0 8px 0;
        font-size: 30px;
        font-weight: 800;
    }

    .feed-sync-header p {
        margin: 0;
        color: #64748b;
    }

.feed-alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 600;
}

    .feed-alert.info {
        background: #eff6ff;
        color: #1d4ed8;
        border: 1px solid #bfdbfe;
    }

    .feed-alert.success {
        background: #ecfdf5;
        color: #15803d;
        border: 1px solid #bbf7d0;
    }

    .feed-alert.warning {
        background: #fffbeb;
        color: #b45309;
        border: 1px solid #fde68a;
    }

    .feed-alert.error {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

.feed-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.feed-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .feed-stat-card strong {
        font-size: 28px;
        line-height: 1;
    }

    .feed-stat-card span {
        color: #64748b;
        font-size: 14px;
    }

.batch-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

    .batch-box h3 {
        margin-top: 0;
        margin-bottom: 14px;
    }

.batch-line {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

    .batch-line:last-child {
        border-bottom: none;
    }

.empty-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
}

.feed-table-wrap {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.feed-table {
    width: 100%;
    border-collapse: collapse;
}

    .feed-table th,
    .feed-table td {
        padding: 14px 16px;
        text-align: left;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
    }

    .feed-table th {
        background: #f8fafc;
        font-size: 13px;
        color: #475569;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

.feed-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.feed-input-small {
    max-width: 140px;
}

.feed-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

.feed-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-block;
    background: white;
    color: #0f172a;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid #dbe3ee;
    cursor: pointer;
}

    .btn-secondary:hover {
        background: #f8fafc;
    }

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    max-width: 100%;
}

    .status-pill.neutral {
        background: #f1f5f9;
        color: #475569;
    }

    .status-pill.success {
        background: #dcfce7;
        color: #166534;
    }

    .status-pill.warning {
        background: #fef3c7;
        color: #92400e;
    }

    .status-pill.error {
        background: #fee2e2;
        color: #b91c1c;
    }

.status-row td {
    background: #fcfcfd;
    padding-top: 0;
}

.status-detail {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    padding: 0 0 12px 0;
}

@media (max-width: 980px) {
    .feed-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feed-sync-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .feed-stats {
        grid-template-columns: 1fr;
    }

    .feed-table-wrap {
        overflow-x: auto;
    }

    .feed-table {
        min-width: 920px;
    }
}

.admin-login-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.admin-login-card {
    width: 100%;
    max-width: 430px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

    .admin-login-card h1 {
        margin: 0 0 8px;
        font-size: 28px;
        font-weight: 800;
    }

    .admin-login-card p {
        margin: 0 0 20px;
        color: #64748b;
    }

.admin-login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

    .admin-login-field label {
        font-size: 14px;
        font-weight: 600;
        color: #334155;
    }

    .admin-login-field input {
        padding: 12px 14px;
        border: 1px solid #dbe3ee;
        border-radius: 12px;
        font-size: 14px;
        outline: none;
    }

        .admin-login-field input:focus {
            border-color: #93c5fd;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
        }

.admin-login-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 14px;
    font-weight: 600;
}
