:root {
    --zl-bg: #040706;
    --zl-bg-2: #08110d;
    --zl-panel: rgba(12, 18, 15, 0.94);
    --zl-panel-2: rgba(17, 27, 22, 0.9);
    --zl-panel-3: rgba(22, 32, 27, 0.82);
    --zl-border: rgba(221, 180, 84, 0.16);
    --zl-border-strong: rgba(221, 180, 84, 0.26);
    --zl-border-green: rgba(64, 148, 103, 0.2);
    --zl-gold: #d9b45a;
    --zl-gold-2: #b98b32;
    --zl-green: #3b8f61;
    --zl-green-2: #24613f;
    --zl-text: #f3f5ef;
    --zl-muted: #98a69c;
    --zl-subtle: #6f7d73;
}

html {
    background: var(--zl-bg);
}

body.zl-theme,
body.zl-guest {
    min-height: 100vh;
    color: var(--zl-text) !important;
    background:
        radial-gradient(circle at 18% 4%, rgba(217, 180, 90, 0.11), transparent 28rem),
        radial-gradient(circle at 86% 6%, rgba(59, 143, 97, 0.10), transparent 30rem),
        linear-gradient(135deg, #030504 0%, #07100d 48%, #0b110d 100%) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.zl-app-main {
    background:
        linear-gradient(180deg, rgba(217, 180, 90, 0.045), transparent 22rem),
        var(--zl-bg);
}

.zl-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #06110c;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--zl-gold), var(--zl-green));
    box-shadow: 0 16px 40px rgba(245, 197, 86, 0.18), inset 0 1px 0 rgba(255,255,255,0.45);
}

.zl-brand-logo {
    display: inline-block;
    width: auto;
    height: 62px;
    max-width: 205px;
    object-fit: contain;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
}

.zl-brand-logo-sm {
    height: 36px;
    max-width: 150px;
}

.zl-brand-logo-lg {
    height: 72px;
    max-width: 230px;
}

.zl-sidebar {
    background:
        linear-gradient(180deg, rgba(217, 180, 90, 0.075), transparent 16rem),
        linear-gradient(180deg, #06100c 0%, #08120e 48%, #030504 100%) !important;
    border-right: 1px solid var(--zl-border);
    box-shadow: 18px 0 70px rgba(0, 0, 0, 0.42);
}

.zl-sidebar-header {
    border-bottom: 1px solid var(--zl-border) !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)) !important;
}

.zl-profile-card,
.zl-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.022)) !important;
    border: 1px solid var(--zl-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 46px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.zl-profile-card {
    padding: 0.85rem !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,0.035) !important;
}

.zl-nav-link {
    color: #d7e1da !important;
    border: 1px solid transparent;
    min-height: 42px;
    font-size: 0.86rem;
    letter-spacing: 0.005em;
}

.zl-nav-link:hover,
.zl-nav-link.zl-active {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(217, 180, 90, 0.14), rgba(59, 143, 97, 0.09)) !important;
    border-color: rgba(217, 180, 90, 0.22);
    box-shadow: inset 2px 0 0 var(--zl-gold);
}

.zl-sidebar nav a,
.zl-sidebar nav button {
    color: #d7e1da !important;
    border: 1px solid transparent;
}

.zl-sidebar nav a:hover,
.zl-sidebar nav button:hover,
.zl-sidebar nav .bg-green-700,
.zl-sidebar nav .bg-green-800 {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(217, 180, 90, 0.14), rgba(59, 143, 97, 0.09)) !important;
    border-color: rgba(217, 180, 90, 0.22);
    box-shadow: inset 2px 0 0 var(--zl-gold);
}

.zl-shell :is(.bg-white, .bg-gray-50, .bg-gray-100, .from-slate-50, .via-blue-50, .to-green-50) {
    background: var(--zl-panel) !important;
}

.zl-shell :is(.text-gray-900, .text-gray-800, .text-gray-700) {
    color: var(--zl-text) !important;
}

.zl-shell :is(.text-gray-600, .text-gray-500, .text-gray-400) {
    color: var(--zl-muted) !important;
}

.zl-shell :is(.border-gray-100, .border-gray-200, .border-gray-300, .ring-gray-200, .divide-gray-100, .divide-gray-200) {
    border-color: rgba(245, 197, 86, 0.14) !important;
    --tw-ring-color: rgba(245, 197, 86, 0.14) !important;
}

.zl-shell :is(.shadow, .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl) {
    box-shadow: 0 18px 46px rgba(0,0,0,0.22) !important;
}

.zl-shell :is(.rounded-lg, .rounded-xl, .rounded-2xl) {
    border-radius: 16px;
}

.zl-shell table {
    color: var(--zl-text);
}

.zl-shell thead {
    background: rgba(217, 180, 90, 0.075) !important;
}

.zl-shell tbody,
.zl-shell tr {
    background: rgba(10, 16, 14, 0.78) !important;
}

.zl-shell tr {
    border-color: rgba(245, 197, 86, 0.12) !important;
}

