:root {
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: #1f2937;
    background: #f5f7fa;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: #f5f7fa;
}

a {
    color: inherit;
}

.brand {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 24px;
}

.nav-menu a {
    text-decoration: none;
    color: #d8deea;
    padding: 10px 12px;
    border-radius: 8px;
}

    .nav-menu a.active, .nav-menu a:hover {
        background: #26344f;
        color: #fff;
    }

.nav-section {
    margin: 22px 12px 6px;
    color: #94a3b8;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.link-button {
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

h1 {
    margin: 0 0 20px;
    font-size: 1.8rem;
}

h2 {
    margin-top: 0;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

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

.stat {
    font-size: 2rem;
    font-weight: 700;
}

.muted {
    color: #64748b;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

    .field label {
        font-size: .86rem;
        color: #475569;
    }

input, textarea, select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

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

button, .button {
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    display: inline-block;
}

    button.secondary, .button.secondary {
        background: #475569;
    }

    button.danger {
        background: #b91c1c;
    }

    button:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

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

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    color: #475569;
    font-size: .86rem;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: .82rem;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #e0f2fe;
    color: #075985;
}

    .alert.error {
        background: #fee2e2;
        color: #991b1b;
    }

.timeline {
    border-left: 2px solid #cbd5e1;
    margin-left: 8px;
    padding-left: 18px;
}

.timeline-item {
    margin-bottom: 18px;
    position: relative;
}

    .timeline-item::before {
        content: '';
        position: absolute;
        left: -24px;
        top: 5px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #2563eb;
    }

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f5f7fa;
    padding: 20px;
}

.login-card {
    width: min(100%, 390px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px;
}

    .login-card h1 {
        text-align: center;
        font-size: 1.45rem;
    }

    .login-card .field {
        margin-bottom: 14px;
    }

    .login-card button {
        width: 100%;
        margin-top: 8px;
    }

.validation-message {
    color: #b91c1c;
    font-size: .85rem;
}

.qty-editor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .qty-btn:active {
        transform: scale(0.97);
    }

.qty-btn-minus {
    background-color: #fbe4e4;
    color: #b42318;
}

    .qty-btn-minus:hover {
        background-color: #f7d6d6;
    }

.qty-btn-plus {
    background-color: #e7f6ec;
    color: #18794e;
}

    .qty-btn-plus:hover {
        background-color: #d7efdf;
    }

.qty-value {
    min-width: 44px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background-color: #f3f4f6;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-align: center;
}

.qty-value-readonly {
    background-color: #f8f9fb;
    color: #4b5563;
}

.qty-btn-edit {
    background-color: #eef2f7;
    color: #475569;
}

    .qty-btn-edit:hover {
        background-color: #e2e8f0;
    }

.qty-btn-save {
    background-color: #e7f6ec;
    color: #18794e;
}

    .qty-btn-save:hover {
        background-color: #d7efdf;
    }

.qty-btn-cancel {
    background-color: #f3f4f6;
    color: #6b7280;
}

    .qty-btn-cancel:hover {
        background-color: #e5e7eb;
    }

.qty-input {
    width: 80px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.qty-editor-edit {
    gap: 6px;
}

.user-action-btn {
    border: none;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

    .user-action-btn:active {
        transform: scale(0.98);
    }

/* Upravit - šedá */
.user-action-edit {
    background-color: #eef1f4;
    color: #3f4852;
}

    .user-action-edit:hover {
        background-color: #e1e5e9;
    }

/* Deaktivovat - světle červená */
.user-action-disable {
    background-color: #fde8e8;
    color: #b42318;
}

    .user-action-disable:hover {
        background-color: #f9d7d7;
    }

/* Nové heslo - fialová */
.user-action-password {
    background-color: #eee8ff;
    color: #6b46c1;
}

    .user-action-password:hover {
        background-color: #e1d7ff;
    }

/* ============================================================
   ORDIMED LOGIN
   ============================================================ */

.ordimed-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #263746;
    background: radial-gradient( circle at 18% 16%, rgba(91, 166, 157, 0.18), transparent 32% ), radial-gradient( circle at 86% 78%, rgba(220, 188, 121, 0.16), transparent 35% ), linear-gradient( 135deg, #f4f8f8 0%, #eef5f4 48%, #f7f7f3 100% );
    position: relative;
    overflow: hidden;
}


/* Jemné dekorativní prvky pozadí */

.ordimed-login-bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ordimed-shape-1 {
    width: 460px;
    height: 460px;
    left: -180px;
    bottom: -180px;
    border: 1px solid rgba(51, 145, 134, 0.16);
}

.ordimed-shape-2 {
    width: 520px;
    height: 520px;
    right: -250px;
    top: -220px;
    background: radial-gradient( circle, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0) );
}


/* Hlavní rozložení */

.ordimed-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
    position: relative;
    z-index: 1;
}


/* Karta */

.ordimed-login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(210, 220, 223, 0.8);
    border-radius: 22px;
    padding: 42px 44px 32px;
    box-shadow: 0 20px 55px rgba(30, 55, 70, 0.10), 0 5px 16px rgba(30, 55, 70, 0.05);
}


/* Logo */

.ordimed-login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

    .ordimed-login-logo img {
        display: block;
        width: 100%;
        max-width: 290px;
        height: auto;
    }


/* Úvodní text */

.ordimed-login-intro {
    text-align: center;
    margin-bottom: 30px;
}

    .ordimed-login-intro h1 {
        margin: 0 0 8px;
        font-size: 24px;
        font-weight: 650;
        color: #273746;
    }

    .ordimed-login-intro p {
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
        color: #74818c;
    }


/* Formulář */

.ordimed-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ordimed-login-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .ordimed-login-field label {
        font-size: 14px;
        font-weight: 600;
        color: #344553;
    }


/* Input */

.ordimed-input-wrapper {
    position: relative;
}

    .ordimed-input-wrapper input {
        width: 100%;
        height: 50px;
        box-sizing: border-box;
        padding: 0 16px 0 48px;
        border: 1px solid #d4dde0;
        border-radius: 11px;
        background: #ffffff;
        color: #2e3b46;
        font-size: 15px;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    }

        .ordimed-input-wrapper input::placeholder {
            color: #a0aab2;
        }

        .ordimed-input-wrapper input:hover {
            border-color: #b8c7c9;
        }

        .ordimed-input-wrapper input:focus {
            border-color: #419b90;
            box-shadow: 0 0 0 3px rgba(65, 155, 144, 0.12);
            background-color: #ffffff;
        }


/* Ikony */

.ordimed-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: #8c9ba6;
    pointer-events: none;
}

    .ordimed-input-icon svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }


