
:root {
    --bg-base: #06070a;
    --bg-card: rgba(18, 20, 29, 0.75);
    --bg-card-strong: rgba(22, 26, 38, 0.9);
    --bg-card-hover: rgba(28, 33, 48, 0.85);
    --gold: #ffbe3b;
    --gold-bright: #ffe27a;
    --gold-glow: rgba(255, 190, 59, 0.35);
    --gold-deep: #e09612;
    --cyan-glow: rgba(56, 189, 248, 0.25);
    --text-pure: #ffffff;
    --text-muted: #9aa4b2;
    --text-dim: #626c7a;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(255, 190, 59, 0.25);
    --border-gold-bright: rgba(255, 226, 122, 0.45);
    --emerald: #10b981;
    --crimson: #ef4444;
    --shadow-main: 0 20px 50px -10px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 190, 59, 0.06);
    --shadow-pop: 0 12px 32px rgba(255, 190, 59, 0.24);
}

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

html {
    background: var(--bg-base);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: 
        radial-gradient(circle at 50% -10%, rgba(255, 190, 59, 0.16), transparent 42%),
        radial-gradient(circle at 100% 30%, rgba(56, 189, 248, 0.08), transparent 35%),
        radial-gradient(circle at 0% 70%, rgba(139, 92, 246, 0.08), transparent 35%),
        linear-gradient(180deg, #07090e 0%, #050608 100%);
    color: var(--text-pure);
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 84px 0 106px;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 80%);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
    border: 0;
    cursor: pointer;
    color: inherit;
}

.shell {
    width: min(100% - 28px, 1180px);
    margin: auto;
}

.topbar {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    height: 72px !important;
    background: rgba(8, 10, 15, 0.75) !important;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid var(--border-glass);
}

.topbar-inner {
    width: min(100% - 28px, 1180px);
    height: 100%;
    margin: auto;
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    gap: 12px;
}

.menu-btn,
.profile-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-btn:hover,
.profile-btn:hover {
    border-color: var(--border-gold-bright);
    background: rgba(255, 190, 59, 0.12);
    box-shadow: 0 0 20px rgba(255, 190, 59, 0.2);
}

.menu-btn i {
    font-size: 22px;
    color: #e2e8f0;
}

.profile-btn {
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: 0 0 16px rgba(255, 190, 59, 0.35);
}

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

.brand {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 40%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 190, 59, 0.25);
}

.brand em {
    font-style: normal;
    color: var(--gold-bright);
}

.hero {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 18px;
    margin-bottom: 20px;
}

.hero-main {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border-radius: 28px;
    padding: 30px;
    background: 
        radial-gradient(circle at 100% 0%, rgba(255, 190, 59, 0.12), transparent 50%),
        linear-gradient(135deg, rgba(26, 30, 44, 0.8), rgba(13, 16, 25, 0.95));
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
}

.hero-main::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 190, 59, 0.15) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 190, 59, 0.12);
    border: 1px solid rgba(255, 190, 59, 0.3);
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.eyebrow i {
    font-size: 13px;
    color: var(--gold);
}

.hero h1 {
    max-width: 660px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4.2vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    background: linear-gradient(145deg, #ffffff 40%, #d8e2ec 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 620px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    font-weight: 500;
}

.hero-side {
    border-radius: 28px;
    padding: 26px;
    background: 
        radial-gradient(circle at 100% 100%, rgba(255, 190, 59, 0.1), transparent 60%),
        linear-gradient(145deg, rgba(28, 25, 20, 0.8), rgba(15, 17, 23, 0.95));
    border: 1px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
}

.mini-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.mini-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--gold-bright);
    margin-top: 6px;
    text-shadow: 0 0 24px rgba(255, 190, 59, 0.4);
    letter-spacing: -0.02em;
}

.mini-note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #4ade80;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
}

.balance {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 28px;
    padding: 26px;
    background: 
        radial-gradient(circle at 80% 20%, rgba(255, 190, 59, 0.12), transparent 45%),
        linear-gradient(135deg, rgba(24, 28, 40, 0.9) 0%, rgba(13, 16, 24, 0.95) 100%);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
}

.balance::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 190, 59, 0.16) 0%, transparent 60%);
    filter: blur(30px);
    pointer-events: none;
}

