/* General Reset */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #007bff, #ffffff) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    min-height: 100vh;
}

.position-fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.start-0 {
    left: 0;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: #0d6efd;
}

.text-muted {
    color: #6c757d;
}

.mb-3 {
    margin-bottom: 1rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Container styling */
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 400px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}


.login-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #007bff;
}

/* Form styles */
.login-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

/* Input with glowing hover effect */
.glow-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: 0.4s;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 5px;
    cursor: pointer;
}

.glow-input:focus,
.glow-input:hover {
    border-color: #007bff;
    box-shadow: 0px 0px 10px rgba(0, 123, 255, 0.7);
}

.login-form .input-group .toggle-password {
    flex: 0 0 46px;
    width: 46px;
    border: 2px solid #ddd;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background: #ffffff;
    color: #1f2937;
    padding: 0;
}

.password-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.password-icon-eye-slash {
    display: none;
}

.toggle-password[aria-pressed="true"] .password-icon-eye {
    display: none;
}

.toggle-password[aria-pressed="true"] .password-icon-eye-slash {
    display: inline-block;
}

.login-form .input-group .toggle-password:hover {
    background: #eaf2ff;
}

/* Button with glowing hover effect */
.glow-button {
    width: 100%;
    padding: 10px 15px;
    font-size: 1rem;
    background: #0056b3;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.4s;
    box-shadow: 0 4px 6px rgba(0, 86, 179, 0.35);
}

.glow-button:hover {
    background: #004494;
    box-shadow: 0px 0px 15px rgba(0, 86, 179, 0.75);
    transform: translateY(-2px);
}

.glow-button:focus-visible {
    outline: 3px solid rgba(0, 86, 179, 0.35);
    outline-offset: 2px;
}

/* Signup link */
.signup-link {
    margin-top: 1rem;
    color: #333;
}

.signup-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.signup-link a:hover {
    text-decoration: underline;
}

#logout-loader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#logout-loader .spinner-border {
    width: 4rem !important;
    height: 4rem !important;
    border-width: 0.25em !important;
    animation-duration: 0.75s !important;
}

#logout-loader h5 {
    font-size: 1.5rem !important;
    margin-top: 1rem !important;
    color: #0d6efd !important;
}

body.logging-out .login-form {
    opacity: 0.5;
    pointer-events: none;
}

.logout-overlay {
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex !important;
}

.logout-spinner {
    width: 3rem;
    height: 3rem;
}

.pwa-install-prompt {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: auto;
    z-index: 1050;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.glow-button:disabled,
.toggle-password:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 0.18em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.16em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.pwa-install-prompt.is-visible {
    display: inline-flex;
}

.pwa-install-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.45);
}

.pwa-install-close {
    border: 0;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    background: #1f2937;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
    cursor: pointer;
}

@media (max-width: 576px) {
    .pwa-install-prompt {
        right: 12px;
        bottom: 12px;
        padding: 8px 10px;
    }

    .pwa-install-button {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .pwa-install-close {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
