* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f3f5f8; color: #22303c; }
.page { max-width: 1580px; margin: 0 auto; padding: 18px; }
.page-slim { max-width: 900px; }
.page-wide { max-width: 1700px; }
.topbar { background: linear-gradient(135deg, #0f4c81, #1f6aa7); color: #fff; padding: 16px 18px; border-radius: 10px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.compact-topbar h1 { margin: 0 0 4px; font-size: 24px; }
.compact-topbar p { margin: 0; color: #dce8f3; font-size: 14px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(250px, 1fr); gap: 16px; align-items: start; }
.slim-layout { grid-template-columns: minmax(0, 5fr) 280px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.compact-admin-grid { gap: 14px; }
.card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 3px 14px rgba(0,0,0,.07); }
.compact-card { padding: 14px; }
.inner-card { margin-top: 16px; background: #f8fbfe; border: 1px solid #d6e3f0; }
.side-card { position: sticky; top: 12px; height: fit-content; }
h2 { margin: 0 0 8px; color: #0f4c81; font-size: 20px; }
h3 { margin: 0 0 8px; font-size: 16px; }
label { display: block; margin-bottom: 6px; font-weight: bold; }
.small-label { font-size: 12px; color: #52606d; margin-bottom: 4px; }
input[type=text], textarea, select { width: 100%; padding: 8px 10px; border: 1px solid #b9c8d8; border-radius: 7px; margin-bottom: 10px; background: #fff; font-size: 14px; }
.form-table, .overview-table { width: 100%; border-collapse: collapse; }
.form-table th, .form-table td, .overview-table th, .overview-table td { border: 1px solid #d8e1ea; padding: 8px; vertical-align: top; font-size: 14px; }
.form-table th, .overview-table th { background: #edf4fb; text-align: left; }
.compact-table th, .compact-table td { padding: 6px 8px; }
.competition-box { border: 1px solid #d8e1ea; border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fff; }
.compact-box { padding: 10px; }
.competition-headline { display: grid; grid-template-columns: 1fr minmax(220px, 360px); gap: 12px; align-items: start; margin-bottom: 10px; }
.standard-hall-row { background: #f7fbff; border: 1px solid #d8e8f5; border-radius: 8px; padding: 8px; }
.assignment-section { background: #fcfefe; border: 1px solid #dce6ed; border-radius: 8px; padding: 10px; }
.compact-assignment { padding: 8px; }
.btn { display: inline-block; padding: 8px 12px; border-radius: 7px; text-decoration: none; border: none; cursor: pointer; font-weight: bold; font-size: 14px; }
.btn-primary { background: #0f4c81; color: #fff; }
.btn-secondary { background: #dde7f0; color: #22303c; }
.btn-danger { background: #c53f3f; color: #fff; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; padding-top: 8px; }
.full-width { width: 100%; margin-bottom: 10px; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; background: #eef5fb; color: #22415e; font-size: 14px; }
.success { background: #dff4e5; color: #1f6a36; }
.error { background: #f8d7da; color: #842029; }
.status-box { display: flex; align-items: center; gap: 10px; }
.status { background: rgba(255,255,255,.15); padding: 5px 8px; border-radius: 999px; font-weight: bold; font-size: 13px; }
.hint, .muted { color: #52606d; font-size: 13px; margin: 0; }
.full-span { grid-column: 1 / -1; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.tight-header { align-items: end; }
.submission-block { margin-top: 12px; padding: 12px; background: #f9fbfd; border-radius: 10px; border: 1px solid #d7e3ef; }
.compact-submission-block { padding: 10px; }
.two-col-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.three-col-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.compact-gap { gap: 10px; }
.code-box { background: #eef5fb; border: 1px solid #d4e0eb; padding: 8px; border-radius: 8px; margin-bottom: 10px; font-family: monospace; font-size: 13px; }
.inline-form-single { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.inline-admin-form { display: grid; grid-template-columns: 2fr 1.2fr auto; gap: 8px; align-items: start; }
.inline-action-form { display: inline; }
.action-cell { white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.narrow { max-width: 560px; margin: 0 auto; }
@media (max-width: 1200px) { .three-col-grid, .competition-headline, .admin-grid, .two-col-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .content-grid, .slim-layout { grid-template-columns: 1fr; } .side-card { position: static; } }
@media (max-width: 900px) { .page { padding: 10px; } .card, .topbar { padding: 12px; } .form-table, .overview-table { display: block; overflow-x: auto; } .inline-form-single, .inline-admin-form { grid-template-columns: 1fr; } }
.wide-inline-admin-form { grid-template-columns: 2fr 1.6fr 1.2fr auto; }

.admin-nav { display:flex; gap:10px; flex-wrap:wrap; align-items:center; background:#fff; border-radius:10px; padding:12px 14px; margin-bottom:14px; box-shadow:0 3px 14px rgba(0,0,0,.05); }
.admin-nav a { text-decoration:none; color:#0f4c81; padding:8px 10px; border-radius:8px; background:#eef5fb; }
.admin-nav a.active { background:#0f4c81; color:#fff; }
.info-card { margin-bottom:14px; background:#f8fbfe; border:1px solid #d8e8f5; }
.stack-form { display:grid; gap:10px; }
.compact-form { max-width:520px; }
.competition-form { max-width:700px; }
.tiny-hint { margin:6px 0 0; color:#52606d; font-size:12px; }
@media (max-width: 900px) { .admin-nav { flex-direction:column; align-items:stretch; } }

.export-hero { display:flex; justify-content:flex-start; }
.export-button { display:inline-flex; align-items:center; gap:10px; }
.export-button .icon { font-size:18px; line-height:1; }

.download-nav-btn { display:inline-flex; align-items:center; gap:8px; background:#0d7a5f; color:#fff; border:1px solid #0a624d; margin-left:auto; }
.download-nav-btn:hover { background:#0b684f; color:#fff; }
.download-nav-btn .icon { font-size:16px; line-height:1; }
.admin-nav { display:flex; align-items:center; gap:10px; }
