/* ========================================================= */
/* 0. DARK MODE - CSS PROMĚNNÉ */
/* ========================================================= */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ecf0f1;
    --text-primary: #333;
    --text-secondary: #555;
    --text-heading: #2c3e50;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-light: #ddd;
    --border-color-lighter: #eee;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-light: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-heading: #f0f0f0;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(255, 255, 255, 0.15);
    --border-color-lighter: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.2);
}

/* ========================================================= */
/* 1. ZÁKLADNÍ STYLY */
/* ========================================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Zabraňuje přesahům textu */
* {
    box-sizing: border-box;
    max-width: 100%;
}

p, span, div, a, button, label, input, textarea, select {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Smooth transitions pro interaktivní prvky */
button, a, input, select, textarea, .offer-card, .offer-item, .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================= */
/* 2. BOČNÍ MENU */
/* ========================================================= */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 20px var(--shadow);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.5s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.side-menu .image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.side-menu .image a {
    display: block;
    width: 100%;
    text-align: center;
}

.side-menu .image img {
    max-width: 140px;
    height: auto;
    margin: 0px auto;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.side-menu .image img:hover {
    transform: scale(1.1);
}

.side-menu ul {
    list-style: none;
    padding: 0;
    width: 100%;
}

.side-menu li {
    margin-bottom: 20px;
}

.side-menu a {
    display: block;
    color: var(--text-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.side-menu a:hover {
    background-color: var(--bg-tertiary);
    color: #1abc9c;
    transform: scale(1.02);
}

.nick-name {
    text-align: center;
    color: #f0660a;
    font-size: 20px;
    font-weight: 700;
}

.bottom-icons {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.bottom-icons img {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.bottom-icons img:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* ========================================================= */
/* 3. HLAVNÍ OBSAH */
/* ========================================================= */
.main-content {
    margin-left: 260px;
    padding: 40px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.main-content h2,
.main-content h3 {
    font-size: 1.6rem;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.h1_invoice {
    margin-bottom: 50px;
}

.empty-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 85vh;
}

.empty-message p {
    font-size: 24px;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* ========================================================= */
/* 4. TABULKY */
/* ========================================================= */
#selection-table,
#offer-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

#selection-table th,
#offer-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-heading);
    padding: 12px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

#selection-table td,
#offer-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color-lighter);
    font-size: 0.95rem;
    color: var(--text-primary);
    vertical-align: middle;
}

#selection-table input[type="number"],
#selection-table select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

#selection-table input[type="number"] {
    width: 70px;
}

#grand_total {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
}

/* ========================================================= */
/* 5. TLAČÍTKA */
/* ========================================================= */
/* Hlavní akční tlačítka */
#submit-offer-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#submit-offer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

#submit-pdf-btn {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#submit-pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
}

#manage-custom-items-btn {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
    width: auto;
    min-width: 200px;
}

#manage-custom-items-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
    background: linear-gradient(135deg, #de6412 0%, #c95a0f 100%);
}

#add-custom-item-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    width: auto;
    min-width: 200px;
}

#add-custom-item-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

#submit-invoice-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#submit-invoice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

#submit-delete-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#submit-delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

#send_offer_button {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#send_offer_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
}

#send_invoice_button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    flex: 0 1 auto;
    min-width: 200px;
}

#send_invoice_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

/* Tlačítka pro akce s nabídkou a fakturou */
#offer-action-btn {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#offer-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
    background: linear-gradient(135deg, #de6412 0%, #c95a0f 100%);
}

#invoice-action-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    flex: 0 1 auto;
    min-width: 160px;
}

#invoice-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

/* Tlačítko přidat na nabídku */
#add-to-offer-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.3);
}

#add-to-offer-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.4);
}

#add-to-offer-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Tlačítko odstranit řádek */
.remove-item-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.remove-item-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}

/* Obecné tlačítko */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.btn-edit {
    background-color: #1abc9c;
}

.btn-edit:hover {
    background-color: #16a085;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-invoice {
    background-color: #3498db;
}

.btn-invoice:hover {
    background-color: #2980b9;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-pdf {
    background-color: #f39c12;
}

.btn-pdf:hover {
    background-color: #e67e22;
}

.btn-paid {
    background-color: #28a745;
    color: white;
}

.btn-paid:hover {
    background-color: #218838;
}

.btn-unpaid {
    background-color: #dc3545;
    color: white;
}

.btn-unpaid:hover {
    background-color: #c82333;
}

.btn-save {
    background-color: #1abc9c;
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0 auto;
}

.btn-save:hover {
    background-color: #16a085;
    transform: scale(1.02);
}

button[name="review"] {
    background-color: #34495e;
    color: #ffffff;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

button[name="review"]:hover {
    background-color: #2c3e50;
    transform: scale(1.02);
}

/* ========================================================= */
/* 6. FORMULÁŘE A INPUTY */
/* ========================================================= */
.customer-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.customer-info:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.customer-info h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.customer-field {
    display: flex;
    flex-direction: column;
}

.customer-field label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.customer-field input,
.customer-field select,
.customer-field textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.customer-field input:focus,
.customer-field select:focus,
.customer-field textarea:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.1), 0 4px 12px rgba(26, 188, 156, 0.2);
    outline: none;
    transform: translateY(-2px);
}


.profile-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.profile-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease forwards;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1abc9c;
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    margin: 0 auto 30px auto;
    max-width: 600px;
    line-height: 1.7;
    font-weight: 400;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.05) 0%, rgba(26, 188, 156, 0.02) 100%);
    border-left: 4px solid #1abc9c;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.section-description:hover {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.08) 0%, rgba(26, 188, 156, 0.04) 100%);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.1);
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Zajištění, že všechny fieldsety mají stejnou šířku */
fieldset.form-section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.form-section .form-group input,
.form-section .form-group select,
.form-section .form-group textarea {
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 6px rgba(26, 188, 156, 0.3);
    outline: none;
}

.form-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

/* Checkbox styling pro my_profile */
.form-group-checkbox {
    margin-bottom: 20px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checkbox-wrapper input[type="checkbox"],
.checkbox-wrapper .form-check-input {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 !important;
    border: 2px solid #ccc !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"]:hover,
.checkbox-wrapper .form-check-input:hover {
    border-color: #1abc9c !important;
}

.checkbox-wrapper input[type="checkbox"]:checked,
.checkbox-wrapper .form-check-input:checked {
    background-color: #1abc9c !important;
    border-color: #1abc9c !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.checkbox-wrapper label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    user-select: none;
}

.form-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 4px;
}

.form-alert.error {
    background-color: #ffe6e6;
    border-left: 6px solid #e74c3c;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #c0392b;
    font-weight: 600;
}

.form-alert.success {
    background-color: #e8f5e9;
    border-left: 6px solid #4CAF50;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1b5e20;
    font-weight: 600;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: #1abc9c;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: #16a085;
}

/* ========================================================= */
/* 7. POPUP OKNA */
/* ========================================================= */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    animation: fadeIn 0.3s ease-out;
}

/* Malý popup pro jednoduché formuláře */
.popup-content-small {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 450px;
    min-height: 200px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

.popup-content-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1abc9c, #16a085, #1abc9c);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.popup-content-small h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.popup-content-small label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.popup-content-small input,
.popup-content-small select,
.popup-content-small textarea {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.popup-content-small input:focus,
.popup-content-small select:focus,
.popup-content-small textarea:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 6px rgba(26, 188, 156, 0.3);
    outline: none;
}

.popup-content-small button[type="submit"] {
    background-color: #1abc9c;
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    margin-right: 10px;
}

.popup-content-small button[type="submit"]:hover {
    background-color: #16a085;
    transform: scale(1.02);
}

.popup-content-small button[type="button"] {
    background-color: #e74c3c;
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.popup-content-small button[type="button"]:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}

.popup-content-small .btn-cancel {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-content-small .btn-cancel:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Design pro popup mazání faktury */
.popup-delete-invoice {
    text-align: center;
}

.popup-header-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.popup-delete-invoice h2 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.popup-description {
    color: #555;
    font-size: 1rem;
    margin: 15px 0 25px 0;
    line-height: 1.5;
}

.delete-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.delete-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: 2px solid;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-align: left;
    width: 100%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.delete-option-btn:hover {
    transform: scale(1.02);
}

.delete-option-warning {
    border-color: #f39c12;
}

.delete-option-danger {
    border-color: #e74c3c;
}

.delete-option-cancel {
    border-color: #95a5a6;
}

.option-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-title {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.option-description {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Výchozí popup-content pro kompatibilitu - nyní je to malý popup */
.popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 450px;
    min-height: 200px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1abc9c, #16a085, #1abc9c);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.popup-content h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.popup-warning-text {
    margin-bottom: 30px;
    color: #555;
    line-height: 1.6;
    text-align: center;
}

.popup-content label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.popup-content input[type="text"] {
    width: 95%;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.popup-content input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 6px rgba(26, 188, 156, 0.3);
    outline: none;
}

.popup-content button[type="submit"] {
    background-color: #1abc9c;
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    margin-right: 10px;
}

.popup-content button[type="submit"]:hover {
    background-color: #16a085;
    transform: scale(1.02);
}

.popup-content button[type="button"] {
    background-color: #e74c3c;
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.popup-content button[type="button"]:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}

.popup-content .btn-cancel {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-content .btn-cancel:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.popup-content-large .btn-cancel {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    min-width: 180px;
}

.popup-content-large .btn-cancel:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

/* Tlačítka v popupu pro výběr pozadí (popup-overlay-4) - fixní rozměry */
#popup-overlay-4 .popup-content-large .buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

#popup-overlay-4 .popup-content-large .buttons button[type="submit"],
#popup-overlay-4 .popup-content-large .buttons button[type="button"] {
    min-width: 180px;
    width: 180px;
    height: 50px;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#popup-overlay-4 .popup-content-large .buttons button[type="submit"] {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
}

#popup-overlay-4 .popup-content-large .buttons button[type="submit"]:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

#popup-overlay-4 .popup-content-large .buttons button[type="button"] {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

#popup-overlay-4 .popup-content-large .buttons button[type="button"]:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(149, 165, 166, 0.4);
}

/* Tlačítka v popupu pro poslání nabídky zákazníkovi (popup-overlay-3) - fixní rozměry */
#popup-overlay-3 .popup-content-large .buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

#popup-overlay-3 .popup-content-large .buttons button[type="submit"],
#popup-overlay-3 .popup-content-large .buttons button[type="button"] {
    min-width: 180px;
    width: 180px;
    height: 50px;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#popup-overlay-3 .popup-content-large .buttons button[type="submit"] {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
}

#popup-overlay-3 .popup-content-large .buttons button[type="submit"]:hover {
    background: linear-gradient(135deg, #de6412 0%, #c95a0f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
}

#popup-overlay-3 .popup-content-large .buttons button[type="button"] {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

#popup-overlay-3 .popup-content-large .buttons button[type="button"]:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(149, 165, 166, 0.4);
}

