:root {
    --primary: #5b3a8e;
    --primary-dark: #422a68;
    --primary-light: #7a56b0;
    --accent: #f0b429;
    --bg: #f4f2fa;
    --card-bg: #ffffff;
    --text: #2c2537;
    --text-muted: #6b6478;
    --border: #e3ddef;
    --danger: #d64545;
    --success: #2e9e5b;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(91, 58, 142, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.topbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px 0;
    box-shadow: var(--shadow);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.topbar .user-chip { font-size: 0.85rem; opacity: 0.9; }
.topbar nav a { color: #fff; margin-left: 14px; font-size: 0.9rem; opacity: 0.9; }
.topbar nav a:hover { opacity: 1; }

.page { padding: 28px 0 60px; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.card h2, .card h3 { margin-top: 0; }

.center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #2f2050 100%);
}

.auth-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    padding: 32px 28px;
}
.auth-box .logo {
    text-align: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.auth-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.portal-choice { display: grid; gap: 14px; margin-top: 20px; }
.portal-choice a.btn-portal {
    display: block;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--primary-light);
    transition: 0.15s;
}
.portal-choice a.btn-portal:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 0.9rem; }
label:first-child { margin-top: 0; }

input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(91,58,142,0.12);
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn.btn-block { width: 100%; }
.btn.btn-secondary { background: #efe9f9; color: var(--primary); }
.btn.btn-secondary:hover { background: #e1d6f5; }
.btn.btn-danger { background: var(--danger); }
.btn.btn-danger:hover { background: #b93636; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.92rem;
}
.alert-error { background: #fdeaea; color: var(--danger); border: 1px solid #f5c2c2; }
.alert-success { background: #e7f7ed; color: var(--success); border: 1px solid #b8e6c8; }
.alert-info { background: #eef1fd; color: #3a4fb0; border: 1px solid #ccd4f7; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover { background: #faf9fd; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-done { background: #e7f7ed; color: var(--success); }
.badge-progress { background: #fff4e0; color: #b5750a; }
.badge-new { background: #eef1fd; color: #3a4fb0; }

.credential-box {
    background: #2c2537;
    color: #fff;
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    margin: 18px 0;
}
.credential-box .cred-item { margin: 10px 0; }
.credential-box .cred-label { font-size: 0.78rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.credential-box .cred-value {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
}

.progress-bar-outer {
    background: var(--border);
    border-radius: 20px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-bar-inner { background: var(--primary); height: 100%; transition: width 0.3s; }
.progress-label { font-size: 0.8rem; color: var(--text-muted); text-align: right; margin-bottom: 18px; }

.statement-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.12s;
}
.statement-option:hover { border-color: var(--primary-light); background: #faf8ff; }
.statement-option input { accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
.statement-option.selected-p { border-color: var(--success); background: #f0faf3; }
.statement-option.selected-k { border-color: var(--danger); background: #fdf3f3; }
.statement-text { font-size: 1rem; }

.pk-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.pk-columns h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.pk-columns .col-p h4 { color: var(--success); }
.pk-columns .col-k h4 { color: var(--danger); }

.nav-buttons { display: flex; justify-content: space-between; margin-top: 24px; gap: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; margin: 18px 0; }
.stat-box { background: #faf9fd; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-box .lbl { font-size: 0.8rem; color: var(--text-muted); }

.disc-bars { display: grid; gap: 10px; margin: 16px 0; }
.disc-bar-row { display: grid; grid-template-columns: 30px 1fr 40px; align-items: center; gap: 10px; }
.disc-bar-row .letter { font-weight: 800; text-align: center; }
.disc-bar-track { background: var(--border); border-radius: 8px; height: 20px; overflow: hidden; }
.disc-bar-fill { height: 100%; border-radius: 8px; }
.fill-D { background: #e05d5d; }
.fill-I { background: #f0b429; }
.fill-S { background: #4caf7d; }
.fill-C { background: #4a7bc9; }

.trait-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.trait-tag { background: #efe9f9; color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 0.82rem; }

.footer-note { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin-top: 30px; }

@media (max-width: 600px) {
    .pk-columns { grid-template-columns: 1fr; }
    .card { padding: 18px; }
    .credential-box .cred-value { font-size: 1.3rem; letter-spacing: 2px; }
}

/* ==== Laporan Hasil DISC (mirip format Excel asli) ==== */
.disc-report { padding: 0; overflow: hidden; }
.report-title {
    background: var(--primary);
    color: #fff;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 18px 20px 8px;
}
.report-subtitle {
    background: var(--primary);
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 20px 16px;
}
.report-info { margin: 20px 24px 8px; border-collapse: collapse; }
.report-info td { border: none; padding: 4px 6px; font-size: 0.92rem; }
.report-info td.lbl { font-weight: 700; width: 90px; }

.line-table { margin: 10px 24px; width: calc(100% - 48px); }
.line-table th, .line-table td { text-align: center; padding: 8px; }
.line-table td:first-child, .line-table th:first-child { text-align: left; font-weight: 700; }
.line-table td.tot { color: var(--danger); font-weight: 800; }

.graph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 24px; }
.graph-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.graph-title { text-align: center; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 8px; }
.graph-title small { font-weight: 400; text-transform: none; letter-spacing: 0; }

.section-heading {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 8px 16px;
    margin: 26px 0 0;
}
.kepribadian-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px 24px 0; }
.col-title { font-weight: 700; text-decoration: underline; margin-bottom: 8px; }
.col-most { color: #b5423e; }
.col-least { color: #2c7a4b; }
.col-change { margin: 0 24px; color: #3a6bc9; }
.trait-list { margin: 0 0 0 18px; padding: 0; font-size: 0.92rem; }
.trait-list li { margin-bottom: 4px; }
.trait-list.two-col { columns: 2; column-gap: 30px; margin: 8px 24px 0; }
.muted { color: var(--text-muted); font-size: 0.88rem; margin: 0 24px; }

.desc-text { margin: 12px 24px 0; text-align: justify; line-height: 1.7; font-size: 0.95rem; }
.profession-box { background: #fff7e0; border: 1px solid #f0d896; border-radius: 10px; margin: 16px 24px 24px; padding: 14px 18px; }
.profession-title { font-weight: 700; color: #9a6b0a; margin-bottom: 6px; }

@media print {
    .topbar, .btn, form { display: none !important; }
    .card { box-shadow: none; border: none; }
    body { background: #fff; }
}

@media (max-width: 700px) {
    .graph-grid { grid-template-columns: 1fr; }
    .kepribadian-grid { grid-template-columns: 1fr; }
    .report-info, .line-table { margin-left: 14px; margin-right: 14px; width: calc(100% - 28px); }
}

