/* ===============================
   BAREVNÁ PALETA – BLACK SCALE (SHARK)
   =============================== */
:root {
    --black-50: #F6F6F6;
    --black-100: #E7E7E7;
    --black-200: #D1D1D1;
    --black-300: #B0B0B0;
    --black-400: #888888;
    --black-500: #6D6D6D;
    --black-600: #5D5D5D;
    --black-700: #4F4F4F;
    --black-800: #454545;
    --black-900: #3D3D3D;
    --black-950: #212121;
    /* SHARK */
}

/* ===============================
   ZÁKLAD
   =============================== */
* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    background-color: var(--black-950);
    color: var(--black-100);
}

/* ===============================
   LOGIN PAGE
   =============================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* KONTEJNER */
.login-container {
    width: 100%;
    max-width: 360px;
    padding: 20px;
}

/* BOX – TECHNICKÝ PANEL */
.login-box {
    background-color: #2a2a2a;
    /* lehce světlejší než pozadí */
    border-radius: 8px;
    padding: 30px 28px 32px;
    border: 1px solid #333333;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75);
}

/* LOGO */
.login-logo {
    text-align: center;
    margin-bottom: 22px;
}

.login-logo img {
    max-width: 150px;
    height: auto;
}

/* NADPISY */
.login-title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 6px;
    color: var(--black-50);
}

.login-subtitle {
    font-size: 14px;
    text-align: center;
    color: var(--black-400);
    margin-bottom: 24px;
}

/* POLE */
.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--black-200);
}

.login-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: var(--black-100);
    background-color: #1a1a1a;
}

.login-field input:focus {
    outline: none;
    border-color: var(--black-500);
    box-shadow: none;
}

/* TLAČÍTKO */
.login-button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background-color: #0f0f0f;
    color: var(--black-100);
    font-size: 15px;
    border: 1px solid #333333;
    border-radius: 4px;
    cursor: pointer;
}

.login-button:hover {
    background-color: #1a1a1a;
}

/* CHYBOVÁ HLÁŠKA */
.login-error {
    background-color: #1e1e1e;
    color: var(--black-200);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid #333333;
}

/* ===============================
   APP HEADER (SHARK)
   =============================== */
.app-header {
    height: 70px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #2f2f2f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    height: 26px;
}

.app-title {
    font-size: 15px;
    color: var(--black-100);
    letter-spacing: 0.2px;
}

.app-header-right {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

/* ===============================
   STATUS ABRA + DB
   =============================== */
.abra-status,
.db-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--black-400);
    white-space: nowrap;
}

.abra-status .dot,
.db-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--black-500);
    flex-shrink: 0;
}

.abra-status .status-text,
.db-status .status-text {
    min-width: 48px;
    display: inline-block;
    text-align: left;
}

/* ===============================
   STATUS – DOT STATES
   =============================== */

/* loading */
.abra-status.loading .dot,
.db-status.loading .dot {
    background: var(--black-500);
    animation: dotPulse 1.4s ease-in-out infinite;
}

/* online */
.abra-status.online .dot,
.db-status.online .dot {
    background: #6fcf97;
    animation: none;
}

/* offline */
.abra-status.offline .dot,
.db-status.offline .dot {
    background: #eb5757;
    animation: none;
}

/* ===============================
   RECHECK BUTTON
   =============================== */
.abra-recheck {
    position: relative;
    border: none;
    width: 20px;
    height: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: var(--black-400);
    padding: 0;
    right: 5px;
}

.abra-recheck:hover {
    color: var(--black-200);
}

/* ===============================
   USER + LOGOUT
   =============================== */
.app-user {
    font-size: 13px;
    color: var(--black-300);
}

.app-logout {
    font-size: 13px;
    color: var(--black-100);
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 4px;
}

.app-logout:hover {
    background-color: #2a2a2a;
}

/* ===============================
   DOT ANIMATION
   =============================== */
@keyframes dotPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* ===============================
   FORM LOADING OVERLAY
   =============================== */

.form-wrapper {
    position: relative;
}

.form-overlay {
    position: absolute;
    inset: 0;

    background: rgba(18, 18, 18, 0.7);
    border-radius: 6px;
    backdrop-filter: blur(1px);

    display: flex;
    justify-content: center;
    align-items: flex-start;

    z-index: 10;
}

