/* ==========================================================================
   ARTIFY AI — COMPLETE UI/UX DESIGN SYSTEM (Production Redesign v4.0)
   Aesthetic: Dark Futuristic / Creative AI Studio
   Target: Authenticated Dashboard, Tool Workspaces, User Profile & Admin Panel
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS & CSS VARIABLES
   ========================================================================== */
:root {
    /* Color Palette - Deep Obsidian & Cosmic Void */
    --bg-color: #070913;
    --bg-void: #030408;
    --bg-surface: #0c1020;
    --bg-surface-elevated: #11172e;
    --card-bg: rgba(13, 18, 37, 0.72);
    --card-bg-hover: rgba(20, 28, 56, 0.85);
    --card-bg-elevated: rgba(18, 24, 48, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.035);
    --bg-glass-strong: rgba(255, 255, 255, 0.07);

    /* Brand Accents & Core Chromas */
    --primary: #6366f1;           /* Electric Indigo */
    --primary-light: #818cf8;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --accent-cyan: #06b6d4;
    --cyan-bright: #22d3ee;
    --cyan-glow: rgba(6, 182, 212, 0.3);
    
    --violet: #8b5cf6;
    --purple: #a855f7;
    --fuchsia: #d946ef;
    
    /* VIP Luxury & Gold */
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --gold-surface: rgba(245, 158, 11, 0.08);
    --gold-border: rgba(245, 158, 11, 0.25);
    
    /* Status Chromas */
    --emerald: #10b981;
    --emerald-bright: #22c55e;
    --emerald-glow: rgba(16, 185, 129, 0.28);
    --rose: #ef4444;
    --rose-bright: #f43f5e;
    --rose-glow: rgba(239, 68, 68, 0.28);

    /* Text Hierarchy */
    --text-main: #f8fafc;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Borders & Outlines */
    --border: rgba(99, 102, 241, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-card: rgba(129, 140, 248, 0.14);
    --border-hover: rgba(99, 102, 241, 0.5);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-gold: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
    --gradient-emerald: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    --gradient-border: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(99, 102, 241, 0.25) 50%, rgba(255, 255, 255, 0.02) 100%);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.6);
    --shadow-primary: 0 4px 25px rgba(99, 102, 241, 0.35);
    --shadow-cyan: 0 4px 25px rgba(6, 182, 212, 0.3);
    --shadow-gold: 0 4px 25px rgba(245, 158, 11, 0.3);

    /* Transitions */
    --trans-fast: 0.15s ease;
    --trans-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 85%, rgba(245, 158, 11, 0.03) 0%, transparent 35%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(7, 9, 19, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--trans-fast);
}
a:hover {
    color: #ffffff;
}

img, video {
    max-width: 100%;
    display: block;
}

/* Utility Helpers */
.w-100 { width: 100%; }
.mt-20 { margin-top: 20px; }

/* ==========================================================================
   3. APP HEADER & NAVIGATION
   ========================================================================== */
#main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 4%;
    background: rgba(7, 9, 19, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    user-select: none;
    text-decoration: none;
}

.logo-sparkle {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
    animation: pulseSparkle 3s ease-in-out infinite;
}

@keyframes pulseSparkle {
    0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4)); }
    50% { transform: scale(1.15) rotate(10deg); filter: drop-shadow(0 0 18px rgba(99, 102, 241, 0.8)); }
}

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

.logo-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.logo-badge {
    font-size: 0.62rem;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: var(--primary-light);
    letter-spacing: 1px;
    margin-left: 4px;
}

/* Nav Menu */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--trans-normal);
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.nav-icon {
    font-size: 1rem;
}

.admin-nav-link {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--gold-bright) !important;
}

.admin-nav-link:hover {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 15px var(--gold-glow);
}

