:root {
    --primary: #2D6A4F;
    --primary-light: #52B788;
    --primary-lighter: #B7E4C7;
    --primary-lightest: #D8F3DC;
    --primary-bg: #F0FDF4;
    --accent: #40916C;
    --danger: #E63946;
    --warning: #F4A261;
    --dark: #1B4332;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --white: #FFFFFF;
    --bg: #F8F9FA;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 600; }
a { text-decoration: none; color: inherit; }

.page-wrapper { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* HERO */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero-icon { font-size: 64px; margin-bottom: 16px; }
.hero h1 { font-size: 32px; color: var(--primary); margin-bottom: 4px; }
.hero-subtitle { font-size: 18px; color: var(--accent); font-weight: 500; margin-bottom: 20px; }
.hero-desc { font-size: 15px; color: var(--gray); max-width: 540px; margin: 0 auto 28px; line-height: 1.7; }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-secondary { background: var(--gray-light); color: var(--gray); }
.btn-secondary:hover { background: #dce0e5; }
.btn-success { background: var(--primary-light); color: white; }
.btn-success:hover { background: var(--primary); }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; display: block; }

/* INFO & CARDS */
.info-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px 0 40px; }
.info-card { background: white; border-radius: var(--radius); padding: 24px 16px; text-align: center; box-shadow: var(--shadow); }
.info-icon { font-size: 36px; margin-bottom: 12px; }
.info-card h3 { font-size: 16px; color: var(--primary); margin-bottom: 8px; }
.info-card p { font-size: 13px; color: var(--gray); line-height: 1.5; }

.footer { text-align: center; padding: 24px; font-size: 13px; color: var(--gray); }
.footer a { color: var(--primary); font-weight: 500; }

/* FORMS */
.form-container { max-width: 560px; margin: 40px auto; }
.form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.back-link { font-size: 14px; color: var(--gray); font-weight: 500; }
.back-link:hover { color: var(--primary); }

.step-indicator { display: flex; align-items: center; gap: 4px; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-light); color: var(--gray); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.step.active { background: var(--primary); color: white; }
.step-line { width: 24px; height: 2px; background: var(--gray-light); }

.card { background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2, .card h3 { color: var(--primary); margin-bottom: 8px; }
.card-subtitle { font-size: 14px; color: var(--gray); margin-bottom: 24px; }

.data-form .form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--dark); margin-bottom: 6px; }
.required { color: var(--danger); }

.form-group input, .search-input, .essay-input {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm); font-size: 15px; font-family: 'Inter', sans-serif; transition: var(--transition); background: white;
}
.form-group input:focus, .search-input:focus, .essay-input:focus {
    outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-lightest);
}
.error-text { display: block; color: var(--danger); font-size: 13px; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }

/* TEST PAGE */
.test-body { background: var(--primary-bg); }
.test-wrapper { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
.test-header { position: sticky; top: 0; background: var(--primary-bg); z-index: 100; padding: 12px 0 16px; }
.progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.question-counter { font-size: 14px; font-weight: 600; color: var(--primary); }
.answered-count { font-size: 12px; color: var(--gray); }
.progress-bar-container { height: 6px; background: var(--gray-light); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 3px; transition: width 0.3s ease; }

.question-card { background: white; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); margin-bottom: 16px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.question-number { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--primary-lightest); color: var(--primary); border-radius: 50%; font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.question-text { font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--dark); margin-bottom: 24px; }

.options-grid { display: flex; flex-direction: column; gap: 10px; }
.option-item { cursor: pointer; }
.option-item input[type="radio"] { display: none; }
.option-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--gray-light); border-radius: var(--radius-sm); transition: var(--transition); }
.option-item:hover .option-box { border-color: var(--primary-lighter); background: var(--primary-lightest); }
.option-item input[type="radio"]:checked + .option-box { border-color: var(--primary); background: var(--primary-lightest); }
.option-num { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--gray-light); color: var(--gray); border-radius: 50%; font-size: 13px; font-weight: 600; flex-shrink: 0; transition: var(--transition); }
.option-item input[type="radio"]:checked + .option-box .option-num { background: var(--primary); color: white; }
.option-label { font-size: 14px; color: var(--dark); }

.essay-input { min-height: 150px; resize: vertical; line-height: 1.5; }

.test-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.test-nav .btn { flex: 1; }