.form-overlay.hidden {
    display: none;
}

.form-overlay-box {
    position: sticky;
    top: 40%;

    align-self: flex-start;

    background: #1f1f1f;
    border: 1px solid #2f2f2f;
    border-radius: 8px;

    padding: 16px 24px;
    color: var(--black-100);
    font-size: 14px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}


/* ===============================
   FORM LAYOUT
   =============================== */
.app-main {
    padding: 24px;
}

.form-section {
    background-color: #242424;
    border: 1px solid #2f2f2f;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 15px;
    color: var(--black-100);
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.form-field {
    flex: 1;
}

.form-field.full {
    flex: 1 1 100%;
}

.form-field label {
    display: block;
    font-size: 12px;
    color: var(--black-300);
    margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 8px 10px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: var(--black-100);
    border-radius: 4px;
}

.condition-field.error textarea {
    border-color: #e53935;
}

.sn-status {
    font-size: 12px;
    margin-top: 4px;
}

.sn-status.loading {
    color: var(--black-300);
}

.sn-status.success {
    color: #6fcf97;
}

.sn-status.error {
    color: #eb5757;
}


.form-field textarea {
    min-height: 80px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--black-200);
}

.radio-group.error {
    outline: 2px solid #e53935;
    border-radius: 6px;
    padding: 6px;
}

.form-field select {
    width: 100%;
    padding: 8px 10px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: var(--black-100);
    border-radius: 4px;
}

/* ===============================
   EMPTY  CONTENT
   =============================== */

.issues-empty {
    font-size: 0.9rem;
    color: var(--black-400);
    font-style: italic;
    padding: 0.5rem 0;
}

/* ===============================
   ADDRESS AUTOCOMPLETE
   =============================== */

.address-autocomplete {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: #1f1f1f;
    border: 1px solid #2f2f2f;
    border-radius: 6px;

    margin-top: 4px;
    z-index: 50;

    max-height: 220px;
    overflow-y: auto;
}

.address-suggestions.hidden {
    display: none;
}

.address-suggestion {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--black-100);
    cursor: pointer;
}

.address-suggestion:hover {
    background: #2a2a2a;
}


/* ===============================
   ISSUES SECTION
   =============================== */
.issues-row {
    align-items: stretch;
}

.issues-text {
    flex: 2;
}

.issues-text textarea {
    min-height: 140px;
}

.issues-matrix {
    flex: 1;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin-top: 20px;
}

/* ===============================
   ISSUES SECTION LOCK (TUNED)
   =============================== */

#issuesMatrix {
    position: relative;
}

#issuesMatrix.locked {
    pointer-events: none;
}

/* jemnější blur */
#issuesMatrix.locked .checkbox-grid {
    filter: blur(1.5px);
    opacity: 0.4;
}

/* overlay už NENÍ full-cover */
#issuesMatrix .issues-lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 5;

    min-width: 320px;
    max-width: 85%;

    padding: 1rem 1.5rem;
    line-height: 1.4;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.9rem;
    text-align: center;

    border-radius: 8px;
    pointer-events: none;
}

/* skrytý stav */
#issuesMatrix .issues-lock-overlay.hidden {
    display: none;
}

/* skrýt nadpis při zamčení */
#issuesMatrix.locked .issues-title {
    display: none;
}

/* ===============================
   RADIO BUTTONS – SHARK (FINAL)
   =============================== */

.radio-group {
    display: flex;
    gap: 16px;
    margin: 6px 0;
}

.radio {
    display: flex !important;
    /* ⬅️ klíčové kvůli globálním label */
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    min-height: 38px;
    border-radius: 8px;
    cursor: pointer;

    font-size: 14px;
    color: var(--black-300);

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

/* hover – celý blok */
.radio:hover {
    background-color: #2a2a2a;
}

/* schovat default input */
.radio input {
    display: none;
}

/* kruh */
.radio-icon {
    width: 18px;
    height: 18px;
    border: 2px solid var(--black-500);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

/* vnitřní tečka */
.radio-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--black-100);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
}

/* checked */
.radio input:checked+.radio-icon::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio input:checked+.radio-icon {
    border-color: var(--black-100);
}

.radio input:checked~.radio-text {
    color: var(--black-100);
}

/* ===============================
   CUSTOM CHECKBOX – SHARK
   =============================== */
.checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--black-200);
    cursor: pointer;
}

/* schovat default */
.checkbox input {
    display: none;
}

/* box */
.checkbox span {
    width: 16px;
    height: 16px;
    border: 2px solid var(--black-500);
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
}

/* fajfka */
.checkbox span::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: solid var(--black-100);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

/* checked */
.checkbox input:checked+span::after {
    transform: rotate(45deg) scale(1);
}

.checkbox input:checked+span {
    border-color: var(--black-100);
}

/* ===============================
   SECONDARY BUTTON
   =============================== */
.btn-secondary {
    padding: 8px 14px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: var(--black-200);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #2a2a2a;
    color: var(--black-100);
}

.btn-secondary:disabled,
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===============================
   ABRA DISABLED
   =============================== */

.abra-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
}

#abraRecheck.attention {
    animation: abraPulse 1.2s ease-out;
    border-radius: 100%;
    /* border: 1px solid red; */
}

@keyframes abraPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.0);
    }

    30% {
        box-shadow: 0 0 0 2px rgba(111, 207, 151, 0.25);
    }

    60% {
        box-shadow: 0 0 0 4px rgba(111, 207, 151, 0.12);
    }

    100% {
        box-shadow: 0 0 0 6px rgba(111, 207, 151, 0.0);
    }
}

/* ===============================
   CHECKBOX LIST (VERTICAL)
   =============================== */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===============================
   FORM ACTIONS
   =============================== */
.form-actions {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #2f2f2f;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-actions-right {
    display: flex;
    gap: 12px;
}

/* ===============================
   BUTTONS
   =============================== */
.btn {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-secondary {
    background-color: #1a1a1a;
    border-color: #333;
    color: var(--black-200);
}

.btn-secondary:hover {
    background-color: #2a2a2a;
    color: var(--black-100);
}

.btn-primary {
    background-color: var(--black-50);
    color: var(--black-950);
    border-color: var(--black-50);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #ffffff;
}

/* ===============================
   APP LAYOUT
   =============================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-content {
    flex: 1;
    min-width: 0;
    /* ← ZABRAŇUJE POSUNŮM */
}

/* ===============================
   SIDEBAR
   =============================== */

.app-sidebar {
    width: 220px;
    background-color: #1a1a1a;
    border-right: 1px solid #2f2f2f;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
}

/* ===============================
   LOGO – STABILNÍ (NO JUMP)
   =============================== */

.sidebar-logo {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #2f2f2f;
}

.sidebar-logo img {
    height: 26px;               /* ⬅️ VŽDY STEJNÁ VÝŠKA */
    transform: scale(1);
    transition: transform 0.25s ease;
}

/* ===============================
   NAV
   =============================== */

