/* Moderní styly pro K-Stání Management System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #008B8B;
    --primary-hover: #006B6B;
    --primary-light: #e0f7f7;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1a1a1a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --bg-sidebar: #e5ffff;
    --bg-body: #e3f2fd;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #f0ffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    transition: padding-left var(--transition);
}

body.with-sidebar {
    padding-left: var(--sidebar-width);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition), transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-sidebar);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition);
    margin-right: 1rem;
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 2rem 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-color);
}

.sidebar.collapsed .sidebar-toggle {
    margin: 0;
}

.sidebar.collapsed .toggle-icon-expand {
    display: none;
}

.sidebar.collapsed .toggle-icon-collapse {
    display: block !important;
}

.sidebar:not(.collapsed) .toggle-icon-expand {
    display: block;
}

.sidebar:not(.collapsed) .toggle-icon-collapse {
    display: none !important;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.nav-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
}

.nav-item.active {
    background: rgba(0, 139, 139, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.nav-text {
    white-space: nowrap;
    transition: opacity var(--transition);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Nav Item Group (parent with submenu) */
.nav-item-group {
    display: flex;
    flex-direction: column;
}

.nav-submenu {
    display: none;
    padding-left: 2rem;
    margin-top: 0.25rem;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-item-group.expanded .nav-submenu {
    display: flex;
}

.nav-item-sub {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.nav-item-sub svg {
    width: 16px;
    height: 16px;
}

.sidebar.collapsed .nav-submenu {
    display: none !important;
}

.nav-divider {
    height: 1px;
    background: rgba(226, 232, 240, 0.8);
    margin: 0.5rem 0;
}

.nav-item-settings {
    margin-top: auto;
    color: var(--text-primary);
}

.nav-item-settings:hover {
    background: rgba(0, 139, 139, 0.1);
    color: var(--primary-color);
}

.nav-item-logout {
    color: var(--error-color);
}

.nav-item-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    padding: 2rem;
    transition: margin-left var(--transition);
    background: var(--bg-white);
}

body.with-sidebar .main-content {
    margin-left: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Legacy Header (for non-admin pages) */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 1.25rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

header nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

header nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

header nav a:hover {
    background-color: var(--bg-light);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

/* Formulář */
.form-container {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #007A7A, var(--primary-color));
}

.form-container h2 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.form-container > p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.form-container > p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Sekce formuláře */
.form-section {
    margin: 2.5rem 0;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: linear-gradient(to bottom, #ffffff, var(--bg-light));
    transition: var(--transition);
    position: relative;
}

.form-section:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.form-section legend {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    padding: 0 1rem;
    background: var(--bg-white);
    position: relative;
    z-index: 1;
}

.section-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--warning-color);
    border-radius: 0.5rem;
    line-height: 1.6;
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: var(--transition);
}

label:has(input:focus) {
    color: var(--primary-color);
}

.required {
    color: var(--error-color);
    font-weight: 700;
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="time"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

input:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
    transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* File input */
input[type="file"] {
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(0, 139, 139, 0.05);
}

input[type="file"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

/* Honeypot pole - skryté */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

/* Screen reader only - pro přístupnost */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Checkbox a Radio skupiny */
.checkbox-group,
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.875rem;
    margin-top: 0.75rem;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    user-select: none;
}

.checkbox-group label:hover,
.radio-group label:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.checkbox-group input[type="checkbox"]:checked + label,
.radio-group input[type="radio"]:checked + label,
.checkbox-group label:has(input[type="checkbox"]:checked),
.radio-group label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.1), rgba(0, 122, 122, 0.1));
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: auto;
    margin-right: 0.75rem;
    cursor: pointer;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

/* Tlačítka */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #007A7A);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #005A5A);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading stav */
.btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    margin-left: -0.625rem;
    margin-top: -0.625rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-icon-edit {
    color: var(--primary-color);
    border-color: rgba(0, 139, 139, 0.3);
}

.btn-icon-edit:hover {
    background-color: rgba(0, 139, 139, 0.1);
    border-color: var(--primary-color);
}

.btn-icon-delete {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}

.btn-icon-delete:hover {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

/* Ghost Buttons (for table actions) */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-ghost:hover {
    background: #f3f4f6;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-edit-inline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-edit-inline:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

/* Photo Icon Buttons */
.btn-icon-view {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.btn-icon-photo {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-photo:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.btn-icon-photo-upload {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.btn-icon-photo-upload:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

/* Zprávy */
.form-message {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    display: none;
    animation: slideDown 0.3s ease-out;
    font-weight: 500;
    box-shadow: var(--shadow-md);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 2px solid var(--success-color);
    display: block;
}

.form-message.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 2px solid var(--error-color);
    display: block;
}

/* Náhled fotografií */
.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.photo-preview img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Progress indicator */
.form-progress {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin-bottom: 2rem;
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.progress-bar {
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #007A7A);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Admin dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-filters {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 300px;
}

.filters-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
}

.filter-label svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.filter-select,
.filter-input {
    padding: 0 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
    min-width: 200px;
    height: 2.75rem;
    box-sizing: border-box;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.filter-input {
    width: 100%;
    min-width: 250px;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #cbd5e1;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    margin: 0;
    white-space: nowrap;
    height: 2.75rem;
    box-sizing: border-box;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Tabulka */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: var(--shadow-md);
    table-layout: auto;
}

/* Ensure form wrapper doesn't constrain table width */
form table {
    width: 100%;
    max-width: 100%;
}

/* Ensure table wrapper doesn't clip dropdowns */
table tbody {
    position: relative;
    overflow: visible;
}

thead {
    background: #F8FAFC;
    border-bottom: 2px solid var(--border-color);
}

thead th {
    color: #1E293B;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    vertical-align: middle;
}

th, td {
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

tbody tr td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    vertical-align: top;
}

/* ID columns - muted styling, narrow width */
.id-column {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
    text-align: center;
    width: 3rem;
    min-width: 3rem;
    max-width: 3rem;
}

/* Narrow columns for ID and ČM in header - use both nth-child and data-sort for specificity */
th[data-sort="id"],
th:nth-child(2)[data-sort="id"] {
    width: 3rem !important;
    min-width: 3rem !important;
    max-width: 3rem !important;
    text-align: center;
}

th[data-sort="cislo_na_mape"],
th:nth-child(3)[data-sort="cislo_na_mape"] {
    width: 3rem !important;
    min-width: 3rem !important;
    max-width: 3rem !important;
    text-align: center;
}

th[data-sort="id"] .th-content,
th:nth-child(2)[data-sort="id"] .th-content,
th[data-sort="cislo_na_mape"] .th-content,
th:nth-child(3)[data-sort="cislo_na_mape"] .th-content {
    justify-content: center;
}

th[data-sort="id"] .sort-arrows,
th:nth-child(2)[data-sort="id"] .sort-arrows,
th[data-sort="cislo_na_mape"] .sort-arrows,
th:nth-child(3)[data-sort="cislo_na_mape"] .sort-arrows {
    margin-left: 0.125rem;
    width: 0.625rem;
    height: 0.875rem;
}

/* Smaller sorting arrows for ID and ČM columns */
th[data-sort="id"] .sort-arrow,
th:nth-child(2)[data-sort="id"] .sort-arrow,
th[data-sort="cislo_na_mape"] .sort-arrow,
th:nth-child(3)[data-sort="cislo_na_mape"] .sort-arrow {
    font-size: 0.5rem;
    line-height: 1;
}

th[data-sort="id"] .sort-arrow.active,
th:nth-child(2)[data-sort="id"] .sort-arrow.active,
th[data-sort="cislo_na_mape"] .sort-arrow.active,
th:nth-child(3)[data-sort="cislo_na_mape"] .sort-arrow.active {
    font-size: 0.625rem;
}

/* Ensure Název column has adequate width regardless of position */
th[data-sort="nazev_mista"] {
    min-width: 200px;
    width: auto;
}

/* Ensure ID and ČM cells are also narrow */
td.id-column {
    width: 3rem !important;
    min-width: 3rem !important;
    max-width: 3rem !important;
}

/* Typography - Primary column (Název) should stand out */
/* For tables with ČM column (dashboard, katalog_detail) - Název is 3rd */
tbody tr td:nth-child(3) {
    font-weight: 600;
    min-width: 200px;
}

tbody tr td:nth-child(3) strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* For tables without ČM column (zajemci) - Název is 2nd */
tbody tr td:nth-child(2) {
    font-weight: 600;
    min-width: 200px;
}

tbody tr td:nth-child(2) strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact cell styling - merged Address and Contact column */
.contact-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: normal;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: normal;
}

.contact-email {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.contact-email:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.contact-separator {
    display: none;
}

.contact-phone {
    color: var(--text-primary);
    display: block;
    font-weight: normal;
}

.contact-address {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #6b7280;
    margin-top: 0;
}

/* Photo column - centered badge */
.photo-column {
    text-align: center;
    vertical-align: top;
}

/* Status column - centered */
/* For tables with ČM column (katalog_detail) - Status is 7th */
th:nth-child(7),
td:nth-child(7) {
    text-align: center;
}

/* For tables without ČM column (zajemci) - Status is 6th */
th:nth-child(6),
td:nth-child(6) {
    text-align: center;
}

/* Actions column - centered (consolidated) */
.actions-column {
    text-align: center;
    vertical-align: top;
}

.photo-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    vertical-align: middle;
}

.photo-count-badge:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

.photo-count-badge svg {
    flex-shrink: 0;
}

/* Status badge styling */
.status-badge-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.status-badge-icons-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.status-badge-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    white-space: nowrap;
    letter-spacing: 0;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #e5e7eb;
    color: #6b7280;
}

.status-badge-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-badge-v_procesu {
    background: rgba(254, 243, 199, 0.5);
    color: #92400e;
}

.status-badge-overeno {
    background: rgba(209, 250, 229, 0.5);
    color: #065f46;
}

.status-badge-novy {
    background: rgba(219, 234, 254, 0.5);
    color: #1e40af;
}

.status-badge-zamitnuto {
    background: rgba(254, 226, 226, 0.5);
    color: #991b1b;
}

.status-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    min-width: 150px;
    overflow: hidden;
    display: none;
}

.status-badge-wrapper.active .status-dropdown {
    display: block;
}

.status-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: none;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

.status-option:hover {
    background: var(--bg-light);
}

.status-option.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

/* Status select styling (for forms) */
.status-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.status-select:hover {
    border-color: var(--primary-color);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.status-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table Actions */
.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.actions-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    min-width: 180px;
    overflow: visible;
}

/* Dropdown menu směrem nahoru (pro poslední řádky) */
.actions-dropdown-menu.dropdown-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.dropdown-item,
.dropdown-item-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    text-align: left;
}

.dropdown-item:hover,
.dropdown-item-form:hover {
    background: var(--bg-light);
}

.dropdown-item svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.dropdown-item-danger {
    color: #dc2626;
}

.dropdown-item-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dropdown-item-form {
    padding: 0;
    margin: 0;
}

.dropdown-item-form button {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

tbody tr:hover {
    background: var(--bg-light);
}

.table-row-clickable {
    transition: background-color 0.2s ease;
}

.table-row-clickable:hover {
    background: var(--bg-light) !important;
    cursor: pointer;
}

/* Action buttons (consolidated) */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin: 0;
}

/* Action buttons - column variant */
.action-buttons.column {
    flex-direction: column;
}

.action-buttons-row {
    display: flex;
    gap: 0.5rem;
}

/* Table sorting styles */
th.sortable {
    position: relative;
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: rgba(0, 139, 139, 0.05);
}

.th-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Reduced gap for narrow columns */
th:nth-child(2) .th-content,
th:nth-child(3) .th-content {
    gap: 0.25rem;
}

.th-text {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sort-arrows {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    gap: 0.05rem;
    flex-shrink: 0;
    width: 0.75rem;
    height: 1rem;
}

.sort-arrow {
    display: none;
    font-size: 0.625rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
    text-align: center;
    font-weight: 400;
    opacity: 0;
    transform: scale(0.8);
}

/* Active arrow - always visible, only one shown */
.sort-arrow.active {
    display: block !important;
    opacity: 1 !important;
    color: var(--primary-color);
    font-size: 0.75rem;
    transform: scale(1);
    font-weight: 500;
}

/* When column is sorted, hide the inactive arrow */
.sort-arrows:has(.sort-arrow.active) .sort-arrow:not(.active) {
    display: none !important;
}

/* Fallback for browsers without :has() support - hide sibling when one is active */
.sort-arrow-up.active ~ .sort-arrow-down:not(.active),
.sort-arrow-down.active ~ .sort-arrow-up:not(.active) {
    display: none !important;
}

/* Show inactive arrows on hover when column is NOT sorted */
th.sortable:hover .sort-arrow:not(.active) {
    display: block;
    opacity: 0.4;
    transform: scale(1);
}

/* Hide inactive arrows on hover if column is already sorted */
th.sortable:hover .sort-arrows:has(.sort-arrow.active) .sort-arrow:not(.active) {
    display: none !important;
}

/* Hover effect on individual arrow */
.sort-arrow:hover {
    opacity: 0.7 !important;
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Active arrow hover */
.sort-arrow.active:hover {
    opacity: 1 !important;
    transform: scale(1.15);
}


/* Login */
.login-container {
    max-width: 420px;
    margin: 5rem auto;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #007A7A);
}

.login-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
    font-size: 1.75rem;
}

/* Footer */
/* Footer Styling */
footer {
    margin-top: 0;
    padding: 3rem 0;
    text-align: center;
    background: #e5ffff;
    border-top: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-copyright {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}


/* Responsive */
@media (max-width: 768px) {
    body.with-sidebar {
        padding-left: 0 !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    .sidebar.collapsed.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        padding: 1rem;
        margin-left: 0 !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar-toggle {
        display: none; /* Skrýt toggle na mobilu */
    }
    
    body {
        padding: 1rem 0.5rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header nav {
        justify-content: center;
        width: 100%;
    }
    
    .checkbox-group,
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        vertical-align: top;
    }
    
    .contact-cell {
        gap: 0.375rem;
    }
    
    .contact-info {
        font-size: 0.8125rem;
    }
    
    .contact-address {
        font-size: 0.6875rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dashboard-filters {
        padding: 1rem;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
        min-width: auto;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animace pro načítání */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.5s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }
.form-section:nth-child(6) { animation-delay: 0.6s; }

/* Focus visible pro přístupnost */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Invalid input styling */
input:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

input:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: var(--success-color);
}

/* Map styling */
#map {
    z-index: 1;
    transition: var(--transition);
}

#map:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
    margin: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.leaflet-popup-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Leaflet marker styling */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Readonly input styling for GPS coordinates */
input[readonly] {
    background: var(--bg-light);
    cursor: not-allowed;
    color: var(--text-secondary);
}

input[readonly]:focus {
    border-color: var(--border-color);
    box-shadow: none;
    transform: none;
}


/* Address search styling */
#address-search {
    font-family: inherit;
    transition: var(--transition);
}

#address-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
    transform: translateY(-1px);
}

#search-results {
    z-index: 1000;
}

#search-results div:last-child {
    border-bottom: none;
}

/* Modal pro zamítnutí */
.rejection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    z-index: 1;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.modal-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.modal-actions .btn {
    margin: 0;
}

.rejection-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: help;
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    transition: all 0.2s;
    vertical-align: middle;
}

