/* =============================================================
   MASJID REGISTRATION FORM
   Theme: Clean light, green accent
============================================================= */

:root {
    --rd-green:       #1d9e75;
    --rd-green-dark:  #0f6e56;
    --rd-green-light: #e1f5ee;
    --rd-text:        #1a1a1a;
    --rd-muted:       #6c7380;
    --rd-hint:        #a0a7b0;
    --rd-bg:          #f4f5f7;
    --rd-surface:     #ffffff;
    --rd-border:      rgba(0,0,0,0.08);
    --rd-radius:      12px;
    --rd-radius-sm:   8px;
    --rd-error:       #e64a34;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--rd-bg);
    color: var(--rd-text);
    min-height: 100vh;
}

/* -------------------------------------------------------
   NAVBAR
------------------------------------------------------- */
.rd-nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 0.5px solid var(--rd-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rd-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
}

.rd-brand {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--rd-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-dot {
    width: 8px; height: 8px;
    background: var(--rd-green);
    border-radius: 50%;
    display: inline-block;
}

.rd-nav-label {
    font-size: 13px;
    color: var(--rd-muted);
}

/* -------------------------------------------------------
   HERO
------------------------------------------------------- */
.rd-hero {
    background: linear-gradient(135deg, #0a3d2b 0%, #0d4f3a 50%, #082e20 100%);
    padding: 48px 0 36px;
    position: relative;
    overflow: hidden;
}

.rd-hero::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(29,158,117,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-icon-wrap {
    width: 64px; height: 64px;
    background: rgba(29,158,117,0.2);
    border: 1.5px solid rgba(29,158,117,0.4);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #9fe1cb;
    margin: 0 auto 16px;
    position: relative;
}

.rd-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.rd-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    max-width: 420px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

/* Steps */
.rd-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.rd-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}

.rd-step.active .step-dot {
    background: var(--rd-green);
    border-color: var(--rd-green);
    color: #fff;
}

.rd-step span {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

.rd-step.active span { color: rgba(255,255,255,0.9); }

.step-line {
    width: 40px; height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px 18px;
}

/* -------------------------------------------------------
   CONTAINER
------------------------------------------------------- */
.rd-container {
    max-width: 900px;
    padding-top: 28px;
    padding-bottom: 60px;
}

/* -------------------------------------------------------
   SECTION CARD
------------------------------------------------------- */
.rd-section {
    background: var(--rd-surface);
    border: 0.5px solid var(--rd-border);
    border-radius: var(--rd-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--rd-border);
    background: #fafbfc;
}

.section-num {
    width: 30px; height: 30px;
    background: var(--rd-green);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--rd-text);
    margin: 0 0 2px;
}

.section-sub {
    font-size: 12px;
    color: var(--rd-muted);
    margin: 0;
}

.section-body {
    padding: 20px;
}

/* -------------------------------------------------------
   FORM ELEMENTS
------------------------------------------------------- */
.rd-field { margin-bottom: 16px; }
.rd-field:last-child { margin-bottom: 0; }

.rd-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--rd-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
}

.req  { color: var(--rd-error); }
.opt  { font-weight: 400; text-transform: none; color: var(--rd-hint); font-size: 11px; }

.rd-input-wrap { position: relative; }

.rd-input-wrap i {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px; color: var(--rd-hint);
    pointer-events: none;
    transition: color 0.15s;
}

.rd-input-wrap:focus-within i { color: var(--rd-green); }

.rd-input {
    width: 100%;
    background: #f8fafb;
    border: 1px solid var(--rd-border);
    border-radius: var(--rd-radius-sm);
    padding: 10px 13px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--rd-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}

.rd-input.has-icon { padding-left: 40px; }
.rd-input::placeholder { color: var(--rd-hint); }

.rd-input:focus {
    border-color: var(--rd-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
}

.rd-input.is-invalid { border-color: var(--rd-error); }

.rd-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7380' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
    cursor: pointer;
}

.rd-error {
    font-size: 12px;
    color: var(--rd-error);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* -------------------------------------------------------
   UPLOAD ZONE
------------------------------------------------------- */
.rd-upload-zone {
    position: relative;
    border: 2px dashed var(--rd-border);
    border-radius: var(--rd-radius-sm);
    min-height: 140px;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafb;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}

.rd-upload-zone:hover,
.rd-upload-zone.drag-over {
    border-color: var(--rd-green);
    background: rgba(29,158,117,0.04);
}

.rd-upload-zone-sm { min-height: 90px; }

.rd-upload-input {
    position: absolute !important;
    inset: 0 !important;         /* = top:0 right:0 bottom:0 left:0 */
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;      /* ← di ATAS placeholder */
    font-size: 0;
}

.rd-upload-placeholder {
    text-align: center;
    padding: 20px;
    pointer-events: none;  /* ← WAJIB, jangan tangkap klik */
    position: relative;
    z-index: 1;
}

.rd-upload-placeholder i {
    font-size: 32px;
    color: var(--rd-hint);
    display: block;
    margin-bottom: 8px;
}

.rd-upload-placeholder p {
    font-size: 13px;
    color: var(--rd-muted);
    margin-bottom: 4px;
}

.rd-upload-placeholder p span { color: var(--rd-green); font-weight: 500; }
.rd-upload-placeholder small  { font-size: 11px; color: var(--rd-hint); }

.rd-preview-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px;
    position: relative;
    z-index: 1;
    pointer-events: none;  /* ← WAJIB */
}

.rd-preview-wrap img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    object-fit: cover;
}