.balance-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.identity {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.avatar {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid var(--border-gold-bright);
    background: #090b0e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.identity-copy {
    min-width: 0;
}

.identity-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 4px;
    color: #ffffff;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.phone {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    font-weight: 600;
}

.balance-pill {
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 190, 59, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.balance-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.balance-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}

.balance-btn.primary {
    background: linear-gradient(135deg, #ffc83b 0%, #ff9800 100%);
    color: #0b0c10;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-pop);
}

.balance-btn.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 16px 36px rgba(255, 152, 0, 0.35);
    transform: translateY(-2px);
}

.balance-btn:not(.primary):hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.balance-btn:active {
    transform: scale(0.98);
}

.quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.quick-card {
    min-height: 96px;
    padding: 16px 10px;
    border-radius: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
}

.quick-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 190, 59, 0.08);
}

.quick-card:active {
    transform: scale(0.97);
}

.quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 190, 59, 0.12);
    border: 1px solid rgba(255, 190, 59, 0.25);
    color: var(--gold-bright);
    font-size: 19px;
    box-shadow: 0 4px 12px rgba(255, 190, 59, 0.15);
}

.quick-card span {
    font-size: 11px;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0 0 16px;
    padding: 0 4px;
}

.section-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.section-head p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.section-head .accent {
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.service {
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 100% 0%, rgba(255, 190, 59, 0.08), transparent 60%),
        linear-gradient(160deg, rgba(22, 26, 38, 0.85), rgba(12, 14, 22, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

.service:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold-bright);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 190, 59, 0.15);
}

.service-image {
    height: 135px;
    border-radius: 17px;
    overflow: hidden;
    background: #06070a;
    position: relative;
    margin-bottom: 12px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.service:hover .service-image img {
    transform: scale(1.05);
}

.owned {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 14, 12, 0.88);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #4ade80;
    font-size: 10px;
    font-weight: 800;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 0 4px;
}

.service-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
}

.service-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--gold-bright);
    white-space: nowrap;
}

.service-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.stat {
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-glass);
    min-width: 0;
}

.stat small {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.stat strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.stat strong.green {
    color: #4ade80;
}

.stat strong.orange {
    color: var(--gold-bright);
}

.invest {
    width: 100%;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffc83b 0%, #ff9800 100%);
    color: #0b0c10;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-pop);
    transition: all 0.25s ease;
}

.invest:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 12px 28px rgba(255, 152, 0, 0.35);
    transform: translateY(-2px);
}

.invest:active:not(:disabled) {
    transform: scale(0.97);
}

.invest:disabled {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    box-shadow: none;
    cursor: default;
    border: 1px solid var(--border-glass);
}

.bottom-nav {
    position: fixed;
    z-index: 999;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(calc(100% - 20px), 620px);
    max-width: calc(100vw - 20px);
    height: 72px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 18px;
    color: #717d8e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: all 0.25s ease;
}

.nav-item i {
    flex: 0 0 auto;
    font-size: 19px;
    transition: all 0.25s ease;
}

.nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.active {
    background: linear-gradient(145deg, rgba(255, 190, 59, 0.22), rgba(255, 152, 0, 0.08));
    color: #ffffff;
    border: 1px solid rgba(255, 190, 59, 0.3);
    box-shadow: 0 6px 18px rgba(255, 190, 59, 0.15);
}

.nav-item.active i {
    color: var(--gold-bright);
    transform: translateY(-1px);
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    padding: 20px;
}

.overlay.open {
    display: flex;
}

.dialog {
    width: min(100%, 360px);
    border-radius: 28px;
    padding: 28px 22px;
    background: 
        radial-gradient(circle at 50% 0%, rgba(255, 190, 59, 0.12), transparent 70%),
        linear-gradient(160deg, #1b2030, #0c0e16);
    border: 1px solid var(--border-gold-bright);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 190, 59, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dialog-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 190, 59, 0.12);
    border: 1px solid var(--border-gold-bright);
    color: var(--gold-bright);
    font-size: 26px;
    margin: 0 auto 16px;
    box-shadow: 0 0 25px rgba(255, 190, 59, 0.2);
}

.dialog h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
    width: 100%;
}

