/* MinBlack - Main Stylesheet */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222230;
    --bg-input: #151520;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #1a1a25, #2d2d40);
    --border: #2a2a3a;
    --border-light: #333348;
    --success: #00d2a0;
    --warning: #f0c040;
    --danger: #ff4757;
    --info: #54a0ff;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', sans-serif;
}

[data-theme="light"] {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f5;
    --bg-input: #f0f0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --accent: #6c5ce7;
    --accent-light: #5a4bd1;
    --accent-glow: rgba(108, 92, 231, 0.15);
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #f0f0f5, #e0e0ea);
    --border: #e0e0ea;
    --border-light: #d0d0da;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
ul, ol { list-style: none; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Loader */
#loader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
    width: 48px; height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px; height: 64px;
    transition: var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(10, 10, 15, 0.82); }
[data-theme="light"] .navbar { background: rgba(245, 245, 250, 0.82); }
.navbar::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--gradient-1); opacity: 0;
    transition: opacity 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar.scrolled::after { opacity: 1; }
.nav-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; gap: 12px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text-primary);
    margin-right: auto;
}
.nav-logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nav-name {
    font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap;
    background: var(--gradient-1); background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandShine 3s ease-in-out infinite;
    background-size: 200% auto;
}
@keyframes brandShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Theme Toggle */
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-card); border: 1.5px solid var(--border);
    color: var(--text-primary); cursor: pointer; display: flex;
    align-items: center; justify-content: center; font-size: 1.1rem;
    transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--warning); }
.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }
[data-theme="light"] .theme-toggle .fa-sun { display: inline; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 1001;
}
.mobile-menu-btn span {
    display: block; width: 24px; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: var(--transition);
}
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius);
    font-family: var(--font); font-size: 0.9rem; font-weight: 600;
    border: none; cursor: pointer; text-decoration: none;
    transition: var(--transition); white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-1); color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--accent-glow); }
.btn-outline {
    background: transparent; color: var(--text-primary);
    border: 1.5px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #000; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Hero Section */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: 100px 24px 80px; max-width: 1200px; margin: 0 auto;
    gap: 60px;
}
.hero-content { flex: 1; }
.hero-title {
    font-size: 3.2rem; font-weight: 800; line-height: 1.15;
    margin-bottom: 20px; letter-spacing: -1px;
}
.gradient-text { background: var(--gradient-1); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 32px; max-width: 500px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; }
.hero-penguin { max-width: 400px; width: 100%; filter: drop-shadow(0 0 40px var(--accent-glow)); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* Sections */
section { padding: 80px 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; }

/* Services Grid */
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px; max-width: 1200px; margin: 0 auto;
}
.service-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px 24px;
    text-align: center; transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.service-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent-glow); display: flex; align-items: center;
    justify-content: center; margin: 0 auto 20px; font-size: 1.5rem;
    color: var(--accent-light);
}
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

/* Stats */
.stats { background: var(--bg-secondary); }
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px; max-width: 1000px; margin: 0 auto; text-align: center;
}
.stat-item h3 { font-size: 2.2rem; font-weight: 800; color: var(--accent-light); }
.stat-item p { color: var(--text-secondary); margin-top: 4px; }

/* API Section */
.api-card {
    max-width: 600px; margin: 0 auto; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 40px; text-align: center;
}
.maintenance-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--warning); color: #000; padding: 6px 16px;
    border-radius: 20px; font-weight: 700; font-size: 0.85rem; margin-bottom: 20px;
}
.api-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.api-card p { color: var(--text-secondary); margin-bottom: 20px; }

/* Footer */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 48px 24px 24px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-brand h3 { font-size: 1.3rem; margin-bottom: 8px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links h4, .footer-contact h4 { font-size: 1rem; margin-bottom: 12px; }
.footer-links a, .footer-contact a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; transition: var(--transition); }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent-light); }
.footer-bottom { text-align: center; padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* Reveal Animations */
.reveal-left, .reveal-right, .reveal-bottom {
    opacity: 0; transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-bottom { transform: translateY(40px); }
.reveal-left.visible, .reveal-right.visible, .reveal-bottom.visible {
    opacity: 1; transform: translate(0);
}

/* ==================== AUTH PAGES ==================== */
.auth-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--bg-primary);
}
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 40px; width: 100%;
    max-width: 440px; box-shadow: var(--shadow-lg);
    position: relative;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 12px; }
