/* ===================================
   EKRAN LOGOWANIA – glassmorphism, delikatne animacje
   Kulki w kolorach logo przelatują pod panelami
   =================================== */

/* Tło – spokojny gradient pod szkło */
.login-page {
    min-height: 100vh;
    padding: 2rem 0 2.4rem; /* zmniejszone o 20% (było 2.5rem 3rem) */
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        160deg,
        #f0f9ff 0%,
        #e0f2fe 22%,
        #f8fafc 45%,
        #ecfeff 70%,
        #f0f9ff 100%
    );
}

/* Warstwa z kulkami – pod panelami (z-index 0) */
.login-page-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Kulki w kolorach logo (turkus, niebieski) – przelatują co jakiś czas */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    will-change: transform;
}

.login-orb--1 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 137, 207, 0.7) 0%, rgba(0, 137, 207, 0.2) 50%, transparent 70%);
    top: 25%;
    left: -15%;
    animation: login-orb-pass 28s ease-in-out infinite;
    animation-delay: 0s;
}
.login-orb--2 {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.65) 0%, rgba(6, 182, 212, 0.15) 50%, transparent 70%);
    top: 60%;
    left: -12%;
    animation: login-orb-pass 32s ease-in-out infinite;
    animation-delay: 6s;
}
.login-orb--3 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.6) 0%, rgba(14, 165, 233, 0.12) 50%, transparent 70%);
    top: 15%;
    right: -10%;
    animation: login-orb-pass-reverse 26s ease-in-out infinite;
    animation-delay: 12s;
}
.login-orb--4 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.55) 0%, rgba(34, 211, 238, 0.1) 50%, transparent 70%);
    top: 70%;
    right: -8%;
    animation: login-orb-pass-reverse 30s ease-in-out infinite;
    animation-delay: 3s;
}
.login-orb--5 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0.08) 50%, transparent 70%);
    top: 45%;
    left: -5%;
    animation: login-orb-pass 24s ease-in-out infinite;
    animation-delay: 18s;
}

@keyframes login-orb-pass {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.45; }
    15%  { transform: translate(25vw, -8vh) scale(1.1); opacity: 0.5; }
    50%  { transform: translate(55vw, 5vh) scale(0.95); opacity: 0.4; }
    85%  { transform: translate(95vw, -3vh) scale(1.05); opacity: 0.48; }
    100% { transform: translate(120vw, 0) scale(1); opacity: 0.45; }
}

@keyframes login-orb-pass-reverse {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.45; }
    15%  { transform: translate(-20vw, 6vh) scale(1.05); opacity: 0.5; }
    50%  { transform: translate(-50vw, -4vh) scale(0.95); opacity: 0.4; }
    85%  { transform: translate(-85vw, 5vh) scale(1.1); opacity: 0.48; }
    100% { transform: translate(-120vw, 0) scale(1); opacity: 0.45; }
}

/* Kulki lecące z dołu do góry – widoczne */
.login-orb-up {
    bottom: -15%;
    left: 15%;
    width: 90px;
    height: 90px;
    filter: blur(35px);
    opacity: 0.65;
    animation: login-orb-rise 18s ease-in-out infinite;
}
.login-orb-up--1 {
    background: radial-gradient(circle, rgba(0, 137, 207, 0.85) 0%, rgba(0, 137, 207, 0.35) 45%, transparent 70%);
    left: 12%;
    animation-delay: 0s;
}
.login-orb-up--2 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.8) 0%, rgba(6, 182, 212, 0.3) 45%, transparent 70%);
    left: 38%;
    animation-delay: 4s;
}
.login-orb-up--3 {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.8) 0%, rgba(34, 211, 238, 0.3) 45%, transparent 70%);
    left: 62%;
    animation-delay: 8s;
}
.login-orb-up--4 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.85) 0%, rgba(14, 165, 233, 0.35) 45%, transparent 70%);
    left: 85%;
    animation-delay: 2s;
}