/* Header User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    box-shadow: 0 2px 14px rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    transition: all var(--trans-normal);
}

.credit-badge:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.logout-btn {
    padding: 7px 16px !important;
    font-size: 0.88rem !important;
    border-radius: var(--radius-pill) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   4. BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--trans-normal);
    text-align: center;
    text-decoration: none;
    line-height: 1.2;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.btn-small {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    border-radius: var(--radius-sm) !important;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: border-color var(--trans-normal), box-shadow var(--trans-normal);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}

/* ==========================================================================
   5. AUTH VIEWS (SPLIT-SCREEN DESIGN)
   ========================================================================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: var(--bg-void);
}

.auth-visual {
    flex: 1.15;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4.5rem;
}

.auth-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
    z-index: 1;
    filter: saturate(1.2) contrast(1.05);
}

.auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg, 
        rgba(7, 9, 19, 0.4) 0%, 
        rgba(7, 9, 19, 0.6) 40%, 
        rgba(7, 9, 19, 0.95) 85%, 
        rgba(7, 9, 19, 1) 100%
    );
    z-index: 2;
}

.auth-visual-content {
    position: relative;
    z-index: 10;
    max-width: 640px;
}

.auth-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.auth-visual-content h1 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 75%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-visual-content p {
    font-size: 1.12rem;
    color: #cbd5e1;
    line-height: 1.65;
    margin-bottom: 28px;
    font-weight: 400;
}

.highlight-credit {
    color: var(--gold-bright);
    font-weight: 700;
}

.auth-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-chip {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.auth-perks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-perk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.perk-icon {
    font-size: 1.6rem;
}

.auth-perk-item strong {
    display: block;
    font-size: 0.95rem;
    color: #ffffff;
}

.auth-perk-item small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Auth Form Side */
.auth-form-side {
    flex: 0.85;
    min-width: 460px;
    max-width: 620px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 3rem;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7);
    z-index: 5;
    position: relative;
    border-left: 1px solid var(--border-card);
}

.auth-form-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.09), transparent 60%);
    pointer-events: none;
}

.auth-box {
    width: 100%;
    max-width: 440px;
    z-index: 10;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-logo {
    margin-bottom: 18px;
}

.auth-form-header h2 {
    font-family: var(--font-display);
    font-size: 1.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Input Elements */
.input-group {
    margin-bottom: 18px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.input-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
}

.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.input-field-wrapper input {
    padding-left: 42px !important;
}

.auth-input,
.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 13px 16px;
    background: rgba(18, 24, 48, 0.7);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.96rem;
    outline: none;
    transition: all var(--trans-normal);
}

.auth-input:focus,
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--primary);
    background: rgba(22, 30, 60, 0.9);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.input-terms-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.terms-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.terms-label a {
    color: var(--primary-light);
    font-weight: 600;
}

.auth-submit-btn {
    padding: 14px !important;
    font-size: 1.05rem !important;
    border-radius: var(--radius-md) !important;
    margin-top: 8px;
    font-weight: 700;
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform var(--trans-fast);
}

.auth-submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.switch-auth {
    margin-top: 20px;
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.switch-auth a {
    color: var(--primary-light);
    font-weight: 700;
}

.switch-auth a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   6. DASHBOARD VIEW & AI TOOL CARDS
   ========================================================================== */
.dashboard-container {
    max-width: 1260px;
    margin: 2.5rem auto 4rem auto;
    padding: 0 24px;
}

.dashboard-hero-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald-bright);
    box-shadow: 0 0 10px var(--emerald-glow);
    animation: livePulse 2s infinite;
}

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

.dashboard-hero-text h1 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 40%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 600px;
}

/* Search Bar */
.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.05rem;
    color: var(--text-muted);
    pointer-events: none;
}

#app-search-input {
    padding: 13px 20px 13px 48px !important;
    border-radius: var(--radius-pill) !important;
    border: 1px solid var(--border-card) !important;
    background: rgba(18, 24, 48, 0.8) !important;
    color: #ffffff !important;
    width: 320px;
    max-width: 100%;
    font-family: var(--font-body);
    font-size: 0.94rem;
    transition: all var(--trans-normal) !important;
    backdrop-filter: blur(12px);
}

#app-search-input:focus {
    width: 360px;
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 25px rgba(99, 102, 241, 0.2) !important;
}

#app-search-input::placeholder {
    color: var(--text-muted);
}

/* VIP Warning Banner */
.vip-warning {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.08)) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    margin-bottom: 24px;
    padding: 18px 24px !important;
    border-radius: var(--radius-md) !important;
}

.vip-warning-content {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fca5a5;
    font-size: 0.95rem;
}

.vip-warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.btn-vip-upgrade {
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    background: var(--gradient-gold);
    color: #000;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 14px var(--gold-glow);
    transition: transform var(--trans-fast);
}

.btn-vip-upgrade:hover {
    transform: translateY(-2px);
    color: #000;
}