.dialog p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
    width: 100%;
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.dialog-btn {
    height: 46px;
    width: 100%;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease;
}

.dialog-btn.primary {
    background: linear-gradient(135deg, #ffc83b, #ff9800);
    color: #0b0c10;
    border: none;
    box-shadow: var(--shadow-pop);
}

.dialog-btn.primary:hover {
    filter: brightness(1.1);
}

.dialog-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

.dialog-btn:active {
    transform: scale(0.97);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
}

.drawer-backdrop.active {
    display: block;
}

.drawer {
    position: fixed;
    z-index: 1501;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(340px, 86vw);
    padding: 0;
    background: #090c13;
    border-right: 1px solid var(--border-glass);
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 30px 0 90px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 26px 22px 20px;
    border-bottom: 1px solid var(--border-glass);
    background: linear-gradient(180deg, #151a26 0%, #090c13 100%);
    position: relative;
}

.drawer-close {
    position: absolute;
    top: 22px;
    right: 20px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    font-size: 15px;
    transition: 0.2s;
}

.drawer-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.drawer-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drawer-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid var(--border-gold-bright);
    background: #080a0e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.drawer-avatar-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 190, 59, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold-bright);
    font-size: 26px;
}

.drawer-user-info {
    min-width: 0;
}

.drawer-user-info strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.drawer-user-info small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.drawer-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    padding: 0 12px 6px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    background: transparent;
    width: 100%;
}

.drawer-link:hover,
.drawer-link:active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(3px);
}

.drawer-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--gold-bright);
    font-size: 17px;
    flex-shrink: 0;
    transition: 0.2s;
}

.drawer-link:hover .drawer-link-icon {
    background: rgba(255, 190, 59, 0.15);
    border-color: var(--border-gold-bright);
    box-shadow: 0 0 16px rgba(255, 190, 59, 0.2);
}

.drawer-link-text {
    flex: 1;
}

.drawer-link-arrow {
    color: var(--text-dim);
    font-size: 13px;
}

.drawer-footer {
    padding: 18px;
    border-top: 1px solid var(--border-glass);
    background: #090c13;
}

