/* Budibiz soft 3D login — matches mockup UI; form behaviour unchanged */

:root {
    --auth-primary: #3b82f6;
    --auth-primary-end: #60a5fa;
    --auth-bg: #eef5ff;
    --auth-bg-end: #f8fbff;
    --auth-card: #ffffff;
    --auth-text: #334155;
    --auth-muted: #94a3b8;
    --auth-border: #e2e8f0;
    --auth-success: #10b981;
    --auth-shadow: 0 20px 50px rgba(59, 130, 246, 0.12);
    --auth-radius-card: 28px;
    --auth-radius-btn: 16px;
    --auth-radius-input: 14px;
    --auth-input-height: 52px;
}

html[data-theme="dark"] {
    --auth-bg: #0f172a;
    --auth-bg-end: #1e293b;
    --auth-card: #1e293b;
    --auth-text: #f1f5f9;
    --auth-muted: #94a3b8;
    --auth-border: #334155;
    --auth-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    overflow-x: hidden;
    background: linear-gradient(160deg, var(--auth-bg) 0%, #ffffff 45%, var(--auth-bg-end) 100%);
}

.auth-shell--soft3d {
    animation: authFadeIn 0.55s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-shell-gradient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 18% 40%, rgba(96, 165, 250, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(167, 139, 250, 0.12) 0%, transparent 55%);
}

.auth-topbar--minimal {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
}

.auth-theme-toggle,
.auth-topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 40px;
    padding: 0 0.9rem;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--auth-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-theme-toggle {
    width: 40px;
    padding: 0;
}

.auth-theme-toggle:hover,
.auth-topbar-link:hover {
    color: var(--auth-primary);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.auth-split--soft3d {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 420px);
    gap: 2rem;
    align-items: center;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem 2.5rem;
}

/* ── Soft 3D hero ── */
.auth-hero--soft3d {
    position: relative;
    min-height: 420px;
    padding: 1rem 0 0.5rem;
}

.soft3d-scene {
    position: relative;
    height: 360px;
    perspective: 1200px;
}

.soft3d-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    animation: softFloat 7s ease-in-out infinite;
}

.soft3d-orb-a {
    width: 90px; height: 90px;
    left: 6%; top: 12%;
    background: radial-gradient(circle at 30% 30%, #93c5fd, #3b82f6);
    opacity: 0.55;
}

.soft3d-orb-b {
    width: 48px; height: 48px;
    right: 18%; top: 8%;
    background: radial-gradient(circle at 30% 30%, #c4b5fd, #8b5cf6);
    opacity: 0.45;
    animation-delay: -2s;
}

.soft3d-orb-c {
    width: 34px; height: 34px;
    left: 22%; bottom: 18%;
    background: radial-gradient(circle at 30% 30%, #bae6fd, #38bdf8);
    opacity: 0.5;
    animation-delay: -4s;
}

@keyframes softFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.soft3d-float {
    position: absolute;
    z-index: 3;
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    font-size: 1.2rem;
    animation: softFloat 6s ease-in-out infinite;
}

.soft3d-float-db { left: 4%; top: 42%; animation-delay: -1s; }
.soft3d-float-cal { right: 8%; top: 28%; animation-delay: -3s; color: #6366f1; }
.soft3d-float-team { right: 12%; bottom: 22%; animation-delay: -2s; }

.soft3d-podium {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: min(420px, 92%);
}

.soft3d-podium::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -28px;
    transform: translateX(-50%);
    width: 78%;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.22), transparent 70%);
    filter: blur(4px);
}

.soft3d-dash {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 22px;
    box-shadow:
        0 25px 60px rgba(37, 99, 235, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.9) inset;
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
    transform: rotateX(8deg) rotateY(-8deg) rotateZ(1deg);
    min-height: 240px;
}

.soft3d-side {
    width: 56px;
    padding: 1rem 0.55rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    background: #f8fafc;
    border-right: 1px solid #eef2f7;
}

.soft3d-nav {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.soft3d-nav.is-active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.35);
}

