/* ===================================================
   BASE LAYOUT STYLES - GLORY SYSTEM (Pyrelex)
   =================================================== */

.app-layout {
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    background: #020408;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(255, 30, 66, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(255, 106, 26, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(255, 184, 0, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--silver-primary);
}

/* Desktop Sidebar Hidden — Unified Mobile-App Centered Layout */
.desktop-sidebar {
    display: none !important;
}

/* ===================================================
   MAIN WRAPPER & TOP HEADER (EXPONSIVE DESKTOP & MOBILE)
   =================================================== */
.main-wrapper {
    flex: 1;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 1200px !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #0a0a0f !important;
    border-left: 1px solid rgba(255, 102, 0, 0.1) !important;
    border-right: 1px solid rgba(255, 102, 0, 0.1) !important;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 102, 0, 0.05) !important;
    position: relative !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .main-wrapper {
        max-width: 100% !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* ===================================================
   ULTRA-PREMIUM HEADER — NEON CYBER EDITION
   =================================================== */
@keyframes hdr-pulse-green {
    0%, 100% { box-shadow: 0 0 4px #00E676, 0 0 8px rgba(0, 230, 118, 0.4); }
    50% { box-shadow: 0 0 6px #00E676, 0 0 14px rgba(0, 230, 118, 0.7); }
}
@keyframes hdr-glow-cyan {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 102, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
    50% { box-shadow: 0 0 18px rgba(255, 102, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
}

.top-header {
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    background: linear-gradient(180deg, rgba(12, 16, 28, 0.96) 0%, rgba(8, 11, 20, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 102, 0, 0.18);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
    overflow: hidden !important;
}

/* Left: Profile Cluster (Avatar + @username Pill) */
.header-profile-cluster {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
}

.hdr-user-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    padding: 3px 9px !important;
    height: 28px !important;
    box-sizing: border-box !important;
    max-width: 105px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.hdr-at-sym {
    color: #FF1E42 !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

.hdr-uname-txt {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ---- Profile Cluster ---- */
.header-profile-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.header-avatar-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.header-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    object-fit: cover;
    border: 1.5px solid rgba(255, 30, 66, 0.7);
    box-shadow:
        0 0 14px rgba(255, 30, 66, 0.5),
        0 0 28px rgba(255, 30, 66, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0D111A;
}

.header-avatar-frame:hover .header-avatar-img {
    transform: scale(1.08);
    border-color: #FF1E42;
    box-shadow:
        0 0 20px rgba(255, 30, 66, 0.75),
        0 0 40px rgba(255, 30, 66, 0.25);
}

.avatar-live-bead {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00E676;
    border: 2px solid #080C18;
    animation: hdr-pulse-green 2s ease-in-out infinite;
}

/* ---- User Info ---- */
.header-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
    gap: 1px;
}

.header-user-badge-row {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.hdr-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.hdr-role-tag.client-tag {
    background: rgba(0, 230, 118, 0.08);
    color: #00E676;
    border: 1px solid rgba(0, 230, 118, 0.22);
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.35);
}

.hdr-role-tag.admin-tag {
    background: rgba(255, 184, 0, 0.12);
    color: #FFB800;
    border: 1px solid rgba(255, 184, 0, 0.35);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.2);
    text-shadow: 0 0 8px rgba(255, 184, 0, 0.4);
}

.hdr-role-tag .tag-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 4px currentColor;
}

.header-username-text {
    font-size: 14px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.hdr-at-symbol {
    color: #FF1E42;
    font-weight: 900;
    margin-right: 1px;
    text-shadow: 0 0 6px rgba(255, 30, 66, 0.5);
}

/* ---- Right Side Controls ---- */
.header-actions-cluster {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.hdr-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #CBD5E1;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.hdr-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 184, 0, 0.45);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 184, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hdr-pill-arrow {
    stroke: #64748B;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.hdr-curr-code {
    font-size: 8.5px;
    font-weight: 800;
    color: #94A3B8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hdr-curr-name {
    font-size: 11px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 0.3px;
}

/* Wallet Balance Pill */
.hdr-wallet-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 28px !important;
    padding: 0 3px 0 9px !important;
    background: rgba(255, 184, 0, 0.08) !important;
    border: 1.4px solid #FFB800 !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.hdr-wallet-pill:hover {
    background: rgba(255, 184, 0, 0.16) !important;
    box-shadow: 0 0 12px rgba(255, 184, 0, 0.35) !important;
    transform: translateY(-1px) !important;
}

.hdr-wallet-sym {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #FFB800 !important;
    line-height: 1 !important;
}

.hdr-wallet-val {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #FFB800 !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums !important;
}

.hdr-wallet-add-btn {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #FFB800 !important;
    color: #000000 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin-left: 2px !important;
}

.hdr-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.hdr-icon-btn.admin-btn {
    color: #FFB800;
    background: rgba(255, 184, 0, 0.08);
    border-color: rgba(255, 184, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 184, 0, 0.1);
}
.hdr-icon-btn.admin-btn:hover {
    background: rgba(255, 184, 0, 0.18);
    border-color: #FFB800;
    box-shadow: 0 0 16px rgba(255, 184, 0, 0.5), 0 0 30px rgba(255, 184, 0, 0.15);
    transform: translateY(-1px);
}

.hdr-icon-btn.settings-btn {
    color: #8B95A8;
}
.hdr-icon-btn.settings-btn:hover {
    color: #ff6a1a;
    background: rgba(255, 106, 26, 0.1);
    border-color: rgba(255, 106, 26, 0.4);
    box-shadow: 0 0 14px rgba(255, 106, 26, 0.4), 0 0 28px rgba(255, 106, 26, 0.12);
    transform: translateY(-1px) rotate(25deg);
}

.hdr-icon-btn.logout-btn {
    color: #FF4D6D;
    background: rgba(255, 30, 66, 0.06);
    border-color: rgba(255, 30, 66, 0.2);
}
.hdr-icon-btn.logout-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 30, 66, 0.85);
    border-color: #FF1E42;
    box-shadow: 0 0 16px rgba(255, 30, 66, 0.65), 0 0 30px rgba(255, 30, 66, 0.2);
    transform: translateY(-1px);
}

/* ---- Row 2: Glowing Vault Card ---- */
.hdr-vault-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: linear-gradient(135deg, rgba(14, 20, 32, 0.92) 0%, rgba(8, 12, 20, 0.98) 100%);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-top: 1.5px solid rgba(255, 200, 0, 0.5);
    border-radius: 13px;
    padding: 9px 13px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    animation: hdr-glow-gold 3s ease-in-out infinite;
}

.hdr-vault-card::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 140px;
    height: 160%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 184, 0, 0.14) 0%, transparent 65%);
    pointer-events: none;
}