.sidebar-nav {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

/* ===============================
   MAIN ITEMS
   =============================== */

.sidebar-item {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 18px;

    font-size: 13px;
    color: var(--black-300);
    text-decoration: none;

    overflow: hidden;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.sidebar-item:hover {
    background-color: #2a2a2a;
    color: var(--black-100);
}

.sidebar-item.active {
    background-color: #242424;
    color: var(--black-50);
    border-left: 3px solid var(--black-500);
}

/* ===============================
   LABEL (TEXT)
   =============================== */

.sidebar-label {
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

/* ===============================
   BULLET (TEČKA)
   =============================== */

.sidebar-bullet {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    font-size: 18px;
    line-height: 1;
    color: var(--black-300);

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.15s ease;
}

.sidebar-item.active .sidebar-bullet {
    color: var(--black-50);
}

/* ===============================
   SUBMENU
   =============================== */

.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-subnav {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.sidebar-group.expanded .sidebar-subnav {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

.sidebar-subitem {
    height: 32px;
    line-height: 32px;
    padding-left: 38px;
    padding-right: 18px;

    font-size: 12.5px;
    color: var(--black-400);
    text-decoration: none;
}

.sidebar-subitem:hover {
    color: var(--black-100);
}

.sidebar-subitem.active {
    color: var(--black-50);
    font-weight: 500;
}

/* ===============================
   ACTIVE SUBMENU → ACTIVE PARENT
   =============================== */

.sidebar-group.expanded > .sidebar-item {
    background-color: #242424;
    color: var(--black-50);
    border-left: 3px solid var(--black-500);
}

/* ===============================
   COLLAPSED MODE
   =============================== */

.app-layout.sidebar-collapsed .app-sidebar {
    width: 64px;
}

.app-layout.sidebar-collapsed .sidebar-logo img {
    transform: scale(0.75); 
}

/* text pryč, ale layout zůstává */
.app-layout.sidebar-collapsed .sidebar-label {
    opacity: 0;
    pointer-events: none;
}

/* tečka viditelná a centrovaná */
.app-layout.sidebar-collapsed .sidebar-bullet {
    opacity: 1;
}

/* submenu nikdy */
.app-layout.sidebar-collapsed .sidebar-subnav {
    display: none !important;
}

/* ===============================
   PRELOAD FIX – 100% STABILNÍ
   =============================== */

html.sidebar-collapsed-preload .app-sidebar {
    width: 64px !important;
}

/* logo už při loadu ve správném měřítku */
html.sidebar-collapsed-preload .sidebar-logo img {
    transform: scale(0.75) !important;
}

/* skrýt texty – bez layout změn */
html.sidebar-collapsed-preload .sidebar-label {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* tečky zůstanou viditelné */
html.sidebar-collapsed-preload .sidebar-bullet {
    opacity: 1 !important;
}

/* submenu nikdy při preloadu */
html.sidebar-collapsed-preload .sidebar-subnav {
    display: none !important;
}

/* vypnout animace během preloadu */
html.sidebar-collapsed-preload * {
    transition: none !important;
}

/* ===============================
   HAMBURGER
   =============================== */

.hamburger {
    background: none;
    border: none;
    color: var(--black-100);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.hamburger:hover {
    background-color: #2a2a2a;
    border-radius: 4px;
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 10000;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 260px;
    max-width: 360px;

    background: #1f1f1f;
    border: 1px solid #2f2f2f;
    border-radius: 8px;

    padding: 14px 16px;
    color: var(--black-100);
    font-size: 14px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);

    opacity: 0;
    transform: translateY(10px);
    animation: toast-in .25s ease forwards;
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #E53935;
}

.toast.info {
    border-left: 4px solid #2196F3;
}

@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ===============================
   AMBIGUOUS MODAL OVERLAY
   =============================== */

.ambiguous-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    /* víc než toast */
    background: rgba(0, 0, 0, 0.45);

    display: flex;
    align-items: center;
    justify-content: center;
}

.ambiguous-modal.hidden {
    display: none;
}

/* ===============================
   MODAL BOX
   =============================== */

.ambiguous-box {
    background: #1f1f1f;
    color: #fff;

    width: 100%;
    max-width: 520px;
    max-height: 80vh;

    padding: 24px;
    border-radius: 12px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);

    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===============================
   TITLE & TEXT
   =============================== */

.ambiguous-box h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ambiguous-box p {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
}

/* ===============================
   LIST
   =============================== */

.ambiguous-list {
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* jednotlivá položka */
.ambiguous-row {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ambiguous-row:last-child {
    border-bottom: none;
}

.ambiguous-row label {
    display: flex;
    gap: 10px;
    cursor: pointer;
    align-items: flex-start;
}

.ambiguous-row input[type="radio"] {
    margin-top: 3px;
}

/* ===============================
   ACTIONS
   =============================== */

.ambiguous-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* disabled button */
.ambiguous-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===============================
   PRINT PREVIEW MODAL
   =============================== */

.print-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.print-modal.hidden {
    display: none;
}

.print-modal-content {
    background: var(--black-900);
    border-radius: 10px;
    width: 90vw;
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* ===============================
   HEADER
   =============================== */

.print-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--black-900);
    border-bottom: 1px solid var(--black-800);
}

.print-modal-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--black-200);
}

.print-modal-close {
    background: none;
    border: none;
    color: var(--black-400);
    font-size: 18px;
    cursor: pointer;
}

.print-modal-close:hover {
    color: var(--black-100);
}

/* ===============================
   BODY
   =============================== */

.print-modal-body {
    flex: 1;
    background: var(--black-950);
    display: flex;
}

.print-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* ===============================
   FOOTER
   =============================== */

.print-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--black-900);
    border-top: 1px solid var(--black-800);
}

.print-hint {
    font-size: 12px;
    color: var(--black-400);
}

.print-actions {
    display: flex;
    gap: 8px;
}

.print-btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.print-btn.print {
    background: #6fcf97;
    color: #0f2e1f;
}

.print-btn.print:hover {
    opacity: 0.9;
}

.print-btn.cancel {
    background: var(--black-700);
    color: var(--black-200);
}

.print-btn.cancel:hover {
    background: var(--black-650);
}

/* ===============================
   ACCESSIBILITY / FOCUS
   =============================== */

.print-btn:focus-visible,
.print-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(111, 207, 151, 0.6);
}


/* ===============================
   PRINT MODAL (CUSTOM)
   =============================== */

.print-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.print-modal.hidden {
    display: none;
}

/* ===============================
   MODAL CONTAINER
   =============================== */

.print-modal {
    padding: 24px;
}

/* ===============================
   HEADER
   =============================== */

.print-header {
    width: 90vw;
    max-width: 900px;
    background: var(--black-900);
    color: var(--black-200);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 16px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--black-800);
}

