/* ═══════════════════════════════════════════════════════
   DATABASE DESIGNER - Design System
   Light, clean, professional theme for DB experts
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Colors */
    --bg-primary: #f8faff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-canvas: #eef2f8;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Accent */
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-lighter: #e0e7ff;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.15);

    /* Status */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-accent: 0 4px 14px rgba(99, 102, 241, 0.25);

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
    animation: loginBgMove 20s ease-in-out infinite alternate;
}

@keyframes loginBgMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-3%, -3%) rotate(2deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 420px;
    max-width: 95%;
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    animation: loginSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 12px;
    box-shadow: var(--shadow-accent);
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition);
    outline: none;
}

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

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 40px;
}

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

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}
.btn-danger:hover { box-shadow: 0 4px 14px rgba(239,68,68,0.3); }

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}
.btn-success:hover { box-shadow: 0 4px 14px rgba(16,185,129,0.3); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--accent); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 5px; }

/* ═══════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════ */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Navbar */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.navbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-project-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
}
.navbar-project-select:hover { border-color: var(--accent); }
.navbar-project-select i { color: var(--text-muted); font-size: 11px; }

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.navbar-user:hover { background: var(--bg-tertiary); }

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
}

.navbar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.navbar-user-role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   LEFT SIDEBAR - Tables List
   ═══════════════════════════════════════ */
.sidebar-left {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.table-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.table-list-item:hover {
    background: var(--bg-tertiary);
}

.table-list-item.active {
    background: var(--accent-lighter);
    color: var(--accent-dark);
}

.table-list-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.table-list-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-list-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 500;
}

.table-list-actions {
    display: none;
    gap: 2px;
}

.table-list-item:hover .table-list-actions {
    display: flex;
}

.table-list-item:hover .table-list-count {
    display: none;
}

/* ═══════════════════════════════════════
   CANVAS AREA
   ═══════════════════════════════════════ */
.canvas-area {
    flex: 1;
    position: relative;
    background: var(--bg-canvas);
    overflow: hidden;
}

.canvas-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

#canvas-container {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
}

/* Canvas table cards */
.canvas-table {
    position: absolute;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    cursor: grab;
    transition: box-shadow 0.2s;
    z-index: 10;
    border: 1.5px solid var(--border);
    resize: both;
    overflow: hidden;
}

.canvas-table:hover {
    box-shadow: var(--shadow-lg);
    z-index: 20;
}

.canvas-table.dragging {
    cursor: grabbing;
    box-shadow: var(--shadow-xl);
    z-index: 100;
    opacity: 0.92;
}

.canvas-table.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-lg);
}

.canvas-table-header {
    padding: 12px 14px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: grab;
}

.canvas-table-header i {
    font-size: 12px;
    opacity: 0.8;
}

.canvas-table-columns {
    padding: 4px 0;
}

.canvas-col-row {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.canvas-col-row:hover {
    background: var(--bg-tertiary);
}

.canvas-col-row.is-pk {
    border-left-color: var(--warning);
}

.canvas-col-icon {
    color: var(--text-muted);
    font-size: 10px;
    width: 14px;
    text-align: center;
}

.canvas-col-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.canvas-col-type {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.canvas-col-notes {
    color: var(--accent);
    font-size: 10px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Canvas controls */
.canvas-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 50;
}

.canvas-controls .btn-icon {
    border-radius: var(--radius);
}

.zoom-level {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    justify-content: center;
}

/* ═══════════════════════════════════════
   RIGHT SIDEBAR - Column Editor
   ═══════════════════════════════════════ */
.sidebar-right {
    width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition-slow);
}

.sidebar-right.hidden {
    width: 0;
    overflow: hidden;
    border-left: none;
}

.editor-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-table-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.column-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.column-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.column-card.editing {
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.column-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.column-card-pk {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: var(--warning);
    color: white;
    cursor: pointer;
}

.column-card-pk.inactive {
    background: var(--border);
    color: var(--text-muted);
}

.column-card-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    flex: 1;
}

.column-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.column-card:hover .column-card-actions {
    opacity: 1;
}

.column-mini-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.column-mini-fields .form-input {
    font-size: 12px;
    padding: 6px 10px;
}

.add-column-btn {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 500;
    margin-top: 4px;
}

.add-column-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-lighter);
}

