:root {
    /* Layout & Structure */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Variable Default Fallbacks (will be overridden by themes) */
    --bg-dark: #0f1115;
    --bg-surface: #16191e;
    --bg-card: rgba(22, 25, 30, 0.7);
    --bg-sidebar: #0f1115;
    --primary: var(--primary);
    --primary-light: #e6c152;
    --primary-rgb: var(--primary-rgb);
    --accent: #ff4d4d;
    --accent-rgb: 255, 77, 77;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --calendar-filter: invert(1) brightness(1.2);
    
    /* Shadow tokens */
    --card-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    --card-hover-shadow: 0 15px 40px -10px rgba(0,0,0,0.6);

    /* Helper Colors */
    --success: #00ff7f;
    --warning: #f59e0b;
    --danger: #ff4d4d;
    --info: #60a5fa;
    --white: #ffffff;
    --white-rgb: 255, 255, 255;
    --black: #000000;
    --black-rgb: 0, 0, 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Body Style */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .stat-value-premium {
    font-family: 'Outfit', sans-serif;
}

/* App Skeleton */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-dark);
    position: relative;
    transition: var(--transition);
}

.page-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    -webkit-overflow-scrolling: touch;
}

/* Lucide Icons Global Rule 10 */
[data-lucide], [data-lucide] svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.icon-lucide {
    width: 18px;
    height: 18px;
}

.icon-xs, .icon-xs svg { width: 12px; height: 12px; }
.icon-sm, .icon-sm svg { width: 14px; height: 14px; }
.icon-md, .icon-md svg { width: 16px; height: 16px; }
.icon-lg, .icon-lg svg { width: 24px; height: 24px; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

input[type="radio" i]{
    display: none;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.3);
}

/* --- TICKER (MARQUEE) --- */
.ticker-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    position: relative !important;
    padding: 12px 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.ticker-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    min-width: 100% !important;
    animation: ticker-loop 40s linear infinite !important;
}

.ticker-item {
    padding: 0 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

@keyframes ticker-loop {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused !important;
}
/* Public Navigation */
.public-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.btn-sell-vender {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-sell-vender:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
}

.btn-sell-vender i {
    width: 16px;
    height: 16px;
}

.public-navigation .btn-dark,
.public-navigation .btn-primary,
.public-navigation .btn-nav-register-mobile,
.public-navigation .btn-sell-vender {
    height: 40px;
    padding: 10px 18px;
    font-size: 14px;
}

.public-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-menu {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.public-navigation {
    position: relative;
}

/* Public Nav Dropdown */
.public-nav-dropdown {
    position: relative;
}

.btn-nav-dropdown,
.btn-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-nav-dropdown:hover,
.btn-nav-link:hover {
    border-color: var(--primary);
    color: var(--white);
    background: var(--primary);
}

.btn-nav-dropdown .chevron-sm {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.public-nav-dropdown.active .btn-nav-dropdown .chevron-sm {
    transform: rotate(180deg);
}

.public-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.public-nav-dropdown.active .public-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.public-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.public-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.public-dropdown-menu .dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.public-dropdown-menu .dropdown-item i {
    color: var(--primary);
}

/* Mobile Toggle Button */
.public-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.public-mobile-toggle:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 992px) {
    .public-mobile-toggle {
        display: flex;
        background: transparent;
        border: 1px solid var(--border);
        color: var(--text-main);
    }

    .public-mobile-toggle:active {
        transform: scale(0.9);
        background: rgba(var(--primary-rgb), 0.1);
    }

    .public-menu {
        position: fixed;
        top: 88px; /* Altura do header */
        left: 0;
        width: 100%;
        background: var(--header-bg, var(--bg-surface, #ffffff));
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 2px solid var(--primary);
        padding: 24px;
        display: none !important;
        flex-direction: column;
        z-index: 1001;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

    .public-menu.active {
        display: flex !important;
    }

    .public-navigation {
        flex-direction: column;
        width: 100%;
        gap: 12px !important;
    }

    .public-nav-dropdown, 
    .btn-nav-link, 
    .btn-nav-dropdown,
    .btn-favorites-topbar {
        width: 100% !important;
        justify-content: flex-start !important;
        background: var(--bg-card, var(--bg-dark, #f8fafc)) !important;
        border: 1px solid var(--border, #e5e7eb) !important;
        color: var(--text-main, #1f2937) !important;
    }

    .public-navigation .btn-sell-vender,
    .public-navigation .btn-primary,
    .public-navigation .btn-nav-register-mobile {
        width: 100% !important;
        justify-content: center !important;
        background: var(--primary) !important;
        border-color: var(--primary) !important;
        color: #ffffff !important;
        font-weight: 800 !important;
        margin-top: 4px;
        height: 44px;
        border-radius: 12px;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .public-navigation .btn-dark {
        width: 100% !important;
        background: var(--primary) !important;
        border: 1px solid var(--primary) !important;
        justify-content: center !important;
        color: #ffffff !important;
        height: 44px;
        border-radius: 12px;
        margin-top: 4px;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .public-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-surface, #ffffff);
        margin-top: 5px;
        display: none;
        width: 100%;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 10px;
    }

    .public-dropdown-menu .dropdown-item {
        color: var(--text-main, #1f2937) !important;
        border-bottom: 1px solid var(--border, #e5e7eb);
    }

    .public-dropdown-menu .dropdown-item:hover {
        background: rgba(var(--primary-rgb), 0.08);
        color: var(--primary) !important;
    }

    .public-nav-dropdown.active .public-dropdown-menu {
        display: block;
    }
}

.public-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}

.public-logo i {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.public-logo span:last-child {
    color: var(--primary);
}

.btn-login-outline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-login-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Layout Adjustments */
.public-layout .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.public-layout .page-content {
    padding: 0 !important;
}

/* --- Quick Utilities --- */
.flex, .d-flex { display: flex; }
.flex-1 { flex: 1; }
.flex-column { flex-direction: column; }
.items-center, .align-items-center { align-items: center; }
.items-start, .align-items-start { align-items: flex-start; }
.justify-between, .justify-content-between { justify-content: space-between; }
.justify-center, .justify-content-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.w-full, .w-100 { width: 100%; }
.h-full, .h-100 { height: 100%; }

.m-0 { margin: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-850 { font-weight: 850; }
.fw-900 { font-weight: 900; }

.text-sm { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }

.hidden { display: none !important; }