.print-header span {
    font-size: 14px;
    font-weight: 500;
}

#printModal button {
    border: none;
    color: var(--black-400);
    font-size: 16px;
    cursor: pointer;
}

#printModal button:hover {
    color: var(--black-100);
}

/* ===============================
   IFRAME (PDF)
   =============================== */

#printFrame {
    width: 90vw;
    max-width: 900px;
    height: 70vh;

    border: none;
    background: #fff;
}

/* ===============================
   ACTIONS
   =============================== */

.print-actions {
    width: 90vw;
    max-width: 900px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 16px;
    background: var(--black-900);
    border-radius: 0 0 10px 10px;
    border-top: 1px solid var(--black-800);
}

.print-actions button {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.print-actions .primary {
    background: #6fcf97;
    color: var(--black-50);
}

.print-actions .primary:hover {
    opacity: 0.9;
}

#printModal #cancelPrint {
    background: var(--black-700);
    color: var(--black-50);
}

#printModal #cancelPrint:hover {
    background: var(--black-600);
}

.close-print {
    background: none;
}

/* ===============================
   FOCUS / ACCESSIBILITY
   =============================== */

#printModal button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(111, 207, 151, 0.6);
}

/* ===============================
   POST PRINT SUCCESS MODAL
   =============================== */

.success-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;

    display: flex;
    align-items: center;
    justify-content: center;
}

.success-modal.hidden {
    display: none;
}

.success-box {
    background: var(--black-900);
    color: var(--black-200);

    width: 420px;
    max-width: calc(100vw - 32px);
    padding: 28px;

    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.success-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;

    border-radius: 50%;
    background: #6fcf97;
    color: #0f2e1f;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: 700;
}

.success-box h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.success-box p {
    font-size: 13px;
    color: var(--black-400);
    margin-bottom: 20px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.success-actions button {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}

.success-actions .primary {
    background: #6fcf97;
    color: var(--black-50);
}

/* ===============================
   PACKAGE CONTENTS – LIST PAGE
   =============================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* ===============================
   TABLE HEADER
   =============================== */

.data-table thead th {
    text-align: left;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #eaeaea;
}

/* ===============================
   TABLE BODY
   =============================== */

.data-table tbody td {
    padding: 12px 14px;
    vertical-align: top;
}

/* border pouze na řádku */
.data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ===============================
   COLUMN TWEAKS
   =============================== */

.data-table td:nth-child(1) {
    white-space: nowrap;
    font-weight: 500;
}

.data-table td:nth-child(2) {
    font-family: monospace;
    color: #cfd8dc;
}

.data-table td:nth-child(4) {
    width: 35%;
}

/* ===============================
   PACKAGE CONTENTS – LIST PAGE
   =============================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* ===============================
   TABLE HEADER
   =============================== */

.data-table thead th {
    text-align: left;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #eaeaea;
}

/* ===============================
   TABLE BODY
   =============================== */

.data-table tbody td {
    padding: 12px 14px;
    vertical-align: top;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ===============================
   COLUMN TWEAKS
   =============================== */

.data-table td:nth-child(1) {
    white-space: nowrap;
    font-weight: 500;
}

.data-table td:nth-child(2) {
    font-family: monospace;
    color: #cfd8dc;
}

.data-table td:nth-child(4) {
    width: 32%;
}

/* ===============================
   ACTIONS COLUMN
   =============================== */

.data-table th.actions,
.data-table td.actions {
    text-align: right;
}

.data-table td.actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.data-table td.actions .btn {
    opacity: 0.8;
}

.data-table td.actions .btn[disabled] {
    cursor: not-allowed;
    opacity: 0.4;
}

/* ===============================
   PACKAGE CONTENT BUTTON
   =============================== */

.package-content-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e6e6e6;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.package-content-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.package-content-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.25);
}

