/* MINIMALIST & BARE-BONES THEME */
:root {
    --text-color: #111;
    --border-color: #ddd;
    --bg-color: #fafafa;
    --primary: #333;
    --danger: #cc0000;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.navbar a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}
.navbar a:hover, .navbar a.active {
    background: #e5e5e5;
}

.container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: flex-start;
}

.sql-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    background: #fff;
    border-radius: 4px;
}

.sql-code {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    line-height: 1.4;
    margin: 0;
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid #333;
}
.sql-code:focus {
    outline: none;
    border-color: #555;
}

/* Form Styles */
.card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #555;
}

input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.9rem;
}

input:focus {
    outline: none;
    border-color: #888;
}

small {
    font-size: 0.7rem;
    color: #888;
}

button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.9rem;
    cursor: pointer;
}

button:hover {
    background-color: #000;
}

/* Table Styles */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.icon-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
}

.icon-btn:hover {
    background: #eee;
    color: #000;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background-color: #f9f9f9;
}


.btn-delete {
    background-color: transparent;
    color: var(--danger);
    padding: 0;
    font-weight: bold;
    font-size: 0.85rem;
}

.btn-delete:hover {
    background-color: transparent;
    color: #990000;
    text-decoration: underline;
}

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

.message {
    margin-top: 1rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    display: none;
}

.message.success {
    display: block;
    color: #006600;
}

.message.error {
    display: block;
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sql-container {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .form-group {
        margin-bottom: 1rem;
    }
}

/* Documentation Box Utility (API & Scripts) */
.doc-box {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
    border: none;
    margin-bottom: 1.5rem;
}
.doc-title {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: #333;
}
.doc-code {
    min-height: auto;
}

.global-clock {
    position: absolute;
    right: 2rem;
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    background: #e9ecef;
    border: 1px solid #ced4da;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
/* Modal Panduan */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 6px;
    width: 350px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #111;
}
.modal-link {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background 0.2s;
}
.modal-link:hover {
    background: #e9ecef;
}
.btn-panduan {
    position: absolute;
    right: 10.5rem; 
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.btn-panduan:hover {
    background: #111;
}
.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
}
.close-modal:hover {
    color: #333;
}