/* ========================================================= */
/* 8. VĚTŠÍ POPUP PRO SPRÁVU VLASTNÍCH POLOŽEK (POPUP 7) */
/* ========================================================= */
.popup-overlay-large {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    animation: fadeIn 0.3s ease-out;
}

.popup-content-large {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 900px;
    min-height: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

.popup-content-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1abc9c, #16a085, #1abc9c);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.popup-content-large h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.popup-content-large .customer-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.popup-content-large .customer-field label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.popup-content-large .customer-field input,
.popup-content-large .customer-field select,
.popup-content-large .customer-field textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.popup-content-large .customer-field input:focus,
.popup-content-large .customer-field select:focus,
.popup-content-large .customer-field textarea:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.1), 0 4px 12px rgba(26, 188, 156, 0.2);
    outline: none;
    transform: translateY(-2px);
}

.popup-content-large .background-preview-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content-large .background-preview {
    width: 100%;
    min-height: 300px;
    height: 300px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content-large .preview-title-page {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.popup-content-large .preview-title-wrapper {
    max-width: 70%;
    width: 100%;
    padding: 30px 20px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
}

.popup-content-large .preview-title-wrapper--plain {
    background-color: transparent;
    border: none;
}

.popup-content-large .preview-logo {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
}

.popup-content-large .preview-title-wrapper h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #111827;
    line-height: 1.2;
}

.popup-content-large .preview-title-number {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.popup-content-large .preview-title-wrapper h2 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #111827;
    line-height: 1.3;
}

/* Tabulka pro vlastní položky - podobný design jako #offer-table */
#custom-items-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

#custom-items-table th {
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 12px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#custom-items-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #333;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

#custom-items-table td:last-child {
    text-align: center;
}

#custom-items-table .remove-custom-item-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    white-space: nowrap;
}

#custom-items-table .remove-custom-item-btn:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}

#custom-items-container {
    margin-bottom: 30px;
}

/* Responzivní styly pro větší popup */
@media (max-width: 768px) {
    .popup-content-small {
        width: 400px;
        padding: 25px;
    }
    
    .popup-content {
        width: 400px;
        padding: 25px;
    }
    
    .popup-content-large {
        width: 95%;
        padding: 30px 20px;
        max-height: 85vh;
    }
    
    .popup-content-large h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    #custom-items-table {
        font-size: 0.85rem;
    }
    
    #custom-items-table th {
        padding: 12px 10px;
        font-size: 0.75rem;
    }
    
    #custom-items-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    #custom-items-table .remove-custom-item-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .popup-content-small {
        width: 90%;
        padding: 20px;
    }
    
    .popup-content {
        width: 90%;
        padding: 20px;
    }
    
    .popup-content-large {
        width: 95%;
        padding: 20px 15px;
        max-height: 80vh;
    }
    
    .popup-content-large h2 {
        font-size: 1.3rem;
    }
    
    #custom-items-table {
        font-size: 0.75rem;
    }
    
    #custom-items-table th {
        padding: 8px 6px;
        font-size: 0.7rem;
    }
    
    #custom-items-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    #custom-items-table .remove-custom-item-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .popup-content-large .btn-cancel {
        padding: 10px 20px;
        font-size: 0.95rem;
        min-width: 140px;
    }
}

/* ========================================================= */
/* POPUP STYLY - KOMPLETNÍ STYLING */
/* ========================================================= */

/* Popup overlay utility classes */
.popup-overlay-flex {
    display: flex !important;
}

.popup-overlay-none {
    display: none !important;
}

/* Action popup specific styles */
.popup-action-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 30px;
}

.popup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5f3;
}

.popup-header .popup-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: bounce 1s ease-in-out;
}

.popup-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

/* Error and success messages */
.popup-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border-left: 4px solid #e74c3c;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

.popup-error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.popup-error-text {
    flex: 1;
    color: #c0392b;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

.popup-success-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.popup-success-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1.2;
    color: #2e7d32;
}

.popup-success-text {
    flex: 1;
    color: #1b5e20;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

.popup-success-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #2e7d32;
}

.popup-success-text p {
    margin: 0;
    color: #1b5e20;
}

/* Popup form sections */
.popup-section {
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e8f5f3;
    transition: all 0.3s ease;
}

.popup-section:hover {
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.1);
    border-color: #1abc9c;
}

.popup-section-title {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-section-title-large {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

/* Popup field groups */
.popup-field-group {
    margin-bottom: 15px;
}

.popup-field-group:last-child {
    margin-bottom: 0;
}

.popup-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1rem;
}

.popup-label-optional {
    font-weight: 400;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.popup-label-required {
    color: #e74c3c;
    font-weight: 700;
}

.popup-input,
.popup-textarea,
.popup-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dfe3e7;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.popup-input:focus,
.popup-textarea:focus,
.popup-select:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.popup-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.popup-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231abc9c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
}

/* Popup field row (for side-by-side fields) */
.popup-field-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.popup-field-half {
    flex: 1;
}

/* Popup email notice */
.popup-email-notice {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.1) 0%, rgba(26, 188, 156, 0.05) 100%);
    border-left: 3px solid #1abc9c;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 15px;
}

.popup-email-notice strong {
    color: #16a085;
    font-size: 0.95rem;
}

/* Popup warning box */
.popup-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.popup-warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.popup-warning-content {
    flex: 1;
}

.popup-warning-content strong {
    display: block;
    color: #d68910;
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.popup-warning-content p {
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Popup actions (buttons) */
.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e8f5f3;
}

.popup-actions-primary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 130px;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.4);
}

.popup-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

.popup-btn-highlight {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.popup-btn-highlight:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.popup-btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    width: 100%;
}

.popup-btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
}

.popup-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Responsive styles for popups */
@media (max-width: 768px) {
    .popup-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .popup-action-content {
        max-width: 95%;
        padding: 20px 18px;
        max-height: 85vh;
    }
    
    .popup-header h2 {
        font-size: 1.3rem;
    }
    
    .popup-header .popup-icon {
        font-size: 2.2rem;
    }
    
    .popup-section {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    .popup-section-title {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }
    
    .popup-section-title-large {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    
    .popup-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .popup-actions-primary {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 25px 15px;
        border-radius: 16px;
    }
    
    .popup-action-content {
        padding: 18px 15px;
        max-height: 80vh;
    }
    
    .popup-header h2 {
        font-size: 1.2rem;
    }
    
    .popup-header .popup-icon {
        font-size: 2rem;
    }
    
    .popup-section {
        padding: 12px 10px;
        margin-bottom: 12px;
    }
    
    .popup-input,
    .popup-textarea,
    .popup-select {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
}

.popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.popup-form {
    display: inline;
}

.popup-content .btn-delete-confirm {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.popup-content .btn-delete-confirm:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.warning-message.expandable {
    background-color: #fff4e5;
    border-left: 6px solid #f0660a;
    padding: 16px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    animation: fadeInUp 0.5s ease forwards;
    transition: all 0.3s ease;
    overflow: hidden;
    margin: 20px auto;
}

.warning-message .summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: #a65c00;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warning-message .toggle-hint {
    font-size: 0.85rem;
    font-weight: normal;
    color: #a65c00;
    margin-left: 10px;
    opacity: 0.7;
}

.warning-message .details {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.warning-message.expanded .details {
    max-height: 300px;
    opacity: 1;
    margin-top: 12px;
}

.choices form {
    text-align: center;
    margin: 10px;
}

.choices form select {
    margin: 20px;
}

select#selected_background {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8fcfb;
    color: #2c3e50;
    transition: border-color 0.3s ease;
}

select#selected_background:focus {
    border-color: #1abc9c;
    outline: none;
}

/* ========================================================= */
/* 8. VYHLEDÁVÁNÍ */
/* ========================================================= */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.search-bar h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

#item-search-input,
#offer-filter-input {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#item-search-input:focus,
#offer-filter-input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 6px rgba(26, 188, 156, 0.3);
    outline: none;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    max-height: 300px;
    overflow-y: auto;
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-results-dropdown div {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c3e50;
    transition: background-color 0.2s ease;
}

.search-results-dropdown div:hover {
    background: linear-gradient(90deg, rgba(26, 188, 156, 0.1) 0%, rgba(26, 188, 156, 0.05) 100%);
    color: #1abc9c;
    transform: translateX(5px);
    padding-left: 20px;
}

/* ========================================================= */
/* 9. KARTY NABÍDEK */
/* ========================================================= */
.offers-container,
.offer-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.offers-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 40px;
}

.offer-card,
.offer-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out;
}