/* Dynamic Menu Tabs */
.tabs-header-wrapper {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.tabs-header {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

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

.menu-tab-btn {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--trans-normal);
}

.menu-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tool Grid System */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.arch-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: 24px !important;
    border-radius: var(--radius-lg) !important;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal) !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-card) !important;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.18) !important;
}

.tool-card .icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.25);
    transition: transform var(--trans-spring);
}

.tool-card:hover .icon {
    transform: scale(1.1) rotate(4deg);
}

.card-image-icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.tool-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
}

.arch-type-hint {
    font-size: 0.78rem !important;
    font-weight: 600;
    color: var(--primary-light) !important;
    background: rgba(99, 102, 241, 0.08);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

.tool-card .cost {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* VIP Tool Lock Overlay */
.vip-tool {
    position: relative;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    z-index: 10;
    border-radius: inherit;
    border: 1px solid var(--gold-border);
}

.lock-overlay::before {
    content: '👑';
    font-size: 2rem;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.vip-locked {
    filter: grayscale(0.2);
}

/* ==========================================================================
   7. TOOL WORKSPACE VIEW (view-arch)
   ========================================================================== */
.tool-container {
    max-width: 1320px;
    margin: 2rem auto 4rem auto;
    padding: 0 24px;
}

.tool-top-bar {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--trans-normal);
}

.back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.back-arrow {
    font-size: 1.1rem;
    transition: transform var(--trans-fast);
}

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

.tool-header-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.tool-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.badge {
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 0.5px;
}

/* Workspace Grid */
.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.panel {
    min-height: 520px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-icon {
    font-size: 1.3rem;
}

.panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

/* Dynamic Inputs Styling */
.arch-dynamic-inputs-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Drag and Drop Zone */
.file-drop-area {
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    padding: 34px 20px;
    text-align: center;
    background: rgba(99, 102, 241, 0.03);
    position: relative;
    cursor: pointer;
    transition: all var(--trans-normal);
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.drop-icon {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.file-drop-area p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
}

.file-drop-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.arch-preview-img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: 14px;
    max-height: 240px;
    object-fit: contain;
    border: 1px solid var(--border-card);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: var(--shadow-sm);
}

/* Range Inputs */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px var(--primary-glow);
    transition: transform var(--trans-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Select Dropdown */
select {
    width: 100%;
    padding: 13px 16px;
    background: rgba(18, 24, 48, 0.85);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all var(--trans-normal);
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

select option {
    background: #0f162e;
    color: #ffffff;
    padding: 10px;
}

/* Prompt Translation Preview */
.translate-preview {
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
    border-left: 3px solid var(--primary) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Run Tool Button */
.run-arch-btn {
    padding: 16px 24px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.45) !important;
}

.run-arch-btn:hover {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.6) !important;
}

.btn-sparkle {
    font-size: 1.25rem;
}

/* ==========================================================================
   8. RESULTS PANEL & MEDIA PRESENTATION
   ========================================================================== */
.result-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: center;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    flex: 1;
    color: var(--text-secondary);
}

.empty-state-art {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.empty-icon {
    font-size: 2.5rem;
}

.empty-state h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.92rem;
    max-width: 360px;
    color: var(--text-muted);
}

/* Loading & Processing Spinner */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    flex: 1;
}

.spinner-container {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    border-top-color: var(--primary-light);
    border-right-color: var(--cyan-bright);
    animation: spinSmooth 1s linear infinite;
}

.spinner-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}

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

.loading-state h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.loading-hint {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Result Container */
.result-display-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInResult 0.4s ease;
}

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

.result-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    margin-bottom: 10px;
}

.result-media-stage {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-lg);
}

#result-image {
    width: 100%;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    border-radius: var(--radius-md);
    cursor: zoom-in;
    transition: transform var(--trans-normal);
}

#result-image:hover {
    transform: scale(1.01);
}

#result-video {
    width: 100%;
    border-radius: var(--radius-md);
    max-height: 540px;
    background: #000;
}

#result-audio {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
}

.time-label {
    display: inline-block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    margin-top: 8px;
}

.download-action-btn {
    padding: 14px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1)) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: var(--emerald-bright) !important;
}

.download-action-btn:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    box-shadow: 0 4px 20px var(--emerald-glow) !important;
}

/* ==========================================================================
   9. BEFORE / AFTER COMPARISON SLIDER
   ========================================================================== */