/* Přihlašovací tlačítko */

.ordimed-login-button {
    width: 100%;
    height: 52px;
    margin-top: 5px;
    border: none;
    border-radius: 11px;
    background: linear-gradient( 135deg, #58aaa0 0%, #288d82 100% );
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 7px 18px rgba(40, 141, 130, 0.20);
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

    .ordimed-login-button:hover {
        background: linear-gradient( 135deg, #4ca398 0%, #217f76 100% );
        box-shadow: 0 9px 22px rgba(40, 141, 130, 0.26);
    }

    .ordimed-login-button:active {
        transform: translateY(1px);
    }

.ordimed-login-arrow {
    font-size: 21px;
    font-weight: 400;
    margin-top: -2px;
}


/* Chyba */

.ordimed-login-error {
    margin-bottom: 20px;
    padding: 11px 13px;
    border: 1px solid #f1c7c7;
    border-radius: 9px;
    background: #fff2f2;
    color: #a84040;
    font-size: 14px;
}


/* Validace */

.ordimed-login-field .validation-message {
    font-size: 12px;
    color: #b84b4b;
}


/* Footer */

.ordimed-login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eef1f2;
    text-align: center;
    color: #98a2a9;
    font-size: 12px;
}

    .ordimed-login-footer span {
        margin: 0 5px;
        color: #c8ced2;
    }


/* Mobil */

@media (max-width: 520px) {

    .ordimed-login-wrapper {
        padding: 20px 14px;
    }

    .ordimed-login-card {
        padding: 32px 24px 26px;
        border-radius: 18px;
    }

    .ordimed-login-logo img {
        max-width: 240px;
    }

    .ordimed-login-intro h1 {
        font-size: 22px;
    }
}

/* ============================================================
   HLAVNÍ LAYOUT A SIDEBAR
   ============================================================ */

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 270px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 0 0 270px;
    background: #172236;
    color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
}

.sidebar-logo {
    flex-shrink: 0;
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
}

    .sidebar-logo a {
        display: block;
        text-decoration: none;
    }

    .sidebar-logo img {
        display: block;
        width: 100%;
        max-width: 190px;
        height: auto;
    }

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px 16px;
    overflow-y: auto;
}


