/* ========= GLOBAL ========= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-family-sans, 'Segoe UI', 'Arial', sans-serif);
}

body {
    background: var(--bg-primary, #f0f4f8);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-500, #014aad) 0%, var(--primary-400, #049ee0) 100%);
}

/* ========= SIDEBAR ========= */
.menu-gradient {
    background: linear-gradient(135deg, #014aad, #049ee0 70%, #013f90);
    color: #fff;
}

.menu-gradient::-webkit-scrollbar {
    width: 6px;
}

.menu-gradient::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.menu-gradient::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.menu-gradient::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-profile {
    margin-bottom: var(--spacing-6, 1.5rem);
    text-align: center;
    padding: 0 var(--spacing-4, 1rem);
}

.sidebar-profile img {
    border-radius: 50%;
    border: 2px solid #fff;
    margin-bottom: var(--spacing-2, 0.5rem);
}

.sidebar-profile .user-email {
    color: #def7f3;
    font-size: var(--font-size-sm, 0.85rem);
}

/* ========= LOGO ========= */
.app-logo {
    height: 40px;
    max-width: 100%;
    display: inline-block;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-logo-image {
    height: 52px;
    max-width: 100%;
    margin-bottom: var(--spacing-4, 1rem);
    display: inline-block;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ========= MENU ITEMS ========= */
.nav-menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3, 0.75rem);
    padding: var(--spacing-3, 0.65rem) var(--spacing-4, 1rem);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-radius: var(--radius-lg, 0.5rem);
    font-size: var(--font-size-base, 0.95rem);
    font-weight: var(--font-weight-medium, 500);
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-2, 0.15rem);
}

.nav-menu-item:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
}

.nav-menu-item.active {
    background: rgba(255,255,255,0.95);
    color: var(--primary-600, #2d9eb8);
    font-weight: var(--font-weight-semibold, 600);
}

.nav-menu-item span.oi {
    font-size: 1.1rem;
}

/* ========= LOGIN PAGE ========= */
.login-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-500, #014aad) 0%, var(--primary-400, #049ee0) 100%);
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-8, 2rem);
}

.login-container {
    display: flex;
    max-width: 950px;
    width: 100%;
    min-height: 650px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl, 1.5rem);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    animation: fadeInScale 0.5s ease-out;
}

/* Left Panel */
.login-left-panel {
    width: 380px;
    background: linear-gradient(135deg, rgba(1,74,173,0.97) 0%, rgba(4,158,224,0.97) 100%);
    padding: var(--spacing-12, 3rem) var(--spacing-8, 2rem);
    display: flex;
    flex-direction: column;
    color: #fff;
    align-self: stretch;
}

.login-header {
    text-align: center;
    color: #fff;
    margin-bottom: var(--spacing-6, 1.5rem);
    flex-shrink: 0;
}

.login-logo {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--spacing-2, 0.5rem);
}

.login-header h1 {
    font-size: var(--font-size-2xl, 1.5rem);
    font-weight: var(--font-weight-bold, 700);
    margin: 0 0 var(--spacing-1, 0.25rem) 0;
}

.login-header p {
    font-size: var(--font-size-sm, 0.82rem);
    opacity: 0.9;
    margin: 0;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4, 0.85rem);
    flex: 1;
}

.feature-box {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl, 0.9rem);
    padding: var(--spacing-4, 1rem);
    display: flex;
    gap: var(--spacing-4, 0.85rem);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all var(--transition-base);
}

.feature-box:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-2px);
}

.feature-icon {
    background: rgba(255,255,255,0.35);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: var(--font-size-sm, 0.88rem);
    font-weight: var(--font-weight-semibold, 600);
    margin: 0 0 var(--spacing-1, 0.2rem) 0;
}

.feature-text p {
    font-size: var(--font-size-xs, 0.75rem);
    opacity: 0.85;
    margin: 0;
    line-height: 1.25;
}

