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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    font-size: 16px;
}

/* Hlavní kontejner */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Clean Header */
.header {
    background: white;
    color: #1d1d1f;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e5e7;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Logo v hlavičce */
.header-logo {
    height: 60px;
    width: auto;
    border-radius: 4px;
}

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

.user-name {
    font-weight: 500;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Apple-style Navigace */
.nav {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(20px);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-links a {
    color: #1d1d1f;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-links a:hover,
.nav-links a.active {
    background: #007AFF;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}

/* Hlavní obsah */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Apple-style Formuláře */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Logo na přihlašovací stránce */
.login-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

/* Responzivní úpravy pro logo */
@media (max-width: 768px) {
    .login-logo {
        max-width: 220px;
    }

    .header-logo {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .login-logo {
        max-width: 180px;
    }

    .header-logo {
        height: 35px;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Tlačítka */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #8E8E93;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #6D6D70;
}

.btn-success {
    background: #34C759;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-success:hover {
    background: #28A745;
}

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

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

.btn-outline {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-outline:hover {
    background: #0056CC;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Kalendář */
.calendar-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.calendar-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B0000;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.week-view {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.week-view-daily {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.day-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.day-header-daily {
    background: #f8f9fa;
    color: #1d1d1f;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e5e7;
}

.calendar-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.day-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
}

.time-axis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem;
    position: relative;
}

.time-marker {
    font-size: 0.75rem;
    color: #86868b;
    font-weight: 500;
    text-align: center;
    min-width: 50px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.time-short {
    display: none;
}

.time-full {
    display: inline;
}

.time-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background-color: #86868b;
    border-radius: 1px;
}

.shifts-container {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 1rem;
}

.user-shifts-row {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin-bottom: 0.5rem;
    position: relative;
    height: 50px;
    width: 100%;
}

.user-shifts-row .shift-bar {
    margin: 0;
}

.shift-bar {
    position: relative;
    border-radius: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 50px;
    margin: 0.5rem 1rem;
}

.shift-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.shift-bar.unapproved {
    opacity: 0.7;
    position: relative;
}

.shift-bar.unapproved::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(0, 0, 0, 0.15) 4px,
        rgba(0, 0, 0, 0.15) 8px
    );
    border-radius: inherit;
    pointer-events: none;
}

/* Bílý text pro všechny směny */
.shift-bar .shift-name,
.shift-bar .shift-time {
    color: white;
    position: relative;
    z-index: 2;
}

.shift-editable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shift-editable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.shift-bar.approved .shift-edit-icon {
    margin-right: 1.5rem;
}

.shift-bar.approved::after {
    content: '✓';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.shift-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.shift-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.shift-name {
    font-weight: 600;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.shift-time {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.shift-edit-icon {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: auto;
    flex-shrink: 0;
}

/* Clean global settings */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    color: #1d1d1f;
}

.main-content {
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
    padding: 1.5rem 0;
}

.calendar-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.calendar-title {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}



.time-slot {
    background-color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    border-right: 1px solid #ddd;
}

.day-header {
    background-color: #8B0000;
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: bold;
}

.day-column {
    background-color: white;
    min-height: 50px;
    position: relative;
    padding: 0.25rem;
}

/* Směny */
.shift {
    background-color: #4A90E2;
    color: white;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem 0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
    position: relative;
}

.shift.unapproved {
    opacity: 0.6;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.3) 2px,
        rgba(255,255,255,0.3) 4px
    );
}

.shift.approved::after {
    content: '✓';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
}

.shift:hover {
    opacity: 0.8;
}

/* Admin filtr pro masérky */
.admin-filter {
    position: relative;
    display: inline-block;
}

.user-filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    min-width: 200px;
    z-index: 100;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.filter-option {
    display: block;
    padding: 0.5rem 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option input[type="checkbox"] {
    margin-right: 0.5rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.close {
    color: #8E8E93;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    color: #1d1d1f;
    background: #f0f0f0;
}

/* Zprávy */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responzivní design */

/* Střední obrazovky - přechod na krátký formát */
@media (max-width: 600px) {
    .time-short {
        display: inline;
    }

    .time-full {
        display: none;
    }

    .time-marker {
        min-width: 32px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calendar-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .calendar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .week-view {
        grid-template-columns: 60px repeat(7, 1fr);
        font-size: 0.75rem;
    }

    .week-view-daily {
        gap: 1rem;
    }

    .day-header-daily {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .day-timeline {
        padding: 1.5rem;
        gap: 1rem;
    }

    .time-axis {
        padding: 0.75rem 0.5rem;
        flex-wrap: nowrap;
        gap: 0;
        overflow-x: visible;
        justify-content: space-between;
    }

    .time-marker {
        font-size: 0.65rem;
        min-width: 30px;
        flex-shrink: 0;
    }

    .time-short {
        display: inline;
    }

    .time-full {
        display: none;
    }

    .shifts-container {
        gap: 0.5rem;
    }

    .shift-bar {
        height: 50px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .shift-name {
        font-size: 0.9rem;
    }

    .shift-time {
        font-size: 0.8rem;
    }

    .shift-edit-icon {
        font-size: 0.7rem;
    }

    .calendar-container {
        border-radius: 16px;
        margin: 0 0.5rem;
        padding: 1.5rem;
    }

    .day-section {
        border-radius: 16px;
    }

    .day-header-daily {
        border-radius: 16px 16px 0 0;
    }

    .day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }

    .shift {
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1rem;
        width: 95%;
    }
    
    .form-container {
        margin: 1rem auto;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .week-view {
        grid-template-columns: 50px repeat(7, 1fr);
    }

    .week-view-daily {
        gap: 0.75rem;
    }

    .day-header-daily {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .time-axis {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .time-marker {
        font-size: 0.6rem;
        min-width: 30px;
    }

    .day-timeline {
        padding: 1rem;
        gap: 0.75rem;
    }

    .time-axis {
        padding: 0.5rem 0.25rem;
        overflow-x: visible;
        justify-content: space-between;
        gap: 0;
        flex-wrap: nowrap;
    }

    .time-marker {
        font-size: 0.6rem;
        min-width: 25px;
        flex-shrink: 0;
        text-align: center;
    }

    .time-short {
        display: inline;
    }

    .time-full {
        display: none;
    }

    .time-marker::after {
        bottom: -6px;
        width: 1px;
        height: 4px;
    }

    .shifts-container {
        gap: 0.4rem;
    }

    .shift-bar {
        height: 45px;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .shift-name {
        font-size: 0.8rem;
    }

    .shift-time {
        font-size: 0.75rem;
    }

    .shift-edit-icon {
        font-size: 0.65rem;
    }

    .calendar-container {
        margin: 0 0.25rem;
        border-radius: 12px;
        padding: 1rem;
    }

    .day-section {
        border-radius: 12px;
    }

    .day-header-daily {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 12px 12px 0 0;
    }

    .time-slot {
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    .shift {
        font-size: 0.5rem;
        padding: 0.1rem 0.2rem;
    }
}

/* Extra malé obrazovky */
@media (max-width: 360px) {
    .time-axis {
        padding: 0.4rem 0.1rem;
    }

    .time-marker {
        font-size: 0.55rem;
        min-width: 20px;
        padding: 0;
    }

    .time-short {
        display: inline;
    }

    .time-full {
        display: none;
    }

    .time-marker::after {
        display: none;
    }

    .day-timeline {
        padding: 0.75rem;
    }

    .calendar-container {
        padding: 1rem;
        margin: 0 0.1rem;
    }
}

/* Utility třídy */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