/* ============================================================
   UŽIVATEL - SPODNÍ ČÁST SIDEBARU
   ============================================================ */

.sidebar-user {
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    background: transparent;
}

.sidebar-user-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* Jméno se nikdy nezkracuje třemi tečkami.
   Pokud se celé nevejde, prohlížeč ho zalomí v mezeře. */
.sidebar-user-name {
    width: 100%;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: normal;
}

.sidebar-user-company {
    width: 100%;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: break-word;
}

.sidebar-user-role {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(70, 190, 173, 0.14);
    color: #66d2c2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-user-logout {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.66);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .sidebar-user-logout svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .sidebar-user-logout:hover {
        color: #f3b1b1;
        background: rgba(210, 75, 75, 0.12);
    }


/* ============================================================
   HLAVNÍ OBSAH A TOPBAR
   ============================================================ */

.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid #e4e8ec;
    flex-shrink: 0;
}

.topbar-company {
    color: #253446;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
}

.content {
    flex: 1;
    padding: 26px;
}

.sidebar-user-wrapper {
    position: relative;
    margin-top: auto;
    flex-shrink: 0;
}

    .sidebar-user-wrapper .sidebar-user {
        margin-top: 0;
    }

.sidebar-user-main {
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

    .sidebar-user-main:hover {
        background: transparent;
    }

.sidebar-user-menu {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: calc(100% + 8px);
    padding: 6px;
    background: #202d43;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.sidebar-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 7px;
    color: #d8deea;
    text-decoration: none;
    font-size: 14px;
}

    .sidebar-user-menu-item:hover {
        background: #2b3a54;
        color: #ffffff;
    }

    .sidebar-user-menu-item svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        fill: currentColor;
    }

/* ============================================================
   PODPISY
   ============================================================ */

.signature-info p {
    max-width: 760px;
    line-height: 1.55;
}

.signature-create-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: end;
}

.signature-file-name {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

.signature-active-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #475569;
    font-size: 14px;
}

    .signature-active-checkbox input {
        width: auto;
    }

.signature-create-actions {
    margin-top: 18px;
}

.signature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.signature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #ffffff;
}

.signature-preview {
    width: 220px;
    height: 100px;
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe5ea;
    border-radius: 9px;
    background-color: #ffffff;
    background-image: linear-gradient( 45deg, #f0f2f3 25%, transparent 25% ), linear-gradient( -45deg, #f0f2f3 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, #f0f2f3 75% ), linear-gradient( -45deg, transparent 75%, #f0f2f3 75% );
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

    .signature-preview img {
        display: block;
        max-width: 200px;
        max-height: 82px;
        object-fit: contain;
    }

.signature-details {
    flex: 1;
    min-width: 0;
}

.signature-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #263746;
    font-size: 16px;
}

.signature-active-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(70, 190, 173, 0.14);
    color: #23897c;
    font-size: 12px;
    font-weight: 600;
}

.signature-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    color: #85919b;
    font-size: 12px;
}

.signature-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.signature-action,
.signature-small-button {
    border: none;
    border-radius: 7px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

    .signature-action.edit {
        background: #eef1f4;
        color: #3f4852;
    }

    .signature-action.activate {
        background: #e7f6ec;
        color: #18794e;
    }

    .signature-action.delete {
        background: #fde8e8;
        color: #b42318;
    }

.signature-edit-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

    .signature-edit-name input {
        max-width: 300px;
    }

.signature-small-button.save {
    background: #e7f6ec;
    color: #18794e;
}

.signature-small-button.cancel {
    background: #eef1f4;
    color: #475569;
}

.signature-delete-confirm {
    background: #fde8e8 !important;
    color: #b42318 !important;
}


@media (max-width: 850px) {

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

    .signature-item {
        flex-direction: column;
        align-items: stretch;
    }

    .signature-preview {
        width: 100%;
        flex-basis: auto;
    }
}

/* ============================================================
   POTVRZOVACÍ DIALOG
   ============================================================ */

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
}

