/*================================================================================
  WOOD Machinery — Distinct Auth Experiences
  Admin  = Command Center (dark console)
  Dealer = Partner Desk (light commerce)
  Worker = Shop Floor (industrial workshop)
================================================================================*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&display=swap');

html, body { height: 100%; }

body.blank-page,
body.vertical-layout.blank-page {
    margin: 0 !important;
    font-family: 'Instrument Sans', sans-serif !important;
}

.app-content.content,
.content-wrapper,
.content-body {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent !important;
    overflow-x: hidden;
}

body.wm-auth-dealer .app-content.content,
body.wm-auth-worker .app-content.content,
body.wm-auth-dealer .content-wrapper,
body.wm-auth-worker .content-wrapper,
body.wm-auth-dealer .content-body,
body.wm-auth-worker .content-body {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Shared form primitives (avoid Vuexy input-group conflicts) */
.wm-field { margin-bottom: 1.05rem; }
.wm-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.wm-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}
.wm-pass {
    position: relative;
}
.wm-pass .wm-input {
    padding-right: 3rem;
}
.wm-pass__toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
}
.wm-pass__toggle:hover { opacity: 1; }
.wm-pass__toggle svg { width: 16px; height: 16px; }

.wm-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}
.wm-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1f6f5b;
}
.wm-check--light input { accent-color: #f0a202; }

.wm-alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    line-height: 1.4;
}
.wm-alert ul { margin: 0; padding-left: 1.1rem; }

/*============================================================================
  1) ADMIN — Command Center
============================================================================*/
body.blank-page:has(.wm-admin),
body.vertical-layout.blank-page:has(.wm-admin) {
    background: #060b16 !important;
}

.wm-admin {
    --a-bg: #060b16;
    --a-panel: rgba(12, 20, 38, 0.82);
    --a-line: rgba(126, 214, 223, 0.28);
    --a-cyan: #7ed6df;
    --a-red: #cb2127;
    --a-text: #e8eef8;
    --a-muted: #8ea0bc;
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    overflow: hidden;
    color: var(--a-text);
    font-family: 'Space Grotesk', 'Instrument Sans', sans-serif;
    background:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(203, 33, 39, 0.18), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(126, 214, 223, 0.1), transparent 55%),
        var(--a-bg);
}

.wm-admin__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(126, 214, 223, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 214, 223, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 30%, transparent 75%);
    animation: adminGridDrift 18s linear infinite;
    pointer-events: none;
}

.wm-admin__orb {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(126, 214, 223, 0.2);
    pointer-events: none;
}
.wm-admin__orb--1 {
    width: 420px; height: 420px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: adminOrbitSpin 28s linear infinite;
}
.wm-admin__orb--2 {
    width: 560px; height: 560px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-style: dashed;
    opacity: 0.55;
    animation: adminOrbitSpin 42s linear infinite reverse;
}
.wm-admin__orb--1::before,
.wm-admin__orb--2::before {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--a-cyan);
    box-shadow: 0 0 16px var(--a-cyan);
    top: -5px; left: 50%;
}

.wm-admin__scan {
    position: absolute;
    left: 0; right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(126, 214, 223, 0.07), transparent);
    animation: adminScan 5.5s ease-in-out infinite;
    pointer-events: none;
}

.wm-admin__shell {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    padding: 2rem 1.75rem 1.6rem;
    border: 1px solid rgba(126, 214, 223, 0.22);
    background: var(--a-panel);
    backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(203, 33, 39, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.45);
    animation: adminPanelIn 0.75s cubic-bezier(.2,.8,.2,1) both;
}

.wm-admin__shell::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--a-red), var(--a-cyan), transparent);
    background-size: 200% 100%;
    animation: adminBarFlow 3.2s linear infinite;
}

.wm-admin__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.wm-admin__top img { height: 34px; width: auto; }
.wm-admin__badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--a-cyan);
    border: 1px solid rgba(126, 214, 223, 0.35);
    padding: 0.35rem 0.65rem;
    animation: adminBadgePulse 2.8s ease-in-out infinite;
}

.wm-admin__title {
    margin: 0 0 0.35rem;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #e8eef8 !important;
}
.wm-admin__sub {
    margin: 0 0 1.5rem;
    color: var(--a-muted);
    font-size: 0.92rem;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
}