.auth-logo h2 { font-size: 1.5rem; font-weight: 700; }
.auth-logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-input {
    width: 100%; padding: 12px 16px; background: var(--bg-input);
    border: 1.5px solid var(--border); border-radius: var(--radius);
    color: var(--text-primary); font-family: var(--font); font-size: 0.95rem;
    transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }
.form-input.error { border-color: var(--danger); }

/* Password Strength */
.password-strength { margin-top: 8px; }
.strength-bar {
    height: 4px; border-radius: 2px; background: var(--border);
    transition: var(--transition); margin-bottom: 4px;
}
.strength-bar.low { background: var(--danger); width: 33%; }
.strength-bar.medium { background: var(--warning); width: 66%; }
.strength-bar.high { background: var(--success); width: 100%; }
.strength-text { font-size: 0.8rem; font-weight: 600; }
.strength-text.low { color: var(--danger); }
.strength-text.medium { color: var(--warning); }
.strength-text.high { color: var(--success); }

/* Telegram Login Button */
.telegram-btn {
    width: 100%; padding: 12px; background: #0088cc;
    color: #fff; border: none; border-radius: var(--radius);
    font-family: var(--font); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: var(--transition); margin-bottom: 20px;
}
.telegram-btn:hover { background: #0077b5; transform: translateY(-1px); }
.telegram-btn i { font-size: 1.2rem; }

.divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: var(--text-muted); font-size: 0.85rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-link { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.auth-link a { color: var(--accent-light); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 0.9rem; margin-bottom: 16px; display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(255,71,87,0.15); color: var(--danger); border: 1px solid rgba(255,71,87,0.3); }
.alert-success { background: rgba(0,210,160,0.15); color: var(--success); border: 1px solid rgba(0,210,160,0.3); }

/* ==================== DASHBOARD ==================== */
.dashboard-body { padding-bottom: 80px; }

/* Top Navbar */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10,10,15,0.9); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); padding: 0 16px;
    height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.top-nav-left { display: flex; align-items: center; gap: 10px; }
.top-nav-logo { width: 32px; height: 32px; border-radius: 50%; }
.top-nav-name { font-weight: 700; font-size: 1rem; }
.top-nav-right { display: flex; align-items: center; gap: 12px; }
.balance-badge {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 6px 14px; font-size: 0.85rem;
    font-weight: 600; color: var(--success); white-space: nowrap;
}
.profile-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
    cursor: pointer; overflow: hidden; background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--text-secondary); transition: var(--transition);
}
.profile-btn:hover { border-color: var(--accent); }
.profile-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Profile Dropdown */
.profile-dropdown {
    position: fixed; top: 60px; right: 16px; z-index: 1100;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; width: 280px;
    box-shadow: var(--shadow-lg); display: none;
    animation: slideDown 0.2s ease;
}
.profile-dropdown.show { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.profile-dropdown .user-info { text-align: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.profile-dropdown .user-name { font-weight: 700; font-size: 1rem; }
.profile-dropdown .user-email, .profile-dropdown .user-phone { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.profile-dropdown .dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: var(--radius-sm); color: var(--text-secondary);
    text-decoration: none; font-size: 0.9rem; cursor: pointer;
    transition: var(--transition); border: none; background: none; width: 100%;
    font-family: var(--font);
}
.profile-dropdown .dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.profile-dropdown .dropdown-item.danger { color: var(--danger); }
.profile-dropdown .dropdown-item.danger:hover { background: rgba(255,71,87,0.1); }

/* Dashboard Content */
.dashboard-content { padding: 72px 16px 16px; max-width: 600px; margin: 0 auto; }

/* Banner Slider */
.banner-slider {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 20px; aspect-ratio: 16/9; max-height: 200px;
    background: var(--bg-card);
}
.banner-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
    display: flex; align-items: center; justify-content: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.banner-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
    cursor: pointer; transition: var(--transition);
}
.banner-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* Quick Menu */
.quick-menu {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: 24px;
}
.quick-menu-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 8px; text-align: center;
    text-decoration: none; color: var(--text-primary); transition: var(--transition);
    cursor: pointer;
}
.quick-menu-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.quick-menu-item i { font-size: 1.5rem; color: var(--accent-light); margin-bottom: 6px; display: block; }
.quick-menu-item span { font-size: 0.75rem; font-weight: 600; }