.offer-card:hover,
.offer-item:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(26, 188, 156, 0.25);
}

.offer-card {
    border-left: 6px solid #607d8b;
}

.offer-card.locked {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff8ec 0%, #fff5e6 100%);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.15);
}

.offer-card.paid {
    border-left: 6px solid #1abc9c;
    background: linear-gradient(135deg, #e8f9f5 0%, #f2f4f5 100%);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.15);
    opacity: 0.97;
}

.offer-card p,
.offer-item p,
.offer-body p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #2c3e50;
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.offer-id {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.offer-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.offer-status.locked {
    background-color: #f39c12;
}

.offer-status.editable {
    background-color: #607d8b;
}

.offer-status.paid {
    background-color: #1abc9c;
}

.offer-actions,
.offer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.offer-note {
    font-size: 0.9rem;
    color: #888;
    margin-right: auto;
    align-self: center;
}

/* ========================================================= */
/* 10. FAKTURY */
/* ========================================================= */
.paid-invoice {
    background-color: #e8f5e9;
    border-left: 6px solid #4CAF50;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1b5e20;
    font-weight: 600;
    transition: all 0.3s ease;
}

.unpaid-invoice {
    background-color: #ffffff;
    border-left: 6px solid #000000;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #000000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.after_due {
    background-color: #ffe6e6;
    border-left: 6px solid #e74c3c;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #c0392b;
    font-weight: 600;
    transition: all 0.3s ease;
}

.paid-invoice:hover,
.after_due:hover,
.unpaid-invoice:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.01);
}

/* ========================================================= */
/* 11. DPH A DAŇOVÉ PŘEHLEDY */
/* ========================================================= */
.tax-view-full {
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tax-view-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(26, 188, 156, 0.2);
}

.tax-view-header h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.tax-view-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
}

.tax-filter-container {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fcfb 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(26, 188, 156, 0.1);
}

.tax-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.tax-filter-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.tax-filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tax-filter-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.tax-filter-input-group input {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    min-width: 160px;
}

.tax-filter-input-group input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.1);
    outline: none;
}

.tax-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.tax-filter-btn span {
    font-size: 1.1rem;
}

.tax-summary-box-full {
    margin-bottom: 25px;
    background: linear-gradient(135deg, #f8fcfb 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(26, 188, 156, 0.1);
}

.tax-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tax-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tax-summary-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tax-item-label {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.tax-item-value {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: right;
    min-width: 150px;
}

.income-item {
    border-left-color: #27ae60;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.05) 0%, white 100%);
}

.income-value {
    color: #27ae60;
}

.expense-item {
    border-left-color: #e74c3c;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.05) 0%, white 100%);
}

.expense-value {
    color: #e74c3c;
}

.profit-item {
    border-left-color: #1abc9c;
    background: linear-gradient(90deg, rgba(26, 188, 156, 0.05) 0%, white 100%);
}

.profit-value {
    color: #1abc9c;
}

.vat-input-item {
    border-left-color: #3498db;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, white 100%);
}

.vat-input-value {
    color: #3498db;
}

.vat-output-item {
    border-left-color: #9b59b6;
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.05) 0%, white 100%);
}

.vat-output-value {
    color: #9b59b6;
}

.balance-item {
    border-left-width: 5px;
    font-size: 1.1rem;
    padding: 16px 20px;
    margin-top: 8px;
}

.balance-item .tax-item-value {
    font-size: 1.4rem;
}

.balance-negative {
    border-left-color: #e74c3c;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1) 0%, rgba(255, 230, 230, 0.5) 100%);
}

.balance-negative .balance-value {
    color: #c0392b;
}

.balance-positive {
    border-left-color: #27ae60;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.1) 0%, rgba(232, 245, 233, 0.5) 100%);
}

.balance-positive .balance-value {
    color: #1b5e20;
}

.balance-neutral {
    border-left-color: #f39c12;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.1) 0%, rgba(255, 248, 225, 0.5) 100%);
}

.balance-neutral .balance-value {
    color: #e65100;
}

.tax-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(26, 188, 156, 0.2);
    flex-wrap: wrap;
}

.vat-status-full {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    flex: 1;
    min-width: 250px;
    text-align: center;
    transition: all 0.3s ease;
}

.vat-status-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vat-negative {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    color: #c0392b;
    border: 2px solid #e74c3c;
}

.vat-positive {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1b5e20;
    border: 2px solid #27ae60;
}

.vat-neutral {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    color: #e65100;
    border: 2px solid #f39c12;
}

.tax-download-form {
    flex-shrink: 0;
}

.tax-download-btn {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ffffff;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(52, 73, 94, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.tax-download-btn span {
    font-size: 1.1rem;
}

.tax-download-btn:hover {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 73, 94, 0.4);
}

.tax-download-invoices-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.tax-download-invoices-btn span {
    font-size: 1.1rem;
}

.tax-download-invoices-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Responzivní úpravy pro účetní přehled */
@media (max-width: 1024px) {
    .tax-view-full {
        padding: 25px 30px;
    }
}

@media (max-width: 768px) {
    .tax-view-full {
        padding: 20px;
        margin-top: 30px;
    }

    .tax-view-header h2 {
        font-size: 1.4rem;
    }

    .tax-filter-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .tax-filter-input-group {
        width: 100%;
    }

    .tax-filter-input-group input {
        width: 100%;
        min-width: auto;
    }

    .tax-filter-btn {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .tax-summary-box-full {
        padding: 20px;
    }

    .tax-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }

    .tax-item-label {
        font-size: 0.95rem;
    }

    .tax-item-value {
        font-size: 1.1rem;
        text-align: left;
        min-width: auto;
        width: 100%;
    }

    .balance-item .tax-item-value {
        font-size: 1.3rem;
    }

    .tax-footer {
        flex-direction: column;
        gap: 15px;
    }

    .vat-status-full {
        width: 100%;
        min-width: auto;
    }

    .tax-download-btn,
    .tax-download-invoices-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ========================================================= */
/* 12. FILTRY */
/* ========================================================= */
.filter {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 25px;
    margin: 30px 0;
    border: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.filter h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.filter form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter label {
    font-weight: 500;
    color: #444;
}

.filter select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fafafa;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter select:hover {
    border-color: #888;
    background-color: #fff;
}

/* ========================================================= */
/* 13. POMOCNÉ TŘÍDY */
/* ========================================================= */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 40px 0;
}

.center-h2 {
    text-align: center;
    width: 30%;
    margin: 0 auto;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

/* Grid 3x2 pro tlačítka v process_offer */
.buttons-process-offer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 15px;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
}

.buttons-process-offer button {
    width: 100%;
    min-width: 0;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
    flex: 0 1 auto;
}

.buttons-process-offer button:hover {
    transform: translateY(-2px);
}

/* Zachování původních stylů tlačítek v gridu */
.buttons-process-offer #submit-offer-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
}

.buttons-process-offer #submit-offer-btn:hover {
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

.buttons-process-offer #submit-pdf-btn {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
}

.buttons-process-offer #submit-pdf-btn:hover {
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
}

.buttons-process-offer #submit-invoice-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.buttons-process-offer #submit-invoice-btn:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.buttons-process-offer #submit-delete-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.buttons-process-offer #submit-delete-btn:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.buttons-process-offer #send_offer_button {
    background: linear-gradient(135deg, #f0660a 0%, #de6412 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 102, 10, 0.4);
}

.buttons-process-offer #send_offer_button:hover {
    box-shadow: 0 6px 20px rgba(240, 102, 10, 0.5);
}

.buttons-process-offer #send_invoice_button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.buttons-process-offer #send_invoice_button:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.buttons-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 40%;
    margin: 30px auto;
    padding: 20px;
}

.center {
    width: 100%;
    margin: 0 auto;
}

.x {
    width: 100%;
}

.unmarked-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.unmarked-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* ========================================================= */
/* 14. ANIMACE */
/* ========================================================= */
/* fadeIn a fadeInUp animace jsou definovány v base.css - odstraněno kvůli duplicitě */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* pulse animace je definována v base.css - odstraněno kvůli duplicitě */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* float animace je definována v base.css - odstraněno kvůli duplicitě */

@keyframes slideInRow {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.95);
        background-color: rgba(26, 188, 156, 0.1);
    }
    50% {
        background-color: rgba(26, 188, 156, 0.15);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        background-color: transparent;
    }
}

.new-row-animation {
    animation: slideInRow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    background-color: transparent !important;
}

/* ========================================================= */
/* 15. RESPONZIVNÍ DESIGN - MOBILNÍ ZAŘÍZENÍ */
/* ========================================================= */

/* Hamburger menu tlačítko */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    transition: all 0.3s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
}