.drawer-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.drawer-auth-btn {
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.drawer-auth-btn.primary {
    background: linear-gradient(135deg, #ffc83b, #ff9800);
    color: #0b0c10;
    box-shadow: var(--shadow-pop);
}

.drawer-auth-btn.outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: #e2e8f0;
}

.drawer-logout-btn {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    font-size: 13px;
    font-weight: 800;
    transition: 0.2s;
}

.drawer-logout-btn:active {
    background: rgba(239, 68, 68, 0.2);
}

.toast-container {
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-msg {
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(18, 22, 32, 0.95);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-msg.success {
    border-color: rgba(16, 185, 129, 0.4);
    color: #4ade80;
}

.toast-msg.error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-side {
        min-height: 130px;
    }
    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 76px;
        padding-bottom: 94px;
    }
    .shell {
        width: calc(100% - 20px);
    }
    .topbar-inner {
        width: calc(100% - 20px);
        grid-template-columns: 44px 1fr 44px;
    }
    .topbar {
        height: 66px;
    }
    .menu-btn,
    .profile-btn {
        width: 42px;
        height: 42px;
    }
    .brand {
        font-size: 19px;
    }
    .hero {
        display: block;
        margin-bottom: 14px;
    }
    .hero-main {
        min-height: 160px;
        border-radius: 24px;
        padding: 22px;
    }
    .hero h1 {
        font-size: 29px;
    }
    .hero p {
        font-size: 13px;
        line-height: 1.55;
    }
    .hero-side {
        display: none;
    }
    .balance {
        border-radius: 24px;
        padding: 20px;
    }
    .balance-top {
        align-items: flex-start;
    }
    .avatar {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }
    .amount {
        font-size: 28px;
    }
    .balance-pill {
        display: none;
    }
    .quick {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 26px;
    }
    .quick-card {
        min-height: 86px;
        border-radius: 18px;
        padding: 10px 4px;
    }
    .quick-icon {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 17px;
    }
    .quick-card span {
        font-size: 10px;
    }
    .section-head {
        margin-bottom: 12px;
    }
    .section-head h2 {
        font-size: 18px;
    }
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .service {
        border-radius: 20px;
        padding: 10px;
    }
    .service-image {
        height: 100px;
        border-radius: 14px;
        margin-bottom: 10px;
    }
    .service-title {
        font-size: 12px;
    }
    .service-price {
        font-size: 15px;
    }
    .service-stats {
        gap: 6px;
        margin: 10px 0;
    }
    .stat {
        padding: 8px;
        border-radius: 12px;
    }
    .stat small {
        font-size: 8px;
    }
    .stat strong {
        font-size: 10px;
    }
    .invest {
        height: 38px;
        border-radius: 12px;
        font-size: 11px;
    }
    .owned {
        font-size: 8px;
        padding: 5px 8px;
    }
    .bottom-nav {
        height: 66px;
        bottom: 8px;
        border-radius: 22px;
    }
    .nav-item {
        font-size: 8px;
        border-radius: 16px;
    }
    .nav-item i {
        font-size: 18px;
    }
}

@media (min-width: 641px) {
    .service-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


html { scroll-behavior: auto; }
.topbar, .bottom-nav, .drawer, .drawer-backdrop, .overlay { transform: translateZ(0); }
.drawer, .drawer-backdrop, .overlay { contain: layout paint; }
.task-card, .service, .history-card, .action-card, .form-section, .quick-card, .stat-pill { transform: translateZ(0); }
@media (max-width: 768px) { .drawer, .drawer-backdrop { will-change: transform, opacity; } }

/* Performance safeguards */
html{scroll-behavior:auto;}
body{overscroll-behavior-y:none;-webkit-overflow-scrolling:touch;}
.drawer,.drawer-backdrop,.overlay,.modal,.hist-overlay,.edit-overlay{will-change:transform,opacity;contain:layout paint;}
.drawer{transform:translate3d(-105%,0,0);transition:transform .22s ease;}
.drawer.active{transform:translate3d(0,0,0);}
.drawer-backdrop{opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease;}
.drawer-backdrop.active{opacity:1;visibility:visible;}

body{background-attachment:scroll;}button,a{touch-action:manipulation;}@media(max-width:480px){.drawer{will-change:transform}.overlay.open,.modal.open{will-change:opacity;}}


.bottom-nav{
    box-sizing:border-box;
    min-width:0;
    overflow:hidden;
    isolation:isolate;
}
.drawer-backdrop{
    cursor:pointer;
}
body.menu-open{
    overflow:hidden;
}
@media(max-width:640px){
    .bottom-nav{
        left:10px;
        right:10px;
        width:auto;
        max-width:none;
        transform:none;
    }
}

/* ==========================================================================
   Shared App Chrome — final normalization
   Page styles contain legacy copies of the shared header/drawer/navigation.
   Keep one consistent chrome on every authenticated page.
   ========================================================================== */
body.app-page .shell {
    width: min(100% - 28px, 1180px) !important;
    margin-left: auto;
    margin-right: auto;
}

body.app-page .topbar {
    position: fixed !important;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(8, 10, 15, 0.75);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid var(--border-glass) !important;
}

body.app-page .topbar-inner {
    width: min(100% - 28px, 1180px);
    height: 100%;
    margin: auto;
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    gap: 12px;
}

body.app-page .menu-btn,
body.app-page .profile-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: inherit;
}

body.app-page .menu-btn i {
    font-size: 22px;
    color: #e2e8f0;
}

body.app-page .profile-btn {
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: 0 0 16px rgba(255, 190, 59, 0.35);
}

body.app-page .profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.app-page .brand {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 40%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 190, 59, 0.25);
}

body.app-page .bottom-nav {
    position: fixed !important;
    z-index: 999 !important;
    left: 50% !important;
    right: auto !important;
    bottom: 12px !important;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 20px), 620px) !important;
    max-width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    height: 72px !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: rgba(10, 13, 20, 0.85) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 26px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    isolation: isolate;
}

body.app-page .nav-item {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 0 !important;
    border-radius: 18px !important;
    color: #717d8e !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    transition: all 0.25s ease !important;
}

body.app-page .nav-item i {
    flex: 0 0 auto !important;
    font-size: 19px !important;
}