.wm-admin .wm-field label { color: var(--a-muted); }
.wm-admin .wm-field .form-control,
.wm-admin .wm-field .form-control-merge,
.wm-admin .wm-field .input-group-text {
    background: rgba(6, 11, 22, 0.75) !important;
    border: 1px solid rgba(126, 214, 223, 0.22) !important;
    color: var(--a-text) !important;
    border-radius: 6px !important;
}
.wm-admin .wm-field .input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.wm-admin .wm-field .input-group-text {
    border-left: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    color: var(--a-muted) !important;
}
.wm-admin .wm-field .form-control:focus {
    border-color: var(--a-cyan) !important;
    box-shadow: 0 0 0 3px rgba(126, 214, 223, 0.15) !important;
}
.wm-admin .wm-field .form-control::placeholder { color: #5f7190; }

.wm-admin .wm-alert {
    border: 1px solid rgba(203, 33, 39, 0.4);
    background: rgba(203, 33, 39, 0.12);
    color: #ffb4b6;
}

.wm-admin__btn {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--a-red), #e23a3f);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 28px rgba(203, 33, 39, 0.35);
}
.wm-admin__btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    transform: translateX(-120%);
    animation: adminBtnShine 3.8s ease-in-out infinite;
}
.wm-admin__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(203, 33, 39, 0.45);
}

.wm-admin__foot {
    margin-top: 1.35rem;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7c99;
    font-family: 'Instrument Sans', sans-serif;
}

.wm-admin__status {
    display: flex;
    gap: 0.85rem;
    margin-top: 1.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--a-muted);
    font-family: 'Instrument Sans', sans-serif;
}
.wm-admin__status span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.wm-admin__status i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #2dd4a8;
    box-shadow: 0 0 10px #2dd4a8;
    animation: adminLive 1.6s ease-in-out infinite;
}

@keyframes adminGridDrift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
}
@keyframes adminOrbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes adminScan {
    0% { top: -10%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
@keyframes adminPanelIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes adminBarFlow {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
}
@keyframes adminBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(126, 214, 223, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(126, 214, 223, 0); }
}
@keyframes adminBtnShine {
    0%, 60% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
@keyframes adminLive {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/*============================================================================
  2) DEALER — Business Portal (modern B2B)
============================================================================*/
body.blank-page:has(.wm-dealer),
body.vertical-layout.blank-page:has(.wm-dealer) {
    background: #0b1220 !important;
}

.wm-dealer {
    --d-ink: #0f172a;
    --d-muted: #64748b;
    --d-navy: #0b1220;
    --d-navy-mid: #152238;
    --d-accent: #cb2127;
    --d-accent-deep: #a51a1f;
    --d-line: #e2e8f0;
    --d-soft: #f8fafc;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    font-family: 'Sora', 'Instrument Sans', sans-serif;
    color: var(--d-ink);
    background: #fff;
    overflow: hidden;
}

.wm-dealer__visual {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    background:
        radial-gradient(ellipse 70% 55% at 10% 15%, rgba(203, 33, 39, 0.28), transparent 55%),
        radial-gradient(ellipse 55% 45% at 90% 85%, rgba(56, 189, 248, 0.12), transparent 50%),
        linear-gradient(160deg, #0b1220 0%, #132033 48%, #1a2b45 100%);
    animation: dealerSlideLeft 0.7s cubic-bezier(.2,.8,.2,1) both;
}

.wm-dealer__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.wm-dealer__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}
.wm-dealer__glow--1 {
    width: 260px; height: 260px;
    background: rgba(203, 33, 39, 0.35);
    top: -60px; right: -40px;
    animation: dealerPulse 6s ease-in-out infinite;
}
.wm-dealer__glow--2 {
    width: 220px; height: 220px;
    background: rgba(56, 189, 248, 0.18);
    bottom: 8%; left: -50px;
    animation: dealerPulse 7.5s ease-in-out infinite reverse;
}

.wm-dealer__visual-top,
.wm-dealer__visual-copy,
.wm-dealer__chart {
    position: relative;
    z-index: 1;
}

.wm-dealer__visual-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.wm-dealer__brand-mark {
    height: 40px;
    width: auto;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.25));
}
.wm-dealer__live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.82);
    backdrop-filter: blur(8px);
}
.wm-dealer__live i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: dealerBlink 1.8s ease-in-out infinite;
}

