/* ==========================================================================
   Dash MFB - Operations Portal
   Auth pages: log in, sign up, password reset.
   ========================================================================== */

:root{
    --primary-color: #4f1a60;
    --primary-color-dark: #370146;
    --primary-color-soft: rgba(79, 26, 96, 0.09);
    --secondary-color-light: #f4edf6;

    --ink: #221726;
    --ink-soft: #46394c;
    --muted: #756b7c;
    --border: #e7e1ea;
    --border-strong: #d6ccdb;
    --card: #ffffff;

    --ok-bg: #e6f6ec;
    --ok-fg: #14612f;
    --risk-bg: #fdf3e0;
    --risk-fg: #8a5a00;
    --overdue-bg: #fbe7e6;
    --overdue-fg: #b3261e;

    --radius-sm: 8px;
    --radius: 12px;
    --ring: 0 0 0 3px rgba(79, 26, 96, 0.28);
    --speed: 140ms;

    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body{
    display: flex;
    color: var(--ink);
    background: var(--card);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container{
    display: flex;
    width: 100%;
    min-height: 100vh;
}

@media (prefers-reduced-motion: reduce){
    *{ transition: none !important; }
}


/* --------------------------------------------------------------------------
   Left brand panel
   -------------------------------------------------------------------------- */

/* Flex children default to min-width:auto, so a long heading stops the panel
   shrinking and the page scrolls sideways on a phone. */
.left, .right{ min-width: 0; }

.left{
    width: 46%;
    background: linear-gradient(160deg, #5c2170 0%, var(--primary-color) 45%, #3b1049 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
}

.left-page{
    padding: 56px 48px;
    width: 100%;
}

.head{
    display: flex;
    gap: 12px;
    margin-bottom: 72px;
    align-items: center;
}

.head img,
.head2 img{
    width: 40px;
    height: 40px;
    border-radius: 9px;
    object-fit: cover;
    flex: 0 0 40px;
}

.head p:first-child{
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

.head p{
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.78;
}

.left-bottom h2{
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
    max-width: 16ch;
}

.left-bottom li{
    list-style: none;
    font-size: 15px;
    margin: 0 0 14px;
    padding: 0 0 0 28px;
    position: relative;
    opacity: 0.9;
}

.left-bottom li::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 14px;
    height: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid rgba(255, 255, 255, 0.85);
    transform: rotate(-45deg);
}


/* --------------------------------------------------------------------------
   Right form panel
   -------------------------------------------------------------------------- */

.right{
    width: 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.right-page{
    width: 100%;
    max-width: 420px;
}

.head2{
    display: none;
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
}

.head2 span{
    display: flex;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

h1{
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    overflow-wrap: break-word;
    text-wrap: balance;
}

/* The intro paragraph under the heading. Scoped away from the alert and
   footer paragraphs, which are also direct children of .right-page and
   would otherwise inherit the muted colour from this rule. */
.right-page > p:not(.form-alert):not(.auth-switch):not(.field-hint):not(.error-text){
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 26px;
}


/* ---- Fields ---- */

.input-group{
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.input-group label{
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 7px;
}

.input-icon-wrap{
    position: relative;
    display: flex;
    align-items: center;
}

input{
    width: 100%;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    padding: 10px 12px 10px 40px;
    font-size: 14px;
    color: var(--ink);
    background: var(--card);
    transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}

input::placeholder{ color: #a79fac; }

input:hover{ border-color: var(--muted); }

input:focus{
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--ring);
}

input:disabled{
    background: #f6f4f7;
    color: var(--muted);
    cursor: not-allowed;
}

.input-icon{
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
}

.input-icon-wrap:focus-within .input-icon{ color: var(--primary-color); }

.input-icon-btn{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    border-radius: 6px;
    display: inline-flex;
    transition: color var(--speed) ease, background var(--speed) ease;
}

.input-icon-btn:hover{
    color: var(--primary-color);
    background: var(--secondary-color-light);
}

.input-icon-wrap input[type="password"],
.input-icon-wrap input[type="text"]{ padding-right: 44px; }

.field-hint{
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 7px;
}

.error-text{
    color: var(--overdue-fg);
    font-size: 12px;
    margin-top: 6px;
}


/* ---- Messages ---- */

.messages{ margin-bottom: 4px; }

.form-alert{
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
    background: #f2f0f4;
    border: 1px solid var(--border-strong);
    color: var(--ink-soft);
}

.form-alert--success{ background: var(--ok-bg);      border-color: #a9d8ba; color: var(--ok-fg); }
.form-alert--error{   background: var(--overdue-bg); border-color: #f0bdb9; color: var(--overdue-fg); }
.form-alert--warning{ background: var(--risk-bg);    border-color: #f0d5a2; color: var(--risk-fg); }


/* ---- Buttons & links ---- */

.options{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: -4px 0 20px;
}

.options a{
    text-decoration: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
}

.options a:hover{ text-decoration: underline; }

.btn{
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    width: 100%;
    height: 46px;
    cursor: pointer;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    transition: background var(--speed) ease, transform var(--speed) ease;
}

.btn:hover{ background: var(--primary-color-dark); }
.btn:active{ transform: translateY(1px); }

.btn:disabled{
    background: var(--border-strong);
    color: #ffffff;
    cursor: not-allowed;
}

/* An <a> that should look like the primary button */
.btn-link{
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.divider{
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after{
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span{
    margin: 0 16px;
    color: var(--muted);
    font-size: 12px;
}

.google,
.google-btn{
    width: 100%;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border-strong);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--card);
    transition: background var(--speed) ease, border-color var(--speed) ease;
}

.google:hover,
.google-btn:hover{
    background: #faf8fb;
    border-color: var(--muted);
}

/* It's an <a>, so it needs the link styling neutralised */
.google-btn{
    text-decoration: none;
    color: var(--ink-soft);
}

.google p,
.google-btn p{ font-size: 14px; }

.auth-switch{
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--muted);
}

.auth-switch a{
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover{ text-decoration: underline; }

.hidden{ display: none; }

a:focus-visible,
button:focus-visible{
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px){
    .left-page{ padding: 40px 32px; }
    .left-bottom h2{ font-size: 24px; }
    .left-bottom li{ font-size: 14px; }
    .right{ padding: 32px 20px; }
}

@media (max-width: 740px){
    .left{ display: none; }
    .right{ width: 100%; align-items: flex-start; padding: 32px 20px 48px; }
    .right-page{ max-width: 100%; }
    .head2{ display: flex; }
    h1{ font-size: 21px; }
}

@media (max-width: 380px){
    .right{ padding: 24px 16px 40px; }
    h1{ font-size: 20px; }
    .right-page > p{ font-size: 13px; }
}
