/* Plik: css/style.css */
/* Wersja dostarczona przez użytkownika z dodanymi stylami dla kolumn w modalu lotu */

/* --- Definicja własnej czcionki --- */
@font-face {
  font-family: 'Ambit'; /* Upewnij się, że plik czcionki jest dostępny w ../fonts/ */
  src: url('../fonts/ambit-regular.woff2') format('woff2'); /* Upewnij się, że nazwa pliku jest poprawna */
  font-weight: normal; font-style: normal; font-display: swap;
}

/* --- Zaktualizowane Zmienne Kolorystyczne i Typograficzne (Styl TUI) --- */
:root {
    /* Główne kolory TUI */
    --tui-blue: #0d4e8b;        /* Główny niebieski */
    --tui-blue-light: #009edb;   /* Jasny niebieski (akcenty, linki) */
    --tui-red: #da1a30;          /* Czerwony (logo, ważne akcenty) */
    --tui-yellow: #ffda00;       /* Żółty (akcenty) */
    --tui-yellow-darker: #e6c300;/* Ciemniejszy żółty */

    /* Szarości TUI */
    --tui-gray-background: #f8f9fa; /* Bardzo jasne tło strony */
    --tui-gray-light: #f0f1f2;    /* Jasne tło elementów, separatory */
    --tui-gray-medium: #d9dadd;   /* Średnia szarość (ramki) */
    --tui-gray-dark: #6c757d;     /* Ciemniejszy szary (drugorzędny tekst) */
    --tui-text: #1a2b48;          /* Główny kolor tekstu (ciemny granat/szary) */

    /* Kolory semantyczne */
    --tui-green: #00a050;
    --tui-orange-warning: #f0ad4e;
    --tui-orange-warning-darker: #ec971f;

    /* Typografia */
    --font-family-sans: 'Ambit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-display: var(--font-family-sans);
    --base-font-size: 16px;
    --base-line-height: 1.6; /* Zwiększona dla czytelności */

    /* Inne */
    --border-radius-sm: 3px; /* Subtelne zaokrąglenia */
    --border-radius-md: 6px;
    --box-shadow-light: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.12); /* Subtelny cień */
    --box-shadow-medium: 0 3px 6px rgba(0,0,0,0.1), 0 3px 6px rgba(0,0,0,0.15);

    /* Zmienne dla Kalendarza - mogą pozostać lub być dostosowane */
    --calendar-day-min-height: 175px;
    --calendar-day-mobile-min-height: 125px;
}

/* --- Globalne Style (Styl TUI) --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-font-size); }
body {
    font-family: var(--font-family-sans);
    margin: 0;
    padding: 0;
    background-color: var(--tui-gray-background);
    color: var(--tui-text);
    line-height: var(--base-line-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 {
    line-height: 1.3;
    font-weight: 600; /* Pogrubione nagłówki */
    color: var(--tui-blue); /* Niebieskie */
    font-family: var(--font-family-display); /* Czcionka dla nagłówków */
}
h1 { font-size: 1.8em; margin-bottom: 25px; text-align: center; } /* Wyśrodkowany główny tytuł */
h2 { font-size: 1.5em; margin-bottom: 20px; }
h3 { font-size: 1.2em; margin-bottom: 15px; }
a { color: var(--tui-blue-light); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--tui-blue); }

