* {
    box-sizing: border-box;
}

:root {
    --bg: #0b0e13;
    --bg-soft: #f5f7fb;
    --surface: #ffffff;
    --surface-dark: #121722;
    --surface-darker: #0b111c;
    --text: #1b2330;
    --muted: #677283;
    --line: #e5eaf1;
    --primary: #ef3d2f;
    --primary-dark: #cc261a;
    --secondary: #f59a22;
    --secondary-dark: #d97e0a;
    --accent: #1f9e63;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 24px;
    --radius-sm: 16px;
    --shadow: 0 18px 40px rgba(14, 19, 31, 0.10);
    --shadow-soft: 0 12px 28px rgba(14, 19, 31, 0.06);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(229, 234, 241, 0.92);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: var(--shadow-soft);
    border: 2px solid rgba(239, 61, 47, 0.12);
    background: #fff;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-size: 1.14rem;
    line-height: 1.1;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.94rem;
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #2c3646;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    background: rgba(239, 61, 47, 0.08);
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-admin {
    margin-left: 4px;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #1f2937;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(245, 154, 34, 0.12), transparent 32%),
        radial-gradient(circle at bottom right, rgba(31, 158, 99, 0.12), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 52px 0 42px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -120px -140px auto;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(239, 61, 47, 0.08), transparent 68%);
    pointer-events: none;
}

.hero-grid,
.content-grid,
.dashboard-grid,
.footer-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-grid {
    align-items: center;
    gap: 36px;
}

.hero-content {
    max-width: 700px;
}

.hero h1,
.section h1,
.section h2,
.table-head h2,
.site-footer h3,
.site-footer h4 {
    margin: 0;
    line-height: 1.12;
}

.hero h1 {
    font-size: clamp(2.35rem, 4vw, 4.2rem);
    margin-bottom: 18px;
    max-width: 760px;
}

.hero-text {
    margin: 0;
    font-size: 1.08rem;
    color: #3a4658;
    max-width: 670px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(239, 61, 47, 0.08);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-actions,
.admin-actions,
.inline-actions,
.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-actions {
    margin-top: 24px;
}

.hero-visual {
    display: grid;
    gap: 22px;
}

.hero-logo-card,
.hero-panel,
.content-card,
.category-card,
.product-card,
.auth-card,
.table-card,
.stat-box,
.metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-logo-card {
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.hero-logo-card img {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 24px;
}

.hero-panel,
.content-card,
.category-card,
.product-card,
.auth-card,
.table-card,
.stat-box,
.metric-card {
    padding: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    color: #fff;
    background: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    color: var(--primary);
    border-color: rgba(239, 61, 47, 0.20);
    background: rgba(239, 61, 47, 0.04);
}

.btn-link {
    color: var(--secondary);
    padding: 0;
    min-height: auto;
    background: transparent;
}

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

.btn-small {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.88rem;
}

.mini-metrics,
.stats-grid,
.category-grid,
.product-grid {
    display: grid;
    gap: 18px;
}

.mini-metrics,
.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.92);
}

.metric-card strong,
.stat-box strong {
    display: block;
    font-size: 1.18rem;
    margin-bottom: 8px;
}

.metric-card span,
.stat-box span,
.category-card p,
.product-card p,
.content-card p,
.category-intro,
.table-card p,
.login-tip,
.footer-brand p,
.section-head p {
    color: var(--muted);
}

.section {
    padding: 48px 0;
}

.section-tight {
    padding-top: 8px;
    padding-bottom: 0;
}

.section-dark {
    background: linear-gradient(180deg, #0e131d 0%, #141c29 100%);
    color: #fff;
}

.section-dark .section-head p,
.section-dark .product-card p,
.section-dark .price-line span,
.section-dark .btn-link,
.section-dark .badge {
    color: rgba(255, 255, 255, 0.78);
}

.section-dark .product-card,
.section-dark .category-card,
.section-dark .content-card,
.section-dark .table-card,
.section-dark .hero-panel {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

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

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

.section-head p {
    max-width: 540px;
    margin: 0;
}

.category-grid,
.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-card h3,
.product-card h3,
.content-card h2,
.auth-card h1 {
    margin: 0;
}

.category-card a {
    margin-top: auto;
    color: var(--primary);
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 2px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(239, 61, 47, 0.08);
}

.price-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 6px;
    flex-wrap: wrap;
}

.price-line strong {
    font-size: 1.15rem;
}

.price-line span {
    text-decoration: line-through;
}

.check-list {
    margin: 0;
    padding-left: 18px;
}

.check-list li + li {
    margin-top: 8px;
}

.lead-form,
.product-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--text);
    border: 1px solid #d1d7e0;
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(239, 61, 47, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 61, 47, 0.10);
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-inline input {
    width: 18px;
    height: 18px;
    min-height: auto;
    padding: 0;
}

.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert.success {
    background: rgba(22, 163, 74, 0.10);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.18);
}

.alert.error {
    background: rgba(220, 38, 38, 0.10);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.18);
}

.social-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-pills a {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--primary);
    font-weight: 700;
}

.login-section {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
}

.table-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.table-head h2 {
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 0.92rem;
    color: var(--muted);
}

.inline-actions form {
    margin: 0;
}

.site-footer {
    background: linear-gradient(180deg, #0c1119 0%, #0b0f15 100%);
    color: #fff;
    padding: 48px 0 18px;
}

.footer-grid {
    grid-template-columns: 1.3fr 0.8fr 0.8fr 0.9fr;
    align-items: start;
}

.footer-brand {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.footer-brand img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.footer-brand h3 {
    margin-bottom: 10px;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-list li + li {
    margin-top: 8px;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.84);
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.64);
}

@media (max-width: 1100px) {
    .category-grid,
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .site-header {
        position: sticky;
    }

    .nav-wrap {
        min-height: 82px;
        position: relative;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .hero-grid,
    .content-grid,
    .dashboard-grid,
    .footer-grid,
    .section-head,
    .stats-grid,
    .mini-metrics,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .site-header {
        position: static;
    }

    .nav-wrap {
        min-height: 78px;
        gap: 14px;
    }

    .brand {
        gap: 12px;
        max-width: calc(100% - 64px);
    }

    .brand-logo-wrap {
        width: 56px;
        height: 56px;
    }

    .brand-copy strong {
        font-size: 1rem;
    }

    .brand-copy small {
        font-size: 0.83rem;
    }

    .hero {
        padding-top: 30px;
        padding-bottom: 24px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section {
        padding: 38px 0;
    }

    .hero-panel,
    .content-card,
    .category-card,
    .product-card,
    .auth-card,
    .table-card,
    .stat-box,
    .metric-card,
    .hero-logo-card {
        padding: 20px;
        border-radius: 20px;
    }

    .category-grid,
    .product-grid,
    .stats-grid,
    .mini-metrics,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        flex-direction: column;
    }

    .table-head,
    .hero-actions,
    .admin-actions,
    .inline-actions,
    .product-actions {
        align-items: stretch;
    }

    .btn,
    .btn-small {
        width: 100%;
    }
}
