:root {
    --accent-rgb: 192, 132, 252;
    --glow-rgb: 59, 130, 246;
    --grid-rgb: 148, 163, 184;
    --steel-rgb: 100, 116, 139;
    --bg-primary: #06040c;
    --bg-secondary: #090612;
    --bg-card: #0e0a18;
    --bg-card-hover: #130f1f;
    --bg-elevated: #161024;
    --border-subtle: transparent;
    --border-default: transparent;
    --border-hover: transparent;
    --accent: #c084fc;
    --accent-light: #e9d5ff;
    --accent-glow: rgba(var(--glow-rgb), 0.38);
    --accent-gradient: linear-gradient(135deg, #e9d5ff 0%, #c084fc 35%, #7c3aed 70%, #4c1d95 100%);
    --accent-soft: #a855f7;
    --accent-bright: #d8b4fe;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.08);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 36px rgba(var(--glow-rgb), 0.14), 0 0 60px rgba(var(--accent-rgb), 0.08);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* ==============================
   LAYOUT
   ============================== */
.user-layout { display: flex; min-height: 100vh; }

/* ==============================
   SIDEBAR
   ============================== */
.user-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: none;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 0.75rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.5px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
    transition: transform var(--transition-medium);
}

.nav-item:hover {
    background: rgba(var(--accent-rgb), 0.06);
    color: var(--accent-light);
    transform: translateX(2px);
}

.nav-item.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-light);
    font-weight: 600;
}

.nav-item.active::before { transform: translateY(-50%) scaleY(1); }

.nav-item svg {
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }

.nav-logout { margin-top: auto; }
.nav-logout:hover { color: var(--danger); }

/* ==============================
   MAIN CONTENT
   ============================== */
.user-main {
    margin-left: 260px;
    flex: 1;
    padding: 2.5rem 3rem;
    min-height: 100vh;
    position: relative;
}

.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.user-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* ==============================
   STATUS BADGE
   ============================== */
.status-badge {
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.3px;
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-badge.online {
    background: var(--success-bg);
    color: #4ade80;
    border: none;
}
.status-badge.online::before {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: statusPulse 2s infinite;
}

.status-badge.offline {
    background: var(--danger-bg);
    color: #f87171;
    border: none;
}
.status-badge.offline::before { background: var(--danger); }

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--success); }
    50% { opacity: 0.4; box-shadow: 0 0 2px var(--success); }
}

/* ==============================
   CARDS GRID (Dashboard)
   ============================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.info-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.info-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.info-card:hover::after { opacity: 1; }

.card-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.card-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hwid-val {
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

/* ==============================
   SECTION CARDS (Dashboard links)
   ============================== */
.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.section-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    text-decoration: none;
    transition: all var(--transition-medium);
    display: block;
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(var(--accent-rgb), 0.04), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.section-card:hover {
    transform: translateY(-4px);
}
.section-card:hover::before { opacity: 1; }

.section-card h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.1rem 0 0.5rem;
    position: relative;
}

.section-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
    line-height: 1.5;
}

.section-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform var(--transition-bounce);
}

.section-card:hover .section-icon { transform: scale(1.1); }

.bypass-icon { background: rgba(34, 197, 94, 0.08); color: #4ade80; border: none; }
.cheat-icon { background: rgba(var(--accent-rgb), 0.08); color: var(--accent-light); border: none; }

/* ==============================
   ACTION BUTTONS
   ============================== */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.action-btn {
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.action-btn:hover::after { opacity: 1; }
.action-btn:hover { transform: translateY(-2px); }
.action-btn:active { transform: translateY(0) scale(0.98); }

.btn-inject {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    color: #fff;
    box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.28);
}
.btn-inject:hover { box-shadow: 0 10px 32px rgba(var(--glow-rgb), 0.28); }

.btn-load {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}
.btn-load:hover { box-shadow: 0 8px 30px rgba(34, 197, 94, 0.35); }

.btn-clear {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}
.btn-clear:hover { box-shadow: 0 8px 30px rgba(239, 68, 68, 0.35); }

.btn-unload {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #fff;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
}
.btn-unload:hover { box-shadow: 0 8px 30px rgba(107, 114, 128, 0.35); }

.btn-clean {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}
.btn-clean:hover { box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35); }

.btn-tp {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-light);
}

/* ==============================
   STATUS MESSAGE (Bypass feedback)
   ============================== */
