:root {
    --bg-main: #181a1f;
    --bg-card: #22262e;
    --bg-acad: #101214;
    --border-color: #343a46;
    --text-main: #e6e8ec;
    --text-muted: #9aa1b2;
    --accent-red: #d9383a; /* Khas ikon AutoCAD */
    --accent-blue: #2b7de9;
    --accent-green: #2ea043;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #232730 0%, #15171c 100%);
    border-bottom: 3px solid var(--accent-red);
    padding: 2rem 1rem;
    text-align: center;
}

.badge {
    display: inline-block;
    background-color: rgba(217, 56, 58, 0.2);
    color: #ff6b6d;
    border: 1px solid var(--accent-red);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.app-header h1 {
    font-size: 2rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Navigasi Tab */
.tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #1e2229;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #ffffff;
    border-bottom: 3px solid var(--accent-red);
    background-color: rgba(217, 56, 58, 0.1);
}

/* Container & Layout */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card h2 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--accent-red);
    padding-left: 0.75rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.styled-list, .sub-box ul {
    padding-left: 1.5rem;
}

.styled-list li, .sub-box li {
    margin-bottom: 0.5rem;
}

.sub-box {
    margin-bottom: 1rem;
}

.sub-box h3 {
    font-size: 1rem;
    color: #ff8587;
    margin-bottom: 0.3rem;
}

/* Tabel Materi & Simulasi */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

th {
    background-color: #191c22;
    color: var(--text-muted);
    font-weight: 600;
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid #555;
}

.line-preview {
    width: 100px;
    height: 10px;
}

/* Stepper Langkah Kerja */
.stepper-container {
    background-color: #1b1e24;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.step-indicator {
    font-weight: bold;
    color: #ff8587;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #2c313c;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-red);
    width: 12.5%;
    transition: width 0.3s ease;
}

.step-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-height: 180px;
}

.step-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.step-tag {
    display: inline-block;
    background-color: #2c313c;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    color: #6cb6ff;
    margin-top: 0.8rem;
}

.step-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* Tombol */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn.primary {
    background-color: var(--accent-red);
    color: white;
}

.btn.secondary {
    background-color: #343a46;
    color: white;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Simulasi AutoCAD */
.sim-workspace {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 850px) {
    .sim-workspace {
        grid-template-columns: 1fr;
    }
}

.lm-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.acad-table th, .acad-table td {
    padding: 0.5rem;
    font-size: 0.85rem;
}

.acad-table input[type="text"], .acad-table select {
    background-color: #14171c;
    color: white;
    border: 1px solid #444c5c;
    padding: 0.3rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.toggle-lamp {
    background: none;
    border: 1px solid #444c5c;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    font-size: 1rem;
}

.acad-viewport {
    background-color: #000000;
    border: 2px solid #444c5c;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.viewport-header {
    background-color: #2b303b;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    color: #ccc;
}

#acad-canvas {
    width: 100%;
    height: auto;
    background-color: #000000;
    display: block;
}

.viewport-hint {
    background-color: #181a1f;
    padding: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid #333;
}

/* Kuis */
.quiz-item {
    background-color: #1b1e24;
    padding: 1.2rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.quiz-item p {
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.quiz-options label {
    display: block;
    background-color: var(--bg-card);
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s;
}

.quiz-options label:hover {
    border-color: #555e70;
}

.quiz-options input {
    margin-right: 0.6rem;
}

.quiz-result {
    text-align: center;
    padding: 1.5rem;
    background-color: #1b2838;
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    margin-top: 1rem;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}