@import "../plugins/bootstrap/css/bootstrap.min.css";
@import "../plugins/line-awesome/css/line-awesome.css";
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Outfit:wght@200..800&display=swap");

/* ============================================================
   PLASMA PEN — onboarding & auth, "clinical luxury" redesign
   Deep aubergine + plasma glow · Fraunces / Outfit
   ============================================================ */

:root {
    --uw-black: #000000;
    --uw-ink: #141414;
    --uw-ink-soft: #3f3f3f;
    --uw-white: #ffffff;
    --uw-paper: #fafafa;
    --uw-card: #ffffff;
    --uw-text: #141414;
    --uw-muted: #8a8a8a;
    --uw-border: #e4e4e4;
    --uw-purple: #000000;
    --uw-purple-deep: #2b2b2b;
    --uw-purple-soft: #f4f4f4;
    --uw-purple-line: #dedede;
    --uw-glow-a: rgba(255, 255, 255, 0.10);
    --uw-glow-b: rgba(255, 255, 255, 0.05);
    --uw-card-radius: 26px;
    --uw-dark-surface:
        radial-gradient(85% 130% at 85% -5%, var(--uw-glow-a), transparent 55%),
        radial-gradient(70% 110% at 8% 108%, var(--uw-glow-b), transparent 58%),
        linear-gradient(155deg, #111111 0%, #000000 58%, #000000 100%);
}

* { box-sizing: border-box; }

body {
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    color: var(--uw-text);
    background: var(--uw-paper);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--uw-purple); color: #fff; }

/* ---------- page loader ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--uw-dark-surface);
}

.loader .text {
    color: #cfcfcf;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

@keyframes uw-loader-dot {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
    40% { transform: scale(1); opacity: 1; }
}

.loader span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    border-radius: 50%;
    background: #ffffff;
    animation: uw-loader-dot 1.2s ease-in-out infinite;
}

.loader span:nth-child(2) { animation-delay: 0.15s; background: #f0b429; }
.loader span:nth-child(3) { animation-delay: 0.3s; background: #8a8a8a; }

/* ---------- welcome (landing) page ---------- */
@keyframes uw-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes uw-glow-drift {
    0%, 100% { background-position: 0% 0%, 100% 100%, 0 0; }
    50% { background-position: 70% 45%, 30% 55%, 0 0; }
}

.uw-welcome {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: var(--uw-dark-surface);
    background-size: 170% 170%, 170% 170%, 100% 100%;
    animation: uw-glow-drift 16s ease-in-out infinite;
    color: var(--uw-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 24px;
}

.uw-welcome::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.uw-welcome > * { position: relative; z-index: 1; }

.uw-welcome .uw-logo { animation: uw-rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) both; }
.uw-welcome .uw-logo img { width: 300px; max-width: 78vw; }

.uw-welcome h1 {
    font-family: "Fraunces", serif;
    font-size: 40px;
    font-weight: 400;
    letter-spacing: -0.015em;
    color: #f5f5f5;
    margin: 48px auto 22px;
    max-width: 760px;
    line-height: 1.22;
    animation: uw-rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) 0.12s both;
}

.uw-welcome p {
    font-size: 17px;
    font-weight: 300;
    color: #bdbdbd;
    max-width: 640px;
    line-height: 1.75;
    margin: 0 auto 46px;
    animation: uw-rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) 0.22s both;
}

.uw-welcome .uw-actions {
    width: 100%;
    max-width: 620px;
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: uw-rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) 0.32s both;
}

.uw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.uw-btn-outline-light {
    background: rgba(255, 255, 255, 0.04);
    color: var(--uw-white);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.uw-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
    color: var(--uw-white);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
}

.uw-btn-light {
    background: var(--uw-white);
    color: #000000;
    border: 1px solid var(--uw-white);
}

.uw-btn-light:hover {
    background: #e6e6e6;
    border-color: #e6e6e6;
    color: #000000;
    box-shadow: 0 10px 30px -8px rgba(255, 255, 255, 0.5);
}

.uw-welcome .uw-terms {
    margin-top: 56px;
    font-size: 14.5px;
    font-weight: 300;
    color: #9a9a9a;
    animation: uw-rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) 0.42s both;
}

.uw-welcome .uw-terms a {
    color: #cfcfcf;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.uw-welcome .uw-terms a:hover { color: var(--uw-white); }

/* ---------- auth pages (login / signup / forgot / otp / reset) ----------
   Split-screen on desktop: dark plasma panel left, form right.
   DOM order: .uw-hero, .uw-auth-card, .uw-auth-links                      */

.uw-auth-page {
    min-height: 100vh;
    background: var(--uw-paper);
    padding-bottom: 60px;
}

.uw-hero {
    position: relative;
    overflow: hidden;
    height: 300px;
    background: var(--uw-dark-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.uw-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.uw-hero .uw-hero-logo { position: relative; z-index: 1; text-align: center; }
.uw-hero .uw-hero-logo img { width: 270px; max-width: 68vw; margin-top: 46px; }

.uw-hero .uw-back {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 26px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--uw-white);
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.uw-hero .uw-back:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateX(-2px);
}

.uw-hero .uw-hero-title {
    position: absolute;
    z-index: 1;
    top: 36px;
    left: 0;
    right: 0;
    text-align: center;
    color: #cfcfcf;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.uw-auth-card {
    background: var(--uw-card);
    max-width: 560px;
    margin: -84px auto 0;
    border-radius: var(--uw-card-radius);
    border: 1px solid var(--uw-border);
    padding: 44px 40px 38px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 30px 60px -24px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 2;
    animation: uw-rise 0.6s cubic-bezier(0.22, 0.9, 0.3, 1) 0.08s both;
}

.uw-auth-card .form-group {
    margin-bottom: 20px;
    position: relative;
}

.uw-input-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--uw-purple);
    pointer-events: none;
    transition: color 0.2s ease;
}

