:root {
    --cream: #fef7ec;
    --cream-2: #f8ecd9;
    --tan: #bca185;
    --tan-d: #9c8166;
    --dark: #27221d;
    --dark-2: #4a4038;
    --red: #c02c26;
    --orange: #f58420;
    --teal: #2d9c9c;
    --line: #e6d6c0;
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--dark);
    font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    background: var(--teal) radial-gradient(ellipse at 50% 0, #38b0ae 0, var(--teal) 45%, #237f80 100%) fixed;
}
.rays { position: fixed; z-index: 0; inset: 0; width: 100%; height: 100%; opacity: .16; pointer-events: none; }
.page-shell { position: relative; z-index: 1; width: min(860px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 80px; }
.hero, .form-card, .contact-card { background: #fff; }
.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 36px 34px;
    background: #fff;
    border: 2px solid var(--dark);
    border-radius: 420px 420px var(--radius) var(--radius);
    box-shadow: 0 18px 40px rgba(0, 40, 40, .22);
}
.hero::before {
    position: absolute;
    inset: 10px;
    border: 1px solid var(--line);
    border-radius: 410px 410px 12px 12px;
    content: "";
    pointer-events: none;
}
.brand-logo { position: relative; z-index: 1; display: block; width: min(330px, 78%); height: auto; margin: 0 auto 6px; }
.hero h1 { position: relative; z-index: 1; margin: 6px 0 4px; font-size: clamp(20px, 3.2vw, 27px); font-weight: 700; }
.season { position: relative; z-index: 1; display: inline-block; padding: 2px 16px; margin-bottom: 18px; color: var(--cream); font-size: 14px; font-weight: 500; background: var(--dark); border-radius: 30px; }
.event-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 18px; }
.event-chip { display: flex; min-width: 170px; align-items: center; gap: 8px; padding: 8px 14px; font-size: 14.5px; text-align: right; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; }
.event-chip > div { flex: 1; }
.event-chip strong, .event-chip small { display: block; }
.event-chip strong { font-weight: 600; }
.event-chip small { color: var(--tan-d); font-size: 13px; line-height: 1.4; }
.diamond { display: inline-block; flex: 0 0 9px; width: 9px; height: 9px; transform: rotate(45deg); }
.diamond-red { background: var(--red); }
.diamond-teal { background: var(--teal); }
.diamond-orange { background: var(--orange); }
.hero-copy { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; color: var(--dark-2); font-size: 15px; }
.deadline { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; margin: 18px auto 0; color: var(--dark); font-size: 15px; text-align: right; background: #fff4ea; border: 1.5px solid var(--orange); border-radius: 12px; }
.deadline strong { color: var(--red); }
.progress-card { position: sticky; top: 0; z-index: 20; padding: 12px 14px 10px; margin: 18px 0 6px; color: var(--cream); font-size: 13px; background: rgba(35, 127, 128, .92); border-radius: 0 0 14px 14px; backdrop-filter: blur(6px); }
.progress-card .progress { height: 6px; margin-top: 6px; overflow: hidden; background: rgba(254, 247, 236, .25); border-radius: 6px; }
.progress-card .progress-bar { width: 0; background: linear-gradient(90deg, var(--orange), var(--cream)); transition: width .35s; }
.form-card { position: relative; padding: 26px 26px 10px; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 40, 40, .16); }
.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.section-title > span { display: grid; flex: 0 0 46px; place-items: center; height: 56px; color: #fff; font-size: 19px; font-weight: 700; background: var(--teal); border-radius: 23px 23px 8px 8px; }
.section-title h2 { margin: 0; font-size: 19.5px; font-weight: 700; }
.section-title p { margin: 0; color: var(--tan-d); font-size: 13.5px; }
.section-note { padding: 9px 14px; margin: 12px 0 4px; color: var(--dark-2); font-size: 14px; background: var(--cream); border-inline-start: 4px solid var(--orange); border-radius: 8px; }
.field-group { margin-top: 20px; margin-bottom: 20px; }
.field-group > label, .question { display: block; margin-bottom: 8px; font-size: 15.5px; font-weight: 600; }
.field-group label em { margin-inline-start: 3px; color: var(--red); font-style: normal; }
.field-group small { display: block; margin-top: 5px; color: var(--tan-d); font-size: 13px; }
.optional { padding: 0 9px; margin-inline-start: 6px; color: var(--tan-d); font-size: 12.5px; font-weight: 400; background: var(--cream); border: 1px solid var(--line); border-radius: 20px; }
.form-control, .form-select { padding: 11px 14px; color: var(--dark); font: inherit; background-color: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s; }
.form-control:focus, .form-select:focus { color: var(--dark); background: #fff; border-color: var(--tan); box-shadow: 0 0 0 4px rgba(188, 161, 133, .22); }
textarea.form-control { min-height: 110px; resize: vertical; }
textarea.form-control.short { min-height: 80px; }
.date-field { max-width: 320px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; height: 100%; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; font-size: 15px; cursor: pointer; background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; transition: .2s; }
.choice span::before { flex: 0 0 14px; width: 14px; height: 14px; background: #fff; border: 2px solid var(--tan); border-radius: 2px; content: ""; transform: rotate(45deg); transition: .2s; }
.checkbox-choice span::before { border-radius: 5px; transform: none; }
.choice input:checked + span { background: #fff; border-color: var(--dark); box-shadow: 0 2px 0 var(--dark); }
.choice input:checked + span::before { background: var(--teal); border-color: var(--teal); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(45, 156, 156, .25); }
.selection-note { padding: 7px 12px; margin-top: 9px; color: #176f6f; background: #e9f7f6; border-radius: 8px; }
.input-group .form-control { margin-bottom: 0; }
#addLink { color: var(--teal); font-weight: 600; background: transparent; border: 1.5px dashed var(--teal); border-radius: 10px; }
#addLink:hover { background: rgba(45, 156, 156, .08); }
.file-picker { position: relative; display: flex; min-height: 52px; align-items: center; overflow: hidden; color: var(--dark-2); background: var(--cream); border: 1.5px dashed var(--tan); border-radius: 12px; cursor: pointer; }
.file-picker:hover { background: #fff; border-color: var(--dark); }
.file-picker:focus-within { background: #fff; border-color: var(--tan); box-shadow: 0 0 0 4px rgba(188, 161, 133, .22); }
.file-picker:has(.file-input.error) { border-color: var(--red); }
.file-input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker-button { align-self: stretch; display: inline-flex; flex: 0 0 auto; align-items: center; padding: 8px 18px; color: var(--cream); font-size: 14px; font-weight: 600; background: var(--dark); }
.file-picker-name { min-width: 0; overflow: hidden; padding: 8px 14px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.consent-field > .question { margin-bottom: 9px; }
.consent { padding: 16px 18px; margin: 0; background: var(--cream); border: 1px solid var(--line); border-radius: 14px; }
.consent label { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 15px; cursor: pointer; }
.consent input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 5px; accent-color: var(--teal); }
label.error { display: block; margin-top: 6px; color: var(--red); font-size: 13px; font-weight: 500; }
.form-control.error, .form-select.error, .choice-field.has-error .choice span, .consent.has-error { border-color: var(--red); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.actions .btn { min-width: 180px; padding: 13px 34px; font-size: 16px; font-weight: 600; border-radius: 40px; transition: .2s; }
.actions .btn-dark { color: var(--cream); background: var(--dark); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.actions .btn-dark:hover { background: #000; }
.success-card { padding-block: 45px; }
.success-icon { display: grid; width: 76px; height: 92px; place-items: center; margin: 0 auto 12px; color: #fff; font-size: 45px; background: var(--teal); border-radius: 38px 38px 12px 12px; }
.reference { display: inline-block; padding: 7px 18px; color: var(--teal); font-size: 22px; letter-spacing: 2px; background: var(--cream); border-radius: 8px; }
.public-footer { margin-top: 58px; text-align: center; }
.contact-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 760px; align-items: center; gap: 36px; padding: 26px 38px; margin: 0 auto; color: var(--dark); text-align: right; border-radius: 26px; box-shadow: 0 15px 34px rgba(0, 40, 40, .18); }
.contact-card img { display: block; width: 260px; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.contact-copy { min-width: 0; }
.contact-card h3 { margin: 0 0 12px; font-size: 24px; font-weight: 700; }
.contact-card p { margin: 0 0 14px; color: var(--dark-2); font-size: 18px; line-height: 1.9; }
.contact-card a { display: inline-block; max-width: 100%; overflow-wrap: anywhere; color: var(--teal); font-size: 20px; font-weight: 600; line-height: 1.5; text-decoration: none; border-bottom: 2px solid currentcolor; }
.footer-thanks { margin: 38px auto 12px; color: #fff; font-size: clamp(19px, 3vw, 25px); font-weight: 700; }
.footer-diamonds { display: flex; justify-content: center; gap: 7px; }
.footer-diamonds .diamond { width: 13px; height: 13px; flex-basis: 13px; }
.developer-credit {
    position: relative;
    isolation: isolate;
    display: flex;
    width: min(360px, 100%);
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: hidden;
    padding: 4px 10px;
    margin: 18px auto 0;
    color: #fff;
    text-align: right;
    background: linear-gradient(135deg, #111827 0%, #20242d 52%, #29251d 100%);
    border: 1px solid rgba(255, 198, 67, .3);
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(0, 30, 35, .12);
}
.developer-credit-logo { display: grid; flex: 0 0 32px; width: 32px; height: 29px; place-items: center; padding: 2px; background: rgba(255, 255, 255, .05); border-radius: 6px; }
.developer-credit-logo img { display: block; width: 27px; height: auto; }
.developer-credit-logo:hover { background: rgba(255, 198, 67, .16); }
.developer-credit-logo:focus-visible { outline: 2px solid #ffc643; outline-offset: 2px; }
.developer-credit-copy { display: flex; min-width: 0; flex-direction: row; align-items: baseline; gap: 5px; white-space: nowrap; }
.developer-credit-copy span { color: #ffc643; font-size: 8px; font-weight: 600; line-height: 1.2; }
.developer-credit-copy strong { overflow: hidden; font-size: 10px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; }
@media (min-width: 641px) and (max-width: 900px) {
    .page-shell { width: calc(100% - 28px); }
    .hero { padding-inline: 28px; }
    .event-chip { min-width: 158px; }
    .form-card { padding-inline: 22px; }
    .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-card { grid-template-columns: 210px minmax(0, 1fr); gap: 25px; padding: 24px 28px; }
    .contact-card img { width: 210px; }
    .contact-card p { font-size: 16px; }
    .contact-card a { font-size: 17px; }
}
@media (max-width: 640px) {
    .page-shell { width: min(100% - 20px, 860px); padding-top: 12px; }
    .hero { padding: 56px 18px 26px; }
    .brand-logo { width: min(270px, 82%); }
    .event-chip { width: min(100%, 270px); }
    .form-card { padding: 22px 16px 6px; }
    .choice-grid { grid-template-columns: 1fr; }
    .input-group { flex-wrap: wrap; }
    .input-group > .form-control { width: 100%; flex: 1 0 100%; border-radius: 12px !important; }
    .input-group > .btn { margin-top: 6px; border-radius: 10px !important; }
    .actions .btn { width: 100%; }
    .public-footer { margin-top: 42px; }
    .contact-card { grid-template-columns: 1fr; justify-items: center; gap: 20px; padding: 23px 18px 27px; text-align: center; border-radius: 22px; }
    .contact-card img { width: min(220px, 82vw); }
    .contact-card h3 { font-size: 22px; }
    .contact-card p { font-size: 15px; line-height: 1.8; }
    .contact-card a { font-size: 15px; }
    .footer-thanks { margin-top: 28px; }
    .developer-credit { width: min(100%, 320px); gap: 6px; padding: 4px 8px; margin-top: 16px; border-radius: 8px; }
    .developer-credit-logo { flex-basis: 29px; width: 29px; height: 27px; }
    .developer-credit-logo img { width: 24px; }
    .developer-credit-copy { gap: 4px; }
    .developer-credit-copy span { font-size: 7px; }
    .developer-credit-copy strong { font-size: 9px; }
}

/* Administration */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(440px, 100%); padding: 34px; background: #fff; border: 2px solid var(--dark); border-radius: 150px 150px 20px 20px; box-shadow: 0 20px 50px rgba(0, 35, 35, .3); }
.login-card h1, .login-card > p { text-align: center; }
.admin-login-mark { display: grid; place-items: center; width: 74px; height: 88px; margin: 0 auto 12px; color: #fff; background: var(--teal); border-radius: 38px 38px 10px 10px; font-size: 38px; font-weight: 700; }
.remember-row { display: flex; align-items: center; gap: 8px; margin: 18px 0; }
.admin-password-page { min-height: calc(100vh - 75px); }
.password-card { border-radius: 22px; }
.validation-summary-valid { display: none; }
.admin-shell { min-height: 100vh; background: #f4eee5; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px max(18px, calc((100% - 1180px) / 2)); color: #fff; background: var(--dark); }
.admin-header > div, .admin-header nav, .admin-header nav form { display: flex; align-items: center; gap: 12px; margin: 0; }
.admin-header strong, .admin-header small { display: block; }
.admin-header small { color: #cdbba8; }
.admin-mark { display: grid; place-items: center; width: 42px; height: 48px; color: #fff; background: var(--teal); border-radius: 22px 22px 7px 7px; font-weight: 700; }
.admin-content { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 30px 0 60px; }
.dashboard-heading, .details-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.dashboard-heading h1, .details-top h1 { margin: 0; font-size: 30px; font-weight: 700; }
.dashboard-heading p, .details-top p { margin: 2px 0 0; color: #746456; }
.count-badge { padding: 8px 14px; color: #fff; background: var(--teal); border-radius: 30px; font-weight: 600; white-space: nowrap; }
.filter-card { display: grid; grid-template-columns: 1fr 1fr 150px auto auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.filter-card label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.data-card, .detail-section { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 7px 20px rgba(60, 40, 20, .07); }
.admin-table { margin: 0; }
.admin-table th { padding: 13px 15px; color: #6b5a4b; background: var(--cream); white-space: nowrap; }
.admin-table td { padding: 14px 15px; }
.admin-table td small { display: block; color: #8b7561; }
.type-pill { display: inline-block; padding: 3px 9px; color: #176f6f; background: #e7f6f5; border-radius: 20px; white-space: nowrap; }
.empty-state { padding: 55px 20px; text-align: center; }
.empty-state strong { font-size: 21px; }
.page-link { color: var(--dark); }
.active > .page-link { background: var(--teal); border-color: var(--teal); }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--teal); text-decoration: none; font-weight: 600; }
.detail-section { margin-top: 16px; padding: 22px; }
.detail-section h2 { margin: 0 0 16px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 20px; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.detail-grid > div { padding: 12px; background: var(--cream); border-radius: 10px; }
.detail-grid .wide { grid-column: 1 / -1; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { color: #826f5e; }
.detail-grid p { margin: 3px 0 0; white-space: pre-wrap; }
.links-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links-list a { padding: 5px 10px; color: var(--teal); background: #eef9f8; border-radius: 7px; direction: ltr; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.admin-file { overflow: hidden; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.admin-file > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-file > div:first-child { display: block; margin-bottom: 10px; }
.admin-file small { display: block; color: #826f5e; }
.admin-file img, .admin-file video, .admin-file iframe { width: 100%; height: 240px; margin-top: 12px; object-fit: contain; background: #f4f4f4; border: 0; border-radius: 8px; }
@media (max-width: 780px) {
    .admin-header, .dashboard-heading, .details-top { align-items: flex-start; flex-direction: column; }
    .filter-card { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .admin-header nav { width: 100%; }
    .admin-header nav { flex-wrap: wrap; }
    .admin-content { width: min(100% - 18px, 1180px); padding-top: 18px; }
    .dashboard-heading h1, .details-top h1 { font-size: 24px; }
    .data-card { overflow: hidden; }
    .file-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-file > div { flex-wrap: wrap; }
    .pagination { flex-wrap: wrap; gap: 3px; }
}
