/* Nordic Business Forum — admin dashboard.
   Palette taken from the event artwork: deep indigo ground, orange accent. */

:root {
    --indigo: #1B1150;
    --indigo-deep: #070A2E;
    --purple: #3B235D;
    --orange: #F07702;
    --white: #FFFFFF;
    --paper: #F5F4F9;
    --line: #DAD7E6;
    --muted: #625C7A;
    --error: #D64545;
    --radius: 4px;
    --font: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--indigo-deep);
    background: var(--paper);
}

.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;
}

/* ---------- topbar ---------- */

.topbar { background: var(--indigo); color: var(--white); }

.topbar-inner {
    max-width: 1280px;
    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(--orange); }

.topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Who is signed in — shown only in Entra mode, where the account matters. */
.topbar-identity { font-size: 13px; opacity: 0.75; }

.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--orange); }

/* ---------- buttons ---------- */

.button {
    display: inline-block;
    padding: 10px 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(--orange);
    color: var(--indigo-deep);
}

.button:hover:not(:disabled) { filter: brightness(1.08); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.button--ghost { background: transparent; border-color: var(--orange); color: var(--orange); }
.topbar .button--ghost:hover { background: var(--orange); color: var(--indigo-deep); }

.button--danger {
    background: transparent; border-color: var(--error); color: var(--error);
    padding: 6px 10px;
}
.button--danger:hover { background: var(--error); color: var(--white); }

/* ---------- layout ---------- */

.page { max-width: 1280px; margin: 0 auto; padding: 24px; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
}

.card-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: var(--indigo); }
.card-sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); max-width: 70ch; }

/* ---------- seats per day ---------- */

.card--seats { border-left: 4px solid var(--orange); }

.seatrow {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.seatrow:last-of-type { border-bottom: 0; }

.seatrow-day { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.seatrow-title { font-size: 16px; font-weight: 700; color: var(--indigo); }
.seatrow-meta { font-size: 12px; color: var(--muted); }

.seatrow-input {
    width: 120px;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: var(--indigo-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
}

.seatrow-input:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-color: var(--indigo);
    background: var(--white);
}

.seats-msg {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
}
.seats-msg[hidden] { display: none; }
.seats-msg--ok { background: rgba(240, 119, 2, 0.12); border-left: 4px solid var(--orange); }
.seats-msg--error { background: rgba(214, 69, 69, 0.1); border-left: 4px solid var(--error); color: var(--error); }

/* ---------- tiles ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.tile {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.tile--accent { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
.tile--accent .tile-label { color: var(--orange); }

.tile-value { font-size: 30px; font-weight: 700; line-height: 1.1; }

.tile-label {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.tile-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ---------- lists ---------- */

.listrow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}
.listrow:last-child { border-bottom: 0; }
.listrow-name { font-weight: 600; }
.listrow-count { color: var(--muted); }

.empty { padding: 16px 0; color: var(--muted); text-align: center; }

/* ---------- filters + table ---------- */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 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(--indigo-deep);
}

.filters input:focus-visible, .filters select:focus-visible {
    outline: 2px solid var(--orange);
    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(--indigo);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    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);
}

/* ---------- login ----------

   The login page shares this stylesheet but none of the dashboard's chrome.
   Colours follow the registration page: indigo ground, orange accent. */

.login-body {
    display: flex;
    min-height: 100vh;
    background: var(--indigo);
}

.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 { color: var(--orange); margin-bottom: 18px; line-height: 0; }

.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(--indigo);
}

.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(--indigo-deep);
}

.login-card .field input {
    width: 100%;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--indigo-deep);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius);
}

.login-card .field input:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-color: var(--indigo);
    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(--indigo);
    border: 2px solid var(--indigo);
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--indigo-deep);
}

.btn-primary:focus-visible { outline: 2px solid var(--orange); 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(214, 69, 69, 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(--orange);
    text-decoration: none;
}

.login-back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .btn-primary.is-loading .btn-primary-spinner { animation: none; }
}
