@import "vendor/fonts/poppins/poppins.css";

:root {
    --brand-primary: #7386D5;
    --brand-primary-dark: #5a6bbf;
    --brand-primary-darker: #4a5aad;
    --brand-primary-light: #8b9de0;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: #e8ecf2;
}

/* ---------------------------------------------------
    Authentication pages — split-screen layout
----------------------------------------------------- */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.auth-paper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Left brand panel */
.auth-brand {
    flex: 0 0 45%;
    background: linear-gradient(160deg, var(--brand-primary-light) 0%, var(--brand-primary) 25%, var(--brand-primary-dark) 60%, var(--brand-primary-darker) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Decorative circle accents for depth */
.auth-brand::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    top: -80px;
    right: -100px;
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    bottom: -60px;
    left: -80px;
    pointer-events: none;
}

.auth-brand-content {
    text-align: center;
    max-width: 320px;
}

.auth-brand-logo {
    width: 100%;
    max-width: 280px;
    margin-bottom: 24px;
}

.auth-brand-subtitle {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0 0 6px 0;
}

.auth-brand-slogan {
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    opacity: 0.75;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.auth-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.auth-brand-features li {
    font-size: 0.85rem;
    font-weight: 300;
    padding: 6px 0;
    opacity: 0.9;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.auth-brand-features li i {
    font-size: 0.9rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.auth-brand-footer {
    position: absolute;
    bottom: 24px;
    font-size: 0.75rem;
    opacity: 0.6;
}

.auth-brand-footer a {
    color: #fff;
    text-decoration: none;
}

/* Right form panel */
.auth-form {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #fff;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h4 {
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 14px;
    margin-bottom: 28px;
}

.auth-card .form-label {
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Input group with icon */
.auth-input-group {
    position: relative;
    width: 100%;
}

.auth-input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 14px;
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.auth-card .auth-input-group .form-control {
    padding-left: 44px;
}

.auth-card .form-control {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(115, 134, 213, 0.15);
}

/* Remove Bootstrap validation icons from all auth fields */
.auth-card .form-control:valid,
.auth-card .form-control:invalid,
.was-validated .auth-card .form-control:valid,
.was-validated .auth-card .form-control:invalid {
    background-image: none !important;
}

/* Red border on invalid fields (client-side and server-side) */
.was-validated .auth-card .form-control:invalid,
.auth-card .form-control.is-invalid {
    border-color: var(--bs-danger) !important;
}

.was-validated .auth-card .form-control:invalid:focus,
.auth-card .form-control.is-invalid:focus {
    border-color: var(--bs-danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Toggle switch (Remember Me) */
.auth-card .form-switch {
    margin-top: 28px;
    margin-bottom: 32px;
}

.auth-card .form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.auth-card .form-check-input:focus {
    border-color: var(--brand-primary-light);
    box-shadow: 0 0 0 3px rgba(115, 134, 213, 0.15);
}

/* Prevent Bootstrap 5 validation from turning Remember Me green */
.was-validated .form-switch .form-check-input:valid {
    border-color: #d1d5db !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e") !important;
}

.was-validated .form-switch .form-check-input:valid:checked {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.was-validated .form-check-input:valid ~ .form-check-label {
    color: inherit !important;
}

/* Button row */
.auth-card .auth-actions {
    margin-top: 32px;
}

/* Brand-colored primary button — full width */
.btn.btn-auth {
    display: block;
    width: 100%;
    background-color: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn.btn-auth:hover {
    background-color: var(--brand-primary-dark);
    color: #fff;
}

.btn.btn-auth:active {
    background-color: var(--brand-primary-darker);
    transform: scale(0.98);
}

/* "Forgot password" link below the button */
.auth-actions .auth-link {
    display: block;
    text-align: center;
    margin-top: 16px;
}

/* Info message banner (login page) */
.auth-message {
    display: block;
    margin-bottom: 8px;
}

.auth-message-badge {
    display: inline-block;
    background-color: var(--brand-primary);
    color: #fff;
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Password visibility toggle */
.auth-input-group.has-toggle .form-control {
    padding-right: 44px;
}

.auth-input-group .password-toggle {
    position: absolute;
    right: 16px;
    top: 4px;
    bottom: 0;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.auth-input-group .password-toggle:hover {
    color: var(--brand-primary);
}

/* Loading spinner in submit button */
.btn.btn-auth:disabled {
    background-color: var(--brand-primary);
    color: #fff;
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.btn-auth .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    margin-right: 6px;
    vertical-align: text-bottom;
}

/* Responsive: hide brand panel on narrow screens */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 16px;
    }
    .auth-paper {
        min-height: auto;
        border-radius: 16px;
    }
    .auth-brand {
        display: none;
    }
    .auth-form {
        padding: 32px 20px;
    }
}