/* ═══════════════════════════════════════
   STATUS BAR
   ═══════════════════════════════════════ */
.status-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0 16px;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    z-index: 100;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.status-log {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════
   MODALS
   ═══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-sm { width: 420px; }
.modal-md { width: 560px; }
.modal-lg { width: 720px; }
.modal-xl { width: 900px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 360px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

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

/* ═══════════════════════════════════════
   DROPDOWN
   ═══════════════════════════════════════ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 500;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #fef2f2; }

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* ═══════════════════════════════════════
   SVG RELATIONSHIP LINES
   ═══════════════════════════════════════ */
.relationship-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.rel-line {
    stroke: var(--accent-light);
    stroke-width: 2;
    fill: none;
    pointer-events: stroke;
    cursor: pointer;
}

.rel-line:hover {
    stroke: var(--accent);
    stroke-width: 3;
}

.rel-label {
    fill: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* ═══════════════════════════════════════
   SQL CODE BLOCK
   ═══════════════════════════════════════ */
.sql-code {
    background: #1e293b;
    border-radius: var(--radius);
    padding: 20px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow: auto;
    max-height: 400px;
    white-space: pre-wrap;
    word-break: break-all;
}

.sql-keyword { color: #818cf8; font-weight: 600; }
.sql-type { color: #34d399; }
.sql-string { color: #fbbf24; }
.sql-comment { color: #64748b; font-style: italic; }

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-lighter);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════
   USER MANAGEMENT TABLE
   ═══════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--bg-tertiary);
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-admin {
    background: linear-gradient(135deg, var(--accent-lighter), #ede9fe);
    color: var(--accent-dark);
}

.badge-user {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   PROJECT CARD
   ═══════════════════════════════════════ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 6px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.project-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-card-actions {
    opacity: 1;
}

.new-project-card {
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    color: var(--text-muted);
    gap: 8px;
}

.new-project-card:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-lighter);
}

.new-project-card i { font-size: 24px; }

/* ═══════════════════════════════════════
   RELATIONSHIP BUILDER
   ═══════════════════════════════════════ */
.rel-builder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.rel-builder-row select {
    flex: 1;
}

.rel-arrow {
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   COLOR PICKER
   ═══════════════════════════════════════ */
.color-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px white; }

/* ═══════════════════════════════════════
   TAB NAVIGATION  
   ═══════════════════════════════════════ */
.tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}

.tab-item {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar-left { width: 220px; }
    .sidebar-right { width: 280px; }
}

@media (max-width: 768px) {
    .sidebar-left, .sidebar-right { display: none; }
    .navbar-project-select span { display: none; }
}

/* ═══════════════════════════════════════
   TAB CONTENT
   ═══════════════════════════════════════ */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

/* ═══════════════════════════════════════
   CHECKBOX LABEL
   ═══════════════════════════════════════ */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ═══════════════════════════════════════
   AUTO-SUGGEST PREVIEW
   ═══════════════════════════════════════ */
.auto-suggest-preview {
    margin-top: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    max-height: 280px;
    overflow-y: auto;
}
.auto-suggest-preview .suggest-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
}
.auto-suggest-preview .suggest-header i {
    font-size: 11px;
}
.suggest-col-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.suggest-col-row:nth-child(even) {
    background: rgba(255,255,255,0.5);
}
.suggest-col-row .col-icon {
    color: var(--text-muted);
    font-size: 10px;
    width: 14px;
    text-align: center;
}
.suggest-col-row .col-icon.pk {
    color: var(--warning);
}
.suggest-col-row .col-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}
.suggest-col-row .col-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    min-width: 140px;
}
.suggest-col-row .col-notes {
    color: var(--text-muted);
    font-size: 11px;
    flex: 1;
}

/* ═══════════════════════════════════════
   SQL TEXTAREA
   ═══════════════════════════════════════ */
.sql-textarea {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    padding: 16px !important;
    border-radius: var(--radius) !important;
    min-height: 260px;
}
.sql-textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
}
.sql-textarea::placeholder {
    color: #64748b !important;
}

