/*
 * EMS design system v2 — login page (auth/login_v2.blade.php)
 * Split layout: brand panel (left) + sign-in form (right). Scoped to body.ds-login.
 */
body.ds-login {
    margin: 0;
    min-height: 100vh;
    background: var(--ds-surface);
    color: var(--ds-text-subtle);
    font-family: var(--ds-font);
    font-size: var(--ds-fs-md);
    -webkit-font-smoothing: antialiased;
}
body.ds-login *, body.ds-login *::before, body.ds-login *::after { box-sizing: border-box; }

.ds-login-shell { display: flex; min-height: 100vh; }

/* ---------- Brand panel ---------- */
.ds-login-brand {
    position: relative;
    flex: 1 1 52%;
    display: flex;
    flex-direction: column;
    padding: 56px 64px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(60% 55% at 78% 8%, rgba(18, 137, 143, .55) 0%, rgba(18, 137, 143, 0) 70%),
        radial-gradient(55% 50% at 30% 30%, rgba(16, 65, 105, .95) 0%, rgba(16, 65, 105, 0) 75%),
        radial-gradient(50% 45% at 0% 100%, rgba(18, 137, 143, .30) 0%, rgba(18, 137, 143, 0) 70%),
        var(--ds-brand-900);
}
.ds-login-brand__top { display: flex; align-items: center; gap: 14px; }
.ds-login-logo {
    /* logo PNG has an opaque white background, so present it as a white app tile */
    width: 48px;
    height: 48px;
    padding: 4px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.ds-login-wordmark { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.ds-chip {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-fs-sm);
    font-weight: 600;
    color: #fff;
}
.ds-login-brand__body { margin-top: auto; margin-bottom: auto; padding-top: 48px; max-width: 560px; }
.ds-login-headline {
    margin: 0 0 18px;
    font-size: 56px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.035em;
    color: #fff;
}
.ds-login-lead { margin: 0 0 40px; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .78); max-width: 470px; }

.ds-feature-card {
    max-width: 440px;
    padding: 6px 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.ds-feature { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.ds-feature + .ds-feature { border-top: 1px solid rgba(255, 255, 255, .10); }
.ds-feature__icon {
    flex: 0 0 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
}
.ds-feature__icon svg { width: 20px; height: 20px; }
.ds-feature__text { flex: 1; min-width: 0; }
.ds-feature__title { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.ds-feature__desc { display: block; font-size: 13px; color: rgba(255, 255, 255, .65); margin-top: 2px; }
.ds-feature__tag {
    padding: 4px 10px;
    border-radius: var(--ds-radius-pill);
    background: #fff;
    color: var(--ds-brand-500);
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Form panel ---------- */
.ds-login-main {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    padding: 40px 56px 32px;
    background: var(--ds-surface);
}
.ds-login-main__top { display: flex; justify-content: flex-end; align-items: center; min-height: 24px; font-size: var(--ds-fs-md); color: var(--ds-text-muted); }
.ds-login-main__top a { color: var(--ds-text); font-weight: 600; text-decoration: none; margin-left: 4px; }
.ds-login-main__top a:hover { color: var(--ds-brand-500); text-decoration: underline; }
.ds-login-mobile-brand { display: none; align-items: center; gap: 10px; margin-right: auto; }
.ds-login-mobile-brand img { height: 32px; }
.ds-login-mobile-brand span { font-weight: 700; color: var(--ds-text); }

.ds-login-form-wrap { width: 100%; max-width: 400px; margin: auto; padding: 48px 0; }
.ds-login-title { margin: 0 0 6px; font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--ds-text); }
.ds-login-sub { margin: 0 0 32px; font-size: 16px; color: var(--ds-text-muted); }

.ds-field { margin-bottom: 20px; }
.ds-field > label { display: block; margin-bottom: 8px; font-size: var(--ds-fs-md); font-weight: 600; color: var(--ds-text); }
body.ds-login .ds-input,
body.ds-login .input-group .form-control.ds-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font: inherit;
    font-size: 16px;
    color: var(--ds-text);
    background: var(--ds-gray-050);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: none;
    transition: border-color var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease), background var(--ds-dur) var(--ds-ease);
}
body.ds-login .ds-input::placeholder { color: var(--ds-gray-500); }
body.ds-login .ds-input:focus {
    outline: none;
    background: var(--ds-surface);
    border-color: var(--ds-brand-500);
    box-shadow: 0 0 0 4px rgba(16, 65, 105, .12);
}
body.ds-login .ds-input.error { border-color: var(--ds-danger-500); }
body.ds-login .ds-input.error:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, .12); }

/* password wrapper keeps the .input-group class the toggle JS looks for */
body.ds-login .ds-password.input-group { position: relative; display: block; width: 100%; }
body.ds-login .ds-password .ds-input { padding-right: 52px; }
body.ds-login .ds-password .toggle-password {
    position: absolute;
    top: 0;
    right: 4px;
    width: 44px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ds-gray-500);
    cursor: pointer;
    font-size: 17px;
}
body.ds-login .ds-password .toggle-password:hover { color: var(--ds-text); }

body.ds-login label.error {
    display: block;
    margin-top: 6px;
    font-size: var(--ds-fs-sm);
    font-weight: 500;
    color: var(--ds-danger-500) !important;
}

.ds-check { display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 28px; font-size: 15px; color: var(--ds-text-subtle); cursor: pointer; }
.ds-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ds-brand-500); cursor: pointer; }

.ds-btn-primary {
    display: block;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: var(--ds-radius-lg);
    background: var(--ds-brand-500);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 65, 105, .25);
    transition: background var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease);
}
.ds-btn-primary:hover { background: var(--ds-brand-600); }
.ds-btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(16, 65, 105, .25); }
.ds-btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(16, 65, 105, .3); }

.ds-link { display: inline-block; margin-top: 16px; color: var(--ds-brand-500); font-weight: 500; }

.ds-alert {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: var(--ds-radius-md);
    border: 1px solid transparent;
    font-size: var(--ds-fs-md);
}
.ds-alert ul { margin: 0; padding-left: 18px; }
.ds-alert--warning { background: var(--ds-warning-050); border-color: #f6d9a8; color: var(--ds-warning-500); }
.ds-alert--danger { background: var(--ds-danger-050); border-color: #f5c2c2; color: var(--ds-danger-500); }

.ds-login-footer { display: flex; justify-content: space-between; font-size: var(--ds-fs-sm); color: var(--ds-gray-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .ds-login-brand { padding: 48px; }
    .ds-login-headline { font-size: 46px; }
}
@media (max-width: 991px) {
    .ds-login-brand { display: none; }
    .ds-login-main { padding: 24px 16px; }
    .ds-login-main__top { justify-content: space-between; }
    .ds-login-mobile-brand { display: inline-flex; }
    .ds-login-form-wrap { padding: 32px 0; }
    .ds-login-title { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    body.ds-login * { transition: none !important; }
}
