/* الموقع الرسمي للرابطة — واجهة عامة، لا لوحة تحكم.
 *
 * Deliberately not the dashboard's stylesheet. The people who open this page
 * are candidates and parents, most of them on a phone, most of them once;
 * they need one obvious thing to do per screen, not a sidebar of 27 registers.
 */

:root {
    --p-green: #0b5c3f;
    --p-green-dark: #084430;
    --p-green-soft: #e8f3ee;
    --p-ink: #101828;
    --p-muted: #667085;
    --p-line: #e4e7ec;
    --p-bg: #f8fafb;
}

* { box-sizing: border-box; }

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

.container { width: min(1080px, 100% - 2rem); margin-inline: auto; }

/* ------------------------------------------------------------------- header */

.site-head {
    background: #fff;
    border-bottom: 1px solid var(--p-line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-head .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-block: .75rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.site-emblems { display: flex; align-items: center; gap: .4rem; flex: 0 0 auto; }
.site-emblems img { width: 42px; height: 42px; object-fit: contain; }
.site-emblems i { font-size: 1.9rem; color: var(--p-green); }

.site-name { display: block; font-weight: 700; line-height: 1.25; }
.site-sub { display: block; font-size: .82rem; color: var(--p-muted); }

.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }

.site-nav a {
    padding: .45rem .9rem;
    border-radius: .5rem;
    text-decoration: none;
    color: var(--p-ink);
    font-weight: 600;
    font-size: .95rem;
}

.site-nav a:hover { background: var(--p-green-soft); color: var(--p-green); }

/* --------------------------------------------------------------------- body */

.site-main { padding-block: 2rem 3rem; min-height: 60vh; }

.hero {
    background: linear-gradient(135deg, var(--p-green) 0%, var(--p-green-dark) 100%);
    color: #fff;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

.hero h1 { margin: 0 0 .5rem; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; }
.hero p { margin: 0; opacity: .92; max-width: 60ch; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .25);
}

.hero-stats .n { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.hero-stats .l { font-size: .85rem; opacity: .85; }

.section-title { font-size: 1.3rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.section-lead { color: var(--p-muted); margin: -0.5rem 0 1.25rem; }

/* ------------------------------------------------------------- action cards */

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.choice {
    display: block;
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.choice:hover {
    transform: translateY(-3px);
    border-color: var(--p-green);
    box-shadow: 0 .75rem 1.5rem rgba(11, 92, 63, .10);
}

.choice i { font-size: 2rem; color: var(--p-green); display: block; margin-bottom: .6rem; }
.choice h3 { margin: 0 0 .3rem; font-size: 1.1rem; font-weight: 700; }
.choice p { margin: 0; color: var(--p-muted); font-size: .9rem; }

/* A club joining is not a fourth kind of person — it is an organisation
 * applying, and it was landing alone on a second row looking like an
 * afterthought. Given the full width and laid out sideways, it reads as the
 * separate act it is. */
.choice.is-club {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--p-green-soft);
    border-color: transparent;
}

.choice.is-club i { margin-bottom: 0; flex: 0 0 auto; font-size: 2.25rem; }

.panel {
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: 1rem;
    padding: 1.5rem;
}

.panel + .panel { margin-top: 1rem; }

/* ------------------------------------------------------------------- forms */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem 1.25rem;
}

.form-grid .wide { grid-column: 1 / -1; }

.field label { font-weight: 600; font-size: .92rem; margin-bottom: .3rem; display: block; }
.field .help { font-size: .82rem; color: var(--p-muted); margin-top: .25rem; }
.field .err { font-size: .85rem; color: #b42318; margin-top: .25rem; }
.req { color: #b42318; }

.btn-main {
    background: var(--p-green);
    color: #fff;
    border: 0;
    border-radius: .6rem;
    padding: .8rem 2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-main:hover { background: var(--p-green-dark); }
.btn-main:disabled { opacity: .6; cursor: progress; }

.btn-plain {
    display: inline-block;
    background: #fff;
    color: var(--p-ink);
    border: 1px solid var(--p-line);
    border-radius: .6rem;
    padding: .8rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
}

/* ------------------------------------------------------------------ status */

.status-badge {
    display: inline-block;
    padding: .3rem .9rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: .9rem;
}

.status-submitted { background: #e0eaff; color: #1e40af; }
.status-reviewing  { background: #cff4fc; color: #055160; }
.status-correction { background: #fff3cd; color: #7a5b00; }
.status-accepted   { background: #d1f0e0; color: #0b5c3f; }
.status-rejected   { background: #fde2e1; color: #b42318; }

.ticket {
    background: var(--p-green-soft);
    border: 2px dashed var(--p-green);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin-block: 1.5rem;
}

.ticket .code {
    font-size: 1.6rem;
    font-weight: 800;
    direction: ltr;
    letter-spacing: .5px;
    color: var(--p-green);
}

.ticket .token {
    font-family: ui-monospace, "Courier New", monospace;
    direction: ltr;
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: .4rem;
    padding: .35rem .8rem;
    display: inline-block;
    margin-top: .4rem;
    user-select: all;
}

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
    position: relative;
    padding: 0 1.5rem 1.25rem 0;
    border-inline-start: 2px solid var(--p-line);
    margin-inline-start: .4rem;
}

.timeline li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }

.timeline li::before {
    content: "";
    position: absolute;
    inset-inline-start: -7px;
    top: .35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--p-green);
}

.timeline .when { font-size: .8rem; color: var(--p-muted); direction: ltr; display: inline-block; }
.timeline .what { font-weight: 600; }
.timeline .note { color: var(--p-muted); font-size: .9rem; }

.notice {
    border-inline-start: 4px solid var(--p-green);
    background: var(--p-green-soft);
    padding: 1rem 1.25rem;
    border-radius: .6rem;
}

.notice.warn { border-color: #d99400; background: #fff8e6; }
.notice.bad { border-color: #b42318; background: #fdeceb; }

/* ------------------------------------------------------------------ footer */

.site-foot {
    background: #fff;
    border-top: 1px solid var(--p-line);
    padding-block: 1.75rem;
    color: var(--p-muted);
    font-size: .9rem;
}

.site-foot .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-foot-note { text-align: end; }

/* ------------------------------------------------------------------- lists */

.club-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }

.club-list li {
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: 2rem;
    padding: .35rem 1rem;
    font-size: .9rem;
}

.event-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .7rem 0;
    border-bottom: 1px dashed var(--p-line);
}

.event-row:last-child { border-bottom: 0; }
.event-row .date { color: var(--p-green); font-weight: 700; direction: ltr; white-space: nowrap; }

@media (max-width: 560px) {
    .hero { padding: 1.75rem 1.25rem; }
    .site-foot-note { text-align: start; }
}