.ba-result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.ba-result-label {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(12px);
    color: var(--primary-light);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.ba-result-compare {
    position: relative;
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

.ba-result-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ba-result-img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    max-height: 520px;
    object-fit: contain;
}

.ba-result-before {
    position: relative;
    z-index: 1;
}

.ba-result-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.ba-result-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #ffffff;
    z-index: 5;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.ba-result-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient-primary);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: col-resize;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
    transition: transform 0.2s;
    border: 2px solid #ffffff;
}

.ba-result-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.ba-result-handle svg {
    width: 15px;
    height: 15px;
}

.ba-result-tag {
    position: absolute;
    bottom: 14px;
    z-index: 4;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(10px);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    letter-spacing: 2px;
    pointer-events: none;
}

.ba-result-tag-before {
    right: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.ba-result-tag-after {
    left: 14px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--primary-light);
}

/* ==========================================================================
   10. PROFILE VIEW & CREDIT STORE
   ========================================================================== */
.profile-container {
    max-width: 960px;
    margin: 2.5rem auto 4rem auto;
    padding: 0 24px;
}

.profile-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.profile-header-bar h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
}

.vip-status-crown-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: var(--gradient-gold);
    color: #000000;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 0 20px var(--gold-glow);
    animation: goldShimmer 3s infinite alternate;
}

@keyframes goldShimmer {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.section-badge-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-badge-title h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #ffffff;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.input-disabled {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

.profile-actions-bar {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.profile-save-btn {
    min-width: 200px;
    padding: 13px 28px !important;
}

/* Store & Packages */
.store-section-header {
    margin-top: 48px;
    margin-bottom: 18px;
}

.store-section-header h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.store-section-header p {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.gold-text {
    color: var(--gold-bright);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.pkg-select-btn {
    border-radius: var(--radius-md) !important;
    transition: all var(--trans-normal) !important;
}

.pkg-select-btn:hover {
    transform: translateY(-4px) !important;
    border-color: var(--primary-light) !important;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25) !important;
}

/* Custom Credits Box */
.custom-credits-box {
    background: rgba(18, 24, 48, 0.6);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    margin-bottom: 28px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.custom-credits-info h4 {
    color: #ffffff;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.custom-credits-info p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.unit-price-tag {
    color: var(--emerald-bright);
    font-weight: 700;
}

.custom-credits-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

#custom-credits-input {
    width: 90px;
    padding: 10px 30px 10px 14px;
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid var(--border-card);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

.credit-symbol {
    position: absolute;
    right: 10px;
    color: var(--gold-bright);
    font-size: 1.1rem;
    pointer-events: none;
}

.custom-buy-btn {
    border-color: var(--primary-light) !important;
    color: var(--primary-light) !important;
}

.custom-buy-btn:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
}

/* Payment Method Selection */
.payment-method-container {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    animation: fadeInResult 0.3s ease;
}

.payment-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.step-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-package-summary {
    background: rgba(99, 102, 241, 0.12);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 22px;
    color: #ffffff;
    font-size: 1.05rem;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    text-align: left;
    transition: all var(--trans-normal);
    position: relative;
}

.pix-method-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

.pix-method-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
    border-color: var(--emerald-bright);
    box-shadow: 0 4px 25px var(--emerald-glow);
    transform: translateY(-2px);
}

.card-method-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

.card-method-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border-color: var(--primary-light);
    box-shadow: 0 4px 25px var(--primary-glow);
    transform: translateY(-2px);
}

.payment-method-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.payment-method-text strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 3px;
}

.payment-method-text small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.payment-chip-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Installments Table */
.installments-container {
    background: rgba(7, 9, 19, 0.6);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-subtle);
    margin-top: 18px;
}

.installments-list-box {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 16px;
}

.confirm-card-btn {
    padding: 14px !important;
    font-size: 1.05rem !important;
}

.security-guarantee-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 10px;
}

/* PIX QR Code Stage */
.pix-checkout-container {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.pix-checkout-card {
    max-width: 440px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-lg);
}

