/* ============================================================
   Qurban Abu Darda 1447H - Main Stylesheet
   ============================================================ */

:root {
    --green-deep: #10382c;
    --green-main: #1a5c38;
    --green-light: #2d8f5d;
    --green-pale: #edf7f1;
    --emerald-soft: #cfe7d8;
    --sand: #efe4d1;
    --sand-deep: #d7b98a;
    --copper: #9b5d2d;
    --gold: #c49a3b;
    --gold-light: #ecd08a;
    --white: #ffffff;
    --ink: #1b2623;
    --slate: #516166;
    --muted: #7f8d92;
    --gray-50: #faf9f6;
    --gray-100: #f3efe7;
    --gray-200: #dfddd5;
    --gray-300: #cbc9bf;
    --gray-400: #8e948f;
    --gray-600: #556067;
    --red: #b84d3f;
    --shadow-soft: 0 18px 50px rgba(16, 56, 44, 0.12);
    --shadow-card: 0 12px 30px rgba(19, 54, 43, 0.12);
    --shadow-focus: 0 0 0 4px rgba(45, 143, 93, 0.14);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 14px;
    --font-body: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.65;
    background:
        radial-gradient(circle at top left, rgba(196, 154, 59, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(26, 92, 56, 0.16), transparent 24%),
        linear-gradient(180deg, #f9f4ea 0%, #f4efe5 44%, #eef4ef 100%);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 60%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 60%);
    pointer-events: none;
    opacity: 0.24;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.site-header,
.admin-header,
.card,
.info-box,
.warn-box,
.kode-box {
    animation: fadeUp 0.55s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.site-header {
    position: relative;
    max-width: 1040px;
    margin: 24px auto 0;
    padding: 28px 22px 24px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.16), transparent 32%),
        linear-gradient(135deg, #0f3429 0%, #1a5c38 58%, #2f8b61 100%);
    color: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.site-header::before {
    width: 220px;
    height: 220px;
    right: -50px;
    top: -100px;
}

.site-header::after {
    width: 160px;
    height: 160px;
    left: -60px;
    bottom: -90px;
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 16px;
    text-align: center;
}

.brand-mark {
    width: 132px;
    height: 132px;
    padding: 14px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 238, 226, 0.94));
    box-shadow:
        0 18px 38px rgba(8, 26, 20, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(16, 56, 44, 0.22));
}

.brand-copy {
    max-width: 640px;
}

.site-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.site-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 0 4px rgba(236, 208, 138, 0.18);
}

.site-header .arabic {
    font-size: 22px;
    letter-spacing: 0.12em;
    color: rgba(255, 245, 221, 0.92);
    margin-bottom: 8px;
}

.site-header h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.site-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
}

/* Containers */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 28px 16px 42px;
}

.admin-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 16px 42px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 26px 22px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(26, 92, 56, 0.12);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--green-deep);
}