.rejection-info-icon:hover {
    color: #dc2626;
    background-color: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

.rejection-info-icon svg {
    width: 14px;
    height: 14px;
}

.rejection-info-icon svg {
    width: 14px;
    height: 14px;
}

/* Photo Upload Modal */
.photo-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.photo-upload-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.photo-upload-modal .modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.photo-upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.photo-upload-modal-header h3 {
    margin: 0;
}

.photo-upload-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.photo-upload-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.photo-upload-section h4 {
    margin: 0 0 1rem 0;
}

.existing-photos-section h4,
.existing-photos-section > h4 {
    margin: 0 0 1rem 0;
}

.rejection-modal-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.photo-file-input-wrapper {
    margin-bottom: 1rem;
}

.photo-file-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-white);
    cursor: pointer;
}

.selected-files-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.upload-btn-icon {
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

.upload-progress {
    display: none;
    margin-top: 1rem;
}

.upload-progress-bar-container {
    background: var(--border-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.upload-progress-bar {
    background: var(--primary-color);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.upload-status {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.existing-photos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.no-photos-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    display: none;
}

.file-preview-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.file-preview-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.file-preview-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
}

.file-preview-name {
    display: block;
    margin-top: 0.25rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.existing-photo-item {
    position: relative;
}

.existing-photo-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.delete-photo-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.delete-photo-btn:hover {
    background: rgba(220, 38, 38, 1) !important;
    transform: scale(1.1);
}

/* Dashboard specific styles */
.dashboard-top-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.dashboard-export-container {
    flex: 0 0 auto;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-add-stani {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
}

.export-split-container {
    position: relative;
    display: flex;
    width: 100%;
}

.export-split-wrapper {
    display: flex;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.export-all-form {
    flex: 1;
    display: flex;
}

.export-all-btn {
    border-radius: 0;
    width: 100%;
    padding: 0.875rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.export-all-btn svg {
    margin-right: 0.5rem;
}

.export-dropdown-btn {
    border-radius: 0;
    padding: 0.875rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
}

#exportDropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    min-width: 250px;
    overflow: hidden;
}

.export-options-container {
    padding: 0.5rem 0;
}

.export-option-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

.export-option-btn:not(:first-child) {
    border-top: 1px solid var(--border-color);
}

.export-option-icon {
    font-size: 1.25rem;
}

.export-option-content {
    flex: 1;
}

.export-option-title {
    font-weight: 600;
}

.export-option-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.export-option-disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.6;
}

#bulkFormTable {
    display: contents;
}

.table-empty-row {
    text-align: center;
    padding: 2rem;
}

.photo-count-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-cell {
    display: flex;
    align-items: center;
}

.form-inline {
    display: inline;
}

.export-option-btn:hover {
    background: var(--bg-light) !important;
}

.export-option-btn:active {
    background: var(--border-color) !important;
}

/* ============================================
   UX VYLEPŠENÍ - VYSOKÁ PRIORITA
   ============================================ */

/* Breadcrumbs navigace */
.breadcrumbs {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.breadcrumbs-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-list a:hover {
    color: var(--primary-color);
}

.breadcrumbs-list .separator {
    color: var(--text-secondary);
    opacity: 0.5;
    user-select: none;
}

.breadcrumbs-list .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Vylepšené prázdné stavy */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.empty-state-icon {
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: var(--text-secondary);
}

.empty-state-icon svg {
    width: 80px;
    height: 80px;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading stavy */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-light) 25%, 
        rgba(255, 255, 255, 0.5) 50%, 
        var(--bg-light) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-row {
    height: 60px;
    margin-bottom: 0.5rem;
}



/* Real-time filtrování indikátor */
.filter-loading {
    position: relative;
}

.filter-loading::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive pro breadcrumbs */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.5rem;
    }
    
    .breadcrumbs-list {
        font-size: 0.8125rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon svg {
        width: 64px;
        height: 64px;
    }
    
    .empty-state h3 {
        font-size: 1.25rem;
    }
}

/* Note icon styling */
.note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: all 0.2s;
    vertical-align: middle;
}

.note-icon:hover {
    color: #374151;
    transform: scale(1.1);
}

.note-icon-create {
    opacity: 0.6;
}

.note-icon-create:hover {
    opacity: 1;
}

.note-icon-edit {
    opacity: 1;
    color: #3b82f6;
}

.note-icon-edit:hover {
    color: #2563eb;
}

/* Note modal styling */
.note-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10001;
    overflow: hidden;
}

.note-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10001;
}

.note-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    min-width: 500px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 10002;
}

.note-modal h3 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.note-modal .form-group {
    margin-bottom: 1rem;
}

.note-modal textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.note-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.note-modal .note-char-count {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.note-modal .modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Katalog Modal */
.katalog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.katalog-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.katalog-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    min-width: 400px;
    max-width: 550px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.katalog-modal h3 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.katalog-modal .form-group {
    margin-bottom: 1rem;
}

.katalog-modal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.katalog-modal select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.katalog-modal .radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.katalog-modal .radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.katalog-modal .modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
