/* AIR Salzburg Awards — application styles.
   One sheet, responsive (desktop / tablet / mobile), no framework dependency. */

:root {
    --ink: #14181f;
    --ink-soft: #4a5462;
    --line: #e2e6ec;
    --bg: #f6f8fb;
    --card: #ffffff;
    --brand: #0f2a4a;      /* deep alpine blue */
    --brand-600: #163a63;
    --accent: #e8532b;     /* warm sunset accent */
    --accent-soft: #fdece6;
    --ok: #1f8a5b;
    --warn: #b8860b;
    --err: #c1332d;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); }
h1, h2, h3 { line-height: 1.2; color: var(--ink); }
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header / footer */
.site-header { background: var(--brand); color: #fff; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .3px; font-size: 1.15rem; }
.brand span { opacity: .7; font-weight: 400; }
.lang-switch a { color: #cdd7e5; text-decoration: none; margin-left: 14px; font-size: .85rem; font-weight: 600; }
.lang-switch a.is-active { color: #fff; text-decoration: underline; }
.site-main { padding: 32px 20px 64px; }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; padding: 20px 0; }

/* Flash */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .92rem; }
.flash--success { background: #e6f5ee; color: var(--ok); }
.flash--error { background: #fbe9e8; color: var(--err); }
.flash--info { background: #eef2f8; color: var(--brand-600); }

/* Form intro */
.form-intro h1 { margin: 0 0 6px; font-size: 1.7rem; }
.form-intro p { color: var(--ink-soft); margin: 0 0 24px; }

/* Steps indicator */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 28px; counter-reset: step; }
.steps li { flex: 1 1 120px; font-size: .78rem; color: var(--ink-soft); padding: 10px 12px; background: var(--card);
    border: 1px solid var(--line); border-radius: 10px; position: relative; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--ink-soft); font-weight: 700; margin-right: 8px; font-size: .72rem; }
.steps li.is-active { border-color: var(--brand); color: var(--ink); font-weight: 600; }
.steps li.is-active::before { background: var(--brand); color: #fff; }
.steps li.is-done::before { background: var(--ok); color: #fff; content: "✓"; }

/* Form card */
.submission-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.step { display: none; }
.step.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; }
.field-help { color: var(--ink-soft); font-size: .82rem; margin: 0 0 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=url],
.field input[type=number], .field input[type=date], .field select, .field textarea,
.auth input, .admin-form input, .admin-form select, .admin-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 90px; }
.req { color: var(--accent); }
.field--error input, .field--error textarea, .field--error select { border-color: var(--err); }
.field-error { color: var(--err); font-size: .82rem; margin: 5px 0 0; }
.form-heading { font-size: 1.05rem; margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* Type tiles */
.type-choice { border: none; padding: 0; margin: 0 0 20px; }
.type-choice legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.tile { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.tile input { margin-right: 8px; }
.tile:has(input:checked) { border-color: var(--brand); background: #f2f6fc; }

/* Radios / checkboxes */
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio, .checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.checkbox.consent { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.fee-options { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.fee-options legend { font-weight: 600; padding: 0 6px; }
.team-row { margin-bottom: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff;
    padding: 10px 18px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-600); }
.btn--ghost { background: #fff; color: var(--brand-600); border-color: var(--line); }
.btn--primary { background: var(--accent); border-color: var(--accent); }
.btn--primary:hover { filter: brightness(.95); }
.btn--sm { padding: 6px 12px; font-size: .82rem; }
.form-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.form-nav .btn:only-child { margin-left: auto; }

/* Review */
.review-summary { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.review-row:last-child { border-bottom: none; }
.review-row span:first-child { color: var(--ink-soft); }
.review-row span:last-child { text-align: right; max-width: 60%; }

/* Confirmation */
.confirmation { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 28px; box-shadow: var(--shadow); }
.confirmation__check { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: #e6f5ee; color: var(--ok); font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.confirmation__id strong { font-size: 1.15rem; color: var(--brand); }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; text-align: left; max-width: 420px; margin: 20px auto; }
.summary-list dt { color: var(--ink-soft); }

/* Auth card */
.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; width: 100%; max-width: 380px; }
.auth-brand { font-weight: 700; color: var(--brand); font-size: 1.2rem; margin-bottom: 20px; text-align: center; }
.auth .field, .auth-card .field { margin-bottom: 16px; }

/* Jury dashboard */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 1.8rem; font-weight: 700; color: var(--brand); }
.stat-card .lbl { color: var(--ink-soft); font-size: .82rem; }
.progress { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; margin: 6px 0 20px; }
.progress > span { display: block; height: 100%; background: var(--ok); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: #f9fafc; color: var(--ink-soft); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; }
table.data tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--line); color: var(--ink-soft); }
.pill--ok { background: #e6f5ee; color: var(--ok); }
.pill--warn { background: #fcf3dd; color: var(--warn); }
.pill--muted { background: #eef1f5; color: var(--ink-soft); }
.missing { color: var(--err); font-weight: 700; }

/* Read-only submission view */
.entry-view { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 22px; }
.entry-view dl { display: grid; grid-template-columns: 220px 1fr; gap: 8px 20px; }
.entry-view dt { color: var(--ink-soft); font-weight: 600; }
.entry-view dd { margin: 0; white-space: pre-wrap; }
.rating-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.rating-scale label { border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; }
.rating-scale input { position: absolute; opacity: 0; }
.rating-scale label:has(input:checked) { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Admin shell */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--brand); color: #cdd7e5; padding: 22px 14px; display: flex; flex-direction: column; }
.admin-brand { color: #fff; font-weight: 700; margin-bottom: 22px; line-height: 1.2; }
.admin-brand small { opacity: .6; font-weight: 400; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a { color: #cdd7e5; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-size: .9rem; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar nav a.is-active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.admin-sidebar__foot { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-sidebar__foot a { color: #9fb0c6; text-decoration: none; font-size: .82rem; }
.admin-logout { margin-left: auto; }
.admin-content { padding: 30px 34px; max-width: 1100px; }
.page-title { margin: 0 0 20px; font-size: 1.5rem; }
.admin-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.admin-form .field { margin-bottom: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.code-callout { background: var(--accent-soft); border: 1px solid #f4c3b2; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.code-callout code { font-size: 1rem; font-weight: 700; }
.inline-form { display: inline; }

/* Responsive */
@media (max-width: 820px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; }
    .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .admin-brand { width: 100%; margin-bottom: 6px; }
    .admin-sidebar__foot { margin: 0; padding: 0; }
    .admin-content { padding: 20px; }
    .entry-view dl { grid-template-columns: 1fr; }
    .entry-view dt { margin-top: 8px; }
}
@media (max-width: 560px) {
    .grid-3 { grid-template-columns: 1fr; }
    .steps li { flex-basis: 100%; }
    .review-row span:last-child { max-width: 55%; }
}
