/* Auth modal styled to match the app palette & fonts from landing.css */
.auth-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    font-family: var(--font-body);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.auth-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.6));
    opacity: 0;
    transition: opacity 220ms ease;
}

.auth-panel {
    position: relative;
    background: var(--color-cream);
    width: 900px;
    max-width: 95%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 2;
    height: 560px;
    transform: translateY(8px) scale(0.995);
    transition: transform 260ms cubic-bezier(.2,.9,.28,1), box-shadow 220ms ease;
}

.auth-modal[aria-hidden="false"] .auth-panel {
    transform: translateY(0) scale(1);
}

.auth-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--color-charcoal);
    cursor: pointer
}

.auth-back {
    position: absolute;
    left: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--color-charcoal);
    cursor: pointer
}

.auth-grid {
    display: flex;
    height: 100%
}

.auth-left {
    flex: 1;
    padding: 18px 20px;
    background: var(--color-white);
    overflow: hidden;
    padding-bottom: 18px
}

.auth-right {
    width: 380px;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.brand-right {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(177, 9, 9, 0.92), rgba(90, 5, 2, 0.95)), url('../assets/icons/app_icon_transparent.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.22))
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 18px;
    color: var(--color-cream-light)
}

.brand-logo {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px;
    margin: 0 auto 8px
}

.brand-title {
    margin: 0;
    font-family: var(--font-secondary);
    font-size: 20px
}

.brand-sub {
    margin: 6px 0 0;
    color: var(--white-80)
}

.auth-brand {
    font-weight: 800;
    justify-content: center;
    margin: 0 auto;
    color: var(--color-red);
    font-size: 20px;
    font-family: var(--font-secondary);
    margin-bottom: 6px
}

.auth-heading {
    font-weight: 800;
    justify-content: center;
    margin: 0 auto;
    text-align: center;
    color: var(--color-charcoal);
    font-size: 20px;
    font-family: var(--font-display);
    margin-bottom: 6px;
    padding: 0px 60px;
}

.auth-sub {
    color: var(--color-charcoal);
    font-family: var(--font-secondary);
    justify-content: center;
}

.auth-forms {
    margin-top: 12px
}

.auth-form {
    display: none
}

.auth-form.active {
    display: block
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-charcoal);
    font-size: 13px
}

.auth-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    border-radius: 8px;
    margin-top: 6px;
    font-family: var(--font-body)
}

/* Simple login form layout (compact) */
.auth-login-simple {
    max-width: 360px
}

.auth-login-simple .field-wrap {
    margin-bottom: 10px
}

.auth-login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 800
}

.auth-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 10px;
}

.auth-meta-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-red);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
    min-height: 20px;
    margin: 0;
    white-space: nowrap;
}

.auth-meta-link:hover,
.auth-meta-link:focus-visible {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .auth-login-meta {
        flex-wrap: wrap;
        align-items: flex-start;
    }
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-gray);
    position: relative;
    padding-left: 28px;
    margin: 0;
    line-height: 1.2;
    flex: 0 0 auto;
}

/* Hide native checkbox but keep it keyboard-accessible */
.remember-row input {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0;
    cursor: pointer;
}

.remember-row .text {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
}

.auth-tos {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-gray)
}

.auth-tos a {
    font-weight: 800;
    color: var(--color-red)
}

/* Custom box */
.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(26,26,26,0.2);
    border-radius: 6px;
    display: inline-block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: white;
}

/* Tick (hidden by default) */
.checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.14s ease;
}

/* When checked */
.remember-row input:checked + .checkmark {
    background-color: var(--color-red);
    border-color: var(--color-red-dark);
}

/* Animate tick */
.remember-row input:checked + .checkmark::after {
    transform: rotate(45deg) scale(1);
}
.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    background: transparent;
    cursor: pointer
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-red-mid), var(--color-red-dark));
    color: var(--color-white);
    border-color: transparent
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-white)
}

.auth-or {
    margin: 12px 0;
    text-align: center;
    color: var(--color-gray)
}

.auth-tos {
    font-size: 12px;
    color: var(--color-gray);
    margin-top: 12px
}

.auth-toggle {
    font-size: 13px;
    margin-top: 10px
}

.images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 18px;
    width: 100%;
    height: 100%
}

.images-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.95
}

.hidden {
    display: none
}

.reg-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    position: sticky;
    bottom: 18px;
    background: transparent;
    padding-top: 8px
}

.reg-complete {
    padding: 18px;
    background: var(--color-cream-soft);
    border-radius: 6px;
    color: var(--color-black)
}

/* Floating label (field-wrap) to match vendor dashboard settings */
.field-wrap {
    position: relative;
    margin-bottom: 8px
}

.field-wrap input,
.field-wrap textarea,
.field-wrap select {
    width: 100%;
    border: 1px solid #e6c4b5;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    color: var(--color-charcoal);
    padding: 0.72rem 0.6rem 0.36rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease
}

/* When a field has a toggle, make room for the button */
.field-wrap.has-toggle input,
.field-wrap.has-toggle textarea {
    padding-right: 2.6rem;
}