/* Right Panel */
.login-right-panel {
    flex: 1;
    background: var(--surface, #fff);
    padding: var(--spacing-12, 3rem) var(--spacing-12, 3.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-box h2 {
    font-size: var(--font-size-3xl, 1.85rem);
    font-weight: var(--font-weight-bold, 700);
    color: var(--text-primary, #2d3748);
    margin: 0 0 var(--spacing-2, 0.5rem) 0;
}

.login-desc {
    font-size: var(--font-size-base, 0.95rem);
    color: var(--text-secondary, #718096);
    margin: 0 0 var(--spacing-8, 2rem) 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-400, #049ee0);
    font-size: 1.15rem;
}

.input-with-icon input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3.25rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    background: #f7fafc;
    transition: all 0.2s ease;
}

.input-with-icon input::placeholder {
    color: #a0aec0;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-400, #049ee0);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(4,158,224,0.15);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
}

.checkbox-label input {
    cursor: pointer;
    width: 1.1rem;
    height: 1.1rem;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-400, #049ee0);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, #014aad 0%, #049ee0 100%);
    color: #fff;
    border: none;
    border-radius: 0.85rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(68,190,221,0.25);
    transition: all 0.2s ease;
}

.login-button:hover {
    box-shadow: 0 6px 20px rgba(68,190,221,0.35);
    transform: translateY(-2px);
}

.signup-text {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: #718096;
}

.signup-text a {
    color: var(--primary-400, #049ee0);
    text-decoration: none;
    font-weight: 600;
}

.signup-text a:hover {
    text-decoration: underline;
}

/* ========= MAIN CONTENT SCROLLBAR ========= */
main::-webkit-scrollbar {
    width: 10px;
}

main::-webkit-scrollbar-track {
    background: #f0f4f8;
}

main::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 5px;
}

main::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========= MODAL OVERFLOW FIX ========= */
/* These styles help prevent modal content overflow */
.modal-body table {
    table-layout: fixed;
    width: 100%;
}

.modal-body table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.modal-body pre {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
}

/* Query Results Modal - responsive tables */
.query-result-table {
    width: 100% !important;
    table-layout: auto !important;
}

.query-result-table th {
    white-space: nowrap;
    min-width: 100px;
    background-color: #212529 !important;
    color: #fff !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #495057 !important;
}

.query-result-table td {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #dee2e6 !important;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 300px;
}

.query-result-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.query-result-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

/* Responsive modal for query results */
#queryResultsModal .modal-dialog {
    margin: 2.5vh auto;
}

#queryResultsModal .modal-content {
    max-height: 95vh;
}

#queryResultsModal .table-responsive {
    max-height: calc(95vh - 120px);
    overflow-x: auto;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    #queryResultsModal .modal-dialog {
        margin: 0;
        max-width: 100vw;
        height: 100vh;
    }
    
    #queryResultsModal .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    #queryResultsModal .table-responsive {
        max-height: calc(100vh - 120px);
    }
}

/* ========= DASHBOARD PAGE ========= */
.dashboard-wrapper {
    background: var(--bg-primary, #f0f4f8);
    padding: var(--spacing-6, 1.5rem) var(--spacing-8, 2rem);
}

/* Stats Grid - Using Bootstrap Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-6, 1.5rem);
    margin-bottom: var(--spacing-8, 2rem);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-4, 1rem);
    }
}

/* Stats Cards - Single Row (6 cards) */
.stats-grid-single-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-6, 1.5rem);
    margin-bottom: var(--spacing-8, 2rem);
}

@media (max-width: 1400px) {
    .stats-grid-single-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-single-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-4, 1rem);
    }
}

