/* ============================================================
   Happye — Admin sign-in (unique layout, standalone)
   Namespace: hx-  |  No dependency on login.css / theme tokens
   ============================================================ */

:root {
    --hx-ink: #1c1830;
    --hx-ink-soft: #5d5878;
    --hx-line: #e5e2f0;
    --hx-field-bg: #ffffff;
    --hx-violet: #6d28d9;
    --hx-magenta: #db2777;
    --hx-grad: linear-gradient(120deg, #6d28d9 0%, #a21caf 55%, #db2777 100%);
    --hx-grad-deep: linear-gradient(155deg, #1e1040 0%, #3b1178 42%, #7c1d92 78%, #b5179e 100%);
    --hx-danger-bg: #fef2f2;
    --hx-danger-line: #fecaca;
    --hx-danger-text: #b91c1c;
    --hx-radius: 16px;
    --hx-font: "Manrope", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

.hx-body {
    margin: 0;
    font-family: var(--hx-font);
    color: var(--hx-ink);
    background: #f6f5fa;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Stage layout ---------- */

.hx-auth {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Showcase (brand side) ---------- */

.hx-showcase {
    position: relative;
    overflow: hidden;
    background: var(--hx-grad-deep);
    background-size: 180% 180%;
    animation: hx-pan 22s ease-in-out infinite alternate;
    color: #fff;
    display: flex;
    align-items: center;
}

@keyframes hx-pan {
    from { background-position: 0% 30%; }
    to   { background-position: 90% 70%; }
}

.hx-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
}

.hx-blob-a {
    width: 480px; height: 480px;
    top: -160px; inset-inline-start: -120px;
    background: #f472b6;
    animation: hx-drift 16s ease-in-out infinite alternate;
}

.hx-blob-b {
    width: 420px; height: 420px;
    bottom: -180px; inset-inline-end: -100px;
    background: #38bdf8;
    opacity: 0.35;
    animation: hx-drift 20s ease-in-out infinite alternate-reverse;
}

.hx-blob-c {
    width: 260px; height: 260px;
    top: 44%; inset-inline-start: 46%;
    background: #facc15;
    opacity: 0.22;
    animation: hx-drift 13s ease-in-out infinite alternate;
}

@keyframes hx-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(36px, -28px) scale(1.08); }
}

.hx-gridlines {
    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: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 80% at 40% 45%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 45%, #000 30%, transparent 75%);
    pointer-events: none;
}

.hx-showcase-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 64px 72px;
}

.hx-brandmark {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hx-brandmark-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.hx-brandmark-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hx-brandmark-word {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
}

.hx-brandmark-word small {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 5px;
}

.hx-hero-title {
    margin: 52px 0 0;
    font-size: clamp(38px, 4.4vw, 56px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.hx-hero-sub {
    margin: 18px 0 0;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 42ch;
}

.hx-chips {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hx-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
}

.hx-chip svg { width: 16px; height: 16px; flex: none; }

/* ---------- Sign-in panel ---------- */

.hx-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(600px 400px at 85% -5%, rgba(109, 40, 217, 0.07), transparent 60%),
        radial-gradient(500px 380px at -10% 105%, rgba(219, 39, 119, 0.06), transparent 60%),
        #fbfbfe;
    padding: 48px 32px;
}

.hx-panel-inner {
    width: 100%;
    max-width: 404px;
}

.hx-mobilebrand { display: none; }

.hx-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--hx-magenta);
}

.hx-form-title {
    margin: 12px 0 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hx-form-sub {
    margin: 10px 0 0;
    font-size: 15px;
    color: var(--hx-ink-soft);
}

.hx-form { margin-top: 34px; }

.hx-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 26px;
    padding: 13px 16px;
    border-radius: 14px;
    background: var(--hx-danger-bg);
    border: 1px solid var(--hx-danger-line);
    color: var(--hx-danger-text);
    font-size: 14px;
    line-height: 1.5;
}

.hx-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.hx-field { margin-bottom: 20px; }

.hx-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hx-control { position: relative; }

.hx-control-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 15px;
    transform: translateY(-50%);
    width: 19px; height: 19px;
    color: #a49fc0;
    pointer-events: none;
    transition: color 0.15s ease;
}