/* Password toggle button */
.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--color-gray);
    font-size: 1rem;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pw-toggle:focus {
    outline: 2px solid var(--color-red-dark);
    outline-offset: 2px;
}

.field-wrap label {
    position: absolute;
    left: 0.6rem;
    top: 0.62rem;
    color: #7f5b4b;
    font-size: 0.8rem;
    pointer-events: none;
    transition: all 0.16s ease;
    background: #fff;
    padding: 0 0.18rem
}

.field-wrap input:focus,
.field-wrap textarea:focus,
.field-wrap select:focus {
    outline: 0;
    border-color: var(--color-red-mid);
    box-shadow: 0 0 0 3px rgba(173, 44, 20, 0.2)
}

.field-wrap input:focus ~ label,
.field-wrap input:not(:placeholder-shown) ~ label,
.field-wrap textarea:focus ~ label,
.field-wrap textarea:not(:placeholder-shown) ~ label,
.field-wrap select:focus ~ label,
.field-wrap select:not([value=""]) ~ label {
    top: -0.45rem;
    font-size: 0.74rem;
    color: var(--color-red)
}

/* Role buttons */
.role-options {
    display: flex;
    gap: 8px
}

.role-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px
}

.role-btn.is-selected {
    background: linear-gradient(135deg, var(--color-cream-light), var(--color-cream));
    border-color: var(--color-red-mid);
    box-shadow: 0 8px 20px rgba(122, 12, 6, 0.06)
}

/* Password strength */
.pw-strength {
    margin: 6px 0 8px
}

.strength-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 6px
}

.strength-bar .bar {
    flex: 1;
    height: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06)
}

.strength-bar .bar.on {
    background: linear-gradient(90deg, #ff9a76, #b10909)
}

/* Strength color variants */
.strength-bar.strength-0 .bar.on {
    background: linear-gradient(90deg, #ff4d4f, #b10909)
}

.strength-bar.strength-1 .bar.on {
    background: linear-gradient(90deg, #ff6b6b, #d64545)
}

.strength-bar.strength-2 .bar.on {
    background: linear-gradient(90deg, #ffd166, #f0a500)
}

.strength-bar.strength-3 .bar.on {
    background: linear-gradient(90deg, #9be564, #57b846)
}

.strength-bar.strength-4 .bar.on {
    background: linear-gradient(90deg, #4ade80, #16a34a)
}

.pw-criteria {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 12px;
    color: #8a6b60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px
}

.pw-criteria li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0
}

.pw-criteria li.met {
    color: var(--color-red)
}

.pw-criteria li.met::before {
    content: '✔';
    color: var(--color-red);
    margin-right: 6px;
    font-size: 12px
}

.pw-criteria li::before {
    content: '○';
    color: #c9b3aa;
    margin-right: 6px;
    font-size: 12px
}

.mismatch {
    box-shadow: 0 0 0 3px rgba(177, 9, 9, 0.12)
}

/* Override: left-align auth left panel and tighten login layout */
.auth-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-cream);
    gap: 8px
}

.auth-forms {
    width: 100%
}

.auth-login-simple {
    max-width: 450px;
    width: 100%;
    margin: 6px 0 0 0
}

.auth-login-simple .field-wrap {
    width: 100%
}

.auth-login-simple .field-wrap input {
    padding: 12px 14px;
    border-radius: 10px
}

.auth-login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 18px 30px rgba(177, 9, 9, 0.18)
}

.auth-brand,
.auth-heading,
.auth-sub-title{
    color: var(--color-charcoal);
    font-family: var(--font-secondary);
    font-size: 24px;
    text-align: center;
    align-self: center;
    width: 100%;
}
.auth-sub-description{
    color: var(--color-gray);
    font-family: var(--font-secondary);
    font-size: 14px;
    text-align: center;
    padding : 0px 60px;
}

.auth-forms .auth-tos {
    margin-top: 12px
}

/* Auth modal styled to match the app palette & fonts from landing.css */
.auth-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    font-family: var(--font-body);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.auth-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-modal[aria-hidden="false"] .auth-backdrop {
    opacity: 1;
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.6))
}

.auth-panel {
    position: relative;
    background: var(--color-cream);
    width: 900px;
    max-width: 95%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 2;
    height: 560px;
    transform: translateY(8px) scale(0.995);
    transition: transform 260ms cubic-bezier(.2,.9,.28,1), box-shadow 220ms ease;
}

.auth-modal[aria-hidden="false"] .auth-panel {
    transform: translateY(0) scale(1);
}

.auth-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--color-charcoal);
    cursor: pointer
}

.auth-back {
    position: absolute;
    left: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--color-charcoal);
    cursor: pointer
}

.auth-grid {
    display: flex;
    height: 100%
}

.auth-left {
    flex: 1;
    padding: 18px 20px;
    background: var(--color-white);
    overflow: hidden;
    padding-bottom: 18px
}