.pix-icon-large {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.pix-checkout-header h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.pix-checkout-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.pix-qr-wrapper {
    background: #ffffff;
    padding: 14px;
    border-radius: var(--radius-md);
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

#pix-qr-img {
    width: 200px;
    height: 200px;
    display: block;
}

.pix-code-group {
    text-align: left;
}

.pix-textarea-code {
    font-family: var(--font-mono) !important;
    font-size: 0.78rem !important;
    background: rgba(7, 9, 19, 0.8) !important;
    color: var(--primary-light) !important;
    resize: none;
}

.copy-pix-action-btn {
    margin-top: 12px;
    font-weight: 700;
}

/* ==========================================================================
   11. ADMIN PANEL VIEW (view-admin)
   ========================================================================== */
.admin-layout {
    display: flex;
    gap: 24px;
    max-width: 1440px;
    margin: 2rem auto 4rem auto;
    padding: 0 24px;
    align-items: flex-start;
}

.admin-sidebar {
    width: 290px;
    flex-shrink: 0;
    padding: 24px 18px !important;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.admin-sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--gold-bright);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.admin-sidebar h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--trans-fast);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(3px);
}

.admin-nav a.active {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.admin-tab-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.tab-create-highlight {
    color: var(--emerald-bright) !important;
    border: 1px dashed rgba(16, 185, 129, 0.3) !important;
}

.tab-create-highlight:hover {
    background: rgba(16, 185, 129, 0.1) !important;
}

.tab-chat-highlight {
    color: var(--primary-light) !important;
}

.tab-env-highlight {
    color: var(--gold-bright) !important;
}

/* Admin Content Area */
.admin-content {
    flex: 1;
    min-width: 0;
}

.admin-loading-card {
    text-align: center;
    padding: 60px 20px !important;
}

.admin-form-group {
    margin-bottom: 22px;
}

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

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(18, 24, 48, 0.8);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: var(--font-body);
}

.app-config-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    padding: 22px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.app-config-card h4 {
    margin-top: 0;
    color: var(--primary-light);
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

/* Admin Users Table */
.user-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 18px;
    font-size: 0.92rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-card);
}

.user-table th {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 18px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}

.user-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.user-table tr:last-child td {
    border-bottom: none;
}

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

.badge-admin {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-bright);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.badge-vip {
    background: rgba(239, 68, 68, 0.15);
    color: var(--rose-bright);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* ==========================================================================
   12. COMFY PROGRESS & REAL-TIME QUEUE
   ========================================================================== */
#comfy-progress-container {
    background: rgba(18, 24, 48, 0.85) !important;
    border: 1px solid var(--border-card) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
}

#comfy-bar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 0 14px var(--primary-glow) !important;
}

/* ==========================================================================
   13. TERMINAL LOGS & MODALS
   ========================================================================== */
.terminal-log {
    margin-top: 30px;
    background: #040509;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.terminal-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #4ade80;
    line-height: 1.5;
}

.terminal-content .log-entry { margin-bottom: 4px; }
.terminal-content .log-system { color: var(--text-muted); }
.terminal-content .log-progress { color: var(--primary-light); }
.terminal-content .log-error { color: var(--rose-bright); }

/* Modals Overlay */
#terms-modal-overlay,
#help-modal-overlay,
#admin-modal-overlay {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* ==========================================================================
   14. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .auth-visual {
        padding: 3rem;
    }
    .auth-visual-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 900px) {
    .auth-wrapper {
        flex-direction: column;
    }
    .auth-visual {
        flex: none;
        padding: 3rem 2rem;
        min-height: 340px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .auth-visual-content {
        max-width: 100%;
    }
    .auth-feature-pills {
        justify-content: center;
    }
    .auth-perks-grid {
        display: none;
    }
    .auth-form-side {
        width: 100%;
        min-width: 100%;
        padding: 2.5rem 1.5rem;
        box-shadow: none;
        border-left: none;
        border-top: 1px solid var(--border-card);
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    #main-header {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }
    .main-navigation {
        order: 3;
        width: 100%;
        justify-content: space-around;
        margin-top: 6px;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 0.82rem;
    }
    .credit-badge {
        padding: 5px 12px;
        font-size: 0.82rem;
    }
    .dashboard-hero-text h1 {
        font-size: 2rem;
    }
    #app-search-input {
        width: 100%;
    }
    #app-search-input:focus {
        width: 100%;
    }
    .tools-grid,
    .arch-sub-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-two,
    .form-grid-three {
        grid-template-columns: 1fr;
    }
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
    .vip-warning {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.25rem;
    }
    .dashboard-container,
    .profile-container,
    .tool-container {
        padding: 0 14px;
        margin-top: 1.5rem;
    }
    .logo-badge {
        display: none;
    }
}