.uw-auth-card input.form-control {
    border: 1px solid var(--uw-border);
    background: #f7f7f7;
    border-radius: 16px;
    padding: 15px 18px 15px 56px;
    font-size: 15.5px;
    font-family: inherit;
    color: var(--uw-text);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.uw-auth-card input.form-control::placeholder { color: #a6a6a6; }

.uw-auth-card input.form-control:focus {
    border-color: var(--uw-purple);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
}

.uw-toggle-password {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--uw-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

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

.uw-forgot {
    text-align: right;
    margin: -4px 0 22px;
}

.uw-forgot a {
    color: var(--uw-purple);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}

.uw-forgot a:hover { text-decoration: underline; text-underline-offset: 3px; }

.uw-btn-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 30px;
    background: var(--uw-black);
    color: var(--uw-white);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 999px;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.uw-btn-dark:hover {
    background: var(--uw-purple-deep);
    color: var(--uw-white);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.55);
}

.uw-btn-dark:active { transform: translateY(1px); }

/* profile image upload (signup) */
.uw-upload {
    border: 2px dashed var(--uw-purple-line);
    border-radius: 16px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    color: var(--uw-muted);
    font-size: 15px;
    background: var(--uw-purple-soft);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.uw-upload:hover { border-color: var(--uw-purple); background: #ececec; }

.uw-upload .la-image {
    font-size: 26px;
    color: var(--uw-purple);
}

.uw-upload .uw-upload-arrow {
    margin-left: auto;
    font-size: 21px;
    color: var(--uw-purple);
}

.uw-upload .uw-upload-preview {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    display: none;
    border: 1px solid var(--uw-purple-line);
}

.uw-auth-links {
    text-align: center;
    margin-top: 30px;
    font-size: 15.5px;
    color: var(--uw-ink-soft);
    animation: uw-rise 0.6s cubic-bezier(0.22, 0.9, 0.3, 1) 0.18s both;
}

.uw-auth-links p { margin-bottom: 8px; }

.uw-auth-links a {
    color: var(--uw-purple);
    font-weight: 600;
    text-decoration: none;
}

.uw-auth-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* headings inside cards (forgot / otp / reset) */
.uw-auth-card h2 {
    font-family: "Fraunces", serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 10px;
}

.uw-auth-card .uw-sub {
    text-align: center;
    color: var(--uw-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* otp boxes */
.uw-otp-boxes {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 28px;
}

.uw-otp-boxes input {
    width: 64px;
    height: 64px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    font-family: inherit;
    background: #f7f7f7;
    border: 1px solid var(--uw-border);
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uw-otp-boxes input:focus {
    border-color: var(--uw-purple);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
    background: #ffffff;
}

/* validation */
.uw-auth-card span.invalid-feedback {
    display: block;
    text-align: left;
    font-size: 13px;
    margin-top: 6px;
}

.uw-auth-card input.is-invalid {
    border-color: #c14a5a;
    background-image: none;
}

/* toastr theme */
#toast-container > .toast {
    border-radius: 14px;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.4);
    font-family: "Outfit", sans-serif;
    opacity: 1;
}

.toast.toast-error { background: #b8422f; }
.toast.toast-success { background: #2f7d54; }
.toast.toast-info { background: var(--uw-purple-deep); }

/* ---------- desktop: split-screen auth layout ---------- */
@media (min-width: 992px) {
    .uw-auth-page {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        grid-template-rows: 1fr auto 1fr;
        min-height: 100vh;
        padding-bottom: 0;
    }

    .uw-hero {
        grid-column: 1;
        grid-row: 1 / 4;
        height: auto;
        min-height: 100vh;
    }

    .uw-hero .uw-hero-logo img { width: 320px; margin-top: 0; }

    .uw-hero .uw-hero-title {
        top: auto;
        bottom: 44px;
        font-size: 14px;
    }

    .uw-auth-card {
        grid-column: 2;
        grid-row: 2;
        width: min(520px, calc(100% - 96px));
        margin: 0 auto;
    }

    .uw-auth-links {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        margin-top: 26px;
    }
}

/* ---------- small screens ---------- */
@media (max-width: 991px) {
    .uw-welcome .uw-actions { flex-direction: column; max-width: 480px; }
    .uw-welcome h1 { font-size: 32px; }
}

@media (max-width: 575px) {
    .uw-hero { height: 264px; }
    .uw-hero .uw-hero-logo img { width: 220px; }
    .uw-auth-card {
        margin: -64px 18px 0;
        padding: 32px 24px 28px;
    }
    .uw-welcome h1 { font-size: 27px; }
    .uw-welcome .uw-logo img { width: 230px; }
    .uw-otp-boxes input { width: 56px; height: 56px; }
}