@media (max-width: 480px) {
    .stats-grid-single-row {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--surface, #fff);
    border-radius: var(--radius-xl, 1.25rem);
    padding: var(--spacing-6, 1.5rem);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color-light, rgba(87, 224, 196, 0.1));
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Legacy color classes - now use new component styles */
.stat-card.blue .stat-card-icon { color: #4da6ff; }
.stat-card.green .stat-card-icon { color: #4caf50; }
.stat-card.orange .stat-card-icon { color: #ff9800; }
.stat-card.purple .stat-card-icon { color: #9c27b0; }

/* Header tooltip icon */
.header-tooltip {
    display: inline-block;
    margin-left: 0.35rem;
    cursor: help;
    position: relative;
    color: #9aa5b5;
    vertical-align: middle;
    line-height: 1;
    z-index:9999 !important;
}

.header-tooltip .oi-info {
    font-size: 0.85rem;
}

.header-tooltip:hover {
    color: var(--primary-400, #049ee0);
}

.header-tooltip:hover .oi-info {
    color: var(--primary-400, #049ee0);
}

/* Tooltip content */
.header-tooltip[title] {
    position: relative;
}

.header-tooltip[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: #2d3748;
    color: #fff;
    font-size: 0.8rem;
    white-space: normal;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999 !important;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    max-width: 300px;
    min-width: 200px;
    text-align: left;
    line-height: 1.4;
    word-wrap: break-word;
    pointer-events: none;
}

.header-tooltip[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2d3748;
    z-index: 99999 !important;
}

.activity-table td {
    padding: 1rem;
    border-top: 1px solid #e8ecf1;
    color: #1a5268;
    font-size: 0.9rem;
}

.activity-table tbody tr:hover {
    background: #f8fafb;
}

/* Legacy status badges - migrate to new design */
.status-badge {
    padding: var(--spacing-2, 0.35rem) var(--spacing-4, 0.85rem);
    border-radius: var(--radius-full, 1rem);
    font-size: var(--font-size-xs, 0.8rem);
    font-weight: var(--font-weight-semibold, 600);
    display: inline-block;
}

.status-badge.success {
    background: var(--success-light, #d4f4dd);
    color: var(--success-dark, #1e7e34);
}

.status-badge.info {
    background: var(--info-light, #d1ecf9);
    color: var(--info-dark, #0c5460);
}

.status-badge.warning {
    background: var(--warning-light, #fff3cd);
    color: var(--warning-dark, #856404);
}

/* Color variations for stat cards */
.stat-card.blue .stat-card-icon { color: #4da6ff; }
.stat-card.green .stat-card-icon { color: #4caf50; }
.stat-card.orange .stat-card-icon { color: #ff9800; }
.stat-card.purple .stat-card-icon { color: #9c27b0; }

/* ========= PROFILE PAGE ========= */
.profile-avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500, #014aad) 0%, var(--primary-400, #049ee0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-primary);
}

.profile-avatar-icon {
    font-size: 4rem;
    color: #fff;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3, 0.75rem);
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-2, 0.5rem) 0;
    border-bottom: 1px solid var(--border-color-light, #f0f4f8);
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-size: var(--font-size-sm, 0.9rem);
    color: var(--text-secondary, #6b7a8f);
    font-weight: var(--font-weight-medium, 500);
}

.profile-info-value {
    font-size: var(--font-size-sm, 0.9rem);
    color: var(--text-primary, #1a5268);
    font-weight: var(--font-weight-semibold, 600);
}

/* ========= PAGINATION ========= */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6b7a8f;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-controls .btn {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 500;
}

.pagination-controls .btn-primary {
    background: linear-gradient(135deg, #014aad, #049ee0);
    border: none;
    color: #fff;
}

.pagination-controls .btn-outline-secondary {
    border-color: #cbd5e0;
    color: #6b7a8f;
}

.pagination-controls .btn-outline-secondary:hover:not(:disabled) {
    background: #f7fafc;
    border-color: var(--primary-400, #049ee0);
    color: var(--primary-400, #049ee0);
}

.pagination-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========= CODE EDITOR ========= */
.code-editor {
    font-family: var(--font-family-mono, 'Consolas', 'Monaco', 'Courier New', monospace);
    font-size: var(--font-size-sm, 0.9rem);
    background: var(--bg-tertiary, #f8f9fa);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-lg, 0.5rem);
    line-height: var(--line-height-relaxed, 1.6);
    tab-size: 4;
}

.code-editor:focus {
    background: var(--surface, #fff);
    border-color: var(--primary-400, #049ee0);
    box-shadow: 0 0 0 0.2rem rgba(4,158,224,0.15);
}

/* ========= FORM SWITCHES ========= */
/* Only apply to form-switch, not regular checkboxes */
.form-check.form-switch .form-check-input,
.form-switch .form-check-input {
    width: 3rem !important;
    height: 1.5rem !important;
    cursor: pointer;
    border: 2px solid #ced4da;
    background-color: #ced4da;
    transition: all 0.3s ease;
}

.form-check.form-switch .form-check-input:checked,
.form-switch .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.form-check.form-switch .form-check-input:focus,
.form-switch .form-check-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,0.25);
}

.form-check.form-switch .form-check-input:not(:checked):focus,
.form-switch .form-check-input:not(:checked):focus {
    border-color: #ced4da;
    box-shadow: 0 0 0 0.2rem rgba(206,212,218,0.25);
}

/* Keep original switch styling for other pages */
.form-check-input:checked {
    background-color: var(--primary-400, #049ee0);
    border-color: var(--primary-400, #049ee0);
}

.form-check-input:focus {
    border-color: var(--primary-400, #049ee0);
    box-shadow: 0 0 0 0.2rem rgba(4,158,224,0.15);
}

/* Switch icon (checkmark next to switch) */
.switch-icon {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
}

/* Switch info icon (small i icon in description) */
.switch-info-icon {
    font-size: 0.75rem;
    color: #9aa5b5;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* ========= QUERY BUILDER ========= */
.table-item-btn {
    transition: all 0.2s ease !important;
}

.table-item-btn:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
    transform: translateX(3px);
    border-color: #6c757d !important;
}

.table-item-btn:hover strong {
    color: #212529 !important;
}

.table-item-btn:hover .text-primary {
    color: #0d6efd !important;
}

.table-item-btn:active {
    transform: translateX(1px);
    background-color: #dee2e6 !important;
}

.table-item-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

/* ========= MOBILE/TABLET WARNING BANNER ========= */
.mobile-warning-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Show banner only on mobile and tablet (portrait) */
@media (max-width: 991.98px) {
    .mobile-warning-banner {
        display: block !important;
    }
}

/* Hide banner on landscape tablets and larger screens */
@media (min-width: 992px) {
    .mobile-warning-banner {
        display: none !important;
    }
}

/* Adjust main content margin on mobile to account for banner */
@media (max-width: 991.98px) {
    main {
        margin-left: 0 !important;
    }
}

/* ========= CODEMIRROR STYLES ========= */
.CodeMirror {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 14px;
    height: auto;
    min-height: 200px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: #272822;
    color: #f8f8f2;
}

.CodeMirror-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    z-index: 9999;
    border-radius: 0;
}

.CodeMirror-focused {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.CodeMirror-scroll {
    min-height: 200px;
    max-height: 600px;
}

/* Source Query Editor - taller */
#sourceQueryTextarea + .CodeMirror {
    min-height: 300px;
}

/* Target Query Editor - shorter */
#targetInsertQueryTextarea + .CodeMirror {
    min-height: 200px;
}

/* CodeMirror line numbers */
.CodeMirror-linenumber {
    color: #6c757d;
    padding: 0 8px;
}

.CodeMirror-gutters {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.CodeMirror-linenumber {
    min-width: 3em;
}

/* CodeMirror cursor */
.CodeMirror-cursor {
    border-left: 2px solid #212529;
}

/* CodeMirror selected text */
.CodeMirror-selected {
    background: #b3d4fc !important;
}

/* CodeMirror active line */
.CodeMirror-activeline-background {
    background: rgba(0, 0, 0, 0.05);
}

/* CodeMirror hint dropdown - Enhanced */
.CodeMirror-hints {
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    color: #f8f8f2;
}

.CodeMirror-hint {
    padding: 6px 12px;
    cursor: pointer;
    color: #f8f8f2;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.CodeMirror-hint:hover {
    background: #2d2d2d;
    border-left-color: #0d6efd;
}

.CodeMirror-hint-active {
    background: #0d6efd !important;
    color: white !important;
    border-left-color: #0056b3;
}

/* CodeMirror fold gutter */
.CodeMirror-foldgutter {
    width: 1.2em;
}

.CodeMirror-foldgutter-open,
.CodeMirror-foldgutter-folded {
    cursor: pointer;
    color: #888;
}

.CodeMirror-foldgutter-open:after {
    content: "\25BE";
}

.CodeMirror-foldgutter-folded:after {
    content: "\25B8";
}

/* CodeMirror selection matches */
.CodeMirror-selected {
    background: #49483e !important;
}

.CodeMirror-focused .CodeMirror-selected {
    background: #49483e !important;
}

/* CodeMirror scrollbar matches */
.CodeMirror-scrollbar-filler {
    background: #272822;
}

/* CodeMirror trailing spaces */
.CodeMirror-trailingspace {
    background: rgba(255, 0, 0, 0.2);
    border-bottom: 1px dotted rgba(255, 0, 0, 0.5);
}

/* Responsive CodeMirror */
@media (max-width: 768px) {
    .CodeMirror {
        font-size: 12px;
    }
    
    #sourceQueryTextarea + .CodeMirror {
        min-height: 250px;
    }
    
    #targetInsertQueryTextarea + .CodeMirror {
        min-height: 150px;
    }
}