/* Search */
.search-box {
    position: relative; margin-bottom: 20px;
}
.search-box input {
    width: 100%; padding: 12px 16px 12px 44px;
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); color: var(--text-primary);
    font-family: var(--font); font-size: 0.95rem; outline: none;
    transition: var(--transition);
}
.search-box input:focus { border-color: var(--accent); }
.search-box i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1rem;
}

/* Product Cards */
.section-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.section-title a { font-size: 0.85rem; color: var(--accent-light); text-decoration: none; }

.products-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.product-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: var(--transition);
    cursor: pointer; text-decoration: none; color: var(--text-primary);
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: var(--bg-secondary);
}
.product-card-body { padding: 12px; }
.product-card-category {
    font-size: 0.7rem; color: var(--accent-light); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.product-card-name {
    font-size: 0.9rem; font-weight: 600; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-price { font-size: 0.95rem; font-weight: 700; color: var(--success); }
.product-card-warranty { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.product-card-stock {
    font-size: 0.7rem; margin-top: 2px;
}
.product-card-stock.in-stock { color: var(--success); }
.product-card-stock.out-stock { color: var(--danger); }

/* Product Detail Modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto;
    padding: 24px; transform: translateY(100%); transition: var(--transition);
}
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-card-hover); border: none; color: var(--text-primary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.modal-images {
    display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px;
    scroll-snap-type: x mandatory;
}
.modal-images img {
    width: 200px; height: 200px; border-radius: var(--radius);
    object-fit: cover; flex-shrink: 0; scroll-snap-align: start;
}
.modal-product-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.modal-product-price { font-size: 1.3rem; font-weight: 700; color: var(--success); margin-bottom: 4px; }
.modal-product-meta { display: flex; gap: 16px; margin-bottom: 16px; font-size: 0.85rem; color: var(--text-secondary); }
.modal-product-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.7; }

/* Variant Selector */
.variant-selector { margin-bottom: 16px; }
.variant-selector label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-option {
    padding: 8px 16px; border: 1.5px solid var(--border);
    border-radius: var(--radius); cursor: pointer; font-size: 0.85rem;
    transition: var(--transition); background: var(--bg-input);
}
.variant-option:hover { border-color: var(--accent); }
.variant-option.selected { border-color: var(--accent); background: var(--accent-glow); color: var(--accent-light); }

/* Quantity */
.quantity-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quantity-selector label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.quantity-selector input {
    width: 70px; padding: 8px; text-align: center;
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary);
    font-family: var(--font); font-size: 0.95rem; outline: none;
}
.quantity-selector input:focus { border-color: var(--accent); }

/* Order Summary */
.order-summary {
    background: var(--bg-secondary); border-radius: var(--radius);
    padding: 16px; margin-bottom: 20px;
}
.order-summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 8px; }
.order-summary-row.total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }

/* QRIS Payment */
.qris-container { text-align: center; padding: 20px; }
.qris-container img { width: 220px; height: 220px; border-radius: var(--radius); margin-bottom: 16px; }
.qris-timer { font-size: 1.5rem; font-weight: 700; color: var(--warning); margin-bottom: 8px; }
.qris-amount { font-size: 1.3rem; font-weight: 700; color: var(--success); margin-bottom: 4px; }
.qris-ref { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }

