/* style.css - Clean Light Enterprise Theme (Inspired by api.botcahx.eu.org) */

:root {
    /* Typography */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Color Palette - Light Mode Enterprise */
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --bg-sidebar: #1e293b; /* Dark slate sidebar as shown in screenshot */
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;

    /* Text Colors */
    --text-primary: #0f172a;    /* Deep slate black */
    --text-secondary: #64748b;  /* Slate gray */
    --text-muted: #94a3b8;      /* Light gray */

    /* Cyber/Indigo Accent Colors */
    --accent-primary: #6366f1;  /* Indigo */
    --accent-secondary: #3b82f6;/* Blue */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --accent-gradient-hover: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    
    /* Icon Badges */
    --bg-icon-badge: rgba(99, 102, 241, 0.08);
    --color-icon-badge: #4f46e5;

    /* Status Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.08);
    --pending: #F59E0B;
    --pending-bg: rgba(245, 158, 11, 0.08);

    /* Border Radius & Shadow Tokens */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    
    --sidebar-width: 260px;
    --mobile-header-height: 60px;
}

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

html {
    scroll-behavior: smooth;
}

button {
    background: none;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: -0.1px;
    line-height: 1.5;
}

/* ===== APP LAYOUT & NAVIGATION ===== */
.app-layout {
    width: 100%;
    min-height: 100vh;
}

.app-layout.sidebar-active {
    display: flex;
    flex-direction: row;
}

/* Sidebar Drawer - Dark Slate Style as in screenshot */
.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.03);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    margin-bottom: 24px;
    padding-left: 6px;
}

.logo-icon {
    font-size: 1.45rem;
    color: var(--accent-primary);
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    position: relative;
}

