/* =========================================================
   VIDEPANEL AI GATEWAY - MASTER STYLESHEET
   ========================================================= */

:root {
    --bg-color: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --primary-glow: #3b82f6;
    --secondary-glow: #8b5cf6;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* KUNCI GLOBAL ANTI OFFSIDE UNTUK SEMUA HALAMAN */
html, body { 
    width: 100%; 
    max-width: 100vw; 
    overflow-x: hidden !important; 
    scroll-behavior: smooth; 
}

body {
    background-color: var(--bg-color);
    font-family: 'Outfit', sans-serif; color: var(--text-main);
    display: flex; justify-content: center; align-items: flex-start;
    position: relative; padding: 40px 20px;
    min-height: 100vh;
}

.ambient-glow { position: fixed; width: 600px; height: 600px; background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(3, 7, 18, 0) 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; animation: pulse-ambient 8s infinite alternate; pointer-events: none; }
.ambient-glow-2 { position: fixed; width: 500px; height: 500px; background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(3, 7, 18, 0) 70%); top: 30%; left: 60%; transform: translate(-50%, -50%); z-index: 1; animation: pulse-ambient 10s infinite alternate-reverse; pointer-events: none; }

@keyframes pulse-ambient { 0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.title { font-size: 3rem; font-weight: 900; letter-spacing: -1px; margin-bottom: 5px; background: linear-gradient(to right, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); margin-bottom: 25px; letter-spacing: 1px; }
.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; color: #fff; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }
.description-box { background: rgba(0, 0, 0, 0.3); border-radius: 16px; padding: 25px; margin-bottom: 30px; border: 1px solid rgba(255, 255, 255, 0.05); text-align: left; line-height: 1.6; color: var(--text-main); font-size: 1.05rem; }
.description-box strong { color: #60a5fa; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin: 60px 0; width: 100%; }
.anchor { scroll-margin-top: 100px; }

/* === BUTTONS === */
.btn { display: inline-block; padding: 14px 32px; font-size: 1rem; font-weight: 700; color: #fff; text-decoration: none; border-radius: 12px; transition: all 0.3s ease; border: none; cursor: pointer; text-align: center; }
.btn-primary { background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px -10px rgba(99, 102, 241, 0.8); filter: brightness(1.1); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; padding: 14px 32px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: all 0.3s; display: inline-block; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; transform: translateY(-2px); }
.btn-accent-green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border: none; padding: 14px 32px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: 0.3s; display: inline-block; box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.5); }
.btn-accent-green:hover { filter: brightness(1.2); transform: translateY(-2px); }
.btn-outline-green { border: 1px solid #10b981; color: #10b981; padding: 8px 16px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: 0.3s; display: inline-block; }
.btn-outline-green:hover { background: rgba(16, 185, 129, 0.1); color: #34d399; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; border-radius: 8px; text-decoration: none; font-weight: bold; }
.btn-outline { border: 1px solid #3b82f6; color: #3b82f6; padding: 8px 16px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.btn-outline:hover { background: rgba(59, 130, 246, 0.1); }
.btn-login { background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); color: white; padding: 8px 20px; border-radius: 8px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; transition: filter 0.3s; display: inline-block;}
.btn-login:hover { filter: brightness(1.2); }
.btn-primary-sm { background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); color: white; border: none; transition: 0.3s; display: inline-block; padding: 8px 16px; border-radius: 8px; font-weight: bold; text-decoration: none;}
.btn-primary-sm:hover { filter: brightness(1.2); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); cursor: pointer; transition: 0.3s; font-family: inherit;}
.btn-danger:hover { background: rgba(239, 68, 68, 0.3); }
.btn-group { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

/* === NAVBAR === */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255, 255, 255, 0.08); z-index: 20; position: relative;}
.branding h1 { font-size: 1.5rem; font-weight: 900; letter-spacing: -1px; margin: 0; background: linear-gradient(to right, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 15px; align-items: center; }
.nav-item { color: #e5e7eb; text-decoration: none; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: color 0.3s; }
.nav-item:hover { color: #60a5fa; }

/* === CONTAINERS === */
.container { position: relative; z-index: 10; background: var(--card-bg); padding: 50px 40px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); text-align: center; max-width: 500px; width: 100%; margin: auto; box-sizing: border-box; }
.landing-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; gap: 40px; padding-bottom: 50px; z-index: 10; position: relative;}
.app-container { position: relative; z-index: 10; background: var(--card-bg); width: 100%; max-width: 900px; height: 80vh; min-height: 550px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; flex-direction: column; overflow: hidden; margin-top: 20px;}
.info-section { width: 100%; z-index: 10; text-align: center; }

/* === FORMS & ALERTS === */
.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.form-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 14px 20px; border-radius: 12px; font-family: inherit; font-size: 1rem; outline: none; transition: all 0.3s; box-sizing: border-box;}
.form-input:focus { border-color: #3b82f6; box-shadow: 0 0 15px rgba(59,130,246,0.2); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.95rem; text-align: left;}
.alert-success { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.2); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.95rem; text-align: left;}
.auth-links { margin-top: 25px; font-size: 0.95rem; color: var(--text-muted); }
.auth-links a { color: #60a5fa; text-decoration: none; font-weight: 500; transition: color 0.3s; }

/* === CHAT UI === */
.chat-layout { display: flex; flex-direction: column; flex-grow: 1; padding: 20px 30px; gap: 15px; overflow: hidden; }
.toolbar { display: flex; justify-content: space-between; align-items: center; }
.status-badge-small { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #10b981; background: rgba(16, 185, 129, 0.1); padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(16, 185, 129, 0.2); }
.dot { width: 6px; height: 6px; background: #10b981; border-radius: 50%; box-shadow: 0 0 8px #10b981; animation: blink 1.5s infinite; }
.toolbar-controls { display: flex; gap: 10px; align-items: center; }
.btn-reset { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); padding: 8px 15px; border-radius: 12px; cursor: pointer; font-family: inherit; font-weight: bold; font-size: 0.9rem; transition: background 0.3s;}
.btn-reset:hover { background: rgba(239, 68, 68, 0.3); }

/* CUSTOM SELECT */
.custom-select-wrapper { position: relative; user-select: none; width: 250px; }
.custom-select-trigger { background: rgba(0,0,0,0.4); border: 1px solid rgba(255, 255, 255, 0.08); color: white; padding: 0 15px; height: 40px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.3s; font-size: 0.9rem; font-weight: 500; }
.custom-select-trigger:hover, .custom-select-wrapper.open .custom-select-trigger { border-color: #3b82f6; box-shadow: 0 0 15px rgba(59,130,246,0.3); background: rgba(0,0,0,0.6); }
.custom-select-wrapper.open .arrow { transform: rotate(180deg); color: #3b82f6; }
.custom-options { position: absolute; display: block; top: 100%; left: 0; right: 0; background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(10px); border: 1px solid #3b82f6; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); margin-top: 8px; z-index: 99; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s; max-height: 250px; overflow-y: auto; }
.custom-select-wrapper.open .custom-options { opacity: 1; visibility: visible; transform: translateY(0); }
.optgroup-label { padding: 10px 15px; font-size: 0.75rem; color: #8b5cf6; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.05); }
.custom-option { padding: 10px 15px 10px 25px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent; }
.custom-option:hover, .custom-option.selected { background: rgba(59, 130, 246, 0.15); border-left-color: #3b82f6; color: #fff; }

.chat-box { flex-grow: 1; background: rgba(0,0,0,0.2); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.message { max-width: 85%; padding: 12px 18px; border-radius: 16px; font-size: 0.95rem; line-height: 1.5; word-break: break-word;}
.message.bot { align-self: flex-start; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.message.user { align-self: flex-end; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); border-bottom-right-radius: 4px; color: white; }

/* === UI CARDS (Landing Page) === */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 25px; }
.feature-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); padding: 25px; border-radius: 16px; text-align: left; transition: transform 0.3s ease, background 0.3s ease; }
.feature-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.05); border-color: rgba(96, 165, 250, 0.3); }
.use-case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.use-case-card { background: linear-gradient(145deg, rgba(17,24,39,0.7) 0%, rgba(0,0,0,0.4) 100%); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 16px; padding: 25px; text-align: left; transition: transform 0.3s; }
.use-case-card:hover { transform: translateY(-5px); border-color: #10b981; }
.step-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 30px; }
.step-box { background: rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.08); padding: 25px; border-radius: 16px; width: calc(33.333% - 20px); min-width: 250px; text-align: left; position: relative; transition: 0.3s; }
.step-box:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }

/* === DASHBOARD USER === */
.dashboard-container { max-width: 900px; width: 100%; text-align: left; position: relative; z-index: 10; margin: auto;}
.header-dash { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 30px; }
.welcome-text h2 { margin: 0; font-size: 1.8rem; background: linear-gradient(to right, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.welcome-text p { color: var(--text-muted); font-size: 0.95rem; margin-top: 5px; }
.api-card { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 25px; margin-bottom: 20px; }
.api-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.key-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.05); padding: 15px 20px; border-radius: 12px; margin-bottom: 10px; border: 1px solid rgba(255,255,255,0.05); }
.key-info { max-width: 70%; }
.key-info code { color: #6ee7b7; font-size: 1.1rem; letter-spacing: 1px; font-family: monospace; display: block; word-break: break-all; white-space: pre-wrap; }
.key-actions { display: flex; gap: 10px; }
.btn-copy { background: rgba(59, 130, 246, 0.1); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.2); cursor: pointer; padding: 8px 15px; border-radius: 8px; transition: 0.3s; font-family: inherit; }
.btn-copy:hover { background: rgba(59, 130, 246, 0.3); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* === DOCS & TABLES === */
.docs-container { max-width: 1100px; width: 100%; text-align: left; padding-bottom: 50px; margin: 0 auto; position: relative; z-index: 10;}
.docs-hero { text-align: center; margin-bottom: 30px; padding: 50px 20px; background: radial-gradient(circle at center, rgba(59,130,246,0.1) 0%, transparent 70%); border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.docs-section { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 30px; margin-bottom: 25px; }

/* KUNCI TABEL AGAR TIDAK OFFSIDE */
.table-responsive { width: 100%; max-width: 100vw; overflow-x: auto; display: block; -webkit-overflow-scrolling: touch; margin-bottom: 20px; box-sizing: border-box;}
.docs-container table, .table-admin { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.95rem; }
.docs-container th, .docs-container td, .table-admin th, .table-admin td { padding: 12px 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.docs-container th, .table-admin th { background: rgba(255,255,255,0.02); color: #fff; font-weight: 600; text-transform: uppercase; font-size: 0.85rem;}
.docs-container td, .table-admin td { color: var(--text-muted); }
.docs-container td code { background: rgba(59, 130, 246, 0.1); color: #93c5fd; padding: 3px 6px; border-radius: 4px; font-family: monospace; font-size: 0.85rem; word-break: break-all;}
.table-admin tr:hover { background: rgba(255,255,255,0.02); }

.code-block { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; padding: 20px; overflow-x: auto; margin-bottom: 20px; position: relative; }
.code-block pre { margin: 0; font-family: 'Courier New', Courier, monospace; font-size: 0.9rem; color: #e2e8f0; line-height: 1.5; }
.endpoint-badge { display: inline-block; background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.2); padding: 5px 10px; border-radius: 6px; font-family: monospace; font-size: 0.9rem; font-weight: bold; margin-bottom: 15px; word-break: break-all;}
.method-badge { background: #3b82f6; color: white; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; margin-right: 10px; }

/* DAFTAR MODEL DI DOCS */
.model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }
.model-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; }
.model-card strong { display: block; color: #fff; margin-bottom: 5px; word-break: break-all; } /* Display block memisahkan baris */
.model-card span { display: block; color: var(--text-muted); font-size: 0.85rem; }

/* FAQ Section */
.faq-container { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; text-align: left; max-width: 800px; margin-left: auto; margin-right: auto; }
.faq-item { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.faq-item.active { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
.faq-question { padding: 20px; font-size: 1.1rem; font-weight: 700; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }
.faq-item.active .faq-answer { padding: 0 20px 20px 20px; max-height: 500px; }

/* =========================================================================
   ADMIN PANEL STYLES
   ========================================================================= */
.admin-wrapper { max-width: 1200px; width: 100%; margin: 0 auto; position: relative; z-index: 10; box-sizing: border-box; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: rgba(255,255,255,0.02); padding: 20px 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); backdrop-filter: blur(10px); width: 100%; box-sizing: border-box;}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; width: 100%; box-sizing: border-box; }
.stat-card { background: rgba(17, 24, 39, 0.6); border: 1px solid rgba(255,255,255,0.05); padding: 25px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; width: 100%; box-sizing: border-box;}
.stat-card.highlight { border-color: rgba(16, 185, 129, 0.4); background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(17, 24, 39, 0.6) 100%); }
.stat-card i { position: absolute; right: -10px; bottom: -10px; font-size: 5rem; color: rgba(255,255,255,0.03); }
.stat-title { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 2.2rem; font-weight: 900; color: #fff; }
.stat-desc { font-size: 0.85rem; color: #3b82f6; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; box-sizing: border-box; }
.panel-box { background: rgba(17, 24, 39, 0.6); border: 1px solid rgba(255,255,255,0.05); padding: 25px; border-radius: 16px; margin-bottom: 30px; width: 100%; box-sizing: border-box; overflow: hidden;}

.badge { padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-owner { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-admin { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-user { background: rgba(107, 114, 128, 0.2); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.3); }

.prompt-list { display: flex; flex-direction: column; gap: 15px; max-height: 360px; overflow-y: auto; padding-right: 10px; width: 100%; box-sizing: border-box;}
.prompt-list::-webkit-scrollbar { width: 6px; }
.prompt-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.prompt-item { background: rgba(0,0,0,0.4); border-left: 4px solid #8b5cf6; padding: 15px; border-radius: 0 12px 12px 0; width: 100%; box-sizing: border-box;}
.prompt-meta { font-size: 0.8rem; color: #9ca3af; margin-bottom: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px;}
.prompt-text { font-family: monospace; color: #6ee7b7; font-size: 0.95rem; line-height: 1.5; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Modal Khusus Admin */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;}
.modal-content { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 30px; width: 100%; max-width: 450px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); position: relative; max-height: 90vh; overflow-y: auto; box-sizing: border-box;}
.close { color: #aaa; position: absolute; right: 20px; top: 20px; font-size: 28px; font-weight: bold; cursor: pointer; }

/* =========================================================================
   SUPER RESPONSIVE MOBILE FIX (Di bawah 768px)
   ========================================================================= */
@media (max-width: 768px) {
    body, html { padding: 10px; overflow-x: hidden !important; }
    .container { padding: 25px 15px; width: 100%; border-radius: 20px; animation: none; }
    .title { font-size: 2rem; }
    
    .navbar { padding: 15px; flex-direction: column; gap: 15px; border-radius: 12px !important; width: 100%; box-sizing: border-box;}
    .branding h1 { font-size: 1.3rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; width: 100%; gap: 10px;}
    
    /* CHAT BOX FIX */
    .app-container { min-height: 85vh; margin-top: 10px; width: 100%; box-sizing: border-box;}
    .chat-layout { padding: 15px 10px; gap: 10px;}
    .chat-box { padding: 15px 10px; gap: 12px;}
    .message { max-width: 95%; padding: 10px 14px; font-size: 0.9rem;}
    
    .input-area { gap: 5px; }
    .mic-btn { width: 45px; height: 45px; font-size: 1rem;}
    .chat-input { padding: 10px 12px; font-size: 0.9rem; }
    .send-btn, .stop-btn { padding: 0 15px; font-size: 0.85rem; height: 45px;}
    
    .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .toolbar-controls { width: 100%; flex-wrap: wrap;}
    .custom-select-wrapper { width: 100%; }
    
    /* DASHBOARD FIX */
    .header-dash { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: 15px;}
    .header-dash > div:nth-child(2) { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; }
    .api-card { padding: 15px; }
    .key-row { padding: 15px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .key-info { max-width: 100%; width: 100%;}
    .key-actions { width: 100%; justify-content: flex-start; }
    
    /* DOCS & FAQ FIX */
    .docs-hero h1 { font-size: 2rem; }
    .docs-section { padding: 15px; }
    .docs-section h2 { font-size: 1.3rem; }
    
    /* MENCEGAH TEKS TABEL DOCS NUMPUK & DEMPET DI HP */
    .docs-container table th, .docs-container table td { white-space: nowrap; }
    
    /* MENGUBAH DAFTAR MODEL JADI 1 KOLOM KE BAWAH DI HP */
    .model-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .model-card { padding: 12px; }

    .faq-question { font-size: 1rem; padding: 15px; }
    .faq-item.active .faq-answer { padding: 0 15px 15px 15px; }

    /* ADMIN PANEL MOBILE FIX */
    .admin-wrapper { padding: 0; width: 100%; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 15px; padding: 15px; width: 100%; box-sizing: border-box; }
    .admin-header > div:last-child { width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
    
    .dashboard-grid { display: flex !important; flex-direction: column !important; width: 100%; gap: 15px; }
    .stat-grid { display: flex !important; flex-direction: column !important; width: 100%; gap: 15px; }
    
    .panel-box { padding: 15px; width: 100%; overflow: hidden; box-sizing: border-box; }
    .stat-card { padding: 20px; width: 100%; box-sizing: border-box; }
    .stat-value { font-size: 1.8rem; }
    #apiChart { max-width: 100% !important; }

    /* General Button Fix */
    .btn-group { flex-direction: column; gap: 10px; width: 100%; }
    .btn, .btn-secondary, .btn-accent-green { width: 100%; padding: 12px; text-align: center; }
}