/* ==========================================================================
   PREMIUM EMOJI STUDIO - TELEGRAM MINI APP STYLESHEET (V5.0 PRO)
   ========================================================================== */

:root {
    --bg-main: #0A0D14;
    --bg-surface: rgba(16, 21, 32, 0.75);
    --bg-surface-2: rgba(24, 32, 47, 0.85);
    --card-bg: rgba(16, 21, 32, 0.70);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(0, 230, 118, 0.45);
    --card-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

    --primary: #00E676;
    --primary-glow: 0 0 24px rgba(0, 230, 118, 0.35);
    --cyber: #00F0FF;
    --cyber-glow: 0 0 20px rgba(0, 240, 255, 0.4);
    --gold: #FFD700;
    --gold-glow: 0 0 20px rgba(255, 215, 0, 0.3);
    --ruby: #FF3366;
    --purple: #A855F7;

    --text-main: #FFFFFF;
    --text-sub: #E1E2EC;
    --text-muted: #9BA4B5;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.65);
    --font: 'Outfit', 'Inter', -apple-system, sans-serif;

    --header-bg: rgba(16, 20, 30, 0.85);
    --nav-bg: rgba(16, 20, 30, 0.90);

    /* Emil Kowalski Custom Easing Curves */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ===== LIGHT THEME ===== */
body.light-theme {
    --bg-main: #F0F5F2;
    --bg-surface: #FFFFFF;
    --bg-surface-2: #E2ECE6;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 160, 80, 0.2);

    --text-main: #0A1610;
    --text-sub: #2B4A3A;
    --text-muted: #5A7B6B;

    --shadow-card: 0 6px 20px rgba(0, 40, 20, 0.08);
    --header-bg: rgba(240, 245, 242, 0.95);
    --nav-bg: rgba(240, 245, 242, 0.96);
}

/* ===== RESETS & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

button, input, select, textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

.hidden {
    display: none !important;
}

/* ===== APP CONTAINER ===== */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-main);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ambient Background Glows */
.threeui-webgl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}

.glow-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.glow-1 {
    top: -60px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: rgba(0, 230, 118, 0.14);
}
.glow-2 {
    bottom: 120px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: rgba(0, 229, 255, 0.09);
}

/* Emil Kowalski Tactile Button & Card Dynamics */
button, .tab-btn, .nav-item, .emoji-card, .coin-badge-header, .pricing-card, .color-pill {
    transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
    will-change: transform;
}

button:active, .tab-btn:active, .nav-item:active, .emoji-card:active, .coin-badge-header:active, .pricing-card:active, .color-pill:active {
    transform: scale(0.97) !important;
}

@media (hover: hover) and (pointer: fine) {
    .emoji-card:hover {
        transform: translateY(-3px) scale(1.01);
        border-color: rgba(0, 230, 118, 0.5);
    }
}

/* ===== HEADER ===== */
.app-header {
    height: 60px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 16px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #00E676, #10B981);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #030605;
    font-size: 16px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.screen-header {
    display: none !important;
}

/* Luxury Golden Coin Badge */
.coin-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 9999px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #FFD700;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), border-color 160ms var(--ease-out);
    user-select: none;
}
.coin-badge-header:active {
    transform: scale(0.95) !important;
}
.coin-icon {
    font-size: 14px;
    line-height: 1;
}
.coin-count {
    font-weight: 800;
    color: #FFD700;
    letter-spacing: -0.01em;
}
.coin-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 215, 0, 0.85);
    margin-right: 2px;
}
.coin-plus-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFD700;
    color: #030605;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.icon-action-btn, .back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    color: var(--text-sub);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
    position: relative;
}

.icon-action-btn svg, .back-btn svg {
    stroke: var(--text-sub);
    transition: stroke 0.2s ease;
}

.icon-action-btn:active, .back-btn:active {
    transform: scale(0.92) !important;
    background: rgba(0, 230, 118, 0.15);
    color: var(--primary);
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary);
}