/* Bottom Navbar */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10,10,15,0.9); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border); padding: 8px 16px;
    display: flex; align-items: center; justify-content: space-around;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; color: var(--text-muted); font-size: 0.7rem;
    font-weight: 500; transition: var(--transition); padding: 4px 12px;
    border-radius: var(--radius); cursor: pointer; border: none; background: none;
    font-family: var(--font);
}
.bottom-nav-item i { font-size: 1.3rem; transition: var(--transition); }
.bottom-nav-item.active { color: var(--accent-light); }
.bottom-nav-item.active i { color: var(--accent); }
.bottom-nav-item.center {
    position: relative; top: -20px;
}
.bottom-nav-item.center .center-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gradient-1); display: flex; align-items: center;
    justify-content: center; font-size: 1.4rem; color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ==================== DEPOSIT PAGE ==================== */
.deposit-amounts {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 20px;
}
.deposit-amount {
    padding: 14px; background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius); text-align: center; cursor: pointer;
    font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}
.deposit-amount:hover { border-color: var(--accent); }
.deposit-amount.selected { border-color: var(--accent); background: var(--accent-glow); color: var(--accent-light); }
.deposit-custom { margin-bottom: 20px; }

/* ==================== ACTIVITY / HISTORY ==================== */
.tx-list { display: flex; flex-direction: column; gap: 10px; }
.tx-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px; display: flex;
    align-items: center; gap: 12px; transition: var(--transition);
}
.tx-icon {
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 1rem;
    flex-shrink: 0;
}
.tx-icon.deposit { background: rgba(0,210,160,0.15); color: var(--success); }
.tx-icon.purchase { background: rgba(108,92,231,0.15); color: var(--accent-light); }
.tx-icon.refund { background: rgba(240,192,64,0.15); color: var(--warning); }
.tx-info { flex: 1; min-width: 0; }
.tx-info .tx-title { font-weight: 600; font-size: 0.9rem; }
.tx-info .tx-date { font-size: 0.75rem; color: var(--text-muted); }
.tx-amount { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }
.tx-status {
    font-size: 0.7rem; padding: 3px 10px; border-radius: 10px;
    font-weight: 600; text-transform: uppercase;
}
.tx-status.success { background: rgba(0,210,160,0.15); color: var(--success); }
.tx-status.pending { background: rgba(240,192,64,0.15); color: var(--warning); }
.tx-status.failed { background: rgba(255,71,87,0.15); color: var(--danger); }

/* ==================== ADMIN DASHBOARD ==================== */
.admin-body { padding-bottom: 20px; }
.admin-sidebar {
    position: fixed; left: 0; top: 56px; bottom: 0; width: 220px;
    background: var(--bg-secondary); border-right: 1px solid var(--border);
    padding: 16px; overflow-y: auto; z-index: 900;
}
.admin-main { margin-left: 220px; padding: 72px 24px 24px; }
.admin-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-radius: var(--radius); color: var(--text-secondary);
    text-decoration: none; font-size: 0.9rem; cursor: pointer;
    transition: var(--transition); margin-bottom: 4px; border: none;
    background: none; width: 100%; font-family: var(--font);
}
.admin-menu-item:hover, .admin-menu-item.active {
    background: var(--bg-card); color: var(--text-primary);
}
.admin-menu-item i { width: 20px; text-align: center; }

/* Stats Cards */
.stats-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; margin-top: 4px; }
.stat-card .stat-icon { font-size: 1.5rem; float: right; opacity: 0.3; }

/* Chart */
.chart-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px;
}
.chart-container h3 { font-size: 1rem; margin-bottom: 16px; }
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; }
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar {
    width: 100%; max-width: 40px; background: var(--gradient-1);
    border-radius: 6px 6px 0 0; min-height: 4px; transition: var(--transition);
    position: relative;
}
.chart-bar:hover { filter: brightness(1.2); }
.chart-bar-value {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.chart-bar-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 8px; }

/* Admin Table */
.admin-table-wrap { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
    text-align: left; padding: 12px 16px; background: var(--bg-secondary);
    color: var(--text-secondary); font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--bg-card-hover); }