body.app-page .nav-item span {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-page .nav-item.active {
    background: linear-gradient(145deg, rgba(255, 190, 59, 0.22), rgba(255, 152, 0, 0.08)) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 190, 59, 0.3) !important;
    box-shadow: 0 6px 18px rgba(255, 190, 59, 0.15) !important;
}

body.app-page .nav-item.active i {
    color: var(--gold-bright) !important;
    transform: translateY(-1px) !important;
}

body.app-page .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

body.app-page .drawer-backdrop.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

body.app-page .drawer {
    position: fixed;
    z-index: 1501;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(340px, 86vw) !important;
    max-width: 340px !important;
    padding: 0 !important;
    background: #090c13 !important;
    border-right: 1px solid var(--border-glass) !important;
    transform: translate3d(-105%, 0, 0) !important;
    transition: transform 0.22s ease !important;
    box-shadow: 30px 0 90px rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    flex-direction: column !important;
    contain: layout paint;
}

body.app-page .drawer.active {
    transform: translate3d(0, 0, 0) !important;
}

body.app-page .drawer-header {
    padding: 26px 22px 20px !important;
    border-bottom: 1px solid var(--border-glass) !important;
    background: linear-gradient(180deg, #151a26 0%, #090c13 100%) !important;
    position: relative;
}

body.app-page .drawer-close {
    position: absolute;
    top: 22px;
    right: 20px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    font-size: 15px;
}

body.app-page .drawer-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

body.app-page .drawer-avatar,
body.app-page .drawer-avatar-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    flex-shrink: 0;
}

body.app-page .drawer-avatar {
    object-fit: cover;
    border: 2px solid var(--border-gold-bright);
    background: #080a0e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.app-page .drawer-avatar-placeholder {
    display: grid;
    place-items: center;
    background: rgba(255, 190, 59, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold-bright);
    font-size: 26px;
}

body.app-page .drawer-user-info { min-width: 0; }
body.app-page .drawer-user-info strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}
body.app-page .drawer-user-info small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.app-page .drawer-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

body.app-page .drawer-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.app-page .drawer-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    padding: 0 12px 6px;
}

body.app-page .drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    width: 100%;
    transition: all 0.2s ease;
}

body.app-page .drawer-link:hover,
body.app-page .drawer-link:active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(3px);
}

body.app-page .drawer-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--gold-bright);
    font-size: 17px;
    flex-shrink: 0;
}

body.app-page .drawer-link-text { flex: 1; min-width: 0; }
body.app-page .drawer-link-arrow { color: var(--text-dim); font-size: 13px; }

body.app-page .drawer-footer {
    padding: 18px;
    border-top: 1px solid var(--border-glass);
    background: #090c13;
}

body.app-page .drawer-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.app-page .drawer-auth-btn {
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
}

body.app-page .drawer-logout-btn {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    font-size: 13px;
    font-weight: 800;
}

body.app-page .overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    padding: 20px;
}

body.app-page .overlay.open { display: flex; }

@media (max-width: 640px) {
    body.app-page .shell { width: calc(100% - 20px); }
    body.app-page .topbar-inner { width: calc(100% - 20px); }
    body.app-page .bottom-nav {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }
}


body.app-page {
    min-height: 100vh !important;
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 190, 59, 0.16), transparent 42%),
        radial-gradient(circle at 100% 30%, rgba(56, 189, 248, 0.08), transparent 35%),
        radial-gradient(circle at 0% 70%, rgba(139, 92, 246, 0.08), transparent 35%),
        linear-gradient(180deg, #07090e 0%, #050608 100%);
    color: var(--text-pure) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    padding: 84px 0 106px !important;
    overflow-x: hidden !important;
}

body.app-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 80%);
}

body.app-page .toast-container {
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.pwa-install-button{position:fixed;right:16px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:1600;display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 15px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:linear-gradient(135deg,#1d4ed8,#10b981);color:#fff;font-size:12px;font-weight:700;line-height:1.2;font-family:inherit;box-shadow:0 12px 30px rgba(0,0,0,.28);cursor:pointer}.pwa-install-button[hidden]{display:none}.pwa-install-button i{font-size:15px}@media(max-width:640px){.pwa-install-button{right:12px;bottom:calc(72px + env(safe-area-inset-bottom));height:40px;padding:0 13px}}
