/* ==========================================================================
   QPOS authentication theme (login, sign-up, password reset, OTP)
   Presentation-only layer loaded after assets/css/style.min.css.
   ========================================================================== */

:root {
    --qp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --qp-primary: #4f46e5;
    --qp-primary-hover: #4338ca;
    --qp-primary-soft: #eef2ff;
    --qp-text: #0f172a;
    --qp-text-2: #334155;
    --qp-muted: #64748b;
    --qp-subtle: #94a3b8;
    --qp-border: #e6e9f0;
    --qp-border-strong: #d5dae3;
    --qp-danger: #dc2626;
    --qp-ring: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

body {
    margin: 0;
    font-family: var(--qp-font) !important;
    color: var(--qp-text-2);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout ------------------------------------------------------------------ */
.authentications {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    min-height: 100vh;
    padding: 0 !important;
    background: #fff;
}

.authentications .left-content {
    flex: 0 0 46% !important;
    max-width: 46% !important;
    padding: 0 !important;
}

.authentications .right-content {
    display: flex;
    flex: 1 1 auto !important;
    max-width: none !important;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem !important;
}

/* Brand panel ------------------------------------------------------------- */
.qp-auth-aside {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    min-height: 620px;
    padding: 2.5rem 3rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 520px at -10% -20%, rgba(139, 92, 246, 0.55), transparent 60%),
        radial-gradient(700px 480px at 120% 120%, rgba(56, 189, 248, 0.35), transparent 60%),
        linear-gradient(160deg, #1e1b4b 0%, #312e81 48%, #4338ca 100%);
}

.qp-auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 75%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 75%);
    pointer-events: none;
}

.qp-auth-aside > * {
    position: relative;
}

.qp-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff !important;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none !important;
}

