/*
 * Halaman login / daftar / lupa password — Mecha HRIS (biru).
 * Dimuat terakhir di layouts/auth.blade.php; tidak mengikuti warna tema klien
 * agar tampilan produk konsisten.
 */

body.mecha-auth {
    --ma-navy: #1e3a8a;
    --ma-blue: #2563eb;
    --ma-blue-600: #1d4ed8;
    --ma-cyan: #06b6d4;
    --ma-ink: #0f172a;
    --ma-ink-2: #475569;
    --ma-muted: #64748b;
    --ma-border: #e2e8f0;
    --ma-surface: #ffffff;
    --ma-page: #f5f8ff;
    margin: 0;
    min-height: 100vh;
    background: var(--ma-page);
    color: var(--ma-ink);
}

/* ---------- Kerangka: panel visual (kiri) + panel form (kanan) ---------- */
.ma-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Panel visual ---------- */
.ma-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #fff;
    background: linear-gradient(150deg, #172554 0%, var(--ma-navy) 35%, var(--ma-blue) 72%, #0891b2 100%);
    isolation: isolate;
}

.ma-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    z-index: -1;
    animation: ma-drift 18s ease-in-out infinite alternate;
}

.ma-blob--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: #3b82f6;
}

.ma-blob--2 {
    width: 360px;
    height: 360px;
    bottom: -120px;
    right: -80px;
    background: #22d3ee;
    animation-duration: 22s;
    animation-delay: -6s;
}

.ma-blob--3 {
    width: 260px;
    height: 260px;
    top: 45%;
    left: 55%;
    background: #6366f1;
    opacity: 0.4;
    animation-duration: 26s;
    animation-delay: -12s;
}

.ma-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.ma-visual__inner {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.ma-visual__brand {
    position: absolute;
    top: -8px;
    left: 0;
    display: inline-flex;
}

.ma-visual__brand img {
    height: 40px;
    width: auto;
}

/* Adegan animasi */
.ma-scene {
    position: relative;
    height: 330px;
    margin: 72px 0 36px;
}

.ma-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    transform: translate(-50%, -50%);
    animation: ma-spin 40s linear infinite;
}

.ma-ring--1 {
    width: 220px;
    height: 220px;
}

.ma-ring--2 {
    width: 330px;
    height: 330px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.12);
    animation-duration: 70s;
    animation-direction: reverse;
}

.ma-ring--1::after,
.ma-ring--2::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 14px #67e8f9;
}

.ma-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
    animation: ma-pulse 4.5s ease-in-out infinite;
}

.ma-float {
    position: absolute;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ma-ink);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    animation: ma-bob 6s ease-in-out infinite;
}

.ma-float--chart {
    top: 8px;
    left: 0;
    width: 196px;
}

.ma-float--people {
    bottom: 6px;
    left: 26px;
    width: 170px;
    animation-delay: -2s;
}

.ma-float--check {
    top: 96px;
    right: 0;
    width: 178px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation-delay: -4s;
}

.ma-float__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ma-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ma-blue);
}

.ma-line {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.ma-line + .ma-line {
    margin-top: 7px;
}

.ma-line--w40 { width: 40%; }
.ma-line--w50 { width: 50%; }
.ma-line--w60 { width: 60%; }
.ma-line--w70 { width: 70%; }
.ma-line--w80 { width: 80%; }

.ma-bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 70px;
}

.ma-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--ma-cyan), var(--ma-blue));
    transform-origin: bottom;
    animation: ma-grow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ma-bars span:nth-child(2) { animation-delay: 0.08s; }
.ma-bars span:nth-child(3) { animation-delay: 0.16s; }
.ma-bars span:nth-child(4) { animation-delay: 0.24s; }
.ma-bars span:nth-child(5) { animation-delay: 0.32s; }
.ma-bars span:nth-child(6) { animation-delay: 0.40s; }
.ma-bars span:nth-child(7) { animation-delay: 0.48s; }

.ma-avatars {
    display: flex;
    margin-bottom: 12px;
}

.ma-avatars span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    background: linear-gradient(135deg, #93c5fd, #2563eb);
}

.ma-avatars span:first-child {
    margin-left: 0;
    background: linear-gradient(135deg, #a5f3fc, #0891b2);
}

.ma-avatars span:nth-child(3) {
    background: linear-gradient(135deg, #c7d2fe, #4f46e5);
}

.ma-avatars__more {
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ma-blue);
    background: #eff6ff !important;
}

.ma-check {
    flex: none;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #dcfce7;
    color: #15803d;
    font-size: 20px;
}

.ma-float--check > div {
    flex: 1;
}

/* Teks panel visual */
.ma-copy h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.ma-copy p {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    max-width: 440px;
}

.ma-copy ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.ma-copy li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.ma-copy li i {
    font-size: 18px;
    color: #67e8f9;
}

/* ---------- Panel formulir ---------- */
.ma-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 28px 40px;
    background: var(--ma-surface);
}

