/* ============================================================
   auth.css — Fintech Banking Authentication Styles
   Stack: Bootstrap 5.3 · Instrument Sans · Font Awesome 6
   ============================================================ */

/* ── Google Font ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    --primary:          #e40013;
    --primary-hover:    #bf0010;
    --primary-light:    #fdf0f1;

    --brand-bg:         #fae8ea;        /* very light red-tinted panel */
    --brand-text:       #2c0408;        /* deep warm-dark for contrast  */
    --brand-sub:        #7a2028;

    --page-bg:          #f8f9fa;
    --card-bg:          #ffffff;

    --input-border:     #d6d9de;
    --input-focus:      #e40013;
    --input-icon:       #9aa0ab;

    --text-heading:     #111827;
    --text-body:        #4b5563;
    --text-muted:       #9ca3af;
    --text-link:        #e40013;
    --text-link-hover:  #bf0010;

    --divider:          #e5e7eb;

    --radius:           3px;
    --card-shadow:      0 2px 16px 0 rgba(0,0,0,.07);
    --font:             'Google Sans', sans-serif;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family:      var(--font);
    background-color: var(--page-bg);
    color:            var(--text-body);
    font-size:        0.9375rem;      /* 15 px */
    line-height:      1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Page Wrapper ───────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display:    flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ── Card ───────────────────────────────────────────────────── */
.auth-card {
    display:          flex;
    width:            100%;
    max-width:        1020px;
    background:       var(--card-bg);
    border-radius:    var(--radius); 
    box-shadow:       var(--card-shadow);
    overflow:         hidden;
    border:           1px solid #e9eaec;
}

/* ── Branding Panel (Desktop Only) ─────────────────────────── */ 
.auth-brand {
    flex:             0 0 45%;
    max-width:        45%;
    padding:          3.5rem 3rem;
    display:          flex;
    flex-direction:   column;
    justify-content:  center;
    position:         relative;

    /* Background photo — finance / city / professional */
    background-image: url('../img/bankhero.png');
    background-size:     cover;
    background-position: center center;
    background-repeat:   no-repeat;
}

/* Dark overlay on top of the photo */
.auth-brand::before {
    content:  '';
    position: absolute;
    inset:    0;
    background: linear-gradient(
        160deg,
        rgba(15, 10, 10, 0.72) 0%,
        rgba(100, 5, 15, 0.68) 100%
    );
    z-index: 0;
}

/* All direct children sit above the overlay */
.auth-brand > * {
    position: relative;
    z-index:  1;
}

/* Logo mark inside brand panel */
.brand-logo-mark {
    display:        flex;
    align-items:    center;
    gap:            0.6rem;
    margin-bottom:  3rem;
}