/* ===== MAIN CONTENT & SCREEN ROUTER ===== */
.app-main {
    flex: 1;
    padding: 16px 16px calc(92px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    z-index: 1;
}

.screen {
    display: none;
    animation: fadeIn 0.25s ease forwards;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HERO CARD ===== */
.hero-card {
    background: linear-gradient(145deg, rgba(14, 25, 20, 0.95), rgba(6, 12, 9, 0.98));
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

body.light-theme .hero-card {
    background: linear-gradient(145deg, #FFFFFF, #F0F8F4);
    border-color: rgba(0, 160, 80, 0.2);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, #00E676, #00B0FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 18px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #00E676, #10B981);
    color: #030605;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px var(--primary-glow);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 16px;
    font-size: 15px;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(45deg);
    animation: shine 3.5s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
}

/* ===== SECTION & TABS ===== */
.section-container {
    margin-bottom: 24px;
}

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

.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
}

.tabs-scroll {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.tabs-scroll::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.2);
}

body.light-theme .tab-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-sub);
}

body.light-theme .tab-btn.active {
    background: rgba(0, 180, 80, 0.12);
    border-color: #10B981;
    color: #0A7B4F;
}

/* ===== EMOJI GRID & SHOWCASE ===== */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.emoji-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-specular), 0 8px 24px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.emoji-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--card-specular), 0 12px 32px rgba(0, 230, 118, 0.25);
    transform: translateY(-2px);
}

.emoji-card:active {
    transform: scale(0.97) !important;
    border-color: var(--primary);
}

.emoji-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 230, 118, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 230, 118, 0.3);
    text-transform: uppercase;
}

.emoji-badge.logo-badge {
    background: rgba(0, 229, 255, 0.15);
    color: var(--cyber);
    border-color: rgba(0, 229, 255, 0.3);
}

/* Stitch Canvas Checkerboard Transparency Grid */
.checker-grid, .emoji-tgs-container, .preview-display-area {
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%);
}

.emoji-tgs-container {
    width: 84px !important;
    height: 84px !important;
    margin: 6px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-radius: 12px;
    background: rgba(11, 14, 21, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.emoji-tgs-container svg, .emoji-tgs-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain !important;
}

.emoji-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4px;
    text-align: center;
}

.emoji-sublabel {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: center;
}

/* ===== PROCESS TIMELINE ===== */
.process-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E676, #10B981);
    color: #030605;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.step-info p {
    font-size: 11px;
    color: var(--text-sub);
}

/* ===== SCREEN HEADERS & STEPPERS ===== */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.screen-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.back-link {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
}

.stepper-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.step-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item.active {
    background: var(--primary);
    color: #030605;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.step-item.done {
    background: rgba(0, 230, 118, 0.18);
    color: var(--primary);
    border-color: var(--primary);
}

.step-line {
    flex: 1;
    max-width: 28px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
}

body.light-theme .step-item {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

/* ===== SELECTION OPTIONS (SCREEN 2) ===== */
.selection-intro {
    text-align: center;
    margin-bottom: 20px;
}
.selection-intro h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.selection-intro p {
    font-size: 12px;
    color: var(--text-sub);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card);
}

.option-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.option-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--cyber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.option-icon-box.icon-text-box {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--primary);
}

.option-content {
    flex: 1;
}

.option-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.option-content p {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.4;
}

.option-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== DROPZONE & UPLOAD (SCREEN 3) ===== */
.upload-section, .text-input-section {
    margin-bottom: 24px;
}
.step-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.step-subtitle {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.drop-zone {
    border: 2px dashed rgba(0, 230, 118, 0.35);
    background: rgba(0, 230, 118, 0.03);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(0, 230, 118, 0.1);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
}

.upload-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.upload-formats {
    font-size: 10px;
    color: var(--text-muted);
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
}

.preview-container img {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.file-meta {
    flex: 1;
    text-align: left;
    overflow: hidden;
}

.file-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 10px;
    color: var(--text-muted);
}

.btn-remove-file {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 23, 68, 0.15);
    color: var(--ruby);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Style options - Sleek Horizontal Pill Carousel */
.style-picker-container {
    margin-top: 16px;
    width: 100%;
}
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.style-options {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.style-options::-webkit-scrollbar {
    display: none;
}
.style-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 9px 15px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.style-btn:active {
    transform: scale(0.96) !important;
}
.style-btn.active {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.22), rgba(0, 229, 255, 0.16));
    border-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.28);
}

/* ===== MATN EMOJI & 3D LIVE PREVIEW (SCREEN 4) ===== */
.input-group {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
}

