:root {
    --av-primary: #0f766e;
    --av-primary-hover: #115e59;
    --av-primary-contrast: #ffffff;
    --av-checkbox-checked: #087f9c;
    --av-primary-button: linear-gradient(135deg, #0b91a5, #08788f);
    --av-primary-button-hover: linear-gradient(135deg, #09869a, #076b82);
    --av-primary-button-border: rgba(4, 82, 102, .22);
    --av-primary-button-border-hover: rgba(4, 82, 102, .28);
    --av-primary-button-shadow: 0 6px 14px rgba(3, 91, 110, .16);
    --av-primary-button-shadow-hover: 0 8px 18px rgba(3, 80, 99, .2);
    --av-accent: #26d4d5;
    --av-accent-soft: #e7f7f6;
    --av-selection-background: #e7ecee;
    --av-selection-background-hover: #dfe6e8;
    --av-selection-border: #c6d1d5;
    --av-selection-text: #263940;
    --av-nav-active-background: var(--av-selection-background);
    --av-nav-active-border: var(--av-selection-border);
    --av-nav-active-text: var(--av-selection-text);
    --av-background: #f5f7f8;
    --av-surface: #ffffff;
    --av-surface-subtle: #f8fafb;
    --av-text: #17212b;
    --av-text-muted: #66727d;
    --av-border: #dde3e7;
    --av-border-strong: #c7d0d6;
    --av-input-border: #d7e6e7;
    --av-input-hover: #adc9cc;
    --av-input-focus: var(--av-checkbox-checked);
    --av-input-ring: rgba(8, 127, 156, .12);
    --av-danger: #b42318;
    --av-danger-hover: #912018;
    --av-danger-soft: #fff1f0;
    --av-danger-border: #f1c5c1;
    --av-danger-notice: #c43d35;
    --av-danger-notice-soft: #fff5f4;
    --av-danger-notice-border: #edc9c5;
    --av-destructive-button: #b42318;
    --av-destructive-button-hover: #912018;
    --av-destructive-button-text: #ffffff;
    --av-success: #287a52;
    --av-success-soft: #edf8f2;
    --av-success-border: #c8e5d5;
    --av-success-text: #195d3d;
    --av-warning: #9a6700;
    --av-warning-soft: #fff8e6;
    --av-warning-border: #ead9a3;
    --av-warning-text: #765000;
    --av-radius-sm: .375rem;
    --av-radius-md: .625rem;
    --av-radius-lg: .875rem;
    --av-shadow-dialog: 0 20px 48px rgba(23, 33, 43, .16);
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
    line-height: 1.5;
}

:root[data-theme="dark"] {
    --av-primary: #2fb4b0;
    --av-primary-hover: #43c8c3;
    --av-primary-contrast: #06141e;
    --av-checkbox-checked: var(--av-primary);
    --av-primary-button: var(--av-primary);
    --av-primary-button-hover: var(--av-primary-hover);
    --av-primary-button-border: var(--av-primary);
    --av-primary-button-border-hover: var(--av-primary-hover);
    --av-primary-button-shadow: none;
    --av-primary-button-shadow-hover: none;
    --av-accent: #43c8c3;
    --av-accent-soft: #11333d;
    --av-selection-background: #17283a;
    --av-selection-background-hover: #1c3044;
    --av-selection-border: #314a63;
    --av-selection-text: #e6edf4;
    --av-nav-active-background: var(--av-selection-background);
    --av-nav-active-border: var(--av-selection-border);
    --av-nav-active-text: var(--av-selection-text);
    --av-background: #07111f;
    --av-surface: #0d1b2b;
    --av-surface-subtle: #122438;
    --av-text: #e6edf4;
    --av-text-muted: #93a6b8;
    --av-border: #21364c;
    --av-border-strong: #314a63;
    --av-input-border: var(--av-border-strong);
    --av-input-hover: color-mix(in srgb, var(--av-border-strong) 80%, var(--av-text-muted));
    --av-input-ring: transparent;
    --av-danger: #ff8f86;
    --av-danger-hover: #ffaaa3;
    --av-danger-soft: #321c25;
    --av-danger-border: #63313a;
    --av-danger-notice: #ff9b94;
    --av-danger-notice-soft: #2f1d23;
    --av-danger-notice-border: #60363e;
    --av-destructive-button: #b42318;
    --av-destructive-button-hover: #912018;
    --av-destructive-button-text: #ffffff;
    --av-success: #69d29b;
    --av-success-soft: #142b25;
    --av-success-border: #27523f;
    --av-success-text: #8be0ae;
    --av-warning: #e5ba62;
    --av-warning-soft: #302817;
    --av-warning-border: #5d4b25;
    --av-warning-text: #f0ca79;
    --av-shadow-dialog: 0 22px 54px rgba(0, 0, 0, .42);
    color-scheme: dark;
}

:root[data-theme="dark"] .panel-topbar {
    background: rgba(7, 17, 31, .9);
}

html {
    min-width: 20rem;
    background: var(--av-background);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--av-background);
    color: var(--av-text);
    font-size: .9375rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

:focus-visible {
    outline: 3px solid rgba(15, 118, 110, .34);
    outline-offset: 2px;
}

/*::selection {
    background: rgba(38, 212, 213, .28);
    color: var(--av-text);
}*/

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--av-text);
    line-height: 1.2;
}