.data-table tr.is-editing .package-content-btn {
    opacity: 0.4;
    pointer-events: none;
}

/* ===============================
   EMPTY STATE
   =============================== */

.empty-state {
    margin-top: 12px;
    font-style: italic;
    color: #aaa;
}

.empty-state.hidden {
    display: none;
}

/* ===============================
   INLINE EDIT MODE
   =============================== */

.data-table tr.is-editing {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.data-table tr.is-editing td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.data-table tr.is-editing input,
.data-table tr.is-editing select {
    width: 100%;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.data-table tr.is-editing input:focus,
.data-table tr.is-editing select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.data-table tr.is-editing .btn-save {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.data-table tr.is-editing .btn-save:hover {
    background: #1d4ed8;
}

.data-table tr.is-editing .btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ccc;
}

.data-table tr.is-editing .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===============================
   MODAL – BASE
   =============================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-panel {
    position: relative;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    margin: 6vh auto;
    background: #1f1f1f;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ===============================
   MODAL HEADER / FOOTER
   =============================== */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===============================
   MODAL BODY
   =============================== */

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
}

/* ===============================
   PACKAGE ITEMS IN MODAL
   =============================== */

/* ZÁKLAD ŘÁDKU – STEJNÝ LAYOUT PRO VŠECHNY */
.package-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 36px;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

/* PASIVNÍ INDIKÁTOR (⋯) – aby řádek nepůsobil prázdně */
.package-item::after {
    content: '⋯';
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);

    color: rgba(255, 255, 255, 0.25);
    font-size: 18px;
    letter-spacing: 1px;

    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* PŘI HOVERU / FOCUSU ZMIZÍ */
.package-item:hover::after,
.package-item input:focus~ ::after {
    opacity: 0;
}

/* ===============================
   INPUT
   =============================== */

.package-item input {
    width: 100%;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #eaeaea;
    padding: 8px 10px;
    border-radius: 6px;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

/* ===============================
   NEW ITEM (ADD ROW)
   =============================== */

.package-item.is-new input {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.01));
    border: 1px dashed rgba(255, 255, 255, 0.25);
    font-style: italic;
}

/* PLACEHOLDER */
.package-item.is-new input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* FOCUS = AKTIVNÍ PŘIDÁVÁNÍ */
.package-item.is-new input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    font-style: normal;
}

/* ===============================
   REMOVE BUTTON
   =============================== */

.package-item .remove-btn {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;

    color: #9ca3af;
    font-size: 16px;
    line-height: 1;

    cursor: pointer;
    opacity: 0;

    transition:
        opacity 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.05s ease;
}

/* ZOBRAZIT KŘÍŽEK AŽ PŘI HOVERU ŘÁDKU */
.package-item:hover .remove-btn {
    opacity: 1;
}

/* HOVER */
.package-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* ACTIVE */
.package-item .remove-btn:active {
    transform: scale(0.95);
}

/* FOCUS */
.package-item .remove-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

/* ===============================
   REMOVE BUTTON – NEW ROW
   (SKRYTÝ, ALE DRŽÍ LAYOUT)
   =============================== */

.package-item.is-new .remove-btn {
    visibility: hidden;
    pointer-events: none;
}

/* ===============================
   CONFIRM BUTTON (ADD)
   =============================== */

.package-item .confirm-btn {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;

    color: #9ca3af;
    font-size: 18px;
    line-height: 1;

    cursor: pointer;
    opacity: 0;

    transition:
        opacity 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.05s ease;
}

/* ZOBRAZIT PŘI HOVERU / FOCUSU */
.package-item.is-new:hover .confirm-btn,
.package-item.is-new input:focus+.confirm-btn {
    opacity: 1;
}

/* HOVER */
.package-item .confirm-btn:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.45);
    color: #22c55e;
}

/* ACTIVE */
.package-item .confirm-btn:active {
    transform: scale(0.95);
}

/* FOCUS */
.package-item .confirm-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}