.wm-dealer__visual-copy {
    max-width: 34rem;
    padding: 0.5rem 0 1rem;
}
.wm-dealer__visual-kicker {
    margin: 0 0 0.75rem !important;
    font-size: 0.74rem !important;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 196, 196, 0.9) !important;
}
.wm-dealer__visual-copy h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.9rem, 3.4vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: #ffffff !important;
    animation: dealerRise 0.75s ease 0.12s both;
}
.wm-dealer__visual-copy > p:not(.wm-dealer__visual-kicker) {
    margin: 0 0 1.5rem;
    color: rgba(226, 232, 240, 0.82);
    font-size: 1rem;
    line-height: 1.55;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
    max-width: 32rem;
    animation: dealerRise 0.75s ease 0.2s both;
}

.wm-dealer__features {
    display: grid;
    gap: 0.75rem;
    animation: dealerRise 0.75s ease 0.28s both;
}
.wm-dealer__feature {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.wm-dealer__feature:hover {
    transform: translateX(4px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(203, 33, 39, 0.35);
}
.wm-dealer__feature-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(203, 33, 39, 0.18);
    color: #fecaca;
}
.wm-dealer__feature-icon svg { width: 20px; height: 20px; }
.wm-dealer__feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.12rem;
    color: #fff;
}
.wm-dealer__feature span {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.7);
    font-family: 'Instrument Sans', sans-serif;
}

.wm-dealer__chart {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    height: 72px;
    padding-top: 0.5rem;
}
.wm-dealer__chart span {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, rgba(203,33,39,0.95), rgba(203,33,39,0.25));
    transform-origin: bottom;
    animation: dealerBarGrow 1.1s cubic-bezier(.2,.8,.2,1) both;
}
.wm-dealer__chart span:nth-child(2) { animation-delay: 0.08s; background: linear-gradient(180deg, rgba(56,189,248,0.9), rgba(56,189,248,0.2)); }
.wm-dealer__chart span:nth-child(3) { animation-delay: 0.16s; }
.wm-dealer__chart span:nth-child(4) { animation-delay: 0.24s; background: linear-gradient(180deg, rgba(56,189,248,0.9), rgba(56,189,248,0.2)); }
.wm-dealer__chart span:nth-child(5) { animation-delay: 0.32s; }
.wm-dealer__chart span:nth-child(6) { animation-delay: 0.4s; background: linear-gradient(180deg, rgba(52,211,153,0.9), rgba(52,211,153,0.2)); }

.wm-dealer__form-side {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3rem);
    background:
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(203, 33, 39, 0.05), transparent 55%),
        var(--d-soft);
    animation: dealerSlideRight 0.75s cubic-bezier(.2,.8,.2,1) both;
}

.wm-dealer__form-wrap {
    width: 100%;
    max-width: 420px;
    padding: clamp(1.25rem, 3vw, 1.85rem);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    animation: dealerRise 0.75s ease 0.15s both;
}

.wm-dealer__mobile-brand {
    display: none;
    margin-bottom: 1.25rem;
}
.wm-dealer__mobile-brand img {
    height: 36px;
    width: auto;
}

.wm-dealer__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: rgba(203, 33, 39, 0.08);
    color: var(--d-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.wm-dealer__chip::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--d-accent);
    animation: dealerBlink 2s ease-in-out infinite;
}

.wm-dealer__title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.55rem, 2.3vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--d-ink) !important;
}
.wm-dealer__sub {
    margin: 0 0 1.5rem;
    color: var(--d-muted);
    font-size: 0.94rem;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
    line-height: 1.55;
}

.wm-dealer .wm-field label { color: var(--d-ink); }
.wm-dealer .wm-input {
    background: #fff;
    border-color: var(--d-line);
    color: var(--d-ink);
    border-radius: 10px;
}
.wm-dealer .wm-input:focus {
    border-color: var(--d-accent);
    box-shadow: 0 0 0 4px rgba(203, 33, 39, 0.12);
}
.wm-dealer .wm-pass__toggle { color: var(--d-muted); }
.wm-dealer .wm-pass__toggle:hover {
    background: rgba(203, 33, 39, 0.08);
    color: var(--d-accent);
}
.wm-dealer .wm-check input { accent-color: var(--d-accent); }

