/* =====================================================================
   VIOLETPRO HR & PAYROLL — Login page
   Logo colors: Navy #223469 · Yellow #F9DD51
   ===================================================================== */

:root {
    --navy-950: #0e1530;
    --navy-900: #151f45;
    --navy-800: #1b2957;
    --navy: #223469;
    --navy-500: #344a8c;
    --navy-300: #94a3d1;
    --navy-200: #c7cfea;
    --navy-100: #e6eaf6;
    --navy-50: #f3f5fb;

    --yellow: #f9dd51;
    --yellow-600: #ecc62b;

    --ink: #161d36;
    --ink-2: #3f4763;
    --muted: #6b7290;
    --line: #dfe3ee;
    --danger: #c0392b;
    --danger-soft: #fdeeec;

    --radius: 12px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink-2);
    background: var(--navy-50);
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------------
   Layout: brand panel + form
   --------------------------------------------------------------------- */
.vp-login {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------------------------------------------------------------------
   Brand panel
   --------------------------------------------------------------------- */
.vp-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 64px;
    color: #fff;
    background:
        radial-gradient(700px 420px at 100% 0%, rgba(249, 221, 81, 0.14), transparent 60%),
        radial-gradient(600px 400px at 0% 100%, rgba(52, 74, 140, 0.55), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
}

/* subtle dotted texture */
.vp-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.vp-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.vp-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy-950);
    background: var(--yellow);
    border-radius: 999px;
}

.vp-brand h1 {
    margin: 22px 0 12px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
}

.vp-brand h1 span {
    color: var(--yellow);
}

.vp-brand-inner > p {
    margin: 0 0 28px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--navy-200);
}

.vp-features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.vp-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: #e8ecf8;
}

.vp-features i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--yellow);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
}

/* Decorative 3x3 cube grid (navy + yellow like the logo) */
.vp-cubes {
    position: absolute;
    right: -26px;
    bottom: 70px;
    display: grid;
    grid-template-columns: repeat(3, 56px);
    gap: 8px;
    transform: rotate(-12deg);
    opacity: 0.9;
}

.vp-cubes span {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vp-cubes span.y {
    background: linear-gradient(145deg, var(--yellow), var(--yellow-600));
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(249, 221, 81, 0.18);
}

.vp-brand-foot {
    position: absolute;
    left: 64px;
    bottom: 28px;
    margin: 0;
    font-size: 12px;
    color: var(--navy-300);
    z-index: 1;
}

/* ---------------------------------------------------------------------
   Form side
   --------------------------------------------------------------------- */
.vp-form-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.vp-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 36px 30px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--yellow);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(21, 31, 69, 0.04),
        0 18px 40px -16px rgba(21, 31, 69, 0.22);
}

.vp-logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: 100%;
    margin: 0 auto 22px;
    object-fit: contain;
}

.vp-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.vp-sub {
    margin: 6px 0 24px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}

/* Error message */
.vp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #8e2a20;
    background: var(--danger-soft);
    border: 1px solid #f3c6c2;
    border-left: 3px solid var(--danger);
    border-radius: 8px;
    animation: vp-shake 0.35s ease;
}

.vp-alert i {
    margin-top: 2px;
    color: var(--danger);
}

/* Fields */
.vp-field {
    margin-bottom: 16px;
}

.vp-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}

.vp-input {
    position: relative;
    display: flex;
    align-items: center;
}

.vp-input > i {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: var(--navy-300);
    pointer-events: none;
    transition: color 0.15s;
}

.vp-input input {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 44px 0 42px;
    font-family: var(--font);
    font-size: 14.5px;
    color: var(--ink);
    background: var(--navy-50);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.vp-input input::placeholder {
    color: #a0a6bd;
}

.vp-input input:hover {
    border-color: var(--navy-300);
}

.vp-input input:focus {
    background: #fff;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(34, 52, 105, 0.12);
}

.vp-input:focus-within > i {
    color: var(--navy);
}

/* Invalid (empty required field) */
.vp-input.is-invalid input {
    border-color: var(--danger);
    background: #fffafa;
}

.vp-input.is-invalid > i {
    color: var(--danger);
}

/* Show / hide password */
.vp-eye {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 14px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.vp-eye:hover {
    color: var(--navy);
    background: var(--navy-100);
}

.vp-caps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #8a6a00;
}

.vp-caps[hidden] {
    display: none;
}

/* Submit button */
.vp-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--navy);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 18px -8px rgba(34, 52, 105, 0.55);
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.vp-btn:hover {
    background: var(--navy-800);
}

.vp-btn:hover .vp-btn-icon {
    color: var(--yellow);
    transform: translateX(3px);
}

.vp-btn:active {
    transform: translateY(1px);
}

.vp-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(249, 221, 81, 0.6);
}

.vp-btn-icon {
    transition: transform 0.15s, color 0.15s;
}

.vp-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: vp-spin 0.7s linear infinite;
}

.vp-btn.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.vp-btn.is-loading .vp-btn-icon {
    display: none;
}

.vp-btn.is-loading .vp-spinner {
    display: inline-block;
}

.vp-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.vp-secure i {
    font-size: 11px;
    color: var(--navy-300);
}

.vp-footer {
    margin: 22px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.vp-footer a {
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
}

.vp-footer a:hover {
    color: var(--navy-500);
    text-decoration: underline;
}

/* ---------------------------------------------------------------------
   Animations
   --------------------------------------------------------------------- */
@keyframes vp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes vp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .vp-login {
        grid-template-columns: 1fr;
    }

    .vp-brand {
        display: none;
    }

    /* keep the brand feeling on tablets / phones */
    .vp-form-side {
        min-height: 100vh;
        background:
            radial-gradient(500px 300px at 100% 0%, rgba(249, 221, 81, 0.18), transparent 60%),
            linear-gradient(170deg, var(--navy) 0%, var(--navy-900) 38%, var(--navy-50) 38.1%);
    }

    .vp-footer {
        color: var(--muted);
    }
}

@media (max-width: 420px) {
    .vp-form-side {
        padding: 28px 14px;
    }

    .vp-card {
        padding: 30px 22px 24px;
    }

    .vp-logo {
        height: 54px;
    }
}