.brand-logo-mark .logo-icon {
    width:           38px;
    height:          38px;
    background-color: var(--primary);
    border-radius:   var(--radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-shrink:     0;
}

.brand-logo-mark .logo-icon i {
    color:     #ffffff;
    font-size: 1rem;
}

.brand-logo-mark .logo-name {
    font-size:      1.1rem;
    font-weight:    700;
    color:          #ffffff;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Brand headline & tagline */
.brand-headline {
    font-size:   1.75rem;
    font-weight: 700;
    color:       #ffffff;
    line-height: 1.25;
    margin:      0 0 1.1rem;
    letter-spacing: -.01em;
}

.brand-tagline {
    font-size:   0.9rem;
    color:       rgba(255,255,255,.72);
    line-height: 1.75;
    margin:      0 0 2.75rem;
    max-width:   92%;
}

/* Thin separator before features */
.brand-sep {
    width:        40px;
    height:       2px;
    background:   var(--primary);
    border-radius: 2px;
    margin-bottom: 1.75rem;
    flex-shrink:  0;
}

/* Feature list inside brand panel */
.brand-features {
    list-style: none;
    padding:    0;
    margin:     0;
}

.brand-features li {
    display:     flex;
    align-items: flex-start;
    gap:         0.85rem;
    font-size:   0.875rem;
    color:       rgba(255,255,255,.82);
    padding:     0.6rem 0;
    line-height: 1.5;
}

.brand-features li + li {
    border-top: 1px solid rgba(255,255,255,.1);
}

.brand-features li i {
    color:      rgba(255,255,255,.9);
    font-size:  0.75rem;
    flex-shrink: 0;
    width:      18px;
    height:     18px;
    background: rgba(228,0,19,.55);
    border-radius: var(--radius);
    display:    flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

/* Brand bottom badge */
.brand-badge {
    margin-top:     auto;
    padding-top:    2.5rem;
    display:        flex;
    align-items:    center;
    gap:            0.5rem;
    font-size:      0.72rem;
    color:          rgba(255,255,255,.5);
    font-weight:    500;
    letter-spacing: .02em;
}

.brand-badge i {
    color: rgba(255,255,255,.6);
}

/* ── Login Panel ────────────────────────────────────────────── */
.auth-login {
    flex:       1;
    padding:    3rem 3rem 2.5rem;
    display:    flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile-only bank logo */
.mobile-logo {
    display:        none;
    align-items:    center;
    gap:            0.55rem;
    margin-bottom:  1.75rem;
}

.mobile-logo .logo-icon {
    width:           32px;
    height:          32px;
    background-color: var(--primary);
    border-radius:   var(--radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
}

.mobile-logo .logo-icon i {
    color:     #ffffff;
    font-size: 0.875rem;
}

.mobile-logo .logo-name {
    font-size:      1rem;
    font-weight:    700;
    color:          var(--text-heading);
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* Heading area */
.login-heading {
    margin-bottom: 1.75rem;
}

.login-heading h1 {
    font-size:   1.5rem;
    font-weight: 700;
    color:       var(--primary);
    margin:      0 0 0.3rem;
    letter-spacing: -.01em;
}

.login-heading p {
    font-size: 0.875rem;
    color:     var(--text-muted);
    margin:    0;
}

/* ── Form ───────────────────────────────────────────────────── */
.auth-form .form-label {
    font-size:   0.8125rem;
    font-weight: 600;
    color:       var(--text-heading);
    margin-bottom: 0.4rem;
    display:     block;
}

/* Input wrapper — icon + field */
.input-group-auth {
    position: relative;
}

.input-group-auth .input-icon {
    position:    absolute;
    left:        0.875rem;
    top:         50%;
    transform:   translateY(-50%);
    color:       var(--input-icon);
    font-size:   0.8125rem;
    pointer-events: none;
    z-index:     2;
}

.input-group-auth .form-control {
    font-family:  var(--font);
    font-size:    0.875rem;
    height:       42px;
    padding:      0 0.9rem 0 2.4rem;
    border:       1px solid var(--input-border);
    border-radius: var(--radius);
    color:        var(--text-heading);
    background:   #fff;
    transition:   border-color .18s ease, box-shadow .18s ease;
    width:        100%;
    outline:      none;
    appearance:   none;
}

.input-group-auth .form-control::placeholder {
    color:      var(--text-muted);
    font-size:  0.85rem;
}

.input-group-auth .form-control:focus {
    border-color: var(--input-focus);
    box-shadow:   0 0 0 3px rgba(228, 0, 19, .08);
}

/* Password toggle */
.input-group-auth .btn-pwd-toggle {
    position:   absolute;
    right:      0.75rem;
    top:        50%;
    transform:  translateY(-50%);
    background: none;
    border:     none;
    padding:    0;
    color:      var(--input-icon);
    font-size:  0.8rem;
    cursor:     pointer;
    line-height: 1;
    z-index:    2;
    transition: color .15s;
}

.input-group-auth .btn-pwd-toggle:hover {
    color: var(--text-heading);
}

.input-group-auth .form-control.has-toggle {
    padding-right: 2.5rem;
}

/* Form field spacing */
.auth-form .field-group {
    margin-bottom: 1.1rem;
}

/* Label row — label + forgot link */
.label-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   0.4rem;
}

.label-row .form-label {
    margin-bottom: 0;
}

.forgot-link {
    font-size:   0.78rem;
    color:       var(--text-link);
    text-decoration: none;
    font-weight: 500;
    transition:  color .15s;
}

.forgot-link:hover {
    color:           var(--text-link-hover);
    text-decoration: underline;
}

/* Remember me */
.auth-form .remember-row {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    margin:      0.5rem 0 1.35rem;
}

.auth-form .form-check-input {
    width:        15px;
    height:       15px;
    border-radius: var(--radius);
    border:       1.5px solid var(--input-border);
    cursor:       pointer;
    flex-shrink:  0;
    margin:       0;
    appearance:   none;
    background:   #fff;
    transition:   border-color .15s, background .15s;
}

.auth-form .form-check-input:checked {
    background-color: var(--primary);
    border-color:     var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2 5.2l2.2 2.2 3.8-4'/%3E%3C/svg%3E");
    background-size:    70%;
    background-repeat:  no-repeat;
    background-position: center;
}

.auth-form .form-check-input:focus {
    outline:    none;
    box-shadow: 0 0 0 3px rgba(228,0,19,.1);
}

.auth-form .form-check-label {
    font-size:   0.8125rem;
    color:       var(--text-body);
    cursor:      pointer;
    user-select: none;
}

/* ── Primary CTA Button ─────────────────────────────────────── */
.btn-signin {
    display:         block;
    width:           100%;
    height:          42px;
    background-color: var(--primary);
    color:           #ffffff;
    font-family:     var(--font);
    font-size:       0.9rem;
    font-weight:     600;
    letter-spacing:  .02em;
    border:          none;
    border-radius:   var(--radius);
    cursor:          pointer;
    transition:      background-color .18s ease;
    outline:         none;
    padding:         0;
}

.btn-signin:hover,
.btn-signin:focus-visible {
    background-color: var(--primary-hover);
}

.btn-signin:focus-visible {
    box-shadow: 0 0 0 3px rgba(228,0,19,.25);
}

/* ── Divider ────────────────────────────────────────────────── */
.auth-divider {
    display:     flex;
    align-items: center;
    gap:         0.75rem;
    margin:      1.4rem 0;
}

.auth-divider span {
    flex:       1;
    height:     1px;
    background: var(--divider);
}

.auth-divider p {
    font-size:  0.75rem;
    color:      var(--text-muted);
    margin:     0;
    white-space: nowrap;
}

/* ── Social Login Buttons ───────────────────────────────────── */
.social-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.btn-social {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             0.5rem;
    height:          40px;
    border:          1px solid var(--input-border);
    border-radius:   var(--radius);
    background:      #ffffff;
    font-family:     var(--font);
    font-size:       0.8125rem;
    font-weight:     500;
    color:           var(--text-heading);
    cursor:          pointer;
    text-decoration: none;
    transition:      border-color .15s ease, background-color .15s ease;
    white-space:     nowrap;
}

.btn-social:hover {
    background-color: var(--page-bg);
    border-color:     #b0b5be;
    color:            var(--text-heading);
}

.btn-social i {
    font-size: 0.875rem;
}

.btn-social.google i  { color: #DB4437; }
.btn-social.facebook i { color: #1877F2; }

/* ── Signup Row ─────────────────────────────────────────────── */
.signup-row {
    text-align:  center;
    font-size:   0.8125rem;
    color:       var(--text-muted);
    margin-top:  1.5rem;
}

.signup-row a {
    color:           var(--text-link);
    font-weight:     600;
    text-decoration: none;
}

.signup-row a:hover {
    color:           var(--text-link-hover);
    text-decoration: underline;
}

/* ── Validation Feedback ────────────────────────────────────── */
.field-error {
    font-size:   0.775rem;
    color:       var(--primary);
    margin-top:  0.3rem;
    display:     flex;
    align-items: center;
    gap:         0.3rem;
}

.field-error i {
    font-size: 0.7rem;
}

/* Alert */
.auth-alert {
    border-radius:    var(--radius);
    padding:          0.7rem 1rem;
    font-size:        0.8375rem;
    margin-bottom:    1.1rem;
    display:          flex;
    align-items:      flex-start;
    gap:              0.5rem;
    border:           1px solid transparent;
}

.auth-alert.error {
    background-color: #fff4f5;
    border-color:     #f5c2c7;
    color:            #8b1523;
}

.auth-alert.success {
    background-color: #f0fdf4;
    border-color:     #bbf7d0;
    color:            #166534;
}

.auth-alert i {
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .auth-wrapper {
        padding: 1.25rem 0.85rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .auth-card {
        flex-direction: column;
        max-width:      460px;
    }

    /* Hide branding panel entirely on mobile */
    .auth-brand {
        display: none !important;
    }

    .auth-login {
        padding: 2rem 1.75rem 2rem;
    }

    /* Show mobile logo */
    .mobile-logo {
        display: flex;
    }

    .social-btns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 399px) {
    .auth-login {
        padding: 1.75rem 1.25rem;
    }

    .social-btns {
        grid-template-columns: 1fr;
    }
} 