/* style.css - Level 100 Enigmatic Enterprise Theme */

:root {
    --bg-base: transparent;
    --bg-surface: rgba(8, 8, 10, 0.6);
    --bg-surface-hover: rgba(20, 20, 25, 0.8);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #f0f0f0;
    --text-muted: #888890;
    
    --accent-primary: #00d2ff; /* Electric Cyan */
    --accent-hover: #00e5ff;
    
    --status-success: #00ff88;
    --status-danger: #ff3366;
    --status-warning: #ffcc00;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    
    --shadow-floating: 0 30px 60px -10px rgba(0, 0, 0, 0.8), 0 20px 20px -10px rgba(0, 0, 0, 0.6);
    --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: #000;
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

/* Film Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.04;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Typography Utility */
.text-right { text-align: right; }
.text-success { color: var(--status-success) !important; text-shadow: 0 0 10px rgba(0,255,136,0.3); }
.text-danger { color: var(--status-danger) !important; text-shadow: 0 0 10px rgba(255,51,102,0.3); }
.data-number { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.5px; }

h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
h3 { font-size: 14px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.subtitle { color: var(--text-muted); margin-top: 4px; font-size: 13px; }
.form-hint { color: var(--text-muted); font-size: 11px; margin-top: 2px; margin-bottom: 8px; }

/* Global Layout */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--bg-surface);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.sidebar-header .logo span { 
    color: var(--accent-primary); 
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.nav-menu {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 16px 0 8px 12px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.nav-btn.active {
    background-color: rgba(0, 210, 255, 0.1);
    color: var(--accent-primary);
    box-shadow: inset 2px 0 0 var(--accent-primary);
}

.nav-btn .icon {
    font-size: 16px;
    opacity: 0.9;
}

/* Main Workspace */
.workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Topbar */
.topbar {
    height: 50px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: var(--bg-surface);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    z-index: 10;
}

.topbar-left, .topbar-center, .topbar-right {
    display: flex;
    align-items: center;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.status-indicator .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-danger); }
.status-indicator.connected .dot { background: var(--status-success); box-shadow: 0 0 8px var(--status-success); }
.status-indicator.connected .text { color: var(--status-success); }

/* Topbar Form */
.connect-inline-form {
    display: flex;
    gap: 6px;
}
.connect-inline-form input {
    width: 140px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 12px;
}
.connect-inline-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.2);
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
}

.tab-content { display: none; flex-direction: column; height: 100%; animation: fade 0.15s ease; }
.tab-content.active { display: flex; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.page-header { margin-bottom: 20px; }

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kpi-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 24px; font-family: var(--font-mono); font-weight: 500; color: var(--text-main); }
#kpi-collected-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.3);
}

/* Cards & Containers */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.full-height-card { flex-grow: 1; margin-bottom: 0; overflow: hidden; }

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-body { padding: 16px; }
.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

/* Forms & Inputs */
.form-group { display: flex; flex-direction: column; margin-bottom: 12px; }
.form-group.w-50 { width: calc(50% - 8px); }
.form-row { display: flex; gap: 16px; }
.form-group label { font-size: 12px; font-weight: 500; margin-bottom: 4px; color: var(--text-main); }
.mt-4 { margin-top: 12px; }

.input-modern {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 13px;
    transition: border-color var(--transition);
}
.input-modern:focus { outline: none; border-color: var(--accent-primary); }

.input-prefix-wrap { position: relative; display: flex; align-items: center; }
.input-prefix-wrap .prefix { position: absolute; left: 10px; color: var(--text-muted); font-weight: 500; }
.input-with-prefix { padding-left: 24px; font-family: var(--font-mono); }

/* Tag Inputs */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    min-height: 36px;
    align-items: center;
    position: relative;
}
.tag-input-container:focus-within { border-color: var(--accent-primary); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tag .remove { cursor: pointer; color: var(--text-muted); font-family: monospace; }
.tag .remove:hover { color: var(--status-danger); }

.tag-input-field {
    flex-grow: 1;
    min-width: 100px;
    border: none;
    background: transparent;
    padding: 2px;
    color: var(--text-main);
    font-family: var(--font-mono);
    outline: none;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px); left: 0; width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    max-height: 150px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-floating);
}
.autocomplete-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: rgba(0, 210, 255, 0.1); color: var(--accent-primary); }

/* Buttons */
.btn {
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-primary { background: rgba(0, 210, 255, 0.15); border-color: rgba(0, 210, 255, 0.3); color: var(--accent-primary); }
.btn-primary:hover { background: rgba(0, 210, 255, 0.25); border-color: var(--accent-primary); box-shadow: 0 0 10px rgba(0, 210, 255, 0.2); }

.btn-success { background: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.2); color: var(--status-success); }
.btn-success:hover { background: rgba(0, 255, 136, 0.2); border-color: var(--status-success); }

.btn-danger { background: rgba(255, 51, 102, 0.1); border-color: rgba(255, 51, 102, 0.2); color: var(--status-danger); }
.btn-danger:hover { background: rgba(255, 51, 102, 0.2); border-color: var(--status-danger); }

.btn-ghost { background: transparent; border-color: var(--border-color); color: var(--text-main); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }

.engine-controls { display: flex; gap: 6px; }

/* Tables & Hierarchy */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .search-icon { position: absolute; left: 10px; font-size: 14px; opacity: 0.5; }
.search-wrap input { width: 200px; padding-left: 30px; height: 28px; font-size: 12px; }

