:root {
    --navy: #173c73;
    --navy-dark: #0f294f;
    --blue: #24589e;
    --gold: #c99518;
    --gold-soft: #e5c36b;
    --ink: #12213a;
    --muted: #657086;
    --line: #dde3ec;
    --surface: #ffffff;
    --bg: #f4f7fb;
    --danger: #a83333;
    --success: #177245;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(15, 41, 79, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(201,149,24,.08), transparent 22rem),
        linear-gradient(180deg, #fbfcfe, var(--bg));
    min-height: 100vh;
}
a { color: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(221,227,236,.9);
}
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--gold-soft), var(--gold)); font-weight: 900; box-shadow: inset 0 0 0 3px rgba(255,255,255,.38); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; }
.brand small { color: var(--muted); font-size: .74rem; margin-top: 2px; }
nav { display: flex; gap: 6px; }
nav a { text-decoration: none; color: var(--muted); padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: .9rem; }
nav a:hover, nav a.active { color: var(--navy); background: #edf3fb; }
.main-content { padding-block: 54px 70px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .75fr; gap: 52px; align-items: center; margin-bottom: 48px; }
.hero-copy h1, .page-intro h1, .status-card h1 { font-family: Georgia, "Times New Roman", serif; color: var(--navy-dark); letter-spacing: -.02em; }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: .98; margin: 12px 0 22px; }
.hero-copy > p { font-size: 1.08rem; line-height: 1.75; color: var(--muted); max-width: 680px; }
.eyebrow { color: var(--gold); font-weight: 900; letter-spacing: .18em; font-size: .76rem; }
.privacy-note { border-left: 3px solid var(--gold); padding: 12px 16px; background: rgba(255,255,255,.7); color: #505b70; border-radius: 0 10px 10px 0; margin-top: 24px; font-size: .9rem; line-height: 1.55; }
.template-card { max-width: 325px; justify-self: end; padding: 12px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); border-radius: 20px; transform: rotate(1.5deg); }
.template-card img { display: block; width: 100%; height: auto; border-radius: 11px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card, .lookup-card { padding: clamp(24px, 4vw, 44px); }
.section-heading { display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0 0 6px; color: var(--navy-dark); }
.section-heading p { margin: 0; color: var(--muted); }
.step { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: white; font-weight: 900; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 800; margin-bottom: 8px; }
.field input, .field select { width: 100%; min-height: 52px; border: 1px solid #cbd4e2; border-radius: 11px; padding: 12px 14px; font: inherit; color: var(--ink); background: #fff; outline: none; transition: .18s ease; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36,88,158,.10); }
.field small { display: block; margin-top: 7px; color: var(--muted); font-size: .8rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 26px; padding: 15px; background: #f7f9fc; border-radius: 11px; color: #566176; font-size: .86rem; line-height: 1.5; }
.consent input { margin-top: 3px; accent-color: var(--navy); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.actions-center { justify-content: center; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border-radius: 11px; font-weight: 850; text-decoration: none; border: 0; cursor: pointer; font: inherit; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .78; transform: none; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 9px 20px rgba(23,60,115,.18); }
.btn-secondary { color: var(--navy); background: #edf3fb; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { border-radius: 11px; padding: 13px 15px; margin: 0 0 22px; line-height: 1.5; }
.alert-error { background: #fff2f2; border: 1px solid #f1c4c4; color: var(--danger); }
.alert-info { background: #f1f6fc; border: 1px solid #d5e3f5; color: var(--navy); margin-top: 22px; }
.status-card { max-width: 760px; margin: 30px auto; padding: clamp(30px, 5vw, 58px); text-align: center; }
.status-icon { width: 68px; height: 68px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; font-size: 2rem; font-weight: 900; }
.status-icon.success { color: var(--success); background: #e9f7ef; }
.status-icon.error { color: var(--danger); background: #fff0f0; }
.status-card h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 10px 0 12px; }
.status-card > p { color: var(--muted); line-height: 1.65; }
.summary-list { display: grid; grid-template-columns: 1fr 1fr; text-align: left; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 30px 0; }
.summary-list div { background: white; padding: 16px 18px; }
.summary-list dt { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.summary-list dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.page-intro { max-width: 760px; margin-bottom: 34px; }
.page-intro h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.02; margin: 10px 0 16px; }
.page-intro p { color: var(--muted); line-height: 1.7; }
.lookup-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.lookup-form .btn { min-width: 150px; }
.lookup-result { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 28px; }
.status-row { display: flex; align-items: center; gap: 9px; color: var(--success); }
.status-dot { width: 9px; height: 9px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 5px rgba(23,114,69,.10); }
.summary-list.compact { margin: 20px 0; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; padding: 24px 0 34px; background: rgba(255,255,255,.6); }
.footer-grid { display: flex; justify-content: space-between; gap: 18px; }
.footer-grid p { margin: 0; }
@media (max-width: 820px) {
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .template-card { justify-self: start; max-width: 260px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .brand small { display: none; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 22px, 1120px); }
    .nav-wrap { min-height: 68px; }
    .brand strong { font-size: .84rem; }
    .brand-mark { width: 36px; height: 36px; }
    nav a { padding: 9px 9px; font-size: .8rem; }
    .main-content { padding-block: 34px 54px; }
    .hero-copy h1 { font-size: 2.65rem; }
    .template-card { max-width: 220px; }
    .lookup-form { grid-template-columns: 1fr; }
    .summary-list { grid-template-columns: 1fr; }
    .actions .btn { width: 100%; }
    .footer-grid { flex-direction: column; }
}
@media (max-width: 420px) {
    .brand span:last-child { display: none; }
    nav { margin-left: auto; }
}

/* v1.6: nama boleh ditaip menggunakan huruf besar atau kecil; padanan CSV adalah case-insensitive. */
#category { text-transform: uppercase; }

/* v1.4: Maklum Balas section */
.form-section-divider {
    height: 1px;
    background: var(--line);
    margin: 36px 0 30px;
}
.section-heading-inline {
    margin-bottom: 24px;
}
.feedback-list {
    display: grid;
    gap: 20px;
}
.feedback-question {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfe;
    min-width: 0;
}
.feedback-question legend,
.feedback-question > label {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 16px;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.55;
}
.required-mark { color: var(--danger); }
.scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.4;
    margin-bottom: 14px;
}
.scale-labels span:last-child { text-align: right; }
.linear-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: 10px;
}
.scale-option {
    position: relative;
    display: block;
    cursor: pointer;
}
.scale-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.scale-option span {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd4e2;
    border-radius: 11px;
    background: #fff;
    color: var(--navy-dark);
    font-weight: 850;
    transition: .18s ease;
}
.scale-option input:focus-visible + span {
    outline: 3px solid rgba(36,88,158,.20);
    outline-offset: 2px;
}
.scale-option input:checked + span {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
    box-shadow: 0 7px 16px rgba(23,60,115,.16);
}
.choice-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.choice-option {
    position: relative;
    cursor: pointer;
}
.choice-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.choice-option span {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 12px;
    border: 1px solid #cbd4e2;
    border-radius: 11px;
    background: #fff;
    font-weight: 750;
    transition: .18s ease;
}
.choice-option input:focus-visible + span {
    outline: 3px solid rgba(36,88,158,.20);
    outline-offset: 2px;
}
.choice-option input:checked + span {
    border-color: var(--navy);
    background: #edf3fb;
    color: var(--navy-dark);
    box-shadow: inset 0 0 0 1px var(--navy);
}
.field textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1px solid #cbd4e2;
    border-radius: 11px;
    padding: 13px 14px;
    font: inherit;
    line-height: 1.55;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: .18s ease;
}
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(36,88,158,.10);
}

@media (max-width: 620px) {
    .feedback-question { padding: 18px 15px; }
    .scale-labels { font-size: .76rem; }
    .linear-scale { gap: 7px; }
    .scale-option span { min-height: 44px; }
    .choice-list { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .linear-scale { gap: 5px; }
    .scale-option span { min-height: 42px; font-size: .9rem; }
}


/* v1.6 verification + multi-certificate UI */
.alert-success { background:#edf9f1; border:1px solid #bfe3cd; color:var(--success); }
.verified-panel { padding:20px; border:1px solid #cde3d6; background:#f6fcf8; border-radius:14px; }
.verified-badge { display:inline-flex; align-items:center; gap:7px; font-weight:850; color:var(--success); background:#e7f6ed; padding:8px 12px; border-radius:999px; }
.verified-panel .summary-list { margin:18px 0 12px; }
.inline-form { display:inline; }
.btn-small { min-height:40px; padding:9px 14px; font-size:.88rem; }
.result-wide { max-width:900px; }
.certificate-section { text-align:left; margin-top:28px; }
.certificate-section h2 { margin:0 0 14px; color:var(--navy-dark); font-size:1.2rem; }
.table-scroll { width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:14px; }
.certificate-table { width:100%; border-collapse:collapse; min-width:520px; background:#fff; }
.certificate-table th, .certificate-table td { padding:15px 17px; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; }
.certificate-table th { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; background:#f7f9fc; }
.certificate-table tr:last-child td { border-bottom:0; }
.certificate-table td:last-child { width:130px; }
.certificate-table td strong, .certificate-table td small, .certificate-table td em { display:block; }
.certificate-table td small { margin-top:4px; color:var(--muted); overflow-wrap:anywhere; }
.certificate-table td em { margin-top:4px; color:#6c778c; font-size:.78rem; font-style:normal; }
.icon-actions { display:flex; gap:8px; }
.icon-btn { width:40px; height:40px; display:grid; place-items:center; border-radius:10px; background:#edf3fb; color:var(--navy); border:1px solid #d8e3f2; text-decoration:none; transition:.15s ease; }
.icon-btn:hover { background:var(--navy); color:#fff; transform:translateY(-1px); }
.icon-btn svg { width:20px; height:20px; }
@media (max-width:620px) {
  .verified-panel { padding:16px; }
  .certificate-table { min-width:440px; }
  .certificate-table th,.certificate-table td { padding:13px 12px; }
  .icon-btn { width:38px; height:38px; }
}