.hamburger-menu:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Media queries pro tablety a mobilní zařízení */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 260px;
        padding: 30px;
    }

    .customer-info {
        padding: 30px;
    }

    .customer-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* Side menu - skryté na mobilu, zobrazí se přes hamburger */
    .side-menu {
        position: fixed;
        left: -240px;
        transform: translateX(-100%);
        transition: left 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        z-index: 1000;
        visibility: hidden;
        overflow: hidden;
    }

    .side-menu.active {
        left: 0;
        transform: translateX(0);
        visibility: visible;
    }

    /* Hamburger menu - zobrazit na mobilu */
    .hamburger-menu {
        display: flex;
    }

    /* Overlay pro mobilní menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(3px);
    }

    .menu-overlay.active {
        display: block;
    }

    /* Main content - plná šířka na mobilu */
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        width: 100%;
        max-width: 100%;
        margin-top: 80px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Tabulky - card layout na mobilu */
    #selection-table,
    #offer-table {
        display: block;
        width: 100%;
        max-width: 100%;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    #selection-table thead,
    #offer-table thead {
        display: none;
    }

    #selection-table tbody,
    #offer-table tbody {
        display: block;
        width: 100%;
    }

    #selection-table tr,
    #offer-table tr {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: box-shadow 0.3s ease;
    }

    #selection-table tr:hover,
    #offer-table tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    #selection-table td,
    #offer-table td {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 12px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        text-align: left !important;
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    #selection-table td:last-child,
    #offer-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* Pseudo-labely pro mobilní zobrazení */
    #selection-table td::before,
    #offer-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        display: block;
        margin-bottom: 8px;
        font-size: 0.8rem;
        opacity: 0.8;
    }

    /* Skrytí pseudo-labelů pro prázdné buňky */
    #selection-table td:empty::before,
    #offer-table td:empty::before {
        display: none;
    }

    /* Speciální úprava pro tlačítka - skrytí labelu */
    #selection-table td:has(button)::before,
    #offer-table td:has(button)::before {
        display: none;
    }

    /* Speciální úprava pro tlačítka */
    #selection-table td:has(button),
    #offer-table td:has(button) {
        padding-top: 15px;
        border-top: 1px solid #e8e8e8;
        margin-top: 10px;
        padding-bottom: 0;
        align-items: stretch;
    }

    #selection-table td:has(button) button,
    #offer-table td:has(button) button {
        width: 100%;
        margin-top: 0;
    }

    /* Úprava pro buňky s inputy a selecty */
    #selection-table td select,
    #selection-table td input,
    #offer-table td select,
    #offer-table td input {
        margin-top: 0;
    }

    /* Footer tabulky - jako karta */
    #offer-table tfoot {
        display: block;
        width: 100%;
        margin-top: 20px;
    }

    #offer-table tfoot tr {
        display: block;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 20px 15px;
        margin-bottom: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    #offer-table tfoot td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border: none;
        text-align: left !important;
    }

    #offer-table tfoot td:first-child {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e0e0e0;
        font-weight: 700;
    }

    #offer-table tfoot td:last-child {
        font-size: 1.4rem;
        font-weight: 800;
        text-align: right !important;
        padding-top: 10px;
    }

    #offer-table tfoot td:empty {
        display: none;
    }

    /* Formuláře */
    .customer-info {
        padding: 20px 15px;
        margin-bottom: 20px;
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .customer-info h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .customer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .customer-field input,
    .customer-field select,
    .customer-field textarea {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .profile-form {
        padding: 20px 15px;
    }
    
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-buttons-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .profile-buttons-container .btn {
        width: 100%;
    }

    .profile-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .form-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    /* Tlačítka - větší pro touch */
    #submit-offer-btn,
    #submit-pdf-btn,
    #submit-invoice-btn,
    #submit-delete-btn,
    #send_offer_button,
    #send_invoice_button,
    .btn,
    button[name="review"],
    .btn-save {
        min-width: 140px;
        padding: 14px 20px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    /* Responzivní grid pro tlačítka v process_offer - na mobilu pod sebou */
    .buttons-process-offer {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        gap: 12px;
        max-width: 100%;
        padding: 15px;
    }

    .buttons,
    .buttons-center {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .buttons-center {
        width: 100%;
    }

    /* Karty nabídek */
    .offers-wrapper {
        padding: 20px 15px;
    }

    .offer-card,
    .offer-item {
        padding: 20px 15px;
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .offer-card p,
    .offer-item p,
    .offer-body p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .offer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .offer-actions,
    .offer-buttons {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    /* Popup okna */
    .popup-content {
        max-width: 95%;
        padding: 30px 20px;
        margin: 20px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .popup-content * {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .popup-content h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .popup-content input[type="text"] {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .popup-buttons {
        flex-direction: column;
        width: 100%;
    }

    .popup-content button[type="submit"],
    .popup-content button[type="button"],
    .popup-content .btn-cancel,
    .popup-content .btn-delete-confirm {
        width: 100%;
        margin: 5px 0;
    }

    /* Vyhledávání */
    .search-bar {
        max-width: 100%;
        margin: 15px 0;
    }

    #item-search-input,
    #offer-filter-input {
        padding: 12px;
        font-size: 1rem;
    }

    /* Filtry */
    .filter {
        padding: 15px;
        margin: 20px 0;
    }

    .filter h3 {
        font-size: 1.2rem;
    }



    .filter select {
        width: 100%;
        padding: 10px;
    }

    /* Responzivní styly pro popup mazání faktury */
    .popup-delete-invoice {
        padding: 25px 20px;
    }

    .popup-header-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .delete-option-btn {
        padding: 14px 16px;
        gap: 12px;
    }

    .option-icon {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
    }

    .option-title {
        font-size: 0.95rem;
    }

    .option-description {
        font-size: 0.8rem;
    }


    /* Empty message */
    .empty-message {
        min-height: 60vh;
        padding: 20px;
    }

    .empty-message p {
        font-size: 1.2rem;
    }

    /* Bottom icons v side menu */
    .bottom-icons {
        bottom: 20px;
        gap: 15px;
    }

    .bottom-icons img {
        width: 35px;
        height: 35px;
    }

    /* Nick name */
    .nick-name {
        font-size: 16px;
    }

    /* Side menu odkazy */
    .side-menu a {
        padding: 14px 16px;
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
    }
    
    .nick-name {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .side-menu .image img {
        max-width: 120px;
    }
    
    /* Sazba za práci + poznámky - mobilní optimalizace */
    .customer-info .customer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .customer-field[style*="grid-column: 1 / span 2"] {
        grid-column: 1 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
        padding: 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-radius: 12px;
        border: 1px solid rgba(26, 188, 156, 0.1);
    }
    
    .customer-field[style*="grid-column: 1 / span 2"] label {
        margin-right: 0 !important;
        margin-bottom: 8px;
        display: block;
        width: 100%;
    }
    
    .customer-field[style*="grid-column: 1 / span 2"] input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .customer-field[style*="grid-column: 1 / span 2"] small {
        margin-left: 0 !important;
        display: block;
        margin-top: 8px;
        line-height: 1.5;
        font-size: 0.85rem;
    }
    
    .customer-field[style*="margin-top: 30px"] {
        margin-top: 20px !important;
    }
    
    .customer-field textarea {
        width: 100%;
        min-height: 100px;
        font-size: 1rem;
        padding: 12px;
    }
    
    #work_rate,
    #work_hours {
        width: 100%;
        font-size: 1rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    /* Extra malé obrazovky */
    .main-content {
        padding: 15px 10px;
        margin-top: 70px;
    }

    .customer-info {
        padding: 15px 10px;
    }

    .customer-info h2 {
        font-size: 1.1rem;
    }

    .profile-title {
        font-size: 1.3rem;
    }

    .form-section {
        padding: 12px;
    }

    #submit-offer-btn,
    #submit-pdf-btn,
    #submit-invoice-btn,
    #submit-delete-btn,
    #send_offer_button,
    #send_invoice_button,
    .btn,
    button[name="review"],
    .btn-save {
        width: 100%;
        min-width: auto;
    }

    /* Na velmi malých obrazovkách - tlačítka pod sebou */
    .buttons-process-offer {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .offer-card,
    .offer-item {
        padding: 15px 10px;
    }

    .popup-content {
        padding: 25px 15px;
    }

    .popup-content h2 {
        font-size: 1.1rem;
    }

    .hamburger-menu {
        width: 45px;
        height: 45px;
        top: 15px;
        left: 15px;
    }

    .hamburger-menu span {
        width: 22px;
    }

    /* Tabulky - ještě menší font */
    #selection-table td,
    #offer-table td {
        padding: 10px 0;
        font-size: 0.85rem;
    }

    #selection-table td::before,
    #offer-table td::before {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    #selection-table tr,
    #offer-table tr {
        padding: 12px;
        margin-bottom: 15px;
    }

    /* Search input */
    #item-search-input,
    #offer-filter-input {
        padding: 10px;
        font-size: 0.95rem;
    }

    /* Filter */
    .filter {
        padding: 12px;
    }

    .filter h3 {
        font-size: 1.1rem;
    }
    
    /* Sazba za práci - extra malé obrazovky */
    .customer-field[style*="grid-column: 1 / span 2"] {
        padding: 12px;
    }
    
    .customer-field[style*="grid-column: 1 / span 2"] small {
        font-size: 0.8rem;
    }
    
    #work_rate,
    #work_hours {
        font-size: 0.95rem;
        padding: 10px;
    }
    
    .customer-field textarea {
        font-size: 0.95rem;
        padding: 10px;
    }
}

/* Landscape orientace na mobilu */
@media (max-width: 768px) and (orientation: landscape) {
    .side-menu {
        width: 200px;
        left: -200px;
        transform: translateX(-100%);
        visibility: hidden;
        overflow: hidden;
    }

    .side-menu.active {
        left: 0;
        transform: translateX(0);
        visibility: visible;
    }

    .main-content {
        margin-top: 60px;
    }

    .hamburger-menu {
        top: 10px;
        left: 10px;
    }
}

/* Styly pro tlačítka v dialogu neuložených změn */
#save-and-leave-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    min-width: 160px;
}

#save-and-leave-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

#leave-without-save-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    min-width: 160px;
}

#leave-without-save-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Styl pro tlačítko "Rozumím" v dialogu s chybějícími daty */
#close-missing-data-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    min-width: 160px;
}

#close-missing-data-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

/* Styl pro tlačítko "Odejít bez vytvoření nabídky" */
#leave-without-creating-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    min-width: 200px;
}

#leave-without-creating-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* ========================================================= */
/* SUBSCRIPTION PLANS - přesunuto z subscription_plans.html */
/* ========================================================= */
.messages-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid;
    position: relative;
    overflow: hidden;
}