.confirm-dialog {
    width: 100%;
    max-width: 430px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.confirm-dialog-title {
    margin-bottom: 10px;
    color: #263746;
    font-size: 19px;
    font-weight: 650;
}

.confirm-dialog-text {
    color: #5b6773;
    font-size: 14px;
    line-height: 1.55;
}

.confirm-dialog-email {
    margin-top: 5px;
    color: #7a8792;
    font-size: 13px;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

.confirm-button {
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

    .confirm-button.cancel {
        background: #eef1f4;
        color: #46515d;
    }

        .confirm-button.cancel:hover {
            background: #e1e5e9;
        }

    .confirm-button.confirm {
        background: #eee8ff;
        color: #6b46c1;
    }

        .confirm-button.confirm:hover {
            background: #e1d7ff;
        }


/* ============================================================
   MENŠÍ OBRAZOVKY
   ============================================================ */

@media (max-width: 850px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-basis: auto;
        position: static;
    }

    .nav-menu {
        overflow-y: visible;
    }

    .sidebar-user {
        margin-top: 0;
    }

    .content {
        padding: 18px;
    }
}

/* Zrušení žlutého pozadí autofillu v Chrome / Edge / Safari */
.ordimed-input-wrapper input:-webkit-autofill,
.ordimed-input-wrapper input:-webkit-autofill:hover,
.ordimed-input-wrapper input:-webkit-autofill:focus,
.ordimed-input-wrapper input:-webkit-autofill:active {
    -webkit-text-fill-color: #2e3b46 !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    transition: background-color 9999s ease-out 0s;
}

/* Firefox */
.ordimed-input-wrapper input:autofill {
    background-color: #ffffff !important;
    color: #2e3b46 !important;
}

.twofactor-code-input {
    width: 100%;
    height: 56px;
    border: 1px solid #d4dde0;
    border-radius: 11px;
    background: #ffffff;
    color: #273746;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 10px;
    text-align: center;
    outline: none;
}

    .twofactor-code-input:focus {
        border-color: #419b90;
        box-shadow: 0 0 0 3px rgba(65, 155, 144, 0.12);
    }

.twofactor-development-code {
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 9px;
    background: #fff8df;
    border: 1px solid #ead99a;
    color: #735f25;
    font-size: 13px;
    text-align: center;
}

    .twofactor-development-code strong {
        display: block;
        margin-top: 5px;
        font-size: 17px;
        letter-spacing: 2px;
    }

.twofactor-resend-form {
    margin-top: 14px;
    text-align: center;
}

.twofactor-resend-button {
    background: transparent;
    color: #388f86;
    padding: 7px 10px;
    font-size: 14px;
}

    .twofactor-resend-button:hover {
        background: rgba(65, 155, 144, 0.08);
    }

.ordimed-login-footer a {
    color: #71808b;
    text-decoration: none;
}

    .ordimed-login-footer a:hover {
        text-decoration: underline;
    }
.nav-divider {
    height: 1px;
    margin: 14px 12px 10px;
    background: rgba(255, 255, 255, 0.10);
}

/* ============================================================
   EDITOR OŘEZU PODPISU
   ============================================================ */

.signature-crop-modal {
    width: min(1100px, 94vw);
    height: min(850px, 92vh);
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
}


/* Hlavička se nesmí zmenšovat */

.signature-crop-header {
    flex-shrink: 0;
}

    .signature-crop-header h3 {
        margin: 0 0 6px;
        color: #263746;
        font-size: 20px;
    }

    .signature-crop-header p {
        margin: 0;
        color: #64748b;
        font-size: 14px;
    }


/* ============================================================
   PROSTOR PRO OBRÁZEK
   ============================================================ */

.signature-crop-body {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    margin-top: 16px;
    overflow: hidden;
    background: #eef2f4;
    border: 1px solid #dce3e7;
    border-radius: 10px;
}


/* Samotný obrázek */

.signature-crop-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}


/* Cropper musí využít přesně prostor editoru */

.signature-crop-body .cropper-container {
    width: 100% !important;
    height: 100% !important;
}


/* ============================================================
   TLAČÍTKA DOLE
   ============================================================ */

.signature-crop-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
    background: #ffffff;
}

