/* Základní nastavení */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --light-color: #f3f4f6;
    --dark-color: #1f2937;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body, html {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ef 100%);
    color: #1e293b;
    min-height: 100vh;
}

/* Navigace */
.navbar {
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Kontejnery a karty */
.container, .card, .modal-content {
    border-radius: 18px !important;
    box-shadow: 0 6px 32px rgba(52,152,219,0.10), 0 2px 8px rgba(52,152,219,0.08);
}

.card, .modal-content {
    background: #fff;
    border: none;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover, .modal-content:hover {
    box-shadow: 0 12px 36px rgba(52,152,219,0.13), 0 2px 8px rgba(52,152,219,0.10);
    transform: translateY(-2px) scale(1.01);
}

/* Formuláře */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    font-size: 1.05rem;
    padding: 0.9rem 1.2rem;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    font-size: 0.95rem;
}

/* Tlačítka */
.btn, .btn-primary, .btn-danger, .btn-success {
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.85rem 1.7rem;
    box-shadow: 0 2px 8px rgba(52,152,219,0.07);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-primary {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(90deg, #1e40af 0%, #2563eb 100%);
    box-shadow: 0 6px 18px rgba(52,152,219,0.15);
    transform: translateY(-2px) scale(1.04);
}
.btn-danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
}
.btn-success {
    background: linear-gradient(90deg, #10b981 0%, #22d3ee 100%);
    color: #fff;
    border: none;
}

/* Tabulky */
.table {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(52,152,219,0.07);
    background: #fff;
}
.table thead th {
    background: #f1f5f9;
    color: #2563eb;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #e5e7eb;
}
.table td {
    font-size: 1.05rem;
    color: #1e293b;
    border-bottom: 1px solid #e5e7eb;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

/* Alerty */
.alert {
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52,152,219,0.07);
    border: none;
    padding: 1.2rem 1.5rem;
}

.alert-success {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    color: #166534;
}

.alert-danger {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
}

/* Dashboard statistiky */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(135deg, white, #f8fafc);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.stat-card p {
    color: var(--dark-color);
    margin: 0;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Přihlašovací stránka */
.login-container {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.5s ease-out;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--dark-color);
    font-weight: 700;
    font-size: 2rem;
}

/* Animace */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.7s cubic-bezier(0.4,0,0.2,1);
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bounce efekt pro úspěch */
.bounce {
    animation: bounceIn 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bounceIn {
    0% { transform: scale(0.95); }
    60% { transform: scale(1.05); }
    80% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* Shake efekt pro chyby */
.shake {
    animation: shake 0.4s cubic-bezier(0.36,0.07,0.19,0.97);
}
@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
    100% { transform: translateX(0); }
}

/* Ripple efekt pro tlačítka */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background: rgba(52,152,219,0.25);
    pointer-events: none;
}
@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Hover animace pro tabulky a řádky */
.table tbody tr {
    transition: background 0.25s, box-shadow 0.25s, transform 0.18s;
}
.table tbody tr:hover {
    background: #eaf5fc;
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
    transform: scale(1.01);
}

/* Animace ikon */
.animated-icon {
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.animated-icon:hover {
    transform: rotate(-12deg) scale(1.15);
}
.animated-icon.pulse {
    animation: pulse 1.2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Loading spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responzivní design */
@media (max-width: 768px) {
    .container {
        padding: 0.7rem;
        max-width: 100%;
    }
    
    /* Navigace */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-collapse {
        background: var(--dark-color);
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 0.5rem;
        box-shadow: var(--box-shadow);
    }
    
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .nav-link {
        padding: 0.75rem !important;
        margin: 0.25rem 0;
        border-radius: var(--border-radius);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Karty */
    .card, .modal-content {
        border-radius: 12px !important;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* Tabulky */
    .table-responsive {
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
    
    .table {
        font-size: 0.95rem;
    }
    
    .table thead th {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .table td {
        padding: 0.75rem;
        white-space: nowrap;
    }
    
    /* Formuláře */
    .form-control, .form-select {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Tlačítka */
    .btn {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
    
    /* Dashboard statistiky */
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.75rem;
    }
    
    .stat-card p {
        font-size: 0.9rem;
    }
    
    /* Progress bar */
    .progress {
        height: 16px !important;
    }
    
    .progress-bar {
        font-size: 0.8rem;
        line-height: 16px;
    }
    
    /* Badge */
    .badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }
    
    /* Alerty */
    .alert {
        padding: 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
    
    /* Tooltip */
    .tooltip {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* Vylepšení pro velmi malé obrazovky */
@media (max-width: 360px) {
    .container {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* Moderní badge */
.badge {
    border-radius: 1.2em;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.5em 1.2em;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 4px rgba(52,152,219,0.07);
    border: none;
}

/* Moderní sekce a oddělení */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
}

hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

/* Smooth přechody pro hlavní prvky */
input, select, textarea, .form-control, .form-select, .btn, .card, .alert, .modal-content {
    transition: box-shadow 0.3s, border-color 0.3s, background 0.3s, color 0.3s, transform 0.2s;
}

/* Priority badge a řádky v dashboardu */
.badge-priority {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.5em 1.2em;
    border-radius: 1.5em;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
    border: 2px solid transparent;
    letter-spacing: 0.04em;
}
.badge-priority i {
    font-size: 1.1em;
    margin-right: 0.3em;
}
.badge-priority-vysoká {
    background: linear-gradient(90deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
    border-color: #ef4444;
}
.badge-priority-střední {
    background: linear-gradient(90deg, #fef9c3 0%, #fde68a 100%);
    color: #b45309;
    border-color: #f59e42;
}
.badge-priority-nízká {
    background: linear-gradient(90deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
    border-color: #10b981;
}
.issue-row.issue-priority-vysoká {
    background: linear-gradient(90deg, #fff1f2 0%, #fee2e2 100%);
    border-left: 5px solid #ef4444;
}
.issue-row.issue-priority-střední {
    background: linear-gradient(90deg, #fefce8 0%, #fef9c3 100%);
    border-left: 5px solid #f59e42;
}
.issue-row.issue-priority-nízká {
    background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 5px solid #10b981;
}
.issue-row {
    transition: background 0.3s, border-color 0.3s;
}

.table tbody td {
    vertical-align: middle !important;
}

/* Rezervace – animace a layout */
.hour-row {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.hour-row.visible {
    opacity: 1;
    transform: translateY(0);
}
.animated-progress .progress-bar {
    transition: width 1.1s cubic-bezier(0.4,0,0.2,1);
}
.table-hours th, .table-hours td {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    vertical-align: middle;
}
.table-hours tr {
    transition: background 0.25s, box-shadow 0.25s;
}
.table-hours tr:hover {
    background: #eaf5fc;
    box-shadow: 0 2px 8px rgba(52,152,219,0.10);
}
.animated-progress {
    border-radius: 12px;
    overflow: hidden;
}

.all-day-row {
    background: linear-gradient(90deg, #e0e7ef 0%, #c7d2fe 100%) !important;
    border-left: 6px solid #2563eb;
    font-weight: 600;
}
.badge-all-day {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    font-size: 1.1rem;
    padding: 0.6em 1.5em;
    border-radius: 1.5em;
    box-shadow: 0 2px 8px rgba(52,152,219,0.13);
    letter-spacing: 0.04em;
}
.past-hour-row {
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border-left: 6px solid #9ca3af;
    color: #6b7280;
    font-weight: 500;
    opacity: 0.85;
}
.badge-past-hour {
    background: linear-gradient(90deg, #d1d5db 0%, #f3f4f6 100%);
    color: #6b7280;
    font-size: 0.98rem;
    padding: 0.45em 1.1em;
    border-radius: 1.2em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(156,163,175,0.08);
    letter-spacing: 0.04em;
}
.next-hour-row {
    background: linear-gradient(90deg, #f0f9ff 0%, #bae6fd 100%) !important;
    border-left: 5px solid #22d3ee;
    font-weight: 600;
    animation: pulseNext 1.2s infinite alternate;
}
@keyframes pulseNext {
    0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.10); }
    100% { box-shadow: 0 0 12px 4px rgba(34,211,238,0.13); }
}
.badge-next-hour {
    background: linear-gradient(90deg, #22d3ee 0%, #38bdf8 100%);
    color: #0e7490;
    font-size: 0.98rem;
    padding: 0.45em 1.1em;
    border-radius: 1.2em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(34,211,238,0.10);
    letter-spacing: 0.04em;
}

.current-hour-row {
    background: linear-gradient(90deg, #d1fae5 0%, #bbf7d0 100%) !important;
    border-left: 6px solid #10b981;
    font-weight: 600;
    animation: pulseCurrent 1.2s infinite alternate;
}
@keyframes pulseCurrent {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.10); }
    100% { box-shadow: 0 0 12px 4px rgba(16,185,129,0.13); }
}
.badge-current-hour {
    background: linear-gradient(90deg, #10b981 0%, #22d3ee 100%);
    color: #fff;
    font-size: 1.05rem;
    padding: 0.5em 1.2em;
    border-radius: 1.2em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16,185,129,0.10);
    letter-spacing: 0.04em;
    animation: pulseCurrent 1.2s infinite alternate;
}