/* ============================================ */
/* AlemBot Common Styles                       */
/* Shared across all pages                     */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');
@import url('/css/nav.css');

:root {
    --primary: #00b4d8;
    --primary-dark: #0096B7;
    --primary-light: #E0F7FA;
    --gold: #FFD700;
    --gold-dark: #D4AF37;
    --success: #00C853;
    --danger: #FF3B30;
    --warning: #FF9500;
    --bg-dark: #0A0E17;
    --bg-card: #141B2D;
    --bg-card-hover: #1A2340;
    --bg-tertiary: #1E2A45;
    --text-primary: #FFFFFF;
    --text-secondary: #8B95A5;
    --text-muted: #5A6478;
    --border: rgba(255,255,255,0.08);
    --glow: rgba(0, 180, 216, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Manrope', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* App Container */
.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--bg-dark);
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 430px;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.bg-orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, #43c7e2 100%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.bg-orb-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--gold) 0%, #FF6B35 100%);
    bottom: 200px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.05); }
}

/* Header */
.header {
    padding: 16px 20px;
    background: transparent;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #43c7e2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 20px var(--glow);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content */
.content {
    padding: 0 0 100px 0;
    position: relative;
    z-index: 1;
}

/* Page padding */
.page > .section {
    padding: 0 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
}

.page-action {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 8px 12px 0;
}

.back-btn:hover { color: var(--text-primary); }

/* Section */
.section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
}

.section-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.card:hover { background: var(--bg-card-hover); }

/* Stat Card */
.stat-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238B95A5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-tertiary);
    transition: .3s;
    border-radius: 28px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Trade List */
.trade-list { display: flex; flex-direction: column; gap: 10px; }