/* ============================================================
   NÁSTROJE EDITORU PODPISU
   ============================================================ */

.signature-crop-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}


.signature-crop-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #d8e0e5;
    border-radius: 8px;
    background: #f7f9fa;
    color: #425466;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}


    .signature-crop-tool:hover {
        background: #edf2f4;
        border-color: #cbd5db;
    }


.signature-rotate-icon {
    font-size: 20px;
    line-height: 1;
    color: #368f85;
}

/* ============================================================
   AKCE PODPISU
   ============================================================ */

.signature-action.preview {
    background: #e8f1f7;
    color: #35647d;
}

    .signature-action.preview:hover {
        background: #dceaf2;
    }


.signature-action.download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eee8ff;
    color: #6b46c1;
    text-decoration: none;
}

    .signature-action.download:hover {
        background: #e1d7ff;
    }


/* ============================================================
   VELKÝ NÁHLED PODPISU
   ============================================================ */

.signature-preview-modal {
    width: min(850px, 92vw);
    padding: 22px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
}


.signature-preview-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}


    .signature-preview-modal-header h3 {
        margin: 0;
        color: #263746;
        font-size: 20px;
    }


.signature-preview-modal-meta {
    margin-top: 5px;
    color: #81909c;
    font-size: 13px;
}


.signature-preview-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: #eef1f4;
    color: #596672;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
}


    .signature-preview-close:hover {
        background: #e1e5e9;
    }


/* Šachovnicové pozadí ukazuje průhlednost PNG */

.signature-preview-large {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 1px solid #dfe5ea;
    border-radius: 10px;
    background-color: #ffffff;
    background-image: linear-gradient( 45deg, #eef1f2 25%, transparent 25% ), linear-gradient( -45deg, #eef1f2 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, #eef1f2 75% ), linear-gradient( -45deg, transparent 75%, #eef1f2 75% );
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}


    .signature-preview-large img {
        display: block;
        width: min(700px, 100%);
        height: auto;
        object-fit: contain;
    }


.signature-preview-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}


.signature-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    background: #288d82;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}


    .signature-download-button:hover {
        background: #217f76;
        color: #ffffff;
    }

/* ============================================================
   UPOZORNĚNÍ - CHYBĚJÍCÍ PODPIS
   ============================================================ */

.signature-warning {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 15px 17px;
    border: 1px solid #eadca9;
    border-radius: 11px;
    background: #fffaf0;
}


.signature-warning-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f4e5b5;
    color: #80651e;
    font-size: 18px;
    font-weight: 700;
}


.signature-warning-content {
    flex: 1;
    min-width: 0;
}


.signature-warning-title {
    color: #463d29;
    font-size: 15px;
    font-weight: 650;
}


.signature-warning-text {
    margin-top: 3px;
    color: #766b51;
    font-size: 13px;
    line-height: 1.45;
}


.signature-warning-action {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f1e7c7;
    color: #6f5719;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}


    .signature-warning-action:hover {
        background: #e8dab0;
    }

/* ============================================================
   DETAIL OBJEDNÁVKY / ŽÁDANKA
   ============================================================ */

.order-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}


    .order-detail-header h1 {
        margin-bottom: 0;
    }


.order-detail-summary {
    display: flex;
    align-items: center;
    gap: 42px;
    flex-wrap: wrap;
}


.order-detail-summary-item {
    min-width: 150px;
}


    .order-detail-summary-item .muted {
        margin-bottom: 4px;
    }


.order-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}


    .order-section-header h2 {
        margin-top: 0;
        margin-bottom: 4px;
    }


.order-next-step {
    border-left: 4px solid #469b91;
}


.order-request-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
}


.order-request-table {
    min-width: 1050px;
}


    .order-request-table input {
        width: 100%;
        box-sizing: border-box;
    }


        .order-request-table input[type="number"] {
            min-width: 70px;
            text-align: center;
        }


.request-remove-button {
    min-width: 34px;
    padding: 6px 9px;
    font-size: 18px;
    line-height: 1;
}