.soft3d-nav-bottom { margin-top: auto; }

.soft3d-main {
    flex: 1;
    padding: 1rem 1.1rem 1.15rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.soft3d-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.soft3d-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #93c5fd);
}

.soft3d-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.soft3d-lines i,
.soft3d-mini-lines i {
    display: block;
    height: 7px;
    border-radius: 99px;
    background: #e2e8f0;
}

.soft3d-lines i:first-child { width: 55%; }
.soft3d-lines i:last-child { width: 35%; }

.soft3d-cards {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.85fr;
    gap: 0.65rem;
}

.soft3d-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 0.65rem;
    box-shadow: 0 8px 20px rgba(148, 163, 184, 0.12);
    min-height: 88px;
}

.soft3d-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    height: 70px;
}

.soft3d-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.soft3d-card-line svg {
    width: 100%;
    height: 70px;
}

.soft3d-donut {
    width: 64px;
    height: 64px;
    margin: 4px auto 0;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0 85%, #e2e8f0 85% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.soft3d-donut::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #fff;
}

.soft3d-donut span {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
}

.soft3d-mini-card {
    position: absolute;
    right: -8%;
    bottom: 18%;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.18);
    width: 148px;
    animation: softFloat 5.5s ease-in-out infinite;
}

.soft3d-mini-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
}

.soft3d-mini-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.soft3d-mini-lines i:first-child { width: 80%; }
.soft3d-mini-lines i:last-child { width: 55%; }

.auth-hero-copy {
    position: relative;
    z-index: 2;
    margin-top: 1.75rem;
    text-align: center;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.auth-feature-carousel {
    position: relative;
    min-height: 88px;
}

.auth-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(14px);
    filter: blur(3px);
    transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
    pointer-events: none;
}

.auth-carousel-slide.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

.auth-carousel-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-carousel-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.auth-carousel-dot {
    width: 7px; height: 7px;
    padding: 0;
    border: none;
    border-radius: 99px;
    background: rgba(59, 130, 246, 0.25);
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.auth-carousel-dot.is-active {
    width: 22px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* ── Login card ── */
/* ── Uploaded home media hero (video / GIF / image) ──
   These styles normally live in home.css, which the auth pages do not load.
   Without them the raw <video> overflows its grid column and the sign-in
   card overlaps it. Keep the media contained inside the hero column. */
.auth-hero--media {
    position: relative;
    min-height: 420px;
    padding: 0.5rem 0;
    min-width: 0;
    overflow: hidden;
}

.auth-hero--media .hp-home-media {
    width: 100%;
    max-width: 100%;
}

.auth-hero--media .hp-home-media-frame {
    position: relative;
    width: 100%;
    height: clamp(260px, 52vh, 460px);
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.auth-hero--media .hp-home-media-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.auth-hero--media .hp-home-media-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.auth-hero--media .hp-home-media-img,
.auth-hero--media .hp-home-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-hero--media .hp-home-media-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.auth-hero--media .hp-home-media-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 99px;
    background: rgba(37, 99, 235, 0.25);
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.auth-hero--media .hp-home-media-dot.is-active {
    width: 22px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.auth-form-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.auth-card--soft {
    width: 100%;
    max-width: 400px;
    background: var(--auth-card);
    border-radius: var(--auth-radius-card);
    padding: 2.25rem 2rem 1.75rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--auth-shadow);
    animation: authSlideUp 0.55s ease 0.12s both;
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

.auth-company-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-company-logo {
    height: auto;
    max-height: 56px;
    max-width: 100%;
    object-fit: contain;
}

.auth-logo-caption {
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    color: var(--auth-muted);
}

.portal-form {
    display: grid;
    gap: 1rem;
}

.portal-field-control {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: var(--auth-input-height);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-input);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

html[data-theme="dark"] .portal-field-control {
    background: rgba(15, 23, 42, 0.45);
}

.portal-field-control:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.portal-field-control > i:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.portal-field-control input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0.85rem 1rem 0.85rem 0;
    font-size: 0.92rem;
    color: var(--auth-text);
}

.portal-field-control input:focus { outline: none; }
.portal-field-control input::placeholder { color: #94a3b8; }

.portal-field-control.password-field-wrap input {
    padding-right: 2.75rem;
}

.portal-field-control .password-toggle-btn,
.portal-field-control .portal-eye-btn {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 44px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.05rem;
}

.portal-field-control .password-toggle-btn:hover {
    color: var(--auth-primary);
}

.auth-caps-warning {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #d97706;
}

.auth-caps-warning.d-none { display: none !important; }

.portal-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.25rem 0 0.15rem;
}

.portal-form-options--single {
    display: flex;
    justify-content: flex-start;
}

.portal-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
}

.portal-remember input {
    accent-color: var(--auth-primary);
    width: 1rem;
    height: 1rem;
}

.portal-login-btn--arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0.35rem;
    border: none;
    border-radius: var(--auth-radius-btn);
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s, box-shadow 0.25s;
}

.portal-login-btn--arrow:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.42);
}

