/*
================================================================
*
* 1. GLOBAL & RESET STYLES
* (Definisi Root, Reset CSS, Body, Font)
*
================================================================
*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --sidebar-bg: #1a202c;
    --sidebar-text: #a0aec0;
    --sidebar-active-bg: #2d3748;
    --sidebar-active-text: #ffffff;
    --sidebar-hover-bg: #2c3344;
    --main-bg: #f7fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --primary-color: #4299e1;
    --primary-hover: #2b6cb0;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ecc94b;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --monospace-font: 'Fira Code', 'Courier New', monospace;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
.is-hidden { display: none !important; }

/*
================================================================
*
* 2. APP LAYOUT & NAVIGATION
* (Sidebar, Main Content, Halaman Tool)
*
================================================================
*/
.app-layout { display: flex; min-height: 100vh; }
.sidebar { 
    width: 260px; 
    background-color: var(--sidebar-bg); 
    color: var(--sidebar-text); 
    display: flex; 
    flex-direction: column; 
    transition: width 0.3s ease; 
    flex-shrink: 0; 
    height: 100vh; 
    position: sticky; 
    top: 0; 
}
.sidebar-header { 
    padding: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--sidebar-active-text); 
    border-bottom: 1px solid #2d3748; 
    flex-shrink: 0;
}
.sidebar-nav { overflow-y: auto; flex-grow: 1; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav .nav-item a { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; text-decoration: none; color: var(--sidebar-text); font-weight: 500; transition: all 0.2s ease; white-space: nowrap; }
.sidebar-nav .nav-item a i { font-size: 1rem; flex-shrink: 0; }
.sidebar-nav .nav-item a:hover { background-color: var(--sidebar-hover-bg); color: var(--sidebar-active-text); }
.sidebar-nav .nav-item.active a { background-color: var(--sidebar-active-bg); color: var(--sidebar-active-text); border-left: 3px solid var(--primary-color); padding-left: calc(1.5rem - 3px); }
.main-content { flex-grow: 1; padding: 2.5rem; overflow-y: auto; }
.tool-page { display: none; }
.tool-page.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/*
================================================================
*
* 3. GENERAL COMPONENTS
* (Card, Header, Button, Input, Label, Grid, Flex)
*
================================================================
*/
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); padding: 2rem; }
.tool-header { margin-bottom: 2rem; }
.tool-header h1 { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.tool-header p { font-size: 1.1rem; color: var(--text-secondary); }
.grid { display: grid; gap: 1.5rem; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; gap: 1rem; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.25rem; border: 1px solid transparent; border-radius: 6px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; text-align: center; text-decoration: none; }
.button.primary { background-color: var(--primary-color); color: white; border-color: var(--primary-color);}
.button.primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }
.button.secondary { background-color: #edf2f7; color: var(--text-primary); border-color: #d2dae7;}
.button.secondary:hover { background-color: #e2e8f0; }
.button.success { background-color: var(--success-color); color: white; border-color: var(--success-color); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.textarea, .select, .input { width: 100%; padding: 0.75rem; border: 1px solid var(--card-border); border-radius: 6px; font-size: 1rem; font-family: inherit; background-color: #fff; color: var(--text-primary); }
.textarea:focus, .select:focus, .input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5); }
.label { font-weight: 600; margin-bottom: 0.5rem; display: block;}
.textarea-editor { font-family: var(--monospace-font); }

/*
================================================================
*
* 4. TOOL-SPECIFIC STYLES
*
================================================================
*/

/* --- 4.1. JSON Formatter --- */
#JsonFormatter .editor-wrapper { display: flex; border: 1px solid #444; border-radius: 6px; background-color: #2d3748; height: 70vh; overflow: hidden; }
#JsonFormatter .line-numbers { width: 50px; padding: 12px 10px 12px 0; font-size: 0.9em; text-align: right; color: #a0aec0; background-color: #1a202c; user-select: none; border-right: 1px solid #444; }
#JsonFormatter .line-numbers span { display: block; }
#JsonFormatter .textarea-editor, #JsonFormatter .pre-editor { width: 100%; border: none !important; box-shadow: none !important; resize: none; padding: 12px; background: transparent; color: #e2e8f0; overflow-y: scroll; }
#JsonFormatter .textarea-editor::placeholder { color: #718096; }
#JsonFormatter .json-key { color: #63b3ed; } 
#JsonFormatter .json-string { color: #f6ad55; } 
#JsonFormatter .json-number { color: #d53f8c; } 
#JsonFormatter .json-boolean { color: #f56565; } 
#JsonFormatter .json-null { color: #b794f4; }
#JsonFormatter .json-error { color: #fbd38d; font-weight: bold;}

/* --- 4.2. JSON Compare --- */
#JsonCompare .textarea-editor { background-color: #fdfdfd; border: 1px solid var(--card-border); color: var(--text-primary); }
#JsonCompare .diff-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 1.5rem; align-items: start; }
#JsonCompare .diff-view { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; }
#JsonCompare .diff-pane-header { padding: 0.5rem 1rem; background-color: #edf2f7; font-weight: 600; border-bottom: 1px solid var(--card-border); text-align: center; }
#JsonCompare .diff-output { margin: 0; padding: 0; font-family: var(--monospace-font); font-size: 0.9rem; overflow-y: auto; height: 60vh; color: var(--text-primary); }
#JsonCompare .diff-line { display: flex; border-top: 1px solid #e2e8f0; }
#JsonCompare .diff-line:first-child { border-top: none; }
#JsonCompare .line-number { width: 45px; padding: 2px 10px 2px 0; text-align: right; color: var(--text-secondary); flex-shrink: 0; user-select: none; }
#JsonCompare .line-content { padding: 2px 10px; white-space: pre-wrap; word-break: break-all; flex-grow: 1; }
#JsonCompare .diff-line.context { background-color: #fff; }
#JsonCompare .diff-line.context .line-number { background-color: #f7fafc; }
#JsonCompare .diff-line.removed { background-color: #fff5f5; }
#JsonCompare .diff-line.removed .line-number { background-color: #fed7d7; }
#JsonCompare .diff-line.added { background-color: #f0fff4; }
#JsonCompare .diff-line.added .line-number { background-color: #c6f6d5; }
#JsonCompare .diff-line.changed { background-color: #fffbea; }
#JsonCompare .diff-line.changed .line-number { background-color: #fef3c7; }
#JsonCompare .diff-line .highlight { background-color: #fce566; border-radius: 3px; font-weight: 600; }
#JsonCompare .diff-line.placeholder { background-color: #f8f9fa; }
#JsonCompare .diff-summary-sidebar { height: calc(60vh + 42px); overflow-y: auto; }
#JsonCompare .summary-list .summary-list-item { padding: 0.75rem; border: 1px solid var(--card-border); border-radius: 6px; margin-bottom: 0.5rem; font-size: 0.85rem; }
#JsonCompare .summary-list .clickable-summary { cursor: pointer; transition: background-color 0.2s ease; }
#JsonCompare .summary-list .clickable-summary:hover { background-color: #ebf8ff; }
#JsonCompare .summary-list .item-added { border-left: 4px solid var(--success-color); }
#JsonCompare .summary-list .item-removed { border-left: 4px solid var(--danger-color); }
#JsonCompare .summary-list .item-changed { border-left: 4px solid var(--warning-color); }
#JsonCompare .summary-list code { font-size: 0.8rem; color: var(--text-secondary); display: block; margin-top: 0.25rem; }
#JsonCompare .line-highlighted { transition: background-color 0.5s ease-in-out; background-color: #ebf8ff !important; }

/* --- 4.3. Universal Tool Styles (Table, Image Upload, etc.) --- */
.results-table-wrapper { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th, .results-table td { padding: 0.75rem 1rem; border: 1px solid var(--card-border); text-align: left; font-size: 0.9rem;}
.results-table thead { background-color: #edf2f7; }
.image-upload-box { border: 2px dashed var(--card-border); border-radius: 8px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: all 0.3s; cursor: pointer; color: var(--text-secondary); }
.image-upload-box:hover { border-color: var(--primary-color); background-color: #ebf8ff; }
.image-upload-box.has-image img { display: block; max-height: 250px; border-radius: 4px;}
.image-upload-box.has-image .upload-area { display: none; }
.image-comparison-view { position: relative; width: 100%; padding-top: 56.25%; background-color: #2d3748; border-radius: 8px; }
.image-comparison-view img { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; object-fit: contain; transform: translate(-50%, -50%);}
.pdf-viewer-wrapper { height: 75vh; overflow: auto; background-color: #edf2f7; border-radius: 8px; padding: 1rem; cursor: pointer; border: 1px solid var(--card-border); }
.upload-prompt { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; color: var(--text-secondary); }

/*
================================================================
*
* 5. HELPER & MISCELLANEOUS STYLES
* (Checkbox, Spinner, Toast Notifications)
*
================================================================
*/
.checkbox-label {
    width: 100%;
    transition: all 0.2s ease-in-out;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.checkbox-input:checked + .checkbox-label {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    font-weight: 600;
}
.loader-spinner { width: 20px; height: 20px; border: 3px solid var(--card-border); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 8px; background-color: var(--success-color); color: white; font-weight: 500; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, bottom 0.3s; z-index: 1000; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.toast.error { background-color: var(--danger-color); }
.toast.show { opacity: 1; visibility: visible; bottom: 40px; }


/*
================================================================
*
* 6. ADVANCED DOCUMENT COMPARE (REVISED & FINAL)
*
================================================================
*/
.adv-compare-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 5rem);
    background-color: #f0f2f5;
}

.adv-compare-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.toolbar-title {
    font-weight: 500;
    color: var(--text-secondary);
}
.sync-scroll-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.sync-scroll-toggle .switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: background-color 0.2s;
}
.sync-scroll-toggle .switch::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}
.sync-scroll-toggle input:checked + .switch {
    background-color: var(--primary-color);
}
.sync-scroll-toggle input:checked + .switch::before {
    transform: translateX(14px);
}

.adv-compare-main {
    display: flex;
    flex-grow: 1;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
}

.pdf-viewer-area {
    display: flex;
    flex-grow: 1;
    gap: 1.5rem;
    width: 65%;
}

.pdf-viewer-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* --- PERBAIKAN FINAL UNTUK STACKING LAYER --- */
.pdf-page-wrapper {
    position: relative; /* Menjadi acuan untuk elemen di dalamnya */
    margin: 0 auto 1rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 0; /* Mencegah spasi aneh di bawah PDF */
}

/* Keduanya dibuat absolute agar menumpuk di titik yang sama */
.pdf-canvas,
.highlight-layer {
    position: absolute;
    top: 0;
    left: 0;
}

.pdf-canvas {
    z-index: 1; /* PDF di lapisan bawah */
}

.highlight-layer {
    z-index: 2; /* Warna di lapisan atas */
    pointer-events: none; /* Lapisan warna tidak bisa di-klik */
}

.highlight-area {
    position: absolute;
}
/* --- AKHIR PERBAIKAN --- */


.highlight-area.removed {
    background-color: rgba(229, 62, 62, 0.5); /* Merah transparan */
}

.highlight-area.added {
    background-color: rgba(56, 161, 105, 0.5); /* Hijau transparan */
}

.pdf-viewer-content {
    flex-grow: 1;
    overflow: auto;
    background-color: #e9ecef;
    position: relative;
    padding-top: 1rem;
}
.pdf-viewer-content .upload-prompt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    cursor: pointer;
}
.pdf-viewer-content .upload-prompt i { color: #ced4da; }

.pane-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.change-report-sidebar {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
}
.sidebar-header { padding: 1rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--card-border);}
.sidebar-search { padding: 0.75rem 1rem; border-bottom: 1px solid var(--card-border); position: relative; }
.sidebar-search input { width: 100%; padding: 0.5rem 0.5rem 0.5rem 2rem; border-radius: 6px; border: 1px solid var(--card-border); }
.sidebar-search i { position: absolute; top: 50%; left: 1.5rem; transform: translateY(-50%); color: var(--text-secondary); }
.sidebar-body { flex-grow: 1; overflow-y: auto; padding: 0.5rem; }

.change-card {
    border: 1px solid var(--card-border);
    border-radius: 6px;
    margin: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.change-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.change-card-header { display: flex; justify-content: space-between; padding: 0.5rem 0.75rem; background-color: #f7fafc; border-bottom: 1px solid var(--card-border); color: var(--text-secondary); }
.change-card-body .text-block { padding: 0.75rem; }
.change-card-body .text-block span { font-weight: 600; display: block; margin-bottom: 0.25rem; }
.change-card-body .text-block p { margin: 0; word-wrap: break-word; line-height: 1.4; }
.text-block.old { background-color: #fff5f5; }
.text-block.old span { color: #c53030; }
.text-block.new { background-color: #f0fff4; }
.text-block.new span { color: #2f855a; }

.text-block.old .highlight-word {
    background-color: rgba(254, 178, 178, 0.7);
    border-radius: 3px;
    padding: 1px 0;
    font-weight: 600;
}
.text-block.new .highlight-word {
    background-color: rgba(154, 230, 180, 0.7);
    border-radius: 3px;
    padding: 1px 0;
    font-weight: 600;
}

/* --- 2.1. Sidebar Navigation Groups --- */
.sidebar-nav .nav-group-header {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #a0aec0; /* --sidebar-text color */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav .nav-group-header:not(:first-child) {
    border-top: 1px solid #2d3748;
    margin-top: 0.5rem;
    padding-top: 1.5rem;
}

/* --- Sidebar Footer & Toggle --- */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #2d3748;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}
#sidebar-toggle {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.3s ease;
}
#sidebar-toggle:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-active-text);
}

/* --- Minimized Sidebar Styles --- */
.sidebar.minimized {
    width: 80px;
}
.sidebar.minimized .sidebar-header h2,
.sidebar.minimized .sidebar-nav .nav-item span,
.sidebar.minimized .nav-group-header span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.sidebar.minimized .sidebar-header {
    justify-content: center;
}
.sidebar.minimized .nav-item a {
    justify-content: center;
    padding: 1rem;
}
.sidebar.minimized .nav-item.active a {
    padding-left: calc(1rem - 3px);
}
.sidebar.minimized .nav-group-header {
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid #2d3748;
}
.sidebar.minimized .nav-group-header::before {
    content: "...";
    font-weight: bold;
    color: var(--sidebar-text);
}
.sidebar.minimized .sidebar-footer {
    justify-content: center;
}
.sidebar.minimized #sidebar-toggle i {
    transform: rotate(180deg);
}

/*
================================================================
*
* 7. BRANCH DATA PROCESSOR STYLES
*
================================================================
*/
.table-container {
    max-height: 45vh;
    overflow-y: auto;
}
#original-data-head, #processed-data-head {
    position: sticky;
    top: 0;
}
#original-data-head { background-color: #f7fafc; }
#processed-data-head { background-color: #f0fff4; }
.text-red-500 { color: var(--danger-color); }
.font-semibold { font-weight: 600; }
.lg-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.md-grid-cols-3 {
     grid-template-columns: repeat(3, minmax(0, 1fr));
}
.border {
    border: 1px solid var(--card-border);
}
.rounded-lg {
    border-radius: 8px;
}
.bg-gray-50 {
    background-color: #f7fafc;
}
.p-4 { padding: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.h-5 { height: 1.25rem; }
.text-gray-500 { color: var(--text-secondary); }
.text-green-600 { color: var(--success-color); }
.text-xl { font-size: 1.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
/*
===============================================================
SQL SCRIPT GENERATOR (OTOMATIS) STYLES
*
================================================================
*/
#SqlScriptGeneratorOtomatis .detected-value {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}
#SqlScriptGeneratorOtomatis .tooltip-cell {
    position: relative;
}
#SqlScriptGeneratorOtomatis .tooltip-cell[data-full-value]:hover::after {
    content: attr(data-full-value);
    position: absolute;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 10;
    white-space: pre-wrap;
    max-width: 500px;
    word-break: break-all;
    left: 50%;
    transform: translateX(-50%);
    bottom: 125%;
}
#SqlScriptGeneratorOtomatis .json-subkey-row > td:first-child {
    padding-left: 2.5rem;
}
#SqlScriptGeneratorOtomatis .json-key-code {
    background-color: #f0fdf4;
    color: #166534;
}
#SqlScriptGeneratorOtomatis .json-main-row {
    background-color: #dcfce7;
    font-weight: 600;
}
/* Mengatasi potensi konflik dengan Tailwind dari CDN */
#SqlScriptGeneratorOtomatis .bg-white { background-color: #ffffff; }
#SqlScriptGeneratorOtomatis .bg-gray-100 { background-color: #f7fafc; }
#SqlScriptGeneratorOtomatis .p-6 { padding: 1.5rem; }
#SqlScriptGeneratorOtomatis .md\:p-8 { padding: 2rem; }
#SqlScriptGeneratorOtomatis .rounded-xl { border-radius: 0.75rem; }
#SqlScriptGeneratorOtomatis .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
#SqlScriptGeneratorOtomatis .text-3xl { font-size: 1.875rem; }
#SqlScriptGeneratorOtomatis .font-bold { font-weight: 700; }
#SqlScriptGeneratorOtomatis .text-gray-800 { color: var(--text-primary); }
#SqlScriptGeneratorOtomatis .mb-6 { margin-bottom: 1.5rem; }
#SqlScriptGeneratorOtomatis .text-center { text-align: center; }
#SqlScriptGeneratorOtomatis .bg-blue-50 { background-color: #ebf8ff; }
#SqlScriptGeneratorOtomatis .border-l-4 { border-left-width: 4px; }
#SqlScriptGeneratorOtomatis .border-blue-400 { border-color: #63b3ed; }
#SqlScriptGeneratorOtomatis .text-blue-800 { color: #2c5282; }
#SqlScriptGeneratorOtomatis .list-decimal { list-style-type: decimal; }
#SqlScriptGeneratorOtomatis .list-inside { list-style-position: inside; }
#SqlScriptGeneratorOtomatis .text-sm { font-size: 0.875rem; }
#SqlScriptGeneratorOtomatis .text-blue-700 { color: #2b6cb0; }
#SqlScriptGeneratorOtomatis .mt-2 { margin-top: 0.5rem; }
#SqlScriptGeneratorOtomatis .space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
#SqlScriptGeneratorOtomatis .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#SqlScriptGeneratorOtomatis .gap-6 { gap: 1.5rem; }
#SqlScriptGeneratorOtomatis .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
#SqlScriptGeneratorOtomatis .block { display: block; }
#SqlScriptGeneratorOtomatis .text-lg { font-size: 1.125rem; }
#SqlScriptGeneratorOtomatis .font-semibold { font-weight: 600; }
#SqlScriptGeneratorOtomatis .text-gray-700 { color: #4a5568; }
#SqlScriptGeneratorOtomatis .mb-2 { margin-bottom: 0.5rem; }
#SqlScriptGeneratorOtomatis .w-full { width: 100%; }
#SqlScriptGeneratorOtomatis .h-48 { height: 12rem; }
#SqlScriptGeneratorOtomatis .p-3 { padding: 0.75rem; }
#SqlScriptGeneratorOtomatis .font-mono { font-family: var(--monospace-font); }
#SqlScriptGeneratorOtomatis .mt-3 { margin-top: 0.75rem; }
#SqlScriptGeneratorOtomatis .bg-blue-600 { background-color: #3182ce; }
#SqlScriptGeneratorOtomatis .text-white { color: #ffffff; }
#SqlScriptGeneratorOtomatis .px-4 { padding-left: 1rem; padding-right: 1rem; }
#SqlScriptGeneratorOtomatis .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
#SqlScriptGeneratorOtomatis .hover\:bg-blue-700:hover { background-color: #2b6cb0; }
#SqlScriptGeneratorOtomatis .transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
#SqlScriptGeneratorOtomatis .duration-200 { transition-duration: 200ms; }
#SqlScriptGeneratorOtomatis .file\:mr-4 { margin-right: 1rem; }
#SqlScriptGeneratorOtomatis .file\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
#SqlScriptGeneratorOtomatis .file\:px-4 { padding-left: 1rem; padding-right: 1rem; }
#SqlScriptGeneratorOtomatis .file\:border-0 { border-width: 0; }
#SqlScriptGeneratorOtomatis .file\:bg-blue-50 { background-color: #ebf8ff; }
#SqlScriptGeneratorOtomatis .file\:text-blue-700 { color: #2b6cb0; }
#SqlScriptGeneratorOtomatis .hover\:file\:bg-blue-100:hover { background-color: #bee3f8; }
#SqlScriptGeneratorOtomatis .cursor-pointer { cursor: pointer; }
#SqlScriptGeneratorOtomatis .max-h-96 { max-height: 24rem; }
#SqlScriptGeneratorOtomatis .overflow-y-auto { overflow-y: auto; }
#SqlScriptGeneratorOtomatis .sticky { position: sticky; }
#SqlScriptGeneratorOtomatis .top-0 { top: 0; }
#SqlScriptGeneratorOtomatis .z-10 { z-index: 10; }
#SqlScriptGeneratorOtomatis .bg-green-600 { background-color: #38a169; }
#SqlScriptGeneratorOtomatis .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
#SqlScriptGeneratorOtomatis .hover\:bg-green-700:hover { background-color: #2f855a; }
#SqlScriptGeneratorOtomatis .mt-8 { margin-top: 2rem; }
#SqlScriptGeneratorOtomatis .justify-between { justify-content: space-between; }
#SqlScriptGeneratorOtomatis .items-center { align-items: center; }
#SqlScriptGeneratorOtomatis .text-2xl { font-size: 1.5rem; }
#SqlScriptGeneratorOtomatis .bg-gray-200 { background-color: #edf2f7; }
#SqlScriptGeneratorOtomatis .hover\:bg-gray-300:hover { background-color: #e2e8f0; }
#SqlScriptGeneratorOtomatis .h-80 { height: 20rem; }
#SqlScriptGeneratorOtomatis .text-green-600 { color: var(--success-color); }
#SqlScriptGeneratorOtomatis .hidden { display: none; }

/*
================================================================
*
* 8. SQL SCRIPT GENERATOR (OTOMATIS) - CUSTOM DROPDOWN
*
================================================================
*/
.custom-select-container {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    background-color: white;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem; /* text-sm */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-right: 2rem;
}
.custom-select-trigger::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    color: #6b7280; /* text-gray-500 */
}
.custom-select-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    z-index: 50;
}
.custom-select-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
    outline: none;
}
.custom-select-options {
    list-style: none;
    padding: 0;
    margin: 0;
}
.custom-select-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.custom-select-option:hover {
    background-color: #f3f4f6; /* bg-gray-100 */
}
.custom-select-group {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; /* font-semibold */
    color: #4b5563; /* text-gray-600 */
    background-color: #f9fafb; /* bg-gray-50 */
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}