/**
 * Moderní responzivní CSS pro Hasiči Hlučín
 * Mobile-first design s gradienty a animacemi
 */

/* ============================================
   CSS Variables - Barevné schéma
   ============================================ */
:root {
    /* Primární barvy - Hasičská červená */
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --primary-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    
    /* Sekundární barvy - Modrá */
    --secondary: #2563eb;
    --secondary-dark: #1d4ed8;
    --secondary-light: #3b82f6;
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    
    /* Úspěch - Zelená */
    --success: #16a34a;
    --success-dark: #15803d;
    --success-light: #22c55e;
    --success-gradient: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    
    /* Varování - Oranžová */
    --warning: #ea580c;
    --warning-dark: #c2410c;
    --warning-light: #f97316;
    --warning-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    
    /* Neutrální barvy */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Víkendové barvy */
    --weekend: #7c3aed;
    --weekend-light: #a78bfa;
    
    /* Rozměry */
    --header-height: 64px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Stíny */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px rgb(220 38 38 / 0.3);
    
    /* Přechody */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   Reset a základní styly
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: 
        linear-gradient(135deg, rgba(243, 244, 246, 0.7) 0%, rgba(229, 231, 235, 0.7) 100%),
        url('../img/pozadi3.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
}

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

a:hover {
    color: var(--secondary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Layout - Hlavní struktura
   ============================================ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    background: rgba(243, 244, 246, 0.95);
    border-radius: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

/* ============================================
   Header - Hlavička
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-logo:hover {
    color: var(--primary-light);
}

/* Navigace */
.nav-main {
    display: none;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .nav-main {
        display: flex;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--gray-300);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--gray-800);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray-300);
    font-size: 0.875rem;
    transition: var(--transition);
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-dropdown-item.active {
    background: var(--primary);
    color: white;
}

/* Chat widget */
.chat-widget {
    position: relative;
}

.chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
}

.chat-toggle:hover {
    background: var(--primary-dark);
}

.chat-badge {
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-left: 0.25rem;
}

.chat-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 0.5rem;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chat-messages {
    height: 250px;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.chat-message strong {
    color: var(--primary);
}

.chat-message small {
    color: var(--gray-400);
    margin-left: 0.5rem;
}

.chat-form {
    display: flex;
    padding: 0.5rem;
    border-top: 1px solid var(--gray-200);
}

.chat-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
}

.chat-send {
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    margin-left: 0.5rem;
    cursor: pointer;
}

.chat-send:hover {
    background: var(--primary-dark);
}

.chat-messages-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.chat-preview {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.chat-preview:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.chat-preview strong {
    color: var(--primary);
}

/* Header akce */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.year-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.year-selector label {
    font-size: 0.8125rem;
    color: var(--gray-400);
    display: none;
}

@media (min-width: 768px) {
    .year-selector label {
        display: block;
    }
}

.year-selector select {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile menu toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile navigace */
@media (max-width: 1023px) {
    .nav-main {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--gray-900);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-slow);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-main.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: 1rem;
        border-radius: var(--border-radius-sm);
    }
}

/* ============================================
   Submenu - Podmenu
   ============================================ */
.submenu {
    background: white;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.submenu-link {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.submenu-link:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.submenu-link.active {
    color: white;
    background: var(--primary);
}

/* ============================================
   User Bar - Uživatelský panel
   ============================================ */
.user-bar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.user-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.chat-messages-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-info::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
}

.user-lk {
    color: var(--gray-500);
}

.user-datetime {
    color: var(--gray-500);
}

/* ============================================
   Cards - Karty
   ============================================ */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-header.bg-gradient-primary {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
}

.card-header.bg-gradient-success {
    background: var(--success-gradient);
    color: white;
    border-bottom: none;
}

.card-header.bg-gradient-warning {
    background: var(--warning-gradient);
    color: white;
    border-bottom: none;
}

.card-body {
    padding: 1.25rem;
}

.card-body.p-0 {
    padding: 0;
}

.card-form {
    border: 2px solid var(--gray-200);
}

/* ============================================
   Day Header - Hlavička dne
   ============================================ */
.day-header {
    background: var(--secondary-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

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

.day-date {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.day-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.day-info {
    display: flex;
    flex-direction: column;
}

.day-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.day-month {
    font-size: 0.875rem;
    opacity: 0.9;
}

.day-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-shift {
    background: rgba(255,255,255,0.2);
    color: white;
}

.badge-holiday {
    background: var(--warning);
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

/* ============================================
   Calendar Navigation - Kalendářová navigace
   ============================================ */
.calendar-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    align-items: center;
}

.calendar-nav-label {
    font-weight: 600;
    color: var(--gray-600);
    margin-right: 0.5rem;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--secondary-light);
    color: white;
    transform: scale(1.1);
}

.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.calendar-day.selected {
    background: var(--secondary);
    color: white;
    font-weight: 700;
}

.calendar-day.weekend {
    background: var(--weekend-light);
    color: white;
}

.calendar-day.holiday {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    font-weight: 700;
}

.calendar-day.past {
    opacity: 0.5;
}

/* ============================================
   Shifts Grid - Mřížka směn
   ============================================ */
.shifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.shift-column {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.shift-column-header {
    padding: 0.75rem 1rem;
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shift-column-body {
    padding: 0.75rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shift-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: var(--gray-400);
    font-size: 0.875rem;
    gap: 0.5rem;
}

.shift-card {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.shift-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.shift-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.shift-info {
    flex: 1;
    min-width: 0;
}

.shift-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.shift-hours {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* Shift Table - Tabulkový výpis směn */
.shift-table {
    border-collapse: separate;
    border-spacing: 0;
}

.shift-table th {
    text-align: center;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    padding: 0.875rem 0.5rem;
}

.shift-cell {
    padding: 0.5rem !important;
    vertical-align: top;
    border-right: 1px solid var(--gray-200);
}

.shift-cell:last-child {
    border-right: none;
}

.shift-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.shift-row:last-child {
    margin-bottom: 0;
}

.shift-row:hover {
    background: var(--gray-100);
}

.shift-row-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-300);
    flex-shrink: 0;
}

.shift-row-info {
    flex: 1;
    min-width: 0;
}

.shift-row-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-row-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.shift-row-hours {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
}

.shift-row-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.shift-row-empty {
    padding: 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8125rem;
}

/* ============================================
   Day Header Compact - Kompaktní hlavička dne
   ============================================ */
.day-header-compact {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--primary);
}

.day-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.day-compact-date {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-900);
}

.day-compact-name {
    font-weight: 500;
    color: var(--gray-600);
}

.badge-shift-sm {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-holiday-sm {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Tabs - Záložky
   ============================================ */
.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    background: var(--gray-50);
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   Timeline - Časový přehled
   ============================================ */
.timeline-container {
    overflow-x: visible;
    width: 100%;
}

.timeline-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

.timeline-label {
    width: 50px;
    min-width: 50px;
    padding: 0.25rem;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--gray-600);
    background: var(--gray-100);
    text-align: center;
}

.timeline-func-header {
    flex: 1;
    padding: 0.5rem 0.25rem;
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    text-align: center;
    text-transform: uppercase;
}

.timeline-body {
    max-height: none;
}

.timeline-row {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.timeline-hour {
    width: 50px;
    min-width: 50px;
    padding: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-50);
    text-align: center;
    border-right: 1px solid var(--gray-200);
}

.timeline-hour.work-hour {
    background: #fef3c7;
    color: #92400e;
}

.timeline-cell {
    flex: 1;
    min-height: 28px;
    border-right: 1px solid var(--gray-200);
    position: relative;
}

.timeline-cell:last-child {
    border-right: none;
}

.timeline-cell.has-shift {
    opacity: 0.85;
}

.timeline-shift-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.25rem 0.5rem;
    color: #000;
    font-size: 0.6875rem;
    line-height: 1.3;
    z-index: 5;
}

.timeline-shift-info strong {
    display: block;
    font-size: 0.75rem;
}

.timeline-photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
    float: left;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.shift-actions {
    display: flex;
    gap: 0.25rem;
}

/* ============================================
   Offers Grid - Mřížka nabídek
   ============================================ */
/* Offers Timeline - Časový přehled nabídek */
.offers-timeline {
    overflow-x: auto;
}

.offers-timeline table {
    font-size: 0.75rem;
}

.offers-timeline th,
.offers-timeline td {
    border: 1px solid #c8e6c9 !important;
}

.timeline-cell-offer {
    min-width: 20px;
    height: 28px;
}

.offers-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: #f1f8e9;
    border-top: 1px solid #c8e6c9;
}

.offer-action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.offer-action-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.offer-action-info {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.offer-action-info strong {
    color: var(--gray-900);
}

.offer-action-info span {
    color: var(--gray-500);
}

.offer-action-btns {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

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

.offer-card {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px dashed var(--success-light);
    transition: var(--transition);
}

.offer-card:hover {
    border-style: solid;
    background: white;
    box-shadow: var(--shadow);
}

.offer-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--success-light);
}

.offer-info {
    flex: 1;
}

.offer-name {
    font-weight: 600;
    color: var(--gray-900);
}

.offer-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

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

/* ============================================
   Buttons - Tlačítka
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    color: white;
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--gray-500);
    background: var(--gray-100);
}

.btn-icon-sm:hover {
    color: white;
}

.btn-icon-sm.edit:hover {
    background: var(--secondary);
}

.btn-icon-sm.delete:hover {
    background: var(--primary);
}

/* ============================================
   Forms - Formuláře
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    background: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.info-box {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--secondary);
}

/* ============================================
   Tables - Tabulky
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--secondary-gradient);
    color: white;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-compact th,
.table-compact td {
    padding: 0.5rem;
    font-size: 0.8125rem;
}

.table-calendar {
    table-layout: fixed;
}

.table-calendar th,
.table-calendar td {
    text-align: center;
    width: 32px;
    min-width: 32px;
}

.table-calendar .col-name {
    width: 150px;
    min-width: 150px;
    text-align: left;
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
}

.table-calendar th.col-name {
    background: var(--secondary);
}

.table-calendar .weekend {
    background: var(--weekend-light);
    color: white;
}

/* ============================================
   Alerts - Upozornění
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border: 1px solid var(--success-light);
    color: var(--success-dark);
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
    border: 1px solid var(--warning-light);
    color: var(--warning-dark);
}

.alert-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid var(--secondary-light);
    color: var(--secondary-dark);
}

.alert-icon {
    font-size: 1.25rem;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--gray-500);
}

.empty-state p {
    margin-top: 1rem;
    font-size: 0.9375rem;
}

/* ============================================
   Section Header
   ============================================ */
.section-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   Login Page
   ============================================ */
.login-container {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
}

.login-card .card-body {
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-500);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--primary); }

.font-bold { font-weight: 700; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

.p-0 { padding: 0; }
.p-3 { padding: 1rem; }

.d-flex {
    display: flex;
}

.gap-1 {
    gap: 0.75rem;
}

.d-inline { display: inline; }
.d-none { display: none; }

.flex-wrap { flex-wrap: wrap; }
.gap-3 { gap: 1rem; }

.w-100 { width: 100%; }

@media (min-width: 768px) {
    .d-md-block { display: block; }
    .d-md-inline { display: inline; }
    .d-none-md { display: none; }
}

/* ============================================
   Action Icons - Ikonky pro editaci/mazání
   ============================================ */
.action-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
}

.action-icon.edit {
    background-color: #f59e0b;
    background-image: url("../img/pencil.svg");
}

.action-icon.delete {
    background-color: #ef4444;
    background-image: url("../img/trash.svg");
}

.action-icon.edit:hover {
    background-color: #d97706;
    transform: scale(1.1);
}

.action-icon.delete:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.action-icon.add {
    background-color: #22c55e;
    background-image: url("../img/user-plus.svg");
}

.action-icon.add:hover {
    background-color: #16a34a;
    transform: scale(1.1);
}

/* Small action icons for table cells */
.offer-cell-actions {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.action-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.action-icon-sm.edit {
    background-color: #f59e0b;
    background-image: url("../img/pencil.svg");
}

.action-icon-sm.delete {
    background-color: #ef4444;
    background-image: url("../img/trash.svg");
}

.action-icon-sm.add {
    background-color: #22c55e;
    background-image: url("../img/user-plus.svg");
}

.action-icon-sm:hover {
    transform: scale(1.1);
}

/* Extra small action icons for inside offer blocks */
.action-icon-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background-size: 10px 10px;
    background-repeat: no-repeat;
    background-position: center;
}

.action-icon-xs.edit {
    background-color: #f59e0b;
    background-image: url("../img/pencil.svg");
}

.action-icon-xs.delete {
    background-color: #ef4444;
    background-image: url("../img/trash.svg");
}

.action-icon-xs.add {
    background-color: #22c55e;
    background-image: url("../img/user-plus.svg");
}

.action-icon-xs:hover {
    transform: scale(1.15);
}

/* ============================================
   Firefighter Grid & Cards
   ============================================ */
.firefighter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.firefighter-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.firefighter-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.firefighter-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.firefighter-info {
    padding: 0.75rem;
}

.firefighter-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.firefighter-unit {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.firefighter-time {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

/* ============================================
   Nav Submenu
   ============================================ */
.nav-submenu {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.nav-submenu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-submenu-link {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-submenu-link:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.nav-submenu-link.active {
    color: white;
    background: var(--primary);
}

/* ============================================
   User Bar
   ============================================ */
.user-bar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.user-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* ============================================
   Chart Bars (Statistics)
   ============================================ */
.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.chart-bar-value {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.chart-bar-fill {
    width: 40px;
    background: var(--secondary-gradient);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    transition: var(--transition-slow);
}

.chart-bar-fill.highlight {
    background: var(--primary-gradient);
}

.chart-bar-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* ============================================
   Fire Banner - Hasičský banner
   ============================================ */
.fire-banner {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(153, 27, 27, 0.95) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fire-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(251, 146, 60, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.fire-banner::after {
    content: '🔥';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.15;
}

.fire-banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.fire-banner-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.fire-banner-text h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fire-banner-text p {
    opacity: 0.9;
    font-size: 1rem;
}

/* ============================================
   Quick Menu - Kompaktní horizontální menu
   ============================================ */
.quick-menu {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .quick-menu { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .quick-menu { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .quick-menu { grid-template-columns: repeat(3, 1fr); }
}

.quick-menu-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.quick-menu-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quick-menu-header {
    background: var(--item-bg);
    color: white;
    padding: 0.375rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.quick-menu-header i {
    width: 14px !important;
    height: 14px !important;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    margin-left: auto;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.quick-menu-links {
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
}

.quick-menu-links a {
    display: block;
    padding: 0.25rem 0.375rem;
    color: var(--gray-600);
    font-size: 0.75rem;
    border-radius: 3px;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-menu-links a:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* ============================================
   Dashboard Grid (fallback)
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.dashboard-section {
    text-align: center;
    padding: 2rem 1.5rem;
}

.dashboard-icon {
    margin-bottom: 1rem;
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.dashboard-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.dashboard-links li {
    margin-bottom: 0.5rem;
}

.dashboard-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--gray-700);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.dashboard-links a:hover {
    background: var(--gray-100);
    color: var(--secondary);
}

/* ============================================
   Menu Grid (Dashboard)
   ============================================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-section {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-section-header {
    padding: 1rem 1.25rem;
    background: var(--secondary-gradient);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-section-body {
    padding: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.menu-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.menu-item-icon {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
}

.menu-item-badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .submenu,
    .btn,
    .shift-actions,
    .offer-actions {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    .main-content {
        padding: 0;
        max-width: none;
    }
}