.hdr-vault-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: radial-gradient(ellipse at 80% 50%, rgba(255, 140, 0, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hdr-vault-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.hdr-vault-icon-frame {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.18) 0%, rgba(255, 120, 0, 0.06) 100%);
    border: 1.5px solid rgba(255, 184, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFB800;
    box-shadow: 0 0 14px rgba(255, 184, 0, 0.25), inset 0 0 6px rgba(255, 184, 0, 0.08);
    flex-shrink: 0;
}

.hdr-vault-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.hdr-vault-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    margin-bottom: 3px;
}

.hdr-vault-sublabel {
    font-size: 8.5px;
    font-weight: 800;
    color: #8B95A8;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.hdr-vault-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 800;
    color: #00E676;
    letter-spacing: 0.5px;
    text-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
}

.hdr-live-pulse-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00E676;
    box-shadow: 0 0 6px #00E676;
    display: inline-block;
    animation: hdr-pulse-green 2s ease-in-out infinite;
}

.hdr-vault-number-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1.1;
}

.hdr-vault-sym {
    font-size: 15px;
    font-weight: 900;
    color: #FFB800;
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

.hdr-vault-balance-val {
    font-size: 19px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 16px rgba(255, 184, 0, 0.4), 0 0 30px rgba(255, 184, 0, 0.12);
}

.hdr-vault-action-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FFB800 0%, #FF8C00 100%);
    border: none;
    color: #070B12;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: 0.4px;
    padding: 8px 14px;
    border-radius: 9px;
    text-decoration: none;
    box-shadow:
        0 4px 16px rgba(255, 140, 0, 0.55),
        0 0 24px rgba(255, 184, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.hdr-vault-action-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 6px 24px rgba(255, 140, 0, 0.7),
        0 0 36px rgba(255, 184, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    filter: brightness(1.08);
    color: #070B12;
}

.hdr-vault-btn-icon {
    font-size: 13px;
    line-height: 1;
}

.hdr-vault-btn-text {
    color: #070B12;
    font-weight: 900;
}

.hdr-vault-btn-arrow {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.hdr-vault-action-btn:hover .hdr-vault-btn-arrow {
    transform: translateX(3px);
}

/* Page Body Container */
.page-container {
    flex: 1;
    max-width: 100% !important;
    width: 100%;
    margin: 0 auto;
    padding: 14px 14px 115px !important;
    box-sizing: border-box !important;
}

/* ===================================================
   MOBILE BOTTOM NAVIGATION BAR BASE
   =================================================== */
.mobile-floating-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(12, 14, 20, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    box-sizing: border-box;
}

.pill-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-tertiary, #626672);
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s ease;
    flex: 1;
    height: 56px;
}

.pill-nav-btn:hover {
    color: #FFFFFF;
}

.pill-nav-btn.active {
    color: var(--accent, #ff6a1a);
}

.pill-icon-box {
    font-size: 18px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .app-layout {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .desktop-sidebar {
        display: none !important;
    }
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .mobile-floating-nav {
        display: flex !important;
    }
    .page-container {
        padding: 14px 14px 80px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .top-header {
        height: 56px !important;
        padding: 0 14px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }
}