.qp-brand-monogram,
.qp-brand-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.qp-brand-monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.qp-auth-aside .qp-brand-monogram {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.qp-brand-logo {
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

/* Full (wide) logo */
.qp-brand-lockup {
    display: inline-flex;
    align-items: center;
}

.qp-brand-lockup img {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.qp-auth-aside .qp-brand-lockup {
    height: 64px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px -14px rgba(15, 23, 42, 0.6);
}

.qp-auth-aside .qp-brand-lockup img {
    height: 100%;
}

.authentication-form-header .logo .qp-brand-lockup img {
    height: 56px;
}

.qp-auth-copy h2 {
    margin: 0 0 0.85rem;
    color: #fff;
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.qp-auth-copy p {
    max-width: 28rem;
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.6;
}

.qp-auth-points {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qp-auth-points li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
}

.qp-auth-points li::before {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3e%3cpath d='M6 10.5l2.5 2.5L14 7.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") no-repeat center / 14px 14px;
}

.qp-auth-art {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.6);
}

.qp-auth-art img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qp-auth-foot {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
}

/* Form -------------------------------------------------------------------- */
.authentication-form {
    width: 100%;
    max-width: 420px;
    gap: 2rem !important;
    padding: 0 !important;
}

.authentication-form-header {
    gap: 0.4rem !important;
}

.authentication-form-header .logo {
    display: none;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    color: var(--qp-text) !important;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none !important;
}

.authentication-form-header .form-title {
    margin: 0;
    color: var(--qp-text) !important;
    font-size: 1.75rem;
    font-weight: 700 !important;
    letter-spacing: -0.025em;
}

.authentication-form-header .form-des {
    margin: 0;
    color: var(--qp-muted);
    font-size: 0.9375rem;
}

.authentication-form-content .row {
    --bs-gutter-y: 1.1rem;
}

.authentication-form-content .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

.authentications .form-group {
    position: relative;
}

.authentications .form-label,
.authentications label:not(.customcheck-label) {
    margin-bottom: 0.4rem;
    color: var(--qp-text-2);
    font-family: var(--qp-font);
    font-size: 0.8125rem;
    font-weight: 600;
}

.authentications .form-control,
.authentications .form-select {
    height: 46px;
    padding: 0.6rem 0.9rem;
    color: var(--qp-text);
    font-family: var(--qp-font);
    font-size: 0.9375rem;
    background-color: #fff;
    border: 1px solid var(--qp-border-strong);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.authentications .form-control::placeholder {
    color: var(--qp-subtle);
}

.authentications .form-control:focus,
.authentications .form-select:focus {
    border-color: var(--qp-primary);
    box-shadow: var(--qp-ring);
    outline: 0;
}

.authentications .form-control[type="password"],
.authentications .form-group:has(.show-hide) .form-control {
    padding-right: 2.75rem;
}

.was-validated .form-control:invalid,
.authentications .form-control.is-invalid {
    border-color: var(--qp-danger);
}

.authentications .invalid-feedback {
    font-size: 0.75rem;
}

/* Password visibility toggle */
.form-group .show-hide {
    top: 1.75rem !important;
    right: 0.35rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 46px;
    border-radius: 8px;
}

.form-group .show-hide svg path {
    stroke: var(--qp-subtle);
}

.form-group .show-hide:hover svg path {
    stroke: var(--qp-text-2);
}

/* Remember me / forgot password */
.rememberbox {
    align-items: center;
}

.customcheck-label {
    color: var(--qp-text-2) !important;
    font-family: var(--qp-font) !important;
    font-size: 0.875rem !important;
}

.customcheck-box:checked ~ .customcheck-label::before {
    background: var(--qp-primary) !important;
    border-color: var(--qp-primary) !important;
}

.authentications .forget,
.authentication-form-footer a,
.authentications a.text-primary {
    color: var(--qp-primary) !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.authentications .forget:hover,
.authentication-form-footer a:hover {
    color: var(--qp-primary-hover) !important;
    text-decoration: underline;
}

/* Primary action */
.create-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 1.5rem !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--qp-primary) !important;
    color: #fff !important;
    font-family: var(--qp-font) !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    box-shadow: 0 10px 22px -10px rgba(79, 70, 229, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.create-account-btn:not([disabled]):hover {
    background: var(--qp-primary-hover) !important;
}

.create-account-btn:active {
    transform: translateY(1px);
}

.create-account-btn:focus-visible {
    outline: 0;
    box-shadow: var(--qp-ring);
}

.google-btn {
    border-radius: 10px !important;
    font-family: var(--qp-font) !important;
}

/* Demo account hint on the login page */
.qp-auth-demo {
    display: grid;
    gap: 0.2rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--qp-primary-soft);
    border: 1px dashed #c7d2fe;
    border-radius: 12px;
    color: var(--qp-text-2);
    font-size: 0.8125rem;
}

.qp-auth-demo-title {
    margin-bottom: 0.2rem;
    color: var(--qp-primary-hover);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.qp-auth-demo p {
    margin: 0;
}

.qp-auth-demo b {
    font-weight: 600;
    color: var(--qp-text);
}

.authentication-form-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--qp-border);
}

.authentication-form-footer p {
    margin: 0;
    color: var(--qp-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* OTP inputs */
.otp-container {
    gap: 0.5rem;
}

.otp-container input[type="text"] {
    width: 3rem !important;
    height: 3.25rem;
    margin: 0 !important;
    border: 1px solid var(--qp-border-strong) !important;
    border-radius: 10px;
    background: #fff;
    font-size: 1.35rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otp-container input[type="text"]:focus {
    border-color: var(--qp-primary) !important;
    box-shadow: var(--qp-ring);
}

.otp-container .filled {
    border-color: var(--qp-primary) !important;
}

/* Flash toasts (components/simple-alert) */
.toast {
    min-width: 280px;
    max-width: 380px;
    border-radius: 12px !important;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.3);
    font-family: var(--qp-font);
    font-size: 0.875rem;
    font-weight: 500;
}

.toast .toast-body {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
}

.toast .toast-body svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Small screens: the form stands alone with its own logo */
@media (max-width: 991.98px) {
    .authentications .left-content {
        display: none !important;
    }

    .authentications .right-content {
        padding: 2.5rem 1.25rem !important;
        background: #f5f7fb;
    }

    .authentication-form {
        padding: 2rem 1.5rem !important;
        background: #fff;
        border: 1px solid var(--qp-border);
        border-radius: 18px;
        box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.2);
    }

    .authentication-form-header .logo {
        display: inline-flex;
    }
}