.admin-table .badge {
    padding: 3px 10px; border-radius: 10px; font-size: 0.7rem; font-weight: 600;
}
.badge-active { background: rgba(0,210,160,0.15); color: var(--success); }
.badge-inactive { background: rgba(255,71,87,0.15); color: var(--danger); }
.badge-pending { background: rgba(240,192,64,0.15); color: var(--warning); }
.badge-completed { background: rgba(0,210,160,0.15); color: var(--success); }

/* Admin Form */
.admin-form {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px; max-width: 700px;
}
.admin-form h3 { font-size: 1.1rem; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.full { grid-template-columns: 1fr; }

/* Image upload preview */
.image-upload-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.image-upload-slot {
    width: 80px; height: 80px; border: 2px dashed var(--border);
    border-radius: var(--radius); display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: var(--transition);
    font-size: 1.5rem; color: var(--text-muted); position: relative;
    overflow: hidden;
}
.image-upload-slot:hover { border-color: var(--accent); }
.image-upload-slot img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-slot .remove-img {
    position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--danger); color: #fff;
    border: none; cursor: pointer; font-size: 0.7rem; display: flex;
    align-items: center; justify-content: center;
}

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-secondary); border-radius: var(--radius); padding: 4px; }
.tab-btn {
    flex: 1; padding: 8px 16px; border-radius: var(--radius-sm); border: none;
    background: transparent; color: var(--text-secondary); cursor: pointer;
    font-family: var(--font); font-size: 0.85rem; font-weight: 600; transition: var(--transition);
}
.tab-btn.active { background: var(--bg-card); color: var(--text-primary); }

/* Toast */
.toast-container {
    position: fixed; top: 70px; right: 16px; z-index: 3000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: var(--radius); font-size: 0.9rem;
    font-weight: 500; animation: slideIn 0.3s ease; box-shadow: var(--shadow);
    max-width: 350px;
}
.toast.success { background: var(--success); color: #000; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--info); color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Empty State */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 0.9rem; }

/* Maintenance */
.maintenance-page {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 60vh; text-align: center; padding: 24px;
}
.maintenance-page i { font-size: 4rem; color: var(--warning); margin-bottom: 16px; }
.maintenance-page h2 { font-size: 1.5rem; margin-bottom: 8px; }
.maintenance-page p { color: var(--text-secondary); }

/* Responsive */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 80px; }
    .hero-title { font-size: 2.2rem; }
    .hero-desc { margin: 0 auto 32px; }
    .hero-buttons { justify-content: center; }
    .hero-penguin { max-width: 250px; }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .quick-menu { grid-template-columns: repeat(4, 1fr); }

    /* Mobile Navbar */
    .navbar { padding: 0 16px; height: 60px; }
    .nav-logo-img { width: 30px; height: 30px; }
    .nav-name { font-size: 1rem; }
    .theme-toggle { width: 36px; height: 36px; font-size: 1rem; flex-shrink: 0; }
    .mobile-menu-btn { display: flex; }
    .nav-actions {
        position: fixed; top: 0; right: -100%; width: 75%; max-width: 280px;
        height: 100vh; height: 100dvh; background: var(--bg-secondary);
        flex-direction: column; padding: 72px 20px 20px; gap: 12px;
        transition: right 0.3s ease; border-left: 1px solid var(--border);
        z-index: 999; box-shadow: -4px 0 30px rgba(0,0,0,0.4);
        overflow-y: auto;
    }
    .nav-actions.open { right: 0; }
    .nav-actions .btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 0.9rem; border-radius: var(--radius); }
    .nav-actions .btn-outline { order: 1; }
    .nav-actions .btn-primary { order: 2; }
    .menu-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 998;
        opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
    }
    .menu-overlay.show { opacity: 1; visibility: visible; }
}

@media (max-width: 480px) {
    .navbar { padding: 0 12px; height: 54px; }
    .nav-logo-img { width: 26px; height: 26px; }
    .nav-name { font-size: 0.9rem; }
    .theme-toggle { width: 32px; height: 32px; font-size: 0.9rem; }
    .nav-actions { width: 80%; max-width: 260px; padding: 64px 16px 16px; }
    .auth-card { padding: 24px; }
    .products-grid { gap: 8px; }
    .deposit-amounts { grid-template-columns: repeat(2, 1fr); }
}