.ma-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ma-panel__brand {
    display: inline-flex;
    text-decoration: none;
}

.ma-panel__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.ma-card {
    width: 100%;
    max-width: 420px;
    animation: ma-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ma-card__company {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ma-blue);
}

.mecha-auth .ma-card .card {
    margin: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.mecha-auth .ma-card .card-body {
    padding: 0;
}

.mecha-auth .ma-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--ma-ink);
    letter-spacing: -0.02em;
}

.mecha-auth .ma-card .form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ma-ink-2);
}

.mecha-auth .ma-card .form-control {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--ma-border);
    background: #f8fafc;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mecha-auth .ma-card .form-control:focus {
    background: #fff;
    border-color: var(--ma-blue) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

/* Tombol & tautan biru (menimpa warna tema klien) */
body.mecha-auth .btn-primary {
    height: 48px;
    border: 0 !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    background: linear-gradient(135deg, var(--ma-blue), var(--ma-blue-600)) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.mecha-auth .btn-primary:hover,
body.mecha-auth .btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

body.mecha-auth .btn-primary:active {
    transform: translateY(0);
}

body.mecha-auth .ma-card a:not(.btn) {
    color: var(--ma-blue) !important;
    font-weight: 500;
}

body.mecha-auth .ma-card a:not(.btn):hover {
    color: var(--ma-blue-600) !important;
    text-decoration: underline;
}

body.mecha-auth .form-check-input:checked {
    background-color: var(--ma-blue);
    border-color: var(--ma-blue);
}

/* Pilihan bahasa */
.ma-panel__lang .lang-dropdown-only-desk {
    list-style: none;
}

.ma-panel__lang .drp-language {
    list-style: none;
}

.ma-panel__lang .dash-head-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--ma-border);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: var(--ma-ink-2) !important;
}

.ma-panel__lang .dash-head-link::before {
    content: "\eb54"; /* ti-world */
    font-family: "tabler-icons";
    font-size: 15px;
}

.ma-panel__lang .dropdown-menu {
    max-height: 320px;
    overflow-y: auto;
    border-radius: 12px;
}

.ma-panel__lang .dropdown-item.active,
.ma-panel__lang .dropdown-item:active {
    background: var(--ma-blue);
    color: #fff;
}

/* Footer */
.ma-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 12.5px;
    color: var(--ma-muted);
}

.ma-footer__company {
    flex-basis: 100%;
}

/* ---------- Animasi ---------- */
@keyframes ma-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}

@keyframes ma-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ma-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes ma-pulse {
    0%, 100% { box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35), 0 0 0 0 rgba(103, 232, 249, 0.35); }
    50% { box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35), 0 0 0 16px rgba(103, 232, 249, 0); }
}

@keyframes ma-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

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

@media (prefers-reduced-motion: reduce) {
    .ma-blob,
    .ma-ring,
    .ma-core,
    .ma-float,
    .ma-bars span,
    .ma-card {
        animation: none !important;
    }
}

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
    .ma-visual {
        padding: 40px 32px;
    }

    .ma-copy h2 {
        font-size: 26px;
    }
}

/* Tablet & HP: panel visual menjadi pita biru tipis di atas */
@media (max-width: 900px) {
    .ma-shell {
        grid-template-columns: 1fr;
    }

    .ma-visual {
        min-height: 0;
        padding: 0;
        height: 8px;
    }

    .ma-visual__inner {
        display: none;
    }

    .ma-panel {
        min-height: calc(100vh - 8px);
        padding: 20px 20px 24px;
    }

    .ma-panel__body {
        align-items: flex-start;
        padding-top: 36px;
    }
}

@media (max-width: 420px) {
    .ma-panel__brand .mecha-brand__name {
        font-size: 18px;
    }

    .ma-footer {
        justify-content: center;
        text-align: center;
    }
}


/* Info Mecha ERP di footer login + ruang untuk tombol WhatsApp melayang */
.ma-footer .mecha-company a {
    color: inherit !important;
}

.ma-footer {
    padding-right: 190px;
}

@media (max-width: 480px) {
    .ma-footer {
        padding-right: 0;
        padding-bottom: 64px;
    }
}
