:root {
    color-scheme: dark;
    --bg: #101114;
    --panel: #181b20;
    --panel-2: #20242b;
    --text: #e8edf2;
    --muted: #a4afbb;
    --line: #343a44;
    --accent: #4aa3ff;
    --accent-strong: #2f8df0;
    --highlight: #ff9f2f;
    --danger: #ff6b6b;
    --danger-bg: #351f24;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

@font-face {
  font-family: 'DigiPoint';
  src: url('pidvl-bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

.digip {
  font-family: 'DigiPoint';
  color: Orange;
}


a {
    color: inherit;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.page.narrow {
    width: min(720px, calc(100% - 32px));
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

p {
    margin: 6px 0 0;
    color: var(--muted);
}

b {
    color: var(--highlight);
    font-weight: 800;
}

.highlight-text,
.topbar .intro-copy b {
    color: var(--highlight);
    font-weight: 800;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

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

.inline-actions form {
    margin: 0;
}

.button:hover,
button:hover {
    border-color: var(--accent);
}

.button.primary,
button.primary {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #fff;
    font-weight: 700;
}

.button.compact {
    min-height: 30px;
    width: auto;
    padding: 0 10px;
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--panel-2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.actions {
    width: 108px;
    white-space: nowrap;
}

td.actions {
    display: flex;
    gap: 8px;
}

td.actions form {
    margin: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
}

.icon-button:hover {
    border-color: var(--accent);
}

.icon-button.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

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

.form {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.login-panel {
    width: min(460px, 100%);
    margin: 72px auto 0;
}

label {
    display: grid;
    gap: 7px;
}

label span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0f1216;
    color: var(--text);
    font: inherit;
}

input {
    height: 40px;
    padding: 0 11px;
}

textarea {
    min-height: 104px;
    padding: 10px 11px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(74, 163, 255, 0.2);
}

input:disabled,
textarea:disabled {
    background: #1d2025;
    color: #78838f;
    border-color: #2b3038;
    cursor: not-allowed;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-line input,
.status-toggle,
.access-k1-toggle {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-strong);
}

.checkbox-line span {
    color: var(--text);
    font-size: 15px;
    font-weight: 400;
}

.radio-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    min-width: 0;
    padding: 0;
    border: 0;
    margin: 0;
}

.radio-group legend {
    padding: 0;
    margin: 0 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.delivery-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.delivery-links span {
    margin-right: 2px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.error {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--danger);
    border-radius: 6px;
    background: var(--danger-bg);
    color: #ffd9d9;
}

.notice {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.notice h1 {
    margin-bottom: 6px;
}

.notice.success {
    border-color: rgba(85, 214, 143, 0.55);
    background: rgba(45, 125, 76, 0.18);
    color: #dfffea;
}

.notice.error-box {
    border-color: var(--danger);
    background: var(--danger-bg);
    color: #ffd9d9;
}

.notice.error-box p {
    color: #ffd9d9;
}

.filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filterbar form {
    margin: 0;
}

.access-delete-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.access-delete-form label {
    flex: 1 1 260px;
}

.access-delete-form .form-actions {
    flex: 0 0 auto;
}

.filterbar .button {
    min-height: 30px;
    width: auto;
    padding: 0 10px;
    font-size: 13px;
}

.admin-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.note-cell {
    min-width: 180px;
    max-width: 320px;
    white-space: normal;
}

.status-cell {
    text-align: center;
}

.status-cell input {
    cursor: pointer;
}

/* Barevné rozlišení stavu záznamů ve správci. */
tr.status-done > td {
    background: #183d2b;
}

tr.status-sent-open > td {
    background: #172f4e;
}

.is-hidden {
    display: none !important;
}

.payment-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #12161b;
}

.payment-box h2 {
    margin: 0 0 14px;
    font-size: 19px;
}

.payment-help {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.payment-help b {
    color: var(--highlight);
}

.payment-grid {
    display: grid;
    gap: 12px;
}

.payment-method {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.payment-method h3 {
    margin: 0;
    font-size: 16px;
}

.payment-method p {
    overflow-wrap: anywhere;
}

.payment-address {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.vanity-part {
    color: var(--highlight);
    font-weight: 800;
}

.qr-code {
    display: grid;
    place-items: center;
    width: 124px;
    height: 124px;
    padding: 6px;
    border-radius: 6px;
    background: #fff;
}

.qr-code img,
.qr-code canvas {
    width: 112px;
    height: 112px;
}

.qr-static img {
    display: block;
    object-fit: contain;
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .inline-actions {
        width: 100%;
    }

    .inline-actions .button,
    .inline-actions button {
        width: 100%;
    }

    .payment-method {
        grid-template-columns: 1fr;
    }
}
