/* Azka Template - Tema biru & putih */
:root {
    --navy: #0a2351;
    --blue: #1f4fd8;
    --blue-dark: #1a41b3;
    --sky: #eaf1ff;
    --mist: #f5f8ff;
    --ink: #14213d;
    --muted: #5b6b88;
    --line: #d9e4f7;
    --white: #ffffff;
    --gold: #f2b01e;
    --danger: #c62828;
    --ok: #1b7f4b;
    --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --shadow: 0 8px 24px rgba(10, 35, 81, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

[hidden] { display: none !important; }

input, textarea, select, button { font-family: inherit; }

body {
    font-family: var(--font-sans);
    background-color: var(--mist);
    color: var(--ink);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--font-serif); color: var(--navy); line-height: 1.25; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Header ---------- */
header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.brand::before {
    content: '';
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    transform: rotate(45deg);
}

nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.4rem; }

nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
nav a:hover { color: var(--blue); }
nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--blue); }

/* ---------- Layout ---------- */
.container { max-width: 1040px; margin: 2rem auto; padding: 0 1rem; width: 100%; }
.narrow-800 { max-width: 800px; }
.narrow-600 { max-width: 600px; }

.section { margin-top: 3.5rem; }
.section-title { font-size: 1.7rem; margin-bottom: 0.4rem; }
.section-sub { color: var(--muted); margin-bottom: 1.5rem; max-width: 60ch; }
.page-title { font-size: 1.8rem; margin-bottom: 1rem; }
.lead { color: var(--muted); margin-bottom: 1.5rem; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.muted a, .lead a { color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.16), transparent 45%),
        linear-gradient(135deg, var(--navy) 0%, #14398f 58%, var(--blue) 100%);
    color: var(--white);
    border-radius: 20px;
    padding: 3.5rem 2.5rem;
    box-shadow: var(--shadow);
}
.hero h1 {
    color: var(--white);
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    max-width: 18ch;
    margin-bottom: 0.9rem;
}
.hero p { color: #d3e2ff; max-width: 52ch; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--blue);
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-auto { width: auto; }
.btn-light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-light:hover { background: var(--sky); border-color: var(--sky); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }
.btn-secondary { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--sky); border-color: var(--blue); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; width: auto; }

.btn:focus-visible,
nav a:focus-visible,
.brand:focus-visible,
.remove-btn:focus-visible,
summary:focus-visible,
.tab-btn:focus-visible { outline: 3px solid rgba(31, 79, 216, 0.45); outline-offset: 2px; }

.btn:disabled,
.btn.disabled {
    background: #a9b9e3;
    border-color: #a9b9e3;
    color: var(--white);
    cursor: not-allowed;
    pointer-events: none;
}

.block-btn { display: block; text-align: center; margin-top: 1rem; }

/* ---------- Kartu paket ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.4rem; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.6rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card .desc { color: var(--muted); font-size: 0.93rem; }
.card.featured { border: 2px solid var(--blue); background: linear-gradient(180deg, var(--sky), var(--white) 55%); }
.featured-title { margin-top: 0.5rem; }
.badge {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.price { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 0.9rem; }
.price .period { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; color: var(--muted); }

/* ---------- Box ringkasan / form ---------- */
.summary-box {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 1.6rem;
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.summary-box + .summary-box { margin-top: 1.2rem; }

.form-group { margin-bottom: 1rem; border: 0; }
.form-group label, .form-group legend { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.93rem; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #c3d1ec;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    color: var(--ink);
}
.form-group textarea { resize: vertical; min-height: 5rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.15);
}
.inline-field { display: flex; gap: 0.6rem; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field .btn { width: auto; white-space: nowrap; }

/* ---------- Keranjang & checkout ---------- */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
}
.cart-item-right { display: flex; align-items: center; gap: 1rem; }
.price-inline { font-weight: 700; color: var(--navy); white-space: nowrap; }
.remove-btn {
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
}
.remove-btn:hover { background: var(--danger); color: var(--white); }

.total-row { display: flex; justify-content: space-between; font-size: 1.05rem; margin: 0.6rem 0; }
.total-row strong { color: var(--navy); }
.total-row.discount { color: var(--ok); }
.total-row.grand { font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 0.8rem; margin: 0.8rem 0 1.2rem; }

