@font-face {
    font-family: Vazirmatn;
    src: url('vazirmatn.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: light;
    --ink: #162c26;
    --muted: #51645c;
    --line: #d7e2da;
    --green: #174c3e;
    --paper: #fff;
    --tint: #eef5ef;
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: var(--ink);
    background: #f4f6f1;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #378361; outline-offset: 3px; }
.top { background: var(--paper); border-bottom: 1px solid #e2e9e1; }
.top-inner {
    max-width: 1160px; min-height: 76px; margin-inline: auto; padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; }
.link { text-decoration: none; color: var(--green); font-weight: 700; background: #eff5ef; border: 0; border-radius: 10px; padding: 9px 13px; white-space: nowrap; }
.link:hover { background: #e2eee3; }
.shell { width: min(100% - 40px, 1112px); margin: clamp(26px, 7vw, 85px) auto; }
.register {
    display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
    border-radius: 28px; overflow: hidden; background: var(--paper);
    border: 1px solid #e3ebe2; box-shadow: 0 20px 60px #163b2210;
}
.hero {
    position: relative; isolation: isolate; overflow: hidden; color: #fcfffb;
    background: radial-gradient(ellipse at 0 100%, #2a634e, transparent 66%), #123c34;
    display: flex; align-items: center; min-height: 450px;
    padding: clamp(25px, 4.4vw, 54px);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero h1 { font-size: clamp(1.95rem, 3.7vw, 3.05rem); line-height: 1.34; margin: 13px 0 14px; }
.speakers {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
    max-width: 350px; margin-top: 20px;
}
.speakers figure { margin: 0; min-width: 0; text-align: center; }
.speakers figcaption { margin-top: 7px; color: #f9f0d6; font-weight: 750; }
.portrait {
    display: block; width: 100%; height: auto; aspect-ratio: 4 / 5;
    border-radius: 16px; outline: 1px solid #e2ca8870; object-fit: cover;
}
.age-pill { display: inline-block; margin-top: 26px; padding: 7px 14px; border-radius: 24px; border: 1px solid #dbeabf66; background: #123c34; color: #e7f0d0; font-size: .87rem; }
.hero-decoration {
    position: absolute; inset: auto -88px -146px auto; width: 400px; height: 300px;
    border-radius: 44px; transform: rotate(-30deg); opacity: .55;
    background: repeating-linear-gradient(0deg, transparent 0 17px, #c0dbc35c 18px 19px);
    mask-image: linear-gradient(transparent, black);
}
.panel { padding: clamp(24px, 4.5vw, 55px); min-width: 0; background: var(--paper); }
.panel h1, .panel h2 { font-size: clamp(1.4rem, 3.1vw, 2rem); line-height: 1.45; }
.fields { display: grid; gap: 16px; margin-top: 22px; }
.fields label, .field, .pair label { display: grid; gap: 6px; color: var(--ink); font-weight: 650; font-size: .92rem; min-width: 0; }
input:not([type=hidden]), select, textarea, .date-trigger {
    width: 100%; min-width: 0; min-height: 47px; border: 1px solid var(--line);
    border-radius: 11px; background: #fcfdfb; color: var(--ink); padding: 9px 13px; font-weight: 450;
}
input::placeholder { color: #607167; opacity: 1; }
input[type=tel] { text-align: right; }
.date-trigger { display: flex; justify-content: space-between; align-items: center; }
.date-trigger[aria-invalid=true] { border-color: #a1332d; }
.calendar-icon { width: 17px; height: 16px; border: 1.5px solid var(--green); border-radius: 4px; position: relative; }
.calendar-icon::before { content: ''; position: absolute; inset: 4px 0 auto; border-top: 1.5px solid var(--green); }
.calendar-icon::after { content: ''; position: absolute; top: -4px; right: 3px; height: 5px; width: 7px; border-inline: 1.5px solid var(--green); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; border: 0; border-radius: 11px; padding: 10px 17px;
    background: var(--green); color: #fff; text-decoration: none; font-weight: 740;
}
.button:hover { background: #103a30; }
.submit { min-height: 51px; margin-top: 6px; }
.submit span { font-size: 1.22em; }
.notice { margin-top: 16px; padding: 11px 15px; border-radius: 10px; background: var(--tint); color: var(--green); line-height: 1.8; }
.notice.error { background: #fbecea; color: #792c26; }
.notice ul { margin: 0; padding-inline-start: 19px; }
.hint, .subtitle { color: var(--muted); line-height: 1.8; }
.hint { font-size: .84rem; font-weight: 450; }
#birth-error { color: #922c25; }
.subtitle { margin-top: 7px; }
.install { max-width: 690px; }
.login { max-width: 490px; }
.install .panel, .login .panel, .dashboard .panel {
    border: 1px solid #e3ebe2; border-radius: 24px; box-shadow: 0 14px 48px #163b2210;
}
.success { min-height: 100%; display: grid; align-content: center; justify-items: center; text-align: center; gap: 13px; padding-block: 25px; }
.success p { color: var(--muted); line-height: 1.8; }
.success .button { margin-top: 5px; }
.check { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--green); font-size: 2rem; }
dialog {
    width: min(calc(100% - 24px), 378px); max-height: calc(100% - 24px); color: var(--ink);
    border: 1px solid var(--line); padding: 20px; border-radius: 20px;
    box-shadow: 0 22px 85px #0b2a2559;
}
dialog::backdrop { background: #172d28a0; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.icon-button { background: var(--tint); border: 0; border-radius: 9px; width: 36px; height: 36px; font-size: 1.5rem; line-height: 1; color: var(--ink); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.weekdays { margin-block: 15px 6px; color: var(--muted); font-size: .85rem; }
.calendar-grid button { border: 1px solid transparent; border-radius: 8px; padding: 3px 0; min-height: 37px; background: var(--tint); color: var(--ink); }
.calendar-grid button:hover:not(:disabled) { border-color: var(--green); }
.calendar-grid button[aria-pressed=true] { background: var(--green); color: #fff; }
.calendar-grid button:disabled { background: #f6f6f6; color: #747b75; cursor: default; }
dialog .hint { margin-top: 13px; }
.dashboard-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 20px 0; flex-wrap: wrap; }
.stat { display: grid; min-width: 130px; padding: 11px 16px; border-radius: 13px; background: var(--tint); color: var(--green); }
.stat strong { font-size: 1.9rem; }
.search { display: grid; gap: 6px; }
.search > div { display: flex; align-items: center; gap: 6px; }
.search .button { white-space: nowrap; }
.search a { color: var(--green); font-size: .86rem; }
.table-wrap { border: 1px solid var(--line); border-radius: 13px; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: .9rem; }
th, td { padding: 13px 12px; }
th { background: var(--tint); color: var(--green); white-space: nowrap; }
tbody tr + tr { border-top: 1px solid var(--line); }
.empty { padding: 19px; border-radius: 12px; color: var(--muted); background: var(--tint); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 750px) {
    .register { grid-template-columns: 1fr; max-width: 550px; }
    .hero { min-height: 0; }
    .speakers { max-width: 270px; }
    .hero h1 { max-width: 15em; font-size: clamp(1.65rem, 6vw, 2.35rem); }
    .age-pill { margin-top: 14px; }
}
@media (max-width: 530px) {
    .shell { width: calc(100% - 24px); }
    .top-inner { padding-inline: 12px; min-height: 62px; }
    .brand span { font-size: .81rem; }
    .brand { gap: 6px; }
    .link { font-size: .81rem; padding-inline: 8px; }
    .dashboard .panel { padding: 18px 13px; }
    .table-wrap { border: 0; overflow: visible; }
    table, tbody { display: block; }
    thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    tbody tr { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 11px; margin-top: 8px; }
    td { display: flex; gap: 8px; justify-content: space-between; padding: 6px; }
    td::before { content: attr(data-label); color: var(--muted); }
}

.seminar-questions {
    display: grid; gap: 13px; min-width: 0; margin: 2px 0 0;
    border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.seminar-questions legend { padding-inline: 6px; font-weight: 750; color: var(--green); }
.seminar-questions textarea { resize: vertical; }
.member-responses { min-width: 0; }
.member-responses summary { color: var(--green); cursor: pointer; white-space: nowrap; font-weight: 700; }
.member-responses dl { max-width: 28em; margin-bottom: 0; }
.member-responses dt { font-weight: 700; }
.member-responses dd { margin: 4px 0 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 530px) {
    .response-cell { flex-wrap: wrap; }
    .member-responses[open] { flex-basis: 100%; }
}

.stats-grid, .charts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-block: 18px;
}
.charts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart { border: 1px solid var(--line); border-radius: 13px; padding: 13px; min-width: 0; }
.panel .chart h2 { font-size: 1rem; margin-bottom: 8px; }
.chart ul { list-style: none; padding: 0 0 2px; margin: 0; max-height: 15rem; overflow: auto; }
.chart li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .86rem; }
.chart li + li { margin-top: 5px; }
.chart meter { grid-column: 1 / -1; width: 100%; height: 9px; accent-color: var(--green); }
.search-count { color: var(--muted); margin-bottom: 8px; }
@media (max-width: 750px) {
    .stats-grid, .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .register { margin-block: 14px 30px; }
    .register .hero, .register .panel { padding: 20px; }
    .register .speakers { max-width: 220px; gap: 10px; margin-top: 14px; }
    .register input, .register select, .register textarea, .register .date-trigger { font-size: 16px; }
    .register .fields { gap: 13px; }
}
@media (max-width: 400px) {
    .charts { grid-template-columns: 1fr; }
    .stat { min-width: 0; padding-inline: 10px; }
    .dashboard-tools > .button, .dashboard-tools .search { width: 100%; }
}

.hero .event-tagline {
    margin-top: -6px;
    color: #f9f0d6;
    font-size: 1.05rem;
    font-weight: 700;
}
.success p { max-width: 36ch; }
.success strong { color: var(--green); }
.event-details {
    display: grid;
    width: min(100%, 410px);
    margin: 2px 0;
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--tint);
    text-align: start;
}
.event-details > div {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 8px;
    padding-block: 9px;
}
.event-details > div + div { border-top: 1px solid var(--line); }
.event-details dt { color: var(--muted); }
.event-details dd { margin: 0; font-weight: 700; }

.question-editor {
    display: grid;
    gap: 10px;
    margin-block: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.question-editor label { display: grid; gap: 6px; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button.danger { background: #9b302d; }
.button.danger:hover { background: #762321; }
.delete-confirm { display: grid; gap: 8px; margin-top: 8px; }

.receipt-shell.register { display: block; max-width: 640px; margin-block: clamp(12px, 4vw, 45px); }
.receipt-shell .panel { padding: clamp(14px, 4vw, 32px); }
.receipt-shell .success { gap: 9px; padding-block: 8px; }
.receipt-shell .check { width: 44px; height: 44px; font-size: 1.45rem; }
.ticket-code {
    display: grid;
    gap: 4px;
    width: min(100%, 410px);
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
}
.ticket-code strong {
    color: #fff;
    font: 700 clamp(1.25rem, 5vw, 2rem) ui-monospace, monospace;
    letter-spacing: .12em;
}
#save-ticket[hidden] { display: none; }
