:root {
    color-scheme: light;

    --bg: #f5e6e9;
    --surface: #fff6f8;
    --surface-raised: #fff9fa;
    --soft: #f4e1e5;
    --soft-strong: #ecd5db;

    --text: #311c23;
    --text-strong: #251118;
    --muted: #6b4c56;

    --line: #e7ccd3;
    --line-strong: #d7aeb9;

    --primary: #951c31;
    --primary-dark: #751326;
    --primary-soft: #f9e2e8;
    --primary-ring: rgba(149, 28, 49, 0.18);
    --primary-contrast: #ffffff;

    --danger: #b42318;
    --danger-dark: #912018;
    --danger-soft: #fee4e2;

    --success: #067647;
    --success-dark: #05603a;
    --success-soft: #dcfae6;

    --warning: #b54708;
    --warning-soft: #fff3d7;

    --shadow-small: 0 8px 24px rgba(78, 27, 43, 0.07);
    --shadow: 0 18px 45px rgba(78, 27, 43, 0.11);
    --shadow-large: 0 30px 80px rgba(78, 27, 43, 0.16);

    --topbar-bg: #8b1a30;
    --topbar-text: #fff2f5;
    --secondary-hover: #f3d1db;

    --flash-success-border: #abefc6;
    --flash-success-text: #05603a;
    --flash-error-border: #fecdca;
    --flash-error-text: #912018;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #1b1015;
    --surface: #2b1720;
    --surface-raised: #341d27;
    --soft: #3d222d;
    --soft-strong: #4b2a39;

    --text: #f4e6ea;
    --text-strong: #fff5f7;
    --muted: #d2b2bf;

    --line: #51303f;
    --line-strong: #674052;

    --primary: #ff9bb0;
    --primary-dark: #ffc2d0;
    --primary-soft: rgba(185, 55, 85, 0.18);
    --primary-ring: rgba(255, 155, 176, 0.2);
    --primary-contrast: #1b1015;

    --danger: #f97066;
    --danger-dark: #fda29b;
    --danger-soft: rgba(180, 35, 24, 0.18);

    --success: #75e0a7;
    --success-dark: #abefc6;
    --success-soft: rgba(6, 118, 71, 0.18);

    --warning: #fec84b;
    --warning-soft: rgba(181, 71, 8, 0.18);

    --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --shadow-large: 0 30px 80px rgba(0, 0, 0, 0.38);

    --topbar-bg: #4c0c1d;
    --secondary-hover: rgba(255, 155, 176, 0.26);

    --flash-success-border: rgba(117, 224, 167, 0.42);
    --flash-success-text: #abefc6;
    --flash-error-border: rgba(249, 112, 102, 0.42);
    --flash-error-text: #fda29b;
}

/* ZÁKLAD */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--primary) 5%, transparent),
            transparent 34rem
        ),
        var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
}

a {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text-strong);
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

h2 {
    margin-bottom: 16px;
    font-size: 21px;
    line-height: 1.25;
}

h3 {
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1.3;
}

/* HLAVIČKA */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;

    min-height: 76px;
    padding: 9px clamp(14px, 3vw, 38px);

    background: var(--topbar-bg);
    color: var(--topbar-text);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.topbar-left {
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: inherit;
    font-size: 16px;
    font-weight: 800;
}

.brand:hover {
    color: inherit;
}

.brand-left {
    justify-self: start;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 120px;
    min-height: 48px;
    padding: 0;
    color: inherit;
}

.brand-logo:hover { color: inherit; }

.brand-artwork {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.brand-logo img,
.status-board-brand img {
    padding: 3px;
    border-radius: 8px;
    background: #f9e2e8;
}

.brand-logo img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-wordmark {
    font-weight: 900;
    letter-spacing: .08em;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.nav a {
    padding: 8px 10px;

    border-radius: 999px;
    color: inherit;
    font-size: 13px;
    font-weight: 750;
}

.nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.nav form {
    margin: 0;
}

/* TÉMA */

.theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;

    max-width: calc(100vw - 28px);
    padding: 9px 13px;

    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: none;
}

/* PREPÍNANIE ORGÁNOV */

.workspace-switcher {
    padding: 14px 16px;

    background: color-mix(in srgb, var(--soft) 68%, var(--surface));
    border-bottom: 1px solid var(--line);
}

.workspace-switcher-inner {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    gap: 5px;

    max-width: 840px;
    margin: 0 auto;
    padding: 5px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-small);
    overflow-x: auto;
}

.workspace-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 11px 18px;

    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.workspace-tab:hover,
.workspace-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 12px 28px var(--primary-ring);
    color: var(--primary-contrast);
    transform: translateY(-1px);
}

/* OBSAH */

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 16px 56px;
}

.site-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px 34px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.site-footer p {
    max-width: 880px;
    margin: 0 auto 10px;
}

.site-footer strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.login-page .site-footer {
    max-width: 760px;
    padding-bottom: 42px;
    color: #f9dce4;
}

.login-page .site-footer strong { color: #fff2f5; }

.page-heading {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin-bottom: 8px;

    color: var(--primary);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.panel {
    padding: 23px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-small);
}

.panel > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel > h2::before {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;

    background: var(--primary);
    border-radius: 999px;
    content: "";
}

.section-gap {
    margin-top: 18px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 18px;
}

.motion {
    display: grid;
    gap: 12px;
}

.motion h2 {
    margin-bottom: 0;
}

.muted {
    color: var(--muted);
}

.small-text {
    font-size: 13px;
}

.empty-state {
    grid-column: 1 / -1;
    color: var(--muted);
}

.access-denied {
    max-width: 720px;
}

/* LOGIN */

.login-container {
    max-width: none;
    padding: 0;
}

.login-page {
    background:
        radial-gradient(
            ellipse at 25% 10%,
            #a82944,
            transparent 65%
        ),
        #4c0c1d;
}

.login-page .theme-toggle {
    position: fixed;
}

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 34px 18px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: clamp(28px, 5vw, 42px);

    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 24px;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(16px);
}

.login-logo {
    display: flex;
    justify-content: center;
    max-width: 230px;
    margin: 0 auto 28px;
    color: var(--primary);
    font-size: clamp(28px, 5vw, 40px);
}

.login-logo img {
    display: block;
    width: clamp(74px, 12vw, 100px);
    height: auto;
    object-fit: contain;
}

.login-logo .brand-artwork {
    flex-direction: column;
    gap: 4px;
}

.system-label {
    margin: 0 0 10px;

    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.login-card h1 {
    margin: 0 0 20px;

    font-size: clamp(42px, 7vw, 58px);
    font-weight: 950;
    letter-spacing: 0.04em;
    line-height: 0.95;
    text-align: center;
}

.login-card .muted {
    margin-bottom: 24px;

    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.login-card form {
    text-align: left;
}

.login-card .actions {
    justify-content: center;
}

.login-card form > button {
    width: 100%;
    min-height: 50px;
}

.login-resend-prompt {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.login-card .login-resend-form {
    margin-top: 8px;
    text-align: center;
    visibility: hidden;
    animation: reveal-login-resend 0s 5s forwards;
}

.login-card .login-resend-form .field {
    text-align: left;
}

.login-card .login-resend-form > button {
    width: auto;
    min-height: 0;
    padding: 2px 0;
    background: none;
    border-radius: 0;
    color: var(--primary);
    font-size: 14px;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-card .login-resend-form > button:hover {
    background: none;
    box-shadow: none;
    color: var(--primary-dark);
    transform: none;
}

@keyframes reveal-login-resend {
    to { visibility: visible; }
}

/* FORMULÁRE */

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
    font: inherit;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
    outline: none;
}

.checkbox {
    width: auto;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

.field {
    margin-bottom: 16px;
}

.motion-form .field,
.panel .field:last-child {
    margin-bottom: 0;
}

.field-hint {
    margin: 8px 0 0;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

/* TLAČIDLÁ */

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 16px;

    background: var(--primary);
    border: 0;
    border-radius: 13px;
    color: var(--primary-contrast);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    text-align: center;
    text-decoration: none;

    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 24px var(--primary-ring);
    color: var(--primary-contrast);
    transform: translateY(-1px);
}

.button.secondary,
button.secondary {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.button.secondary:hover,
button.secondary:hover {
    background: var(--secondary-hover);
    color: var(--primary-dark);
}

.button.danger,
button.danger {
    background: var(--danger);
}

.button.danger:hover,
button.danger:hover {
    background: var(--danger-dark);
}

/* FLASH SPRÁVY */

.flash {
    margin-bottom: 18px;
    padding: 13px 15px;

    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 750;
}

.flash.success {
    background: var(--success-soft);
    border-color: var(--flash-success-border);
    color: var(--flash-success-text);
}

.flash.error {
    background: var(--danger-soft);
    border-color: var(--flash-error-border);
    color: var(--flash-error-text);
}

.backup-check-form {
    margin-top: 10px;
}

.backup-check-form button {
    padding: 7px 11px;
    font-size: 13px;
}

/* BADGE */

.badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.025em;
    line-height: 1;
}

.badge.open {
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 20%, transparent);
    color: var(--success);
}

.badge.closed {
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 20%, transparent);
    color: var(--danger);
}

.badge.draft {
    background: var(--primary-soft);
    border-color: color-mix(in srgb, var(--primary) 20%, transparent);
    color: var(--primary-dark);
}

.badge.type {
    background: var(--soft);
    border-color: var(--line);
    color: var(--muted);
}

/* =========================================================
   AKTUÁLNE HLASOVANIE
   ========================================================= */

.current-vote-shell {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
}

.current-vote-heading {
    margin-bottom: 26px;
    padding-bottom: 20px;
    text-align: center;
}

.current-vote-heading .eyebrow {
    margin-bottom: 9px;
}

.current-vote-heading h1 {
    margin-bottom: 0;
    font-size: clamp(32px, 5vw, 48px);
}

.current-vote-empty {
    padding: clamp(32px, 6vw, 58px);
    text-align: center;
}

.current-vote-empty h2 {
    justify-content: center;
    margin-bottom: 10px;
    font-size: clamp(22px, 3vw, 30px);
}

.current-vote-empty h2::before {
    display: none;
}

.current-vote-empty .muted {
    max-width: 600px;
    margin: 0 auto 24px;
    font-size: 16px;
}

.current-vote-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    padding: clamp(24px, 5vw, 46px);

    background:
        radial-gradient(
            circle at top right,
            color-mix(in srgb, var(--primary) 12%, transparent),
            transparent 28rem
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            color-mix(in srgb, var(--soft) 40%, var(--surface))
        );
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 28px;
    box-shadow: var(--shadow-large);
}

.current-vote-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 6px;

    background: linear-gradient(
        90deg,
        var(--primary),
        color-mix(in srgb, var(--primary) 55%, #ffffff)
    );
    content: "";
}

.current-vote-card::after {
    position: absolute;
    right: -110px;
    bottom: -130px;
    z-index: -1;

    width: 300px;
    height: 300px;

    background: var(--primary-soft);
    border-radius: 50%;
    content: "";
    filter: blur(12px);
    opacity: 0.65;
}

.current-vote-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.current-vote-top .badge-row {
    margin-bottom: 0;
}

.current-vote-title {
    max-width: 800px;
    margin: 0 auto 16px;

    font-size: clamp(29px, 5vw, 48px);
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.08;
    text-align: center;
    text-wrap: balance;
}

.current-vote-description {
    max-width: 720px;
    margin: 0 auto 32px;

    color: var(--muted);
    font-size: clamp(16px, 2.2vw, 19px);
    line-height: 1.65;
    text-align: center;
}

.timer-pill {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;

    margin: 0;
    padding: 9px 13px;

    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

/* FORMULÁR HLASOVANIA */

.current-vote-form {
    max-width: 760px;
    margin: 32px auto 0;
}

.current-vote-options {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 190px), 1fr)
    );
    gap: 15px;
    margin-bottom: 22px;
}