/* RESULT */
.result-body { background: var(--bg); }
.result-wrapper { max-width: 700px; margin: 0 auto; padding: 0 16px 40px; }
.result-hero { text-align: center; padding: 40px 20px; border-radius: 0 0 24px 24px; color: white; }
.result-icon { font-size: 56px; margin-bottom: 12px; }
.result-hero h1 { font-size: 24px; margin-bottom: 8px; color: white; }
.result-type { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.result-score { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.score-number { font-size: 48px; font-weight: 700; font-family: 'Poppins', sans-serif; }
.score-max { font-size: 20px; opacity: 0.8; }

.result-content { padding: 20px 0; }
.info-grid { display: flex; flex-direction: column; gap: 0; }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 14px; color: var(--gray); font-weight: 500; }
.info-value { font-size: 14px; color: var(--dark); font-weight: 600; text-align: right; max-width: 60%; }

.spectrum-bar { margin-top: 12px; }
.spectrum-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.spectrum-track { position: relative; height: 12px; background: linear-gradient(90deg, var(--danger), var(--warning), var(--primary-light), var(--primary)); border-radius: 6px; }
.spectrum-marker { position: absolute; top: -6px; transform: translateX(-50%); }
.marker-dot { width: 24px; height: 24px; background: white; border: 3px solid var(--dark); border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.marker-label { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: var(--dark); background: white; padding: 2px 8px; border-radius: 4px; box-shadow: var(--shadow); }

.category-list { display: flex; flex-direction: column; gap: 16px; }
.category-item { display: flex; flex-direction: column; gap: 4px; }
.category-header { display: flex; justify-content: space-between; align-items: center; }
.category-name { font-size: 14px; font-weight: 500; color: var(--dark); }
.category-score { font-size: 14px; font-weight: 600; color: var(--gray); }
.category-bar-container { height: 8px; background: var(--gray-light); border-radius: 4px; overflow: hidden; }
.category-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.category-interp { font-size: 12px; font-weight: 500; }

.interpretation-text { font-size: 14px; line-height: 1.8; color: var(--dark); }

.explanation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.explanation-item { padding: 16px; background: var(--bg); border-radius: var(--radius-sm); }
.expl-icon { font-size: 32px; margin-bottom: 8px; }
.explanation-item h4 { font-size: 15px; margin-bottom: 8px; }
.explanation-item p { font-size: 13px; color: var(--gray); line-height: 1.6; }

.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* === KOdin LOGIN KEREN (Glassmorphism) === */
.login-body {
    background: #0d1117;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: ''; position: absolute; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(45,106,79,0.4), transparent 70%);
    top: -150px; left: -150px; border-radius: 50%;
}
.login-body::after {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(82,183,136,0.3), transparent 70%);
    bottom: -100px; right: -100px; border-radius: 50%;
}
.login-wrapper { position: relative; z-index: 10; width: 100%; max-width: 420px; }
.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: center;
    color: white;
}
.login-card h2 { color: white; margin-bottom: 5px; }
.login-card .card-subtitle { color: rgba(255,255,255,0.6); margin-bottom: 30px; }
.login-icon { font-size: 50px; margin-bottom: 15px; }
.login-card .form-group { text-align: left; margin-bottom: 20px; }
.login-card label { color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 500; margin-bottom: 8px; display: block; }
.login-card input {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); color: white;
    padding: 14px 18px; border-radius: 10px; font-size: 14px; transition: all 0.3s ease;
}
.login-card input::placeholder { color: rgba(255,255,255,0.4); }
.login-card input:focus {
    outline: none; background: rgba(255,255,255,0.12);
    border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.2);
}
.login-card .btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    border: none; padding: 14px; font-weight: 600; letter-spacing: 0.5px; border-radius: 10px;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.4);
}
.login-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45, 106, 79, 0.6); }
.login-info-box {
    margin-top: 20px; font-size: 13px; color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05); padding: 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.back-link-center { display: block; margin-top: 20px; font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.3s; }
.back-link-center:hover { color: var(--primary-light); }
.alert-error { background: rgba(230, 57, 70, 0.15); color: #ff8a95; border: 1px solid rgba(230, 57, 70, 0.3); }

/* ADMIN DASHBOARD */
.admin-body { background: var(--bg); }
.admin-wrapper { max-width: 1000px; margin: 0 auto; padding: 20px 16px 40px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h2 { color: var(--primary); font-size: 24px; }
.admin-header p { font-size: 14px; color: var(--gray); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); padding: 20px 16px; text-align: center; box-shadow: var(--shadow); }
.stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); font-family: 'Poppins', sans-serif; }
.stat-label { font-size: 12px; color: var(--gray); margin-top: 4px; }

.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.card-header-flex h3 { margin-bottom: 0; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-input { width: 220px; padding: 8px 12px; font-size: 13px; }

.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 10px; background: var(--primary-bg); color: var(--primary); font-weight: 600; font-size: 13px; white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--gray-light); color: var(--dark); }
.data-table tr:hover td { background: var(--primary-bg); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.empty-state { text-align: center; padding: 40px; color: var(--gray); }

.answers-list { display: flex; flex-direction: column; gap: 12px; }
.answer-item { padding: 12px 16px; background: var(--bg); border-radius: var(--radius-sm); border-left: 3px solid var(--primary-light); }
.answer-question { font-size: 14px; color: var(--dark); margin-bottom: 6px; line-height: 1.5; }
.answer-cat { display: inline-block; background: var(--primary-lightest); color: var(--primary); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; margin-right: 8px; }
.answer-value { display: flex; justify-content: space-between; font-size: 13px; }
.answer-raw { color: var(--gray); }
.answer-scored { font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .info-section { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .explanation-grid { grid-template-columns: 1fr; }
    .card { padding: 20px 16px; }
    .question-text { font-size: 16px; }
    .test-nav { flex-direction: column; }
    .search-form { width: 100%; }
    .search-input { width: 100%; }
    .card-header-flex { flex-direction: column; align-items: flex-start; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 8px 6px; }
    .result-actions { flex-direction: column; }
    .admin-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .hero { padding: 40px 16px 24px; }
    .hero-icon { font-size: 48px; }
    .hero h1 { font-size: 22px; }
    .question-card { padding: 20px 16px; }
    .option-box { padding: 12px; }
    .option-label { font-size: 13px; }
    .score-number { font-size: 36px; }
    .result-hero { padding: 28px 16px; }
}