.order-workflow-info {
    margin-top: 20px;
    padding: 12px 14px;
    border: 1px solid #dce8e6;
    border-radius: 8px;
    background: #f5faf9;
    color: #536965;
    font-size: 13px;
}


.order-readonly-text {
    padding: 10px 12px;
    border: 1px solid #e0e5e8;
    border-radius: 8px;
    background: #f8fafb;
    white-space: pre-wrap;
}


@media (max-width: 800px) {

    .order-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .order-detail-summary {
        gap: 18px;
    }


    .order-detail-summary-item {
        width: 100%;
    }
}

.external-stock-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 2px;
    font-weight: 600;
    cursor: pointer;
}

    .external-stock-inline input[type="checkbox"] {
        width: 17px;
        height: 17px;
        margin: 0;
    }

/* ============================================================
   PLHOVPOINT - FINÁLNÍ LOGA
   ============================================================ */

.plhovpoint-login-logo {
    display: block;
    width: 100% !important;
    max-width: 340px !important;
    height: auto !important;
    object-fit: contain;
}

.plhovpoint-sidebar-brand {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
}

.plhovpoint-sidebar-brand img {
    display: block;
    width: 100% !important;
    max-width: 215px !important;
    height: auto !important;
    object-fit: contain;
}

.account-page-logo {
    margin-bottom: 20px;
}

.account-page-logo .plhovpoint-login-logo {
    max-width: 290px !important;
    margin: 0 auto;
}

@media (max-width: 520px) {
    .plhovpoint-login-logo {
        max-width: 285px !important;
    }

    .account-page-logo .plhovpoint-login-logo {
        max-width: 245px !important;
    }
}

/* ============================================================
   SKLAD -> OBJEDNÁVKA / KONCEPT
   ============================================================ */

.stock-select-cell {
    width: 42px;
    text-align: center;
    vertical-align: middle;
}

.stock-select-cell input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.stock-select-cell input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.stock-row-selected td {
    background: rgba(16, 185, 129, .055);
}

.stock-draft-conflict {
    margin-bottom: 18px;
    border-left: 4px solid #d6a628;
}

.stock-draft-conflict h2 {
    margin-top: 0;
}

.draft-item-needs-quantity td {
    background: rgba(245, 158, 11, .055);
}

.draft-outside-catalog-badge {
    margin-left: 8px;
    background: #fef3c7;
    color: #92400e;
}

.draft-item-note {
    margin-top: 5px;
    font-size: .86rem;
}

.draft-quantity-missing {
    font-weight: 600;
    color: #b45309;
}

.draft-quantity-alert {
    background: #fffbeb;
    color: #92400e;
}

/* ============================================================
   CATALOG PICKER - LIVE SEARCH + STABLE ADD UI
   ============================================================ */

.catalog-picker-card {
    margin-top: 12px;
    padding: 16px;
}

.catalog-picker-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.catalog-picker-search-field {
    min-width: 280px;
    flex: 1;
}

.catalog-picker-status {
    min-width: 120px;
    padding-bottom: 9px;
    text-align: right;
}

.catalog-picker-hint {
    margin-top: 8px;
    font-size: 13px;
}

.catalog-picker-results {
    margin-top: 14px;
    min-height: 42px;
}

.catalog-picker-result-count {
    margin-bottom: 10px;
}

.catalog-picker-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

.catalog-picker-action-header,
.catalog-picker-action-cell {
    width: 145px;
    min-width: 145px;
    white-space: nowrap;
}

.catalog-picker-action-shell {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 38px;
}

.catalog-picker-add-popover {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #d7dce1;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.catalog-picker-quantity-input {
    width: 72px;
    margin: 0;
}

/* ============================================================
   ORDER DRAFT - COMFORT
   ============================================================ */

.draft-summary-warning {
    margin-left: 4px;
    color: #9a6700;
    font-weight: 600;
}

.draft-quantity-cell {
    width: 205px;
    min-width: 205px;
}