.hx-input {
    width: 100%;
    height: 54px;
    padding: 0 46px;
    padding-inline-start: 46px;
    font-family: inherit;
    font-size: 15.5px;
    color: var(--hx-ink);
    background: var(--hx-field-bg);
    border: 1.5px solid var(--hx-line);
    border-radius: var(--hx-radius);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hx-input::placeholder { color: #b3afc6; }

.hx-input:focus {
    border-color: var(--hx-violet);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.13);
}

.hx-control:focus-within .hx-control-icon { color: var(--hx-violet); }

.hx-eye {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #a49fc0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.hx-eye:hover { background: #f1effa; color: var(--hx-violet); }

.hx-eye svg { width: 19px; height: 19px; }

.hx-eye .hx-eye-shut { display: none; }
.hx-eye.hx-showing .hx-eye-shut { display: block; }
.hx-eye.hx-showing .hx-eye-open { display: none; }

.hx-errortext {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hx-danger-text);
}

.hx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
}

.hx-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hx-ink-soft);
    cursor: pointer;
    user-select: none;
}

.hx-check input {
    width: 17px; height: 17px;
    margin: 0;
    accent-color: var(--hx-violet);
    cursor: pointer;
}

.hx-forgot {
    font-size: 14px;
    font-weight: 700;
    color: var(--hx-violet);
    text-decoration: none;
    white-space: nowrap;
}

.hx-forgot:hover { text-decoration: underline; }

.hx-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--hx-radius);
    background: var(--hx-grad);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(162, 28, 175, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.hx-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(162, 28, 175, 0.36);
}

.hx-submit:disabled { opacity: 0.75; cursor: wait; }

.hx-submit-arrow { width: 19px; height: 19px; transition: transform 0.15s ease; }
.hx-submit:hover:not(:disabled) .hx-submit-arrow { transform: translateX(3px); }

[dir="rtl"] .hx-submit-arrow { transform: scaleX(-1); }
[dir="rtl"] .hx-submit:hover:not(:disabled) .hx-submit-arrow { transform: scaleX(-1) translateX(3px); }

.hx-lang {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 28px;
    padding: 4px;
    width: fit-content;
    margin-inline: auto;
    background: #efedf7;
    border-radius: 999px;
}

.hx-lang-btn {
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--hx-ink-soft);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hx-lang-btn.hx-active {
    background: #fff;
    color: var(--hx-ink);
    box-shadow: 0 3px 10px rgba(28, 24, 48, 0.10);
}

.hx-rights {
    margin: 30px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: #a09bb8;
}

/* ---------- Entrance ---------- */

.hx-rise {
    animation: hx-rise 0.65s cubic-bezier(0.22, 0.8, 0.32, 1) both;
    animation-delay: var(--d, 0s);
}

@keyframes hx-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
    .hx-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

    .hx-showcase { align-items: flex-start; }
    .hx-showcase-inner { padding: 30px 24px 34px; max-width: none; }

    .hx-brandmark-tile { width: 52px; height: 52px; border-radius: 16px; }
    .hx-brandmark-word { font-size: 23px; }
    .hx-brandmark-word small { letter-spacing: 0.26em; }

    .hx-hero-title { margin-top: 26px; font-size: 30px; }
    .hx-hero-sub { margin-top: 10px; font-size: 14.5px; }
    .hx-chips { display: none; }

    .hx-panel { padding: 34px 22px 44px; align-items: flex-start; }
    .hx-panel-inner { max-width: 460px; margin: 0 auto; }

    .hx-mobilebrand { display: none; } /* showcase already shows the brand on mobile */
    .hx-form-title { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
    .hx-showcase, .hx-blob, .hx-rise { animation: none !important; }
}
