/* =========================================================================
   EPH Group of Companies — HRIS
   Login Page Stylesheet
   Palette derived from the corporate emblem:
     Green  #0B6634 / #1E9C51   (medical cross)
     Crimson#7E1015 / #D7262E   (left wing)
     Navy   #12285A / #2B57A8   (right wing)
     Silver #98A1A9 / #E7EAED   (laurel ring)
   ========================================================================= */

:root {
    --eph-green: #0b6634;
    --eph-green-600: #12833f;
    --eph-green-400: #1e9c51;
    --eph-green-100: #e6f4ec;

    --eph-red: #7e1015;
    --eph-red-500: #b01e28;
    --eph-red-400: #d7262e;

    --eph-navy: #12285a;
    --eph-navy-600: #1b3b73;
    --eph-navy-400: #2b57a8;

    --eph-ink: #101820;
    --eph-slate: #465162;
    --eph-muted: #7b8794;
    --eph-line: #dfe4ea;
    --eph-surface: #ffffff;
    --eph-canvas: #f4f6f9;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 32, .06), 0 1px 3px rgba(16, 24, 32, .08);
    --shadow-md: 0 10px 24px -8px rgba(16, 24, 32, .18);
    --shadow-lg: 0 30px 60px -24px rgba(16, 24, 32, .35);

    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Poppins", "Inter", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--eph-ink);
    background: var(--eph-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------- Layout */

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ------------------------------------------------------ Brand (left) side */

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(120% 90% at 8% 0%, rgba(43, 87, 168, .55) 0%, transparent 55%),
        radial-gradient(110% 90% at 100% 100%, rgba(215, 38, 46, .45) 0%, transparent 55%),
        linear-gradient(150deg, #0a2044 0%, #0d3a2c 46%, #0b6634 100%);
    isolation: isolate;
}

/* subtle mesh + emblem watermark */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 100%);
    z-index: -2;
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -170px;
    bottom: -180px;
    width: 620px;
    height: 620px;
    background: url("../img/logo.png") center/contain no-repeat;
    opacity: .07;
    z-index: -1;
    pointer-events: none;
}

.brand-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-head .brand-mark {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

.brand-head .brand-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.15;
    margin: 0;
}

.brand-head .brand-sub {
    margin: 2px 0 0;
    font-size: 11px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .68);
}

.brand-body {
    max-width: 520px;
    padding: 40px 0;
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #d6f5e3;
    background: rgba(30, 156, 81, .18);
    border: 1px solid rgba(30, 156, 81, .45);
}

.brand-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -.02em;
    margin: 20px 0 14px;
}

.brand-title span {
    background: linear-gradient(90deg, #7ee2a8, #cfe3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text {
    font-size: 15.5px;
    color: rgba(255, 255, 255, .76);
    margin: 0 0 30px;
    max-width: 46ch;
}

.brand-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.brand-points li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .88);
}

.brand-points i {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 13px;
    color: #eafff2;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
}

.brand-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    align-items: center;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
}

.brand-foot .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
}

/* ------------------------------------------------------- Form (right) side */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--eph-surface);
}

.auth-card {
    width: 100%;
    max-width: 424px;
}

.auth-card .card-logo {
    display: none;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
}

.auth-card h1 {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: var(--eph-ink);
}

.auth-card .lede {
    margin: 0 0 30px;
    color: var(--eph-muted);
    font-size: 14.5px;
}

.tri-rule {
    display: flex;
    height: 4px;
    width: 74px;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 0 26px;
}
.tri-rule i { flex: 1; }
.tri-rule i:nth-child(1) { background: var(--eph-red-500); }
.tri-rule i:nth-child(2) { background: var(--eph-green-400); }
.tri-rule i:nth-child(3) { background: var(--eph-navy-400); }

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--eph-slate);
    margin-bottom: 7px;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
}

.control > .icon {
    position: absolute;
    left: 15px;
    font-size: 14px;
    color: var(--eph-muted);
    pointer-events: none;
    transition: color .18s ease;
}

.control input {
    width: 100%;
    height: 50px;
    padding: 0 46px;
    font-family: inherit;
    font-size: 15px;
    color: var(--eph-ink);
    background: #fbfcfd;
    border: 1.5px solid var(--eph-line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.control input::placeholder { color: #a9b2bc; }

.control input:hover { border-color: #c6ced8; }

.control input:focus {
    background: #fff;
    border-color: var(--eph-green-400);
    box-shadow: 0 0 0 4px rgba(30, 156, 81, .14);
}

.control input:focus ~ .icon { color: var(--eph-green); }

.control .toggle-pass {
    position: absolute;
    right: 6px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--eph-muted);
    cursor: pointer;
    font-size: 14px;
    transition: color .15s ease, background .15s ease;
}

.control .toggle-pass:hover {
    color: var(--eph-green);
    background: var(--eph-green-100);
}

/* invalid state */
.field.is-invalid .control input {
    border-color: var(--eph-red-400);
    background: #fff7f7;
}
.field.is-invalid .control input:focus {
    box-shadow: 0 0 0 4px rgba(215, 38, 46, .13);
}
.field .error-text {
    display: none;
    margin: 7px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--eph-red-500);
}
.field.is-invalid .error-text { display: block; }

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

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

.check input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--eph-line);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, border-color .15s ease;
}