.draft-quantity-editor,
.draft-quantity-display {
    width: 190px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-quantity-display {
    justify-content: space-between;
}

.draft-quantity-input {
    width: 78px;
    margin: 0;
}

.draft-quantity-value {
    min-width: 62px;
}

.draft-keyboard-hint {
    margin-top: 10px;
    font-size: 13px;
}

@media (max-width: 760px) {
    .catalog-picker-status {
        width: 100%;
        text-align: left;
        padding-bottom: 0;
    }

    .catalog-picker-add-popover {
        right: 0;
        top: calc(100% + 6px);
        transform: none;
    }
}

/* ============================================================
   ORDERS - WORKFLOW STATUS BADGES
   Barva je záměrně pouze na popisku stavu, ne na celém řádku.
   ============================================================ */

.workflow-status-badge {
    border: 1px solid transparent;
    font-weight: 600;
    white-space: nowrap;
}

.workflow-status-badge.status-neutral {
    background: #eef1f4;
    border-color: #dce2e7;
    color: #56636d;
}

.workflow-status-badge.status-new {
    background: #eaf3ff;
    border-color: #c9ddfb;
    color: #245ea8;
}

.workflow-status-badge.status-working {
    background: #e9f7f7;
    border-color: #c3e5e4;
    color: #176b69;
}

.workflow-status-badge.status-waiting {
    background: #fff5d9;
    border-color: #f0d895;
    color: #8a5a00;
}

.workflow-status-badge.status-approved {
    background: #eef0ff;
    border-color: #d5d8fa;
    color: #4a4da1;
}

.workflow-status-badge.status-signed,
.workflow-status-badge.status-completed {
    background: #eaf7ef;
    border-color: #c6e5d1;
    color: #1d6b3c;
}

.workflow-status-badge.status-cancelled {
    background: #fdecec;
    border-color: #f3c9c9;
    color: #a33a3a;
}


/* ============================================================
   NOTIFIKACE
   ============================================================ */

.notification-page-intro {
    max-width: 820px;
    margin-bottom: 18px;
}

.notification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.notification-card {
    margin: 0;
}

.notification-card-wide {
    grid-column: 1 / -1;
}

.notification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.notification-card-header h2,
.notification-overrides-card h2,
.notification-preview-card h2 {
    margin-top: 0;
}

.notification-card-header p {
    margin-bottom: 0;
}

.notification-switch-line {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 600;
    cursor: pointer;
}

.notification-switch-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.notification-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
}

.notification-setting-row > label {
    font-weight: 600;
}

.notification-number-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-number-with-unit input {
    width: 100px;
}

.notification-note,
.notification-immediate-label {
    margin: 12px 0 0;
    font-size: .88rem;
}

.notification-immediate-label {
    color: #176b69;
    font-weight: 600;
}

.notification-schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 18px;
    max-width: 760px;
}

.notification-schedule-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f7f9f8;
    border: 1px solid #e2e9e5;
    font-size: .88rem;
}

.notification-schedule-status > div {
    display: flex;
    gap: 6px;
}

.notification-save-actions {
    margin: 18px 0 22px;
}

.notification-overrides-card,
.notification-preview-card {
    margin-top: 18px;
}

.notification-stock-search {
    max-width: 420px;
    margin: 14px 0;
}

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

.notification-stock-table {
    min-width: 920px;
}

.notification-stock-subline {
    margin-top: 4px;
    font-size: .82rem;
}

.notification-override-input {
    width: 140px;
}

.notification-effective-value {
    margin-top: 5px;
    font-size: .78rem;
}

.notification-mini-badge {
    display: inline-block;
    margin-top: 6px;
    margin-right: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

.notification-mini-danger {
    background: #fdecec;
    color: #a33a3a;
}

.notification-mini-warning {
    background: #fff5d9;
    color: #8a5a00;
}

.notification-mini-stock {
    background: #eaf3ff;
    color: #245ea8;
}

.notification-preview-card details {
    border-top: 1px solid #e4ebe7;
    padding: 11px 0;
}

.notification-preview-card details:first-of-type {
    border-top: 0;
}

.notification-preview-card summary {
    cursor: pointer;
    font-weight: 700;
}

.notification-email-preview {
    margin-top: 10px;
    padding: 14px 16px;
    background: #f7f9f8;
    border-left: 4px solid #10954f;
    border-radius: 6px;
}

.stock-notification-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

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

    .notification-card-wide {
        grid-column: auto;
    }

    .notification-schedule-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .notification-card-header,
    .notification-setting-row {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-switch-line {
        white-space: normal;
    }
}
