/* ============================================
   REALIPOTRADE — COMPONENT STYLES
   ============================================ */

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.brand-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.brand-highlight {
    color: var(--color-primary);
}

.navbar-center {
    flex: 1;
    max-width: 480px;
    margin: 0 24px;
}

.navbar-search {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--color-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-balance {
    text-align: right;
}

.balance-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.balance-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Profile Dropdown */
.navbar-profile {
    position: relative;
    cursor: pointer;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Profile page header row */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info h3 {
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-action {
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .profile-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .profile-action {
        margin-left: 0;
        width: 100%;
    }

    .profile-action .btn,
    .profile-action .badge {
        width: 100%;
        text-align: center;
    }
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.status-indicator.verified { background: var(--color-success); }
.status-indicator.unverified { background: var(--color-warning); }

/* Dropdown */
.dropdown-trigger { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.dropdown-trigger:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
}

.dropdown-user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.dropdown-user-email {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    opacity: 1;
}

.dropdown-item-danger {
    color: var(--color-error);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 260px;
    height: calc(100vh - 64px);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 999;
    padding: 0;
    transition: width 0.25s ease;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.sidebar-collapse-btn {
    position: fixed;
    top: calc(50vh + 32px); /* 50vh + half of navbar height */
    left: 260px;
    transform: translate(-1px, -50%);
    width: 22px;
    height: 44px;
    border-radius: 0 6px 6px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: left 0.25s ease, color 0.2s, border-color 0.2s, background 0.2s;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.sidebar-collapse-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--bg-card-hover);
}

.sidebar.collapsed .sidebar-collapse-btn {
    left: 64px;
}

.sidebar.collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

.sidebar:not(.collapsed) .sidebar-collapse-btn svg {
    transform: rotate(0deg);
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .sidebar-section-label {
    text-align: center;
    padding: 16px 0 8px;
    font-size: 0.5rem;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
    border-left-width: 2px;
}

.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-badge {
    display: none;
}

.sidebar.collapsed .sidebar-icon {
    margin: 0;
}

.sidebar-section-label {
    padding: 16px 20px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    opacity: 1;
}

.sidebar-item.active {
    color: var(--color-primary);
    background: rgba(8, 203, 0, 0.05);
    border-left-color: var(--color-primary);
}

.sidebar-item-admin.active {
    color: var(--color-info);
    border-left-color: var(--color-info);
    background: rgba(41, 182, 246, 0.05);
}

.sidebar-icon {
    flex-shrink: 0;
}

.sidebar-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}

.sidebar-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}

.badge-green { background: rgba(0, 230, 118, 0.15); color: var(--color-success); }
.badge-purple { background: rgba(156, 39, 176, 0.15); color: #CE93D8; }
.badge-admin { background: rgba(41, 182, 246, 0.15); color: var(--color-info); }

/* ============================================
   SIDEBAR MOBILE FOOTER
   ============================================ */

.sidebar-mobile-footer {
    display: none;
    flex-direction: column;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-mobile-theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    margin-bottom: 16px;
    transition: background 0.2s, border-color 0.2s;
}

.sidebar-mobile-theme-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-primary);
}

.sidebar-mobile-theme-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-mobile-theme-btn .sun-icon { display: none; }
.sidebar-mobile-theme-btn .moon-icon { display: block; }

[data-theme="light"] .sidebar-mobile-theme-btn .sun-icon { display: block; }
[data-theme="light"] .sidebar-mobile-theme-btn .moon-icon { display: none; }

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-body { }
.card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Stat Card */
.stat-card {
    padding: 20px;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    margin-top: 4px;
}

.stat-change.positive { color: var(--color-success); }
.stat-change.negative { color: var(--color-error); }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { opacity: 0.9; }

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--bg-card-hover);
}

.btn-success {
    background: var(--color-success);
    color: #000;
}

.btn-danger {
    background: var(--color-error);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 4px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Checkbox / Toggle */
.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    transition: background 0.2s;
    position: relative;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
    background: var(--color-primary);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}

tr:hover td {
    background: var(--bg-card-hover);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success { background: rgba(0, 230, 118, 0.12); color: var(--color-success); }
.badge-warning { background: rgba(255, 193, 7, 0.12); color: var(--color-warning); }
.badge-error { background: rgba(255, 59, 59, 0.12); color: var(--color-error); }
.badge-info { background: rgba(41, 182, 246, 0.12); color: var(--color-info); }
.badge-neutral { background: rgba(153, 153, 153, 0.12); color: var(--text-secondary); }

/* ============================================
   TOASTS
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 420px;
    animation: toastSlideIn 0.3s ease;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(0, 230, 118, 0.15); color: var(--color-success); }
.toast-error .toast-icon { background: rgba(255, 59, 59, 0.15); color: var(--color-error); }
.toast-warning .toast-icon { background: rgba(255, 193, 7, 0.15); color: var(--color-warning); }
.toast-info .toast-icon { background: rgba(41, 182, 246, 0.15); color: var(--color-info); }

.toast-message {
    flex: 1;
    font-size: 0.85rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
}

.toast-close:hover { color: var(--text-primary); }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   SKELETON LOADERS
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-card {
    height: 160px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: width 1s ease;
}

.progress-fill-info {
    background: linear-gradient(135deg, #29B6F6, #0288D1);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.page-item:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.page-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-inverse);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    max-width: 360px;
    margin-bottom: 20px;
}

/* ============================================
   PRICE DISPLAY
   ============================================ */

.price-up { color: var(--chart-up); }
.price-down { color: var(--chart-down); }
.price-change { font-size: 0.8rem; font-weight: 600; }

/* ============================================
   ASSET ROW (for listings)
   ============================================ */

.asset-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
}

