@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --background: #0F172A;
    --surface: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --danger: #EF4444;
    --warning: #F59E0B;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism utility */
.glass {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--text-main);
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Timetable Grid */
.timetable-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.sidebar {
    width: 250px;
    padding: 1.5rem;
}

.grid-container {
    flex: 1;
    padding: 1.5rem;
}

.timetable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.5rem;
}

.timetable th, .timetable td {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    min-height: 80px;
}

.timetable th {
    font-weight: 600;
    color: var(--text-muted);
}

/* Draggable Items */
.card {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: grab;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.card:active {
    cursor: grabbing;
}

.card:hover {
    transform: scale(1.05);
}

.card.collision {
    background: linear-gradient(135deg, #EF4444, #B91C1C);
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-border);
    color: white;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Badge statuses */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-approved { background: rgba(16, 185, 129, 0.2); color: var(--secondary); }
.badge-exported { background: rgba(79, 70, 229, 0.2); color: var(--primary); }

@media (max-width: 1024px) {
    header {
        flex-direction: column;
        padding: 1rem;
        align-items: flex-start;
    }
    header > div:first-child {
        margin-bottom: 0.5rem;
    }
    #mobile-menu-btn {
        display: block !important;
    }
    .desktop-user-info {
        display: none !important;
    }
    nav#main-nav {
        display: none !important; /* schováno by default */
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--surface-border);
        margin-top: 0.5rem;
    }
    nav#main-nav.show {
        display: flex !important;
    }
    nav#main-nav a {
        margin-left: 0 !important;
        margin: 0;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        background: rgba(255,255,255,0.05);
        border-radius: 0.5rem;
    }
    nav#main-nav a:hover, nav#main-nav a.active {
        background: rgba(255,255,255,0.1);
    }
    main > div[style*="display: flex"] {
        flex-direction: column !important;
    }
    main > div[style*="display: flex"] > div.glass:first-child {
        width: 100% !important;
        min-height: auto !important;
    }
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap;
        width: 100% !important;
    }
    /* Ochrana FullCalendaru před globálním rozbitím tabulek na mobilu */
    .fc table {
        display: table !important;
        white-space: normal;
        width: 100% !important;
    }
    .timetable-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    td, th {
        white-space: nowrap;
    }
}

textarea.form-control {
    resize: vertical;
}

/* Ochrana proti roztahov�n� tabulek a box� dlouh�mi texty bez mezer */
td, p, div {
    word-break: break-word;
    overflow-wrap: break-word;
}