.message-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.message-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.message-icon {
    font-size: 1.8rem;
    font-weight: bold;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.message-content {
    flex: 1;
}

.message-content p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.message-success {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    border-left-color: #4CAF50;
    color: #1b5e20;
    border-left-width: 5px;
}

.message-success .message-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #43a047 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.message-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: #f44336;
    color: #c62828;
}

.message-error .message-icon {
    background: rgba(244, 67, 54, 0.2);
    color: #b71c1c;
}

.message-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #ff9800;
    color: #e65100;
}

.message-warning .message-icon {
    background: rgba(255, 152, 0, 0.2);
    color: #f57c00;
}

.message-info,
.message-debug {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196F3;
    color: #0d47a1;
}

.message-info .message-icon,
.message-debug .message-icon {
    background: rgba(33, 150, 243, 0.2);
    color: #1565c0;
}

.subscription-active-card {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    animation: fadeInUp 0.6s ease-out;
}

.subscription-active-card h2 {
    color: white;
    margin-bottom: 20px;
}

.subscription-info {
    margin: 20px 0;
}

.subscription-info p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.expiry-info {
    margin-top: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.expiry-info p {
    margin: 0;
    font-size: 1rem;
}

.expiry-date {
    font-weight: 600;
    margin-right: 8px;
}

.expiry-days {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-left: 8px;
}

.expiry-days.expired {
    color: #ffeb3b;
    font-weight: bold;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
}

.status-active {
    background: rgba(39, 174, 96, 0.3);
}

.status-trialing {
    background: rgba(52, 152, 219, 0.3);
}

.status-incomplete {
    background: rgba(243, 156, 18, 0.3);
    color: #d68910;
}

.subscription-warning-card {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    animation: fadeInUp 0.6s ease-out;
}

.subscription-warning-card h2 {
    color: white;
    margin-bottom: 20px;
}

.warning-message {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.warning-message p {
    margin: 10px 0;
    font-size: 1rem;
}

.warning-message ul {
    margin: 15px 0;
    padding-left: 25px;
}

.warning-message li {
    margin: 8px 0;
    font-size: 0.95rem;
}

.warning-message a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

/* Chybové zprávy v popupu pro odesílání nabídky */
.popup-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #fff5f5;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease forwards;
}

.popup-error-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.popup-error-text {
    flex: 1;
    color: #c0392b;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.subscription-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.subscription-inactive-card {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
    animation: fadeInUp 0.6s ease-out;
}

.subscription-inactive-card h2 {
    color: white;
    margin-bottom: 20px;
}

.btn-delete-subscription {
    background: white;
    color: #e74c3c;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

.btn-delete-subscription:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-subscription-manage {
    background: white;
    color: #1abc9c;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

.btn-subscription-manage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subscription-plans-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.subscription-plan-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
}

.subscription-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.subscription-plan-card.active {
    border-color: #1abc9c;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.2);
}

.plan-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

.plan-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 30px;
    color: #2c3e50;
}

.plan-pricing {
    margin: 30px 0;
}

.pricing-option {
    margin-bottom: 25px;
}

.pricing-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.savings-badge {
    color: #27ae60;
    font-weight: bold;
    font-size: 0.85rem;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
}

.currency {
    font-size: 1.2rem;
    font-weight: normal;
}

.pricing-monthly-equivalent {
    font-size: 0.85rem;
    color: #27ae60;
    margin: 8px 0 15px 0;
    font-weight: 500;
}

.pricing-divider {
    border-top: 1px solid #e0e0e0;
    margin: 25px 0;
}

.btn-plan {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-monthly {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-monthly:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-yearly {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-yearly:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

.btn-disabled {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.plan-features {
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
    margin-top: 25px;
}

.plan-features h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 10px 0;
    color: #2c3e50;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.features-list li:last-child {
    border-bottom: none;
}

/* Kulaté karty pro předplatné */
.subscription-plan-card-rounded {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
}

.subscription-plan-card-rounded:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.subscription-plan-card-rounded.active {
    border-color: #1abc9c;
    box-shadow: 0 4px 20px rgba(26, 188, 156, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
}

.plan-badge-rounded {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

.plan-title-rounded {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-align: center;
}

.plan-type-badge {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-weight: 500;
}

.savings-badge-rounded {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 8px;
}

.plan-pricing-rounded {
    text-align: center;
    margin: 30px 0;
    padding: 25px 0;
    border-top: 2px solid #ecf0f1;
    border-bottom: 2px solid #ecf0f1;
}

.pricing-amount-rounded {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.pricing-amount-rounded .currency {
    font-size: 1.5rem;
    color: #7f8c8d;
    font-weight: normal;
}

.pricing-period {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.btn-plan-rounded {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 25px 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-monthly-rounded {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-monthly-rounded:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-yearly-rounded {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-yearly-rounded:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

.btn-disabled-rounded {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.btn-disabled-rounded:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-features-rounded {
    margin-top: 30px;
}

.plan-features-rounded h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.features-list-rounded {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list-rounded li {
    padding: 12px 0;
    font-size: 1rem;
    color: #34495e;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
}

.features-list-rounded li:last-child {
    border-bottom: none;
}

.features-list-rounded li::before {
    content: '✓';
    color: #1abc9c;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 188, 156, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 968px) {
    .subscription-plans-container {
        grid-template-columns: 1fr;
        max-width: 600px;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .subscription-plans-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .subscription-plan-card-rounded {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .plan-title-rounded {
        font-size: 1.75rem;
    }
    
    .pricing-amount-rounded {
        font-size: 2.5rem;
    }
    
    .btn-plan-rounded {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

/* ========================================================= */
/* DALŠÍ POMOCNÉ TŘÍDY */
/* ========================================================= */
/* Styly pro process_offer.html */
.search-bar-compact {
    margin-bottom: 12px;
}

.search-input-full {
    width: 100%;
    padding: 8px;
}

.table-full-width {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.col-width-18 {
    width: 18%;
}

.col-width-10 {
    width: 10%;
}

.col-width-6 {
    width: 6%;
}

.col-width-8 {
    width: 8%;
}

/* Styly pro finance_overview.html */
.tax-view-subtitle {
    color: #666;
    margin-bottom: 30px;
}

/* Styly pro password reset stránky */
.password-reset-h2 {
    margin-bottom: 20px;
}

/* Styly pro email_verification_sent.html */
.email-verification-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.email-verification-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 30px 0;
}

.email-verification-box p {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.6;
}

.email-verification-box-warning {
    background-color: #fff8e6;
    border-left: 4px solid #f0660a;
    padding: 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.email-verification-box-info {
    background-color: #f0f9ff;
    border-left: 4px solid rgb(11, 12, 13);
    padding: 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.email-verification-text-large {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 32px;
}

.email-verification-link {
    display: inline-block;
    margin-top: 24px;
    text-decoration: none;
}

/* Styly pro manage_offers.html */
.pagination-wrapper-center {
    margin-top: 30px;
    text-align: center;
}

.empty-message-hidden {
    display: none;
}

.error-text-red {
    color: red;
}

/* Styly pro gdpr.html */
.gdpr-text-small {
    margin-top: 20px;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Styly pro invoices.html */
.table-col-sm {
    width: 2%;
}

/* Styly pro tabulky v process_offer.html */
.table-header-left {
    padding: 8px;
    text-align: left;
}

.table-header-right {
    padding: 8px;
    text-align: right;
}

.table-header-center {
    padding: 8px;
    text-align: center;
}

.table-cell-padding {
    padding: 5px;
    overflow: hidden;
}

.invoice-after-due {
    color: red;
    font-weight: 600;
}

/* Styly pro subscription_manage.html a další */
/* Styly pro subscription_manage.html a další */
.subscription-details-card h2 {
    margin-top: 0;
    color: #2c3e50;
}

.cancel-form {
    display: inline-block;
    margin-left: 10px;
}

.subscription-expired-text {
    color: #e74c3c;
    font-weight: bold;
}

/* Styly pro dashboard.html */
.dashboard-welcome {
    color: #666;
    margin: 0;
}

.dashboard-date {
    margin: 0;
}

/* Styly pro my_profile.html */
.password-section-content {
    text-align: center;
    padding: 10px 0;
}

.password-info {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-password-reset {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    min-width: 180px;
    line-height: 1.5;
    vertical-align: middle;
}

.btn-password-reset:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.5);
}

.btn-password-reset:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.profile-buttons-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.profile-buttons-container .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    line-height: 1.5;
    box-sizing: border-box;
}

.delete-text-error {
    color: #e74c3c;
    margin-top: 10px;
    display: none;
    font-size: 0.9rem;
}

/* Logo preview styly */
.logo-preview {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
}

.logo-current {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 10px;
}

.logo-info {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 10px;
}

/* File input styling */
#id_logo {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#id_logo:hover {
    border-color: #1abc9c;
}

#id_logo:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

/* ========================================================= */
/* PAGINATION */
/* ========================================================= */
.pagination-wrapper {
    margin: 30px 0;
    text-align: center;
}

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

.pagination-link {
    display: inline-block;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    min-width: 100px;
    text-align: center;
}

.pagination-link:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    color: white;
}

.pagination-info {
    padding: 10px 20px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-link {
        width: 100%;
        max-width: 200px;
    }
    
    .pagination-info {
        order: -1;
        width: 100%;
    }
}

/* ========================================================= */
/* DARK MODE - KOMPLETNÍ STYLY */
/* ========================================================= */

/* === SIDE MENU === */
[data-theme="dark"] .side-menu .image img {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .nick-name {
    color: #f0660a; /* Zachovat oranžovou barvu */
}

[data-theme="dark"] .bottom-icons img[alt="Home Icon"] {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .bottom-icons img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* === HLAVNÍ OBSAH === */
[data-theme="dark"] .main-content {
    background-color: transparent;
}

/* === FORMULÁŘE A INPUTY === */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .form-group label {
    color: var(--text-heading);
}

[data-theme="dark"] .form-hint {
    color: var(--text-secondary);
}

[data-theme="dark"] .checkbox-wrapper input[type="checkbox"],
[data-theme="dark"] .checkbox-wrapper .form-check-input {
    border-color: var(--border-color-light) !important;
}

[data-theme="dark"] .checkbox-wrapper label {
    color: var(--text-heading);
}

/* === CUSTOMER INFO === */
[data-theme="dark"] .customer-info {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    box-shadow: 0 8px 24px var(--shadow);
}

[data-theme="dark"] .customer-info h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .customer-field label {
    color: var(--text-heading);
}

[data-theme="dark"] .customer-field input,
[data-theme="dark"] .customer-field select,
[data-theme="dark"] .customer-field textarea {
    background-color: var(--bg-primary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

/* === PROFILE FORM === */
[data-theme="dark"] .profile-title {
    color: var(--text-heading);
}

[data-theme="dark"] .profile-form {
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="dark"] .form-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .section-title {
    color: var(--text-heading);
}

[data-theme="dark"] .section-description {
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.15) 0%, rgba(26, 188, 156, 0.08) 100%);
    border-color: #1abc9c;
}

/* === FORM ALERTS === */
[data-theme="dark"] .form-alert.error {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
    color: #ff9999;
}

[data-theme="dark"] .form-alert.success {
    background-color: rgba(76, 175, 80, 0.15);
    border-color: #4CAF50;
    color: #81c784;
}

[data-theme="dark"] .form-error {
    color: #ff6b6b;
}

/* === DATE INPUT === */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
}

/* === POPUP OKNA === */
[data-theme="dark"] .popup-overlay,
[data-theme="dark"] .popup-overlay-large {
    background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .popup-content-small,
[data-theme="dark"] .popup-content-large,
[data-theme="dark"] .popup-content,
[data-theme="dark"] .popup-action-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .popup-content-small h2,
[data-theme="dark"] .popup-content-large h2,
[data-theme="dark"] .popup-content h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-content-small label,
[data-theme="dark"] .popup-content-large label,
[data-theme="dark"] .popup-content label {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-content-small input,
[data-theme="dark"] .popup-content-small select,
[data-theme="dark"] .popup-content-small textarea,
[data-theme="dark"] .popup-content-large input,
[data-theme="dark"] .popup-content-large select,
[data-theme="dark"] .popup-content-large textarea,
[data-theme="dark"] .popup-content input,
[data-theme="dark"] .popup-input,
[data-theme="dark"] .popup-textarea,
[data-theme="dark"] .popup-select {
    background-color: var(--bg-primary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .popup-warning-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .popup-header {
    border-color: var(--border-color);
}

[data-theme="dark"] .popup-header h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .popup-section-title {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-label {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-label-optional {
    color: var(--text-secondary);
}

[data-theme="dark"] .popup-actions {
    border-color: var(--border-color);
}

[data-theme="dark"] .popup-error-message {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.1) 100%);
    border-color: #e74c3c;
}

[data-theme="dark"] .popup-error-text {
    color: #ff9999;
}

[data-theme="dark"] .popup-success-message {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
    border-color: #4caf50;
}

[data-theme="dark"] .popup-success-text {
    color: #81c784;
}

[data-theme="dark"] .popup-warning-box {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-color: #f39c12;
}

[data-theme="dark"] .popup-email-notice {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.15) 0%, rgba(26, 188, 156, 0.1) 100%);
}

[data-theme="dark"] .popup-delete-invoice h2 {
    color: #ff6b6b;
}

[data-theme="dark"] .popup-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .delete-option-btn {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="dark"] .option-title {
    color: var(--text-heading);
}

[data-theme="dark"] .option-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .option-icon {
    background: rgba(255, 255, 255, 0.05);
}

/* === KARTY NABÍDEK === */
[data-theme="dark"] .offer-card,
[data-theme="dark"] .offer-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="dark"] .offer-card:hover,
[data-theme="dark"] .offer-item:hover {
    box-shadow: 0 10px 28px var(--shadow);
    border-color: rgba(26, 188, 156, 0.4);
}

[data-theme="dark"] .offer-card.locked {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-left-color: #f39c12;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

[data-theme="dark"] .offer-card.paid {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.15) 0%, rgba(26, 188, 156, 0.1) 100%);
    border-left-color: #1abc9c;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.2);
}

[data-theme="dark"] .offer-card p,
[data-theme="dark"] .offer-item p,
[data-theme="dark"] .offer-body p {
    color: var(--text-primary);
}

[data-theme="dark"] .offer-id {
    color: var(--text-heading);
}

[data-theme="dark"] .offer-note {
    color: var(--text-secondary);
}

/* === FAKTURY === */
[data-theme="dark"] .paid-invoice {
    background-color: rgba(76, 175, 80, 0.15);
    border-color: #4CAF50;
    color: #81c784;
}

[data-theme="dark"] .unpaid-invoice {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .after_due {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
    color: #ff9999;
}

/* === TABULKY === */
[data-theme="dark"] #custom-items-table {
    background-color: var(--bg-primary);
    box-shadow: 0 4px 12px var(--shadow-light);
}

[data-theme="dark"] #custom-items-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-heading);
    border-color: var(--border-color-light);
}

[data-theme="dark"] #custom-items-table td {
    color: var(--text-primary);
    border-color: var(--border-color-lighter);
}

/* === FILTRY === */
[data-theme="dark"] .filter {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
}

[data-theme="dark"] .filter h3 {
    color: var(--text-heading);
}

[data-theme="dark"] .filter label {
    color: var(--text-heading);
}

[data-theme="dark"] .filter select,
[data-theme="dark"] .filter input {
    background-color: var(--bg-primary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .filter select:hover {
    background-color: var(--bg-secondary);
}

/* === SEARCH BAR === */
[data-theme="dark"] .search-bar h3 {
    color: var(--text-heading);
}

[data-theme="dark"] #item-search-input,
[data-theme="dark"] #offer-filter-input {
    background-color: var(--bg-primary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .search-results-dropdown {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px var(--shadow);
}

[data-theme="dark"] .search-results-dropdown div {
    color: var(--text-primary);
}

[data-theme="dark"] .search-results-dropdown div:hover {
    background: linear-gradient(90deg, rgba(26, 188, 156, 0.2) 0%, rgba(26, 188, 156, 0.1) 100%);
}

/* === HAMBURGER MENU === */
[data-theme="dark"] .hamburger-menu span {
    background-color: var(--text-primary);
}

[data-theme="dark"] .menu-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

/* === HR === */
[data-theme="dark"] hr {
    border-color: var(--border-color);
}

/* === PAGINATION === */
[data-theme="dark"] .pagination-info {
    color: var(--text-primary);
}

/* === LOGO PREVIEW === */
[data-theme="dark"] .logo-preview img {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="dark"] .logo-info {
    color: var(--text-secondary);
}

[data-theme="dark"] #id_logo {
    background: var(--bg-primary);
    border-color: var(--border-color-light);
}

[data-theme="dark"] #id_logo:hover {
    border-color: #1abc9c;
}

/* === INPUT SELECT === */
[data-theme="dark"] .popup-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231abc9c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* === SELECTION TABLE INPUTS === */
[data-theme="dark"] #selection-table input[type="number"],
[data-theme="dark"] #selection-table select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] #grand_total {
    color: var(--text-heading);
}

/* === DASHBOARD === */
[data-theme="dark"] .dashboard-welcome {
    color: var(--text-heading);
}

[data-theme="dark"] .dashboard-date {
    color: var(--text-secondary);
}

/* === INVOICE CARD === */
[data-theme="dark"] .invoice-after-due {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
    color: #ff9999;
}

/* === LOGO PREVIEW === */
[data-theme="dark"] .logo-preview {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .logo-current {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px var(--shadow);
}

/* === BACKGROUND PREVIEW === */
[data-theme="dark"] .background-preview {
    border-color: var(--border-color);
}

[data-theme="dark"] .background-preview-wrapper {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

/* === PREVIEW TITLE PAGE === */
/* Náhled pozadí má pozadí podle výběru uživatele, ne tmavé */
[data-theme="dark"] .background-preview .preview-title-page {
    background-color: transparent !important;
}

/* Text v náhledu pozadí je vždy tmavý (na světlém pozadí) */
[data-theme="dark"] .background-preview .preview-title-wrapper h1,
[data-theme="dark"] .background-preview .preview-title-wrapper h2 {
    color: #2c3e50 !important;
}

[data-theme="dark"] .background-preview .preview-title-number {
    color: #555 !important;
}

/* === OFFERS WRAPPER === */
[data-theme="dark"] .offers-wrapper {
    background-color: transparent;
}

/* === FINANCE OVERVIEW === */
[data-theme="dark"] .finance-summary {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .finance-summary h3 {
    color: var(--text-heading);
}

[data-theme="dark"] .finance-summary p,
[data-theme="dark"] .finance-summary span {
    color: var(--text-primary);
}

/* === TAX VIEW (DPH PŘEHLEDY) === */
[data-theme="dark"] .tax-view-full {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="dark"] .tax-view-header {
    border-color: rgba(26, 188, 156, 0.3);
}

[data-theme="dark"] .tax-view-header h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .tax-view-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .tax-filter-container {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-color: rgba(26, 188, 156, 0.2);
}

[data-theme="dark"] .tax-filter-input-group label {
    color: var(--text-heading);
}

[data-theme="dark"] .tax-filter-input-group input {
    background-color: var(--bg-primary);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

[data-theme="dark"] .tax-summary-box-full {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-color: rgba(26, 188, 156, 0.2);
}

[data-theme="dark"] .tax-summary-item {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px var(--shadow-light);
}

[data-theme="dark"] .tax-item-label {
    color: var(--text-heading);
}

[data-theme="dark"] .income-item {
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.15) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .expense-item {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.15) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .profit-item {
    background: linear-gradient(90deg, rgba(26, 188, 156, 0.15) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .vat-input-item {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.15) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .vat-output-item {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.15) 0%, var(--bg-primary) 100%);
}

/* === SUBSCRIPTION DETAILS CARD === */
.subscription-details-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
}

.subscription-details {
    margin: 25px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item.warning {
    background: #fff4e5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f0660a;
    margin-top: 15px;
}

.detail-item.expiring-soon {
    background: #fff4e5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
    margin-top: 10px;
}

.detail-item.expired {
    background: #fee;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-top: 10px;
}

.detail-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.no-subscription-card {
    background: white;
    border-radius: 12px;
    padding: 50px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.no-subscription-card p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.back-to-plans {
    text-align: center;
    margin-top: 30px;
}

.cancel-form,
.delete-form,
.resume-form,
.change-period-form {
    display: inline-block;
}

.btn-back,
.btn-plan-select {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    line-height: 1.4;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-plan-select {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
}

.btn-plan-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

.btn-update-payment {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-update-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-resume {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

.btn-change-period {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-change-period:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}

/* === SUBSCRIPTION DARK MODE === */
[data-theme="dark"] .subscription-details-card {
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="dark"] .subscription-details-card h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .subscription-details {
    color: var(--text-primary);
}

[data-theme="dark"] .detail-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .detail-item.warning {
    background-color: rgba(240, 102, 10, 0.2);
    border-left-color: #f0660a;
}

[data-theme="dark"] .detail-item.expiring-soon {
    background-color: rgba(243, 156, 18, 0.2);
    border-left-color: #f39c12;
}

[data-theme="dark"] .detail-item.expired {
    background-color: rgba(231, 76, 60, 0.2);
    border-left-color: #e74c3c;
}

[data-theme="dark"] .detail-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .detail-value {
    color: var(--text-heading);
}

[data-theme="dark"] .expiry-days {
    color: var(--text-secondary);
}

[data-theme="dark"] .expiry-days.expired {
    color: #ff6b6b;
}

[data-theme="dark"] .subscription-actions {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .no-subscription-card {
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="dark"] .no-subscription-card p {
    color: var(--text-secondary);
}

[data-theme="dark"] .subscription-expired-text {
    color: #ff6b6b;
}

/* === SUBSCRIPTION PLANS DARK MODE === */
[data-theme="dark"] .subscription-active-card {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    /* Gradient zůstává stejný, text je bílý */
}

[data-theme="dark"] .subscription-warning-card {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    /* Gradient zůstává stejný, text je bílý */
}

[data-theme="dark"] .subscription-plan-card-rounded {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="dark"] .subscription-plan-card-rounded:hover {
    box-shadow: 0 8px 30px var(--shadow);
}

[data-theme="dark"] .subscription-plan-card-rounded.active {
    border-color: #1abc9c;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(26, 188, 156, 0.05) 100%);
}

[data-theme="dark"] .plan-title-rounded {
    color: var(--text-heading);
}

[data-theme="dark"] .plan-type-badge {
    color: var(--text-secondary);
}

[data-theme="dark"] .plan-pricing-rounded {
    border-top-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .pricing-amount-rounded {
    color: var(--text-heading);
}

[data-theme="dark"] .pricing-amount-rounded .currency {
    color: var(--text-secondary);
}

[data-theme="dark"] .pricing-period {
    color: var(--text-secondary);
}

[data-theme="dark"] .plan-features-rounded h3 {
    color: var(--text-heading);
}

[data-theme="dark"] .features-list-rounded li {
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .subscription-info p {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .expiry-info {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .expiry-info-next-payment {
    color: rgba(255, 255, 255, 0.9);
}

/* === POPUP CONTENT LARGE - DARK MODE === */
[data-theme="dark"] .popup-content-large .customer-field label {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-content-large .customer-field input,
[data-theme="dark"] .popup-content-large .customer-field select,
[data-theme="dark"] .popup-content-large .customer-field textarea {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .popup-content-large .background-preview {
    border-color: var(--border-color);
}

[data-theme="dark"] .popup-content-large .preview-title-wrapper {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .popup-content-large .preview-title-wrapper h1,
[data-theme="dark"] .popup-content-large .preview-title-wrapper h2 {
    color: #2c3e50 !important;
}

[data-theme="dark"] .popup-content-large .preview-title-number {
    color: #555 !important;
}

/* === PROFILE === */
[data-theme="dark"] .password-info {
    color: var(--text-secondary);
}

[data-theme="dark"] .profile-buttons-container {
    border-color: var(--border-color);
}

/* === INVOICE AFTER DUE === */
[data-theme="dark"] .invoice-after-due {
    color: #ff6b6b;
}

/* === OFFER TABLE TFOOT === */
[data-theme="dark"] #offer-table tfoot tr {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

[data-theme="dark"] #offer-table tfoot td {
    color: var(--text-primary);
}

[data-theme="dark"] #offer-table tfoot td:first-child {
    border-color: var(--border-color);
    color: var(--text-heading);
}

/* === CENTER H2 === */
[data-theme="dark"] .center-h2 {
    color: var(--text-heading);
}

/* === TAX FOOTER A VAT STATUS === */
[data-theme="dark"] .tax-footer {
    border-color: rgba(26, 188, 156, 0.3);
}

[data-theme="dark"] .vat-status-full {
    background: var(--bg-primary);
    color: var(--text-heading);
}

[data-theme="dark"] .vat-negative {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(231, 76, 60, 0.1) 100%);
    color: #ff9999;
    border-color: #e74c3c;
}

[data-theme="dark"] .vat-positive {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(39, 174, 96, 0.1) 100%);
    color: #81c784;
    border-color: #27ae60;
}

[data-theme="dark"] .vat-neutral {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(243, 156, 18, 0.1) 100%);
    color: #ffb74d;
    border-color: #f39c12;
}

/* === DELETE TEXT ERROR === */
[data-theme="dark"] .delete-text-error {
    color: #ff6b6b;
}

/* === BALANCE ITEM === */
[data-theme="dark"] .balance-item {
    background: var(--bg-primary);
}

[data-theme="dark"] .balance-item .tax-item-value {
    color: var(--text-heading);
}

/* === PREVIEW TITLE WRAPPER === */
/* Text v náhledu pozadí je vždy tmavý (na světlém pozadí podle výběru) */
[data-theme="dark"] .background-preview .preview-title-wrapper {
    color: #2c3e50 !important;
    background-color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .background-preview .preview-title-wrapper--plain {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* === ADDITIONAL COMPONENTS === */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div {
    color: var(--text-primary);
}

/* Tlačítka zůstávají stejná - barevné tlačítka fungují dobře i v dark mode */

/* === MISSING DATA DIALOG === */
.missing-data-error-text {
    margin: 20px 0;
    font-weight: bold;
    color: #e74c3c;
}

.missing-fields-list {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color-light);
}

.missing-fields-ul {
    margin: 10px 0;
    padding-left: 20px;
    color: var(--text-primary);
}

.missing-data-info-text {
    margin: 20px 0;
    color: var(--text-primary);
}

[data-theme="dark"] .missing-data-error-text {
    color: #ff6b6b;
}

[data-theme="dark"] .missing-fields-list {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .missing-fields-list strong {
    color: var(--text-heading);
}

[data-theme="dark"] .missing-fields-list li {
    color: var(--text-primary);
}

[data-theme="dark"] .missing-data-info-text {
    color: var(--text-primary);
}

[data-theme="dark"] .missing-fields-ul {
    color: var(--text-primary);
}

/* === WARNING MESSAGE DARK MODE === */
[data-theme="dark"] .warning-message.expandable {
    background-color: rgba(240, 102, 10, 0.15);
    border-left-color: #f0660a;
}

[data-theme="dark"] .warning-message .summary {
    color: #ffa366;
}

[data-theme="dark"] .warning-message .toggle-hint {
    color: #ffa366;
    opacity: 0.8;
}

[data-theme="dark"] .warning-message .details {
    color: var(--text-primary);
}

[data-theme="dark"] .warning-message .details p {
    color: var(--text-primary);
}

/* === UNMARKED LINK DARK MODE === */
[data-theme="dark"] .unmarked-link:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

/* === HINT CONTENT DARK MODE === */
[data-theme="dark"] .popup-content-large .hint-content {
    color: var(--text-primary);
}

[data-theme="dark"] .popup-content-large .hint-content h3 {
    color: var(--text-heading);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .popup-content-large .hint-content h4 {
    color: var(--text-heading);
}

[data-theme="dark"] .popup-content-large .hint-content li {
    color: var(--text-primary);
}

[data-theme="dark"] .popup-content-large .hint-content a {
    color: #1abc9c;
}

[data-theme="dark"] .popup-content-large .hint-content a:hover {
    color: #16a085;
}

/* === EMAIL PREVIEW DARK MODE === */
[data-theme="dark"] .popup-content-large .preview,
[data-theme="dark"] .popup-content-large .prewiew {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .popup-content-large .preview > div,
[data-theme="dark"] .popup-content-large .prewiew > div {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .popup-content-large .preview div[style*="background-color: #ffffff"],
[data-theme="dark"] .popup-content-large .prewiew div[style*="background-color: #ffffff"] {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .popup-content-large .preview div[style*="background-color: #f9f9f9"],
[data-theme="dark"] .popup-content-large .prewiew div[style*="background-color: #f9f9f9"] {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .popup-content-large .preview div[style*="background-color: #f2f2f2"],
[data-theme="dark"] .popup-content-large .prewiew div[style*="background-color: #f2f2f2"] {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .popup-content-large .preview div[style*="background-color: #fff8e6"],
[data-theme="dark"] .popup-content-large .prewiew div[style*="background-color: #fff8e6"] {
    background-color: rgba(255, 248, 230, 0.3) !important;
}

[data-theme="dark"] .popup-content-large .preview h2,
[data-theme="dark"] .popup-content-large .prewiew h2,
[data-theme="dark"] .popup-content-large .preview p,
[data-theme="dark"] .popup-content-large .prewiew p,
[data-theme="dark"] .popup-content-large .preview td,
[data-theme="dark"] .popup-content-large .prewiew td {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .popup-content-large .preview p[style*="color: #888"],
[data-theme="dark"] .popup-content-large .prewiew p[style*="color: #888"],
[data-theme="dark"] .popup-content-large .preview td[style*="color: #777"],
[data-theme="dark"] .popup-content-large .prewiew td[style*="color: #777"] {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .popup-content-large .preview td[style*="color: #555"],
[data-theme="dark"] .popup-content-large .prewiew td[style*="color: #555"] {
    color: var(--text-secondary) !important;
}

/* ========================================================= */
/* HINT BUTTON FLOATING - UNIFORM STYLES ACROSS ALL PAGES */
/* ========================================================= */
.hint-button-floating {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%) !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.4) !important;
    color: white !important;
    font-size: 28px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.hint-button-floating:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 8px 25px rgba(26, 188, 156, 0.6) !important;
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%) !important;
}

.hint-button-floating:active {
    transform: scale(1.05) !important;
}

@media (max-width: 768px) {
    .hint-button-floating {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
    }
}

[data-theme="dark"] .hint-button-floating {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%) !important;
    border-color: var(--bg-secondary) !important;
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5) !important;
}

[data-theme="dark"] .hint-button-floating:hover {
    box-shadow: 0 8px 25px rgba(26, 188, 156, 0.7) !important;
}

/* ========================================================= */
/* GLOBÁLNÍ ANIMACE PRO VŠECHNY STRÁNKY */
/* ========================================================= */

/* Keyframes pro základní animace */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animace pro nadpisy */
.h1_invoice,
.main-content h1 {
    animation: fadeInDown 0.5s ease-out 0.1s both;
}

/* Animace pro karty a boxy */
.offer-card,
.invoice-card,
.subscription-card,
.profile-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Staggered animace pro seznamy karet */
.offer-card:nth-child(1) { animation-delay: 0.1s; }
.offer-card:nth-child(2) { animation-delay: 0.2s; }
.offer-card:nth-child(3) { animation-delay: 0.3s; }
.offer-card:nth-child(4) { animation-delay: 0.4s; }
.offer-card:nth-child(5) { animation-delay: 0.5s; }
.offer-card:nth-child(6) { animation-delay: 0.6s; }
.offer-card:nth-child(n+7) { animation-delay: 0.7s; }

.invoice-card:nth-child(1) { animation-delay: 0.1s; }
.invoice-card:nth-child(2) { animation-delay: 0.2s; }
.invoice-card:nth-child(3) { animation-delay: 0.3s; }
.invoice-card:nth-child(4) { animation-delay: 0.4s; }
.invoice-card:nth-child(n+5) { animation-delay: 0.5s; }

/* Animace pro formuláře */
.form-section,
fieldset {
    animation: fadeInScale 0.5s ease-out forwards;
    opacity: 0;
}

.form-section:nth-of-type(1) { animation-delay: 0.1s; }
.form-section:nth-of-type(2) { animation-delay: 0.2s; }
.form-section:nth-of-type(3) { animation-delay: 0.3s; }
.form-section:nth-of-type(4) { animation-delay: 0.4s; }
.form-section:nth-of-type(n+5) { animation-delay: 0.5s; }

/* Animace pro tabulky */
table {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Animace pro tlačítka */
.btn,
button[type="submit"],
button[type="button"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
button[type="submit"]:hover,
button[type="button"]:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* Animace pro messages */
.messages-container,
.form-alert,
.message-alert {
    animation: slideInRight 0.5s ease-out;
}

/* Animace pro popupy */
.popup-overlay {
    animation: fadeIn 0.3s ease-out;
}

.popup-content,
.popup-content-small,
.popup-content-large {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animace pro statistiky a čísla */
.stats-card,
.stat-box {
    animation: fadeInScale 0.5s ease-out forwards;
    opacity: 0;
}

.stats-card:nth-child(1),
.stat-box:nth-child(1) { animation-delay: 0.1s; }
.stats-card:nth-child(2),
.stat-box:nth-child(2) { animation-delay: 0.2s; }
.stats-card:nth-child(3),
.stat-box:nth-child(3) { animation-delay: 0.3s; }
.stats-card:nth-child(4),
.stat-box:nth-child(4) { animation-delay: 0.4s; }
.stats-card:nth-child(n+5),
.stat-box:nth-child(n+5) { animation-delay: 0.5s; }

/* Hover efekty pro karty */
.offer-card:hover,
.invoice-card:hover,
.subscription-card:hover {
    transform: translateY(-5px) scale(1.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Animace pro filter a search bar */
.filter,
.search-bar {
    animation: fadeInDown 0.5s ease-out 0.2s both;
}

/* Animace pro pagination */
.pagination-wrapper,
.pagination {
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ========================================================= */
/* SPECIFICKÉ ANIMACE PRO DASHBOARD */
/* ========================================================= */

.dashboard-card-compact,
.dashboard-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.dashboard-card-compact:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card-compact:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card-compact:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card-compact:nth-child(4) { animation-delay: 0.4s; }

.compact-stat {
    animation: fadeInScale 0.4s ease-out forwards;
    opacity: 0;
}

.compact-stat:nth-child(1) { animation-delay: 0.2s; }
.compact-stat:nth-child(2) { animation-delay: 0.3s; }
.compact-stat:nth-child(3) { animation-delay: 0.4s; }
.compact-stat:nth-child(4) { animation-delay: 0.5s; }

.dashboard-header-info {
    animation: fadeInDown 0.5s ease-out 0.1s both;
}

.dashboard-compact-grid {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ========================================================= */
/* SPECIFICKÉ ANIMACE PRO FINANCE OVERVIEW */
/* ========================================================= */

.tax-summary-box-full,
.tax-summary-list {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.tax-summary-item {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

.tax-summary-item:nth-child(1) { animation-delay: 0.1s; }
.tax-summary-item:nth-child(2) { animation-delay: 0.2s; }
.tax-summary-item:nth-child(3) { animation-delay: 0.3s; }
.tax-summary-item:nth-child(4) { animation-delay: 0.4s; }
.tax-summary-item:nth-child(5) { animation-delay: 0.5s; }
.tax-summary-item:nth-child(6) { animation-delay: 0.6s; }
.tax-summary-item:nth-child(n+7) { animation-delay: 0.7s; }

.tax-filter-container {
    animation: fadeInDown 0.5s ease-out 0.1s both;
}

/* ========================================================= */
/* SPECIFICKÉ ANIMACE PRO INVOICES */
/* ========================================================= */

.invoice-list-item {
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
}

.invoice-list-item:nth-child(1) { animation-delay: 0.1s; }
.invoice-list-item:nth-child(2) { animation-delay: 0.2s; }
.invoice-list-item:nth-child(3) { animation-delay: 0.3s; }
.invoice-list-item:nth-child(4) { animation-delay: 0.4s; }
.invoice-list-item:nth-child(5) { animation-delay: 0.5s; }
.invoice-list-item:nth-child(n+6) { animation-delay: 0.6s; }

/* ========================================================= */
/* SPECIFICKÉ ANIMACE PRO PROFILE */
/* ========================================================= */

.profile-form {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.profile-section-personal,
.profile-section-company,
.profile-section-address,
.profile-section-bank {
    animation: fadeInScale 0.5s ease-out forwards;
    opacity: 0;
}

.profile-section-personal { animation-delay: 0.1s; }
.profile-section-company { animation-delay: 0.2s; }
.profile-section-address { animation-delay: 0.3s; }
.profile-section-bank { animation-delay: 0.4s; }

/* ========================================================= */
/* SPECIFICKÉ ANIMACE PRO SUBSCRIPTION MANAGE */
/* ========================================================= */

.subscription-manage-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.subscription-manage-card:nth-child(1) { animation-delay: 0.1s; }
.subscription-manage-card:nth-child(2) { animation-delay: 0.2s; }
.subscription-manage-card:nth-child(3) { animation-delay: 0.3s; }

/* ========================================================= */
/* RESPONSIVE - ZACHOVÁNÍ ANIMACÍ NA MOBILU */
/* ========================================================= */

@media (max-width: 768px) {
    .main-content {
        animation: fadeInUp 0.4s ease-out;
    }
    
    .offer-card,
    .invoice-card,
    .subscription-card {
        animation-duration: 0.4s;
    }
    
    /* Zkrácení delay na mobilu */
    .offer-card:nth-child(n+1) { animation-delay: 0.05s; }
    .offer-card:nth-child(n+2) { animation-delay: 0.1s; }
    .offer-card:nth-child(n+3) { animation-delay: 0.15s; }
}