.status-msg {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-msg.success {
    background: var(--success-bg);
    border: none;
    color: #4ade80;
}

.status-msg.error {
    background: var(--danger-bg);
    border: none;
    color: #f87171;
}

/* ==============================
   CONFIG SECTION
   ============================== */
.config-section {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.config-section:hover { box-shadow: none; }

.config-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: none;
    letter-spacing: -0.3px;
}

/* ==============================
   CONFIG ROWS
   ============================== */
.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.5rem;
    border-bottom: none;
    transition: background var(--transition-fast);
    border-radius: 6px;
    margin: 0 -0.5rem;
}

.config-row:last-child { border-bottom: none; }
.config-row:hover { background: rgba(var(--accent-rgb), 0.03); }

.config-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==============================
   TOGGLE SWITCH
   ============================== */
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #2a2535;
    border-radius: 24px;
    transition: all var(--transition-medium);
    border: none;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-medium);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background: #fff;
}

/* ==============================
   CONFIG INPUTS
   ============================== */
.config-slider { width: 120px; accent-color: var(--accent); }

.config-number {
    width: 72px;
    background: var(--bg-elevated);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    text-align: center;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition-fast);
    outline: none;
}

.config-number:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.config-select {
    background: var(--bg-elevated);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition-fast);
    outline: none;
    cursor: pointer;
}

.config-select:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* ==============================
   TABS
   ============================== */
.config-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: none;
    flex-wrap: wrap;
}

.config-tab {
    padding: 0.65rem 1.3rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    position: relative;
}

.config-tab:hover { color: var(--text-secondary); }

.config-tab.active {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-light);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.15);
}

/* ==============================
   SUB-TABS
   ============================== */
.config-subtabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.25rem;
    padding: 0.3rem;
    background: rgba(20, 18, 30, 0.6);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    border: none;
}

.config-subtab {
    padding: 0.45rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-medium);
    flex: 1;
    text-align: center;
    min-width: 0;
    font-family: inherit;
}

.config-subtab.active {
    background: rgba(var(--accent-rgb), 0.18);
    color: var(--accent-light);
    font-weight: 600;
}

.config-subtab:hover:not(.active) { color: var(--text-primary); }

.subtab-content h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: none;
}

/* ==============================
   SAVE BAR
   ============================== */
.save-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    border-top: none;
    padding: 1rem 3rem;
    margin: 0 -3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    backdrop-filter: blur(12px);
}

.btn-save {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-medium);
    font-family: inherit;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.25);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.4);
}

.config-name-input {
    background: var(--bg-elevated);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    width: 200px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.config-name-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* ==============================
   LIVE INDICATOR
   ============================== */
.live-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(15, 12, 24, 0.9);
    border: none;
    color: var(--accent-light);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-rgb), 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: livePulse 1.2s infinite;
    box-shadow: 0 0 6px var(--accent-glow);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.live-ok {
    background: rgba(15, 20, 15, 0.9);
    color: #4ade80;
}
.live-ok .live-dot {
    background: var(--success);
    animation: none;
    box-shadow: 0 0 8px var(--success);
}

/* ==============================
   CONFIG LIST (Configs tab)
   ============================== */
.cfg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.6rem;
    gap: 0.75rem;
    transition: all var(--transition-fast);
}

.cfg-item:hover {
    background: var(--bg-card-hover);
}

.cfg-info { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 0; }
.cfg-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfg-date { font-size: 0.7rem; color: var(--text-muted); }

.cfg-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

.cfg-btn {
    padding: 0.4rem 0.85rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.cfg-btn:active { transform: scale(0.95); }

.cfg-load { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: none; }
.cfg-load:hover { background: rgba(34, 197, 94, 0.2); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15); }

.cfg-del { background: rgba(239, 68, 68, 0.08); color: #f87171; border: none; }
.cfg-del:hover { background: rgba(239, 68, 68, 0.18); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15); }

/* ==============================
   TOAST NOTIFICATIONS
   ============================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    background: rgba(15, 12, 24, 0.95);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    pointer-events: auto;
    animation: toastIn 0.3s ease forwards;
    max-width: 320px;
}

.toast.toast-out { animation: toastOut 0.3s ease forwards; }

.toast-success::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

.toast-error::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }

.toast-info::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(30px) scale(0.95); }
}

/* ==============================
   SCROLLBAR
   ============================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.4); }

/* ==============================
   ANIMATIONS
   ============================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content { animation: fadeInUp 0.25s ease; }

/* ==============================
   RESPONSIVE - TABLET (1024px)
   ============================== */
