/* GLOBAL */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #020617;
    color: #e2e8f0;
}

/* LOGIN PAGE */
.login-page {
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #111827, #020617);
}

.login-box {
    background: #0f172a;
    padding: 30px;
    border-radius: 16px;
    width: 340px;
    box-shadow: 0 20px 40px rgba(15,23,42,0.8);
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #38bdf8;
    text-align: center;
}

.input {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e2e8f0;
    outline: none;
}

.input:focus {
    border-color: #38bdf8;
}

.btn-primary {
    width: 100%;
    padding: 10px 12px;
    background: linear-gradient(90deg,#6366f1,#3b82f6);
    border: none;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
}

.error {
    padding: 10px;
    background: #b91c1c;
    color: #fee2e2;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* LAYOUT PANEL */
.panel-layout {
    display: flex;
    min-height: 100vh;
    background: #020617;
}

/* SIDEBAR */
.sidebar {
    width: 230px;
    background: #020617;
    border-right: 1px solid #1e293b;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 20px;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #facc15, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 800;
    font-size: 18px;
}

.sidebar-logo-text {
    font-weight: 700;
    color: #e5e7eb;
}

.sidebar-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6b7280;
    padding: 6px 10px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: #111827;
    color: #e5e7eb;
}

/* MAIN AREA */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 56px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(15,23,42,0.9);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.topbar-title {
    font-weight: 600;
}

.topbar-right a {
    color: #f97373;
    text-decoration: none;
    font-size: 0.9rem;
}

.topbar-right a:hover {
    text-decoration: underline;
}

/* CONTENT */
.content {
    padding: 20px;
}

.card {
    background: #020617;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 30px rgba(15,23,42,0.8);
}

.card h3 {
    margin-top: 0;
    color: #e5e7eb;
}

/* BUTTONS & INPUTS */
button {
    font-family: inherit;
}

.btn-secondary {
    padding: 8px 14px;
    background: #111827;
    color: #e5e7eb;
    border-radius: 999px;
    border: 1px solid #1f2937;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #1f2937;
}

.msg {
    padding: 10px 12px;
    background: #064e3b;
    color: #bbf7d0;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* TEXTAREA DENGAN LINE NUMBER */
.lined-textarea {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1f2937;
    background: #020617;
}

.line-numbers {
    width: 40px;
    padding: 10px 6px;
    background: #020617;
    color: #6b7280;
    border-right: 1px solid #1f2937;
    text-align: right;
    font-size: 0.8rem;
}

.line-numbers span {
    display: block;
    height: 20px;
}

.textarea-box {
    width: calc(100% - 40px);
    background: #020617;
    border: none;
    padding: 10px;
    color: #e5e7eb;
    outline: none;
    resize: vertical;
    font-size: 0.85rem;
    font-family: "JetBrains Mono", Consolas, monospace;
}

/* HIGHLIGHT LINE NUMBERS ERROR */
.line-error {
    color: #f97373;
    font-weight: 600;
}

/* TEXTAREA BORDER ERROR */
.textarea-error {
    border-color: #b91c1c !important;
}

/* FORM ITEMS */
label {
    font-size: 0.85rem;
    color: #9ca3af;
}

select, input[type="text"] {
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 8px 10px;
    color: #e5e7eb;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: #38bdf8;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .panel-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #1e293b;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .sidebar-logo {
        padding-bottom: 0;
    }
    .sidebar-section-title,
    .sidebar-nav {
        display: none;
    }
}