.auth-right {
    width: 380px;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.brand-right {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(177, 9, 9, 0.92), rgba(90, 5, 2, 0.95)), url('../assets/icons/app_icon_transparent.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.22))
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 18px;
    color: var(--color-cream-light)
}

.brand-logo {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px;
    margin: 0 auto 8px
}

.brand-title {
    margin: 0;
    font-family: var(--font-secondary);
    font-size: 20px
}

.brand-sub {
    margin: 6px 0 0;
    color: var(--white-80)
}

.auth-brand {
    font-weight: 800;
    color: var(--color-red);
    font-size: 20px;
    font-family: var(--font-secondary);
    margin-bottom: 6px
}

.auth-heading {
    margin: 6px 0 4px;
    font-size: 22px;
    font-family: var(--font-display)
}

.auth-sub {
    color: var(--color-gray);
    margin-bottom: 8px
}

.auth-forms {
    margin-top: 12px;
    padding: 0px 60px;
}

.auth-form {
    display: none
}

.auth-form.active {
    display: block
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-charcoal);
    font-size: 13px
}

.auth-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    border-radius: 8px;
    margin-top: 6px;
    font-family: var(--font-body)
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    background: transparent;
    cursor: pointer
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-red-mid), var(--color-red-dark));
    color: var(--color-white);
    border-color: transparent
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-white)
}

.auth-or {
    margin: 12px 0;
    text-align: center;
    color: var(--color-gray)
}

.auth-tos {
    font-size: 12px;
    color: var(--color-gray);
    margin-top: 12px
}

.auth-toggle {
    font-size: 13px;
    margin-top: 10px
}

.images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 18px;
    width: 100%;
    height: 100%
}

.images-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.95
}

.hidden {
    display: none
}

.reg-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    position: sticky;
    bottom: 18px;
    background: transparent;
    padding-top: 8px
}

.reg-complete {
    padding: 18px;
    background: var(--color-cream-soft);
    border-radius: 6px;
    color: var(--color-black)
}

/* Floating label (field-wrap) to match vendor dashboard settings */
.field-wrap {
    position: relative;
    margin-bottom: 8px
}

.field-wrap input,
.field-wrap textarea,
.field-wrap select {
    width: 100%;
    border: 1px solid #e6c4b5;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    color: var(--color-charcoal);
    padding: 0.72rem 0.6rem 0.36rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease
}

.field-wrap label {
    position: absolute;
    left: 0.6rem;
    top: 0.62rem;
    color: #7f5b4b;
    font-size: 0.8rem;
    pointer-events: none;
    transition: all 0.16s ease;
    background: #fff;
    padding: 0 0.18rem
}

.field-wrap input:focus,
.field-wrap textarea:focus,
.field-wrap select:focus {
    outline: 0;
    border-color: var(--color-red-mid);
    box-shadow: 0 0 0 3px rgba(173, 44, 20, 0.2)
}

.field-wrap input:focus ~ label,
.field-wrap input:not(:placeholder-shown) ~ label,
.field-wrap textarea:focus ~ label,
.field-wrap textarea:not(:placeholder-shown) ~ label,
.field-wrap select:focus ~ label,
.field-wrap select:not([value=""]) ~ label {
    top: -0.45rem;
    font-size: 0.74rem;
    color: var(--color-red)
}

/* Role buttons */
.role-options {
    display: flex;
    gap: 8px
}

.role-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.06);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px
}

.role-btn.is-selected {
    background: linear-gradient(135deg, var(--color-cream-light), var(--color-cream));
    border-color: var(--color-red-mid);
    box-shadow: 0 8px 20px rgba(122, 12, 6, 0.06)
}

/* Password strength */
.pw-strength {
    margin: 6px 0 8px
}

.strength-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 6px
}

.strength-bar .bar {
    flex: 1;
    height: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06)
}

.strength-bar .bar.on {
    background: linear-gradient(90deg, #ff9a76, #b10909)
}

/* Strength color variants */
.strength-bar.strength-0 .bar.on {
    background: linear-gradient(90deg, #ff4d4f, #b10909)
}

.strength-bar.strength-1 .bar.on {
    background: linear-gradient(90deg, #ff6b6b, #d64545)
}

.strength-bar.strength-2 .bar.on {
    background: linear-gradient(90deg, #ffd166, #f0a500)
}

.strength-bar.strength-3 .bar.on {
    background: linear-gradient(90deg, #9be564, #57b846)
}

.strength-bar.strength-4 .bar.on {
    background: linear-gradient(90deg, #4ade80, #16a34a)
}

.pw-criteria {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 12px;
    color: #8a6b60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px
}

.pw-criteria li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0
}

.pw-criteria li.met {
    color: var(--color-red)
}

.pw-criteria li.met::before {
    content: '✔';
    color: var(--color-red);
    margin-right: 6px;
    font-size: 12px
}

.pw-criteria li::before {
    content: '○';
    color: #c9b3aa;
    margin-right: 6px;
    font-size: 12px
}

.mismatch {
    box-shadow: 0 0 0 3px rgba(177, 9, 9, 0.12)
}

@import "./auth-modal-additions.css";