.wm-dealer .wm-alert {
    border-radius: 10px;
    border: 1px solid rgba(185, 28, 28, 0.2);
    background: #fef2f2;
    color: #991b1b;
}

.wm-dealer__meta {
    display: flex;
    align-items: center;
    margin: 0.1rem 0 1.3rem;
    color: var(--d-muted);
    font-family: 'Instrument Sans', sans-serif;
}

.wm-dealer__btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--d-accent), #e23a3f);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 14px 28px rgba(203, 33, 39, 0.28);
}
.wm-dealer__btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 18px 34px rgba(203, 33, 39, 0.36);
}
.wm-dealer__btn svg {
    transition: transform 0.2s ease;
}
.wm-dealer__btn:hover svg {
    transform: translateX(3px);
}

.wm-dealer__foot {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--d-line);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.76rem;
    color: var(--d-muted);
    font-family: 'Instrument Sans', sans-serif;
}

@keyframes dealerSlideLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes dealerSlideRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes dealerRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes dealerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@keyframes dealerPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 1; }
}
@keyframes dealerBarGrow {
    from { transform: scaleY(0); opacity: 0.3; }
    to { transform: scaleY(1); opacity: 1; }
}

/*============================================================================
  3) WORKER — Shop Floor
============================================================================*/
body.blank-page:has(.wm-worker),
body.vertical-layout.blank-page:has(.wm-worker) {
    background: #1c1410 !important;
}

.wm-worker {
    --w-amber: #f0a202;
    --w-amber-deep: #d48900;
    --w-coal: #1c1410;
    --w-panel: #261d18;
    --w-text: #f6efe6;
    --w-muted: #b9a898;
    --w-line: rgba(240, 162, 2, 0.28);
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    color: var(--w-text);
    font-family: 'Instrument Sans', sans-serif;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(ellipse 70% 50% at 18% 12%, rgba(240, 162, 2, 0.16), transparent 55%),
        radial-gradient(ellipse 45% 40% at 70% 80%, rgba(203, 33, 39, 0.1), transparent 50%),
        var(--w-coal);
}

.wm-worker__spark {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--w-amber);
    box-shadow: 0 0 10px var(--w-amber);
    animation: workerSpark 4.5s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}
.wm-worker__spark:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.wm-worker__spark:nth-child(2) { left: 24%; top: 42%; animation-delay: 0.8s; }
.wm-worker__spark:nth-child(3) { left: 48%; top: 16%; animation-delay: 1.4s; }
.wm-worker__spark:nth-child(4) { left: 38%; top: 68%; animation-delay: 2.1s; }
.wm-worker__spark:nth-child(5) { left: 16%; top: 74%; animation-delay: 2.8s; }

.wm-worker__hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.wm-worker__gear {
    position: absolute;
    right: 8%;
    top: 14%;
    width: 150px;
    height: 150px;
    opacity: 0.16;
    animation: workerGear 16s linear infinite;
    pointer-events: none;
}
.wm-worker__gear--sm {
    right: 22%;
    top: 38%;
    width: 84px;
    height: 84px;
    opacity: 0.1;
    animation-duration: 11s;
    animation-direction: reverse;
}

.wm-worker__topbar {
    display: none;
}

.wm-worker__logo {
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: workerDrop 0.7s cubic-bezier(.2,.8,.2,1) both;
}
.wm-worker__logo img {
    height: 42px;
    width: auto;
    display: block;
}

.wm-worker__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--w-amber);
    animation: workerDrop 0.7s ease 0.08s both;
}
.wm-worker__tag::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--w-amber);
    animation: workerBar 1.8s ease-in-out infinite;
}

