/* ==========================================================================
   PU Food Express - Modern Authentication Pages (Validation Edition)
   ========================================================================== */

body.auth-body {
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Image Section */
.auth-hero {
    width: 100%;
    height: 30vh;
    position: relative;
    background-color: #ffffff;
}
.auth-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.auth-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
}

/* Floating Card Section */
.auth-card {
    background-color: #ffffff;
    flex: 1;
    margin-top: -30px;
    border-radius: 24px 24px 0 0;
    padding: 32px 24px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { color: #111827; font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.auth-header p { color: #6b7280; font-size: 14px; }

/* Input Fields Base */
.input-group {
    position: relative;
    margin-bottom: 20px; /* Increased for error text space */
}

.input-group svg {
    position: absolute;
    left: 16px;
    top: 26px; /* Adjusted for vertical center */
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 5;
}

/* Icon Colors */
.icon-blue { stroke: #2563eb !important; }
.icon-green { stroke: #166534 !important; }
.icon-orange { stroke: #ea580c !important; }
.icon-purple { stroke: #9333ea !important; }
.icon-teal { stroke: #0d9488 !important; }

/* Base Input Style */
.input-group .form-control {
    padding-left: 48px !important;
    height: 52px;
    border-radius: 12px;
    width: 100%;
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
}

/* --- TINTED INPUT STYLES --- */
.input-group .input-email { border: 1.5px solid #ea580c; background-color: #fff7ed; color: #111827; }
.input-group .input-email:focus { background-color: #ffffff; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15); }

.input-group .input-password { border: 1.5px solid #2563eb; background-color: #eff6ff; color: #111827; }
.input-group .input-password:focus { background-color: #ffffff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

.input-group .input-default { border: 1.5px solid #e5e7eb; background-color: #f9fafb; color: #111827; }
.input-group .input-default:focus { border-color: #166534; background-color: #ffffff; box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1); }

/* --- VALIDATION ERROR STATES --- */
.input-group .form-control.is-invalid {
    border-color: #b91c1c !important;
    background-color: #fef2f2 !important;
}
.error-text {
    display: none;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    margin-left: 4px;
}
.error-text.visible { display: block; }

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 400px;
}
.toast {
    background-color: #b91c1c;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Registration Options */
.auth-options { margin-top: 24px; border-top: 1px solid #e5e7eb; padding-top: 24px; text-align: center; }
.auth-options p { color: #111827; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.btn-role-group { display: flex; flex-direction: column; gap: 12px; }
.btn-row-split { display: flex; gap: 12px; }

.btn-role {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none; width: 100%;
}
.btn-role svg { width: 18px; height: 18px; }

.btn-role-student { background-color: #166534; color: #ffffff; border: 2px solid #facc15; }
.btn-role-vendor { background-color: #fff7ed; color: #ea580c; border: 2px solid #ea580c; }
.btn-role-driver { background-color: #eff6ff; color: #2563eb; border: 2px solid #2563eb; }

.auth-footer-link { text-align: center; margin-top: 24px; font-size: 14px; color: #6b7280; font-weight: 500; }
.auth-footer-link a { color: #166534; font-weight: 700; text-decoration: none; }

.btn-submit-green { background-color: #166534; color: white; border: 2px solid #facc15; border-radius: 12px; font-weight: bold; font-size: 16px; }
.btn-submit-orange { background-color: #ea580c; color: white; border: 2px solid #fcd34d; border-radius: 12px; font-weight: bold; font-size: 16px; }
.btn-submit-blue { background-color: #2563eb; color: white; border: 2px solid #60a5fa; border-radius: 12px; font-weight: bold; font-size: 16px; }