.custom-input {
    width: 100%;
    padding: 14px 18px;
    padding-right: 60px;
    border-radius: var(--radius-md);
    background: rgba(14, 25, 20, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    box-sizing: border-box;
    transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms var(--ease-out);
}

.custom-input:focus {
    background: rgba(18, 32, 26, 0.9);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.22);
}

.char-count {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 9999px;
}

/* Live Animation Preview Box */
.live-preview-box {
    position: relative;
    width: 100%;
    min-height: 200px;
    border-radius: 20px;
    background: rgba(16, 21, 32, 0.75);
    border: 1px solid rgba(0, 230, 118, 0.22);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 16px;
    margin-bottom: 16px;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(0, 230, 118, 0.06);
    overflow: hidden;
}

.preview-badge {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 9999px;
    background: rgba(0, 230, 118, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 230, 118, 0.35);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-display-area {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(11, 14, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 8px auto;
    position: relative;
    overflow: hidden;
}

.preview-display-area svg, .preview-display-area canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain !important;
}

.preview-hint-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

.color-palette {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.palette-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.palette-options {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}
.color-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.color-swatch:active {
    transform: scale(0.92) !important;
}
.color-swatch.active {
    transform: scale(1.12);
    border-color: #FFFFFF;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
}

/* Bottom Action Container */
.bottom-action-container {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(6, 11, 9, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    z-index: 50;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #00E676 0%, #00E5FF 100%);
    color: #030605;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px -4px rgba(0, 230, 118, 0.45);
    transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), filter 160ms var(--ease-out);
}

.btn-primary:active {
    transform: scale(0.97) !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}

.btn-secondary:active {
    transform: scale(0.97) !important;
}

/* ===== CHECKOUT & PAYMENT (SCREEN 5) ===== */
.checkout-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-details-card, .payment-methods-card, .price-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-size: 12px;
    color: var(--text-sub);
}
.detail-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}
.detail-val.highlight {
    color: var(--primary);
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
}
.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.qty-num {
    font-size: 12px;
    font-weight: 800;
    min-width: 40px;
    text-align: center;
}

.pay-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-transfer-box {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 229, 255, 0.04));
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px;
}
.card-number-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.card-number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.card-number {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--primary);
}
.btn-copy-card {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-copy-card:active {
    transform: scale(0.95);
}
.card-owner {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 4px;
}

.price-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.price-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
}
.price-amount {
    font-size: 20px;
    font-weight: 900;
    color: var(--gold);
}

.bottom-action-container {
    margin-top: 20px;
}

/* ===== MY ORDERS (SCREEN 6) ===== */
.orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

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

