        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --bg-primary: oklch(14.1% 0.005 285.823);
            --bg-card: oklch(20.5% 0 0);
            --text-primary: oklch(95% 0 0);
            --text-secondary: oklch(65% 0 0);
            --accent: oklch(79.2% 0.209 151.711);
            --accent-hover: oklch(72.3% 0.219 149.579);
            --accent-dark: oklch(62.7% 0.194 149.214);
        }

        :root[data-theme="light"] {
            --bg-primary: oklch(98% 0 0);
            --bg-card: oklch(100% 0 0);
            --text-primary: oklch(15% 0 0);
            --text-secondary: oklch(40% 0 0);
            --accent: oklch(79.2% 0.209 151.711);
            --accent-hover: oklch(72.3% 0.219 149.579);
            --accent-dark: oklch(62.7% 0.194 149.214);
        }

        :root[data-theme="light"] {
            --bg-primary: oklch(98% 0 0);
            --bg-card: oklch(100% 0 0);
            --text-primary: oklch(15% 0 0);
            --text-secondary: oklch(40% 0 0);
            --accent: oklch(79.2% 0.209 151.711);
            --accent-hover: oklch(72.3% 0.219 149.579);
            --accent-dark: oklch(62.7% 0.194 149.214);
        }

        :root[data-theme="light"] .tariff-card {
            background: rgba(255, 255, 255, 0.7);
            border-color: rgba(0, 0, 0, 0.1);
        }

        :root[data-theme="light"] .bottom-nav {
            background: rgba(255, 255, 255, 0.7);
            border-top-color: rgba(0, 0, 0, 0.1);
        }

        :root[data-theme="light"] .btn {
            background: rgba(255, 255, 255, 0.8);
            border-color: rgba(0, 0, 0, 0.1);
            color: var(--text-primary);
        }

        :root[data-theme="light"] .auth-panel,
        :root[data-theme="light"] .card,
        :root[data-theme="light"] .tariff-card {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(15, 23, 42, 0.12);
        }

        :root[data-theme="light"] .auth-card input {
            background: rgba(248, 250, 252, 0.95);
            border-color: rgba(15, 23, 42, 0.18);
            color: #0f172a;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            height: 100vh;
            overflow: hidden;
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        html {
            overflow-x: hidden;
        }

        .auth-shell {
            position: fixed;
            inset: 0;
            z-index: 3000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.18), transparent 45%),
                        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.07), transparent 45%),
                        var(--bg-primary);
        }

        .auth-panel {
            width: 100%;
            max-width: 460px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 20px;
            padding: 20px;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }

        .auth-brand {
            font-size: 26px;
            font-weight: 700;
            margin-bottom: 14px;
        }

        .auth-tabs {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 16px;
        }

        .auth-tab {
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-secondary);
            border-radius: 12px;
            padding: 10px 8px;
            font-size: 13px;
            cursor: pointer;
        }

        .auth-tab.active {
            color: var(--text-primary);
            background: rgba(34, 197, 94, 0.15);
            border-color: rgba(34, 197, 94, 0.35);
        }

        .auth-card {
            display: none;
        }

        .auth-card.auth-card-active {
            display: block;
        }

        .auth-card h2 {
            font-size: 20px;
            margin-bottom: 6px;
        }

        .auth-card p {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 14px;
        }

        .auth-card form {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .auth-card input {
            width: 100%;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
        }

        .auth-card input:focus {
            border-color: rgba(34, 197, 94, 0.5);
            box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
        }

        .app {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .sidebar-nav {
            display: none;
        }

        .page-header {
            padding: 16px 20px 12px;
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .content {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            
            padding: 0 20px calc(20px + 40px + 60px + env(safe-area-inset-bottom)) 20px;
            -webkit-overflow-scrolling: touch;
        }

        .card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .welcome-card {
            margin-bottom: 16px;
            position: relative;
            overflow: hidden;
            background-image: url('/images/leaf.jpg');
            background-size: 150%;
            background-position: center center;
            background-repeat: no-repeat;
            border: none !important;
            box-shadow: none !important;
        }

        .welcome-card.card {
            border: none !important;
            box-shadow: none !important;
        }

        .welcome-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
            backdrop-filter: blur(25px) saturate(180%);
            -webkit-backdrop-filter: blur(25px) saturate(180%);
            border: none;
            box-shadow: none;
            z-index: 0;
        }

        .welcome-card > * {
            position: relative;
            z-index: 1;
        }

        .welcome-card h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary);
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .welcome-card .subtitle {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.5;
            text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
        }

        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 16px;
        }

        .stat-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 16px;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
        }

        .stat-card:active {
            transform: scale(0.98);
            opacity: 0.8;
        }

        .stat-card-title {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .stat-card-value {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .analytics-period-btn {
            padding: 10px 16px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .analytics-period-btn.active {
            background: var(--accent);
            color: var(--bg-primary);
            border-color: var(--accent);
        }

        .analytics-period-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .analytics-period-btn.active:hover {
            background: var(--accent-hover);
        }

        .tariff-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .tariff-select-card {
            position: relative;
            overflow: hidden;
            background-image: url('/images/leaf-3.jpg');
            background-size: 150%;
            background-position: center center;
            background-repeat: no-repeat;
            border: none !important;
            box-shadow: none !important;
        }

        .tariff-select-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
            backdrop-filter: blur(25px) saturate(180%);
            -webkit-backdrop-filter: blur(25px) saturate(180%);
            border-radius: inherit;
            box-shadow: none;
            z-index: 0;
        }

        .tariff-select-card > * {
            position: relative;
            z-index: 1;
        }

        .tariff-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 8px;
        }

        .tariff-card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            flex: 1;
            min-width: 0;
            word-break: break-word;
        }

        .tariff-card-badge {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .status-pulse-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent);
            box-shadow: 0 0 8px var(--accent), 0 0 12px var(--accent);
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes pulse {
            50% {
                opacity: 0.5;
            }
        }

        .tariff-card-price {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .tariff-card-period {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }

        .btn {
            width: 100%;
            padding: 14px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--text-primary);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        }

        .btn:active {
            opacity: 0.8;
            transform: scale(0.98);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--text-primary);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        }

        .profile-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 24px;
        }

        .profile-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            overflow: hidden;
        }

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

        .profile-info {
            flex: 1;
        }

        .profile-username {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

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

        .balance-card {
            position: relative;
            overflow: hidden;
            background-image: url('/images/leaf2.jpg');
            background-size: 150%;
            background-position: center center;
            background-repeat: no-repeat;
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 16px;
            border: none !important;
            box-shadow: none !important;
        }

        .balance-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
            backdrop-filter: blur(25px) saturate(180%);
            -webkit-backdrop-filter: blur(25px) saturate(180%);
            border-radius: inherit;
            box-shadow: none;
            z-index: 0;
        }

        .balance-card > * {
            position: relative;
            z-index: 1;
        }

        .balance-label {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 8px;
            text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
        }

        .balance-amount {
            font-size: 32px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 16px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

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

        .chart-period-btn, .chart-metric-btn {
            flex: 1;
            padding: 8px 12px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .chart-period-btn.active, .chart-metric-btn.active {
            background: var(--bg-primary);
            color: var(--text-primary);
            font-weight: 600;
        }

        .chart-period-btn:hover, .chart-metric-btn:hover {
            color: var(--text-primary);
        }

        .bottom-nav {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 100;
            box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.3);
        }

        
        .bottom-nav::before {
            content: '';
            position: absolute;
            top: -40px;
            left: 0;
            right: 0;
            height: 40px;
            background: linear-gradient(
                to bottom,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.04) 40%,
                rgba(255, 255, 255, 0.08) 70%,
                rgba(255, 255, 255, 0.12) 100%
            );
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            pointer-events: none;
            z-index: -1;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            cursor: pointer;
            padding: 8px 16px;
            border-radius: 20px;
            transition: all 0.2s;
            -webkit-tap-highlight-color: transparent;
            color: var(--text-secondary);
            position: relative;
            min-width: 60px;
        }

        .nav-item:active {
            opacity: 0.7;
        }

        .nav-item.active {
            color: var(--accent);
        }


        .nav-item svg {
            width: 24px;
            height: 24px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            position: relative;
            z-index: 1;
        }

        .nav-item.active svg {
            stroke: var(--accent);
        }

        .nav-item-label {
            font-size: 12px;
            color: var(--text-secondary);
            position: relative;
            z-index: 1;
        }

        .nav-item.active .nav-item-label {
            color: var(--accent);
        }

        .page {
            display: none;
        }

        .page.active {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .loading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid oklch(25% 0 0);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* Notification system */
        .notification-container {
            position: fixed;
            top: 24px;
            left: 0;
            right: 0;
            z-index: 13050;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 0 24px;
            pointer-events: none;
        }

        .notification {
            background: #0a0a0a;
            outline: 2px solid rgba(23, 23, 23, 0.7);
            border-radius: 16px;
            padding: 12px 24px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            display: flex;
            gap: 16px;
            align-items: center;
            max-width: 500px;
            width: 100%;
            pointer-events: auto;
            cursor: grab;
            user-select: none;
            transform: translateY(-100px);
            opacity: 0;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .flow-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 12000;
            background: rgba(0, 0, 0, 0.78);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            opacity: 0;
            transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .flow-modal-overlay.active {
            opacity: 1;
        }

        .flow-modal-content {
            width: 100%;
            max-width: 440px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 16px;
            padding: 18px;
            transform: translateY(16px) scale(0.985);
            transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .flow-modal-overlay.active .flow-modal-content {
            transform: translateY(0) scale(1);
        }

        .notification.show {
            transform: translateY(0);
            opacity: 1;
        }

        .notification.hiding {
            transform: translateY(-100px);
            opacity: 0;
        }

        .notification.dragging {
            cursor: grabbing;
            transition: none;
        }

        .notification-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .notification-icon.error {
            color: #FF6187;
        }

        .notification-icon.success {
            color: #A9DC76;
        }

        .notification-text {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            font-size: 14px;
            font-weight: 400;
            color: white;
            flex: 1;
        }

        @media (min-width: 640px) {
            .notification-container {
                padding: 0;
            }
            
            .notification {
                padding: 12px 24px;
            }
            
            .notification-text {
                font-size: 16px;
            }
        }

        .tariff-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .tariff-item {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
        }

        .tariff-item:active {
            transform: scale(0.98);
            opacity: 0.8;
        }

        .tariff-item-info {
            flex: 1;
        }

        .tariff-item-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .tariff-item-price {
            font-size: 14px;
            color: var(--text-secondary);
        }

        .tariff-item-arrow {
            color: var(--text-secondary);
            font-size: 20px;
        }

        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-secondary);
        }

        .empty-state-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-state-text {
            font-size: 14px;
        }

        
        .snow-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
            overflow: hidden;
        }

        .snowflake {
            position: absolute;
            top: -10px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1em;
            font-family: Arial, sans-serif;
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
            animation: snowfall linear infinite;
            user-select: none;
        }

        @keyframes snowfall {
            0% {
                transform: translateY(0) translateX(0) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) translateX(var(--drift)) rotate(360deg);
                opacity: 0;
            }
        }

        .snowflake:nth-child(odd) {
            animation-duration: 10s;
            animation-delay: 0s;
        }

        .snowflake:nth-child(even) {
            animation-duration: 15s;
            animation-delay: 2s;
        }

        .snowflake:nth-child(3n) {
            animation-duration: 12s;
            animation-delay: 1s;
        }

        .snowflake:nth-child(4n) {
            animation-duration: 18s;
            animation-delay: 3s;
        }

        .snowflake:nth-child(5n) {
            animation-duration: 14s;
            animation-delay: 0.5s;
        }

        @media (min-width: 1024px) {
            .app {
                flex-direction: row;
            }

            .sidebar-nav {
                display: flex;
                flex-direction: column;
                justify-content: space-evenly;
                align-items: center;
                width: 96px;
                min-width: 96px;
                max-width: 96px;
                padding: 20px 0;
                background: transparent;
                border-right: 1px solid rgba(255, 255, 255, 0.04);
            }

            .sidebar-nav .nav-item {
                width: 56px;
                height: 56px;
                min-width: 56px;
                padding: 0;
                border-radius: 999px;
                background: rgba(255, 255, 255, 0.03);
                border: 1px solid rgba(255, 255, 255, 0.08);
                box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
            }

            .sidebar-nav .nav-item.active {
                background: rgba(34, 197, 94, 0.2);
                border-color: rgba(34, 197, 94, 0.35);
                transform: translateY(-1px);
            }

            .sidebar-nav .nav-item .nav-item-label {
                display: none;
            }

            .sidebar-nav .nav-item svg {
                width: 22px;
                height: 22px;
            }

            .page.active {
                flex: 1;
                align-items: center;
            }

            .bottom-nav {
                display: none;
            }

            .page-header {
                width: min(1080px, calc(100vw - 140px));
                padding: 20px 0 14px;
            }

            .content {
                width: min(1080px, calc(100vw - 140px));
                padding: 0 0 28px 0;
            }
        }