.check input::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform .15s ease;
}

.check input:checked {
    background: var(--eph-green);
    border-color: var(--eph-green);
}

.check input:checked::after { transform: rotate(-45deg) scale(1); }

.link-muted {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--eph-navy-600);
    text-decoration: none;
}
.link-muted:hover { color: var(--eph-green); text-decoration: underline; }

.btn-signin {
    position: relative;
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: linear-gradient(135deg, var(--eph-green-600) 0%, var(--eph-green) 60%, #0a4f28 100%);
    box-shadow: 0 10px 20px -10px rgba(11, 102, 52, .85);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn-signin::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .28) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.btn-signin:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px -12px rgba(11, 102, 52, .9);
}
.btn-signin:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-signin:active:not(:disabled) { transform: translateY(0); }

.btn-signin:disabled {
    cursor: not-allowed;
    filter: grayscale(.25) brightness(.95);
    box-shadow: none;
}

.btn-signin .spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: eph-spin .7s linear infinite;
}

.btn-signin.is-loading .spinner { display: block; }
.btn-signin.is-loading .label-idle { display: none; }

@keyframes eph-spin { to { transform: rotate(360deg); } }

.auth-note {
    margin: 26px 0 0;
    padding: 14px 16px;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: 12.8px;
    line-height: 1.5;
    color: var(--eph-slate);
    background: #f6f8fa;
    border: 1px solid var(--eph-line);
    border-left: 3px solid var(--eph-navy-400);
    border-radius: var(--radius-sm);
}

.auth-note i { color: var(--eph-navy-600); margin-top: 2px; }

.auth-legal {
    margin: 26px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--eph-muted);
}

/* --------------------------------------------------------- SweetAlert skin */

.swal2-popup.eph-swal {
    border-radius: var(--radius) !important;
    font-family: var(--font) !important;
    padding: 30px 26px 26px !important;
}
.swal2-popup.eph-swal .swal2-title {
    font-family: var(--font-display) !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    color: var(--eph-ink) !important;
}
.swal2-popup.eph-swal .swal2-html-container {
    font-size: 14.5px !important;
    color: var(--eph-slate) !important;
}
.swal2-popup.eph-swal .swal2-confirm {
    background: var(--eph-green) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    padding: 11px 26px !important;
    box-shadow: none !important;
}
.swal2-popup.eph-swal .swal2-cancel {
    background: #eef1f4 !important;
    color: var(--eph-slate) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    padding: 11px 26px !important;
}
.swal2-timer-progress-bar { background: var(--eph-green-400) !important; }

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

@media (max-width: 1100px) {
    .auth-brand { padding: 40px 40px; }
    .auth-panel { padding: 40px 32px; }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 28px 24px 34px;
        min-height: auto;
    }

    .auth-brand::after {
        right: -120px;
        bottom: -140px;
        width: 380px;
        height: 380px;
        opacity: .06;
    }

    .brand-body { padding: 24px 0 6px; max-width: none; }
    .brand-title { font-size: clamp(24px, 6vw, 32px); margin: 16px 0 10px; }
    .brand-text { margin-bottom: 20px; font-size: 14.5px; }

    .brand-points {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .brand-foot { display: none; }

    .auth-panel { padding: 34px 24px 48px; }
}

@media (max-width: 560px) {
    body { background: var(--eph-surface); }

    .auth-brand {
        padding: 22px 20px 26px;
        text-align: center;
    }

    .brand-head { justify-content: center; }
    .brand-head .brand-mark { width: 52px; height: 52px; flex-basis: 52px; }
    .brand-head .brand-name { font-size: 17px; }

    .brand-body { padding: 18px 0 0; }
    .brand-eyebrow { font-size: 10px; letter-spacing: .14em; }
    .brand-text { display: none; }
    .brand-points { display: none; }

    .auth-panel { padding: 30px 20px 42px; }
    .auth-card h1 { font-size: 23px; }
    .tri-rule { margin-inline: auto; }
    .auth-card { text-align: center; }
    .field, .field-row { text-align: left; }
    .control input { height: 48px; font-size: 16px; } /* 16px avoids iOS zoom */
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
