:root {
    color-scheme: dark;
    --bg: #07111f;
    --panel: #111c2f;
    --panel-2: #16253b;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f5f7fb;
    --muted: #95a3b8;
    --accent: #f97316;
    --accent-2: #fb923c;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.mobile-only {
    display: none;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(7, 17, 31, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
}

.mobile-nav-item {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
}

.mobile-nav-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.breadcrumb {
    color: var(--muted);
    font-size: 13px;
}

auth-screen,
.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #13213d 0%, var(--bg) 100%);
}

.auth-card {
    width: min(100%, 430px);
    background: rgba(17, 28, 47, 0.95);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 800;
}

.auth-form,
.form-grid {
    display: grid;
    gap: 10px;
}

.auth-form.hidden,
.hidden {
    display: none !important;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    align-items: start;
}

label input[type="checkbox"],
label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}

label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.payment-method-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 10px 0 14px;
}

.payment-method-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.payment-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-option img {
    width: 100%;
    max-width: 150px;
    height: 84px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px;
}

.payment-method-option span {
    font-weight: 700;
    color: var(--text);
}

.payment-method-option.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.16), 0 14px 30px rgba(249, 115, 22, 0.14);
    transform: translateY(-2px);
}

.premium-payment-fields {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.premium-field {
    display: grid;
    gap: 8px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.premium-field-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.premium-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(7, 17, 31, 0.76);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.premium-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

input,
select,
textarea {
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
}

textarea {
    min-height: 88px;
    resize: vertical;
}

@media (max-width: 700px) {
    .payment-method-selector {
        grid-template-columns: 1fr;
    }
}

.location-map {
    width: 100%;
    height: 300px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.map-status {
    color: var(--muted);
    font-size: 12px;
    margin-top: 8px;
}

.location-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.location-chip {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
}

.location-chip.active {
    border-color: var(--accent);
    color: var(--accent);
}

.location-pin-wrapper {
    background: transparent;
    border: none;
}

.location-pin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 3px solid white;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
    position: relative;
}

.location-pin::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.leaflet-control-layers {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.leaflet-control-layers-toggle {
    background-color: rgba(17, 28, 47, 0.95);
}

.primary-btn,
.ghost-btn,
.danger-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.favorite-btn.active {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.35);
}

.primary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.favorite-btn:active {
    transform: scale(0.98);
}

.primary-btn.is-busy,
.ghost-btn.is-busy,
.danger-btn.is-busy {
    opacity: 0.85;
    filter: saturate(0.9);
    pointer-events: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--border);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(7, 17, 31, 0.96);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .app-shell {
        display: flex;
        flex-direction: row;
        width: 100%;
        min-width: 0;
        align-items: stretch;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        align-self: flex-start;
        width: 250px;
        flex-shrink: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .nav-links {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .main-panel {
        margin-left: 250px;
        flex: 1;
        min-width: 0;
        width: 100%;
        max-width: none;
    }

    .content {
        flex: 1;
        min-width: 0;
        width: 100%;
        max-width: none;
    }
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-bottom: 8px;
}

.nav-item {
    text-align: left;
    border: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
}

.nav-item.active {
    background: rgba(249, 115, 22, 0.16);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-panel {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    gap: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 24, 40, 0.86);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hero-actions input,
.toolbar input[type="search"],
input[type="search"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 999px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-actions input:focus,
.toolbar input[type="search"]:focus,
input[type="search"]:focus {
    border-color: rgba(249, 115, 22, 0.9);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.hero-card,
.panel-card,
.card,
.item-card {
    background: rgba(17, 28, 47, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chip {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
}

.chip.active {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.45);
    color: #fdba74;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.16);
    color: #fdba74;
    font-size: 0.8rem;
}

.muted {
    color: var(--muted);
}

.refund-confirmation-note {
    padding: 10px 12px;
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 12px;
    background: rgba(249, 115, 22, 0.08);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.empty-state {
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    color: var(--muted);
}

.action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stack {
    display: grid;
    gap: 12px;
}

.item-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toast-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: grid;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(17, 28, 47, 0.95);
    border: 1px solid var(--border);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 2147483647;
}

.modal-card {
    width: min(100%, 720px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(17, 28, 47, 0.98), rgba(22, 37, 59, 0.95));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
}

.modal-header,
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.customer-panel .item-card .modal-actions {
    align-items: stretch;
}

.customer-panel .item-card .contact-actions {
    margin-top: 8px;
}

.customer-panel .item-card .contact-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.customer-panel .item-card .contact-actions {
    justify-content: flex-start;
}

.customer-panel .item-card .contact-actions > .contact-icon-link {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 40px;
}

.customer-panel .item-card .contact-actions > .contact-icon-link:not(.watch-video-button) {
    margin-right: auto !important;
}

.customer-panel .item-card .contact-actions > .contact-icon-link.watch-video-button {
    margin-left: auto !important;
}

.customer-panel .item-card .buy-action {
    flex: 0 0 auto;
}

.customer-panel .item-card .contact-icon-link {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-2);
}

.customer-panel .item-card .contact-icon-link:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: none;
}

.customer-panel .item-card .contact-icon-link svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.customer-panel .item-card .social-icon-link {
    color: var(--text);
}

.customer-panel .item-card .modal-actions > .primary-btn,
.customer-panel .item-card .modal-actions > .ghost-btn,
.customer-panel .item-card .modal-actions > a {
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
    white-space: nowrap;
}

.customer-panel .item-card .modal-actions > .favorite-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}

@media (min-width: 1200px) {
    .customer-panel #homeContent,
    .customer-panel .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .customer-panel #homeContent,
    .customer-panel .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-panel .watch-video-button {
        flex-grow: 1.15;
        padding: 11px 8px;
        font-size: 0.8rem;
    }
}

.modal-body {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.mobile-nav {
    display: none;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: 96px;
    }

    .sidebar {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1400;
        width: min(320px, 84vw);
        transform: translateX(-102%);
        transition: transform 220ms ease;
        border-radius: 0 22px 22px 0;
        box-shadow: 24px 0 80px rgba(0, 0, 0, 0.35);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar .sidebar-close {
        display: inline-flex;
    }

    .mobile-nav-sheet {
        position: fixed;
        inset: 0;
        z-index: 1500;
        display: none;
        background: rgba(0, 0, 0, 0.35);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .mobile-nav-sheet.open {
        display: block;
    }

    .mobile-nav-sheet__panel {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(340px, 92vw);
        max-width: 340px;
        height: 100%;
        display: flex;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 220ms ease;
        overflow: hidden;
        padding: 20px 16px 16px;
        border-radius: 0 24px 24px 0;
        background: linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(11, 25, 42, 0.98));
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 24px 0 80px rgba(0, 0, 0, 0.45);
    }

    .mobile-nav-sheet.open .mobile-nav-sheet__panel {
        transform: translateX(0);
    }

    .mobile-nav-sheet__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-nav-sheet__footer {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        justify-content: center;
    }

    .mobile-nav-sheet__footer .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-nav-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow: auto;
        padding-right: 4px;
    }

    .mobile-nav-list .nav-item {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 14px;
        color: var(--text);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-nav-list .nav-item.active {
        background: rgba(249, 115, 22, 0.16);
        color: white;
        border-color: rgba(249, 115, 22, 0.24);
    }

    .mobile-only {
        display: inline-flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .main-panel {
        padding: 16px 16px calc(16px + 88px);
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .topbar-start {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }

    .notification-card {
        padding: 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .notification-card.unread {
        border-color: rgba(249, 115, 22, 0.45);
        background: rgba(249, 115, 22, 0.12);
    }
}