.trade-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--border);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trade-symbol {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.trade-type.buy { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.trade-type.sell { background: rgba(255, 59, 48, 0.15); color: var(--danger); }

.trade-profit {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 15px;
}

.trade-profit.positive { color: var(--success); }
.trade-profit.negative { color: var(--danger); }

.trade-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 12px;
}

.trade-detail { text-align: center; }
.trade-detail-label { color: var(--text-muted); margin-bottom: 2px; }
.trade-detail-value { font-weight: 600; color: var(--text-primary); }
.trade-time { font-size: 11px; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* Badge / Tag */
.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-tag.success { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.badge-tag.danger { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.badge-tag.warning { background: rgba(255, 149, 0, 0.15); color: var(--warning); }
.badge-tag.info { background: rgba(0, 180, 216, 0.15); color: var(--primary); }
.badge-tag.gold { background: rgba(255, 215, 0, 0.15); color: var(--gold); }

/* Bottom Navigation — see /css/nav.css */

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    background: var(--bg-dark);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 10;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.service-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.service-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 20px 0 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #43c7e2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 16px;
    border: 4px solid var(--bg-card);
    box-shadow: 0 4px 20px var(--glow);
    overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.profile-menu-item:hover { background: var(--bg-card-hover); }

.profile-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.profile-menu-text { flex: 1; }

.profile-menu-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-menu-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-menu-arrow {
    color: var(--text-muted);
    font-size: 18px;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: slideUp 0.4s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 430px;
    width: 100%;
    padding: 0 20px;
    pointer-events: none;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.info { border-color: var(--primary); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* Positive/Negative Colors */
.positive { color: var(--success); }
.negative { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.list-item:hover { background: var(--bg-card-hover); }

.list-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.list-item-right { text-align: right; flex-shrink: 0; }

.list-item-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
}

.list-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================ */
/* DESKTOP SIDEBAR                             */
/* ============================================ */

.desktop-sidebar { display: none; }

@media (min-width: 768px) {
    body { display: flex; }

    .app {
        max-width: none;
        flex: 1;
        margin-left: 260px;
        padding: 0 40px;
    }

    .bg-effects {
        left: 260px;
        width: calc(100% - 260px);
        transform: none;
    }

    .bottom-nav { display: none; }

    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 260px;
        background: linear-gradient(180deg, rgba(10, 10, 30, 0.98) 0%, rgba(5, 5, 20, 0.99) 100%);
        border-right: 1px solid rgba(0, 180, 216, 0.1);
        z-index: 1000;
        padding: 24px 16px;
        overflow: hidden;
    }

    /* Subtle scanline on sidebar */
    .desktop-sidebar::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 180, 216, 0.015) 2px,
            rgba(0, 180, 216, 0.015) 4px
        );
        pointer-events: none;
        z-index: 0;
    }

    .desktop-sidebar > * { position: relative; z-index: 1; }

    .sidebar-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 12px;
        margin-bottom: 32px;
    }

    .sidebar-logo-icon {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, var(--primary) 0%, #43c7e2 100%);
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 20px;
        color: white;
        box-shadow: 0 0 20px rgba(0, 180, 216, 0.4), 0 0 40px rgba(0, 180, 216, 0.15);
        animation: logo-glow 3s ease-in-out infinite;
    }

    @keyframes logo-glow {
        0%, 100% { box-shadow: 0 0 20px rgba(0, 180, 216, 0.4), 0 0 40px rgba(0, 180, 216, 0.15); }
        50% { box-shadow: 0 0 25px rgba(0, 180, 216, 0.6), 0 0 50px rgba(0, 180, 216, 0.25); }
    }

    .sidebar-logo-text {
        font-size: 24px;
        font-weight: 800;
        background: linear-gradient(135deg, #fff 0%, #00b4d8 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
    }

    .sidebar-nav { flex: 1; }

    .sidebar-nav-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        border-radius: 12px;
        color: var(--text-secondary);
        text-decoration: none;
        cursor: pointer;
        transition: all 0.25s;
        margin-bottom: 4px;
        position: relative;
        overflow: hidden;
    }

    .sidebar-nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--primary);
        border-radius: 0 2px 2px 0;
        transition: all 0.25s;
        box-shadow: 0 0 8px var(--primary);
    }

    .sidebar-nav-item:hover {
        background: rgba(0, 180, 216, 0.06);
        color: var(--text-primary);
    }

    .sidebar-nav-item:hover::before {
        height: 20px;
    }

    .sidebar-nav-item.active {
        background: rgba(0, 180, 216, 0.1);
        color: #00b4d8;
        border: 1px solid rgba(0, 180, 216, 0.2);
        box-shadow: 0 0 15px rgba(0, 180, 216, 0.08);
    }

    .sidebar-nav-item.active::before {
        height: 60%;
        width: 3px;
        box-shadow: 0 0 12px rgba(0, 180, 216, 0.6), 0 0 4px rgba(0, 180, 216, 0.8);
    }

    .sidebar-nav-item.active .sidebar-nav-icon { filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.5)); }

    .sidebar-nav-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: filter 0.25s;
    }

    .sidebar-nav-label {
        font-size: 15px;
        font-weight: 600;
    }

    .sidebar-section-title {
        font-size: 11px;
        font-weight: 700;
        color: rgba(0, 180, 216, 0.4);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        padding: 20px 16px 10px;
    }

    .sidebar-user {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: rgba(0, 180, 216, 0.03);
        border-radius: 14px;
        border: 1px solid rgba(0, 180, 216, 0.1);
        cursor: pointer;
        transition: all 0.3s;
    }

    .sidebar-user:hover {
        background: rgba(0, 180, 216, 0.06);
        border-color: rgba(0, 180, 216, 0.2);
        box-shadow: 0 0 15px rgba(0, 180, 216, 0.08);
    }

    .sidebar-user-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary) 0%, #43c7e2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        overflow: hidden;
        box-shadow: 0 0 12px rgba(0, 180, 216, 0.3);
    }

    .sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

    .sidebar-user-info { flex: 1; min-width: 0; }

    .sidebar-user-name {
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-user-email {
        font-size: 12px;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Light theme sidebar overrides */
    body.light .desktop-sidebar {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.99) 100%);
        border-right-color: rgba(0, 150, 200, 0.12);
    }
    body.light .desktop-sidebar::before { background: none; }
    body.light .sidebar-logo-icon { box-shadow: 0 4px 16px rgba(0, 180, 216, 0.25); animation: none; }
    body.light .sidebar-logo-text { background: linear-gradient(135deg, #1a202c 0%, #00b4d8 100%); -webkit-background-clip: text; }
    body.light .sidebar-nav-item.active { background: rgba(0, 180, 216, 0.08); color: #0891b2; border-color: rgba(0, 180, 216, 0.15); box-shadow: none; }
    body.light .sidebar-nav-item.active::before { box-shadow: 0 0 8px rgba(0, 180, 216, 0.4); }
    body.light .sidebar-section-title { color: rgba(0, 130, 180, 0.5); }
    body.light .sidebar-user { background: rgba(0, 180, 216, 0.03); border-color: rgba(0, 180, 216, 0.1); }
    body.light .sidebar-user:hover { background: rgba(0, 180, 216, 0.06); box-shadow: none; }

    /* Desktop Header */
    .header { padding: 32px 0; }
    .header-top { margin-bottom: 28px; }
    .logo { display: none; }

    /* Desktop Content */
    .content { padding: 0 0 60px 0; max-width: 1400px; }

    /* Desktop Page Header */
    .page-header { padding: 32px 0 24px; }
    .page-title { font-size: 32px; }

    /* Desktop Section */
    .section { margin-bottom: 36px; }
    .section-title { font-size: 20px; }

    /* Desktop Services */
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    .service-item { padding: 28px 16px; }
    .service-icon { width: 64px; height: 64px; font-size: 30px; }
    .service-name { font-size: 14px; }

    /* Desktop Profile */
    .profile-header { padding: 40px 0; }
    .profile-avatar { width: 120px; height: 120px; font-size: 48px; }
    .profile-name { font-size: 28px; }
    .profile-menu-item { padding: 20px 24px; }

    /* Desktop Modal */
    .modal-overlay { align-items: center; }
    .modal { max-width: 600px; border-radius: 24px; max-height: 80vh; }
    .modal-header { padding: 24px; }
    .modal-body { padding: 24px; max-height: calc(80vh - 80px); }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }

    /* Desktop remove mobile page padding */
    .page > .section { padding: 0; }

    /* Toast position on desktop */
    .toast { bottom: 40px; }
    .toast-container { bottom: 40px; }

    /* Desktop back button hidden */
    .back-btn { margin: 0; }
}

@media (min-width: 1200px) {
    .app { padding: 0 60px; }
    .services-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1600px) {
    .app { padding: 0 80px; }
    .content { max-width: 1600px; }
}

/* ========== Embedded in iframe (SPA dashboard) ========== */
body.embedded {
    min-height: auto;
    background: var(--bg-dark);
    padding-bottom: 0;
    display: block;
}

body.embedded .app {
    margin-left: 0;
    max-width: 100%;
    padding: 0 20px;
    min-height: 100%;
    background: var(--bg-dark);
}

body.embedded .content {
    padding-bottom: 20px;
    max-width: 100%;
}

body.embedded .bg-effects {
    left: 0;
    width: 100%;
    transform: none;
}

body.embedded .desktop-sidebar {
    display: none !important;
}

body.embedded .back-btn {
    display: none !important;
}

body.embedded .page-header {
    padding: 16px 0 12px;
}