h1 {
    margin-bottom: .625rem;
    font-size: clamp(1.65rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -.035em;
}

h1:focus {
    outline: none;
}

h2 {
    margin-bottom: .35rem;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -.015em;
}

h3 {
    font-size: .9375rem;
}

code {
    border-radius: var(--av-radius-sm);
    color: var(--av-text);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .88em;
}

.page-header {
    max-width: 42rem;
    margin-bottom: 2rem;
}

.page-header__eyebrow,
.section-kicker {
    margin-bottom: .35rem;
    color: var(--av-primary);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.3;
    text-transform: uppercase;
}

.page-header__description {
    margin-bottom: 0;
    color: var(--av-text-muted);
    font-size: .9375rem;
}

.panel-card {
    padding: 1.25rem;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-lg);
    background: var(--av-surface);
}

.section-heading {
    padding-bottom: 1rem;
}

.section-heading > :last-child,
.server-overview__heading > div > :last-child {
    margin-bottom: 0;
}

.detail-list {
    margin: 0;
    border-top: 1px solid var(--av-border);
}

.detail-list > div {
    display: grid;
    grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.2fr);
    gap: 1rem;
    padding: .875rem 0;
    border-bottom: 1px solid var(--av-border);
}

.detail-list > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-list dt {
    color: var(--av-text-muted);
    font-size: .8125rem;
}

.detail-list dd {
    margin: 0;
    color: var(--av-text);
    font-size: .875rem;
    font-weight: 600;
    text-align: right;
}

.action-list {
    display: grid;
    border-top: 1px solid var(--av-border);
}

.action-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--av-border);
    transition: color .15s ease;
}

.action-list__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.action-list__item:hover {
    color: var(--av-primary);
}

.action-list__item span {
    display: grid;
    min-width: 0;
}

.action-list__item strong {
    color: var(--av-text);
    font-size: .875rem;
    font-weight: 650;
}

.action-list__item small {
    color: var(--av-text-muted);
    font-size: .75rem;
}

.action-list__item svg {
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: .55rem .9rem;
    border: 1px solid transparent;
    border-radius: var(--av-radius-md);
    font-size: .8125rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.button--primary {
    border-color: var(--av-primary-button-border);
    background: var(--av-primary-button);
    box-shadow: var(--av-primary-button-shadow);
    color: var(--av-primary-contrast);
}

.button--primary:hover {
    border-color: var(--av-primary-button-border-hover);
    background: var(--av-primary-button-hover);
    box-shadow: var(--av-primary-button-shadow-hover);
}

.button--secondary {
    border-color: var(--av-border-strong);
    background: var(--av-surface);
    color: var(--av-text);
}

.button--secondary:hover {
    border-color: #aeb9c0;
    background: var(--av-surface-subtle);
}

.button--danger {
    border-color: var(--av-destructive-button);
    background: var(--av-destructive-button);
    color: var(--av-destructive-button-text);
}

.button--danger:hover {
    border-color: var(--av-destructive-button-hover);
    background: var(--av-destructive-button-hover);
}

.button--ghost {
    background: transparent;
    color: var(--av-text-muted);
}

.button--ghost:hover {
    background: var(--av-surface-subtle);
    color: var(--av-text);
}

.button:disabled,
.button[aria-disabled="true"] {
    opacity: .48;
    cursor: not-allowed;
    pointer-events: none;
}

label {
    display: inline-block;
    margin-bottom: .375rem;
    color: var(--av-text);
    font-size: .8125rem;
    font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-height: 2.625rem;
    padding: .55rem .7rem;
    border: 1px solid var(--av-border-strong);
    border-radius: var(--av-radius-md);
    background: var(--av-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
    border-color: #aeb9c0;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: var(--av-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #eef1f3;
    color: var(--av-text-muted);
    cursor: not-allowed;
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]),
:where(.panel-shell) select,
:where(.panel-shell) textarea {
    min-height: 3.2rem;
    padding: .8rem .95rem;
    border: 1px solid var(--av-input-border);
    border-radius: .78rem;
    background: var(--av-surface);
    color: var(--av-text);
    outline: 0;
    box-shadow: 0 1px 2px rgba(8, 41, 64, .025);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

:where(.panel-shell) textarea {
    min-height: 7rem;
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):hover,
:where(.panel-shell) select:hover,
:where(.panel-shell) textarea:hover {
    border-color: var(--av-input-hover);
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):focus,
:where(.panel-shell) select:focus,
:where(.panel-shell) textarea:focus {
    border-color: var(--av-input-focus);
    box-shadow: 0 0 0 4px var(--av-input-ring);
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"])::placeholder,
:where(.panel-shell) textarea::placeholder {
    color: var(--av-text-muted);
    opacity: .78;
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):is(.invalid, [aria-invalid="true"]),
:where(.panel-shell) textarea:is(.invalid, [aria-invalid="true"]) {
    border-color: var(--av-danger);
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):is(.invalid, [aria-invalid="true"]):focus,
:where(.panel-shell) textarea:is(.invalid, [aria-invalid="true"]):focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--av-danger) 12%, transparent);
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):is(:disabled, [readonly]),
:where(.panel-shell) select:disabled,
:where(.panel-shell) textarea:is(:disabled, [readonly]) {
    background: var(--av-surface-subtle);
    color: var(--av-text-muted);
    cursor: default;
}

