@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@400;500;700&display=swap');

:root {
    --ink: #14312B;
    --ink-light: #1E4A40;
    --gold: #C9932B;
    --gold-light: #E3B85C;
    --gold-tint: #FBF0DB;
    --cream: #FBF7EE;
    --rust: #A64B2A;
    --rust-tint: #FBE3DA;
    --green-tint: #E4F0E9;
    --green-text: #1E5C3F;
    --charcoal: #22201B;
    --muted: #6B6558;
    --border: #E5DFD0;
    --card: #FFFFFF;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Amiri', serif; }

a { color: var(--rust); }

/* ===== Layout shells ===== */
.page-wrap { max-width: 480px; margin: 0 auto; padding: 0 0 40px; }
.page-pad { padding: 0 20px; }

header.site-header {
    background: var(--ink);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header.site-header .brand {
    color: var(--cream);
    font-family: 'Amiri', serif;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}
header.site-header nav a {
    color: var(--gold-light);
    text-decoration: none;
    font-size: 13px;
    margin-right: 14px;
}

footer.site-footer {
    background: var(--ink);
    color: #B9AF95;
    text-align: center;
    padding: 24px 20px;
    font-size: 12px;
    margin-top: 40px;
}
footer.site-footer a { color: var(--gold-light); text-decoration: none; margin: 0 8px; }

/* ===== Cards & sections ===== */
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(20,49,43,0.08);
    margin-bottom: 14px;
}
.section-title {
    font-size: 20px;
    color: var(--ink);
    text-align: center;
    margin: 28px 0 6px;
}
.section-sub {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}

/* ===== Forms ===== */
label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 16px 0 6px;
}
label:first-of-type { margin-top: 0; }

input[type=text], input[type=tel], input[type=password], input[type=email],
input[type=date], input[type=time], input[type=number], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--cream);
    font-family: 'Tajawal', sans-serif;
}

.choice-group { display: flex; gap: 8px; margin-top: 6px; }
.choice-group label {
    flex: 1; margin: 0; text-align: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 4px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    color: var(--charcoal);
    background: var(--card);
}
.choice-group input { display: none; }
.choice-group label:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-tint);
    color: var(--rust);
    font-weight: 700;
}

/* ===== Buttons ===== */
.btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--ink);
    color: var(--gold-light);
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-danger { background: var(--rust-tint); color: var(--rust); }
.btn-success { background: var(--green-tint); color: var(--green-text); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ===== Messages ===== */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error { background: var(--rust-tint); color: var(--rust); }
.alert-success { background: var(--green-tint); color: var(--green-text); }
.alert-info { background: #E4EEF5; color: #1E4A6B; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.badge-pending { background: #FBF0DB; color: #8A6314; }
.badge-approved { background: var(--green-tint); color: var(--green-text); }
.badge-rejected { background: var(--rust-tint); color: var(--rust); }

/* ===== Misc ===== */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eee; }
.avatar-lg { width: 100%; height: 240px; border-radius: 16px; object-fit: cover; background: #eee; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--rust); text-decoration: none; font-size: 14px; }

.sticky-counter {
    position: sticky; top: 0; z-index: 10;
    background: var(--ink); color: var(--gold-light);
    padding: 12px 16px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; font-weight: 700;
    margin-bottom: 16px;
}

.float-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card); padding: 14px 16px;
    box-shadow: 0 -2px 10px rgba(20,49,43,0.1);
    display: flex; gap: 10px;
}
