/* ==========================================================================
   SIMONGAN - SMK Negeri 1 Bangsri Login Page Stylesheet
   Modern, Clean, Glassmorphic & School Identity
   ========================================================================== */

/* Root & Global Layout Safety */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Page Shell & Background */
.login-page-root {
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    box-sizing: border-box;
}

.login-bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transform: scale(1.02);
    transition: transform 0.5s ease;
}

.login-overlay-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 138, 0.65) 0%,
        rgba(15, 23, 42, 0.70) 50%,
        rgba(30, 58, 138, 0.65) 100%
    );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* ==========================================================================
   TOP BRANDING MARQUEE BANNER
   ========================================================================== */
.marquee-banner {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow: hidden;
    background: #1E3A8A;
    border-bottom: 1px solid rgba(37, 99, 235, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    padding: 0.5rem 0;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 42s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    padding-right: 2.25rem;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Logo Items in Marquee */
.marquee-logos-cluster {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
}

.marquee-logo-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    transition: transform 0.2s ease;
}

.marquee-logo-item:hover {
    transform: scale(1.08);
}

.marquee-logo-item img {
    height: 38px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Specific proportional adjustments for wider logos like SMK Bisa Hebat */
.marquee-logo-item.wide-logo img {
    max-width: 120px;
    height: 34px;
}

/* School Identity Text in Marquee */
.marquee-school-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.marquee-school-sub {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bfdbfe;
}

.marquee-school-name {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.marquee-divider {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 8px #3b82f6;
    opacity: 0.85;
    flex-shrink: 0;
}

/* ==========================================================================
   CENTER CONTENT & LOGIN CARD
   ========================================================================== */
.login-content-area {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
}

.login-card-wrapper {
    width: 100%;
    max-width: 440px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Glassmorphism Card */
.login-glass-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1.5rem;
    box-shadow:
        0 24px 60px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    padding: 1.65rem 1.85rem;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Brand Header Inside Card */
.login-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.16);
    margin: 0 auto 0.65rem auto;
    padding: 0.55rem;
    flex-shrink: 0;
}

.login-brand-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(30, 58, 138, 0.12));
}

.login-brand-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin: 0 0 0.3rem 0;
    background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 50%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    display: block;
    width: 100%;
}

.login-brand-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    margin: 0;
    text-align: center;
    line-height: 1.35;
}

.login-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.28);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-top: 0.45rem;
}

.login-portal-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2563EB;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
    flex-shrink: 0;
    margin-right: 0.35rem;
}

/* Role Selector Tabs */
.role-tabs-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: 0.875rem;
    margin-bottom: 1.5rem;
}

.role-tab-btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
    background: transparent;
    color: #64748b;
    text-align: center;
}

.role-tab-btn:hover {
    color: #0f172a;
}

.role-tab-btn.is-active {
    background: #2563EB;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.role-tab-btn.is-active:hover {
    background: #1D4ED8;
}

/* Form Controls */
.login-form-group {
    margin-bottom: 1.25rem;
}

.login-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.375rem;
}

.login-input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}

.login-input.has-icon-right {
    padding-right: 2.75rem;
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.25);
}

.login-field-helper {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.35rem;
}

/* Password Toggle Eye Button */
.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: #2563EB;
}

.password-toggle-btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

/* Submit Button */
.login-submit-btn {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    color: #ffffff;
    background: #2563EB;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.875rem;
    cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.login-submit-btn:hover {
    background: #1D4ED8;
    box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.login-submit-btn:active {
    background: #1E40AF;
    transform: translateY(0);
    box-shadow: 0 6px 14px -2px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.login-page-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center;
    padding: 1.25rem 1rem 1.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    user-select: none;
}

.login-page-footer p {
    margin: 0.2rem 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 640px) {
    .marquee-banner {
        padding: 0.5rem 0;
    }

    .marquee-group {
        gap: 1.5rem;
        padding-right: 1.5rem;
    }

    .marquee-logos-cluster {
        gap: 0.85rem;
    }

    .marquee-logo-item,
    .marquee-logo-item img {
        height: 28px;
    }

    .marquee-logo-item.wide-logo img {
        height: 24px;
    }

    .marquee-school-sub {
        font-size: 0.5625rem;
    }

    .marquee-school-name {
        font-size: 0.8125rem;
    }

    .login-content-area {
        padding: 1rem 0.75rem;
    }

    .login-card-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .login-glass-card {
        padding: 1.35rem 1.1rem;
        border-radius: 1.25rem;
        width: 100%;
    }

    .login-brand-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.95rem;
    }

    .login-brand-logo-wrap {
        width: 62px;
        height: 62px;
        margin: 0 auto 0.5rem auto;
        padding: 0.45rem;
    }

    .login-brand-title {
        font-size: 1.45rem;
        margin-bottom: 0.25rem;
    }

    .login-brand-subtitle {
        font-size: 0.75rem;
    }

    .role-tabs-wrap {
        margin-bottom: 1rem;
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .role-tab-btn {
        font-size: 0.8125rem;
        padding: 0.45rem 0.2rem;
    }

    .login-form-group {
        margin-bottom: 0.85rem;
    }

    .login-input {
        padding: 0.65rem 0.85rem;
        font-size: 0.8125rem;
    }

    .login-submit-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}