.current-vote-option {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 112px;
    margin: 0;
    padding: 18px 20px;

    background: color-mix(in srgb, var(--surface) 92%, var(--soft));
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-small);
    cursor: pointer;
    text-align: center;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.current-vote-option::before {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 21px;
    height: 21px;

    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    content: "";

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.current-vote-option:hover,
.current-vote-option:focus-within {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 16px 36px var(--primary-ring);
    transform: translateY(-3px);
}

.current-vote-option.selected {
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--primary-soft) 78%, var(--surface)),
            var(--surface)
        );
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px var(--primary-ring),
        0 18px 42px var(--primary-ring);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.current-vote-option.selected::before {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: inset 0 0 0 5px var(--surface);
}

.current-vote-option input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.current-vote-option span {
    font-size: clamp(17px, 2.3vw, 21px);
    font-weight: 900;
    line-height: 1.25;
}

.send-vote-button {
    width: 100%;
    min-height: 58px;
    padding: 15px 24px;

    border-radius: 17px;
    box-shadow: 0 16px 34px var(--primary-ring);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.send-vote-button:hover {
    box-shadow: 0 20px 42px var(--primary-ring);
    transform: translateY(-2px);
}

.present-button {
    width: 100%;
    min-height: 92px;
    padding: 20px 28px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );
    border-radius: 22px;
    box-shadow: 0 18px 40px var(--primary-ring);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 950;
}

.present-button:hover {
    box-shadow: 0 24px 50px var(--primary-ring);
    transform: translateY(-3px);
}

/* ODHLASOVANÉ */

.already-voted-box {
    max-width: 700px;
    margin: 32px auto 0;
    padding: 20px 22px;

    background:
        linear-gradient(
            135deg,
            var(--success-soft),
            color-mix(in srgb, var(--success-soft) 35%, var(--surface))
        );
    border: 1px solid color-mix(in srgb, var(--success) 28%, var(--line));
    border-radius: 18px;
    color: var(--success);
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

/* VÝSLEDKY UZATVORENÉHO HLASOVANIA */

.closed-results-box {
    max-width: 760px;
    margin: 34px auto 0;
    padding: clamp(20px, 4vw, 30px);

    background: color-mix(in srgb, var(--surface) 90%, var(--soft));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.closed-results-box h3 {
    margin-bottom: 20px;

    font-size: clamp(20px, 3vw, 26px);
    font-weight: 950;
    text-align: center;
}

.current-results-list {
    display: grid;
    gap: 12px;
}

.current-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    min-height: 66px;
    padding: 14px 16px 14px 20px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(78, 27, 43, 0.04);
}

.current-result-label {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.current-result-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    height: 42px;
    padding: 0 13px;

    background: var(--primary);
    border-radius: 13px;
    color: var(--primary-contrast);
    font-size: 19px;
    font-weight: 950;
}

/* STARŠIA VOTE PAGE PODPORA */

.vote-panel {
    max-width: 820px;
    margin: 0 auto;
}

.vote-form {
    margin-top: 20px;
}

.vote-options {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.vote-option,
.vote-options label {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 0;
    padding: 15px 16px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-small);
    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.vote-option:hover,
.vote-option:focus-within,
.vote-options label:hover,
.vote-options label:focus-within {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 12px 28px var(--primary-ring);
    transform: translateY(-1px);
}

.vote-option input,
.vote-options input {
    width: auto;
}

.vote-option span {
    font-weight: 850;
}

/* TVORBA HLASOVANIA */

.motion-form-panel {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 30px);
}

.motion-form {
    display: grid;
    gap: 20px;
}

.type-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.type-card {
    display: block;
    min-width: 0;
    margin: 0;
}

.type-card input {
    position: absolute;

    width: 1px;
    height: 1px;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
}

.type-card-body {
    position: relative;

    display: grid;
    gap: 14px;

    min-height: 156px;
    padding: 18px;

    background:
        linear-gradient(
            180deg,
            var(--surface),
            color-mix(in srgb, var(--soft) 55%, var(--surface))
        );
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-small);
    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.type-card:hover .type-card-body,
.type-card:focus-within .type-card-body {
    border-color: var(--primary);
    box-shadow: 0 18px 38px var(--primary-ring);
    transform: translateY(-2px);
}

.type-card input:checked + .type-card-body {
    background:
        radial-gradient(
            circle at top right,
            color-mix(in srgb, var(--primary) 18%, transparent),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--primary-soft) 72%, var(--surface)),
            var(--surface)
        );
    border-color: var(--primary);
    box-shadow: 0 20px 44px var(--primary-ring);
}

.type-card-dot {
    align-self: start;
    justify-self: end;

    width: 22px;
    height: 22px;

    border: 2px solid var(--line);
    border-radius: 999px;
}

.type-card input:checked + .type-card-body .type-card-dot {
    background: radial-gradient(
        circle,
        var(--primary) 0 42%,
        transparent 46%
    );
    border-color: var(--primary);
}

.type-card-content {
    display: block;
}

.type-card-content strong {
    display: block;
    margin-bottom: 8px;

    color: var(--text);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.15;
}

.type-card-content small {
    display: block;

    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.election-field {
    margin-top: 4px;
    padding: 16px;

    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--primary-soft) 50%, var(--surface)),
            var(--surface)
        );
    border: 1px solid var(--line);
    border-radius: 18px;
}

.election-field.is-hidden {
    display: none;
}

.secret-note {
    padding: 12px 14px;

    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 14px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
}

