/* ==========================================================================
   Hanu AI Keycloak Custom Theme - New Design (Fixed Header)
   ========================================================================== */

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Background & Body */
body, .pf-v5-c-login {
    background-color: #030712 !important;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 2px, transparent 0) !important;
    background-position: -5px -5px !important;
    background-size: 30px 30px !important;
    color: #ffffff !important;
    font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif !important;
    overflow: hidden !important;
    margin: 0 !important;
    height: 100vh !important;
}

.pf-v5-c-login {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important; /* Stack header and card vertically */
}

/* Ensure the header displays the logo and centers it */
.pf-v5-c-login__header {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}



/* HIDE the standard Keycloak title and the blue line completely */
.pf-v5-c-login__main-header {
    display: none !important;
}

/* Center Container Override */
.pf-v5-c-login__container {
    max-width: 400px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* Remove default PF5 card styles */
.pf-v5-c-login__main, .pf-v5-c-login__main-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* --- CUSTOM CARD CSS --- */

.custom-login-card {
    background: #0f172a !important; /* Very dark slate blue */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.6s ease-out;
}

.custom-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}
.custom-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.custom-close-btn svg {
    width: 16px;
    height: 16px;
}

.custom-header-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.shield-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    color: white;
}
.shield-icon svg {
    width: 24px;
    height: 24px;
}

.custom-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
}

.custom-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0 0 2rem 0;
}

.custom-input-group {
    position: relative;
    margin-bottom: 1rem;
}
.custom-input-group input {
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0.875rem 3rem 0.875rem 1rem;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s;
}
.custom-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #0f172a;
}
.custom-input-group input::placeholder {
    color: #64748b;
}

.custom-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.custom-input-icon svg {
    width: 18px;
    height: 18px;
}
button.custom-input-icon {
    cursor: pointer;
}
button.custom-input-icon:hover {
    color: #94a3b8;
}

.custom-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}
.custom-forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.custom-forgot-link:hover {
    color: #60a5fa;
}

.custom-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #0070f3, #0056b3);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 112, 243, 0.4);
}
.custom-submit-btn:hover {
    background: linear-gradient(135deg, #328af1, #0062d1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 112, 243, 0.5);
}
.custom-submit-btn .arrow {
    font-size: 1.1rem;
}
