/* =============================================
   HRMS Glassentials — Auth Pages Stylesheet
   ============================================= */

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

* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 50px 20px;
    font-family: 'Inter', Arial, sans-serif;
    background:
        radial-gradient(circle at top left, #dff2ff 0%, transparent 40%),
        radial-gradient(circle at bottom right, #f4f0ff 0%, transparent 50%),
        linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    overflow-x: hidden;
    position: relative;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* Floating Blobs */
.bg-shape {
    position: fixed;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.55;
    border-radius: 50%;
    pointer-events: none;
}

.shape-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #c8ecff, #a5d8ff);
    top: -150px;
    left: -150px;
    animation: authFloat 15s ease-in-out infinite alternate;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ddd7ff, #c4b5fd);
    bottom: -150px;
    right: -100px;
    animation: authFloat 12s ease-in-out infinite alternate-reverse;
}

@keyframes authFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

/* Auth Card */
.auth-container {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    padding: 52px 42px;
    box-shadow: 
        0 60px 150px rgba(0, 0, 0, 0.45), 
        0 30px 60px rgba(0, 0, 0, 0.35),
        0 15px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    animation: authFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.auth-container.wide {
    max-width: 900px;
    padding: 40px 50px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
    align-items: flex-start;
}

.auth-grid .full-width {
    grid-column: span 2;
}

.auth-grid .auth-btn {
    grid-column: span 2;
    margin-top: 10px;
}

@keyframes authFadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 38px;
}

.auth-header .logo {
    height: 60px;
    width: auto;
    max-width: 300px;
    margin-bottom: 60px;
    margin-top: 30px;
    object-fit: contain;
    transform: scale(1.5);
    transform-origin: center center;
    transition: transform 0.3s;
}

.auth-header .logo:hover {
    transform: scale(3.6);
}

.auth-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.8px;
}

.auth-header p {
    color: #5f6f85;
    font-size: 15px;
    font-weight: 500;
}

/* Inputs */
.input-group {
    margin-bottom: 24px;
    position: relative;
    opacity: 0;
    animation: authFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger animations for smooth sequence */
form .input-group:nth-child(2) { animation-delay: 0.1s; }
form .input-group:nth-child(3) { animation-delay: 0.15s; }
form .input-group:nth-child(4) { animation-delay: 0.2s; }
form .input-group:nth-child(5) { animation-delay: 0.25s; }
form .input-group:nth-child(6) { animation-delay: 0.3s; }
form .input-group:nth-child(7) { animation-delay: 0.35s; }
form .input-group:nth-child(8) { animation-delay: 0.4s; }

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s ease;
    font-size: 16px;
    pointer-events: none;
}

.auth-input, .auth-select {
    width: 100%;
    padding: 15px 16px 15px 48px;
    border-radius: 16px;
    border: 1.5px solid #dbe7f5;
    background: rgba(255, 255, 255, 0.75);
    font-family: inherit;
    font-size: 15.5px;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

.auth-select {
    padding-left: 48px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 20px;
    cursor: pointer;
}

.auth-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.auth-input:focus, .auth-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.auth-input:focus + i {
    color: #3b82f6;
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 16.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    margin-top: 8px;
    opacity: 0;
    animation: authFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

/* Footer / Links */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
    opacity: 0;
    animation: authFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Error */
.error-message {
    background: #fef2f2;
    color: #ef4444;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    border: 1px solid #fecaca;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.error-message i, .success-message i {
    font-size: 18px;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 44px 26px;
        border-radius: 28px;
    }
    .auth-header h2 {
        font-size: 28px;
    }
    .auth-input, .auth-select {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* Extras */
.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    z-index: 10;
    font-size: 16px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #3b82f6;
}

.auth-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 13.5px;
    opacity: 0;
    animation: authFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 500;
}

.remember-me input {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-pwd {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.forgot-pwd:hover {
    text-decoration: underline;
}

/* -- Toast Messages ----------------------------------------- */
.toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 26px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-weight: 600;
    color: #1e293b;
    min-width: 320px;
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast i {
    font-size: 20px;
}

.toast-success {
    border-left: 5px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 5px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-warning {
    border-left: 5px solid #f59e0b;
}

.toast-warning i {
    color: #f59e0b;
}

.toast-info {
    border-left: 5px solid #3b82f6;
}

.toast-info i {
    color: #3b82f6;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