/* ═══════════════════════════════════════
   TEMPLATE GRID (in add-table modal)
   ═══════════════════════════════════════ */
.template-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding: 4px;
}
.template-card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.template-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.template-card.selected {
    border-color: var(--accent);
    background: var(--accent-lighter);
}
.template-card-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.template-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
}
.template-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
}
.template-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   DOCS MODAL LAYOUT
   ═══════════════════════════════════════ */
.docs-layout {
    display: flex;
    height: 520px;
}
.docs-sidebar {
    width: 260px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 12px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}
.docs-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.docs-cat-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 10px 6px;
    margin-top: 4px;
}
.docs-cat-title:first-child {
    margin-top: 0;
    padding-top: 6px;
}
.docs-table-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.docs-table-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.docs-table-item.active {
    background: var(--accent-lighter);
    color: var(--accent-dark);
}
.docs-table-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}
.docs-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.docs-detail-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}
.docs-detail-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}
.docs-col-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.docs-col-table th {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.docs-col-table td {
    padding: 7px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--border-light);
}
.docs-col-table tr:last-child td {
    border-bottom: none;
}
.docs-col-table tr:hover td {
    background: var(--bg-tertiary);
}
.docs-col-table .col-name-cell {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.docs-col-table .col-type-cell {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 11px;
}

/* ═══════════════════════════════════════
   COLUMN AUTOCOMPLETE DROPDOWN
   ═══════════════════════════════════════ */
.col-autocomplete {
    position: relative;
}
.col-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.col-autocomplete-dropdown.show {
    display: block;
    animation: fadeIn 0.15s ease;
}
.col-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    border-bottom: 1px solid var(--border-light);
}
.col-ac-item:last-child {
    border-bottom: none;
}
.col-ac-item:hover, .col-ac-item.active {
    background: var(--accent-lighter);
}
.col-ac-item .ac-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}
.col-ac-item .ac-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--accent);
    flex: 1;
}
.col-ac-item .ac-notes {
    font-size: 10px;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════ */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 6px;
    z-index: 10000;
    display: none;
}
.context-menu.show { display: block; animation: fadeIn 0.12s ease; }
.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}
.context-menu-item:hover { background: var(--accent-lighter); color: var(--accent-dark); }
.context-menu-item i { width: 16px; text-align: center; font-size: 12px; }
.context-menu-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ═══════════════════════════════════════
   SIDEBAR TOGGLE BUTTONS
   ═══════════════════════════════════════ */
.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    transition: var(--transition);
}
.sidebar-toggle-btn:hover { color: var(--accent); background: var(--accent-lighter); }
.sidebar-toggle-btn.left { left: 0; }
.sidebar-toggle-btn.right { right: 0; border-radius: 8px 0 0 8px; }
.sidebar-left.collapsed, .sidebar-right.collapsed { width: 0; overflow: hidden; border: none; padding: 0; }

/* ═══════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════ */
#dashboard-page {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: var(--bg-canvas);
}
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}
.dashboard-header h1 { font-size: 28px; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.dashboard-header p { font-size: 14px; color: var(--text-muted); }
.dashboard-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    min-width: 160px;
    border: 1px solid var(--border);
}
.stat-card .stat-num { font-size: 32px; font-weight: 800; color: var(--accent); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.dashboard-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.dash-project-card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
}
.dash-project-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dash-project-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.dash-project-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.dash-project-card .meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 16px; }

/* ═══════════════════════════════════════
   COPY TABLE LIST
   ═══════════════════════════════════════ */
.copy-table-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
}
.copy-table-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.copy-table-item:hover { background: var(--bg-tertiary); }
.copy-table-item input { accent-color: var(--accent); }
.copy-table-item .name { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 13px; }
.copy-table-item .cnt { font-size: 11px; color: var(--text-muted); }

