:root {
    --blue: #1769e0;
    --blue-dark: #0f4fa9;
    --blue-light: #edf5ff;
    --text: #172033;
    --muted: #6d7890;
    --border: #e5ebf5;
    --background: #f6f9fd;
    --white: #ffffff;
    --green: #17845b;
    --red: #c3364c;
    --orange: #b56a00;
    --shadow: 0 12px 35px rgba(32, 72, 125, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--blue);
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.main-header {
    min-height: 72px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
}

.logo span {
    color: var(--blue);
}

.logo-center {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}

.main-header nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.main-header nav a {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 650;
}

.main-header nav a.active,
.main-header nav a:hover {
    color: var(--blue);
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.narrow-container {
    width: min(720px, calc(100% - 2rem));
}

.hero {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
    gap: 4rem;
}

.hero h1,
.page-heading h1 {
    margin: 0.3rem 0 1rem;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.75;
}

.eyebrow {
    margin: 0;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.button {
    border: 0;
    border-radius: 10px;
    padding: 0.82rem 1.15rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: var(--blue);
    cursor: pointer;
    font-weight: 750;
    transition: 0.18s ease;
}

.button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.button-secondary {
    color: var(--blue);
    background: var(--blue-light);
}

.button-small {
    padding: 0.58rem 0.85rem;
    color: #fff !important;
}

.button-full {
    width: 100%;
}

.button-large {
    padding: 1rem;
    font-size: 1.05rem;
}

.hero-card,
.content-card,
.cash-register-card,
.subscription-card,
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
    display: grid;
    gap: 1rem;
    text-align: center;
}

.hero-card span {
    color: var(--muted);
}

.fake-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border: 14px solid var(--text);
    background:
        linear-gradient(90deg, var(--blue) 50%, transparent 50%),
        linear-gradient(var(--blue) 50%, transparent 50%);
    background-size: 24px 24px;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 10%, #d9ebff, transparent 35%),
        var(--background);
}

.auth-card {
    width: min(100%, 440px);
    padding: 2rem;
}

.auth-card h1 {
    margin-bottom: 0.4rem;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.auth-footer {
    margin-top: 1.5rem;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
}

label {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    padding: 0.8rem 0.85rem;
    border: 1px solid #cad5e6;
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: #fff;
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.flash {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.flash-success {
    color: #126044;
    background: #e4f8ef;
}

.flash-error {
    color: #8a2436;
    background: #ffeaee;
}

.page-heading {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.page-heading h1 {
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.stat-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.35rem;
}

.content-card {
    margin: 1.25rem 0;
    padding: 1.4rem;
    box-shadow: none;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.register-list {
    display: grid;
    gap: 0.75rem;
}

.register-item {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    background: var(--blue-light);
}

.register-item p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.status {
    display: inline-flex;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-active,
.status-paid {
    color: #106443;
    background: #dff7ec;
}

.status-waiting {
    color: #8a5600;
    background: #fff3d9;
}

.status-cancelled,
.status-expired {
    color: #8f2639;
    background: #ffe3e9;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    padding: 0.85rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.9rem;
}

th {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-button {
    padding: 0;
    border: 0;
    color: var(--blue);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.subscription-warning {
    margin-bottom: 1.25rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #f2d493;
    border-radius: 12px;
    background: #fff7e2;
    color: #6f4900;
}

.cash-register-card {
    padding: 1.5rem;
}

.amount-label {
    margin-top: 1.4rem;
    font-size: 1rem;
}

.amount-input {
    position: relative;
}

.amount-input input {
    padding-right: 4rem;
    font-size: 2rem;
    font-weight: 800;
}

.amount-input span {
    position: absolute;
    top: 50%;
    right: 1rem;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 750;
    transform: translateY(-50%);
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.quick-amounts button {
    padding: 0.7rem 0.35rem;
    border: 1px solid #cfe0fa;
    border-radius: 9px;
    color: var(--blue);
    background: var(--blue-light);
    cursor: pointer;
    font-weight: 750;
}

.subscription-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.subscription-price {
    color: var(--blue);
    font-size: 2.5rem;
    font-weight: 850;
    letter-spacing: -0.06em;
}

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

.check-list {
    padding: 0;
    list-style: none;
    line-height: 2;
}

.check-list li::before {
    margin-right: 0.6rem;
    color: var(--green);
    content: "✓";
    font-weight: 900;
}

.subscription-status-box {
    min-width: 180px;
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
    border-radius: 12px;
    background: var(--blue-light);
}

.subscription-status-box span,
.subscription-status-box small {
    color: var(--muted);
}

.subscription-status-box strong {
    font-size: 1.15rem;
}

.payment-renewal {
    text-align: center;
}

.payment-renewal img {
    max-width: 100%;
    margin: 1rem auto;
}

.payment-details {
    margin: 1rem auto;
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    text-align: center;
}

.payment-details strong {
    color: var(--text);
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

/* Zákaznický displej */

.customer-display {
    min-height: 100vh;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at top left, #2984ff, transparent 35%),
        linear-gradient(135deg, #0755c8, #063274);
}

.customer-display-content {
    width: min(100%, 880px);
    padding: 2rem;
    text-align: center;
}

.display-brand {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: 750;
    opacity: 0.9;
}

.display-caption {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.85;
}

.display-amount {
    margin: 0.3rem 0 1.5rem;
    font-size: clamp(3rem, 11vw, 7rem);
    letter-spacing: -0.07em;
}

.qr-wrapper {
    width: fit-content;
    margin: 0 auto;
    padding: 1.1rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.22);
}

.qr-wrapper img {
    display: block;
    max-width: min(70vw, 360px);
    height: auto;
}

.display-message {
    margin: 1.5rem auto 0.8rem;
    font-size: 1.15rem;
}

.customer-display .payment-details strong {
    color: #fff;
}

.display-footer {
    margin-top: 2rem;
    opacity: 0.68;
}

.payment-success,
.payment-cancelled {
    padding: 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #27b47e;
    font-size: 4rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    .main-header {
        padding: 0.9rem 1rem;
        gap: 1rem;
    }

    .main-header nav {
        gap: 0.75rem;
    }


    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 0;
    }

    .hero-card {
        max-width: 400px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-heading,
    .subscription-card,
    .subscription-warning {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
}

.settings-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
}

.settings-card .muted {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-divider {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

label small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
}

.info-card {
    border-left: 4px solid var(--blue);
}

.info-card h2 {
    margin-top: 0;
    font-size: 1.05rem;
}

@media (max-width: 560px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
.quick-amount-settings-list {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
}

.quick-amount-settings-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.quick-amount-settings-input {
    position: relative;
    flex: 1;
}

.quick-amount-settings-input input {
    padding-right: 3.5rem;
}

.quick-amount-settings-input span {
    position: absolute;
    top: 50%;
    right: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    transform: translateY(-50%);
}

.button-remove-amount {
    width: 38px;
    height: 38px;
    border: 1px solid #f1c8d0;
    border-radius: 9px;
    color: var(--red);
    background: #fff2f4;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.save-quick-amounts {
    margin-top: 1rem;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-form input {
    flex: 1;
}

.register-management-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.cash-register-management-card {
    margin: 0;
}

.cash-register-management-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.cash-register-management-heading h2 {
    margin: 0.5rem 0 0;
    font-size: 1.2rem;
}

.cash-register-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.cash-register-section h3 {
    margin: 0 0 0.45rem;
    font-size: 0.98rem;
}

.display-link-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.display-link-input {
    flex: 1;
    min-width: 0;
    color: var(--muted);
    background: #f7faff;
}

.cash-register-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding-top: 1.25rem;
}

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

.button-danger:hover {
    background: #9f2338;
}

@media (max-width: 650px) {
    .inline-form,
    .display-link-row {
        align-items: stretch;
        flex-direction: column;
    }

    .cash-register-management-heading {
        flex-direction: column;
    }
}

.display-waiting {
    padding: 3rem 1rem;
}

.display-waiting-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 4rem;
    font-weight: 300;
}

.display-waiting h1,
.payment-success h1,
.payment-cancelled h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: -0.05em;
}

.display-waiting p,
.payment-success p,
.payment-cancelled p {
    font-size: 1.15rem;
    opacity: 0.86;
}

.cash-register-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 1.25rem;
}

.cash-products-section {
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.85rem;
}

.product-button {
    min-height: 115px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    border: 1px solid #d8e5f7;
    border-radius: 14px;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: 0.18s ease;
}

.product-button:hover {
    border-color: var(--blue);
    background: var(--blue-light);
    box-shadow: 0 8px 18px rgba(23, 105, 224, 0.10);
    transform: translateY(-2px);
}

.product-button-name {
    font-weight: 800;
    line-height: 1.25;
}

.product-button-price {
    color: var(--blue);
    font-weight: 800;
}

.product-button-price small {
    color: var(--muted);
    font-weight: 650;
}

.cart-panel {
    position: sticky;
    top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.cart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-heading h2 {
    margin: 0;
}

.cart-items {
    max-height: 390px;
    overflow-y: auto;
}

.cart-empty-message {
    padding: 2rem 0;
    text-align: center;
}

.cart-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-main {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
}

.cart-item-main strong {
    font-size: 0.94rem;
}

.cart-item-main span {
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.cart-item-controls {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
}

.cart-quantity {
    display: flex;
    align-items: center;
}

.cart-quantity input {
    width: 68px;
    padding: 0.45rem;
    border-radius: 0;
    text-align: center;
}

.cart-quantity-button {
    width: 30px;
    height: 35px;
    border: 1px solid #cad5e6;
    color: var(--blue);
    background: var(--blue-light);
    cursor: pointer;
    font-size: 1.1rem;
}

.cart-quantity-button:first-child {
    border-radius: 8px 0 0 8px;
}

.cart-quantity-button:last-child {
    border-radius: 0 8px 8px 0;
}

.cart-line-total {
    font-size: 0.9rem;
    white-space: nowrap;
}

.cart-remove-button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    color: var(--red);
    background: #fff0f3;
    cursor: pointer;
    font-size: 1.15rem;
}

.cart-total {
    margin: 1rem 0;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 2px solid var(--border);
}

.cart-total span {
    color: var(--muted);
    font-weight: 700;
}

.cart-total strong {
    color: var(--blue);
    font-size: 1.45rem;
}

.manual-payment-card {
    margin-top: 1.25rem;
}

.manual-payment-card summary {
    cursor: pointer;
    color: var(--blue);
    font-weight: 800;
}

.manual-payment-form {
    width: min(100%, 520px);
    margin-top: 1.25rem;
}

.product-create-form {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 180px 150px auto;
    align-items: end;
    gap: 0.8rem;
}

.price-input {
    position: relative;
}

.price-input input {
    padding-right: 3.2rem;
}

.price-input span {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    transform: translateY(-50%);
}

.product-management-list {
    display: grid;
    gap: 0.8rem;
}

.product-management-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.product-inactive {
    opacity: 0.62;
    background: #fbfcfe;
}

.product-edit-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 160px 100px auto;
    align-items: end;
    gap: 0.7rem;
}

.product-edit-form label {
    margin: 0;
}

.product-status-form {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

@media (max-width: 900px) {
    .cash-register-layout {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .product-create-form,
    .product-edit-form {
        grid-template-columns: 1fr;
    }

    .product-edit-save {
        margin-top: 0.4rem;
    }

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

.manual-payment-primary {
    margin-bottom: 1.25rem;
}

.manual-payment-primary h2 {
    margin: 0;
}

.product-cart-section {
    margin-top: 1.25rem;
}

.product-cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.product-cart-summary::-webkit-details-marker {
    display: none;
}

.product-cart-summary span:first-child {
    display: grid;
    gap: 0.25rem;
}

.product-cart-summary strong {
    color: var(--text);
    font-size: 1rem;
}

.product-cart-summary small {
    color: var(--muted);
}

.product-cart-summary-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: var(--blue-light);
    font-size: 1.5rem;
    font-weight: 400;
}

.product-cart-section details[open] .product-cart-summary-icon {
    transform: rotate(45deg);
}

.product-cart-content {
    padding-top: 1.5rem;
}

.empty-products-card {
    padding: 1.5rem;
    border: 1px dashed #c7d9f2;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.empty-products-card h3 {
    margin-top: 0;
}

.text-warning {
    color: var(--orange);
    font-weight: 750;
}
.subscription-warning {
    align-items: center;
}

.subscription-warning p {
    margin: 0.4rem 0 0;
    color: inherit;
    font-size: 0.9rem;
}

.subscription-warning-expired {
    border-color: #efb4bf;
    color: #8f2639;
    background: #fff0f3;
}

.subscription-warning-expired .button {
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .subscription-warning-expired .button {
        width: 100%;
    }
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.nav-toggle span {
    width: 19px;
    height: 2px;
    margin: 4px auto;
    display: block;
    border-radius: 10px;
    background: var(--text);
}

@media (max-width: 760px) {
    .main-header {
        position: relative;
        min-height: 64px;
        padding: 0.7rem 1rem;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        z-index: 100;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        padding: 0.8rem 1rem 1rem;
        display: none !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem !important;
        border-bottom: 1px solid var(--border);
        background: #fff;
        box-shadow: 0 12px 24px rgba(20, 48, 90, 0.12);
    }

    .main-nav.is-open {
        display: flex !important;
    }

    .main-nav a {
        padding: 0.85rem 0.7rem;
        border-radius: 8px;
        color: var(--text) !important;
    }

    .main-nav a:hover,
    .main-nav a.active {
        color: var(--blue) !important;
        background: var(--blue-light);
    }
}

.custom-item-adder {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid #d8e5f7;
    border-radius: 14px;
    background: #f8fbff;
}

.custom-item-adder h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.custom-item-adder .muted {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
}

.custom-item-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: stretch;
}

.custom-item-form input,
.custom-item-form select,
.custom-item-form .price-input {
    width: 100%;
}

.custom-item-form .button {
    justify-self: start;
}

.cart-item-custom {
    border-left: 3px solid var(--blue);
    padding-left: 0.75rem;
}

@media (max-width: 760px) {
    .custom-item-form {
        grid-template-columns: 1fr 1fr;
    }

    .custom-item-form input:first-child {
        grid-column: 1 / -1;
    }

    .custom-item-form button {
        grid-column: 1 / -1;
    }
    
    .custom-item-form .button {
        width: 100%;
    }

}

.payment-filter-card {
    margin-bottom: 1.25rem;
}

.payment-filter-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    align-items: end;
    gap: 0.85rem;
}

.payment-filter-form label {
    margin: 0;
}

.payment-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.payment-items-details {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--blue);
    font-size: 0.8rem;
}

.payment-items-details summary {
    cursor: pointer;
    font-weight: 700;
}

.payment-items-details p {
    width: min(300px, 70vw);
    margin: 0.5rem 0 0;
    color: var(--muted);
    line-height: 1.5;
    white-space: normal;
}

.empty-payments {
    padding: 2rem 1rem;
    text-align: center;
}

.empty-payments h3 {
    margin-top: 0;
}

.payments-table td {
    vertical-align: top;
}

@media (max-width: 1050px) {
    .payment-filter-form {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 680px) {
    .payment-filter-form {
        grid-template-columns: 1fr;
    }

    .payment-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.payment-actions {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.payment-actions form {
    display: inline;
}

.payment-qr-link {
    color: var(--blue);
}

.payment-qr-link::before {
    margin-right: 0.3rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    font-weight: 600;
}

.forgot-password-link {
    margin: -0.35rem 0 1.2rem;
    text-align: right;
    font-size: 0.88rem;
}

.forgot-password-link a {
    font-weight: 700;
}
.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-action-row form {
    margin: 0;
}

@media (max-width: 560px) {
    .admin-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-action-row .button {
        width: 100%;
    }
}
.forwarding-address-box {
    margin: 1rem 0;
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
    border: 1px solid #c9ddf8;
    border-radius: 12px;
    background: var(--blue-light);
}

.forwarding-address-box span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.forwarding-address-box strong {
    color: var(--blue);
    font-size: 1.05rem;
    word-break: break-word;
}

.forwarding-address-box small {
    color: var(--muted);
    line-height: 1.5;
}

.payment-confirmation-icon {
    width: 24px;
    height: 24px;
    margin-left: 0.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    vertical-align: middle;
    font-size: 0.82rem;
    cursor: help;
}

.payment-confirmation-email {
    color: #0758b7;
    background: #ddecff;
}

.payment-confirmation-manual {
    color: #8b5900;
    background: #fff0d4;
}

.payment-cancel-link {
    color: var(--red);
}

.payment-cancel-link:hover {
    color: #981e33;
    text-decoration: underline;
}

.remember-me-label {
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.remember-me-label input {
    width: 18px;
    height: 18px;
}

.remember-me-help {
    margin: 0.45rem 0 1rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* Kontejner pro menu v tabulce */
.payment-actions {
    position: relative;
    text-align: left;
}

.dropdown {
    position: relative;
    display: inline-block;
}

/* Hlavní tlačítko menu */
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.dropdown-toggle:hover {
    background: #f9fafb;
}

/* UPRAVENO: Skryté menu s plynulým přechodem a zpožděním */
.dropdown-menu {
    /* Místo display: none/block použijeme opacity a visibility pro podporu transition */
    opacity: 0;
    visibility: hidden;
    
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    min-width: 160px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;

    /* NASTAVENÍ ODJEZDU: Menu zmizí až po 200ms od opuštění myší */
    transition: opacity 0.15s ease, visibility 0.15s ease;
    transition-delay: 0.2s; 
}

/* Klička proti mezerám: Vytvoříme neviditelný "most" nad menu, 
   aby uživatel při přejíždění myší dolů neztratil hover stav */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px; /* Pokryje prostor mezi tlačítkem a menu */
    left: 0;
    right: 0;
    height: 15px;
    display: block;
}

/* UPRAVENO: Zobrazení menu při najetí myši na kontejner */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    /* NASTAVENÍ NÁJEZDU: Při najetí se menu zobrazí okamžitě bez zpoždění */
    transition-delay: 0s; 
}

/* Společný styl pro odkazy i tlačítka uvnitř menu */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Speciální barva pro zrušení platby */
.dropdown-item.text-danger {
    color: #dc2626;
}
.dropdown-item.text-danger:hover {
    background-color: #fef2f2;
}

/* Speciální barva pro zaplacení platby */
.dropdown-item.text-zaplaceno {
    color: #106443;
}
.dropdown-item.text-zaplaceno:hover {
    background-color: #f2fef2;
}

/* Zarovnání ikon */
.dropdown-item svg {
    flex-shrink: 0;
}

.dashboard-register-list {
    display: grid;
    gap: 1rem;
}

.dashboard-register-card {
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.dashboard-register-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-register-heading h3 {
    margin: 0.55rem 0 0;
    font-size: 1.08rem;
}

.dashboard-display-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.dashboard-display-link > span {
    margin-bottom: 0.45rem;
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-display-link-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.dashboard-display-link-row input {
    min-width: 0;
    flex: 1;
    color: var(--muted);
    background: #f7faff;
    font-size: 0.82rem;
}

.dashboard-display-link-row .button {
    flex-shrink: 0;
}

@media (max-width: 680px) {
    .dashboard-register-heading {
        flex-direction: column;
    }

    .dashboard-register-heading .button {
        width: 100%;
    }

    .dashboard-display-link-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-display-link-row .button {
        width: 100%;
    }
}

.selected-cash-register {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 1rem;
    align-items: center;
    border: 1px solid #cce0fb;
    border-radius: 11px;
    background: var(--blue-light);
}

.selected-cash-register span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.selected-cash-register strong {
    color: var(--blue);
    font-size: 1rem;
}

.selected-cash-register a {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: var(--blue);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.selected-cash-register a:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .selected-cash-register {
        grid-template-columns: 1fr;
    }

    .selected-cash-register a {
        grid-row: auto;
        grid-column: auto;
        margin-top: 0.35rem;
    }
}