.portal-login-btn--arrow:active {
    transform: scale(0.98);
}

.portal-login-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.auth-secure-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.35rem 0 0.65rem;
}

.auth-secure-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.auth-secure-divider i {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.portal-secure-note {
    margin: 0;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--auth-muted);
}

.portal-login-error,
.portal-alert-success {
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.portal-login-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.portal-alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #047857;
}

/* Forgot / change password pages reuse card chrome */
.auth-panel-head {
    margin-bottom: 1.25rem;
    text-align: left;
}

.auth-panel-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-panel-head p,
.portal-login-sub {
    margin: 0;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.portal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.portal-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: var(--auth-radius-btn);
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.portal-register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.84rem;
    color: var(--auth-muted);
}

.portal-register-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.portal-forgot {
    color: var(--auth-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: underline;
}

.portal-forgot-wrap {
    text-align: right;
    margin: 0.15rem 0 0.75rem;
}

@media (max-width: 900px) {
    .auth-split--soft3d {
        grid-template-columns: 1fr;
        max-width: 440px;
        padding: 0 1.25rem 2rem;
    }

    .auth-hero--soft3d,
    .auth-hero--media {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-card--soft {
        padding: 1.75rem 1.25rem 1.4rem;
        border-radius: 22px;
    }
}

/* ── Enterprise polish + branding media (login) ── */
.auth-shell--enterprise .auth-shell-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    background:
        radial-gradient(ellipse 55% 40% at 70% 10%, rgba(6, 182, 212, 0.14), transparent 60%),
        radial-gradient(ellipse 40% 35% at 10% 80%, rgba(15, 118, 110, 0.1), transparent 55%);
    animation: authMeshDrift 18s ease-in-out infinite alternate;
}

@keyframes authMeshDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-1.5%, 1%, 0) scale(1.03); }
}

.auth-card--glass {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

html[data-theme="dark"] .auth-card--glass {
    background: rgba(30, 41, 59, 0.88);
    border-color: rgba(71, 85, 105, 0.55);
}

.auth-signin-title {
    margin: 0.85rem 0 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text);
    text-align: center;
}

.auth-signin-sub {
    margin: 0 0 0.35rem;
    font-size: 0.84rem;
    color: var(--auth-muted);
    text-align: center;
}

.auth-card-branding {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--auth-border);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
}

.auth-branding-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.auth-branding-media .portal-branding-fallback {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--auth-muted);
}

.auth-branding-media-el,
.portal-powered-video {
    display: block;
    object-fit: contain;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell--soft3d,
    .auth-card--soft,
    .soft3d-orb,
    .soft3d-float,
    .soft3d-mini-card,
    .auth-carousel-slide,
    .auth-shell-mesh {
        animation: none !important;
        transition: none !important;
    }
}