.table-container { flex-grow: 1; overflow-y: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border-color); font-size: 12px; }
.data-table th {
    background: rgba(0,0,0,0.3);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.data-table tbody tr { cursor: pointer; transition: background 0.1s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.data-table tbody tr.selected { background: rgba(0, 210, 255, 0.05); }

/* Folder Hierarchy Styles */
.folder-row {
    background: rgba(0, 210, 255, 0.03);
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.folder-row:hover {
    background: rgba(0, 210, 255, 0.08) !important;
}
.folder-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.folder-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}
.folder-toggle.open { transform: rotate(90deg); }
.child-row td:first-child { padding-left: 32px; } /* Indent checkbox */
.child-row td:nth-child(2) { padding-left: 24px; position: relative; } /* Indent login */
.child-row td:nth-child(2)::before {
    content: '';
    position: absolute;
    left: -4px; top: 0; bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.child-row td:nth-child(2)::after {
    content: '';
    position: absolute;
    left: -4px; top: 50%; width: 12px; height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.folder-badge {
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.data-table td.mono { font-family: var(--font-mono); }

.empty-state { text-align: center; padding: 40px !important; color: var(--text-muted); font-style: italic; font-size: 12px; }

.status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}
.status-badge.grace { background: rgba(255, 204, 0, 0.1); border-color: rgba(255, 204, 0, 0.3); color: var(--status-warning); }
.status-badge.charged { background: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.3); color: var(--status-success); }
.status-badge.error { background: rgba(255, 51, 102, 0.1); border-color: rgba(255, 51, 102, 0.3); color: var(--status-danger); }

/* Floating Action Bar */
.floating-action-bar {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 210, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.1), var(--shadow-floating);
    border-radius: var(--radius-lg);
    padding: 10px 20px;
    z-index: 900;
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-action-bar.visible { bottom: 30px; }
.fab-content { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.fab-text { font-size: 13px; font-weight: 500; }
.fab-actions { display: flex; gap: 8px; }

/* Command Palette Overlay */
#cmd-palette-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}
#cmd-palette-overlay.visible { display: flex; }

#cmd-palette {
    width: 600px;
    max-width: 90vw;
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-floating);
    overflow: hidden;
    animation: slideDown 0.15s ease-out;
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.cmd-input-wrap {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}
.tag:hover {
    background: rgba(var(--accent-primary-rgb), 0.3);
}

.help-text {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Neon Pulse Engine Indicator */
.neon-pulse {
    box-shadow: 0 0 8px var(--accent-primary), 0 0 16px var(--accent-primary);
    animation: pulse-ring 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--accent-primary-rgb), 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0); }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-container {
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(8, 8, 12, 0.85);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.15), var(--shadow-floating);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(25px) saturate(160%);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: right;
}

/* Form Controls */
.form-control {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
    background: rgba(10, 10, 15, 0.8);
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px;
}
.form-group label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.form-row .half {
    flex: 1;
}

#modal-targets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
#modal-targets-list .tag {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--accent-primary);
    padding: 3px 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

/* Data Table Updates */
.data-table th, .data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
.text-right {
    text-align: right !important;
}

/* Tree UI */
.cmd-icon {
    font-size: 20px;
    color: var(--text-muted);
    margin-right: 12px;
}
#cmd-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 16px;
    outline: none;
}
#cmd-input::placeholder { color: var(--text-muted); font-family: var(--font-sans); font-size: 14px; }

.cmd-results {
    max-height: 300px;
    overflow-y: auto;
}
.cmd-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    border-left: 2px solid transparent;
}
.cmd-item.active, .cmd-item:hover {
    background: rgba(0, 210, 255, 0.05);
    color: var(--text-main);
    border-left-color: var(--accent-primary);
}
.cmd-item-icon { font-size: 16px; opacity: 0.8; }
.cmd-item-text { flex-grow: 1; }
.cmd-item-shortcut { font-family: var(--font-mono); font-size: 10px; background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; }


/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Loader Overlay */
#loader-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999; flex-direction: column; justify-content: center; align-items: center;
}
.spinner { width: 30px; height: 30px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.6s linear infinite; margin-bottom: 12px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#loader-text { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }

/* Toasts */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); color: white; font-size: 12px; font-family: var(--font-mono); font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.5); animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.toast.success { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.3); color: var(--status-success); }
.toast.error { background: rgba(255, 51, 102, 0.1); border: 1px solid rgba(255, 51, 102, 0.3); color: var(--status-danger); }
.toast.info { background: rgba(0,0,0,0.8); border: 1px solid var(--border-color); color: var(--text-main); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Live Log Terminal Drawer styling */
.terminal-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Collapsed height */
    background: rgba(10, 15, 20, 0.95);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
}
.terminal-drawer.expanded {
    height: 250px; /* Expanded height */
}
.terminal-header {
    height: 40px;
    background: rgba(15, 25, 35, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.terminal-header .title {
    font-size: 11px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.terminal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 20px;
    color: #00ff66; /* Retro green */
    font-size: 11px;
    line-height: 1.6;
    background: #05080c;
}
.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 102, 0.2);
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 102, 0.4);
}
.log-line {
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding: 3px 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.log-line.error {
    color: #ff3366;
}
.log-line.success {
    color: #00d2ff;
}

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