@keyframes login-orb-rise {
    0%   { transform: translateY(0) scale(1); opacity: 0.65; }
    20%  { transform: translateY(-25vh) scale(1.05); opacity: 0.7; }
    50%  { transform: translateY(-55vh) scale(0.95); opacity: 0.6; }
    80%  { transform: translateY(-85vh) scale(1.02); opacity: 0.65; }
    100% { transform: translateY(-120vh) scale(1); opacity: 0.5; }
}

/* Delikatna, wolna pulsacja tła (opcjonalna głębia) */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(
        ellipse 100% 80% at 50% 20%,
        rgba(224, 242, 254, 0.4) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.login-page .container {
    position: relative;
    z-index: 1;
}

.login-page .login-logo-wrap {
    text-align: center;
    margin-bottom: 1rem;
}
.login-page .login-logo-wrap img {
    max-width: 320px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.08));
}

/* Wyrównanie obu kart – ta sama wysokość */
.login-page .login-cards {
    align-items: stretch;
}
.login-page .login-cards .col-lg-5 {
    display: flex;
}
.login-page .login-cards .modern-card {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}
.login-page .login-cards .modern-card .modern-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.login-page .login-cards .modern-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.login-page .login-cards .modern-card .form-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

.login-page .modern-card-header h4 {
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}
.login-page .modern-card-header .icon-md {
    width: 1.15rem;
    height: 1.15rem;
}

/* Pola formularza w stylu dashboard */
.login-page .form-label {
    font-weight: var(--fw-medium, 500);
    color: var(--grey-700, #374151);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}
.login-page .form-control,
.login-page .form-select {
    border-radius: var(--border-radius-sm, 8px);
    border: 1px solid var(--grey-200, #E5E7EB);
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-page .form-control:focus,
.login-page .form-select:focus {
    border-color: var(--accent-blue, #0089cf);
    box-shadow: 0 0 0 3px rgba(0, 137, 207, 0.15);
    outline: 0;
}
.login-page .alert {
    border-radius: var(--border-radius-sm, 8px);
    font-size: 0.9rem;
}

/* Style przycisków .btn-modern-success / .btn-modern-primary są w dashboard.css */

/* Kafelki gabinetów – wybór numeru pomieszczenia */
.login-gabinet-grid-wrap {
    margin-bottom: 0.25rem;
}
.login-gabinet-grid-wrap .form-label {
    margin-bottom: 0.5rem;
}
.login-gabinet-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.3rem; /* zmniejszone o 20% (było 0.35rem) */
}
.login-gabinet-tile {
    aspect-ratio: 1;
    min-height: 22px; /* zmniejszone o 20% (było 28px) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0.16rem; /* zmniejszone o 20% (było 0.2rem) */
    color: #374151;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border: 1.5px solid #E5E7EB;
    border-radius: 6px; /* zmniejszone o 20% (było 8px) */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.login-gabinet-tile:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #0EA5E9;
    color: #0369A1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}
.login-gabinet-tile.selected {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    border-color: #0284C7;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4), 0 2px 4px rgba(14, 165, 233, 0.2);
    transform: translateY(-1px);
}
.login-gabinet-tile:active {
    transform: scale(0.96) translateY(0);
}
.login-gabinet-group-label {
    font-size: 0.56rem; /* zmniejszone o 20% (było 0.7rem) */
    font-weight: var(--fw-medium, 500);
    color: var(--grey-500, #6B7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
    margin-top: 0.4rem;
}
.login-gabinet-group-label:first-child {
    margin-top: 0;
}
.login-gabinet-tile small {
    display: block;
    font-size: 0.5rem; /* zmniejszone o 20% (było 0.55rem) */
    margin-top: 0.04rem;
    line-height: 1.1;
}
.login-gabinet-tile.selected small {
    color: rgba(255,255,255,0.95);
}

/* Błąd walidacji: wybór gabinetu obowiązkowy */
.login-gabinet-error {
    display: none;
    font-size: 0.85rem;
    color: #b91c1c;
    font-weight: 500;
}
.login-gabinet-error.login-gabinet-error-visible {
    display: block;
}
.login-page .login-gabinet-grid-wrap.is-invalid {
    outline: 2px solid rgba(185, 28, 28, 0.5);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm, 8px);
}
