:root {
    --paper: #f4efe6;
    --ink: #17233f;
    --ink-soft: #5d6b84;
    --navy: #1b2f5b;
    --line: #e4dccb;
    --gold: #a8833d;
    --gold-soft: #f3e7cf;
    --danger: #8c3030;
    --ok: #1d6b48;
    --shadow: 0 16px 40px rgba(23, 35, 63, 0.08);
    --font: Vazirmatn, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font);
    background: var(--paper);
    line-height: 1.7;
}
img, video, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
button { cursor: pointer; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.wordmark {
    color: var(--ink);
    font-weight: 800;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    letter-spacing: 0;
}
.text-link { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.text-link:hover { color: var(--ink); }

.landing {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #e7dfcf;
}
.land-top, .land-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
}
.land-stage {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 4px 20px 12px;
}
.land-stage img {
    width: auto;
    height: auto;
    max-width: min(520px, calc(100vw - 40px));
    max-height: calc(100vh - 148px);
    object-fit: contain;
    box-shadow: 0 22px 60px rgba(23, 35, 63, 0.18);
}
.land-dock {
    background: rgba(255, 252, 247, 0.94);
    border-top: 1px solid rgba(23, 35, 63, 0.08);
}
.dock-copy { display: flex; flex-direction: column; line-height: 1.35; }
.dock-copy span { color: var(--ink-soft); font-size: 13px; }
.dock-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.site-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 239, 230, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(23, 35, 63, 0.08);
}
.site-bar-inner {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.bar-nav {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 253, 251, 0.8);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.bar-nav a {
    text-decoration: none;
    font-weight: 650;
    font-size: 13px;
    line-height: 1.2;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--ink-soft);
}
.bar-nav a:hover { color: var(--ink); }
.bar-nav a.is-on { background: var(--navy); color: #f7f1e6; }
.colophon {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 28px 28px;
    color: var(--ink-soft);
    font-size: 13px;
}

.apply {
    width: min(1080px, calc(100% - 40px));
    margin: 18px auto 36px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.brief {
    position: sticky;
    top: 16px;
    background: #fffdfb;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}
.brief-poster { display: block; background: #e7dfcf; }
.brief-poster img { display: block; width: 100%; height: 210px; object-fit: cover; object-position: top; }
.brief-body { padding: 16px 16px 18px; }
.kicker { margin: 0; color: var(--gold); font-size: 13px; font-weight: 700; }
.brief-facts { margin: 12px 0; }
.brief-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.brief-facts dt { color: var(--ink-soft); }
.brief-facts dd { margin: 0; font-weight: 700; }
.brief-rules { margin: 0; padding: 0 18px 0 0; color: var(--ink-soft); font-size: 13px; }
.brief-rules li { margin: 6px 0; }
.brief-wa { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 13px; }

.sheet, .panel, .ticket, .card {
    background: #fffdfb;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.sheet { padding: 8px 28px 28px; }
.sheet-head h1, .panel-head h2, .ticket h1, .admin-top h1 { margin: 4px 0 8px; letter-spacing: 0; }
.sheet-head p, .panel-head p, .ticket-lead { margin: 0; color: var(--ink-soft); }
.sheet-head { padding: 22px 0 6px; }
.block { padding: 8px 0 4px; }
.block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 8px;
    font-size: 16px;
}
.block h2 span { color: var(--gold); font-size: 12px; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field span, .filters .field span { font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.field input, .field select, .field textarea, .filters input, .filters select {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd3c2;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(27, 47, 91, 0.08);
}
.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.field-error { color: var(--danger); font-size: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 14px; }
.check input { margin-top: 5px; accent-color: var(--navy); }
.dropzone {
    margin-top: 14px;
    border: 1px solid #ddd3c2;
    background: #faf7f1;
    border-radius: 16px;
    min-height: 148px;
    padding: 22px;
    text-align: center;
    position: relative;
}
.dropzone.drag, .dropzone:focus-within { border-color: var(--navy); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.drop-file { position: relative; z-index: 2; }
.drop-idle p, .file-name { margin: 0; }
.drop-idle small, .file-meta, .file-status, .muted, .today-line { color: var(--ink-soft); }
.dropzone.done { border-color: var(--ok); background: #f4faf6; }
.dropzone.error { border-color: var(--danger); background: #fdf6f4; }
.progress { height: 6px; border-radius: 99px; background: #e7dece; overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; width: 0; background: var(--navy); }
.btn-text { background: none; border: 0; color: var(--navy); font-weight: 700; padding: 8px; }
.captcha-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 8px 0 18px; }
.captcha-box img { border-radius: 12px; border: 1px solid var(--line); background: white; }
.captcha-input { min-width: 160px; letter-spacing: .16em; text-transform: uppercase; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-weight: 750;
    border-radius: 12px;
    text-decoration: none;
    border: 0;
}
.btn-gold { background: var(--navy); color: #f7f1e6; }
.btn-gold:hover { background: #243a6e; }
.btn-gold.is-disabled { opacity: .55; }
.btn-ghost, .btn-quiet {
    background: transparent;
    border: 1px solid #d9d0c0;
    color: var(--ink);
    padding: 11px 16px;
}
.btn-danger { background: var(--danger); color: white; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.banner {
    margin-top: 14px;
    background: #f8ece4;
    color: #6d2d2d;
    border-radius: 12px;
    padding: 12px 14px;
}
.panel-head, .card { padding: 22px; }
.panel-head {
    background: transparent;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
}
.panel-body { padding: 8px 22px 26px; }
.narrow, .ticket-wrap { width: min(680px, calc(100% - 32px)); margin: 28px auto 48px; }
.ticket { padding: 36px 32px; text-align: center; }
.tracking {
    margin: 18px 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: .12em;
    direction: ltr;
}
.ticket-meta, .detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; text-align: right; }
.ticket-meta div, .detail-list div { background: #f7f3eb; border-radius: 12px; padding: 10px 12px; }
.ticket-meta dt, .detail-list dt { color: var(--ink-soft); font-size: 12px; }
.ticket-meta dd, .detail-list dd { margin: 2px 0 0; font-weight: 700; }
.ticket-foot { color: var(--ink-soft); }
.hero-actions, .dialog-actions, .ticket .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.track-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.tracking-input { font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.track-head, .card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.track-head h3, .card h3 { margin: 0; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 16px 0; }
.steps li { flex: 1; text-align: center; background: #f7f3eb; border-radius: 12px; padding: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.steps li.done { background: var(--gold-soft); color: var(--navy); }
.steps li.bad { background: #f3d6d6; color: var(--danger); }
.note { background: var(--gold-soft); border-radius: 12px; padding: 12px 14px; }
.note p { margin: 4px 0 0; white-space: pre-wrap; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; background: var(--gold-soft); color: var(--navy); }
.badge-reviewing { background: #d9e3f5; }
.badge-accepted { background: #d7efe4; color: var(--ok); }
.badge-rejected { background: #f3d6d6; color: var(--danger); }
.eyebrow { margin: 0; color: var(--gold); font-weight: 700; font-size: 13px; }
.eyebrow.light { color: var(--gold); }

.login-body { display: grid; place-items: center; min-height: 100vh; background: #e7dfcf; }
.login-wrap { width: min(420px, calc(100% - 32px)); }
.login-card .panel-head { border-bottom: 0; padding-bottom: 0; }
.brand, .side-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-seal {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; background: var(--navy); color: #e7c98a; font-weight: 800;
}
.brand-text, .side-brand span { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text small, .side-brand small { color: var(--ink-soft); font-size: 12px; }

.admin-body { margin: 0; background: #f3eee6; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
    background: var(--navy);
    color: #f7f1e6;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand-seal { background: #c6a15a; color: var(--navy); }
.sidebar small { color: rgba(247, 241, 230, .7); }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.side-nav a {
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(247, 241, 230, .86);
}
.side-nav a.active, .side-nav a:hover { background: rgba(255, 255, 255, .08); color: white; }
.side-nav em { font-style: normal; background: #c6a15a; color: var(--navy); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.side-user { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.side-user small { display: block; direction: ltr; text-align: right; }
.side-user .btn-quiet { color: #f7f1e6; border-color: rgba(255,255,255,.25); }
.admin-main { padding: 28px 32px 48px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.admin-top h1 { font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 18px 0; }
.stats article { background: #fffdfb; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stats span { display: block; color: var(--ink-soft); font-size: 13px; }
.stats strong { font-size: 28px; }
.admin-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }
.detail-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: start; }
.card h2 { font-size: 18px; margin-top: 0; }
.card a { font-weight: 750; font-size: 14px; }
.bar-row { margin: 12px 0; }
.bar-row div:first-child { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 6px; background: #efe7da; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--ink-soft); font-size: 12px; }
td small { display: block; color: var(--ink-soft); direction: ltr; text-align: right; }
td a { font-weight: 750; text-decoration: none; }
tr:hover td { background: #faf6ee; }
.empty { padding: 28px 8px; text-align: center; }
.empty strong { display: block; font-size: 18px; }
.filters { display: grid; grid-template-columns: 1.4fr .7fr .8fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters .field { margin-top: 0; }
.stack, .stack-form { display: flex; flex-direction: column; gap: 16px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0; }
.video-card video { width: 100%; border-radius: 14px; background: #111; max-height: 640px; }
.danger-card p { color: var(--ink-soft); }
dialog { border: 0; border-radius: 16px; padding: 22px; width: min(420px, calc(100% - 24px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(23, 35, 63, .45); }
.toast { background: #e5f4ec; color: var(--ok); padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 700; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding-top: 14px; }
.pager a, .pager span { text-decoration: none; font-weight: 700; }
.pager-disabled { color: var(--ink-soft); }

@media (max-width: 980px) {
    .apply, .admin-grid, .detail-grid, .facts { grid-template-columns: 1fr; }
    .brief { position: static; display: grid; grid-template-columns: 96px 1fr; }
    .brief-poster img { height: 100%; min-height: 140px; }
    .brief-rules { display: none; }
    .stats { grid-template-columns: repeat(3, 1fr); }
    .filters { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .land-top, .land-dock { padding-inline: 16px; }
    .site-bar-inner { width: min(100% - 24px, 1080px); min-height: 56px; }
    .land-dock, .dock-actions { flex-direction: column; align-items: stretch; }
    .dock-actions .btn { width: 100%; }
    .land-stage img { max-height: none; max-width: min(100%, 460px); }
    .grid-2, .ticket-meta, .detail-list, .track-form, .stats { grid-template-columns: 1fr; }
    .sheet { padding-inline: 16px; }
    .apply { width: min(100% - 24px, 720px); }
    .brief { grid-template-columns: 72px 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .side-nav { flex-direction: row; flex-wrap: wrap; margin-top: 14px; }
    .side-user { margin-top: 16px; }
    .admin-main { padding: 18px 14px 40px; }
    .bar-nav a { padding: 7px 12px; }
}
@media print {
    .site-bar, .colophon, .land-dock, .brief { display: none !important; }
    .ticket, .land-stage img { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