.asset-row:hover {
    background: var(--bg-card-hover);
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.asset-info {
    flex: 1;
}

.asset-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.asset-symbol {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.asset-price {
    text-align: right;
}

.asset-price-value {
    font-weight: 700;
    font-size: 0.95rem;
}

/* ============================================
   QUICK STATS ROW
   ============================================ */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.quick-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 0 2px 2px 0;
}

.quick-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.quick-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 48px 24px 24px;
    margin-top: 48px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 48px;
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-column h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.social-telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.social-email:hover {
    background: #EA4335;
    border-color: #EA4335;
}

.social-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   LANDING PAGE SPECIFIC
   ============================================ */

.landing-page {
    background: #000;
}

.landing-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center top, rgba(8, 203, 0, 0.08), transparent 60%);
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(8, 203, 0, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(8, 203, 0, 0.2), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(8, 203, 0, 0.3), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(8, 203, 0, 0.2), transparent);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(8, 203, 0, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-bottom: 32px;
    background: rgba(8, 203, 0, 0.05);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    max-width: 800px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 64px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Landing Sections */
.landing-section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.landing-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 16px;
}

.landing-section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(8, 203, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CTA Section */
.landing-cta {
    background: linear-gradient(135deg, rgba(8, 203, 0, 0.05), transparent);
    border: 1px solid rgba(8, 203, 0, 0.2);
    border-radius: 24px;
    padding: 80px 48px;
    text-align: center;
    margin: 0 24px;
}

.landing-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 16px;
}

/* ============================================
   ADMIN PANEL SPECIFIC
   ============================================ */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.admin-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
}

.admin-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-collapse-btn {
        display: none; /* hide arrow on mobile */
    }

    .sidebar.collapsed {
        width: 260px; /* ignore collapsed state on mobile */
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content.has-sidebar {
        margin-left: 0;
    }

    .main-content.has-sidebar.sidebar-collapsed {
        margin-left: 0; /* ignore collapsed state on mobile */
    }

    .navbar-center {
        display: none;
    }

    .navbar-balance {
        display: none;
    }

    .navbar-right > .theme-toggle {
        display: none;
    }

    .sidebar-mobile-footer {
        display: flex;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 24px;
    }

    .landing-cta {
        padding: 48px 24px;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   AUTH PAGES (Login, Register, etc.)
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(8, 203, 0, 0.03), transparent 50%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-decoration: none;
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .input-with-icon {
    position: relative;
}

.auth-form .input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-form .input-with-icon .form-input {
    padding-left: 44px;
}

.auth-form .input-with-icon .form-input:focus ~ .input-icon {
    color: var(--color-primary);
}

/* Form Errors */
.form-errors {
    margin-bottom: 20px;
}

.alert-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 59, 59, 0.1);
    border: 1px solid rgba(255, 59, 59, 0.3);
    border-radius: 8px;
    color: #FF3B3B;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.alert-error svg {
    flex-shrink: 0;
    color: #FF3B3B;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--color-primary);
}

/* Password Strength Meter */
.password-strength {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Auth social buttons (placeholders) */
.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-social .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Auth brand logo SVG */
.auth-brand-svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* OTP Input */
.otp-input {
    font-family: 'Inter', monospace;
    letter-spacing: 12px !important;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 12px;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.otp-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* ============================================
   CHARTS
   ============================================ */

.chart-range-btn.active {
    background: var(--color-primary) !important;
    color: var(--text-inverse) !important;
    border-color: var(--color-primary) !important;
}

.chart-range-btn {
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
    border: 1px solid var(--border-color) !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.chart-range-btn:hover {
    border-color: var(--text-muted) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   SEARCH RESULTS DROPDOWN
   ============================================ */

.navbar-search {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}

.search-results.open {
    display: block;
}

.search-result-header {
    padding: 10px 16px 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-result-item:last-child {
    border-radius: 0 0 12px 12px;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-result-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.search-result-price {
    text-align: right;
    flex-shrink: 0;
}

.search-result-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Custom scrollbar for results */
.search-results::-webkit-scrollbar {
    width: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* ============================================
   CLICKABLE TABLE ROWS
   ============================================ */

.clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.clickable-row:hover {
    background: var(--bg-card-hover) !important;
}

.clickable-row td a.btn {
    pointer-events: auto;
}

/* ============================================
   STATIC PAGES (About, Contact, Privacy, etc.)
   ============================================ */

.static-page {
    min-height: 100vh;
    background: var(--bg-main);
}

.static-hero {
    text-align: center;
    padding: 80px 24px 48px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
}

.static-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.static-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.static-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.static-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 16px;
}

.static-content h2:first-child {
    margin-top: 0;
}

.static-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.static-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.static-content ul li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.static-content ul li strong {
    color: var(--text-primary);
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-card p {
    margin-bottom: 0;
}

.contact-card a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ============================================
   FLOATING CHAT BUTTON
   ============================================ */

.chat-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: chatGlow 2s ease-in-out infinite;
}

.chat-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    animation: none;
}

@keyframes chatGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 0 var(--color-primary-glow);
    }
    50% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 24px 12px var(--color-primary-glow);
    }
}

.chat-floating-btn svg {
    width: 26px;
    height: 26px;
}

.chat-floating-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
