/* =========================================================
   Tema: Program Pembangunan Kapasiti Penyediaan VLR & VSR
   Warna diambil daripada banner rasmi program (navy, oren,
   gradien biru-ungu) + jalur 17 warna SDG.
   ========================================================= */
:root {
    --navy: #1c2d5a;
    --navy-dark: #13204a;
    --orange: #e9a02b;
    --orange-dark: #cf8a1b;
    --blue: #4f9fe8;
    --indigo: #4c5fc0;
    --purple: #5b2a86;
    --bg: #f5f7fc;
    --card-bg: #ffffff;
    --text: #1b2440;
    --muted: #66708a;
    --border: #e1e5f0;
    --success: #3f7e44;
    --danger: #c5192d;
    --radius: 14px;
    --shadow: 0 6px 22px rgba(28, 45, 90, 0.09);
    --sdg: linear-gradient(90deg,
        #e5243b 0 5.88%, #dda63a 0 11.76%, #4c9f38 0 17.64%, #c5192d 0 23.52%,
        #ff3a21 0 29.4%, #26bde2 0 35.28%, #fcc30b 0 41.16%, #a21942 0 47.04%,
        #fd6925 0 52.92%, #dd1367 0 58.8%, #fd9d24 0 64.68%, #bf8b2e 0 70.56%,
        #3f7e44 0 76.44%, #0a97d9 0 82.32%, #56c02b 0 88.2%, #00689d 0 94.08%,
        #19486a 0 100%);
    --title-grad: linear-gradient(90deg, var(--blue) 0%, var(--indigo) 50%, var(--purple) 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg);
    /* corak titik oren seperti banner */
    background-image:
        radial-gradient(rgba(233,160,43,.35) 1.6px, transparent 1.8px);
    background-size: 22px 22px;
    background-attachment: fixed;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.sdg-strip { height: 6px; background: var(--sdg); }

/* ===== Top bar (halaman dalaman) ===== */
.topbar {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding: 30px 20px 96px;
    text-align: center;
}
.topbar::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
    background: var(--sdg);
    z-index: 2;
}
.topbar .swoosh { position: absolute; border-radius: 50%; pointer-events: none; }
.topbar .swoosh-l {
    left: -170px; bottom: -230px; width: 380px; height: 420px;
    border: 46px solid var(--navy);
    box-shadow: 0 0 0 16px var(--orange);
}
.topbar .swoosh-r {
    right: -150px; top: -200px; width: 360px; height: 360px;
    border: 40px solid var(--orange);
    box-shadow: 0 0 0 14px var(--navy);
}
.topbar-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.topbar h1.t-grad.t-long { font-size: clamp(22px, 4.2vw, 38px); }

.topbar .site-logos {
    display: block;
    height: 72px;
    width: auto;
    margin: 0 auto 14px;
}
.topbar .t-line1 {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: clamp(13px, 2.4vw, 17px);
    color: var(--navy);
}
.topbar h1.t-grad {
    margin: 0;
    font-size: clamp(26px, 5.4vw, 44px);
    font-weight: 800;
    font-style: italic;
    line-height: 1.12;
    background: var(--title-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ribbon {
    display: inline-block;
    margin-top: 16px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .08em;
    padding: 7px 26px;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}

@media (max-width: 560px) {
    .topbar { padding: 22px 16px 86px; }
    .topbar .site-logos { height: 52px; }
    .topbar .swoosh-l, .topbar .swoosh-r { opacity: .55; }
}

/* ===== Main container ===== */
.wrapper {
    flex: 1;
    width: 100%;
    max-width: 900px;
    margin: -60px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}
.wrapper-home { max-width: 1080px; }

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

/* ===== Halaman utama: maklumat acara & menu ===== */
.event-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 22px;
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-item svg {
    width: 20px; height: 20px; flex: none;
    fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.pick-label {
    text-align: center;
    color: var(--navy);
    font-weight: 600;
    margin: 28px 0 16px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 820px;
    margin: 0 auto;
}

.menu-btn {
    --c1: var(--blue); --c2: var(--indigo);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px 22px;
    box-shadow: var(--shadow);
    font-weight: 700;
    font-size: 17px;
    color: var(--navy);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.menu-btn::before {
    content: "";
    position: absolute; left: 0; right: 0; top: 0; height: 5px;
    background: linear-gradient(90deg, var(--c1), var(--c2));
}
.menu-btn.c-blue   { --c1: #4f9fe8; --c2: #3a68c4; }
.menu-btn.c-orange { --c1: #f2b443; --c2: #e0860f; }
.menu-btn.c-purple { --c1: #6d55c4; --c2: #5b2a86; }
.menu-btn.c-green  { --c1: #56a845; --c2: #3f7e44; }

.menu-btn:hover, .menu-btn:focus-visible {
    transform: translateY(-4px);
    border-color: var(--c1);
    box-shadow: 0 14px 30px rgba(28,45,90,0.16);
}

.menu-btn .icon {
    width: 54px; height: 54px; flex: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    display: flex; align-items: center; justify-content: center;
}
.menu-btn .icon svg {
    width: 28px; height: 28px;
    fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.menu-btn span.label small {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.45;
}
.menu-btn .arrow {
    margin-top: auto;
    font-size: 20px;
    color: var(--c2);
    transition: transform .15s ease;
}
.menu-btn:hover .arrow { transform: translateX(4px); }

@media (max-width: 820px) {
    .menu-grid { grid-template-columns: 1fr; gap: 14px; }
    .menu-btn { flex-direction: row; align-items: center; padding: 20px 18px; }
    .menu-btn::before { top: 0; bottom: 0; right: auto; width: 5px; height: auto; }
    .menu-btn .arrow { margin: 0 0 0 auto; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease, color .15s ease;
    text-align: center;
}
.btn-primary { background: linear-gradient(90deg, var(--navy), var(--indigo)); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }

.btn-gold { background: var(--orange); color: var(--navy-dark); }
.btn-gold:hover { background: var(--orange-dark); }

.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.8); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--navy);
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(76,95,192,.15); }

.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; }
.check-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--navy); }
.check-row label { font-weight: 600; font-size: 14px; }

#wakilBox { display: none; margin-top: -6px; }

.day-chip {
    display: inline-block;
    background: #fff6e6;
    border: 1px solid #f3d7a3;
    color: #8a5a00;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 13px;
    margin: 4px 0 14px;
}

/* ===== Autocomplete ===== */
.suggest-box {
    position: absolute;
    left: 0; right: 0; top: 100%;
    z-index: 20;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    display: none;
}
.suggest-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.active { background: #eef1fb; }
.suggest-item .s-nama { font-weight: 600; color: var(--navy); font-size: 14px; }
.suggest-item .s-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.suggest-item .s-daftar { font-size: 11px; color: var(--danger); font-weight: 700; margin-top: 2px; }
.suggest-empty { padding: 12px 14px; color: var(--muted); font-size: 13px; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #eaf5ea; color: var(--success); border: 1px solid #c3e2c5; }
.alert-danger { background: #fcebec; color: var(--danger); border: 1px solid #f3c4c9; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.data-table th, table.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
table.data-table th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
}
table.data-table tbody tr:nth-child(even) { background: #f8f9fd; }
table.data-table tbody tr:hover { background: #eef1fb; }

.badge-wakil, .badge-walkin {
    display: inline-block;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}
.badge-wakil { background: #fff4e0; color: #8a5a00; border: 1px solid #f0d9a6; }
.badge-walkin { background: #ece8f7; color: var(--purple); border: 1px solid #d5cbef; }

.muted { color: var(--muted); font-size: 13px; }
.text-center { text-align: center; }

h2.section-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--navy); }
h2.section-title + p.muted { margin-top: 0; margin-bottom: 20px; }

.search-box { margin-bottom: 16px; }

/* ===== Admin ===== */
.admin-bar {
    background: linear-gradient(90deg, var(--navy-dark), var(--navy));
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-bar strong { color: var(--orange); }
.admin-brand { display: flex; align-items: center; gap: 14px; }
.admin-logos { height: 36px; background: #fff; border-radius: 8px; padding: 3px 8px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    border-left: 5px solid var(--orange);
}
.stat-card:nth-child(2) { border-left-color: var(--indigo); }
.stat-card:nth-child(3) { border-left-color: var(--purple); }
.stat-num { display: block; font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-lbl { font-size: 13px; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    background: #fff;
}
.tab:hover { border-color: var(--indigo); }
.tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ===== Login ===== */
.login-wrapper { max-width: 420px; margin: 70px auto; padding: 0 20px; width: 100%; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo img { height: 70px; width: auto; }

/* ===== Footer ===== */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; background: #fff; }
.site-footer p { margin: 0; padding: 18px 20px 22px; }

/* ===== Utility ===== */
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