/* --- Kontenery i Układ --- */
.header-container, .main-content, footer > .container {
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Nagłówek (Styl TUI) --- */
.main-header { background-color: #fff; border-bottom: 1px solid var(--tui-gray-medium); padding: 10px 0; position: sticky; top: 0; z-index: 1000; box-shadow: var(--box-shadow-light); }
.main-header .header-container { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.logo-container { order: 1; flex-shrink: 0;}
.logo-container a { display: block; }
.logo-container .logo { height: 30px; width: auto; display: block; }
.header-icons-group { display: flex; align-items: center; gap: 18px; order: 2; margin-left: auto; margin-right: 15px; }
.header-icon a { color: var(--tui-gray-dark); font-size: 1.5em; text-decoration: none; display: block; position: relative; padding: 5px; transition: color 0.2s ease; }
.header-icon a:hover { color: var(--tui-blue); }
.header-icon a.active-icon { color: var(--tui-blue); }
.messages-icon { position: relative; }
.message-badge { position: absolute; top: -2px; right: -5px; background-color: var(--tui-red); color: white; border-radius: 50%; min-width: 18px; height: 18px; padding: 0 4px; font-size: 0.7em; line-height: 18px; text-align: center; font-weight: bold; display: none; transform: translate(40%, -40%); pointer-events: none; }
.message-badge.visible { display: block; }
.time-date-container { order: 3; margin-right: 15px; text-align: right; font-size: 0.85em; color: var(--tui-gray-dark); display: none; white-space: nowrap; }
#current-time { font-weight: 600; display: inline-block; margin-right: 8px; }
#current-date { display: inline-block; }
.user-info { order: 4; display: flex; align-items: center; gap: 10px; text-align: right; flex-shrink: 0; white-space: nowrap; }
.header-profile-pic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tui-gray-medium); }
.user-info .user-text { display: flex; flex-direction: column; align-items: flex-end; }
.user-info .user-name { font-weight: 600; display: block; font-size: 0.9em; line-height: 1.1; }
.user-info .user-details { font-size: 0.75em; color: var(--tui-gray-dark); display: block; line-height: 1.1; }
.logout-container { order: 5; flex-shrink: 0; display: none; }
.logout-container .btn span { display: inline; }
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--tui-blue); padding: 5px; order: 6; }
.mobile-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: #fff; border-top: 1px solid var(--tui-gray-medium); box-shadow: 0 6px 12px rgba(0,0,0,0.1); padding: 20px; z-index: 999; }
.mobile-nav.active { display: block; }
.mobile-user-info { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--tui-gray-light); display: flex; align-items: center; gap: 10px; text-align: left; }
.mobile-user-info .header-profile-pic { width: 38px; height: 38px; flex-shrink: 0; }
.mobile-user-info .user-text { display: flex; flex-direction: column; align-items: flex-start; }
.mobile-user-info .user-name { font-size: 1em; } .mobile-user-info .user-details { font-size: 0.85em; }
.mobile-nav .time-date-container { display: block; text-align: center; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--tui-gray-light); font-size: 0.9em; }
.mobile-nav .time-date-container span { display: block; } #mobile-current-time { font-weight: 600; }
.mobile-nav-item { padding: 12px 0; border-bottom: 1px solid var(--tui-gray-light);}
.mobile-nav-item:last-of-type { border-bottom: none;}
.mobile-nav-item a { text-decoration: none; color: var(--tui-blue); display: block; padding: 8px 0;}
.mobile-nav-item a i { margin-right: 10px; width: 20px; text-align: center;}
.mobile-nav-item.active a { font-weight: bold; background-color: var(--tui-gray-light); }
.mobile-nav-item .badge { display: inline-block; background-color: var(--tui-red); color: white; border-radius: 10px; padding: 2px 7px; font-size: 0.8em; line-height: 1; margin-left: 8px; vertical-align: middle; }
.mobile-nav .language-switcher { display: block; order: 5; margin: 15px 0; padding: 15px 0; border-top: 1px solid var(--tui-gray-light); border-bottom: 1px solid var(--tui-gray-light); text-align: center;}
.mobile-nav .btn-logout-mobile { display: block; width: 100%; margin-top: 10px; order: 6; }

/* --- Przyciski (Styl TUI) --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; padding: 10px 24px; border: 1px solid transparent; border-radius: var(--border-radius-sm); cursor: pointer; text-decoration: none; font-size: 0.95em; font-weight: 600; font-family: var(--font-family-sans); transition: all 0.2s ease; text-align: center; line-height: 1.4; white-space: nowrap; box-shadow: var(--box-shadow-light); }
.btn i { margin-right: 0.5em; line-height: inherit; vertical-align: middle;}
.btn-primary { background-color: var(--tui-blue); color: white; border-color: var(--tui-blue); }
.btn-primary:hover { background-color: #0a406d; border-color: #0a406d; box-shadow: var(--box-shadow-medium); }
.btn-secondary { background-color: white; color: var(--tui-blue); border: 1px solid var(--tui-gray-medium); }
.btn-secondary:hover { background-color: var(--tui-gray-light); border-color: var(--tui-blue); box-shadow: var(--box-shadow-medium); }
.btn-logout, .btn-logout-mobile, .btn-danger { background-color: var(--tui-red); color: white; border-color: var(--tui-red); }
.btn-logout:hover, .btn-logout-mobile:hover, .btn-danger:hover { background-color: #b91727; border-color: #b91727; box-shadow: var(--box-shadow-medium); }
.btn.btn-warning, button#ack-change-btn.btn.btn-warning { background-color: var(--tui-yellow) !important; color: var(--tui-text) !important; border-color: var(--tui-yellow) !important; }
.btn.btn-warning:hover, button#ack-change-btn.btn.btn-warning:hover { background-color: var(--tui-yellow-darker) !important; border-color: var(--tui-yellow-darker) !important; box-shadow: var(--box-shadow-medium); }
.btn .fa-spin { margin-right: 0.5em; animation: spin 1s linear infinite; }
.btn-pdf { background-color: white; color: var(--tui-blue); border: 1px solid var(--tui-gray-medium); padding: 8px 15px; font-size: 0.85em; }
.btn-pdf:hover { background-color: var(--tui-gray-light); border-color: var(--tui-blue); box-shadow: var(--box-shadow-medium); }
.btn-pdf i { margin-right: 6px; }

/* --- Główna zawartość --- */
.main-content { padding-top: 30px; padding-bottom: 60px; }
.main-content h1 { text-align: center; }

