/* ============================================================
   HRMS - Login Screen
   Single unified mobile+OTP flow (no Admin/Employee tabs) — a hero
   illustration up top with a rounded "bottom sheet" card holding the
   form, matching the Apna Payroll app login mock.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --hrms-primary: #4f46e5;
    --hrms-primary-dark: #4338ca;
    --hrms-accent: #06b6d4;
    --hrms-ink: #1e1b3a;
    --hrms-muted: #8a8aa3;
    --hrms-bg: #eef2ff;
    --hrms-surface: #ffffff;
    --hrms-border: #e3e4ef;
    --hrms-input-bg: #f9fafc;
    --hrms-card-radius: 28px;
    --hrms-shadow: 0 20px 60px -15px rgba(79, 70, 229, 0.35);
}

[data-theme="dark"] {
    --hrms-ink: #f1f1fb;
    --hrms-muted: #9694b8;
    --hrms-bg: #11101f;
    --hrms-surface: #1a1830;
    --hrms-border: #2c2a4a;
    --hrms-input-bg: #221f3d;
    --hrms-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.6);
}

html, body {
    height: 100%;
    margin: 0;
    transition: background-color .2s ease, color .2s ease;
}

.hrms-login-page {
    font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--hrms-bg);
}

/* ---------- Theme toggle ---------- */
.hrms-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.75);
    color: var(--hrms-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.hrms-theme-toggle:hover {
    color: var(--hrms-primary);
    background: #fff;
}

.hrms-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.hrms-theme-toggle .hrms-icon-moon { display: none; }
[data-theme="dark"] .hrms-theme-toggle .hrms-icon-sun { display: none; }
[data-theme="dark"] .hrms-theme-toggle .hrms-icon-moon { display: block; }

/* ---------- Hero illustration ----------
   Drop the provided background asset in at this path — swap the URL
   below and everything else (sizing, overlay, card overlap) just works. */
.hrms-login-hero {
    width: 100%;
    height: 42vh;
    min-height: 280px;
    max-height: 420px;
    background-color: var(--hrms-primary);
    background-image:
        linear-gradient(180deg, rgba(79,70,229,0) 55%, var(--hrms-bg) 100%),
        url('/Content/Uploads/Backgrounds/login-hero.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* ---------- Card ---------- */
.hrms-login-card-wrap {
    width: 100%;
    max-width: 460px;
    margin-top: -64px;
    padding: 0 20px 40px;
    box-sizing: border-box;
    z-index: 2;
    flex: 1;
}

.hrms-login-card {
    background: var(--hrms-surface);
    border-radius: var(--hrms-card-radius);
    box-shadow: var(--hrms-shadow);
    padding: 32px 28px;
    transition: background-color .2s ease;
}

.hrms-form-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--hrms-ink);
    margin: 0 0 6px;
}

.hrms-form-header p {
    font-size: 14px;
    color: var(--hrms-muted);
    margin: 0 0 24px;
}

.hrms-field {
    margin-bottom: 18px;
}

.hrms-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hrms-ink);
    margin-bottom: 6px;
}

.hrms-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.hrms-input-group .hrms-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--hrms-muted);
    display: flex;
    pointer-events: none;
}

.hrms-input-group input.form-control {
    width: 100%;
    height: 48px;
    border: 1px solid var(--hrms-border);
    border-radius: 10px;
    background: var(--hrms-input-bg);
    padding: 0 16px 0 44px;
    font-size: 14px;
    color: var(--hrms-ink);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    box-sizing: border-box;
}

.hrms-input-group input.form-control:focus {
    outline: none;
    border-color: var(--hrms-primary);
    background: var(--hrms-surface);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.hrms-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.hrms-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hrms-muted);
}

.hrms-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--hrms-primary);
}

.hrms-btn-login {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--hrms-primary), var(--hrms-primary-dark));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 12px 24px -10px rgba(79, 70, 229, 0.6);
}

.hrms-btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -10px rgba(79, 70, 229, 0.7);
}

.hrms-btn-login:active {
    transform: translateY(0);
}

.hrms-alert {
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.35);
    color: #e11d48;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.hrms-form-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--hrms-muted);
}

.hrms-form-footer a {
    color: var(--hrms-primary);
    font-weight: 600;
    text-decoration: none;
}

.hrms-form-footer a:hover {
    text-decoration: underline;
}

/* ---------- Legal footer links ---------- */
.hrms-login-legal {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
}

.hrms-login-legal a {
    color: var(--hrms-muted);
    text-decoration: none;
}

.hrms-login-legal a:hover {
    color: var(--hrms-primary);
    text-decoration: underline;
}

.hrms-login-legal span {
    margin: 0 8px;
    color: var(--hrms-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .hrms-login-hero {
        height: 34vh;
        min-height: 220px;
    }

    .hrms-login-card {
        padding: 28px 22px;
    }
}
