body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    min-height: 100vh;
}

.auth-container {
    min-height: calc(100vh - var(--header-height) - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.card-auth {
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header & Logo --- */
.card-header-custom {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
}

.company-logo {
    height: 65px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.company-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.company-desc {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* --- Error Alert --- */
.alert-custom {
    font-size: 0.85rem;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: shake 0.4s ease-in-out;
}

/* --- Form Elements Styling --- */
.card-body-custom {
    padding: 1rem 2rem 2rem 2rem;
}

/* Styling the PHP .form-group logic to look modern */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control {
    height: 50px;
    border-radius: 8px;
    padding-left: 15px; /* Space for text */
    padding-right: 45px; /* Space for icon */
    border: 1px solid #ced4da;
    background-color: #f8fafc;
    transition: all 0.2s;
}

.form-control:focus {
    background-color: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Icon positioning inside input */
.iconinput {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
}

/* Error state for input */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none; /* remove bootstrap default icon */
}

.form-control.is-invalid + .iconinput {
    color: #dc3545;
}

/* --- Button Styling --- */
.btn-primary {
    background: linear-gradient(to right, #667eea, #764ba2);
    border: none;
    height: 50px;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(to right, #5a6fd6, #6b4394);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Spinner */
.spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    display: none;
    margin-right: 8px;
}

.btn-primary.loading .spinner-border { display: inline-block; }
.btn-primary.loading span { display: none; } /* Hide text when loading */

/* --- Password Recovery Link --- */
.recovery-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.recovery-link a {
    color: #6c757d;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.recovery-link a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Animation for shake effect */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


.register-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0; 
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

.register-link-anim {
    color: #764ba2; /* Matches your theme purple */
    font-weight: 700;
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.register-link-anim::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(to right, #667eea, #764ba2);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.register-link-anim:hover {
    color: #5b3a82;
}

.register-link-anim:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}