/* --- Style dla strony Pracowników --- */
.employee-list-container { background-color: #fff; padding: 20px; border-radius: var(--border-radius-md); box-shadow: var(--box-shadow-light); border: 1px solid var(--tui-gray-medium); }
.search-container { margin-bottom: 20px; }
.form-control-search { width: 100%; padding: 10px 15px; font-size: 0.95em; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-sm); box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
.form-control-search:focus { border-color: var(--tui-blue-light); outline: 0; box-shadow: 0 0 0 0.2rem rgba(0, 158, 219, 0.25); }
.employee-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.employee-table th, .employee-table td { text-align: left; padding: 10px 15px; border-bottom: 1px solid var(--tui-gray-light); }
.employee-table th { background-color: transparent; color: var(--tui-text); font-weight: 600; text-transform: none; font-size: 0.9em; letter-spacing: normal; border-bottom: 2px solid var(--tui-gray-medium); }
.employee-table tbody tr { cursor: pointer; transition: background-color 0.2s ease; }
.employee-table tbody tr:hover { background-color: var(--tui-gray-light); }
.employee-table tbody tr:last-child td { border-bottom: none; }
#no-employee-results { color: var(--tui-gray-dark); padding: 15px; text-align: center; font-style: italic; }

/* --- Kontrolki Kalendarza (Styl TUI) --- */
.calendar-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 10px 0; background-color: transparent; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--tui-gray-medium); }
.calendar-controls h2 { margin: 0 20px; color: var(--tui-blue); font-family: var(--font-family-display); font-size: 1.4em; font-weight: 600; text-align: center; flex-grow: 1; white-space: nowrap; }
.calendar-controls button, .calendar-controls .btn-pdf { flex-shrink: 0; }
.calendar-controls button span { display: inline; }

/* --- Sekcja Podsumowania Kalendarza --- */
.calendar-summary { display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; background-color: var(--tui-gray-light); padding: 15px 10px; border-radius: var(--border-radius-md); box-shadow: none; margin-bottom: 30px; border: none; }
.summary-item { text-align: center; padding: 10px 15px; flex-basis: 150px; flex-grow: 1; }
.summary-label { display: block; font-size: 0.8em; color: var(--tui-gray-dark); margin-bottom: 3px; text-transform: none; letter-spacing: normal; }
.summary-value { display: block; font-size: 1.4em; font-weight: 600; color: var(--tui-blue); line-height: 1.1; }

