/* DIWARU KHI - Base CSS
 * Paket awal WP-2B: base layout dasar yang statis.
 * Selector tetap dipertahankan sama dengan HTML aktif untuk menekan regression risk.
 */

:root {
    --bg1: #0a4d3c;
    --bg2: #047857;
    --card: #ffffff;
    --muted: #64748b;
    --text: #0f172a;
    --line: #d1fae5;
    --primary: #047857;
    --primary2: #059669;
    --gold: #d4af37;
    --gold-dark: #b8941f;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 18px 55px rgba(4, 120, 87, .25);
    --radius: 12px;
}

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

body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    color: var(--text);
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    background:
        radial-gradient(1200px 500px at 15% 10%, rgba(4, 120, 87, .25), transparent 60%),
        radial-gradient(900px 400px at 85% 20%, rgba(212, 175, 55, .15), transparent 55%),
        linear-gradient(135deg, var(--bg1), #064e3b 40%, #022c22 100%);
    padding: 22px;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .4);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 30px 28px 24px;
    background:
        linear-gradient(135deg, rgba(4, 120, 87, .97), rgba(5, 150, 105, .97)),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, .03) 10px, rgba(255, 255, 255, .03) 20px);
    color: #fff;
    border-bottom: 3px solid var(--gold);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dark) 50%, var(--gold) 100%);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
}

.title h1 {
    font-size: 18px;
    letter-spacing: .2px;
    margin-bottom: 4px;
}

.title p {
    opacity: .9;
    font-size: 13px;
    line-height: 1.35;
}

.meta {
    text-align: center;
    font-size: 12px;
    opacity: .95;
    line-height: 1.8;
    color: #fff;
}

.stepper-wrap {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(6px);
}

.stepper {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 6px;
}

.step {
    flex: 1;
    min-width: 152px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
    cursor: pointer;
    user-select: none;
}

.step:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, .08);
}

.bubble {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: #f8fafc;
    font-weight: 800;
}

.step .label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.step .label strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.step .label span {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.step.active {
    border-color: var(--gold);
    box-shadow: 0 10px 28px rgba(212, 175, 55, .25);
    background: linear-gradient(135deg, rgba(4, 120, 87, .05), rgba(212, 175, 55, .05));
}

.step.active .bubble {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, .4);
}

.step.completed {
    border-color: var(--primary);
    background: rgba(4, 120, 87, .03);
}

.step.completed .bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    border-color: var(--primary);
    color: #fff;
}

.step.completed .bubble::after {
    content: "v";
    font-weight: 900;
}

.step.completed .bubble span {
    display: none;
}

.tahap {
    display: none;
}

.tahap.active {
    display: block;
    animation: fadeIn .35s ease;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(4, 120, 87, .08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.card h3 {
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 20px;
    margin-bottom: 14px;
    letter-spacing: .2px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 11px;
    color: #0f172a;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    background: #fafbfc;
    transition: border-color .15s ease, box-shadow .15s ease;
    line-height: 1.5;
}

textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
    font-size: 15px;
    font-weight: 400;
    color: #94a3b8;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, .15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------
 * Validation states — dipindah dari inline <style> HTML
 * -------------------------------------------------------- */
input:invalid,
textarea:invalid,
select:invalid {
    border-color: #ef4444 !important;
}

input[data-required="1"]:invalid {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* --------------------------------------------------------
 * Logo icon dan header logo
 * -------------------------------------------------------- */
.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .35);
    box-shadow: 0 4px 12px rgba(212, 175, 55, .4);
}

.logo svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.dwt-logo-header {
    transition: transform 0.3s ease;
}

.dwt-logo-header:hover {
    transform: scale(1.02);
}

/* --------------------------------------------------------
 * Layout utilities
 * -------------------------------------------------------- */
.hidden {
    display: none;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 10px 0 14px;
}

.stepper,
.table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
}

@media (max-width: 768px) {
    .header {
        padding: 20px 16px 18px !important;
    }

    .dwt-logo-header {
        max-width: 280px !important;
    }

    .title h1 {
        font-size: 15px !important;
    }

    .title p {
        font-size: 11px !important;
    }

    .step {
        min-width: 145px;
    }

    .card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .card h3 {
        font-size: 14px;
        flex-wrap: wrap;
    }
}