.rd-pdf-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(230,74,52,0.06);
    border: 1px solid rgba(230,74,52,0.2);
    border-radius: 8px;
    padding: 10px 16px;
}

.rd-pdf-badge i { font-size: 24px; color: var(--rd-error); }
.rd-pdf-badge span { font-size: 13px; color: var(--rd-text); }

.rd-remove-btn {
    background: rgba(230,74,52,0.08);
    border: 1px solid rgba(230,74,52,0.2);
    color: var(--rd-error);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    /* z-index: 3; */
    /* position: relative; */
    transition: background 0.15s;
    font-family: 'DM Sans', sans-serif;
    position: absolute !important;
    top: 8px; right: 8px;
    z-index: 20 !important;          /* ← harus > z-index input (10) */
    pointer-events: all !important;  /* ← override pointer-events:none parent */
}

.rd-remove-btn:hover { background: rgba(230,74,52,0.14); }

/* -------------------------------------------------------
   INFO BOX
------------------------------------------------------- */
.rd-info-box {
    display: flex;
    gap: 10px;
    background: rgba(29,158,117,0.06);
    border: 1px solid rgba(29,158,117,0.2);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    color: var(--rd-muted);
    line-height: 1.6;
}

.rd-info-box i { font-size: 17px; color: var(--rd-green); flex-shrink: 0; margin-top: 1px; }
.rd-info-box strong { color: var(--rd-text); }

/* -------------------------------------------------------
   ERROR BANNER
------------------------------------------------------- */
.alert-rd-error {
    background: rgba(230,74,52,0.06);
    border: 1px solid rgba(230,74,52,0.2);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #c0392b;
    line-height: 1.6;
}

.alert-rd-error i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* -------------------------------------------------------
   AGREEMENT & SUBMIT
------------------------------------------------------- */
.rd-agreement {
    margin-bottom: 16px;
}

.rd-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--rd-muted);
    cursor: pointer;
    line-height: 1.6;
}

.rd-check-label input { margin-top: 3px; accent-color: var(--rd-green); }

.rd-submit-wrap { text-align: center; }

.rd-btn-submit {
    background: var(--rd-green-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
    width: 100%; justify-content: center;
}

.rd-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.rd-btn-submit:not(:disabled):hover { background: #094a36; }
.rd-btn-submit:not(:disabled):active { transform: scale(0.99); }

.rd-submit-note {
    font-size: 12px;
    color: var(--rd-hint);
    margin-top: 10px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* -------------------------------------------------------
   SUCCESS PAGE
------------------------------------------------------- */
.rd-success-page {
    min-height: calc(100vh - 60px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background: var(--rd-bg);
}

.rd-success-card {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.rd-success-icon { font-size: 56px; color: var(--rd-green); margin-bottom: 16px; }

.rd-success-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px; font-weight: 700;
    color: var(--rd-text);
    margin-bottom: 10px;
}

.rd-success-sub {
    font-size: 14px; color: var(--rd-muted);
    line-height: 1.7; margin-bottom: 22px;
}

.rd-status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fefae8;
    border: 1px solid #f0d060;
    color: #7a5800;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px; font-weight: 600;
    margin-bottom: 28px;
}

/* Timeline */
.rd-timeline { margin-bottom: 24px; }

.rd-tl-item {
    display: flex; align-items: flex-start; gap: 12px;
    text-align: left;
}

.rd-tl-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}

.rd-tl-item.done .rd-tl-dot {
    background: var(--rd-green-light);
    color: var(--rd-green-dark);
    border: 1.5px solid rgba(29,158,117,0.3);
}

.rd-tl-item.pending .rd-tl-dot {
    background: #f0f1f3;
    color: var(--rd-hint);
    border: 1.5px solid #e0e2e5;
}

.rd-tl-body strong { display: block; font-size: 13px; color: var(--rd-text); margin-bottom: 2px; }
.rd-tl-body span   { font-size: 12px; color: var(--rd-muted); }

.rd-tl-line {
    width: 1px; height: 24px;
    background: #e0e2e5;
    margin: 4px 0 4px 16px;
}

.rd-success-note {
    background: var(--rd-green-light);
    border: 1px solid rgba(29,158,117,0.25);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px; color: var(--rd-green-dark);
    display: flex; align-items: flex-start; gap: 10px;
    text-align: left;
    margin-bottom: 24px;
    line-height: 1.6;
}

.rd-success-note i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.rd-success-actions { display: flex; flex-direction: column; gap: 10px; }

.rd-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #f4f5f7;
    border: 1px solid var(--rd-border);
    color: var(--rd-muted);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px; text-decoration: none;
    transition: background 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.rd-btn-ghost:hover { background: #eaecee; color: var(--rd-text); }

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
.rd-footer {
    padding: 20px;
    border-top: 1px solid var(--rd-border);
    font-size: 12px; color: var(--rd-hint);
    background: var(--rd-surface);
    margin-top: 20px;
}

/* -------------------------------------------------------
   RESPONSIVE
------------------------------------------------------- */
@media (max-width: 576px) {
    .rd-title    { font-size: 22px; }
    .step-line   { width: 24px; }
    .rd-success-card { padding: 32px 20px; }
}