/* TABUĽKY */

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrap.compact {
    max-width: 520px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.motion-table,
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.motion-table {
    min-width: 940px;
}

.motion-table th,
.results-table th {
    padding: 13px 14px;

    background: var(--soft);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.motion-table td,
.results-table td {
    padding: 14px;

    background: var(--surface);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.motion-table tr:last-child td,
.results-table tr:last-child td,
.results-table tr:last-child th {
    border-bottom: 0;
}

.motion-table td:first-child {
    min-width: 200px;
    font-weight: 800;
}

.results-table th {
    width: 60%;
}

.results-table td {
    font-weight: 900;
    text-align: right;
}

/* VÝSLEDKY V SPRÁVE */

.result-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.result-chip {
    display: inline-flex;
    padding: 7px 10px;

    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

/* AKCIE */

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

.status-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.status-form select {
    width: auto;
    min-width: 130px;
}

.status-form button {
    white-space: nowrap;
}

/* OPRÁVNENIA */

.permissions-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 320px;
}

.permission-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 0;
    padding: 7px 10px;

    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.inline-check input {
    width: auto;
}

/* TABLETY */

@media (max-width: 900px) {
    .type-picker {
        grid-template-columns: 1fr;
    }

    .type-card-body {
        min-height: 0;
    }

    .current-vote-top {
        flex-direction: column;
        align-items: center;
    }

    .current-vote-top .badge-row {
        justify-content: center;
    }
}

/* MOBILY */

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: 1fr auto;
        justify-items: stretch;
        gap: 10px 12px;
        min-height: 0;
        padding: 10px 12px 11px;
    }

    .topbar-left {
        align-items: flex-start;
        flex-direction: column;
        justify-self: stretch;
        gap: 7px;
    }

    .brand {
        max-width: min(58vw, 260px);
        font-size: 14px;
        line-height: 1.15;
    }

    .brand-logo {
        justify-self: end;
        min-width: 92px;
        min-height: 44px;
    }

    .brand-logo img {
        width: 40px;
        height: 40px;
    }

    .nav {
        grid-column: 1 / -1;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding-top: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a,
    .nav form {
        flex: 0 0 auto;
    }

    .nav a {
        padding: 7px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .nav form,
    .nav button {
        width: auto;
    }

    .nav button {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .container {
        padding: 22px 12px 42px;
    }

    .theme-toggle {
        right: 14px;
        bottom: 14px;
    }

    .panel {
        padding: 18px;
        border-radius: 18px;
    }

    .workspace-switcher {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .workspace-switcher-inner {
        display: flex;
        justify-content: flex-start;

        max-width: 100%;
        border-radius: 18px;
    }

    .workspace-tab {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 13px;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .motion-form-panel,
    .vote-panel {
        max-width: 100%;
    }

    .table-wrap {
        margin-right: -4px;
        margin-left: -4px;
    }

    .actions,
    .status-form {
        flex-direction: column;
        align-items: stretch;

        width: 100%;
        min-width: 0;
    }

    .status-form select,
    .status-form button,
    .actions .button {
        width: 100%;
    }

    .login-shell {
        align-items: flex-start;
        padding-top: 60px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .login-logo {
        max-width: 190px;
        margin-bottom: 24px;
    }

    .current-vote-shell {
        max-width: 100%;
    }

    .current-vote-heading {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .current-vote-card {
        padding: 21px 14px 18px;
        border-radius: 18px;
    }

    .current-vote-title {
        font-size: clamp(25px, 8vw, 34px);
        line-height: 1.08;
    }

    .current-vote-description {
        margin-bottom: 24px;
        font-size: 16px;
    }

    .current-vote-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .current-vote-option {
        min-height: 76px;
        padding: 15px 40px 15px 15px;
    }

    .current-vote-option span {
        font-size: 18px;
    }

    .send-vote-button {
        min-height: 56px;
    }

    .present-button {
        min-height: 58px;
        font-size: 18px;
    }

    .closed-results-box {
        margin-top: 26px;
        padding: 17px;
        border-radius: 18px;
    }

    .current-result-row {
        min-height: 60px;
        padding: 12px 12px 12px 15px;
    }

    .current-result-label {
        font-size: 15px;
    }

    .current-result-count {
        min-width: 44px;
        height: 40px;
        font-size: 17px;
    }

    .site-footer {
        padding: 0 12px 76px;
        font-size: 12px;
        text-align: left;
    }

    .site-footer strong {
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .current-vote-card {
        margin-right: -4px;
        margin-left: -4px;
    }

    .current-vote-top {
        margin-bottom: 22px;
    }

    .badge-row {
        justify-content: center;
    }

    .timer-pill {
        white-space: normal;
        text-align: center;
    }

    .login-card h1 {
        font-size: 44px;
    }
}

/* =========================================================
   USER MANAGEMENT
   ========================================================= */

.users-page {
    width: 100%;
}

.users-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 30px;
    padding-bottom: 24px;

    border-bottom: 1px solid var(--line);
}

.users-page-header h1 {
    max-width: 760px;
    margin-bottom: 12px;
}

.users-page-intro {
    max-width: 680px;
    margin: 0;

    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.users-summary-card {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    min-height: 104px;
    padding: 16px 20px;

    background:
        linear-gradient(
            145deg,
            var(--primary-soft),
            color-mix(in srgb, var(--surface) 88%, var(--primary-soft))
        );
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 20px;
    box-shadow: var(--shadow-small);
    text-align: center;
}

.users-summary-number {
    color: var(--primary-dark);
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1;
}

.users-summary-label {
    margin-top: 8px;

    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.users-management-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.user-create-column {
    position: sticky;
    top: 122px;
}

.user-create-card {
    padding: 24px;
}

.user-create-card > h2::before {
    display: none;
}

.panel-heading-clean {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-bottom: 24px;
}

.panel-heading-clean h2 {
    display: block;
    margin: 0 0 5px;
    padding: 0;

    font-size: 22px;
}

.panel-heading-clean h2::before {
    display: none;
}

.panel-heading-clean p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.panel-heading-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    background: var(--primary);
    border-radius: 13px;
    box-shadow: 0 10px 24px var(--primary-ring);
    color: var(--primary-contrast);
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
}

.user-create-form {
    display: grid;
    gap: 18px;
}

.user-create-form .field {
    margin: 0;
}

.user-create-form input {
    min-height: 48px;
}

.permission-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;

    border: 0;
}

.permission-fieldset legend {
    margin-bottom: 4px;
    padding: 0;

    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.permission-fieldset-hint {
    margin: 0 0 12px;

    color: var(--muted);
    font-size: 12px;
}

.permission-selector {
    display: grid;
    gap: 10px;
}

.permission-option,
.member-permission-option {
    display: block;
    margin: 0;
}

.permission-option input,
.member-permission-option input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.permission-option-box {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 66px;
    padding: 12px 14px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    cursor: pointer;

    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.permission-option:hover .permission-option-box,
.permission-option:focus-within .permission-option-box {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.permission-option input:checked + .permission-option-box {
    background:
        linear-gradient(
            145deg,
            var(--primary-soft),
            color-mix(in srgb, var(--surface) 78%, var(--primary-soft))
        );
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.permission-option-check {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 27px;
    height: 27px;

    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 9px;
    color: transparent;
    font-size: 15px;
    font-weight: 950;

    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.permission-option input:checked
+ .permission-option-box
.permission-option-check {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-contrast);
}

.permission-option-text {
    min-width: 0;
}

.permission-option-text strong {
    display: block;

    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.3;
}

.permission-option-text small {
    display: block;
    margin-top: 2px;

    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.user-create-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 2px;

    border-radius: 15px;
}

.users-list-column {
    min-width: 0;
}

.users-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 16px;
}

.users-list-heading h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.users-list-heading p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
}

.user-permission-list {
    display: grid;
    gap: 16px;
}

.user-permission-card {
    min-width: 0;
    padding: 20px;

    background:
        linear-gradient(
            150deg,
            var(--surface),
            color-mix(in srgb, var(--soft) 24%, var(--surface))
        );
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-small);

    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.user-permission-card:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.user-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 18px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--line);
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.user-avatar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    background:
        linear-gradient(
            145deg,
            var(--primary),
            var(--primary-dark)
        );
    border-radius: 15px;
    box-shadow: 0 10px 24px var(--primary-ring);
    color: var(--primary-contrast);
    font-size: 15px;
    font-weight: 950;
    letter-spacing: 0.03em;
}

.user-identity-text {
    min-width: 0;
}

.user-identity-text h3 {
    margin: 0 0 3px;

    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

.user-email {
    display: block;
    max-width: 100%;

    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email:hover {
    color: var(--primary);
}

.user-permission-count {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
}

.user-permission-count strong {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
}

.user-permission-count span {
    margin-top: 4px;

    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.member-permissions-form {
    min-width: 0;
}

.member-permission-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.member-permission-box {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 68px;
    padding: 11px 12px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    cursor: pointer;

    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.member-permission-option:hover .member-permission-box,
.member-permission-option:focus-within .member-permission-box {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.member-permission-option input:checked
+ .member-permission-box {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.member-permission-indicator {
    display: flex;
    flex: 0 0 auto;
    align-items: center;

    width: 36px;
    height: 21px;
    padding: 3px;

    background: var(--soft-strong);
    border: 1px solid var(--line);
    border-radius: 999px;

    transition:
        background 0.16s ease,
        border-color 0.16s ease;
}

.member-permission-indicator span {
    display: block;

    width: 13px;
    height: 13px;

    background: var(--surface);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(78, 27, 43, 0.2);

    transition: transform 0.16s ease;
}

.member-permission-option input:checked
+ .member-permission-box
.member-permission-indicator {
    background: var(--primary);
    border-color: var(--primary);
}

.member-permission-option input:checked
+ .member-permission-box
.member-permission-indicator span {
    transform: translateX(15px);
}

.member-permission-copy {
    min-width: 0;
}

.member-permission-copy strong {
    display: block;

    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.member-permission-copy small {
    display: block;
    margin-top: 2px;

    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.member-permission-option input:checked
+ .member-permission-box
.member-permission-copy small {
    color: var(--primary-dark);
}

.user-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-top: 16px;
}

.user-card-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.save-permissions-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding-right: 18px;
    padding-left: 18px;
}

.users-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 52px 24px;
    text-align: center;
}

.users-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;
    margin-bottom: 18px;

    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 18px;
    color: var(--primary);
    font-size: 24px;
    font-weight: 950;
}

.users-empty-state h3 {
    margin-bottom: 7px;
    font-size: 20px;
}

.users-empty-state p {
    max-width: 440px;
    margin: 0;

    color: var(--muted);
}

/* TABLET */

@media (max-width: 980px) {
    .users-management-layout {
        grid-template-columns: 1fr;
    }

    .user-create-column {
        position: static;
    }

    .user-create-card {
        max-width: none;
    }

    .user-create-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permission-fieldset,
    .user-create-submit {
        grid-column: 1 / -1;
    }

    .permission-selector {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* MENŠIE TABLETY */

@media (max-width: 760px) {
    .users-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .users-summary-card {
        flex-direction: row;
        gap: 10px;

        width: 100%;
        min-height: 70px;
    }

    .users-summary-label {
        margin-top: 0;
    }

    .user-create-form {
        grid-template-columns: 1fr;
    }

    .permission-fieldset,
    .user-create-submit {
        grid-column: auto;
    }

    .permission-selector,
    .member-permission-options {
        grid-template-columns: 1fr;
    }

    .user-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .save-permissions-button {
        width: 100%;
    }

    .user-card-note {
        text-align: center;
    }
}

/* MOBIL */

@media (max-width: 520px) {
    .users-page-header {
        margin-bottom: 22px;
    }

    .user-create-card,
    .user-permission-card {
        padding: 17px;
        border-radius: 18px;
    }

    .user-card-top {
        align-items: flex-start;
    }

    .user-avatar {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .user-identity-text h3 {
        font-size: 16px;
    }

    .user-email {
        max-width: 190px;
        font-size: 12px;
    }

    .user-permission-count span {
        display: none;
    }

    .member-permission-box {
        min-height: 62px;
    }
}

/* ODHLASOVANÝ POUŽÍVATEĽ */

.voted-options {
    margin-top: 32px;
    margin-bottom: 18px;
}

.voted-option {
    background: var(--soft) !important;
    border-color: var(--line) !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    cursor: default !important;
    opacity: 0.72;
    pointer-events: none;
    transform: none !important;
}

.voted-option::before {
    background: var(--soft-strong) !important;
    border-color: var(--line-strong) !important;
    box-shadow: none !important;
}

.voted-option span {
    color: var(--muted);
}

.already-voted-box {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 22px;

    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

.timer-expired {
    background: var(--warning-soft);
    border-color: color-mix(
        in srgb,
        var(--warning) 28%,
        var(--line)
    );
    color: var(--warning);
}

.recommended-time-note {
    margin: 18px auto 0;

    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* =========================================================
   VYHODNOTENIE HLASOVANIA
   ========================================================= */

.motion-outcome-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin: 18px 0;
    padding: 17px 19px;

    border: 1px solid;
    border-radius: 16px;
}

.motion-outcome-bar strong {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
}

.motion-outcome-bar span {
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    opacity: 0.82;
}

.motion-outcome-success {
    background: #fff;
    border-color: #dbabb8;
    color: #751326;
}

.motion-outcome-bar[data-motion-type="election"] {
    background: #fff;
    color: #751326;
}

.motion-outcome-danger {
    background: var(--danger-soft);
    border-color: color-mix(
        in srgb,
        var(--danger) 32%,
        var(--line)
    );
    color: var(--danger);
}

.motion-outcome-warning {
    background: var(--warning-soft);
    border-color: color-mix(
        in srgb,
        var(--warning) 32%,
        var(--line)
    );
    color: var(--warning);
}

/* =========================================================
   ARCHIVOVANÉ HLASOVANIA
   ========================================================= */

.archive-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.archive-section-heading h2 {
    margin-bottom: 7px;
}

.archive-section-heading p {
    margin-bottom: 0;
}

.archive-count-badge {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    height: 48px;
    padding: 0 15px;

    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.archived-motion-list {
    display: grid;
    gap: 16px;
}

.archived-motion-card {
    padding: 21px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 19px;
}

.archived-motion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 15px;
}

.archived-motion-header h3 {
    margin: 12px 0 0;
    font-size: 20px;
}

.archived-motion-date {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;

    color: var(--muted);
    font-size: 11px;
}

.archived-motion-date strong {
    margin-top: 3px;
    color: var(--text);
    font-size: 13px;
}

.archived-motion-description {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.55;
}

.archived-motion-results {
    margin-top: 14px;
}

.archived-motion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;

    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.archived-motion-meta strong {
    color: var(--text);
}

.badge.archived {
    background: var(--soft);
    border-color: var(--line);
    color: var(--muted);
}

@media (max-width: 700px) {
    .archive-section-heading,
    .archived-motion-header {
        flex-direction: column;
    }

    .archived-motion-date {
        align-items: flex-start;
    }

    .archived-motion-meta {
        flex-direction: column;
        gap: 7px;
    }
}

/* =========================================================
   IDENTIFIKÁCIA HLASOVANIA
   ========================================================= */

.motion-identifiers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;

    margin-bottom: 11px;
}

.motion-print-number,
.motion-daily-number {
    display: inline-flex;
    align-items: center;

    min-height: 28px;
    padding: 5px 10px;

    border: 1px solid var(--line);
    border-radius: 999px;

    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.motion-print-number {
    background: var(--soft);
    color: var(--muted);
}

.motion-daily-number {
    background: var(--primary-soft);
    border-color: color-mix(
        in srgb,
        var(--primary) 24%,
        var(--line)
    );
    color: var(--primary-dark);
}

.current-vote-card > .motion-identifiers {
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 18px;
}

.archived-motion-card .motion-identifiers {
    margin: 0;
}

@media (max-width: 520px) {
    .motion-identifiers {
        gap: 5px;
    }

    .motion-print-number,
    .motion-daily-number {
        padding: 5px 8px;
        font-size: 10px;
    }
}

/* =========================================================
   FINÁLNE VIZUÁLNE ÚPRAVY HLASOVANÍ
   ========================================================= */

/*
 * Všetky malé štítky zostanú na jednom riadku.
 */
.badge,
.motion-print-number,
.motion-daily-number {
    white-space: nowrap;
}

/*
 * Hlavné hlasovanie:
 * typ hlasovania, stav a identifikačné čísla budú vizuálne
 * sústredené na jednom mieste.
 */
.current-vote-top {
    justify-content: center;
    margin-bottom: 10px;
}

.current-vote-top .badge-row {
    justify-content: center;
    margin-bottom: 0;
}

.current-vote-card > .motion-identifiers {
    justify-content: center;

    margin-top: 0;
    margin-bottom: 20px;
}

/*
 * Jemnejšie rozlíšenie štítkov v hlavnom hlasovaní.
 */
.current-vote-card .badge-row .badge {
    padding: 6px 10px;

    font-size: 11px;
    letter-spacing: 0.015em;
}

.current-vote-card .motion-print-number,
.current-vote-card .motion-daily-number {
    min-height: 30px;
    padding: 6px 12px;

    font-size: 12px;
}

/*
 * Tlačidlo Prítomný nemá zaberať celú šírku veľkej karty.
 */
.current-vote-form .present-button {
    display: flex;

    width: min(100%, 340px);
    min-height: 58px;
    margin: 0 auto;
    padding: 13px 24px;

    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
}

.current-vote-form .present-button:hover {
    transform: translateY(-2px);
}

/*
 * Staršia samostatná vote stránka.
 */
.vote-form .present-button,
.vote-panel .present-button {
    width: min(100%, 340px);
    min-height: 58px;
    margin-right: auto;
    margin-left: auto;
    padding: 13px 24px;

    border-radius: 16px;
    font-size: 18px;
}

/*
 * Archív:
 * identifikátory a štítky sa nebudú nevkusne zalamovať.
 */
.archived-motion-header > div:first-child {
    min-width: 0;
}

.archived-motion-card .motion-identifiers {
    flex-wrap: nowrap;

    width: max-content;
    max-width: 100%;
    margin-bottom: 10px;

    overflow-x: auto;
    scrollbar-width: none;
}

.archived-motion-card .motion-identifiers::-webkit-scrollbar {
    display: none;
}

.archived-motion-card .badge-row {
    flex-wrap: nowrap;

    width: max-content;
    max-width: 100%;
    margin-bottom: 0;

    overflow-x: auto;
    scrollbar-width: none;
}

.archived-motion-card .badge-row::-webkit-scrollbar {
    display: none;
}

.archived-motion-card .badge {
    flex: 0 0 auto;
}

/*
 * Stavový panel bude kompaktnejší.
 */
.motion-outcome-bar {
    gap: 6px;

    margin: 18px 0;
    padding: 15px 17px;

    border-radius: 15px;
}

.motion-outcome-bar strong {
    font-size: 16px;
    line-height: 1.35;
}

.motion-outcome-bar span {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

/*
 * V tabuľke správy hlasovaní zostanú identifikátory spolu.
 */
.motion-table .motion-identifiers {
    flex-wrap: nowrap;

    width: max-content;
    max-width: 220px;

    overflow-x: auto;
    scrollbar-width: none;
}

.motion-table .motion-identifiers::-webkit-scrollbar {
    display: none;
}

/*
 * Mobil.
 */
@media (max-width: 760px) {
    .current-vote-top {
        margin-bottom: 9px;
    }

    .current-vote-card > .motion-identifiers {
        margin-bottom: 17px;
    }

    .current-vote-form .present-button,
    .vote-form .present-button,
    .vote-panel .present-button {
        width: min(100%, 280px);
        min-height: 54px;
        padding: 12px 20px;

        border-radius: 15px;
        font-size: 17px;
    }

    .archived-motion-header {
        gap: 14px;
    }
}

@media (max-width: 430px) {
    .current-vote-card .badge-row {
        gap: 6px;
    }

    .current-vote-card .badge-row .badge {
        padding: 6px 9px;
        font-size: 10px;
    }

    .current-vote-card .motion-print-number,
    .current-vote-card .motion-daily-number {
        padding: 6px 9px;
        font-size: 10px;
    }
}

/* =========================================================
   JEDNOTNÉ RIADKY ŠTÍTKOV A DVOJRIADKOVÁ SPRÁVA HLASOVANÍ
   ========================================================= */

.motion-header-labels {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.motion-header-labels::-webkit-scrollbar {
    display: none;
}

.motion-header-labels > * {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.current-vote-labels {
    justify-content: center;
    margin: 0 auto 24px;
}

.current-vote-labels .badge,
.current-vote-labels .motion-print-number,
.current-vote-labels .motion-daily-number {
    min-height: 30px;
    padding: 6px 11px;
    font-size: 11px;
}

.archive-motion-labels {
    margin-bottom: 12px;
}

.archived-motion-header > div:first-child {
    min-width: 0;
}

.archived-motion-card .archive-motion-labels {
    width: max-content;
    max-width: 100%;
}

.archived-motion-card .archive-motion-labels .badge,
.archived-motion-card .archive-motion-labels .motion-print-number,
.archived-motion-card .archive-motion-labels .motion-daily-number {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Prebiehajúce hlasovania ako samostatné dvojriadkové karty. */

.managed-motion-list {
    display: grid;
    gap: 14px;
}

.managed-motion-card {
    padding: 20px;

    background:
        linear-gradient(
            145deg,
            var(--surface),
            color-mix(in srgb, var(--soft) 24%, var(--surface))
        );
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-small);
}

.managed-motion-first-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.managed-motion-main {
    flex: 1 1 auto;
    min-width: 0;
}

.managed-motion-labels {
    width: max-content;
    max-width: 100%;
}

.managed-motion-title {
    margin: 12px 0 5px;
    font-size: 19px;
    font-weight: 900;
}

.managed-motion-description {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.managed-motion-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.managed-motion-actions .status-form {
    margin: 0;
}

.managed-motion-second-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, auto);
    align-items: center;
    gap: 22px;

    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--line);
}

.managed-motion-information {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;

    color: var(--muted);
    font-size: 12px;
}

.managed-motion-information strong {
    color: var(--text);
}

.managed-motion-results {
    min-width: 0;
}

.managed-motion-results .motion-outcome-bar {
    margin: 0 0 10px;
}

.managed-motion-results .result-list {
    justify-content: flex-end;
}

/* Menšie tlačidlo Prítomný. */

.current-vote-form .present-button,
.vote-form .present-button,
.vote-panel .present-button {
    width: min(100%, 320px);
    min-height: 54px;
    margin-right: auto;
    margin-left: auto;
    padding: 12px 22px;

    border-radius: 15px;
    font-size: 17px;
    font-weight: 900;
}

/* Mobilné zobrazenie. */

@media (max-width: 760px) {
    .current-vote-labels {
        justify-content: flex-start;
        margin-bottom: 20px;
    }

    .managed-motion-first-row {
        flex-direction: column;
        gap: 16px;
    }

    .managed-motion-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .managed-motion-actions .status-form,
    .managed-motion-actions button {
        width: 100%;
    }

    .managed-motion-second-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .managed-motion-results .result-list {
        justify-content: flex-start;
    }
}

/* =========================================================
   STATUS BOARD – DRUHÁ OBRAZOVKA
   ========================================================= */

.motion-management-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.motion-management-heading h1 { margin-bottom: 0; }

.status-board-launch-button {
    flex: 0 0 auto;
    min-height: 48px;
    padding-right: 20px;
    padding-left: 20px;
}

.status-board-page {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow: hidden;
    background: #8b1a30;
    color: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.status-board-page * { box-sizing: border-box; }

.status-board {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100vw;
    height: 100vh;
    min-height: 600px;
    background: #8b1a30;
    color: #fff;
    transition: background-color .22s ease;
}

.status-board-page[data-board-state="rejected"] .status-board,
.status-board-page[data-board-state="error"] .status-board,
.status-board-page[data-board-state="emergency"] .status-board {
    background: #a31020;
}

.status-board-page[data-board-state="break"] .status-board,
.status-board-page[data-board-state="recount"] .status-board {
    background: #503039;
}

.status-board-page[data-board-state="ended"] .status-board,
.status-board-page[data-board-state="standby-graphic"] .status-board {
    background: #4c0c1d;
}

.status-board-page[data-board-state="access-ended"] .status-board {
    background: #4c0c1d;
}

.status-board-connection {
    position: absolute;
    z-index: 5;
    right: clamp(26px, 3vw, 58px);
    bottom: 22px;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: clamp(16px, 1.3vw, 22px);
    font-weight: 700;
}

.status-board-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 94px;
    padding: 12px clamp(26px, 3vw, 58px);

    background: rgba(255, 255, 255, .12);
    border-bottom: 1px solid rgba(255, 255, 255, .42);
}

.status-board-page[data-board-state="rejected"] .status-board-header,
.status-board-page[data-board-state="error"] .status-board-header,
.status-board-page[data-board-state="emergency"] .status-board-header {
    background: #b01325;
}

.status-board-page[data-board-state="standby-graphic"] .status-board-header {
    background: #4c0c1d;
}

.status-board-session {
    justify-self: start;
    font-size: clamp(18px, 2vw, 34px);
    font-weight: 850;
    letter-spacing: .01em;
    white-space: nowrap;
}

.status-board-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-board-brand img {
    display: block;
    width: clamp(42px, 5vw, 66px);
    height: auto;
    object-fit: contain;
}

.status-board-brand .brand-wordmark {
    font-family: inherit;
    font-size: clamp(16px, 1.65vw, 28px);
    letter-spacing: .025em;
    text-align: center;
}

.status-board-clock {
    display: flex;
    align-items: baseline;
    justify-self: end;
    gap: clamp(18px, 2vw, 34px);
    white-space: nowrap;
}

.status-board-clock span,
.status-board-clock strong {
    font-size: clamp(18px, 2vw, 34px);
    font-weight: 850;
}

.status-board-content { position: relative; min-height: 0; }

.status-board-page[data-board-state="standby-graphic"] .status-board-content {
    background: #fff;
    color: #8b1a30;
}

.status-board-loading,
.status-board-error,
.status-board-standby,
.status-board-manual,
.status-board-voting,
.status-board-result {
    width: 100%;
    height: 100%;
}

.status-board-loading,
.status-board-error,
.status-board-standby,
.status-board-manual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7vh 7vw;
    text-align: center;
}

.status-board-loading {
    color: rgba(255,255,255,.78);
    font-size: clamp(24px,3vw,48px);
    font-weight: 750;
}

.status-board-standby .status-board-kicker {
    margin: 0 0 20px;
    color: rgba(255,255,255,.76);
    font-size: clamp(18px,2vw,30px);
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.status-board-manual .status-board-kicker {
    margin: 0 0 22px;
    color: rgba(255,255,255,.78);
    font-size: clamp(18px,2vw,31px);
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.status-board-standby h1,
.status-board-manual h1,
.status-board-error h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(52px,7vw,120px);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: .98;
}

.status-board-standby > p:not(.status-board-kicker),
.status-board-manual > p,
.status-board-error p {
    margin: 28px 0 0;
    color: rgba(255,255,255,.72);
    font-size: clamp(20px,2.3vw,38px);
    font-weight: 700;
}

.status-board-manual-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(66vw, 900px);
    max-height: 42vh;
    margin-bottom: clamp(26px,4vh,54px);
}

.status-board-manual-graphic img {
    display: block;
    width: min(100%, 760px);
    max-height: 38vh;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(87,13,32,.14));
}

.status-board-manual-graphic .brand-artwork {
    flex-direction: column;
    font-size: clamp(20px, 3vw, 42px);
}

.status-board-page[data-board-state="standby-graphic"] .status-board-manual {
    color: #8b1a30;
}

.status-board-page[data-board-state="standby-graphic"] .status-board-manual > p {
    max-width: 1100px;
    margin-top: 0;
    color: #8b1a30;
    font-size: clamp(24px,3vw,48px);
    font-weight: 900;
    line-height: 1.12;
}

.status-board-standby-pulse {
    width: 16px;
    height: 16px;
    margin-top: 42px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255,255,255,.45);
    animation: status-board-pulse 1.8s infinite;
}

@keyframes status-board-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
    70% { box-shadow: 0 0 0 24px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.status-board-voting {
    display: grid;
    grid-template-rows: auto auto 1fr;
    padding: clamp(28px,4vh,60px) clamp(40px,4vw,78px) clamp(42px,6vh,92px);
}

.status-board-vote-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    text-align: center;
}

.status-board-vote-heading span:first-child {
    color: rgba(255,255,255,.76);
    font-size: clamp(18px,1.7vw,28px);
    font-weight: 800;
    letter-spacing: .08em;
}

.status-board-vote-heading span:last-child {
    margin-top: 8px;
    color: #fff;
    font-size: clamp(58px,6.5vw,108px);
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1;
}

.status-board-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,.42);
}

.status-board-vote-main {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: clamp(50px,7vw,130px);
    min-height: 0;
    padding: 5vh 4vw 0 6vw;
}

.status-board-vote-copy { min-width: 0; }

.status-board-vote-copy p {
    margin: 0 0 22px;
    color: rgba(255,255,255,.7);
    font-size: clamp(18px,1.8vw,30px);
    font-weight: 850;
    letter-spacing: .1em;
}

.status-board-vote-copy h1 {
    max-width: 920px;
    margin: 0;
    color: #fff;
    font-size: clamp(30px,3.5vw,58px);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.status-board-timer {
    --timer-progress: 1;
    --timer-ring-width: clamp(12px,1.2vw,21px);

    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(270px,26vw,450px);
    height: clamp(270px,26vw,450px);
    border-radius: 50%;
    box-shadow: inset 0 0 80px rgba(0,0,0,.1);
}

.status-board-timer::before,
.status-board-timer::after {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.status-board-timer::before {
    background: rgba(70,7,26,.66);
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - var(--timer-ring-width)),
        #000 calc(100% - var(--timer-ring-width) + 1px)
    );
    mask: radial-gradient(
        farthest-side,
        transparent calc(100% - var(--timer-ring-width)),
        #000 calc(100% - var(--timer-ring-width) + 1px)
    );
}

.status-board-timer::after {
    background: conic-gradient(
        from -90deg,
        #ffffff calc(var(--timer-progress) * 1turn),
        transparent 0
    );
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - var(--timer-ring-width)),
        #000 calc(100% - var(--timer-ring-width) + 1px)
    );
    mask: radial-gradient(
        farthest-side,
        transparent calc(100% - var(--timer-ring-width)),
        #000 calc(100% - var(--timer-ring-width) + 1px)
    );
    transition: background .2s linear;
}

.status-board-timer span {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(60px,7vw,116px);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1;
}

.status-board-timer.is-expired::before {
    background: rgba(255,255,255,.34);
}

.status-board-timer.is-expired::after {
    background: transparent;
}

.status-board-result {
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    padding: 0 clamp(36px,4vw,74px) clamp(26px,4vh,52px);
}

.status-board-result-stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: clamp(18px,3vw,56px);
    padding: clamp(28px,4vh,54px) 2vw clamp(26px,3.5vh,46px);
}

.status-board-result-stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}

.status-board-result-stats span {
    margin-bottom: 10px;
    color: rgba(255,255,255,.86);
    font-size: clamp(17px,2vw,34px);
    font-weight: 750;
    white-space: nowrap;
}

.status-board-result-stats strong {
    color: #fff;
    font-size: clamp(62px,7vw,112px);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

.status-board-result-outcome {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 5vh 3vw;
    text-align: center;
}

.status-board-result-outcome h1 {
    max-width: 1500px;
    margin: 0;
    color: #fff;
    font-size: clamp(44px,5.8vw,96px);
    font-weight: 950;
    letter-spacing: -.035em;
    line-height: 1.02;
    text-wrap: balance;
}

.status-board-result-identification {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: clamp(28px,4vh,52px);
    text-align: center;
}

.status-board-result-identification span {
    color: rgba(255,255,255,.86);
    font-size: clamp(18px,2vw,34px);
    font-weight: 750;
}

.status-board-result-identification strong {
    margin-top: 6px;
    color: #fff;
    font-size: clamp(58px,6.5vw,108px);
    font-weight: 500;
    letter-spacing: .03em;
    line-height: 1;
}

.status-board-result-details {
    margin: 0;
    color: inherit;
    font-size: clamp(16px, 2vw, 30px);
}

.status-board-result-stats[data-result-type="election"],
.status-board-result-stats[data-result-type="quorum"] {
    grid-template-columns: 1fr;
}

.status-board-page:is([data-board-state="approved"], [data-board-state="election-result"]) .status-board {
    background: #fff;
    color: #751326;
}

.status-board-page:is([data-board-state="approved"], [data-board-state="election-result"]) .status-board-header {
    background: #f9e2e8;
    border-color: #dbabb8;
}

.status-board-page:is([data-board-state="approved"], [data-board-state="election-result"]) .status-board-result :is(h1, span, strong) {
    color: inherit;
}

.status-board-page:is([data-board-state="approved"], [data-board-state="election-result"]) .status-board-divider {
    background: #dbabb8;
}

.status-board-page:is([data-board-state="approved"], [data-board-state="election-result"]) .status-board-fullscreen {
    color: #751326;
    border-color: #dbabb8;
}

.status-board-fullscreen {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    padding: 10px 14px;
    background: rgba(0,0,0,.16);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    box-shadow: none;
    color: rgba(255,255,255,.84);
    font-size: 13px;
    opacity: .2;
    backdrop-filter: blur(10px);
}

.status-board-fullscreen:hover,
.status-board-fullscreen:focus-visible {
    background: rgba(0,0,0,.24);
    box-shadow: none;
    color: #fff;
    opacity: 1;
    transform: none;
}

html:fullscreen .status-board-fullscreen { opacity: 0; }
html:fullscreen .status-board-fullscreen:hover,
html:fullscreen .status-board-fullscreen:focus-visible { opacity: 1; }
.status-board-page [hidden] { display: none !important; }

.status-board-control-panel {
    display: grid;
    gap: 22px;
    margin-bottom: 24px;
}

.status-board-mode-form {
    display: grid;
    gap: 18px;
}

.status-board-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.status-board-mode-option {
    cursor: pointer;
}

.status-board-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-board-mode-option span {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: var(--text);
    font-weight: 750;
    line-height: 1.25;
}

.status-board-mode-option input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.member-scope-permissions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.member-scope-permissions strong { flex-basis: 100%; }
.member-scope-permissions label { display: flex; align-items: center; gap: 6px; margin: 0; }
.member-scope-permissions input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    accent-color: var(--primary);
}

@media (max-width: 900px), (max-height: 700px) {
    .motion-management-heading { align-items: stretch; flex-direction: column; }
    .status-board-launch-button { width: 100%; }
    .status-board-header { grid-template-columns: 1fr auto; }
    .status-board-vote-main {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-left: 0;
        text-align: center;
    }
    .status-board-vote-copy h1 { max-width: 100%; }
    .status-board-timer { width: min(38vw,300px); height: min(38vw,300px); }
    .status-board-result-stats { gap: 12px; }
}

/* Správa hlasovaní po zasadnutiach */
.status-board-control-panel,
.motion-form-panel,
.meeting-management-panel,
.motion-list-panel {
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(78, 27, 43, .07);
}

.status-board-control-panel {
    padding: clamp(20px, 3vw, 32px);
    background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--primary-soft) 44%, var(--surface)));
}

.motion-form-panel {
    max-width: none;
    margin: 24px 0;
    padding: clamp(20px, 3vw, 32px);
}

.motion-form-panel > h2,
.panel.section-gap > h2 {
    margin-bottom: 8px;
    font-size: clamp(21px, 2vw, 26px);
    letter-spacing: -.025em;
}

.meeting-management-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 24px;
}

.meeting-management-card {
    display: flex;
    align-items: center;
    min-height: 104px;
    border-radius: 16px;
    border-left: 5px solid var(--line);
}

.meeting-management-card.status-open { border-left-color: #19a36b; }
.meeting-management-card.status-paused { border-left-color: #d79819; }
.meeting-management-card.status-emergency_paused { border-left-color: #c44141; }
.meeting-management-card.status-planned { border-left-color: var(--primary); }
.meeting-management-card.status-closed { border-left-color: #91727c; }

.meeting-management-card .managed-motion-first-row { width: 100%; align-items: center; }
.meeting-management-card h3 { margin: 8px 0 4px; }
.meeting-management-card .motion-daily-number { font-size: 14px; font-weight: 850; }

.motion-form-panel .motion-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.motion-form-panel .motion-form > input[type="hidden"] { display: none; }
.motion-form-panel .motion-form > .field:first-of-type,
.motion-form-panel .motion-form > .field:nth-of-type(2),
.motion-form-panel .motion-form > .secret-note,
.motion-form-panel .motion-form > div:last-child { grid-column: 1 / -1; }
.motion-form-panel .type-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.motion-form-panel textarea { min-height: 96px; }
.motion-form-panel .motion-form > div:last-child button { min-width: 220px; }

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title-row h2 { margin: 0; }
.section-title-row .eyebrow { margin: 0 0 5px; }

.meeting-motion-groups { display: grid; gap: 22px; }

.meeting-motion-group {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--soft) 36%, var(--surface));
}

.meeting-motion-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(105deg, color-mix(in srgb, var(--primary-soft) 58%, var(--surface)), var(--surface));
}

.meeting-motion-group-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.meeting-ordinal {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 19px;
    font-weight: 950;
    box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 28%, transparent);
}

.meeting-motion-group-title h3 { margin: 0; font-size: 18px; }
.meeting-motion-group-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.meeting-motion-group-summary { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.meeting-motion-group-summary span { padding: 7px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.meeting-motion-group-summary .group-open-count { color: #087749; border-color: color-mix(in srgb, #19a36b 35%, var(--line)); background: color-mix(in srgb, #19a36b 8%, var(--surface)); }
.meeting-motion-group > .managed-motion-list { padding: 14px; }
.meeting-motion-group .managed-motion-card { padding: 18px; border-radius: 15px; box-shadow: none; background: var(--surface); }
.meeting-motion-group .managed-motion-second-row { margin-top: 14px; padding-top: 12px; }

@media (max-width: 760px) {
    .motion-form-panel .motion-form { grid-template-columns: 1fr; }
    .motion-form-panel .motion-form > .field,
    .motion-form-panel .motion-form > .secret-note,
    .motion-form-panel .motion-form > div:last-child { grid-column: auto; }
    .motion-form-panel .type-picker { grid-template-columns: 1fr; }
    .meeting-motion-group-header { align-items: flex-start; flex-direction: column; padding: 16px; }
    .meeting-motion-group-summary { justify-content: flex-start; }
    .meeting-ordinal { width: 46px; height: 46px; flex-basis: 46px; }
    .meeting-management-card { align-items: stretch; }
}

/* Program rokovania */
.agenda-current { scroll-margin-top: 24px; }
.agenda-current h2 { font-size: clamp(25px, 3vw, 42px); overflow-wrap: anywhere; }
.agenda-description { white-space: pre-line; overflow-wrap: anywhere; }
.agenda-navigation, .agenda-item-actions, .agenda-item-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.agenda-navigation { margin-top: 24px; }
.agenda-navigation form, .agenda-item-actions form { margin: 0; }
.agenda-item-heading { justify-content: space-between; }
.agenda-item-heading h3 { margin: 0; overflow-wrap: anywhere; }
.agenda-list { padding-left: 26px; }
.agenda-item { padding: 20px 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; }
.agenda-item.is-current { border-color: var(--primary); box-shadow: inset 4px 0 var(--primary); }
.agenda-edit { margin-top: 16px; }
.agenda-edit summary, .agenda-procedural summary { cursor: pointer; font-weight: 750; }
.agenda-delete { margin-top: 16px; }
.status-board-agenda-context { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: clamp(12px, 1vw, 19px); line-height: 1.3; margin-top: 6px; opacity: .8; }
.status-board-agenda { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 4vh 6vw; text-align: center; overflow: auto; }
.status-board-agenda .status-board-kicker { font-size: clamp(16px, 2vw, 30px); letter-spacing: .08em; color: rgba(255,255,255,.75); }
.status-board-agenda h1 { max-width: 1400px; margin: 18px 0; color: #fff; font-size: clamp(32px, 5vw, 82px); line-height: 1.1; font-weight: 900; overflow-wrap: anywhere; }
.status-board-agenda-description { max-width: 1100px; font-size: clamp(18px, 2vw, 32px); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 620px) {
    .agenda-navigation { display: grid; grid-template-columns: 1fr; }
    .agenda-navigation button, .agenda-navigation form { width: 100%; }
    .agenda-item-actions { gap: 8px; }
}

/* Jednotný panel predsedajúceho. */
/* Chair terminal: a single workspace, with preparation and live screens. */
.chair-page { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.chair-page .container { width: 100%; max-width: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.chair-page > .site-footer { display: none; }
.chair-page .container > .flash { flex-shrink: 0; margin: 12px clamp(20px, 4vw, 64px) 0; }
.chair-page .topbar { flex-shrink: 0; display: flex; min-height: 66px; padding: 10px 24px; gap: 18px; backdrop-filter: none; }
.chair-page .topbar-left { order: 1; }
.chair-page .brand { font-size: 14px; white-space: nowrap; }
.chair-page .brand-logo { order: 0; min-width: 48px; min-height: 36px; }
.chair-page .brand-logo img { width: 36px; height: 36px; }
.chair-page .nav { order: 2; flex: 1; flex-wrap: nowrap; gap: 4px; }
.chair-page .nav a { font-size: 12px; white-space: nowrap; padding: 8px 10px; }
.chair-page .nav a[href="/?page=motions"] { background: var(--primary-soft); color: var(--primary); }
.chair-page .nav button { font-size: 11px; min-height: 34px; padding: 8px 10px; }
.chair-page .theme-toggle { position: static; box-shadow: none; max-width: none; border-radius: 8px; background: transparent; white-space: nowrap; }

.chair-panel { min-width: 0; }
.chair-panel [hidden] { display: none !important; }
.chair-heading, .chair-section-title, .chair-session-actions, .chair-row-actions,
.chair-point-actions, .chair-live-vote-meta { display: flex; align-items: center; gap: 12px; }
.chair-heading { justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.chair-heading h1 { margin: 5px 0; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.chair-heading p { margin: 5px 0 0; }
.chair-heading .eyebrow { font-size: 11px; letter-spacing: .13em; }
.chair-heading-copy { min-width: 0; }
.chair-heading-copy .muted { font-size: 12px; }
.chair-section-title { justify-content: space-between; margin-bottom: 22px; }
.chair-section-title h2 { font-size: 24px; margin: 4px 0 0; letter-spacing: -.03em; }
.chair-section-title .eyebrow { margin: 0; }
.chair-count { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 5px; white-space: nowrap; }
.chair-session-actions, .chair-row-actions { flex-wrap: wrap; }
.chair-panel form { margin: 0; }
.chair-panel button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; transform: none; }
.chair-panel button, .chair-panel .button { font-size: 13px; min-height: 40px; border-radius: 9px; padding: 10px 15px; box-shadow: none; }
.chair-panel button:hover, .chair-panel .button:hover { transform: none; }
.chair-panel :focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.chair-organ-picker { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(32px, 7vh, 80px) clamp(24px, 6vw, 100px); }
.chair-organ-picker .chair-heading { max-width: 1260px; margin: 0 auto 36px; }
.chair-organ-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; max-width: 980px; margin: 0 auto; }
.chair-organ-card { display: flex; flex-direction: column; min-height: 290px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: var(--surface); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.chair-organ-card:hover { border-color: var(--primary); box-shadow: 0 8px 30px var(--primary-ring); }
.chair-organ-code { display: grid; place-items: center; width: 48px; height: 48px; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary-ring); border-radius: 12px; font-size: 15px; font-weight: 800; font-family: ui-monospace, monospace; }
.chair-organ-card h2 { margin: 28px 0 0; font-size: 22px; letter-spacing: -.04em; }
.chair-organ-card p { margin: 8px 0 28px; font-size: 13px; }
.chair-organ-enter { display: flex; justify-content: space-between; margin-top: auto; color: var(--primary); font-size: 13px; font-weight: 700; }
.chair-terminal { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; color: var(--text); background: transparent; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.chair-terminal h1, .chair-terminal h2, .chair-terminal h3, .chair-terminal label { color: var(--text); }
.chair-terminal .muted { color: var(--muted); }
.chair-terminal a { color: var(--primary); }
.chair-terminal .button { text-decoration: none; }
.chair-terminal button, .chair-terminal .button { background: var(--primary); color: var(--primary-contrast); border: 1px solid transparent; font-weight: 700; }
.chair-terminal button:hover:not(:disabled), .chair-terminal .button:hover { background: var(--primary-dark); }
.chair-terminal button.secondary, .chair-terminal .button.secondary { color: var(--text); background: var(--soft); border: 1px solid var(--line); }
.chair-terminal button.secondary:hover:not(:disabled), .chair-terminal .button.secondary:hover { background: var(--soft-strong); }
.chair-terminal button.danger, .chair-terminal .chair-stop-button { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
.chair-terminal input, .chair-terminal select, .chair-terminal textarea { background: var(--surface); color: var(--text); border-color: var(--line-strong); border-radius: 8px; }
.chair-terminal input::placeholder, .chair-terminal textarea::placeholder { color: var(--muted); }

.chair-terminal .badge { border: 1px solid var(--line-strong); color: var(--muted); background: var(--soft); font-size: 11px; }
.chair-terminal .badge.open { border-color: color-mix(in srgb, var(--success) 30%, var(--line)); color: var(--success); background: var(--success-soft); }
.chair-terminal .eyebrow { color: var(--muted); }
.chair-breadcrumb { display: inline-block; font-size: 11px; margin-bottom: 10px; text-decoration: none; }
.chair-breadcrumb::before { content: '← '; }
.chair-terminal > .chair-heading { padding: 24px clamp(20px, 4vw, 64px) 20px; margin: 0; flex-shrink: 0; }
.chair-terminal .chair-heading h1 { font-size: 27px; }
.chair-screen-nav { display: flex; gap: 14px; align-items: center; flex-shrink: 0; border-bottom: 1px solid var(--line); padding: 0 clamp(20px, 4vw, 64px) 14px; margin: 0; }
.chair-screen-tabs { display: flex; flex: 1; gap: 6px; justify-content: center; }
.chair-terminal .chair-screen-tabs button { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 0 1 200px; background: transparent; color: var(--muted); border: 1px solid transparent; }
.chair-terminal .chair-screen-tabs button[aria-selected="true"] { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-ring); }
.chair-terminal .chair-screen-tabs button:hover { background: var(--soft); }
.chair-tab-number { font-size: 10px; font-family: ui-monospace, SFMono-Regular, monospace; opacity: .8; }
.chair-panel .chair-slide-arrow { padding: 8px; width: 38px; min-height: 38px; }
.chair-screen-viewport { flex: 1; min-height: 0; min-width: 0; width: 100%; overflow: hidden; position: relative; touch-action: pan-y pinch-zoom; }
.chair-screen-track { height: 100%; width: 100%; min-height: 0; }
.is-sliding .chair-screen-track { display: flex; transform: translate3d(calc(var(--chair-screen-index, 0) * -100% + var(--chair-swipe-offset, 0px)), 0, 0); will-change: transform; }
.chair-screen-track.is-ready:not(.is-dragging) { transition: transform .32s cubic-bezier(.22,.68,.22,1); }
.chair-screen { flex: 0 0 100%; min-width: 0; width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; padding: 28px clamp(20px, 4vw, 64px); box-sizing: border-box; }
.chair-screen:focus { outline-offset: -3px; }
.chair-screen-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(20px, 4vw, 64px); flex-shrink: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.chair-screen-footer > span { font-family: ui-monospace, SFMono-Regular, monospace; }
.chair-screen-footer p { margin: 0; }
.chair-screen-dots { display: flex; gap: 6px; }
.chair-screen-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.chair-screen-dots span.is-active { background: var(--primary); width: 18px; border-radius: 5px; }
.chair-library { padding: 24px clamp(20px, 4vw, 64px); flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.chair-meeting-list { min-height: 160px; }
.chair-meeting-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.chair-meeting-link { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; color: var(--text) !important; text-decoration: none; padding: 8px; border-radius: 8px; }
.chair-meeting-link:hover { background: var(--soft); }
.chair-meeting-link h3 { font-size: 17px; margin: 0 0 6px; }
.chair-meeting-link p { font-size: 12px; margin: 0; }
.chair-meeting-link .badge { margin-left: auto; }
.chair-meeting-number { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; background: var(--primary-soft); color: var(--primary-dark); font-family: ui-monospace, monospace; border-radius: 11px; }
.chair-meeting-enter { color: var(--primary-dark); font-size: 12px; white-space: nowrap; }
.chair-empty { text-align: center; padding: 65px 24px; }
.chair-empty h3 { font-size: 20px; margin: 10px 0; }
.chair-empty p { max-width: 410px; margin: 10px auto 0; font-size: 13px; }
.chair-empty-symbol { display: inline-block; font-size: 30px; color: var(--primary); }
.chair-overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(310px, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.chair-monitor { min-width: 0; max-width: 720px; padding: 0; border: 0; background: transparent; border-radius: 0; }
.chair-monitor .chair-section-title { margin-bottom: 14px; gap: 8px; }
.chair-monitor .eyebrow { font-size: 10px; }
.chair-monitor a { font-size: 11px; text-decoration: none; }
.chair-live-dot { display: inline-block; height: 6px; width: 6px; background: var(--success); border-radius: 50%; margin-right: 5px; }
.chair-board-preview { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 6px; background: #8b1a30; pointer-events: none; }
.chair-board-preview iframe { width: 1280px; height: 720px; border: 0; display: block; transform-origin: top left; }
.chair-board-setting { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.chair-board-setting form { display: flex; align-items: center; gap: 10px; }
.chair-board-setting label { font-size: 11px; margin: 0; white-space: nowrap; }
.chair-board-setting select { flex: 1; min-width: 0; width: auto; font-size: 12px; padding: 9px; }
.chair-board-setting button { font-size: 11px; padding: 8px 10px; min-height: 36px; }
.chair-clock { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, monospace; letter-spacing: -.06em; }
.chair-command > .chair-section-title { margin-bottom: 12px; }
.chair-command > .badge { margin-bottom: 20px; }
.chair-current-point { padding: 0 0 20px; }
.chair-current-point .eyebrow { font-size: 10px; margin: 0 0 9px; }
.chair-current-point h2 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.035em; margin: 0; overflow-wrap: anywhere; }
.chair-point-actions { margin-top: 20px; }
.chair-point-actions form:last-child { flex: 1; }
.chair-point-actions button { width: 100%; }
.chair-resume-point { margin-top: 12px !important; }
.chair-up-next { border-top: 1px solid var(--line); padding: 16px 0; }
.chair-up-next .eyebrow { font-size: 10px; margin: 0 0 6px; }
.chair-up-next p:last-child { font-size: 13px; margin: 0; color: var(--muted); }
.chair-command-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.chair-command-actions button { width: 100%; font-size: 11px; min-height: 44px; padding: 9px; height: 100%; }
.chair-program-list { list-style: none; padding: 0; margin: 0; }
.chair-program-row { display: flex; gap: 16px; align-items: center; padding: 20px 12px; border-top: 1px solid var(--line); }
.chair-program-row.is-current { background: var(--primary-soft); border-radius: 8px; }
.chair-agenda-number { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--primary); font-size: 12px; font-family: ui-monospace, monospace; }
.chair-program-copy { flex: 1; min-width: 0; }
.chair-program-copy h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.chair-program-copy p { margin: 6px 0 0; font-size: 12px; }
.chair-program-copy .badge { margin-top: 8px; }
.chair-row-actions { gap: 8px; }
.chair-row-actions button { font-size: 11px; min-height: 36px; padding: 8px 12px; }
.chair-panel .chair-icon-button { padding: 6px 10px; min-width: 34px; }
.chair-vote-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 12px; border-top: 1px solid var(--line); }
.chair-vote-row h3 { margin: 0 0 7px; font-size: 15px; overflow-wrap: anywhere; }
.chair-vote-row p { margin: 0; font-size: 12px; }
.chair-vote-row > .chair-row-actions { flex-shrink: 0; }
.chair-list-label { display: flex; align-items: center; font-size: 13px; margin: 30px 0 12px; }
.chair-active-vote { max-width: 760px; padding: 20px; border: 1px solid color-mix(in srgb, var(--success) 30%, var(--line)); border-radius: 12px; background: var(--success-soft); }
.chair-active-vote h3 { margin: 0; font-size: 23px; }
.chair-active-vote .chair-section-title { margin-bottom: 14px; }
.chair-live-vote-meta { justify-content: space-between; margin: 20px 0; font-size: 13px; }
.chair-live-vote-meta strong { font-size: 23px; }
.chair-timer { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace; }
.chair-stop-button { width: 100%; }
.chair-completed-row { padding: 22px 12px; border-top: 1px solid var(--line); }
.chair-completed-row > .eyebrow { font-size: 10px; margin: 0; }
.chair-completed-row h3 { font-size: 16px; margin: 8px 0 12px; }
.chair-completed-row .chair-row-actions { margin-top: 16px; }
.chair-completed-row .result-list { justify-content: flex-start; }
.chair-inline-notice { display: block; border: 1px solid var(--line-strong) !important; border-radius: 8px; background: var(--soft) !important; color: var(--text) !important; font-size: 12px; padding: 12px 14px; margin: 16px 0; line-height: 1.5; text-align: left; }
.chair-update-notice { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); color: var(--warning); font-size: 13px; }
.chair-update-notice a { color: var(--warning); }
.chair-dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; box-shadow: 0 24px 100px #0008; overscroll-behavior: contain; }
.chair-dialog::backdrop { background: #210b13cc; backdrop-filter: blur(4px); }
.chair-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.chair-dialog-heading h2 { margin: 0; font-size: 22px; }
.chair-dialog-heading button { min-width: 36px; min-height: 36px; padding: 7px !important; }
.chair-dialog .motion-form { margin-top: 0; }
.chair-dialog .field { margin-bottom: 8px; }
.chair-dialog .field label { font-size: 13px; }
.chair-dialog-delete { border-top: 1px solid var(--line); margin-top: 24px !important; padding-top: 20px; }
.chair-dialog .motion-form-panel { padding: 0; border: 0; background: none; box-shadow: none; margin: 0; }
.chair-dialog .motion-form-panel > h2 { display: none; }
.chair-dialog .type-picker { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.chair-dialog .type-card-body, .chair-dialog .secret-note { background: var(--soft); border-color: var(--line); color: var(--text); }
.chair-dialog .type-card-content small { color: var(--muted); }
.chair-dialog .type-card input:checked + .type-card-body { background: var(--primary-soft); border-color: var(--primary); }
.chair-dialog .motion-form .secret-note { font-size: 12px; }
@media (max-width: 1100px) {
    .chair-overview-grid { grid-template-columns: minmax(0,1.15fr) minmax(290px,1fr); gap: 18px; }

    .chair-program-row { flex-wrap: wrap; }
    .chair-program-row .chair-row-actions { width: 100%; padding-left: 46px; }
}
@media (max-width: 760px) {
    .chair-page .topbar { padding: 8px 12px; min-height: 58px; gap: 10px; }
    .chair-page .topbar-left { display: none; }
    .chair-page .brand-logo { min-width: 40px; }
    .chair-page .brand-logo img { width: 32px; height: 32px; }
    .chair-page .brand-logo .brand-wordmark { display: none; }
    .chair-page .nav { min-width: 0; overflow-x: auto; width: auto; padding: 0; justify-content: flex-start; scrollbar-width: none; }
    .chair-page .nav a { padding: 8px; font-size: 11px; }
    .chair-terminal > .chair-heading { padding: 18px 20px 14px; }
    .chair-screen { padding: 22px 20px; }
    .chair-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
    .chair-terminal .chair-heading h1 { font-size: 23px; }
    .chair-heading .chair-session-actions { width: 100%; }
    .chair-heading .chair-session-actions > * { flex: 1; }
    .chair-heading .chair-session-actions button, .chair-heading .chair-session-actions a { width: 100%; text-align: center; }
    .chair-organ-picker { padding: 28px 20px; }
    .chair-organ-grid { grid-template-columns: 1fr; gap: 14px; }
    .chair-organ-card { min-height: 200px; padding: 22px; }
    .chair-organ-card h2 { margin-top: 20px; }
    .chair-organ-card p { margin-bottom: 20px; }
    .chair-screen-nav { gap: 4px; padding: 0 16px 12px; }
    .chair-screen-tabs { gap: 2px; }
    .chair-terminal .chair-screen-tabs button { padding: 9px 5px; font-size: 12px; gap: 5px; }
    .chair-tab-number { display: none; }
    .chair-panel .chair-slide-arrow { width: 30px; min-width: 30px; min-height: 36px; }

    .chair-overview-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
    .chair-monitor { padding: 0; }
    .chair-command { padding: 0 2px; }
    .chair-command-actions button { font-size: 12px; }
    .chair-screen-footer { font-size: 10px; gap: 6px; }
    .chair-screen-footer p { text-align: center; }
    .chair-section-title { flex-wrap: wrap; gap: 16px; }
    .chair-section-title h2 { font-size: 21px; }
    .chair-section-title > button { font-size: 12px; }
    .chair-meeting-link { flex-wrap: wrap; gap: 12px; padding: 4px 0; }
    .chair-meeting-link > div { flex: 1; }
    .chair-meeting-link .badge { margin-left: 0; }
    .chair-meeting-enter { margin-left: auto; }
    .chair-meeting-number { width: 38px; height: 38px; }
    .chair-meeting-row { gap: 10px; align-items: flex-start; }
    .chair-meeting-row > form { padding-top: 5px; }

    .chair-vote-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 0; }
    .chair-vote-row > .chair-row-actions { justify-content: flex-start; }
    .chair-dialog { padding: 20px; }
    .chair-dialog .type-picker { grid-template-columns: 1fr; }
    .chair-program-row { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .chair-panel *, .chair-panel *::before, .chair-panel *::after { transition: none !important; animation: none !important; }
}
.chair-command > .badge { margin-bottom: 16px; }
.chair-command .chair-current-point { padding-bottom: 12px; }
.chair-command .chair-point-actions { margin-top: 12px; }
.chair-command .chair-up-next { padding: 12px 0; }
.chair-command .chair-inline-notice { margin: 12px 0; }
.chair-command .chair-command-actions { padding-top: 12px; }
.chair-command-actions form:has(input[value="emergency_paused"]) button { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); }

.chair-dialog .type-card-body { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 8px; min-height: 104px; padding: 12px; border-radius: 10px; box-shadow: none !important; transform: none !important; }
.chair-dialog .type-card-dot { width: 14px; height: 14px; flex-shrink: 0; }
.chair-dialog .type-card-content strong { font-size: 13px; margin-bottom: 6px; }
.chair-dialog .type-card-content small { font-size: 11px; }
.chair-dialog .motion-form { gap: 16px; }
@media (max-width: 600px) {
    .chair-dialog .type-picker { grid-template-columns: 1fr; }
    .chair-dialog .type-card-body { min-height: 0; justify-content: space-between; }
}

.chair-organ-card { background: #951c31; color: #fff; border: 0; border-radius: 12px; min-height: 310px; transition: transform .2s ease, filter .2s ease; }
.chair-organ-card:hover { transform: translateY(-4px); filter: brightness(1.07); box-shadow: none; }
.chair-organ-card h2, .chair-organ-card .chair-organ-enter { color: #fff; }
.chair-organ-card .muted { color: #ffffffc7; }
.chair-organ-card .chair-organ-code { color: #fff; background: #ffffff14; border-color: #ffffff40; }
.chair-organ-card .chair-organ-enter { border-top: 1px solid #ffffff40; padding-top: 18px; }
.chair-terminal > .chair-update-notice { margin: 0 clamp(20px, 4vw, 64px) 12px; flex-shrink: 0; }
.chair-terminal > .chair-inline-notice { margin: 0 clamp(20px, 4vw, 64px) 12px; }
.chair-page .access-denied { margin: 28px; }
@media (max-width: 1100px) and (min-width: 761px) {
    .chair-page .topbar-left { display: none; }
}
@media (max-width: 760px) {
    .chair-organ-card[data-organ] { grid-column: auto; min-height: 230px; }
    .chair-screen-footer { padding: 12px 20px max(12px, env(safe-area-inset-bottom)); }
}

@media (min-width: 761px) {
    .chair-terminal .chair-heading-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 20px; }
    .chair-terminal .chair-heading-copy .chair-breadcrumb { margin: 0; }
    .chair-terminal .chair-heading-copy h1, .chair-terminal .chair-heading-copy p { margin: 0; }
}
@media (max-width: 760px) {
    .chair-terminal[data-mode="live"] > .chair-heading { flex-wrap: nowrap; gap: 12px; }
    .chair-terminal[data-mode="live"] > .chair-heading .chair-heading-copy { flex: 1; }
    .chair-terminal[data-mode="live"] > .chair-heading .eyebrow { font-size: 9px; }
    .chair-terminal[data-mode="live"] > .chair-heading .chair-session-actions { width: auto; flex: 0 0 auto; }
    .chair-terminal[data-mode="live"] > .chair-heading .chair-session-actions > * { flex: none; }
    .chair-terminal[data-mode="live"] > .chair-heading .chair-session-actions a { font-size: 11px; padding: 8px 10px; }
    .chair-monitor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 12px; }
    .chair-monitor .chair-section-title { grid-column: 1 / -1; margin: 0; }
    .chair-monitor .chair-board-preview { grid-column: 1; }
    .chair-monitor .chair-board-setting { grid-column: 2; border: 0; padding: 0; margin: 0; }
    .chair-monitor .chair-board-setting form { display: grid; gap: 6px; }
    .chair-monitor .chair-board-setting select { width: 100%; min-height: 34px; padding: 6px; font-size: 11px; }
    .chair-monitor .chair-board-setting button { min-height: 32px; padding: 6px; }
    .chair-monitor > [data-chair-popup-notice] { grid-column: 1 / -1; margin: 0; }
}
@media (max-width: 760px) {
    .chair-terminal[data-mode="live"] > .chair-heading { padding-top: 14px; padding-bottom: 10px; }
    .chair-screen { padding-top: 18px; }
    .chair-overview-grid { gap: 16px; }
    .chair-command > .chair-section-title { margin-bottom: 8px; }
    .chair-command > .badge { margin-bottom: 10px; }
    .chair-command .chair-current-point > .eyebrow { margin-bottom: 6px; }
    .chair-command .chair-point-actions { margin-top: 10px; }
    .chair-command .chair-inline-notice { margin: 8px 0; padding: 8px 10px; }
    .chair-command .chair-up-next { display: flex; align-items: baseline; gap: 12px; }
    .chair-command .chair-up-next .eyebrow { margin: 0; }
    .chair-command-actions button { min-height: 40px; padding: 7px; }
}
/* New agenda items carry their own details before they are saved. */
.agenda-add-form [data-agenda-rows] { display: grid; gap: 24px; min-width: 0; }
.agenda-new-row { min-width: 0; margin: 0; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); }
.agenda-new-row legend { margin-bottom: 16px; padding: 0; color: var(--primary); font-size: 14px; font-weight: 750; }
.agenda-new-row .field + .field { margin-top: 16px; }
.agenda-new-row .agenda-remove-row { margin-top: 8px; font-size: 11px; }
.agenda-add-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.agenda-add-form [hidden] { display: none !important; }
@media (max-width: 600px) {
    .agenda-add-actions > button { flex: 1; }
}
