@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy: #0f2c59;
    --navy-deep: #0a1f40;
    --teal: #0f8a7d;
    --teal-dark: #0b6b61;
    --teal-soft: #e6f6f4;
    --gold: #c9a227;
    --primary: var(--teal);
    --primary-hover: var(--teal-dark);
    --bg: #e8eef6;
    --card-bg: #fff;
    --text: #1b2430;
    --text-secondary: #5c6b7a;
    --border: #e2e8f0;
    --required: #d64545;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 44, 89, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(15, 138, 125, 0.16), transparent 50%),
        radial-gradient(900px 400px at 100% 0%, rgba(15, 44, 89, 0.14), transparent 45%),
        var(--bg);
    min-height: 100vh;
    padding: 28px 16px 48px;
}

.form-container {
    max-width: 720px;
    margin: 0 auto;
}

.form-header,
.form-section,
.thank-you-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 44, 89, 0.04);
}

.form-header {
    padding: 0 28px 22px;
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}

.form-header::before {
    content: '';
    display: block;
    height: 8px;
    margin: 0 -28px 22px;
    background: linear-gradient(90deg, var(--navy), var(--teal) 60%, var(--gold));
}

.form-header-inner {
    padding: 0;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.form-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.03em;
}

.form-header .subtitle,
.report-meta {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-section {
    padding: 24px 28px;
    margin-bottom: 14px;
}

.form-section h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.scale-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 18px;
}

.field { margin-bottom: 26px; }
.field:last-child { margin-bottom: 0; }

.field > label {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.required { color: var(--required); }

input[type="text"],
textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--teal);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 138, 125, 0.12);
}

textarea {
    resize: vertical;
    min-height: 96px;
}

.scale-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px;
    align-items: center;
    gap: 8px;
}

.scale-end {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

.scale-end.left { text-align: right; }
.scale-end.right { text-align: left; }

.scale-options {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.scale-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scale-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #cfd8e3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    background: #fff;
    transition: 0.15s ease;
}

.scale-option:hover .scale-num {
    border-color: var(--teal);
    transform: translateY(-1px);
}

.scale-option input:focus-visible + .scale-num {
    box-shadow: 0 0 0 4px rgba(15, 138, 125, 0.18);
}

.scale-option input:checked + .scale-num {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 138, 125, 0.28);
}

.scale-legend { display: none; }

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    padding: 8px 10px;
    border-radius: 10px;
}

.radio-option:hover,
.checkbox-option:hover { background: var(--teal-soft); }

.radio-option input,
.checkbox-option input {
    margin: 0 12px 0 0;
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

.fitur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.form-actions {
    margin-top: 8px;
    padding: 0 0 12px;
}

.btn-submit,
.btn-back {
    background: linear-gradient(180deg, #14a394, var(--teal));
    color: #fff;
    border: none;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 18px rgba(15, 138, 125, 0.28);
}

.btn-submit:hover,
.btn-back:hover { background: var(--teal-dark); }

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.thank-you-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.thank-you-card {
    padding: 48px 40px;
    text-align: center;
    max-width: 480px;
}

.thank-you-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 36px;
    font-weight: 700;
    line-height: 76px;
    border-radius: 50%;
}

.thank-you-card h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
}

.thank-you-card p { margin: 0 0 8px; color: var(--text-secondary); }
.thank-you-note { margin-bottom: 24px !important; }

.btn-back {
    display: inline-block;
    text-decoration: none;
}

.error-msg {
    background: #fdecec;
    color: var(--required);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid #f4c7c7;
}

.report-container { max-width: 900px; }
.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.btn-excel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d6f42;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(29, 111, 66, 0.25);
}
.btn-excel:hover { background: #155733; }
.report-header h1 { font-size: 26px; margin: 0 0 8px; color: var(--navy); }
.report-section h2 {
    font-size: 17px;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.stat-card {
    background: linear-gradient(180deg, #fff, #f7fbfb);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--teal); }
.stat-card .label { font-size: 13px; color: var(--text-secondary); }
.bar-wrap { margin-bottom: 16px; }
.bar-wrap .bar-label {
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.bar-wrap .bar {
    height: 12px;
    background: #e8eef4;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}
.bar-wrap .bar-fill { height: 100%; min-width: 2px; background: var(--navy); }
.bar-wrap .bar-fill.max { background: var(--teal); }
.text-responses {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.text-responses table { width: 100%; border-collapse: collapse; font-size: 13px; }
.text-responses th,
.text-responses td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.text-responses th { background: #f4f8fb; font-weight: 700; color: var(--navy); }
.text-responses tr:last-child td { border-bottom: none; }
.text-responses .meta { color: var(--text-secondary); }
.nav-links { margin-bottom: 12px; }
.nav-links a { color: var(--teal-dark); text-decoration: none; font-weight: 600; }

@media (max-width: 640px) {
    body { padding: 12px 10px 32px; }
    .form-header,
    .form-section { padding-left: 18px; padding-right: 18px; }
    .form-header::before { margin-left: -18px; margin-right: -18px; }
    .form-header h1 { font-size: 22px; }
    .scale-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .scale-end { text-align: center !important; }
    .scale-num { width: 40px; height: 40px; }
    .fitur-grid { grid-template-columns: 1fr; }
}