.zl-shell td,
.zl-shell th {
    color: var(--zl-text) !important;
    border-color: rgba(245, 197, 86, 0.12) !important;
}

.zl-shell input,
.zl-shell select,
.zl-shell textarea,
.zl-guest input,
.zl-guest select,
.zl-guest textarea {
    background: rgba(4, 8, 7, 0.82) !important;
    border: 1px solid rgba(217, 180, 90, 0.2) !important;
    color: var(--zl-text) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.zl-shell input::placeholder,
.zl-shell textarea::placeholder,
.zl-guest input::placeholder,
.zl-guest textarea::placeholder {
    color: rgba(168, 180, 172, 0.72);
}

.zl-shell input:focus,
.zl-shell select:focus,
.zl-shell textarea:focus,
.zl-guest input:focus,
.zl-guest select:focus,
.zl-guest textarea:focus {
    border-color: var(--zl-gold) !important;
    box-shadow: 0 0 0 3px rgba(245, 197, 86, 0.14) !important;
    outline: none !important;
}

.zl-button,
.zl-shell button[type="submit"],
.zl-shell .bg-green-600,
.zl-shell .bg-blue-600,
.zl-shell .from-green-600,
.zl-guest button[type="submit"] {
    background: linear-gradient(135deg, #d9b45a, #9b742d) !important;
    color: #080b08 !important;
    border: 0 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 30px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.32) !important;
}

.zl-button:hover,
.zl-shell button[type="submit"]:hover,
.zl-guest button[type="submit"]:hover {
    filter: brightness(1.08);
}

.zl-hero {
    background:
        radial-gradient(circle at 88% 12%, rgba(217, 180, 90, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(18, 36, 28, 0.96), rgba(7, 13, 10, 0.96)),
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)) !important;
    border: 1px solid var(--zl-border-strong);
    box-shadow: 0 28px 80px rgba(0,0,0,0.34), 0 0 42px rgba(217, 180, 90, 0.07);
    position: relative;
    overflow: hidden;
}

.zl-stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)) !important;
    border: 1px solid var(--zl-border) !important;
    border-left: 2px solid var(--zl-gold) !important;
}

.zl-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    color: #06110c;
    font-size: 0.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #d9b45a, #b98b32);
}

.zl-referral-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow-wrap: anywhere;
}

.zl-referral-field {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
    padding: 0.45rem;
    border-radius: 12px;
    background: rgba(4, 8, 7, 0.72);
    border: 1px solid rgba(217, 180, 90, 0.18);
}

.zl-referral-field input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    padding: 0.55rem 0.7rem;
    color: var(--zl-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.83rem;
    box-shadow: none !important;
}

.zl-copy-button {
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    color: #080b08;
    background: linear-gradient(135deg, #d9b45a, #a77c2f);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.zl-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.zl-metric-tile {
    border-radius: 13px;
    padding: 1rem;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(217,180,90,0.13);
}

.zl-shell :is(.text-blue-600, .text-purple-600, .text-pink-600, .text-indigo-600, .text-red-600, .text-orange-600) {
    color: var(--zl-gold) !important;
}

.zl-shell :is(.text-green-600, .text-emerald-600, .text-teal-600) {
    color: #8bc7a0 !important;
}

.zl-shell :is(.bg-blue-100, .bg-purple-100, .bg-pink-100, .bg-indigo-100, .bg-red-100, .bg-orange-100, .bg-yellow-100, .bg-green-100, .bg-emerald-100, .bg-teal-100) {
    background: rgba(217, 180, 90, 0.11) !important;
}

.zl-shell :is(.border-blue-500, .border-purple-500, .border-pink-500, .border-indigo-500, .border-red-500, .border-orange-500, .border-yellow-500, .border-green-500, .border-emerald-500, .border-teal-500) {
    border-color: var(--zl-gold) !important;
}

.zl-shell :is(.from-blue-50, .to-blue-100, .from-green-50, .to-green-100, .from-purple-50, .to-purple-100, .from-yellow-50, .to-yellow-100, .from-pink-50, .to-pink-100) {
    --tw-gradient-from: rgba(255,255,255,0.045) !important;
    --tw-gradient-to: rgba(255,255,255,0.02) !important;
}

.zl-guest-card {
    background: rgba(8, 13, 11, 0.88) !important;
    border: 1px solid var(--zl-border) !important;
    border-radius: 22px !important;
    box-shadow: 0 28px 80px rgba(0,0,0,0.52), 0 0 45px rgba(217, 180, 90, 0.08) !important;
    backdrop-filter: blur(18px);
}

@media (max-width: 640px) {
    .zl-shell .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .zl-shell h1 {
        font-size: 1.7rem !important;
        line-height: 2rem !important;
    }

    .zl-shell .text-3xl {
        font-size: 1.55rem !important;
        line-height: 2rem !important;
    }

    .zl-shell .flex.gap-4 {
        flex-wrap: wrap;
    }

    .zl-shell table {
        min-width: 720px;
    }

    .zl-referral-field {
        flex-direction: column;
    }

    .zl-copy-button {
        width: 100%;
    }

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