﻿:root {
    --bg: #eef3f1;
    --bg-deep: #dbe7e2;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --ink: #10251f;
    --muted: #60716a;
    --accent: #0f766e;
    --accent-strong: #0b5f58;
    --accent-soft: #d9f3ee;
    --line: rgba(16, 37, 31, 0.1);
    --danger: #a13b3b;
    --shadow: 0 20px 55px rgba(14, 53, 44, 0.08);
    --shadow-soft: 0 10px 30px rgba(14, 53, 44, 0.05);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(11, 95, 88, 0.12), transparent 22%),
        linear-gradient(180deg, #f7faf8 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

a {
    color: var(--accent-strong);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--accent);
}

.shell {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(247, 250, 248, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-row,
.split,
.stats,
.grid,
.form-grid,
.toolbar,
.hero-grid,
.quick-links,
.mfa-setup-grid {
    display: grid;
    gap: 1rem;
}

.nav-row {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1rem 0;
}

.nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: var(--muted);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand::before {
    content: "";
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #63d2c7);
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.12);
}

.cart-pill,
button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.nav-links a.cart-pill {
    color: #fff;
}

.cart-pill:hover {
    background: #fff;
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.2);
}

.nav-links a.cart-pill:hover {
    color: var(--ink);
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.2);
}

.button.secondary,
button.secondary {
    background: #edf5f2;
    color: var(--ink);
}

.page {
    padding: 2rem 0 4rem;
}

.hero,
.card,
.table-card,
.flash {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero,
.card,
.table-card {
    padding: 1.6rem;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 244, 0.86)),
        var(--panel);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -5% -40% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.17), transparent 65%);
    pointer-events: none;
}

.hero h1,
.hero h2,
.card h2,
.card h3 {
    margin-top: 0;
    line-height: 1.05;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    max-width: 11ch;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 58ch;
    color: var(--muted);
    font-size: 1.02rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.eyebrow,
.badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.mini-panel {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.mini-panel ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.mini-panel li + li {
    margin-top: 0.7rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.section-head h2,
.section-head h1 {
    margin: 0;
}

.section-head p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.split {
    grid-template-columns: 2fr 1fr;
    align-items: start;
}

.stats {
    grid-template-columns: repeat(4, 1fr);
    margin: 1.5rem 0;
}

.stat {
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 245, 0.9));
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.stat strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.grid {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.card {
    backdrop-filter: blur(10px);
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover {
    transform: translateY(-2px);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.product-card .meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.price {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

form {
    margin: 0;
}

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

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

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: #18332b;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid #cbdad4;
    background: rgba(252, 254, 253, 0.92);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    background: #fff;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid #e4ece8;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table-card {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.82);
}

.flash {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.flash-success {
    border-color: rgba(34, 197, 94, 0.25);
}

.flash-error {
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--danger);
}

.muted {
    color: var(--muted);
}

.toolbar {
    grid-template-columns: 1fr auto;
    margin-bottom: 1rem;
    align-items: center;
}

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

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill-list a {
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    color: var(--ink);
}

.pill-list a:hover,
.pill-list a.active {
    background: var(--accent-soft);
    border-color: rgba(15, 118, 110, 0.16);
}

@media (max-width: 900px) {
    .hero-grid,
    .split,
    .stats,
    .form-grid,
    .toolbar,
    .quick-links,
    .mfa-setup-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .nav-row {
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .hero h1 {
        max-width: none;
    }
}

.badge-danger {
    background: #fde7e7;
    color: #9f2d2d;
}

.out-of-stock-card {
    opacity: 0.82;
}

.stock-note {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #fff1f1;
    color: #9f2d2d;
    border: 1px solid rgba(159, 45, 45, 0.16);
    font-weight: 600;
}

.admin-out-of-stock-row {
    background: rgba(253, 231, 231, 0.45);
}

.admin-out-of-stock-row td {
    border-bottom-color: rgba(159, 45, 45, 0.14);
}

.stock-cell-danger {
    color: #9f2d2d;
    font-weight: 800;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #e9f1ed;
}

.product-image-placeholder,
.admin-product-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.admin-product-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    background: #e9f1ed;
}

.admin-product-image-preview {
    width: min(240px, 100%);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-top: 0.75rem;
    background: #e9f1ed;
}

.mfa-setup-grid {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    align-items: stretch;
}

.mfa-qr-card {
    text-align: center;
}

.mfa-qr-image {
    width: min(260px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
    margin: 1rem auto;
    padding: 0.9rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #d8e5df;
    box-shadow: var(--shadow-soft);
}

.code-break {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.mfa-qr-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    margin: 1rem auto;
    padding: 1.25rem;
    border-radius: 24px;
    background: #fff;
    border: 1px dashed #b9cbc4;
    color: var(--muted);
    text-align: center;
}

