/* Root Design Tokens */
:root {
    --bg-main: #060913;
    --bg-panel: rgba(17, 24, 39, 0.7);
    --bg-card: rgba(31, 41, 55, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 240, 255, 0.25);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-blue: #3b82f6;
    --accent-cyan: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.15);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.04) 0%, transparent 50%);
}

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

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    backdrop-filter: blur(20px);
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.brand-icon i {
    color: #fff;
    font-size: 20px;
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.brand-text span {
    font-size: 11px;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

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

.menu-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.menu-item.active {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.15);
    box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.05);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

.status-dot.connecting {
    background-color: var(--warning);
    box-shadow: 0 0 10px var(--warning);
    animation: pulse 1.5s infinite alternate;
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 10px;
    color: var(--text-muted);
}

.status-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

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

.topbar h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

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

/* Form Controls & Pills */
.lang-selector-wrapper,
.db-selector-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0 14px;
    border-radius: 10px;
    height: 42px;
    gap: 8px;
    color: var(--accent-cyan);
    transition: var(--transition-smooth);
}

.lang-selector-wrapper:hover,
.db-selector-wrapper:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.lang-selector-wrapper i,
.db-selector-wrapper i {
    font-size: 14px;
}

.db-selector-wrapper:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-glow);
}

.custom-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding-right: 12px;
}

.custom-select option {
    background-color: #0c111e;
    color: var(--text-primary);
    padding: 10px;
}

.connection-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0 16px;
    border-radius: 10px;
    height: 42px;
    font-size: 13px;
    font-weight: 600;
    color: #93c5fd;
}

/* Page Body Container */
.content-body {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Dashboard Banner */
.dashboard-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.banner-content h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

.banner-db-info {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 16px 24px;
    border-radius: 14px;
    min-width: 250px;
    text-align: right;
    box-shadow: 0 0 20px var(--accent-glow);
}

.info-label {
    font-size: 10px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.banner-db-info h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: #fff;
    margin: 4px 0;
    font-weight: 600;
}

.info-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Statistics Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.3);
    border-color: var(--border-hover);
}

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

/* Card-specific accent schemes */
.stat-card.blue .stat-icon { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.stat-card.blue:hover { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 10px 24px rgba(59, 130, 246, 0.08); }

.stat-card.purple .stat-icon { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.stat-card.purple:hover { border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 10px 24px rgba(139, 92, 246, 0.08); }

.stat-card.orange .stat-icon { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.stat-card.orange:hover { border-color: rgba(245, 158, 11, 0.3); box-shadow: 0 10px 24px rgba(245, 158, 11, 0.08); }

.stat-card.green .stat-icon { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.stat-card.green:hover { border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 10px 24px rgba(16, 185, 129, 0.08); }

.stat-card.red .stat-icon { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.stat-card.red:hover { border-color: rgba(239, 68, 68, 0.3); box-shadow: 0 10px 24px rgba(239, 68, 68, 0.08); }

.stat-card.cyan .stat-icon { background: rgba(6, 182, 212, 0.12); color: #22d3ee; }
.stat-card.cyan:hover { border-color: rgba(6, 182, 212, 0.3); box-shadow: 0 10px 24px rgba(6, 182, 212, 0.08); }

.stat-title {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

/* Dashboard Grid Rows */
.dashboard-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.col-8 { flex: 2; }
.col-4 { flex: 1; }

.dashboard-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.dashboard-card .card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.dashboard-card .card-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* Info List Items */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.info-item:last-child {
    border: none;
    padding-bottom: 0;
}

.info-key {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-val {
    color: #fff;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* Button & Quick Actions */
.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    height: 46px;
    padding: 0 24px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
}

.btn-accent {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-sm {
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Page Control Headers */
.section-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input-wrapper input {
    width: 100%;
    height: 44px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 16px 0 46px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-glow);
}

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Modern Premium Tables */
.table-container {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

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

th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-weight: 500;
}

tbody tr {
    transition: var(--transition-smooth);
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

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

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-yellow { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-red { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Pagination Controls */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.page-btn:hover {
    border-color: var(--accent-cyan);
    color: #fff;
}

.page-btn.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Master Data Sub-tabs */
.sub-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.sub-tab-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.sub-tab-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.sub-tab-item.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* SQL Sandbox Layout */
.sandbox-container {
    display: flex;
    gap: 24px;
    height: calc(100vh - 180px);
}

/* Schema Sidebar */
.schema-sidebar {
    width: 300px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.schema-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.schema-header h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.schema-search-wrapper {
    position: relative;
}

.schema-search-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 11px;
}

.schema-search-wrapper input {
    width: 100%;
    height: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0 10px 0 28px;
    color: #fff;
    font-size: 12px;
    outline: none;
}

.schema-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Schema Accordion */
.schema-table-item {
    border: 1px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.schema-table-item.active {
    border-color: rgba(255,255,255,0.05);
    background: rgba(255, 255, 255, 0.01);
}

.schema-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.schema-table-header:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
}

.schema-table-columns {
    display: none;
    padding: 8px 12px 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.02);
    flex-direction: column;
    gap: 6px;
}

.schema-table-item.active .schema-table-columns {
    display: flex;
}

.schema-col {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.schema-col-name {
    color: #93c5fd;
    font-family: var(--font-mono);
}

.schema-col-type {
    color: var(--text-muted);
}

/* SQL Editor & Query Panel */
.query-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.editor-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    height: 240px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.editor-header, .result-header {
    height: 52px;
    background-color: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.editor-title, .result-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-body {
    flex: 1;
}

#sql-editor {
    width: 100%;
    height: 100%;
    background: #090d16;
    border: none;
    outline: none;
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    resize: none;
}

/* Query Result Card */
.result-card {
    flex: 1;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.result-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

.result-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
}

.empty-state i {
    font-size: 40px;
}

.empty-state p {
    font-size: 13px;
}

/* Connection Setup Page */
.settings-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 720px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.col-full {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    height: 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-glow);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid var(--border-color);
}

.feedback-alert {
    padding: 12px 24px;
    margin: 0 24px 24px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

.feedback-alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
}

.feedback-alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
}

/* Detail Drawer (Slide-out panel) */
.drawer {
    position: fixed;
    top: 0;
    right: -520px;
    width: 500px;
    height: 100vh;
    background-color: #0c111e;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.open {
    right: 0;
}

.drawer-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drawer-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
    display: block;
    opacity: 1;
}

/* Drawer Content styling */
.drawer-section {
    margin-bottom: 24px;
}

.drawer-section h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.drawer-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
}

.drawer-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-detail-label {
    font-size: 11px;
    color: var(--text-muted);
}

.drawer-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

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

@keyframes pulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ALL TABLES EXPLORER STYLES */
.all-tables-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
}

.tables-sidebar {
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.tables-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.01);
}

.tables-sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tables-list-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.table-list-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    margin-bottom: 4px;
}

.table-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.table-list-item.active {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.3);
}

.table-item-name {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    word-break: break-all;
}

.table-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.tables-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-view-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.01);
}

.table-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title-area h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.table-view-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-group {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    background: var(--accent-blue);
    color: #fff;
}

.table-tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.table-tab-content.active {
    display: flex;
}