.wm-worker__hero h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(2.1rem, 4.2vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: #f6efe6 !important;
    max-width: 14ch;
    animation: workerDrop 0.75s ease 0.14s both;
}
.wm-worker__hero h1 em {
    font-style: normal;
    color: var(--w-amber);
}
.wm-worker__hero > p {
    margin: 0 0 1.5rem;
    max-width: 28rem;
    color: var(--w-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    animation: workerDrop 0.75s ease 0.22s both;
}

.wm-worker__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
    animation: workerDrop 0.75s ease 0.3s both;
}
.wm-worker__points li {
    position: relative;
    padding-left: 1.35rem;
    color: rgba(246, 239, 230, 0.82);
    font-size: 0.92rem;
}
.wm-worker__points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--w-amber);
    box-shadow: 0 0 10px rgba(240, 162, 2, 0.45);
}

.wm-worker__panel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background:
        linear-gradient(180deg, rgba(48, 37, 30, 0.96), rgba(28, 20, 16, 0.98));
    border-left: 1px solid rgba(240, 162, 2, 0.18);
    animation: workerPanelIn 0.8s cubic-bezier(.2,.8,.2,1) 0.12s both;
}

.wm-worker__panel-inner {
    width: 100%;
    max-width: 400px;
    padding: 1.75rem 1.5rem 1.4rem;
    border: 1px solid var(--w-line);
    border-radius: 16px;
    background: rgba(20, 14, 11, 0.55);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.wm-worker__panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.wm-worker__panel-head h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #f6efe6 !important;
}
.wm-worker__panel-head span {
    font-size: 0.78rem;
    color: var(--w-muted);
}

.wm-worker .wm-field label { color: var(--w-muted); }
.wm-worker .wm-input {
    background: rgba(12, 9, 7, 0.75);
    border-color: rgba(240, 162, 2, 0.22);
    color: var(--w-text);
    border-radius: 10px;
}
.wm-worker .wm-input::placeholder { color: #7d6c5c; }
.wm-worker .wm-input:focus {
    border-color: var(--w-amber);
    box-shadow: 0 0 0 3px rgba(240, 162, 2, 0.18);
}
.wm-worker .wm-pass__toggle { color: var(--w-muted); }
.wm-worker .wm-pass__toggle:hover {
    background: rgba(240, 162, 2, 0.12);
    color: var(--w-amber);
}

.wm-worker .wm-alert {
    border-radius: 10px;
    border: 1px solid rgba(240, 162, 2, 0.35);
    background: rgba(240, 162, 2, 0.1);
    color: #ffd27a;
}

.wm-worker__meta {
    display: flex;
    align-items: center;
    margin: 0.15rem 0 1.25rem;
    color: var(--w-muted);
}

.wm-worker__btn {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--w-amber);
    color: #1c1410 !important;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 28px rgba(240, 162, 2, 0.28);
}
.wm-worker__btn:hover {
    background: #ffb423;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(240, 162, 2, 0.36);
}
.wm-worker__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
    transform: translateX(-110%);
    animation: workerShine 3.4s ease-in-out infinite;
}

.wm-worker__note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8d7a68;
}

