/* ========================================
   Login Page Styles - Modern Two-Panel Design
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:       #c94040;
  --red-hover: #e05252;
  --g100:      #f5f5f7;
  --g200:      #e8e8ec;
  --g400:      #9898a8;
  --g700:      #3c3c4a;
  --g900:      #18181f;
  --white:     #ffffff;
  --left-w:    380px;
}

html, body { height: 100%; overflow: hidden; font-family: "DM Sans", sans-serif; background: var(--white); position: relative; }

.page { display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; overflow: hidden; }

/* ── LEFT: CENTERED LOGIN FORM ── */
.left {
  width: var(--left-w);
  min-width: var(--left-w);
  max-width: var(--left-w);
  background: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px 40px;
  border-radius: 3px;
  border: 1px solid var(--g200);
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
  z-index: 2;
  animation: fadeIn .65s cubic-bezier(.22,.88,.34,1) both;
}
@keyframes fadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; animation: fadeUp .45s .1s both; text-decoration: none; transition: opacity .2s; }
.brand:hover { opacity: 0.8; }
.brand-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--red); display: grid; place-items: center; flex-shrink: 0; }
.brand-icon svg { width: 18px; height: 18px; fill: white; }
.brand-name { font-family: "Fraunces", serif; font-size: 15px; font-weight: 700; color: var(--g900); line-height: 1.2; }
.brand-name small { display: block; font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 400; color: var(--g400); letter-spacing: .04em; }

.login-heading { font-family: "Fraunces", serif; font-size: 28px; font-weight: 900; color: var(--g900); line-height: 1.15; margin-bottom: 6px; animation: fadeUp .45s .18s both; }
.login-sub { font-size: 12.5px; color: var(--g400); margin-bottom: 28px; animation: fadeUp .45s .24s both; }

.field { margin-bottom: 16px; animation: fadeUp .45s both; }
.field:nth-child(1){animation-delay:.3s} .field:nth-child(2){animation-delay:.36s}
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--g700); margin-bottom: 5px; }
.inp-wrap { position: relative; }
.inp-wrap input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--g200); border-radius: 9px;
  font-size: 13px; font-family: "DM Sans", sans-serif;
  color: var(--g900); background: var(--g100); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.inp-wrap input:focus { border-color: var(--red); background: var(--white); box-shadow: 0 0 0 4px rgba(201,64,64,.07); }
.inp-wrap input::placeholder { color: var(--g400); }
.eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--g400); display: grid; place-items: center; transition: color .2s; }
.eye:hover { color: var(--g700); }

.row-check { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; animation: fadeUp .45s .42s both; }
.remember { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g400); cursor: pointer; }
.remember input { accent-color: var(--red); cursor: pointer; }
.forgot { font-size: 12px; color: var(--red); text-decoration: none; font-weight: 500; }
.forgot:hover { text-decoration: underline; }

.btn-login {
  width: 100%; padding: 13px; background: var(--red); color: white;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  font-family: "DM Sans", sans-serif; letter-spacing: .02em; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  animation: fadeUp .45s .48s both;
}
.btn-login:hover { background: var(--red-hover); box-shadow: 0 6px 22px rgba(201,64,64,.28); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; animation: fadeUp .45s .54s both; }
.divider::before, .divider::after { content:""; flex:1; height:1px; background: var(--g200); }
.divider span { font-size: 10px; color: var(--g400); white-space: nowrap; }
.foot-note { text-align: center; font-size: 10px; color: var(--g400); animation: fadeUp .45s .6s both; }

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

/* Error message styling */
.error-message {
    background-color: #fee; 
    color: #c33;
    padding: 10px 14px;
    border-radius: 9px;
    margin-bottom: 14px;
    font-size: 12px;
    display: none;
    border: 1.5px solid #fcc;
    animation: fadeUp .35s both;
}

.error-message.show {
    display: block;
}

/* Password Toggle compatibility */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--g400);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: color 0.2s;
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--g700);
}

.password-toggle .eye-icon {
    width: 16px;
    height: 16px;
    display: block;
}

/* Form group compatibility */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--g700);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--g200);
    border-radius: 9px;
    font-size: 13px;
    font-family: "DM Sans", sans-serif;
    color: var(--g900);
    background: var(--g100);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.form-control:focus {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(201,64,64,.07);
}

.form-control::placeholder {
    color: var(--g400);
}

/* Remember/Forgot compatibility */
.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    animation: fadeUp .45s .42s both;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--g400);
    cursor: pointer;
    font-weight: normal;
}

.remember-forgot input[type="checkbox"] {
    accent-color: var(--red);
    cursor: pointer;
    width: auto;
}

.remember-forgot a {
    font-size: 12px;
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 968px) {
    .left {
        width: 90%;
        max-width: 450px;
        min-width: 0;
    }
}

@media (max-width: 500px) {
    .left {
        padding: 28px 24px;
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .brand {
        margin-bottom: 28px;
    }
    
    .login-heading {
        font-size: 24px;
    }
    
    .login-sub {
        font-size: 12px;
    }
    
    /* Prevent mobile zoom on input focus - set font-size to 16px minimum */
    .inp-wrap input,
    .form-control {
        font-size: 16px;
    }
}
