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

/* ============================
   GLOBAL
============================ */
body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    font-family: 'Open Sans', sans-serif;
}

/* ============================
   CONTAINER
============================ */
.main-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================
   BOX
============================ */
.box {
    width: 100%;
    background: #ffffff;
    padding: 32px 28px; 
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    animation: fadeIn .4s ease;
}

.main-container .box {
    max-width: 760px;
}

.auth-container .box {
    max-width: 380px;
}

/* ============================
   LOGO (jeśli potrzebne)
============================ */
.main-container .logo {
    aspect-ratio: 3;
    margin: -32px -28px; /* negatywne paddingi, by logo sięgało do krawędzi */
    background: url('https://static.buseo.app/logo/horizontal.svg') no-repeat center/contain;
}

.auth-container .logo {
    aspect-ratio: 3;
    margin: -32px -28px; /* negatywne paddingi, by logo sięgało do krawędzi */
    background: url('https://static.buseo.app/logo/horizontal.svg') no-repeat center/contain;
}


/* ============================
   TITLE
============================ */
.title {
    margin: 10px 0 24px 0;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #45494e;
    text-transform: uppercase;
}

/* ============================
   ERROR BOX
============================ */
.auth-error {
    background: #ffe5e5;
    color: #b30000;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================
   SUCCESS BOX
============================ */
.auth-success {
    background: #e5ffe5;
    color: #006600;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================
   INFO BOX
============================ */
.auth-info {
    background: #e5f3ff;
    color: #005b8c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================
   FORM
============================ */
.form {
    width: 100%;
}

/* ============================
   INPUT GROUP
============================ */
.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input {
    width: calc(100% - 26px);
    padding: 14px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus {
    border-color: #005b8c;
    outline: none;
}

/* Floating label */
.form-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #777;
    font-size: 16px;
    pointer-events: none;
    transition: .2s;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    background: white;
    padding: 0 4px;
    color: #005b8c;
}

.form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -10px 0 20px 0; /* lekko podciągnięte, by pasowało do inputów */
    font-size: 14px;
    color: #333;
}

.form-checkbox-wrapper a {
    color: #005b8c;
    text-decoration: none;
}

.form-checkbox-wrapper a:hover {
    text-decoration: underline;
}

/* Ukrywamy natywny checkbox */
.form-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: border-color .2s, background .2s;
}

/* Po najechaniu */
.form-checkbox:hover {
    border-color: #005b8c;
}

/* Po zaznaczeniu */
.form-checkbox:checked {
    background: #005b8c;
    border-color: #005b8c;
}

/* Ikona "ptaszka" */
.form-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Focus (klawiatura) */
.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 91, 140, 0.25);
}

/* ============================
   BUTTON
============================ */
.button-blue {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px;
    background: #005b8c;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.button-blue:hover {
    background: #005b8c;
}

.button-gray {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.button-gray:hover {
    background: #5a6268;
}

/* ============================
   LINKS
============================ */
.form-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-links a {
    color: #005b8c;
    text-decoration: none;
    font-size: 14px;
}

.form-links a:hover {
    text-decoration: underline;
}

/* ============================
   ANIMATIONS
============================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 480px) {
    .box {
        padding: 24px;
        border-radius: 12px;
    }

    .title {
        font-size: 22px;
    }
}

/* Domyślnie: linki jeden pod drugim */
.form-links-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-links-inline a {
    color: #005b8c;
    text-decoration: none;
    font-size: 12px;
}

.form-links-inline a:hover {
    text-decoration: underline;
}

/* Na większych ekranach: dwa linki obok siebie */
@media (min-width: 600px) {
    .form-links-inline {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ============================
   TABELA
============================ */
.table-wrapper {
    max-height: 350px; /* wysokość przewijanej części */
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

/* Tabela */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

/* Przyklejony nagłówek */
.table thead th {
    position: sticky;
    top: 0;
    background: #005b8c;
    color: #fff;
    z-index: 2;
    padding: 12px 15px;
    text-align: left;
}

/* Komórki */
.table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
}

/* Hover */
.table tbody tr:hover {
    background: #f5faff;
}

/* Błędne logowania */
.table .error-row {
    background: #ffe5e5;
    color: #a30000;
}

.table .error-row:hover {
    background: #ffd6d6;
}

.login-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
}




