:root {
    --bg: #f4f7f5;
    --card: #ffffff;
    --ink: #163a31;
    --muted: #557167;
    --line: #dbe8e2;
    --accent: #0b8f57;
    --accent-dark: #076a40;
    --danger: #b42318;
    --warning: #a15a06;
    --pending: #9a5a0b;
    --confirmed: #0b6b47;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Tajawal", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 11px;
}

.brand {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero .brand {
    font-family: "Segoe UI Black", "Arial Black", "Tajawal", sans-serif;
    font-size: 2.1rem;
    letter-spacing: 3px;
    color: #0d4033;
    text-shadow:
        0 1px 0 #ffffff,
        0 6px 14px rgba(11, 107, 71, 0.28),
        0 12px 24px rgba(0, 0, 0, 0.12);
}

.brand.small {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.subtitle {
    margin: 3px 0 8px;
    color: var(--muted);
}

.top-alerts {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfffd;
    padding: 9px;
}

.line {
    margin: 3px 0;
    line-height: 1.45;
}

.bank-box {
    margin-top: 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    padding: 8px;
}

.bank-accordion {
    padding: 0;
    overflow: hidden;
}

.bank-accordion > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    padding: 9px;
    background: #f8fbf9;
}

.bank-accordion > summary::-webkit-details-marker {
    display: none;
}

.bank-accordion[open] > summary {
    border-bottom: 1px solid var(--line);
}

.bank-accordion > *:not(summary) {
    padding: 8px;
}

.bank-title {
    margin: 0 0 6px;
    font-weight: 700;
}

.copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    border: 1px solid #e7efeb;
    border-radius: 8px;
    background: #fcfffe;
    padding: 6px;
    margin-top: 6px;
}

.copy-row code {
    font-size: 0.83rem;
    overflow-wrap: anywhere;
}

.copy-btn {
    border: 0;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.83rem;
    white-space: nowrap;
    color: #fff;
    background: #0f6f95;
}

.copy-message {
    margin: 6px 0 0;
    min-height: 18px;
    color: var(--confirmed);
    font-size: 0.85rem;
}

.qr-btn {
    margin-top: 8px;
    border: 1px dashed #cfe0d8;
    border-radius: 8px;
    background: #f8fcfa;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}

.qr-thumb {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
}

.accordion {
    border: 1px solid var(--line);
    border-radius: 11px;
    overflow: hidden;
}

.accordion > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    padding: 11px;
    background: #f8fbf9;
}

.accordion > summary::-webkit-details-marker {
    display: none;
}

.accordion[open] > summary {
    border-bottom: 1px solid var(--line);
}

.accordion > *:not(summary) {
    padding: 10px;
}

.form {
    display: grid;
    gap: 9px;
}

.compact-form {
    padding-top: 2px;
}

.field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.participant-fields {
    display: grid;
    gap: 6px;
}

.participant-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
}

input[type="text"],
input[type="password"],
select,
input[type="file"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px;
    font: inherit;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid rgba(11, 143, 87, 0.2);
    border-color: var(--accent);
}

.mode-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.radio-row,
.checkbox-row,
.option-item {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fbfffd;
    padding: 7px 8px;
}

.options-grid {
    display: grid;
    gap: 6px;
}

.options-grid.is-hidden {
    display: none;
}

.ghost-btn,
.primary-btn,
.link-btn,
.status-btn,
.admin-link {
    border: 0;
    border-radius: 9px;
    padding: 8px 10px;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ghost-btn {
    background: #e8f8ef;
    color: var(--accent-dark);
}

.primary-btn {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.link-btn,
.admin-link {
    background: #0f6f95;
    color: #fff;
}

.remove-btn {
    border: 1px solid #f7c8c8;
    border-radius: 9px;
    color: #9c1c1c;
    background: #fff4f4;
    padding: 0 12px;
}

.hint {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.amount {
    margin: 0;
    color: var(--warning);
    font-weight: 700;
    font-size: 0.95rem;
}

.message {
    min-height: 20px;
    margin: 0;
    font-size: 0.94rem;
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--confirmed);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.section-head.tight {
    margin-bottom: 8px;
}

.filters {
    display: grid;
    gap: 7px;
    margin: 8px 0;
}

.inline-field span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.sessions-board {
    display: grid;
    gap: 8px;
}

.session-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.session-summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 9px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.session-summary::-webkit-details-marker {
    display: none;
}

.session-card[open] .session-summary {
    border-bottom: 1px solid var(--line);
}

.session-title {
    margin: 0;
    font-size: 0.96rem;
}

.session-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.attendees {
    display: grid;
    gap: 5px;
    padding: 8px;
}

.attendee-row {
    border: 1px solid #e6efea;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: #fff;
}

.attendee-name {
    font-weight: 600;
    font-size: 0.94rem;
}

.attendee-main {
    min-width: 0;
}

.attendee-meta {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.receipt-link {
    color: #0f6f95;
    font-weight: 700;
    text-decoration: none;
}

.attendee-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill {
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    padding: 2px 8px;
}

.status-pill.pending {
    background: var(--pending);
}

.status-pill.confirmed {
    background: var(--confirmed);
}

.status-btn {
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 8px;
}

.status-btn.pending {
    background: var(--confirmed);
}

.status-btn.confirmed {
    background: var(--pending);
}

.status-btn.danger-btn {
    background: #b42318;
    color: #fff;
}

.text-link {
    color: #0f6f95;
    font-weight: 700;
}

.empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.login-card {
    max-width: 420px;
    margin: 26px auto;
}

.login-actions {
    display: flex;
    gap: 7px;
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 9999;
}

.qr-modal.is-open {
    display: flex;
}

.qr-modal[hidden] {
    display: none !important;
}

.qr-modal-content {
    width: min(96vw, 760px);
    max-height: 95vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 9px;
}

.qr-close {
    justify-self: end;
    border: 0;
    border-radius: 8px;
    padding: 7px 11px;
    cursor: pointer;
    background: #dc2626;
    color: #ffffff;
    font: inherit;
}

.qr-full-image {
    width: 100%;
    max-height: calc(95vh - 60px);
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}

.animate-up {
    animation: rise 0.35s ease both;
}

.delay-1 {
    animation-delay: 0.05s;
}

.delay-2 {
    animation-delay: 0.1s;
}

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

@media (min-width: 640px) {
    .page {
        padding: 12px;
    }

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

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