/* ═══════════════════════════════════════
   SNAPSHOT TIMELINE
   ═══════════════════════════════════════ */
.snapshot-list { max-height: 480px; overflow-y: auto; }
.snapshot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.snapshot-item:hover { background: var(--bg-tertiary); }
.snapshot-item .snap-num { font-size: 11px; font-weight: 700; color: var(--text-muted); min-width: 24px; }
.snapshot-item .snap-action { flex: 1; font-size: 13px; font-weight: 500; }
.snapshot-item .snap-user { font-size: 11px; color: var(--text-muted); }
.snapshot-item .snap-time { font-size: 11px; color: var(--text-muted); min-width: 80px; }
.snapshot-item .snap-actions { display: flex; gap: 4px; }

/* ═══════════════════════════════════════
   DRAG HANDLE FOR COLUMN REORDER
   ═══════════════════════════════════════ */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 4px;
    opacity: 0.5;
    transition: var(--transition);
}
.drag-handle:hover { opacity: 1; color: var(--accent); }
.column-card.dragging-col {
    opacity: 0.5;
    border: 2px dashed var(--accent);
}
.column-card.drag-over {
    border-top: 3px solid var(--accent);
}

/* ═══════════════════════════════════════
   NULLABLE CHECKBOX IN EDITOR
   ═══════════════════════════════════════ */
.nullable-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.nullable-row label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.nullable-row input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

/* Drag-drop column relation visual indicator */
.canvas-col-row.drag-source { background: var(--accent-lighter); border-left-color: var(--accent); }
.canvas-col-row.drag-target { background: #dcfce7; border-left-color: var(--success); }

/* ═══════════════════════════════════════
   FULL TABLE VIEW (Canvas) — Excel-like
   ═══════════════════════════════════════ */
.canvas-ft {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    table-layout: auto;
}
.canvas-ft th {
    padding: 6px 10px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border);
    border-right: 1px solid var(--border-light);
    white-space: nowrap;
    text-align: left;
}
.canvas-ft th:last-child { border-right: none; }
.ft-null { color: var(--text-muted); font-size: 9px; margin-left: 2px; }
.ft-act-col { width: 28px; text-align: center; padding: 0 !important; }
.canvas-ft td {
    padding: 0;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
}
.canvas-ft td:last-child { border-right: none; }
.canvas-ft tbody tr:hover { background: var(--bg-tertiary); }
.ft-cell {
    width: 100%;
    border: none;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 5px 8px;
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
    min-width: 60px;
}
.ft-cell:focus { background: var(--accent-lighter); }
.ft-cell::placeholder { color: var(--border); }
.ft-del-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 14px; padding: 2px 6px;
    line-height: 1; transition: var(--transition);
}
.ft-del-btn:hover { color: var(--danger); }
.ft-add-td {
    padding: 6px 12px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    border-top: 1px solid var(--border-light);
    font-weight: 500;
}
.ft-add-td:hover { 
    color: var(--accent); 
    background: var(--bg-secondary); 
}

/* ═══════════════════════════════════════
   LEFT SIDEBAR COLUMN LIST (Expand)
   ═══════════════════════════════════════ */
.sidebar-col-list {
    padding: 4px 8px 8px 28px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    animation: fadeIn 0.2s ease;
}
.sidebar-col-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}
.sidebar-col-row:hover { background: var(--bg-secondary); }
.sidebar-col-row .sc-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    min-width: 70px;
}
.sidebar-col-row .sc-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--accent);
}

/* ═══════════════════════════════════════
   CROSS-TABLE SUGGESTIONS
   ═══════════════════════════════════════ */
.ac-section-label {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
}
.col-ac-rel {
    background: linear-gradient(90deg, rgba(99,102,241,0.06) 0%, transparent 100%);
    border-left: 3px solid var(--accent);
}
.col-ac-rel:hover { background: linear-gradient(90deg, rgba(99,102,241,0.12) 0%, transparent 100%); }
.ac-link-icon { font-size: 12px; margin-right: 2px; }
