:root {
    --primary: #15f2a1;
    --secondary: #082a36;
    --accent: #22dfff;
    --gold: #d6b25f;
    --bg-page: #02070b;
    --bg-surface: #071517;
    --border: #16383a;
    --text-main: #fbf9f8;
    --text-muted: #91aeb0;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(21, 242, 161, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
}

img,
svg,
video {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: none;
}

.hidden {
    display: none !important;
}

.container {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.nav-link,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.nav-link:hover,
.btn-outline:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.4rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.btn:disabled,
.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg-page);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-block {
    width: 100%;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.card-spaced {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.info-panel {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem 1.25rem;
}

.editor-box {
    min-height: 150px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.promo-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #166534;
    font-weight: 600;
}

.promo-hint {
    display: block;
    margin-top: 0.5rem;
    color: #166534;
    font-size: 0.9rem;
}

.text-divider {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-muted);
    font-weight: 600;
}

.helper-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.section-title {
    font-size: clamp(1.25rem, 1.75vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.checkbox-row input[type="checkbox"] {
    width: auto;
    height: auto;
    transform: scale(1.1);
}

.checkbox-row label {
    margin-bottom: 0;
    font-size: 0.95rem;
    cursor: pointer;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.cart-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-title {
    font-size: clamp(1.25rem, 1.75vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(17, 24, 39, 0.05);
}

.text-muted {
    color: var(--text-muted);
}

.small-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    nav {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .container {
        padding: 1rem;
    }
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 760px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.panel-block {
    margin-top: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

@media (max-width: 600px) {
    .btn {
        width: 100%;
    }

    .nav-link,
    .btn-outline {
        width: 100%;
    }
}

.text-center {
    text-align: center;
}

.code-input {
    text-align: center;
    letter-spacing: 0.35rem;
    font-size: 1.1rem;
}

html.dark-mode {
    background: #050505;
    color: #f8fafc;
}

html.dark-mode body {
    background: #050505;
    color: #f8fafc;
}

html.dark-mode header,
html.dark-mode footer,
html.dark-mode nav,
html.dark-mode .card,
html.dark-mode .info-panel,
html.dark-mode .editor-box,
html.dark-mode .order-card,
html.dark-mode .summary,
html.dark-mode .order-header,
html.dark-mode .order-total,
html.dark-mode .order-summary,
html.dark-mode .empty-state,
html.dark-mode .product-card,
html.dark-mode .profile-card,
html.dark-mode .settings-content,
html.dark-mode .settings-sidebar,
html.dark-mode .settings-menu-btn,
html.dark-mode .accordion-header,
html.dark-mode .hero {
    background: #111 !important;
    border-color: #2b2b2b !important;
    color: #f8fafc !important;
}

html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea,
html.dark-mode .search-input,
html.dark-mode .header-search-container input {
    background: #111 !important;
    color: #f8fafc !important;
    border-color: #333 !important;
}

html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode strong,
html.dark-mode .product-title,
html.dark-mode .pm-title,
html.dark-mode .item-price,
html.dark-mode .total-amount,
html.dark-mode .total-price,
html.dark-mode #total-amount,
html.dark-mode .order-value,
html.dark-mode .order-label,
html.dark-mode .order-date-val,
html.dark-mode .item-name,
html.dark-mode .item-qty {
    color: #fff !important;
}

html.dark-mode .logo {
    color: #fff !important;
}

html.dark-mode .btn-outline {
    color: #fff !important;
    border-color: #fff !important;
    background: transparent !important;
}

html.dark-mode .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

html.dark-mode .btn {
    background-color: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}

html.dark-mode .btn:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

html.dark-mode .item-qty {
    background: #1f2937 !important;
    color: #d1d5db !important;
}

html.dark-mode .order-total {
    border-top-color: #222 !important;
}

html.dark-mode .empty-state,
html.dark-mode .order-header,
html.dark-mode .accordion-content,
html.dark-mode .cart-table th,
html.dark-mode .cart-table td,
html.dark-mode .total-row,
html.dark-mode .summary-row,
html.dark-mode .item-row {
    background-color: #111 !important;
    border-color: #222 !important;
    color: #d1d5db !important;
}

html.dark-mode .track-line-bg {
    background: #333 !important;
}

html.dark-mode .step-counter {
    background: #111 !important;
    border-color: #333 !important;
    color: #d1d5db !important;
}

html.dark-mode .filter-btn,
html.dark-mode .filter-chip {
    background-color: #111 !important;
    color: #d1d5db !important;
    border-color: #333 !important;
}

html.dark-mode .filter-btn:hover,
html.dark-mode .filter-btn.active,
html.dark-mode .filter-chip.active {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

html.dark-mode .dropdown-menu {
    background: #111 !important;
    border-color: #333 !important;
}

html.dark-mode .dropdown-menu a {
    color: #ccc !important;
}

html.dark-mode .dropdown-menu a:hover {
    background: #222 !important;
    color: #fff !important;
}

html.dark-mode .sp-media {
    background: transparent !important;
}

html.dark-mode .profile-info h2,
html.dark-mode .profile-info p {
    color: #fff !important;
}

html.dark-mode .sp-description,
html.dark-mode .pm-description {
    color: #ccc !important;
}

html.dark-mode div:where(.swal2-container) div:where(.swal2-popup) {
    background-color: #111 !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}

html.dark-mode div:where(.swal2-title) {
    color: #fff !important;
}

html.dark-mode div:where(.swal2-html-container) {
    color: #ccc !important;
}