.card-title .icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(196, 154, 59, 0.18), rgba(26, 92, 56, 0.14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    font-size: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 22px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, #1b6845 0%, #2e9562 100%);
    box-shadow: 0 14px 24px rgba(27, 104, 69, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 18px 28px rgba(27, 104, 69, 0.28);
}

.btn-sapi,
.btn-kambing {
    min-height: 82px;
    justify-content: flex-start;
    padding: 18px 22px;
    border-radius: 22px;
    box-shadow: 0 16px 26px rgba(16, 56, 44, 0.18);
    position: relative;
    overflow: hidden;
}

.btn-sapi::after,
.btn-kambing::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.btn-sapi {
    color: var(--white);
    background: linear-gradient(135deg, #164f36 0%, #24744b 56%, #3aa16d 100%);
    margin-bottom: 14px;
}

.btn-kambing {
    color: var(--white);
    background: linear-gradient(135deg, #7b4e1f 0%, #a86a2b 58%, #cf9241 100%);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.72);
    color: var(--green-main);
    border: 1px solid rgba(26, 92, 56, 0.22);
    box-shadow: 0 10px 22px rgba(34, 52, 43, 0.08);
}

.btn-outline:hover {
    background: rgba(237, 247, 241, 0.92);
}

.btn-danger {
    color: var(--white);
    background: linear-gradient(135deg, #a93e31 0%, #c65345 100%);
}

.btn-sm {
    width: auto;
    min-height: 0;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 13px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green-deep);
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(16, 56, 44, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font-size: 15px;
    appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(45, 143, 93, 0.7);
    box-shadow: var(--shadow-focus);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.hp-input-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hp-digit {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    border: 1px solid rgba(16, 56, 44, 0.15);
    background: rgba(255, 255, 255, 0.98);
    color: var(--green-deep);
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hp-digit:focus {
    outline: none;
    border-color: rgba(45, 143, 93, 0.72);
    box-shadow: var(--shadow-focus);
}

/* Checkboxes */
.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.check-card,
.radio-card {
    position: relative;
}

.check-card input[type="checkbox"],
.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-card label,
.radio-card label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(16, 56, 44, 0.12);
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.check-card label:hover,
.radio-card label:hover,
.name-item:hover,
.sapi-btn:hover {
    transform: translateY(-1px);
}

.check-card input:checked + label,
.radio-card input:checked + label {
    border-color: rgba(45, 143, 93, 0.48);
    background: linear-gradient(180deg, #f3fbf6 0%, #ebf6ef 100%);
    box-shadow: 0 10px 20px rgba(34, 92, 60, 0.1);
}

.check-card label .cb-icon {
    font-size: 20px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-card label .r-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--green-deep);
    font-weight: 800;
}

.radio-card input:checked + label .r-num {
    background: linear-gradient(135deg, var(--green-main), var(--green-light));
    color: var(--white);
}

/* Info boxes */
.info-box,
.warn-box,
.alert {
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 24px rgba(23, 39, 31, 0.05);
}

.info-box {
    background: linear-gradient(135deg, rgba(237, 247, 241, 0.98), rgba(250, 250, 244, 0.96));
    border: 1px solid rgba(26, 92, 56, 0.1);
    color: var(--gray-600);
}

.info-box strong {
    color: var(--green-deep);
}

.info-box ul {
    padding-left: 18px;
    margin-top: 6px;
}

.warn-box {
    background: linear-gradient(135deg, rgba(255, 247, 229, 0.98), rgba(251, 241, 214, 0.96));
    border: 1px solid rgba(196, 154, 59, 0.22);
    color: #745523;
}

.alert {
    font-size: 14px;
}

.alert-error {
    background: linear-gradient(135deg, #fff3f1, #fce8e4);
    border: 1px solid rgba(184, 77, 63, 0.16);
    color: #9b3c31;
}

.alert-success {
    background: linear-gradient(135deg, #eef8f1, #dff0e5);
    border: 1px solid rgba(45, 143, 93, 0.18);
    color: var(--green-deep);
}

/* Success code */
.kode-box {
    position: relative;
    overflow: hidden;
    margin: 22px 0;
    padding: 30px 24px;
    border-radius: 26px;
    text-align: center;
    color: var(--white);
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.15), transparent 30%),
        linear-gradient(135deg, #0f3429 0%, #1a5c38 55%, #2d8f5d 100%);
    box-shadow: 0 22px 40px rgba(15, 52, 41, 0.22);
}

.kode-box::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.kode-box .label {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.kode-box .kode {
    margin: 14px 0 10px;
    font-family: "Courier New", monospace;
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.kode-box .nama {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.84);
}

/* Step indicator */
.step-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(26, 92, 56, 0.12);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

.step-dot.active {
    background: linear-gradient(135deg, var(--gold), var(--sand-deep));
}

.step-dot.done {
    background: linear-gradient(135deg, var(--green-main), var(--green-light));
}

/* Lists */
.name-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.name-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 18px;
    border: 1px solid rgba(16, 56, 44, 0.1);
    background: rgba(255, 255, 255, 0.96);
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.name-item .num {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(26, 92, 56, 0.12), rgba(196, 154, 59, 0.12));
    color: var(--green-deep);
    font-size: 13px;
    font-weight: 800;
}

.name-item .info {
    flex: 1;
}

.name-item .info .bagian {
    font-size: 12px;
    color: var(--gray-400);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--gray-400);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 56, 44, 0.16), transparent);
}

/* Sapi grid */
.sapi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sapi-btn {
    padding: 13px 6px;
    border-radius: 16px;
    border: 1px solid rgba(16, 56, 44, 0.12);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sapi-btn.selected {
    color: var(--white);
    border-color: rgba(26, 92, 56, 0.2);
    background: linear-gradient(135deg, var(--green-main), var(--green-light));
    box-shadow: 0 12px 22px rgba(26, 92, 56, 0.22);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 12px 20px 28px;
    color: var(--gray-400);
    font-size: 12px;
}

/* Admin */
.admin-header {
    max-width: 1120px;
    margin: 24px auto 0;
    padding: 18px 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(135deg, #123b2e 0%, #19563b 55%, #2a7d55 100%);
    color: var(--white);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-logo-wrap {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    padding: 8px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 238, 226, 0.92));
    box-shadow: 0 14px 24px rgba(7, 21, 17, 0.22);
}

.admin-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.1;
}

.admin-eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.admin-header > a {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.82);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.admin-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--green-deep);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(20, 43, 34, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: linear-gradient(135deg, var(--green-main), var(--green-light));
    color: var(--white);
    transform: translateY(-1px);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

th {
    background: linear-gradient(135deg, #143f31 0%, #1b5b3f 100%);
    color: var(--white);
    padding: 11px 12px;
    text-align: left;
    font-weight: 700;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(16, 56, 44, 0.08);
    vertical-align: top;
    background: rgba(255, 255, 255, 0.82);
}

tr:hover td {
    background: rgba(237, 247, 241, 0.72);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-green {
    background: rgba(45, 143, 93, 0.12);
    color: var(--green-deep);
}

.badge-gold {
    background: rgba(196, 154, 59, 0.16);
    color: #735116;
}

.badge-red {
    background: rgba(184, 77, 63, 0.12);
    color: #9b3c31;
}

.badge-gray {
    background: rgba(81, 97, 102, 0.1);
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 820px) {
    .site-header,
    .admin-header {
        margin-top: 16px;
        border-radius: 22px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .brand-mark {
        width: 88px;
        height: 88px;
        padding: 10px;
        border-radius: 24px;
    }

    .brand-lockup {
        gap: 12px;
    }

    .site-header .arabic {
        font-size: 18px;
    }

    .card,
    .site-header {
        padding-left: 18px;
        padding-right: 18px;
    }

    .check-grid {
        grid-template-columns: 1fr;
    }

    .sapi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hp-digit {
        width: 58px;
        height: 58px;
        font-size: 24px;
    }
}

@media (max-width: 420px) {
    .container,
    .admin-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand-mark {
        width: 76px;
        height: 76px;
        padding: 8px;
        border-radius: 20px;
    }

    .site-chip {
        font-size: 10px;
        letter-spacing: 0.12em;
        padding: 6px 12px;
    }

    .site-header h1 {
        font-size: clamp(24px, 8vw, 30px);
    }

    .btn-sapi,
    .btn-kambing {
        min-height: 76px;
    }

    .kode-box .kode {
        letter-spacing: 0.08em;
    }
}