/* --- Kalendarz (Styl TUI) --- */
.calendar-container { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; border: 1px solid var(--tui-gray-medium); background-color: var(--tui-gray-medium); border-radius: var(--border-radius-md); overflow: hidden; position: relative; box-shadow: var(--box-shadow-light); }
.calendar-day { background-color: #fff; min-height: var(--calendar-day-min-height); padding: 8px; position: relative; display: flex; flex-direction: column; transition: background-color 0.2s ease; border: none; }
.calendar-day.empty { background-color: var(--tui-gray-background); opacity: 0.7; }
.calendar-day.today { background-color: #fff9e6; }
.calendar-day.today .day-number { color: var(--tui-red); background-color: transparent; border: 1px solid var(--tui-red); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; justify-content: center; align-items: center; padding: 0; font-weight: 700; font-size: 0.8em; }
.day-number { font-weight: 600; text-align: right; font-size: 0.8em; color: var(--tui-gray-dark); margin-bottom: 5px; align-self: flex-end; padding: 2px 4px; flex-shrink: 0; }
.schedule-entries-list { list-style: none; padding: 0; margin: 0; flex-grow: 1; overflow: hidden; -ms-overflow-style: none; scrollbar-width: none; }
.schedule-entries-list::-webkit-scrollbar { display: none; }
.flight-summary, .standby-summary, .training-summary { position:relative; color: white; padding: 4px 8px; border-radius: var(--border-radius-sm); margin-bottom: 4px; cursor: pointer; transition: filter 0.2s ease, box-shadow 0.2s ease; white-space: nowrap; text-overflow: ellipsis; display: block; font-size: 0.8em; font-weight: 400; box-shadow: none; border: 1px solid rgba(0,0,0,0.1); }
.flight-summary:hover, .standby-summary:hover, .training-summary:hover { filter: brightness(110%); }
.flight-summary { background-color: var(--tui-blue-light); border-color: var(--tui-blue); }
.standby-summary { background-color: var(--tui-yellow); color: var(--tui-text); border-color: var(--tui-yellow-darker);}
.training-summary { background-color: var(--tui-green); color: white; border-color: var(--tui-green); }
.flight-summary.needs-ack { padding-left: 24px; background-color: var(--tui-orange-warning); border-color: var(--tui-orange-warning-darker); color: white; }
.needs-ack-icon { color: white; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font-size: 1.1em; line-height: 1; text-shadow: none; }

/* --- Style dla Widoku Listy (Mobile) --- */
.calendar-list-view { display: none; margin-top: 20px; }
.list-day-group { background-color: #fff; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-md); margin-bottom: 15px; box-shadow: var(--box-shadow-light); overflow: hidden; }
.list-day-header { background-color: var(--tui-gray-light); padding: 10px 15px; font-weight: 600; color: var(--tui-blue); border-bottom: 1px solid var(--tui-gray-medium); font-size: 1em; }
.list-events-for-day { list-style: none; padding: 0; margin: 0; }
.list-event-item { padding: 10px 15px; border-bottom: 1px solid var(--tui-gray-light); display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background-color 0.2s ease; }
.list-event-item:last-child { border-bottom: none; }
.list-event-item:hover { background-color: var(--tui-gray-light); }
.list-event-item .flight-summary, .list-event-item .standby-summary, .list-event-item .training-summary { padding: 6px 10px; font-size: 0.85em; flex-grow: 1; margin-bottom: 0; box-shadow: none; white-space: normal; text-overflow: clip; }
.list-event-item .needs-ack-icon { font-size: 1.1em; position: static; transform: none; margin-right: 8px; text-shadow: none; color: var(--tui-orange-warning-darker); flex-shrink: 0; }
.list-day-group.no-events-for-day .list-day-header { border-bottom: none; }
.list-day-group.no-events-for-day .list-events-for-day { display: none; }
.no-events-placeholder { padding: 10px 15px; font-style: italic; color: var(--tui-gray-dark); font-size: 0.9em; }

/* --- Modal (Styl TUI) --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(26, 43, 72, 0.8); animation: fadeIn 0.3s; }
.modal-content { background-color: #fff; margin: 5% auto; padding: 0; border: none; width: 90%; max-width: 700px; border-radius: var(--border-radius-md); position: relative; animation: slideIn 0.3s; box-shadow: var(--box-shadow-medium); overflow: hidden; }
.modal-header { background-color: var(--tui-blue); color: white; padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2, #employee-modal-title { color: white; margin: 0; padding: 0; border: none; font-size: 1.3em; font-weight: 600; font-family: var(--font-family-display); }
.close-modal-btn { color: white; position: static; font-size: 28px; font-weight: normal; cursor: pointer; line-height: 1; opacity: 0.8; transition: opacity 0.2s ease; }
.close-modal-btn:hover, .close-modal-btn:focus { color: white; opacity: 1; text-decoration: none; }
.modal-body { padding: 25px; min-height: 100px; position: relative; line-height: var(--base-line-height); }
.modal-body h3 { color: var(--tui-blue); margin-top: 25px; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--tui-gray-light); font-size: 1.1em; font-weight: 600; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body hr { border: none; border-top: 1px solid var(--tui-gray-light); margin: 25px 0; }

/* --- Style dla wizualizacji lotu --- */
.flight-path-visualization { display: flex; align-items: stretch; justify-content: space-between; padding: 20px 0 10px 0; margin-bottom: 15px; position: relative; }
.flight-point { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 80px; flex-shrink: 0; }
.flight-point.departure { align-items: flex-start; text-align: left; }
.flight-point.arrival { align-items: flex-end; text-align: right; }
.airport-code { font-size: 1.4em; font-weight: 600; color: var(--tui-blue); line-height: 1.1; }
.airport-time { font-size: 1.1em; font-weight: 600; color: var(--tui-text); margin-top: 3px; }
.flight-path-line { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 0 15px; position: relative; min-height: 50px; margin-top: 5px; }
.flight-path-line .line { flex-grow: 1; height: 2px; background-color: var(--tui-gray-medium); }
.flight-path-line .dot { width: 16px; height: 16px; background-color: var(--tui-gray-medium); border-radius: 50%; flex-shrink: 0; }
.flight-path-line .flight-icon { font-size: 1.4em; color: var(--tui-blue); margin: 0 10px; flex-shrink: 0; }
.flight-duration { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); font-size: 0.85em; color: var(--tui-gray-dark); background-color: #fff; padding: 0 5px; white-space: nowrap; }

/* === NOWE STYLE: Układ dwukolumnowy dla szczegółów lotu === */
.flight-info-columns {
    display: grid; /* Użyjemy siatki */
    grid-template-columns: 1fr 1fr; /* Dwie równe kolumny */
    gap: 15px 25px; /* Odstęp pionowy i poziomy */
    margin-bottom: 20px;
}
.info-col div {
    margin-bottom: 8px; /* Odstęp między elementami w kolumnie */
    font-size: 0.95em;
}
.info-col strong { /* Styl etykiet */
    color: var(--tui-gray-dark);
    display: block; /* Etykieta w osobnej linii */
    margin-bottom: 3px; /* Mały odstęp pod etykietą */
    font-weight: 400; /* Zwykła waga */
    font-size: 0.85em;
}
/* --- KONIEC STYLI DLA KOLUMN --- */

/* Lista Załogi - bez zmian */
.crew-list { list-style: none; padding-left: 0; margin-top: 10px; }
.crew-member-item { display: flex; align-items: center; padding: 10px 5px; border-bottom: 1px solid var(--tui-gray-light); font-size: 0.9em; cursor: pointer; transition: background-color 0.2s ease; border-radius: 0; }
.crew-member-item:last-child { border-bottom: none; }
.crew-member-item:hover { background-color: var(--tui-gray-light); }
.crew-member-item .crew-position { font-weight: 600; color: var(--tui-text); min-width: 50px; margin-right: 10px; flex-shrink: 0; }
.crew-member-item .crew-name { flex-grow: 1; color: var(--tui-text); font-weight: 400; }
.crew-member-item .crew-code { font-size: 0.9em; color: var(--tui-gray-dark); margin-left: 15px; background-color: transparent; padding: 0; white-space: nowrap; flex-shrink: 0; }

/* Alert zmiany lotu - bez zmian */
.change-alert { display: flex; flex-direction: column; align-items: flex-start; background-color: #fff9e6; border: 1px solid var(--tui-yellow-darker); color: #594a00; padding: 15px; margin-bottom: 20px; border-radius: var(--border-radius-sm); }
.change-alert p { margin: 0 0 10px 0; font-weight: 500; white-space: normal; width: 100%; }
.change-alert p i { margin-right: 8px; color: var(--tui-yellow-darker); }
.change-alert button#ack-change-btn { margin-top: 10px; align-self: flex-end; width: auto; }
.change-alert .ack-error { color: var(--tui-red); font-size: 0.9em; margin-top: 10px; font-weight: bold; width: 100%; }

/* Styl dla informacji dodatkowych/opisu - bez zmian */
.modal-body .additional-info, .modal-body .training-description, .modal-body .standby-info { margin-top: 20px; font-size: 0.95em; background-color: var(--tui-gray-light); padding: 15px; border-radius: var(--border-radius-sm); }
.modal-body .additional-info h3, .modal-body .training-description h3, .modal-body .standby-info h3 { margin-top: 0; margin-bottom: 8px; font-size: 1em; }
.modal-body .additional-info p, .modal-body .training-description p, .modal-body .standby-info p { margin: 0; white-space: pre-wrap; }
.modal-body .additional-info em, .modal-body .training-description em, .modal-body .standby-info em { color: var(--tui-gray-dark); font-style: normal; }

/* Modal Pracownika - bez zmian */
#employee-details-modal .modal-content h2 { color: white; }
.employee-modal-grid { display: grid; grid-template-columns: 150px 1fr; gap: 25px; align-items: flex-start; }
.employee-modal-photo .profile-picture.large-profile-pic { width: 150px; height: 150px; border-radius: var(--border-radius-md); border: 2px solid var(--tui-gray-medium); object-fit: cover; margin: 0 auto; }
.employee-modal-info h3 { font-size: 1.1em; color: var(--tui-blue); margin-top: 0; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--tui-gray-light); }
.employee-modal-info h3:not(:first-of-type) { margin-top: 20px; }
.employee-modal-info p { margin: 0 0 8px 0; font-size: 0.95em; line-height: 1.4; }
.employee-modal-info p strong { font-weight: 600; color: var(--tui-gray-dark); display: inline-block; width: 150px; margin-right: 5px; }

/* --- Style dla Listy Wiadomości (bez zmian) --- */
.message-list-container { background-color: #fff; border-radius: var(--border-radius-md); box-shadow: var(--box-shadow-light); border: 1px solid var(--tui-gray-medium); overflow: hidden; padding: 10px 0; }
.message-list { list-style: none; padding: 0; margin: 0; }
.message-item { border-bottom: 1px solid var(--tui-gray-light); padding: 15px 20px; display: flex; align-items: center; gap: 15px; transition: background-color 0.2s ease; }
.message-item:last-child { border-bottom: none; }
.message-item:hover { background-color: var(--tui-gray-light); }
.message-item.unread { font-weight: 600; background-color: #fff9e6; }
.message-item a { text-decoration: none; color: inherit; display: flex; flex-grow: 1; align-items: center; gap: 15px;}
.message-icon { font-size: 1.2em; color: var(--tui-gray-dark); flex-shrink: 0; width: 25px; text-align: center;}
.message-item.unread .message-icon { color: var(--tui-blue); }
.message-details { flex-grow: 1; }
.message-subject { display: block; margin-bottom: 4px; font-size: 1.05em; color: var(--tui-text); }
.message-date { font-size: 0.8em; color: var(--tui-gray-dark); }
.message-item.unread .message-subject { color: var(--tui-blue); font-weight: 600; }
.no-messages { padding: 25px; text-align: center; color: var(--tui-gray-dark); background-color: #fff; border-radius: var(--border-radius-md); box-shadow: var(--box-shadow-light);}
.message-content-view { background-color: #fff; padding: 30px; border-radius: var(--border-radius-md); box-shadow: var(--box-shadow-light); margin-top: 20px;}
.message-header { margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--tui-gray-medium); }
.message-header h1 { margin-top: 0; margin-bottom: 8px; font-size: 1.8em; color: var(--tui-blue); }
.message-date-view { font-size: 0.9em; color: var(--tui-gray-dark); }
.message-body { margin-top: 25px; line-height: 1.7; white-space: pre-wrap; }
.back-link { display: inline-flex; align-items: center; margin-top: 30px; color: var(--tui-blue-light); text-decoration: none; font-size: 1em; font-weight: 500;}
.back-link:hover { text-decoration: underline; color: var(--tui-blue); }
.back-link i { margin-right: 6px; }

/* --- Style dla formularza Konta (bez zmian) --- */
#account-form { background-color: transparent; box-shadow: none; padding: 0; }
.account-grid { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: flex-start; }
.account-column fieldset { border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-md); margin-bottom: 25px; padding: 25px; background-color: #fff; box-shadow: var(--box-shadow-light); }
.account-column legend { font-weight: 600; color: var(--tui-blue); padding: 0 0 10px 0; font-size: 1.3em; margin-bottom: 20px; border-bottom: 1px solid var(--tui-gray-light); width: 100%; }
#account-form label { display: block; margin-bottom: 6px; color: var(--tui-gray-dark); font-weight: 400; font-size: 0.9em; }
#account-form input[type="tel"], #account-form input[type="file"] { width: 100%; padding: 10px 12px; margin-bottom: 18px; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-sm); box-sizing: border-box; font-size: 1em; transition: border-color 0.2s ease; }
#account-form input[type="tel"]:focus { border-color: var(--tui-blue-light); outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 158, 219, 0.25); }
.readonly-data { background-color: var(--tui-gray-light); padding: 10px 12px; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-sm); margin-bottom: 18px; font-size: 1em; color: var(--tui-text); min-height: 41px; display: flex; align-items: center; word-break: break-word; }
.account-save-btn { grid-column: 2 / 3; justify-self: start; margin-top: 10px; width: auto; }
.profile-pic-column fieldset { text-align: center; }
.profile-picture-container { margin-bottom: 15px; width: 150px; height: 150px; margin: 0 auto 15px auto; border-radius: 50%; overflow: hidden; border: 3px solid var(--tui-gray-medium); background-color: var(--tui-gray-light); }
.profile-picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-input-label { display: inline-block; width: auto; margin-top: 10px; cursor: pointer; }
input[type="file"]#profile_picture { width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }
#account-form small { display: block; font-size: 0.8em; color: var(--tui-gray-dark); margin-top: -10px; margin-bottom: 10px; }

/* --- Alerty (bez zmian) --- */
.alert { padding: 15px 20px; margin-bottom: 20px; border: 1px solid transparent; border-radius: var(--border-radius-sm); font-size: 0.95em; }
.alert-danger, .error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; padding: 12px 18px; margin: 15px auto; max-width: 800px; text-align: left; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
.alert-success, .success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; padding: 12px 18px; margin: 15px auto; max-width: 800px; text-align: left; }

/* --- Spinner ładowania (bez zmian) --- */
.loading-spinner { border: 4px solid var(--tui-gray-light); border-top: 4px solid var(--tui-blue); border-radius: 50%; width: 35px; height: 35px; animation: spin 1s linear infinite; margin: 20px auto; }
.calendar-container .loading-spinner, .modal-body .loading-spinner { position: relative; top: 0; left: 0; transform: none; margin: 60px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-25px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- Stopka (bez zmian) --- */
footer { text-align: center; margin-top: 50px; padding: 25px 0; font-size: 0.85em; color: var(--tui-gray-dark); border-top: 1px solid var(--tui-gray-medium); background-color: #fff; }
.footer-system-info { font-size: 0.95em; color: var(--tui-gray-dark); margin-bottom: 8px; margin-top: 0; }
footer p { margin: 5px 0; }

/* --- Przełącznik Języka (bez zmian) --- */
.language-switcher { margin-top: 15px; font-size: 0.9em; }
.language-switcher a { color: var(--tui-blue-light); text-decoration: none; margin: 0 6px; padding: 4px 8px; border-radius: var(--border-radius-sm); transition: background-color 0.2s ease, color 0.2s ease; }
.language-switcher a.active { font-weight: bold; background-color: var(--tui-blue); color: white; }
.language-switcher a:not(.active):hover { background-color: var(--tui-gray-light); text-decoration: none; }
footer .desktop-lang-switcher { display: block; }
footer .mobile-lang-switcher { display: none; }
.mobile-nav .language-switcher { display: block; }


/* --- Responsywność --- */
@media (min-width: 769px) {
    .calendar-container { display: grid; }
    .calendar-list-view { display: none; }
    .time-date-container { display: block; }
    .logout-container { display: block; }
    .mobile-menu-toggle { display: none; }
    .mobile-nav { display: none !important; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .header-container, .main-content, footer > .container { padding: 0 15px; }
    .main-header .header-container { position: relative; justify-content: center; padding-top: 10px; padding-bottom: 10px; }
    .user-info, .time-date-container, .logout-container, .header-icons-group { display: none; }
    .logo-container { margin: 0; }
    .mobile-menu-toggle { display: block; position: absolute; top: 50%; right: 15px; transform: translateY(-50%); }
    .main-content h1 { font-size: 1.5em; margin-bottom: 20px;}
    .calendar-controls button span { display: none; }
    .calendar-controls button i { margin: 0; }
    .calendar-controls button, .calendar-controls .btn-pdf { padding: 8px 10px; font-size: 0.9em; }
    .calendar-controls h2 { font-size: 1.1em; margin: 5px 0; }
    .calendar-controls { gap: 10px; }
    .calendar-summary { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px;}
    .summary-item { padding: 6px 0; border-bottom: 1px solid var(--tui-gray-light); }
    .summary-item:last-child { border-bottom: none; }
    .summary-label { font-size: 0.75em; margin-bottom: 2px;}
    .summary-value { font-size: 1.1em; }
    .calendar-container { display: none; }
    .calendar-list-view { display: block; }
    .list-event-item .needs-ack-icon { font-size: 1em; margin-right: 6px; }
    .message-item { padding: 12px 15px; gap: 10px; }
    .message-subject { font-size: 1em; } .message-date { font-size: 0.8em; }
    .message-icon { font-size: 1.1em; width: 25px;}
    .message-content-view { padding: 20px; }
    .message-header h1 { font-size: 1.4em; } .back-link { margin-top: 20px;}

    /* Modale na mobile */
    .modal-content { width: 95%; margin: 8% auto; padding: 0; }
    .modal-header { padding: 12px 15px; }
    .modal-header h2, #employee-modal-title { font-size: 1.1em; }
    .close-modal-btn { font-size: 24px; }
    .modal-body { padding: 15px; }
    .modal-body h3 { font-size: 1.05em; margin-bottom: 10px;}
    .crew-list li, .info-col div, .flight-details-grid div, .modal-body p { font-size: 0.9em; }
    .change-alert button#ack-change-btn { align-self: center; width: 100%; margin-top: 15px; }
    /* Kolumny w modalu lotu na mobile */
    .flight-info-columns { grid-template-columns: 1fr; gap: 10px 0; } /* Jedna kolumna */
    /* Wizualizacja lotu na mobile */
    .flight-path-visualization { flex-direction: column; align-items: center; padding: 10px 0; }
    .flight-point { min-width: auto; width: 100%; }
    .flight-point.departure, .flight-point.arrival { align-items: center; text-align: center; }
    .flight-path-line { width: 80%; min-height: 30px; padding: 5px 0; margin: 5px 0; }
    .flight-duration { bottom: -8px; }

    /* Logowanie na mobile */
    .login-container { width: 90%; padding: 25px;}
    .login-logo { max-width: 130px; }
    .login-lang-switcher a { font-size: 0.9em; padding: 3px 5px;}

    /* Stopka na mobile */
    footer .desktop-lang-switcher { display: none; }

    /* Formularz konta na mobile */
    .account-grid { grid-template-columns: 1fr; }
    .profile-pic-column { order: -1; }
    #account-form fieldset { padding: 15px; }
    .account-save-btn { width: 100%; justify-self: stretch; grid-column: 1 / 2; }

    /* Lista pracowników na mobile */
    .form-control-search { font-size: 0.95em; padding: 10px; }
    .employee-table thead { display: none; }
    .employee-table, .employee-table tbody, .employee-table tr, .employee-table td { display: block; width: 100%; }
    .employee-table tr { margin-bottom: 15px; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-sm); padding: 10px; background-color: #fff; }
    .employee-table td { text-align: right; padding-left: 50%; position: relative; border-bottom: 1px dotted var(--tui-gray-light); padding-top: 8px; padding-bottom: 8px; }
    .employee-table td:last-child { border-bottom: none; }
    .employee-table td::before { content: attr(data-label); position: absolute; left: 10px; width: calc(50% - 20px); padding-right: 10px; font-weight: 600; text-align: left; color: var(--tui-text); }

    /* Modal pracownika na mobile */
    .employee-modal-grid { grid-template-columns: 1fr; text-align: center; }
    .employee-modal-photo .profile-picture.large-profile-pic { margin-bottom: 20px; }
    .employee-modal-info p strong { width: auto; display: block; margin-bottom: 3px; text-align: left; }
    .employee-modal-info p { text-align: left; }
}

/* --- Style dla strony logowania (Styl TUI) --- */
.login-page { background-image: none; background-color: var(--tui-gray-background); margin: 0 !important; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.login-container { background-color: white; padding: 30px 40px; border-radius: var(--border-radius-md); box-shadow: var(--box-shadow-medium); text-align: center; width: 100%; max-width: 400px; }
.login-logo { max-width: 130px; margin-bottom: 20px; }
.login-container h1 { font-size: 1.4em; margin-bottom: 15px; }
.login-container p { font-size: 0.85em; color: var(--tui-gray-dark); text-align: left; line-height: 1.5; margin-bottom: 20px; }
.login-form .form-group { margin-bottom: 15px; text-align: left; }
.login-form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9em; color: var(--tui-text); }
.login-form input[type="text"], .login-form input[type="password"] { width: 100%; padding: 12px 15px; border: 1px solid var(--tui-gray-medium); border-radius: var(--border-radius-sm); box-sizing: border-box; font-size: 1em; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.login-form input[type="text"]:focus, .login-form input[type="password"]:focus { border-color: var(--tui-blue-light); outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 158, 219, 0.25); }
.login-form .btn { width: 100%; padding: 12px; font-size: 1.05em; margin-top: 10px; }
.login-lang-switcher { margin-top: 25px; font-size: 0.8em; }