:where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]):is(:disabled, [readonly]):hover,
:where(.panel-shell) select:disabled:hover,
:where(.panel-shell) textarea:is(:disabled, [readonly]):hover {
    border-color: var(--av-input-border);
}

@media (prefers-reduced-motion: reduce) {
    :where(.panel-shell) input:not([type="checkbox"]):not([type="radio"]),
    :where(.panel-shell) select,
    :where(.panel-shell) textarea {
        transition: none;
    }
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-lg);
    background: var(--av-surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8125rem;
}

th,
td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--av-border);
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--av-surface-subtle);
    color: var(--av-text-muted);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: var(--av-surface-subtle);
}

dialog {
    width: min(calc(100% - 2rem), 32rem);
    padding: 0;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-lg);
    background: var(--av-surface);
    color: var(--av-text);
    box-shadow: var(--av-shadow-dialog);
}

dialog::backdrop {
    background: rgba(23, 33, 43, .45);
}

.alert {
    padding: .75rem .875rem;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-md);
    background: var(--av-surface-subtle);
    color: var(--av-text);
    font-size: .8125rem;
}

.alert--success {
    border-color: var(--av-success-border);
    background: var(--av-success-soft);
    color: var(--av-success-text);
}

.alert--warning {
    border-color: var(--av-warning-border);
    background: var(--av-warning-soft);
    color: var(--av-warning-text);
}

.alert--error {
    border-color: var(--av-danger-border);
    background: var(--av-danger-soft);
    color: var(--av-danger);
}

.status-page {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    max-width: 34rem;
    padding-top: clamp(2rem, 8vh, 6rem);
}

.status-page__code {
    margin-bottom: 1rem;
    color: var(--av-primary);
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .12em;
}

.status-page__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--av-danger-border);
    border-radius: var(--av-radius-md);
    background: var(--av-danger-soft);
    color: var(--av-danger);
}

.status-page__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.status-page > p {
    max-width: 30rem;
    margin-bottom: 1.5rem;
    color: var(--av-text-muted);
}

.status-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
}

.status-page .status-page__request {
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--av-border);
    color: var(--av-text-muted);
    font-size: .75rem;
}

.status-page__details {
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--av-border);
    color: var(--av-text-muted);
    font-size: .8125rem;
}

.status-page__details summary {
    color: var(--av-text);
    font-weight: 600;
    cursor: pointer;
}

.status-page__details p {
    margin: .75rem 0 0;
}

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    display: none;
    max-width: 38rem;
    margin-inline: auto;
    padding: .875rem 3rem .875rem 1rem;
    border: 1px solid var(--av-danger-border);
    border-radius: var(--av-radius-md);
    background: var(--av-danger-soft);
    color: var(--av-danger);
    box-shadow: 0 12px 32px rgba(23, 33, 43, .12);
    font-size: .8125rem;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .75rem;
    right: 1rem;
    cursor: pointer;
}

.valid.modified:not([type="checkbox"]) {
    border-color: var(--av-success);
}

.invalid {
    border-color: var(--av-danger) !important;
}

.validation-message {
    margin-top: .35rem;
    color: var(--av-danger);
    font-size: .75rem;
}

.blazor-error-boundary {
    padding: .875rem 1rem;
    border: 1px solid var(--av-danger-border);
    border-radius: var(--av-radius-md);
    background: var(--av-danger-soft);
    color: var(--av-danger);
}

.blazor-error-boundary::after {
    content: "Nastala neočekávaná chyba.";
}

@media (max-width: 560px) {
    body {
        font-size: .875rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .panel-card {
        padding: 1rem;
    }

    .detail-list > div {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .detail-list dd {
        text-align: left;
    }

    .status-page__actions {
        width: 100%;
    }

    .status-page__actions .button {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
