:root {
    --primary: #0f63e9;
    --primary-dark: #084bb9;
    --navy: #062b50;
    --navy-deep: #031f3b;
    --text: #122033;
    --muted: #64748b;
    --line: #dce5ef;
    --soft: #f5f8fc;
    --white: #ffffff;
    --success: #15803d;
    --danger: #b42318;
    --warning: #b45309;
    --radius: 14px;
    --shadow: 0 12px 35px rgba(20, 48, 83, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--white);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.brand > span:last-child > span {
    color: var(--primary);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav > a {
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.main-nav > a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: .2s ease;
}

.button-primary {
    color: var(--white) !important;
    background: var(--primary);
}

.button-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.button-outline {
    color: var(--text);
    border-color: var(--line);
    background: var(--white);
}

.button-danger {
    color: #fff;
    background: var(--danger);
}

.button-small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.hero {
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(3,31,59,.92), rgba(6,43,80,.72)),
        radial-gradient(circle at 80% 20%, rgba(15,99,233,.65), transparent 35%),
        linear-gradient(135deg, #0a4b80, #031f3b);
    padding: 72px 0 40px;
    text-align: center;
}

.hero h1 {
    max-width: 760px;
    margin: 0 auto 12px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero p {
    margin: 0 auto 28px;
    color: #dbeafe;
    font-size: 18px;
}

.search-panel {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr auto;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
    min-width: 0;
    height: 58px;
    padding: 0 18px;
    border: 0;
    border-right: 1px solid var(--line);
    outline: none;
    background: var(--white);
    color: var(--text);
}

.search-panel button {
    border-radius: 0;
    min-width: 130px;
}

.stats-strip {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    padding: 26px 18px;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 24px;
    color: var(--navy);
}

.stat span {
    color: var(--muted);
    font-size: 13px;
}

.section {
    padding: 54px 0;
}

.section-soft {
    background: var(--soft);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head h2,
.page-title h1 {
    margin: 0;
    color: var(--navy-deep);
    line-height: 1.2;
}

.section-head a {
    font-size: 14px;
    font-weight: 700;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.business-card,
.category-card,
.country-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 5px 18px rgba(20, 48, 83, .05);
}

.business-card {
    padding: 22px;
}

.business-card h3 {
    margin: 12px 0 4px;
    font-size: 18px;
}

.business-card p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 14px;
}

.company-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eaf2ff;
    color: var(--primary);
    font-size: 20px;
    font-weight: 850;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge-free {
    color: #475569;
    background: #eef2f7;
}

.badge-basic {
    color: #075985;
    background: #e0f2fe;
}

.badge-vip {
    color: #854d0e;
    background: #fef3c7;
}

.category-grid,
.country-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.category-card,
.country-card {
    padding: 20px;
    text-align: center;
    color: var(--text);
}

.category-card strong,
.country-card strong {
    display: block;
    margin-bottom: 5px;
}

.category-card span,
.country-card span {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    color: var(--white);
    padding: 42px 0 52px;
    text-align: center;
    background: linear-gradient(135deg, var(--navy-deep), #064a7e);
}

.page-hero h1 {
    margin: 0 0 6px;
    font-size: 38px;
}

.breadcrumbs {
    color: #cbd5e1;
    font-size: 14px;
}

.listing-search-wrap {
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.listing-search-wrap .search-panel {
    border: 1px solid var(--line);
}

.list-toolbar {
    margin: 34px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    background: var(--white);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

.data-table th,
.data-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th {
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-cell .company-avatar {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 14px;
}

.pagination {
    margin: 28px 0 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    background: var(--white);
    font-size: 14px;
}

.pagination .active {
    color: var(--white);
    border-color: var(--primary);
    background: var(--primary);
}

.profile-shell {
    padding: 34px 0 60px;
    background: var(--soft);
}

.profile-card {
    overflow: hidden;
}

.profile-head {
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.profile-company {
    display: flex;
    gap: 18px;
    align-items: center;
}

.profile-company .company-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
}

.profile-company h1 {
    margin: 0 0 7px;
    font-size: 30px;
    line-height: 1.2;
}

.profile-company p {
    margin: 0;
    color: var(--muted);
}

.profile-body {
    padding: 28px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.info-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
}

.info-row:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.info-row:last-child,
.info-row:nth-last-child(2) {
    border-bottom: 0;
}

.info-label,
.info-value {
    padding: 13px 15px;
    font-size: 14px;
}

.info-label {
    font-weight: 700;
    background: #f8fafc;
}

.info-value {
    overflow-wrap: anywhere;
}

.form-shell {
    width: min(760px, calc(100% - 36px));
    margin: 50px auto;
}

.panel {
    padding: 28px;
}

.panel h1,
.panel h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 13px;
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    background: var(--white);
    color: var(--text);
    font: inherit;
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,99,233,.12);
}

.help {
    color: var(--muted);
    font-size: 13px;
}

.error-list {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    color: #7f1d1d;
    background: #fee2e2;
}

.flash-stack {
    margin-top: 18px;
}

.flash {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.flash-success {
    color: #166534;
    background: #dcfce7;
}

.flash-error {
    color: #991b1b;
    background: #fee2e2;
}

.flash-warning {
    color: #92400e;
    background: #fef3c7;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.metric-card strong {
    display: block;
    font-size: 30px;
    color: var(--navy);
}

.metric-card span {
    color: var(--muted);
}

.admin-layout {
    min-height: 100vh;
    background: var(--soft);
}

.admin-topbar {
    color: var(--white);
    background: var(--navy-deep);
}

.admin-topbar .container {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-nav a {
    color: #dbeafe;
    font-size: 14px;
    font-weight: 700;
}

.admin-main {
    padding: 32px 0 60px;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.checkbox-cell {
    width: 46px;
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: var(--muted);
}

.content-page {
    padding: 56px 0;
}

.content-page .panel {
    max-width: 850px;
    margin-inline: auto;
}

.site-footer {
    color: #dbeafe;
    background: var(--navy-deep);
    padding-top: 52px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 40px;
}

.brand-footer {
    color: var(--white);
}

.site-footer p {
    max-width: 360px;
    color: #a8c2df;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 15px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #b8cee5;
    font-size: 14px;
}

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,.12);
    color: #9fb8d2;
    font-size: 13px;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 18px;
        right: 18px;
        padding: 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid,
    .country-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding-top: 52px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        gap: 10px;
    }

    .search-panel input,
    .search-panel select,
    .search-panel button {
        border: 1px solid var(--line);
        border-radius: 8px;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid,
    .category-grid,
    .country-grid,
    .dashboard-grid,
    .footer-grid,
    .form-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-row:nth-child(odd) {
        border-right: 0;
    }

    .info-row:nth-last-child(2) {
        border-bottom: 1px solid var(--line);
    }

    .profile-head,
    .profile-company,
    .list-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-company h1 {
        font-size: 25px;
    }

    .info-row {
        grid-template-columns: 120px 1fr;
    }
}


.batch-progress-panel {
    margin: 22px 0;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

.progress-track {
    height: 14px;
    margin: 12px 0 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width .25s ease;
}
