/* ==========================================================================
   BromeoASSIST Web Dashboard Theme & Design System
   bromeoassist.bromeo.live
   ========================================================================== */

:root {
    --bg-dark: #0b0e14;
    --bg-card: rgba(18, 24, 38, 0.7);
    --bg-card-hover: rgba(26, 35, 54, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(139, 92, 246, 0.3);
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.4);
    
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.4);
    
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.3);
    
    --rose: #f43f5e;
    --orange: #f97316;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Consolas', 'Courier New', monospace;
    
    --sidebar-width: 260px;
    --topbar-height: 80px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Animated Blobs */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.blob-purple {
    top: -10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
}

.blob-cyan {
    bottom: -10%;
    right: 15%;
    width: 600px;
    height: 600px;
    background: var(--cyan);
}

.blob-blue {
    top: 40%;
    left: 50%;
    width: 450px;
    height: 450px;
    background: #3b82f6;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Login Overlay & Card */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.login-overlay.hidden {
    display: none;
    opacity: 0;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 0 40px var(--primary-glow);
    animation: slideUp 0.4s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 0 24px var(--primary-glow);
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.login-error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid var(--rose);
    color: #fecdd3;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Dashboard Layout */
.dashboard-app {
    display: flex;
    min-height: 100vh;
}

.dashboard-app.hidden {
    display: none;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-right: 1px solid var(--border-color);
    border-top: none;
    border-bottom: none;
    border-left: none;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-badge-sm {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.brand-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.brand-domain {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-menu {
    flex: 1;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.1));
    border: 1px solid var(--border-highlight);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--border-highlight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-email {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
}

.topbar h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* BOT POWER SWITCH (AAN / UIT TOGGLE) */
.btn-toggle-power {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25 ease;
    border: 1px solid transparent;
}

.btn-toggle-power.online {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--emerald);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-toggle-power.online:hover {
    background: rgba(16, 185, 129, 0.3);
}

.btn-toggle-power.offline {
    background: rgba(244, 63, 94, 0.18);
    border-color: rgba(244, 63, 94, 0.5);
    color: var(--rose);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.btn-toggle-power.offline:hover {
    background: rgba(244, 63, 94, 0.3);
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(11, 14, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

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

.toggle-pwd-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.toggle-pwd-btn:hover {
    color: #fff;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-icon-danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--rose);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-danger:hover {
    background: var(--rose);
    color: white;
}

/* Prompt Presets */
.presets-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

.btn-preset {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #d8b4fe;
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-preset:hover {
    background: var(--primary);
    color: #fff;
}

/* Add Channel Inputs */
.add-channel-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-channel-row input {
    flex: 1;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.actions-group {
    display: flex;
    gap: 0.5rem;
}

/* Tabs System */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Content Cards */
.content-card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.col-span-2 {
    grid-column: span 2;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.purple { background: rgba(139, 92, 246, 0.2); color: var(--primary); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.2); color: var(--cyan); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.2); color: var(--emerald); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.2); color: var(--orange); }

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.stat-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Quick Actions Grid */
.dashboard-rows {
    display: flex;
    gap: 1.5rem;
}

.flex-1 { flex: 1; }

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(11, 14, 20, 0.5);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--text-main);
}

.action-btn i {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.action-btn span {
    font-weight: 700;
    font-size: 0.95rem;
}

.action-btn small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.action-btn.purple i { color: var(--primary); }
.action-btn.danger i { color: var(--rose); }
.action-btn.cyan i { color: var(--cyan); }
.action-btn.orange i { color: var(--orange); }

.action-btn:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.05);
}

/* Cogs List */
.cogs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cog-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(11, 14, 20, 0.5);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.cog-name {
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.success { background: rgba(16, 185, 129, 0.2); color: var(--emerald); }

/* Range Sliders */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

.range-val {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--cyan);
    min-width: 50px;
}

/* Channels Chips */
.channels-section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.channel-column-header {
    margin-bottom: 0.75rem;
}

.channel-column-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.channel-column-header.success h4 { color: var(--emerald); }
.channel-column-header.danger h4 { color: var(--rose); }

.channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.channel-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-main);
}

.channel-chip.danger {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
}

.channel-chip button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.channel-chip button:hover { color: #fff; }

/* Test Prompt Box */
.test-prompt-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(11, 14, 20, 0.6);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
}

.test-prompt-box h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-input-row {
    display: flex;
    gap: 1rem;
}

.test-output-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary-glow);
    border-radius: var(--radius-sm);
}

.test-output-box.hidden { display: none; }

.test-output-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Terminal Log Box */
.terminal-box {
    background: #05070a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    min-height: 350px;
    max-height: 500px;
    overflow-y: auto;
}

.log-line {
    margin-bottom: 0.4rem;
    word-break: break-all;
}

.log-line.info { color: #93c5fd; }
.log-line.success { color: #6ee7b7; }
.log-line.warn { color: #fde047; }
.log-line.error { color: #fca5a5; }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-highlight);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.code-font {
    font-family: var(--font-mono);
}

.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
