/* =============================================================================
   OTMS — _hero.css : login screen + department picker + dashboard hero
   "Totalny full wypas graficzny" - gradient mesh, glow, animacje
   ============================================================================= */

/* ===== LOGIN SCREEN ===== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
@media (max-width: 900px) {
    .login-page { grid-template-columns: 1fr; }
    .login-side { display: none; }
}

/* Lewa strona - hero z gradient mesh */
.login-side {
    position: relative;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #1e3a8a 60%, var(--brand-blue) 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: #fff;
}
/* Animowane gradient meshes w tle */
.login-side::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, .4), transparent 70%);
    top: -20%;
    right: -20%;
    animation: floatA 18s ease-in-out infinite;
    pointer-events: none;
}
.login-side::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, .3), transparent 70%);
    bottom: -10%;
    left: -10%;
    animation: floatB 22s ease-in-out infinite;
    pointer-events: none;
}
@keyframes floatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.1); }
    66%      { transform: translate(-30px, 30px) scale(.95); }
}
@keyframes floatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(50px, -40px) scale(1.15); }
}

.login-side-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-side-brand img {
    height: 38px;
    filter: brightness(0) invert(1);
}
.login-side-brand .system-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255, 255, 255, .7);
    font-weight: 700;
    border-left: 2px solid rgba(255, 255, 255, .3);
    padding-left: 12px;
    margin-left: 4px;
}

.login-side-hero {
    position: relative;
    z-index: 2;
    max-width: 480px;
}
.login-side-hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin: 0 0 16px;
}
.login-side-hero h1 span {
    background: linear-gradient(135deg, #fff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.login-side-hero p {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .85);
    margin: 0;
    max-width: 420px;
}

.login-side-features {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 480px;
}
.login-side-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
}
.login-side-feature svg {
    color: var(--brand-accent);
    flex-shrink: 0;
}

/* Prawa strona - formularz */
.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
}
.login-form-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .04), transparent 50%);
    pointer-events: none;
}
.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}
.login-card h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -.02em;
}
.login-card p.lead {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 22px;
}
.login-card .form-group { margin-bottom: 16px; }
.login-card .form-input { padding: 11px 14px; font-size: 14px; }
.login-card .btn-primary { width: 100%; padding: 11px; font-size: 14px; }
.login-card .login-help {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.login-card .login-credentials {
    background: var(--bg);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-soft);
    margin-top: 12px;
}
.login-card .login-credentials strong { color: var(--brand-blue); }

/* ===== DEPARTMENT PICKER ===== */
.dept-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}
.dept-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 20% 20%, rgba(37, 99, 235, .08), transparent 50%),
        radial-gradient(600px 300px at 80% 70%, rgba(124, 58, 237, .06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.dept-hero {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}
.dept-hero-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-accent));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 8px 32px rgba(37, 99, 235, .35);
    animation: floatLogo 4s ease-in-out infinite;
}
.dept-hero-logo svg { color: #fff; width: 32px; height: 32px; }
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.dept-hero h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -.02em;
}
.dept-hero p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 880px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.dept-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    cursor: pointer;
    transition: all var(--t-slow);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: dropIn .5s ease-out backwards;
}
.dept-card:nth-child(1) { animation-delay: 0ms; }
.dept-card:nth-child(2) { animation-delay: 60ms; }
.dept-card:nth-child(3) { animation-delay: 120ms; }
.dept-card:nth-child(4) { animation-delay: 180ms; }
.dept-card:nth-child(5) { animation-delay: 240ms; }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dept-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--c, var(--brand-blue));
}
.dept-card.disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}
.dept-card:hover:not(.disabled) {
    transform: translateY(-4px);
    border-color: var(--c, var(--brand-blue));
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}
.dept-card-icon {
    width: 48px;
    height: 48px;
    background: color-mix(in srgb, var(--c, var(--brand-blue)) 14%, transparent);
    color: var(--c, var(--brand-blue));
    border-radius: var(--r);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.dept-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}
.dept-card p {
    color: var(--text-muted);
    font-size: 12.5px;
    margin: 0;
    line-height: 1.5;
}
.dept-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--st-warning-bg);
    color: var(--st-warning);
    border: 1px solid var(--st-warning-border);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.dept-logout {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 2;
}

/* ===== DASHBOARD HERO ===== */
.dash-hero {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue-dark) 100%);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
}
.dash-hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, .3), transparent 70%);
    top: -50%;
    right: -10%;
    pointer-events: none;
}
.dash-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.dash-hero-greet h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -.02em;
}
.dash-hero-greet p {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    margin: 0;
}
.dash-hero-time {
    text-align: right;
    font-family: var(--font-mono);
}
.dash-hero-time .clock {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
}
.dash-hero-time .date {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ===== GRID DASHBOARD ===== */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.dash-section {
    margin-bottom: 22px;
}
.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dash-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.dash-section-title svg { color: var(--brand-blue); }