.order-id {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.status-pending {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.status-processing {
    background: rgba(0, 229, 255, 0.15);
    color: var(--cyber);
    border: 1px solid rgba(0, 229, 255, 0.3);
}
.status-ready {
    background: rgba(0, 230, 118, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 230, 118, 0.3);
}
.status-rejected {
    background: rgba(255, 23, 68, 0.15);
    color: var(--ruby);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.order-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.order-meta {
    flex: 1;
}

.order-meta h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.order-meta p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sub-status-text {
    display: block;
    font-size: 10px;
    color: var(--text-sub);
    margin-top: 8px;
    font-style: italic;
}

/* ===== PROFIL (SCREEN 7) ===== */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E676, #00E5FF);
    color: #030605;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 18px var(--primary-glow);
}

.profile-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
}

.profile-username {
    font-size: 12px;
    color: var(--primary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item span {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.arrow-icon {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== ADMIN PANEL (SCREEN 8) ===== */
.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.admin-order-receipt-thumb {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-approve {
    background: linear-gradient(135deg, #00E676, #10B981);
    color: #030605;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    flex: 1;
}

.btn-reject {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid var(--ruby);
    color: var(--ruby);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    flex: 1;
}

/* Live preview styles defined in the LIVE PREVIEW BOX section at bottom of file */



/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 12px env(safe-area-inset-bottom, 0px) 12px;
    background: rgba(6, 11, 9, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-sizing: border-box;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    gap: 3px;
    color: var(--text-muted);
    padding: 6px 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: stroke 0.2s ease;
}

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

.nav-label {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item.active {
    color: var(--primary);
}
.nav-item.active .nav-icon {
    transform: translateY(-2px);
    color: var(--primary);
}

.nav-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E676 0%, #10B981 100%);
    color: #030605;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 230, 118, 0.45);
    margin: -20px 8px 0 8px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2.5px solid rgba(6, 11, 9, 0.95);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav-fab:active {
    transform: scale(0.90);
    box-shadow: 0 2px 10px rgba(0, 230, 118, 0.6);
}

.app-main {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ===== MODAL DIALOG ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease forwards;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.modal-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-header h4 {
    font-size: 15px;
    font-weight: 800;
}
.btn-modal-close {
    color: var(--text-muted);
    font-size: 16px;
}

.modal-body {
    padding: 18px;
    font-size: 13px;
    color: var(--text-sub);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-drop-zone {
    margin-top: 8px;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 420px);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-msg {
    background: rgba(14, 25, 20, 0.95);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-msg i {
    color: var(--primary);
    font-size: 16px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================================
   COIN / CREDITS WALLET SYSTEM STYLES
   ========================================================================= */

.coin-badge-header {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.08));
    border: 1px solid rgba(255, 215, 0, 0.35);
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.12);
}

.coin-badge-header:active {
    transform: scale(0.95);
}

.coin-icon {
    font-size: 16px;
    line-height: 1;
}

.coin-count {
    font-size: 13px;
    font-weight: 800;
    color: #FFD700;
}

.coin-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-sub);
}

.coin-plus-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFD700;
    color: #030605;
    border: none;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.hero-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    width: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: 700;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.12);
}

/* ===== TOPUP PACKAGES GRID ===== */
.topup-packages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.package-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.package-card:hover, .package-card.selected {
    border-color: #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.04));
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.package-badge-tag {
    position: absolute;
    top: -8px;
    right: -4px;
    background: linear-gradient(135deg, #FF1744, #FF5252);
    color: #FFF;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(255, 23, 68, 0.4);
}

.package-coins-title {
    font-size: 18px;
    font-weight: 900;
    color: #FFD700;
    margin: 4px 0 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.package-name {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.package-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    width: 100%;
}

/* ===== BALANCE STATUS CARD (CHECKOUT) ===== */
.balance-status-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.balance-status-left {
    display: flex;
    flex-direction: column;
}

.status-lbl {
    font-size: 11px;
    color: var(--text-muted);
}

.status-coins {
    font-size: 14px;
    font-weight: 800;
    color: #FFD700;
}

.btn-sm-topup {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid #FFD700;
    color: #FFD700;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm-topup:active {
    transform: scale(0.95);
    background: #FFD700;
    color: #030605;
}

/* ===== SUCCESS MODAL ===== */
.success-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E676, #10B981);
    color: #030605;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
}

/* =========================================================================
   PROFESSIONAL ADMIN PANEL STYLES
   ========================================================================= */

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease forwards;
}

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

.stat-metric-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-metric-icon {
    font-size: 24px;
}

.stat-metric-data {
    display: flex;
    flex-direction: column;
}

.stat-metric-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-metric-title {
    font-size: 10px;
    color: var(--text-muted);
}

.adm-package-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.adm-pkg-inputs {
    display: flex;
    gap: 6px;
    flex: 1;
}

.adm-pkg-inputs input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    width: 100%;
}

.adm-topup-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 10px;
}

.adm-topup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.adm-topup-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin: 8px 0;
    cursor: pointer;
}

.adm-topup-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.adm-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.adm-user-info {
    display: flex;
    flex-direction: column;
}

.adm-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.adm-user-meta {
    font-size: 10px;
    color: var(--text-muted);
}

.adm-user-coins-badge {
    font-size: 12px;
    font-weight: 800;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
}

/* ===== LIVE PREVIEW BOX & DISPLAY STYLES ===== */
.live-preview-box {
    background: radial-gradient(circle at 50% 35%, rgba(0, 230, 118, 0.08), rgba(12, 16, 22, 0.95)) !important;
    border: 1px solid rgba(0, 230, 118, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(0, 230, 118, 0.04) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px 14px 14px 14px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 180px !important;
}

body.light-theme .live-preview-box {
    background: radial-gradient(circle at 50% 35%, rgba(0, 230, 118, 0.12), rgba(245, 247, 250, 0.98)) !important;
    border-color: rgba(0, 200, 100, 0.3) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}

.preview-badge {
    position: absolute !important;
    top: 10px !important;
    left: 12px !important;
    background: rgba(0, 230, 118, 0.15) !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 3px 8px !important;
    border-radius: var(--radius-full) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10 !important;
}

.preview-display-area {
    width: 140px !important;
    height: 140px !important;
    min-width: 140px !important;
    min-height: 140px !important;
    margin: 8px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.preview-display-area svg, .preview-display-area canvas {
    width: 140px !important;
    height: 140px !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)) !important;
}

.preview-hint-text {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    margin-top: 6px !important;
    display: block !important;
}

/* ===== V8 TELEGRAM VIEWPORT & PREVIEW STABILITY ===== */
html,
body {
    width: 100%;
    min-height: var(--tg-viewport-height, 100dvh);
    overscroll-behavior: none;
}

.app-container {
    min-height: var(--tg-viewport-height, 100dvh);
    height: var(--tg-viewport-height, 100dvh);
}

.app-main {
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

.emoji-card {
    appearance: none;
    width: 100%;
    color: inherit;
    text-align: center;
    min-width: 0;
}

.emoji-tgs-container,
.preview-display-area {
    isolation: isolate;
    contain: layout paint style;
    flex: 0 0 auto;
}

.emoji-tgs-container > svg,
.emoji-tgs-container > canvas,
.preview-display-area > svg,
.preview-display-area > canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    object-fit: contain !important;
}

.preview-display-area {
    width: clamp(132px, 38vw, 168px) !important;
    height: clamp(132px, 38vw, 168px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 1;
}

.preview-display-area.is-loading::after,
.emoji-tgs-container.is-loading::after {
    content: '';
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 2px solid rgba(0, 230, 118, 0.16);
    border-top-color: var(--primary);
    animation: previewSpin 0.8s linear infinite;
    z-index: -1;
}

.preview-error,
.preview-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.preview-fallback { font-size: 32px; }

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

@media (max-width: 360px) {
    .app-main { padding-inline: 10px; }
    .emoji-grid { gap: 8px; }
    .emoji-card { padding-inline: 8px; }
    .bottom-nav { padding-inline: 6px; }
    .nav-label { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .screen,
    .btn-glow::after,
    .glow-bg,
    .preview-display-area.is-loading::after,
    .emoji-tgs-container.is-loading::after {
        animation: none !important;
    }
}

/* ==========================================================================
   TITANIUM OBSIDIAN EXECUTIVE ADMIN SUITE (STITCH AI DESIGN TOKENS)
   ========================================================================== */

.admin-quick-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    color: #FFD700;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.admin-quick-badge:hover, .admin-quick-badge:active {
    transform: scale(0.96);
    background: rgba(255, 215, 0, 0.22);
}

.admin-exec-header {
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    margin-bottom: 14px;
}

.admin-exec-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar-vip {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.vip-tag {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #FFD700;
    color: #0c0e13;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
    letter-spacing: -0.5px;
}

.admin-profile-meta {
    display: flex;
    flex-direction: column;
}

.admin-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-title-label {
    font-size: 13px;
    font-weight: 800;
    color: #FFF6DF;
}

.admin-id-pill {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.admin-subtext {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.status-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00E676;
    box-shadow: 0 0 8px #00E676;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Tabs */
.admin-tabs-exec {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.admin-tabs-exec::-webkit-scrollbar { display: none; }

.admin-tabs-exec .tab-btn {
    white-space: nowrap;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.admin-tabs-exec .tab-btn.active {
    background: rgba(255, 215, 0, 0.12);
    border-color: #FFD700;
    color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.tab-badge-alert {
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(255, 51, 102, 0.3);
    color: #FF3366;
    font-size: 10px;
    font-weight: 800;
}

.admin-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.admin-sec-heading {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.admin-sync-tag {
    font-size: 10px;
    color: var(--text-muted);
}

.admin-subhead-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Telemetry Grid */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.telemetry-card {
    background: rgba(16, 22, 34, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    backdrop-filter: blur(16px);
    transition: border-color 0.2s;
}
.telemetry-card:hover {
    border-color: rgba(255, 215, 0, 0.35);
}

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

.tc-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.tc-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tc-cyan { background: rgba(0, 240, 255, 0.12); color: #00F0FF; border: 1px solid rgba(0, 240, 255, 0.3); }
.tc-gold { background: rgba(255, 215, 0, 0.12); color: #FFD700; border: 1px solid rgba(255, 215, 0, 0.3); }
.tc-green { background: rgba(0, 230, 118, 0.12); color: #00E676; border: 1px solid rgba(0, 230, 118, 0.3); }
.tc-purple { background: rgba(168, 85, 247, 0.12); color: #A855F7; border: 1px solid rgba(168, 85, 247, 0.3); }

.tc-value-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
}

.tc-val {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}
.tc-val-revenue {
    font-size: 16px;
    font-weight: 900;
    color: #00E676;
    line-height: 1.2;
}

.tc-unit {
    font-size: 11px;
    color: var(--text-muted);
}

.tc-footer {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.tc-green-text { color: #00E676; }
.tc-gold-text { color: #FFD700; }
.tc-muted-text { color: var(--text-muted); }

.online-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00E676;
    box-shadow: 0 0 6px #00E676;
}

/* Alert Banner */
.admin-alert-banner {
    background: linear-gradient(90deg, rgba(255, 51, 102, 0.15), rgba(16, 22, 34, 0.7));
    border: 1px solid rgba(255, 51, 102, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-banner-title {
    font-size: 12px;
    font-weight: 800;
    color: #FF3366;
}
.alert-banner-desc {
    font-size: 10px;
    color: var(--text-muted);
}

/* Pending Topups */
.pending-topup-card {
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 10px;
    backdrop-filter: blur(16px);
}

.ptc-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ptc-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #FFD700;
}

.ptc-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}
.ptc-uid {
    font-size: 10px;
    color: var(--text-muted);
}

.ptc-price-box {
    text-align: right;
}
.ptc-coins {
    font-size: 13px;
    font-weight: 900;
    color: #00E676;
}
.ptc-uzs {
    font-size: 11px;
    color: var(--text-muted);
}

.ptc-receipt-btn {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 10px;
    color: #00F0FF;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.15s;
}
.ptc-receipt-btn:hover {
    background: rgba(0, 240, 255, 0.18);
}

.ptc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-ptc-approve {
    background: #00E676;
    color: #030605;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.3);
}
.btn-ptc-reject {
    background: rgba(255, 51, 102, 0.12);
    border: 1px solid rgba(255, 51, 102, 0.35);
    color: #FF3366;
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* CRM */
.crm-search-box {
    position: relative;
    margin-bottom: 12px;
}
.crm-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}
.crm-search-input {
    width: 100%;
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 9px 12px 9px 34px;
    color: var(--text-main);
    font-size: 12px;
}
.crm-search-input:focus {
    border-color: #FFD700;
    outline: none;
}

.crm-user-card {
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 8px;
    backdrop-filter: blur(16px);
}
.crm-user-card.is-blocked {
    border-color: rgba(255, 51, 102, 0.4);
    opacity: 0.8;
}

.crm-user-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.crm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-main);
    font-size: 14px;
}
.crm-user-details {
    display: flex;
    flex-direction: column;
}
.crm-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}
.crm-subinfo {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-status-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}
.crm-status-pill.active {
    background: rgba(0, 230, 118, 0.15);
    color: #00E676;
    border: 1px solid rgba(0, 230, 118, 0.3);
}
.crm-status-pill.blocked {
    background: rgba(255, 51, 102, 0.15);
    color: #FF3366;
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.crm-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-crm-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: 6px;
    padding: 6px 4px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-crm-action:hover {
    background: rgba(255, 255, 255, 0.1);
}
.btn-crm-grant {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}
.btn-crm-block-toggle.to-block {
    background: rgba(255, 51, 102, 0.12);
    border-color: rgba(255, 51, 102, 0.3);
    color: #FF3366;
}
.btn-crm-block-toggle.to-unblock {
    background: rgba(0, 230, 118, 0.12);
    border-color: rgba(0, 230, 118, 0.3);
    color: #00E676;
}

/* Broadcast */
.admin-broadcast-card {
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px;
    backdrop-filter: blur(16px);
}
.broadcast-audience-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ba-label {
    font-size: 11px;
    color: var(--text-muted);
}
.ba-chips {
    display: flex;
    gap: 6px;
}
.ba-chip {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
}
.ba-chip.active {
    background: rgba(255, 215, 0, 0.15);
    border-color: #FFD700;
    color: #FFD700;
}
.broadcast-textarea {
    resize: none;
    font-size: 12px;
}

.broadcast-status-msg {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #00E676;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.admin-empty-state {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 24px 0;
}