@media (max-width: 1024px) {
    .user-sidebar { width: 220px; padding: 1.5rem 1rem; }
    .sidebar-brand { font-size: 1.3rem; margin-bottom: 2rem; }
    .user-main { margin-left: 220px; padding: 2rem; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .section-cards { grid-template-columns: 1fr; }
    .config-tab { padding: 0.55rem 1rem; font-size: 0.78rem; }
    .save-bar { padding: 1rem 2rem; margin: 0 -2rem; }
}

/* ==============================
   RESPONSIVE - MOBILE (768px)
   ============================== */
@media (max-width: 768px) {
    .user-layout { flex-direction: column; }

    .user-sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        flex-direction: row;
        padding: 0.4rem 0.5rem;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
        border-right: none;
        border-top: none;
        z-index: 1000;
        background: rgba(8, 6, 14, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }

    .sidebar-brand { display: none; }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.55rem 0.2rem;
        font-size: 0.65rem;
        gap: 0.2rem;
        justify-content: center;
        flex: 1;
        text-align: center;
        border-radius: var(--radius-sm);
        min-width: 0;
    }
    .nav-item::before { display: none; }
    .nav-item:hover { transform: none; background: transparent; }
    .nav-item.active { background: rgba(var(--accent-rgb), 0.1); }
    .nav-item span { font-size: 0.6rem; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .nav-item svg { width: 20px; height: 20px; }
    .nav-logout { margin-top: 0; }

    .user-main {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
    }

    .user-header {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
        margin-bottom: 1.75rem;
    }
    .user-header h1 { font-size: 1.3rem; }

    .cards-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 2rem; }
    .section-cards { grid-template-columns: 1fr; gap: 1rem; }

    .config-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.2rem;
        padding: 0.3rem;
        margin-bottom: 1.25rem;
    }
    .config-tabs::-webkit-scrollbar { display: none; }
    .config-tab {
        padding: 0.55rem 0.9rem;
        font-size: 0.75rem;
        flex: 0 0 auto;
        white-space: nowrap;
        min-width: 0;
    }

    .config-section {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }

    .config-row {
        padding: 0.7rem 0.25rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .config-label {
        font-size: 0.8rem;
        flex: 1 1 50%;
        min-width: 0;
        word-break: break-word;
    }

    .config-number {
        width: 65px;
        font-size: 0.82rem;
        padding: 0.5rem;
        min-height: 38px;
    }

    .config-select {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
        max-width: 140px;
        min-height: 38px;
    }

    .toggle-switch { min-width: 44px; }

    .action-buttons { flex-direction: column; gap: 0.6rem; }
    .action-btn {
        width: 100%;
        justify-content: center;
        padding: 0.95rem;
        font-size: 0.88rem;
        min-height: 48px;
        border-radius: var(--radius-md);
    }
    .action-btn:hover { transform: none; }
    .action-btn:active { transform: scale(0.97); }

    .info-card { padding: 1rem; }
    .info-card .card-value { font-size: 1rem; }
    .section-card { padding: 1.4rem; }

    .config-subtabs { gap: 0.15rem; padding: 0.25rem; }
    .config-subtab { padding: 0.45rem 0.5rem; font-size: 0.73rem; }

    .cfg-item { padding: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
    .cfg-info { min-width: 0; flex: 1 1 100%; }
    .cfg-actions { width: 100%; justify-content: flex-start; gap: 0.5rem; }
    .cfg-btn { padding: 0.45rem 0.9rem; font-size: 0.75rem; min-height: 34px; }

    .save-bar { padding: 1rem 1.25rem; margin: 0 -1.25rem; }
    .config-name-input { width: 100%; min-height: 40px; }

    .live-indicator {
        top: auto;
        bottom: calc(5rem + env(safe-area-inset-bottom, 0px) + 8px);
        right: 12px;
        font-size: 0.72rem;
        padding: 0.45rem 0.9rem;
    }

    .toast-container { top: 12px; right: 12px; left: 12px; align-items: stretch; }
    .toast { max-width: none; font-size: 0.78rem; padding: 0.7rem 1rem; }

    .section-card:hover { transform: none; }
    .info-card:hover { transform: none; }
}

/* ==============================
   RESPONSIVE - SMALL MOBILE (480px)
   ============================== */
@media (max-width: 480px) {
    .user-main { padding: 1rem; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
    .user-header h1 { font-size: 1.2rem; }

    .cards-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .info-card { padding: 0.9rem; }
    .info-card .card-icon { width: 30px !important; height: 30px !important; margin-bottom: 0.5rem !important; border-radius: 8px !important; }
    .info-card .card-icon svg { width: 14px !important; height: 14px !important; }
    .card-label { font-size: 0.65rem; margin-bottom: 0.3rem; }
    .card-value { font-size: 0.95rem; }

    .config-section { padding: 1rem; }
    .config-section h2 { font-size: 0.9rem; margin-bottom: 1rem; }

    .config-row { padding: 0.6rem 0.15rem; }
    .config-label { font-size: 0.78rem; }
    .config-number { width: 60px; font-size: 0.8rem; }
    .config-select { max-width: 125px; font-size: 0.76rem; }

    .config-tab { padding: 0.5rem 0.75rem; font-size: 0.7rem; }
    .config-subtab { padding: 0.38rem 0.4rem; font-size: 0.68rem; }

    .subtab-content h3 { font-size: 0.82rem; }

    .action-btn { padding: 0.85rem; font-size: 0.82rem; }

    .section-card { padding: 1.2rem; }
    .section-card h3 { font-size: 1rem; }
    .section-card p { font-size: 0.8rem; }
    .section-icon { width: 44px; height: 44px; }
}

/* ==============================
   RESPONSIVE - EXTRA SMALL (360px)
   ============================== */
@media (max-width: 360px) {
    .user-main { padding: 0.75rem; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
    .user-header h1 { font-size: 1.1rem; }

    .cards-grid { grid-template-columns: 1fr; gap: 0.6rem; }

    .config-section { padding: 0.85rem; }
    .config-tab { padding: 0.4rem 0.6rem; font-size: 0.68rem; }
    .config-subtab { padding: 0.35rem 0.35rem; font-size: 0.65rem; }

    .config-label { font-size: 0.74rem; }
    .config-number { width: 55px; font-size: 0.76rem; }
    .config-select { max-width: 105px; font-size: 0.72rem; }

    .nav-item span { font-size: 0.55rem; }
    .nav-item svg { width: 18px; height: 18px; }
    .nav-item { padding: 0.45rem 0.15rem; }

    .action-btn { padding: 0.8rem; font-size: 0.8rem; }
    .cfg-btn { padding: 0.4rem 0.7rem; font-size: 0.7rem; }
}

/* ==============================
   RESPONSIVE - LANDSCAPE MOBILE
   ============================== */
@media (max-height: 500px) and (orientation: landscape) {
    .user-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 60px;
        height: 100vh;
        flex-direction: column;
        padding: 0.75rem 0.3rem;
        border-top: none;
        border-right: none;
    }
    .sidebar-brand { display: none; }
    .sidebar-nav { flex-direction: column; gap: 0.3rem; justify-content: center; }
    .nav-item { padding: 0.5rem; }
    .nav-item span { display: none; }
    .nav-item svg { width: 20px; height: 20px; }
    .nav-logout { margin-top: auto; }

    .user-main {
        margin-left: 60px;
        padding: 1rem 1.5rem;
        padding-bottom: 1rem;
    }

    .cards-grid { grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
    .action-buttons { flex-direction: row; flex-wrap: wrap; }
    .action-btn { width: auto; flex: 1; min-width: 140px; }
}

/* ==============================
   TOUCH ENHANCEMENTS
   ============================== */
@media (hover: none) and (pointer: coarse) {
    .action-btn:hover { transform: none; box-shadow: none; }
    .action-btn:active { transform: scale(0.96); }

    .section-card:hover { transform: none; box-shadow: none; }
    .section-card:active { transform: scale(0.98); }

    .info-card:hover { transform: none; box-shadow: none; }

    .config-row:hover { background: transparent; }

    .toggle-switch { min-width: 48px; height: 26px; }
    .toggle-slider:before { height: 20px; width: 20px; }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

    .config-number,
    .config-select { min-height: 40px; font-size: 16px; }

    .cfg-btn { min-height: 36px; min-width: 60px; }

    .nav-item { -webkit-tap-highlight-color: transparent; }
    .action-btn { -webkit-tap-highlight-color: transparent; }
    .config-tab { -webkit-tap-highlight-color: transparent; }
    .config-subtab { -webkit-tap-highlight-color: transparent; }
}

/* ==============================
   SAFE AREA (Notched devices)
   ============================== */
@supports (padding: env(safe-area-inset-bottom)) {
    .user-sidebar {
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    }
}