.ref-status { font-size: 0.88rem; margin-top: 0.4rem; min-height: 1.3em; }
.ref-status.ok { color: var(--ok); }
.ref-status.error { color: var(--danger); }

.success { text-align: center; padding: 1rem 0; }
.success .btn { display: block; width: 100%; margin-top: 0.6rem; }
.success > a.muted { display: inline-block; margin-top: 1rem; }
.order-message {
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem;
    margin: 1rem 0;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    user-select: all;
}

/* ---------- Testimoni ---------- */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}
.rating-number { font-family: var(--font-serif); font-size: 2.8rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stars { color: var(--gold); letter-spacing: 2px; white-space: nowrap; }
.stars-off { color: #d5deef; }

.review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; margin-bottom: 1.6rem; }
.review-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.review-card.pending { border-style: dashed; background: var(--sky); }
.review-text { color: var(--ink); overflow-wrap: anywhere; }
.review-meta { color: var(--muted); font-size: 0.85rem; margin-top: auto; }
.pending-tag { font-size: 0.8rem; color: var(--blue-dark); font-weight: 600; }
.review-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: 0.1rem; position: relative; }
.star-input input { position: absolute; opacity: 0; width: 1.8rem; height: 1.8rem; margin: 0; }
.star-input label {
    font-size: 2rem;
    line-height: 1;
    color: #d5deef;
    cursor: pointer;
    margin: 0;
    padding: 0 0.1rem;
    transition: color 0.15s;
}
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 3px solid rgba(31, 79, 216, 0.45); border-radius: 4px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.7rem; max-width: 800px; }
.faq-list details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.faq-list details[open] { border-color: var(--blue); }
.faq-list summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.2rem;
    font-weight: 600;
    color: var(--navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 1.4rem; color: var(--blue); line-height: 1; }
.faq-list details[open] summary::after { content: '\2212'; }
.faq-answer { padding: 0 1.2rem 1.1rem; color: var(--muted); }

/* ---------- Referral ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0.8rem; margin-bottom: 1.5rem; }
.steps li {
    counter-increment: step;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
}
.steps li::before {
    content: counter(step);
    flex: none;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
}
.code-box {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--navy);
    background: var(--sky);
    border: 1px dashed var(--blue);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    text-align: center;
    margin: 0.8rem 0;
    user-select: all;
    overflow-wrap: anywhere;
}
.link-box {
    font-size: 0.88rem;
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    overflow-wrap: anywhere;
    user-select: all;
    margin-bottom: 0.8rem;
}
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 160px; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tab-btn {
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.93rem;
}
.tab-btn[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.admin-item { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; background: var(--mist); }
.admin-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 0.8rem; }
.admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.93rem; margin-bottom: 0.4rem; }
.notice {
    background: var(--sky);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}
.notice.warn { border-left-color: var(--gold); background: #fff8e6; }
.admin-bar {
    position: sticky;
    bottom: 0.8rem;
    margin-top: 1.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.8rem 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}
.admin-bar .btn { width: auto; }
.admin-bar .status { margin-right: auto; font-size: 0.9rem; color: var(--muted); }
.admin-bar .status.dirty { color: var(--danger); font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 20px);
    background: var(--navy);
    color: var(--white);
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(10, 35, 81, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-width: 90vw;
    text-align: center;
    z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--blue); }

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
    font-size: 0.88rem;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
footer a { color: var(--muted); }

/* ---------- Responsif ---------- */
@media (max-width: 700px) {
    header { flex-direction: column; gap: 0.5rem; padding: 0.8rem 1rem; position: static; }
    nav { justify-content: center; gap: 0.2rem 1rem; }
    .hero { padding: 2.2rem 1.4rem; border-radius: 16px; }
    .cart-item { flex-direction: column; align-items: flex-start; }
    .cart-item-right { width: 100%; justify-content: space-between; }
    .admin-grid { grid-template-columns: 1fr; }
    .inline-field { flex-direction: column; }
    .inline-field .btn { width: 100%; }
    footer { padding: 1rem; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