@keyframes workerSpark {
    0% { opacity: 0; transform: translateY(8px) scale(0.6); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-46px) scale(1.2); }
}
@keyframes workerGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes workerDrop {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes workerPanelIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes workerBar {
    0%, 100% { width: 18px; opacity: 1; }
    50% { width: 28px; opacity: 0.55; }
}
@keyframes workerShine {
    0%, 55% { transform: translateX(-110%); }
    100% { transform: translateX(110%); }
}

/*============================================================================
  Responsive
============================================================================*/
@media (max-width: 1199.98px) {
    .wm-dealer { grid-template-columns: 1fr 1fr; }
    .wm-dealer__features { gap: 0.6rem; }
    .wm-dealer__feature { padding: 0.7rem 0.8rem; }
    .wm-worker { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991.98px) {
    .wm-dealer,
    .wm-worker {
        display: flex;
        flex-direction: column;
        overflow: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Dealer: form first for easier mobile login */
    .wm-dealer__form-side {
        order: 1;
        padding: 1.25rem 1rem 1.5rem;
        flex: 1 0 auto;
        align-items: flex-start;
    }
    .wm-dealer__visual {
        order: 2;
        padding: 1.35rem 1.15rem 1.5rem;
        flex: 0 0 auto;
        gap: 1rem;
    }
    .wm-dealer__form-wrap {
        max-width: 520px;
        margin: 0 auto;
        box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    }
    .wm-dealer__mobile-brand { display: block; }
    .wm-dealer__visual-top .wm-dealer__brand-mark { display: none; }
    .wm-dealer__visual-copy h1 { font-size: 1.55rem; }
    .wm-dealer__visual-copy > p:not(.wm-dealer__visual-kicker) {
        margin-bottom: 1rem;
        font-size: 0.92rem;
    }
    .wm-dealer__features {
        grid-template-columns: 1fr;
    }
    .wm-dealer__chart { display: none; }
    .wm-dealer__glow { opacity: 0.55; }

    /* Worker mobile: logo top → form → short brand copy */
    .wm-worker__topbar {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 1.15rem 1.15rem 0.35rem;
        flex: 0 0 auto;
        position: relative;
        z-index: 2;
        animation: workerDrop 0.55s ease both;
    }
    .wm-worker__topbar-logo img {
        height: 38px;
        width: auto;
        display: block;
    }
    .wm-worker__topbar-tag {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--w-amber);
    }
    .wm-worker__topbar-tag::before {
        content: '';
        width: 16px;
        height: 2px;
        background: var(--w-amber);
    }

    .wm-worker__panel {
        order: 2;
        border-left: 0;
        border-bottom: 0;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0.85rem 1rem 0.35rem;
        flex: 0 0 auto;
        min-height: 0;
        height: auto;
        background: transparent;
    }
    .wm-worker__panel-inner {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }
    .wm-worker__hero {
        order: 3;
        padding: 0.75rem 1.15rem 1.5rem;
        flex: 0 0 auto;
        min-height: 0;
        justify-content: flex-start;
    }
    .wm-worker__logo,
    .wm-worker__tag { display: none; }
    .wm-worker__gear { display: none; }
    .wm-worker__hero h1 {
        max-width: none;
        font-size: clamp(1.45rem, 6vw, 1.85rem);
        margin-bottom: 0.55rem;
    }
    .wm-worker__hero > p {
        font-size: 0.9rem;
        margin-bottom: 0.9rem;
    }
    .wm-worker__points {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
    .wm-worker__spark:nth-child(n+4) { display: none; }
}

@media (max-width: 575.98px) {
    .wm-admin__shell { padding: 1.35rem 1rem 1.15rem; width: min(440px, 100%); }
    .wm-admin__title { font-size: 1.45rem; }
    .wm-admin { padding: 1rem 0.85rem; }

    .wm-dealer__form-side { padding: 1rem 0.85rem 1.25rem; }
    .wm-dealer__form-wrap {
        padding: 1.15rem 1rem 1.1rem;
        border-radius: 14px;
    }
    .wm-dealer__title { font-size: 1.4rem; }
    .wm-dealer__sub { font-size: 0.88rem; margin-bottom: 1.2rem; }
    .wm-dealer__visual { padding: 1.15rem 1rem 1.25rem; }
    .wm-dealer__feature span { display: none; }
    .wm-dealer__foot { font-size: 0.72rem; }

    .wm-worker__topbar { padding: 1rem 1rem 0.25rem; }
    .wm-worker__topbar-logo img { height: 34px; }
    .wm-worker__panel { padding: 0.7rem 0.85rem 1rem; }
    .wm-worker__panel-inner {
        padding: 1.15rem 0.95rem 1rem;
        border-radius: 14px;
    }
    .wm-worker__hero { padding: 0.25rem 1rem 1.25rem; }
    .wm-worker__hero h1 { font-size: 1.4rem; }
    .wm-worker__hero > p { font-size: 0.88rem; margin-bottom: 0.85rem; }
    .wm-worker__points li { font-size: 0.84rem; }
}

@media (max-height: 700px) and (min-width: 992px) {
    .wm-dealer__chart { display: none; }
    .wm-dealer__features { gap: 0.5rem; }
    .wm-dealer__feature { padding: 0.65rem 0.8rem; }
    .wm-worker__points { display: none; }
}

/* Fallback for browsers without :has() — body class helpers */
body.wm-auth-admin { background: #060b16 !important; }
body.wm-auth-dealer { background: #0b1220 !important; }
body.wm-auth-worker { background: #1c1410 !important; }
