/* Akola 35 admin dashboard — same palette as the public page. */

@font-face { font-family: 'Jeko'; src: url('/static/fonts/Jeko-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jeko'; src: url('/static/fonts/Jeko-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Jeko'; src: url('/static/fonts/Jeko-SemiBold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Jeko'; src: url('/static/fonts/Jeko-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

:root {
    --navy: #103C6D;
    --navy-deep: #0B2A4E;
    --cyan: #20C0D8;
    --white: #FFFFFF;
    --paper: #F4F6F8;
    --line: #D8DFE7;
    --muted: #5A6B7D;
    --error: #E2564D;
    --radius: 2px;
    --font: 'Jeko', Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--navy-deep);
    background: var(--paper);
}

/* ---------- topbar ---------- */

.topbar { background: var(--navy); color: var(--white); }

.topbar-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.topbar-title { margin: 0; font-size: 18px; font-weight: 700; }
.topbar-title span { font-weight: 400; color: var(--cyan); }

.topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--cyan); }

/* ---------- buttons ---------- */

.button {
    display: inline-block;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    background: var(--cyan);
    color: var(--navy);
}

.button--ghost {
    background: transparent;
    border-color: var(--cyan);
    color: var(--cyan);
}

.topbar .button--ghost:hover { background: var(--cyan); color: var(--navy); }

.button--danger {
    background: transparent;
    border-color: var(--error);
    color: var(--error);
    padding: 5px 10px;
}

.button--danger:hover { background: var(--error); color: var(--white); }

.button:disabled { opacity: 0.4; cursor: not-allowed; }

.button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- layout ---------- */

.page { max-width: 1360px; margin: 0 auto; padding: 24px; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.tile {
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.tile--accent { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tile--accent .tile-label { color: var(--cyan); }

.tile-value { font-size: 34px; font-weight: 700; line-height: 1.05; }

.tile-label {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 900px) {
    .columns { grid-template-columns: 3fr 2fr; }
}

.card {
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.card-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

/* ---------- lists ---------- */

.listrow {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.listrow:last-child { border-bottom: 0; }
.listrow-name { font-weight: 600; }
.listrow-note { flex: 1; color: var(--navy-deep); }
.listrow-meta, .listrow-count { color: var(--muted); text-align: right; }

.empty { padding: 16px 0; color: var(--muted); text-align: center; }

/* ---------- filters + table ---------- */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.filters input, .filters select {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy-deep);
}

.filters input:focus-visible, .filters select:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.table-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }

.table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--navy);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

.table tbody tr:hover { background: var(--paper); }

.pager {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- login ---------- */

.login-body {
    display: flex;
    min-height: 100vh;
    background: var(--navy);
}

.login-shell {
    margin: auto;
    padding: 24px;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
}

.login-mark {
    font-size: 52px;
    font-weight: 700;
    line-height: 0.85;
    color: var(--cyan);
    margin-bottom: 20px;
}

.login-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.login-title {
    margin: 4px 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
}

.login-sub {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--muted);
}

.login-card .field { margin-bottom: 18px; }

.login-card .field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-deep);
}

.login-card .field input {
    width: 100%;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--navy-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
}

.login-card .field input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-color: var(--navy);
    background: var(--white);
}

.btn-primary {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--navy);
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--navy);
}

.btn-primary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary-spinner { display: none; }

.btn-primary.is-loading .btn-primary-label { opacity: 0.6; }

.btn-primary.is-loading .btn-primary-spinner {
    display: block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin { to { transform: rotate(360deg); } }

.login-error {
    margin: 16px 0 0;
    padding: 12px 14px;
    background: rgba(226, 86, 77, 0.1);
    border-left: 4px solid var(--error);
    font-size: 14px;
    font-weight: 600;
    color: var(--error);
}

.login-error[hidden] { display: none; }

.login-back {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: var(--cyan);
    text-decoration: none;
}

.login-back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .btn-primary.is-loading .btn-primary-spinner { animation: none; }
}

/* ---------- registration deadline editor ---------- */

.deadline-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 16px;
}

.deadline-field { flex: 1 1 260px; display: block; }

.deadline-lang {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.deadline-field input {
    width: 100%;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--navy-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
}

.deadline-field input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-color: var(--navy);
    background: var(--white);
}

.deadline-msg { margin: 12px 0 0; font-size: 13px; font-weight: 600; }
.deadline-msg[hidden] { display: none; }
.deadline-msg--ok { color: var(--navy); }
.deadline-msg--error { color: var(--error); }

/* ---------- invitations ---------- */

.card--warn { border-left: 4px solid var(--error); }

.inv-actions,
.inv-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 16px 0;
}

.inv-add input {
    flex: 1 1 220px;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--navy-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
}

.inv-add input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-color: var(--navy);
    background: var(--white);
}

.button--small { padding: 6px 12px; font-size: 12px; }

.button--danger {
    background: var(--error);
    border-color: var(--error);
    color: var(--white);
}

.button--danger:hover { filter: brightness(1.08); }

.inv-msg { margin: 12px 0 0; font-size: 13px; font-weight: 600; }
.inv-msg[hidden] { display: none; }
.inv-msg--ok { color: var(--navy); }
.inv-msg--error { color: var(--error); }

.inv-sub { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

.inv-list {
    margin: 0 0 8px;
    padding-left: 20px;
    font-size: 13px;
    color: var(--muted);
    max-height: 220px;
    overflow-y: auto;
}

.inv-list li { margin-bottom: 3px; }

.inv-danger { margin: 18px 0 0; }

.is-sent { color: var(--navy); font-weight: 600; }
.is-pending { color: var(--muted); }
.is-error { color: var(--error); font-weight: 600; }