.sidebar-user-card .badge-normal {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-user-card .badge-outline {
    background: rgba(255, 255, 255, 0.02);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
}


.user-avatar-container {
    font-size: 2rem; 
    color: #cbd5e1; 
    margin-bottom: 6px;
}

.user-name-label {
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-category {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin: 16px 0 6px 6px;
}

.sidebar-link {
    background: transparent;
    border: 1px solid transparent;
    text-align: left;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    color: #64748b;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-link:hover i {
    color: white;
}

.sidebar-link.active {
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 700;
}

.sidebar-link.active i {
    color: #1e293b !important;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Close button for sidebar - only visible/used on mobile drawer */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    color: #94a3b8;
    font-size: 1.25rem;
    padding: 6px;
    z-index: 10;
}

.sidebar-close-btn:hover {
    color: white;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    flex-grow: 1;
    padding: 40px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ===== GLOBAL TOP BAR (Clean White) ===== */
.mobile-top-bar {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    height: var(--mobile-header-height);
    position: sticky;
    top: 0;
    z-index: 90;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

@media (min-width: 769px) {
    #btn-sidebar-toggle {
        display: none;
    }
}

.topbar-btn {
    color: var(--text-secondary);
    font-size: 1.15rem;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.topbar-btn:active {
    background: #f1f5f9;
}

.topbar-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-avatar {
    font-size: 1.8rem;
    color: #cbd5e1;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ===== CARDS & SURFACES ===== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.glass-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ===== DYNAMIC headers ===== */
.dashboard-header {
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #1e293b;
    letter-spacing: -0.5px;
}

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

/* ===== DYNAMIC STATS CARDS (Styled exactly as api.botcahx.eu.org) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px;
    background: #ffffff;
    text-align: left;
}

.stat-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
    margin: 3px 0;
}

.stat-card-value.text-success {
    color: var(--success);
}

.stat-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.stat-card-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-icon-badge);
    color: var(--color-icon-badge);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== DYNAMIC INTERACTIVE BUTTONS ===== */
.btn {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
    background: var(--accent-gradient-hover);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-block {
    width: 100%;
    padding: 12px;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.75rem;
}

/* ===== ENTERPRISE INPUT FIELDS ===== */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.2s ease;
    font-size: 0.95rem;
    z-index: 2;
}

input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input:focus + .input-icon {
    color: var(--accent-primary);
}

/* ===== SCREEN SECTIONS ===== */
#screen-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 30px 0;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 36px 28px;
    background: #ffffff;
    border-radius: var(--radius-md);
}

.auth-toggle-text {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.link-accent {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
}

.link-accent:hover {
    text-decoration: underline;
}

/* ===== GENERATOR SYSTEM ===== */
.generator-box {
    padding: 28px;
    background: #ffffff;
}

.panel-header-desc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    text-transform: uppercase;
}

.card-title i {
    color: var(--accent-primary);
}

.activation-flow {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flow-box {
    padding: 20px;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.flow-box h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-box h3 i {
    color: var(--accent-primary);
}

.step-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* ===== CLEAN TABLES ===== */
.table-card {
    padding: 24px;
    background: #ffffff;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

th {
    padding: 12px 16px;
    color: #475569;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: background 0.15s ease;
}

tr:hover td {
    background: #f8fafc;
    color: var(--text-primary);
}

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

/* ===== BADGES & STATUSES ===== */
.badge {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.badge-normal {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.badge-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.badge-admin {
    background: #e0e7ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.badge-premium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.status-success {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.status-failed {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

/* ===== PURCHASE PACKAGES ===== */
.purchase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.plan-card {
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    background: #ffffff;
}

.plan-card-monthly {
    border-top: 4px solid var(--accent-primary);
}

.plan-card-lifetime {
    border-top: 4px solid #3b82f6;
}

.best-value-badge {
    position: absolute;
    top: -10px;
    right: 16px;
}

.plan-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 10px 0 14px 0;
    letter-spacing: -0.5px;
}

.plan-duration {
    font-family: var(--font-primary);
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 4px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    color: var(--text-secondary);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-features li {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: var(--success);
    font-size: 0.85rem;
}

/* QRIS Payment Card Inline */
.qris-payment-card {
    padding: 24px;
    text-align: center;
    border: 1px solid #cbd5e1;
    max-width: 480px;
    margin: 24px auto 0 auto;
    background: #ffffff;
}

.qris-payment-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.qris-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

#qris-image-container {
    margin: 12px auto 16px auto;
    background: white;
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
    width: 210px;
    height: 210px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

#qris-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qris-total {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: #1f2937;
    margin-bottom: 4px;
}

.qris-status {
    color: var(--pending);
    font-weight: 700;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

/* ===== PROFILE SECTION ===== */
.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.profile-info-row:hover {
    border-color: #cbd5e1;
}

.profile-info-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
}

.profile-info-label i {
    color: var(--accent-primary);
    width: 16px;
    text-align: center;
}

.profile-info-value {
    font-size: 0.88rem;
    color: #1e293b;
    font-weight: 600;
}

/* ===== ADMIN CONTROL PANEL ===== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #ffffff;
}

.admin-stats-grid .stat-card .stat-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 20px;
}

.admin-grid > * {
    min-width: 0;
}

.admin-actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-actions-cell .btn {
    padding: 5px 10px;
    font-size: 0.72rem;
    border-radius: var(--radius-sm);
}

/* ===== MODERN CLEAN TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-top: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: 0.78rem;
    font-family: var(--font-heading);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.35s ease;
}

.tab-content.active {
    display: block;
}

/* ===== CODE WRAPPERS ===== */
pre {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    max-height: 240px;
}

code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #334155;
}

/* ===== FOOTER ===== */
.main-footer {
    text-align: center;
    padding: 30px 0 15px;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    font-family: var(--font-mono);
}

/* ===== ANIMATIONS ===== */
@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.animate-fade-in {
    animation: premiumFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Premium Card Hover Lift Effect */
.stat-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}
.stat-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 12px 25px -10px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* Styling copy code button in API guide */
.btn-copy-code {
    background: #0f172a !important;
    color: #cbd5e1 !important;
    border: 1px solid #1e293b !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-copy-code:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    transform: translateY(-1px);
}

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

.hidden {
    display: none !important;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== SWEETALERT2 CLEAN WHITE Customization ===== */
.swal2-popup {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-lg) !important;
}

.swal2-title {
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    color: #1e293b !important;
}

.swal2-html-container {
    font-family: var(--font-primary) !important;
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: var(--accent-gradient) !important;
    color: white !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-primary) !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.2s ease !important;
}

.swal2-confirm:hover {
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.35) !important;
}

.swal2-cancel {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid #e2e8f0 !important;
    font-family: var(--font-primary) !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel:hover {
    background: #e2e8f0 !important;
}

.accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =====================================================
   PC DESKTOP SPECIFIC MEDIA (>= 993px)
   ===================================================== */
@media (min-width: 993px) {
    .main-content {
        padding: 40px 50px;
    }
    
    .admin-grid {
        grid-template-columns: 1.3fr 1fr;
    }
    
    .purchase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   TABLET RESPONSIVENESS (769px - 992px)
   ===================================================== */
@media (max-width: 992px) {
    .main-content {
        padding: 24px;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   MOBILE SYSTEM (<= 768px) - Sliding Left Drawer
   ===================================================== */
@media (max-width: 768px) {
    /* Show mobile header */
    .mobile-top-bar {
        display: flex;
    }
    
    .app-layout.sidebar-active {
        flex-direction: column;
    }
    
    /* Sliding sidebar drawer from left */
    .app-sidebar {
        position: fixed;
        left: -300px;
        top: 0; bottom: 0;
        height: 100vh;
        width: 280px;
        min-width: 0;
        z-index: 101;
        background: var(--bg-sidebar);
        box-shadow: 15px 0 35px rgba(0, 0, 0, 0.15);
    }
    
    .app-sidebar.active {
        left: 0;
    }

    .sidebar-close-btn {
        display: block; /* Show Close Button on Mobile Drawer */
    }
    
    /* Content fills screen, no bottom space needed */
    .main-content {
        padding: 16px 12px;
        min-height: calc(100vh - var(--mobile-header-height));
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Muted padding structures on mobile */
    .auth-box {
        padding: 24px 18px !important;
    }
    
    #screen-auth {
        padding: 10px 0;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .purchase-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Single column stats as preferred in screenshot */
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px 20px;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .generator-box {
        padding: 16px 12px;
    }

    .flow-box {
        padding: 16px;
    }
    
    .table-card {
        padding: 16px 12px;
    }
    
    table {
        min-width: 550px;
    }
    
    th, td {
        padding: 10px 12px !important;
        font-size: 0.76rem !important;
    }
    
    input {
        font-size: 0.9rem !important;
        padding: 11px 12px 11px 40px !important;
    }
    
    .btn {
        padding: 10px 16px !important;
        font-size: 0.8rem !important;
    }
    
    .btn-block {
        padding: 11px !important;
    }
    
    .plan-card {
        padding: 20px 16px;
    }
    
    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .table-responsive table {
        min-width: 650px;
    }
}

/* =====================================================
   SMALL MOBILE PHONES (<= 480px)
   ===================================================== */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 10px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .swal2-popup {
        width: 92% !important;
        padding: 20px 12px !important;
    }
    
    .auth-box {
        padding: 20px 14px !important;
    }
}

/* ===== SECURITY OVERLAY FOR DEVTOOLS PROTECTION ===== */
#security-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.overlay-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.overlay-visible {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.security-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.security-icon {
    font-size: 3rem;
    color: var(--error);
    margin-bottom: 20px;
}

.security-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.security-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== GLOBAL CHAT SYSTEM ===== */
.chat-message-bubble {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 75%;
    width: fit-content;
    box-shadow: var(--shadow-sm);
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg-other {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.chat-msg-self {
    align-self: flex-end;
    background: var(--accent-gradient);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.chat-message-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 0.72rem;
}

.chat-msg-self .chat-message-user {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.chat-msg-other .chat-message-user {
    font-weight: 700;
    color: #475569;
}

.chat-msg-self .chat-message-time {
    color: rgba(255, 255, 255, 0.75);
}

.chat-msg-other .chat-message-time {
    color: var(--text-muted);
}

.chat-message-text {
    font-size: 0.85rem;
}

.chat-role-badge {
    scale: 0.85;
    margin-left: 2px;
    vertical-align: middle;
}

/* ===== CODE & HIGHLIGHTING FOR DOCUMENTATION ===== */
pre {
    background: #1e293b !important; /* Premium Dark theme for code */
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 10px 0;
    overflow-x: auto;
}

code {
    font-family: var(--font-mono) !important;
    font-size: 0.78rem !important;
    color: #e2e8f0 !important;
}

/* ===== DOKUMENTASI API STYLE (MUSTIKAPAY STYLE) ===== */
.docs-container {
    display: grid;
    grid-template-columns: 240px 1fr 400px;
    height: calc(100vh - 70px);
    overflow: hidden;
    background: #ffffff;
}

.docs-sidebar {
    background: #f8fafc;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.docs-back-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.docs-back-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

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

.docs-nav-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.docs-nav-link {
    background: none;
    border: none;
    text-align: left;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.docs-nav-link:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.docs-nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.method-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.method-badge.post {
    background: #dcfce7;
    color: #15803d;
}

.method-badge.get {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Middle Column Content */
.docs-content {
    padding: 40px 30px;
    overflow-y: auto;
}

.doc-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.doc-section.active {
    display: block;
}

.docs-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.docs-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

.docs-info-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
}

.info-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.info-url {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.docs-steps-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.endpoint-badge-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    width: fit-content;
}

.endpoint-path {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.docs-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.88rem;
}

.docs-params-table th,
.docs-params-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.docs-params-table th {
    background: #f8fafc;
    color: var(--text-primary);
    font-weight: 700;
}

.docs-params-table td {
    color: var(--text-secondary);
}

/* Right Column Code Panel */
.docs-code-panel {
    background: #0f172a;
    border-left: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    padding: 4px 8px;
    gap: 4px;
}

.code-tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 8px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.code-tab-btn:hover {
    color: #f8fafc;
    background: #1e293b;
}

.code-tab-btn.active {
    color: #3b82f6;
    background: #1e293b;
}

.code-content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.code-block-item {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.code-block-item.active {
    display: flex;
}

.code-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.8px;
}

.code-block-item pre {
    margin: 0;
    background: #020617 !important;
    border-color: #1e293b;
}

/* ===== DYNAMIC DARK MODE VARIABLES ===== */
body.dark-theme {
    --bg-primary: #0f172a;       /* Slate-900 */
    --bg-secondary: #1e293b;     /* Slate-800 */
    --bg-card: #1e293b;          /* Slate-800 */
    --border-color: #334155;     /* Slate-700 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --bg-sidebar: #0f172a;       /* Even darker sidebar for dark mode contrast */
}

/* Specific elements for dark mode */
body.dark-theme .mobile-top-bar {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .topbar-btn {
    color: #cbd5e1 !important;
}

body.dark-theme .topbar-btn:hover {
    background: #334155 !important;
}

body.dark-theme input {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-theme input::placeholder {
    color: #475569 !important;
}

body.dark-theme .sidebar-link {
    color: #cbd5e1;
}

body.dark-theme .sidebar-link:hover,
body.dark-theme .sidebar-link.active {
    background: #334155;
    color: #ffffff;
}

body.dark-theme .docs-container {
    background: #0f172a;
}

body.dark-theme .docs-sidebar {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .docs-content {
    background: #0f172a;
}

body.dark-theme .docs-title {
    color: #f8fafc;
}

body.dark-theme .docs-desc {
    color: #94a3b8;
}

body.dark-theme .docs-nav-link:hover {
    background: #334155;
    color: #f8fafc;
}

body.dark-theme .docs-nav-link.active {
    background: #1e3a8a;
    color: #60a5fa;
}

body.dark-theme .docs-params-table th {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

body.dark-theme .docs-params-table td {
    border-color: #334155;
}

body.dark-theme .docs-back-btn {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

body.dark-theme .docs-back-btn:hover {
    background: #334155;
}

body.dark-theme .docs-info-block {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .info-url {
    color: #60a5fa;
}

body.dark-theme .endpoint-badge-container {
    background: #1e293b;
}

body.dark-theme .endpoint-path {
    color: #f8fafc;
}

body.dark-theme .stat-card {
    background: #1e293b !important;
}

body.dark-theme .stat-card-value {
    color: #ffffff !important;
}

body.dark-theme .stat-card-label {
    color: #cbd5e1 !important;
}

body.dark-theme .chat-container {
    background: #1e293b !important;
}

body.dark-theme .chat-header {
    border-color: #334155 !important;
    color: #ffffff !important;
}

body.dark-theme .chat-header span {
    color: #ffffff !important;
}

body.dark-theme .chat-msg-other {
    background: #334155 !important;
    color: #f8fafc !important;
}

body.dark-theme .chat-msg-other .chat-message-user {
    color: #cbd5e1 !important;
}

body.dark-theme #form-chat-send {
    border-color: #334155 !important;
}

/* Responsive Docs */
@media (max-width: 1024px) {
    .docs-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    
    .docs-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .docs-code-panel {
        border-left: none;
        border-top: 1px solid #1e293b;
        height: 450px;
    }
}
