:root {
    --login-ink: #17201D;
    --login-muted: #65736D;
    --login-line: rgba(24, 47, 39, .12);
    --login-surface: rgba(255, 255, 255, .88);
    --login-green: #2BC893;
    --login-green-dark: #16875F;
    --login-green-deep: #126B50;
    --login-focus: rgba(43, 200, 147, .2);
}

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

html { min-height: 100%; background: #F4F8F6; }

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 25px 20px;
    background:
        radial-gradient(circle at 50% 10%, rgba(43, 200, 147, .12), transparent 30rem),
        linear-gradient(145deg, #FBFCFB 0%, #F3F7F5 52%, #EDF4F1 100%);
    color: var(--login-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page::before,
.login-page::after {
    content: '';
    position: fixed;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(2px);
}
.login-page::before { width: 420px; height: 420px; left: -210px; bottom: -230px; background: rgba(43, 200, 147, .055); }
.login-page::after { width: 300px; height: 300px; right: -160px; top: -150px; border: 1px solid rgba(43, 200, 147, .14); }

.login-wrap {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: pageIn .5s cubic-bezier(.22, 1, .36, 1) both;
}

.login-page--admin.login-page--demo .login-wrap { max-width: 810px; }

.brand { display: flex; align-items: center; justify-content: center; margin-bottom: 5px; }
.asygna-logo { display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.asygna-mark { width: 35px; height: 35px; overflow: visible; flex: none; }
.asygna-wordmark { color: var(--login-ink); font-family: 'DM Sans', Inter, sans-serif; font-size: 25px; font-weight: 550; letter-spacing: -1.25px; }

.mark-line {
    fill: none;
    stroke: rgba(43, 200, 147, .64);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: markConnect .75s cubic-bezier(.22, 1, .36, 1) forwards;
}
.mark-line-2 { animation-delay: .12s; }
.mark-line-3 { animation-delay: .2s; }
.mark-line-4 { animation-delay: .3s; }
.mark-line-5 { animation-delay: .38s; }
.mark-node { fill: var(--login-green); transform-box: fill-box; transform-origin: center; opacity: 0; animation: markNodeIn .55s cubic-bezier(.22, 1, .36, 1) forwards; }
.mark-node-center { fill: #F4FAF7; stroke: var(--login-green); stroke-width: 2; }
.n1 { animation-delay: .02s; transform: translate(-8px, -4px) scale(.4); }
.n2 { animation-delay: .08s; transform: translate(0, -10px) scale(.4); }
.n3 { animation-delay: .14s; transform: translate(8px, -4px) scale(.4); }
.n4 { animation-delay: .2s; transform: translate(-9px, 7px) scale(.4); }
.n5 { animation-delay: .26s; transform: translate(9px, 7px) scale(.4); }
.n6 { animation-delay: .34s; transform: translate(0, 10px) scale(.4); }
.mark-node-center { animation-delay: .42s; transform: scale(.3); }

.brand-tagline { margin-bottom: 13px; color: #65736D; font-size: 12px; font-weight: 600; text-align: center; }
.brand-tagline span { color: #36443F; }
.portal-badge {
    display: block;
    width: max-content;
    margin: 0 auto 14px;
    padding: 5px 11px;
    border: 1px solid rgba(43, 200, 147, .22);
    border-radius: 999px;
    background: rgba(236, 253, 245, .78);
    color: var(--login-green-deep);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.login-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 22px;
    background: var(--login-surface);
    box-shadow: 0 24px 70px rgba(24, 47, 39, .1), 0 2px 8px rgba(24, 47, 39, .04), inset 0 0 0 1px var(--login-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: cardIn .55s .06s cubic-bezier(.22, 1, .36, 1) both;
}

.login-main { padding: 27px 30px 26px; }
.login-card--with-demo { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
.login-card--with-demo .login-main { padding: 29px 31px 27px; }

.card-eyebrow { margin-bottom: 7px; color: var(--login-green-dark); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.card-title { margin-bottom: 6px; color: var(--login-ink); font-size: 23px; font-weight: 760; line-height: 1.18; letter-spacing: -.6px; }
.card-sub { max-width: 37ch; margin-bottom: 21px; color: var(--login-muted); font-size: 13px; line-height: 1.5; }

.notice {
    margin-bottom: 15px;
    padding: 11px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
}
.notice strong { font-weight: 750; }
.notice a { color: inherit; font-weight: 700; }
.notice--success { border-color: #BCEBD9; background: #ECFDF5; color: #126B50; }
.notice--info { border-color: #C9E8DC; background: #EFFAF5; color: #155F49; }
.notice--warning { border-color: #F1D79A; background: #FFF8E7; color: #76510A; }
.notice--danger { border-color: #F1CCCC; background: #FFF1F1; color: #922B2B; }

.demo-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -2px 0 17px;
    padding: 10px 12px;
    border: 1px solid #CDEBDD;
    border-radius: 11px;
    background: #EFFAF5;
    color: #155F49;
}
.demo-inline-icon { display: grid; width: 27px; height: 27px; flex: none; place-items: center; border-radius: 8px; background: #DDF5EC; color: var(--login-green-dark); }
.demo-inline > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.demo-inline strong { font-size: 11.5px; }
.demo-inline small { color: #527167; font-size: 10.5px; line-height: 1.3; }

.login-form { display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { color: #46534E; font-size: 11.5px; font-weight: 700; }
.field input {
    width: 100%;
    height: 47px;
    padding: 0 14px;
    border: 1px solid rgba(31, 54, 46, .15);
    border-radius: 11px;
    outline: none;
    background: rgba(249, 251, 250, .92);
    color: var(--login-ink);
    font: inherit;
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:hover { border-color: rgba(31, 54, 46, .25); background: #fff; }
.field input:focus { border-color: var(--login-green); background: #fff; box-shadow: 0 0 0 4px var(--login-focus); }
.field-pass { position: relative; }
.field-pass input { padding-right: 48px; }
.toggle-pass { position: absolute; top: 50%; right: 6px; width: 35px; height: 35px; display: grid; transform: translateY(-50%); place-items: center; border: 0; border-radius: 9px; background: transparent; color: #7E8B85; cursor: pointer; }
.toggle-pass:hover { background: #EEF4F1; color: #33413C; }
.toggle-pass:focus-visible { outline: 3px solid var(--login-focus); color: var(--login-green-deep); }

.field-extras { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -1px 0 18px; }
.field-check { display: flex; align-items: center; gap: 8px; }
.field-check input[type='checkbox'] { appearance: none; width: 17px; height: 17px; display: grid; place-content: center; border: 1px solid rgba(31, 54, 46, .28); border-radius: 5px; background: #fff; cursor: pointer; }
.field-check input[type='checkbox']::before { content: ''; width: 9px; height: 9px; transform: scale(0); transition: transform .12s; clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 18%, 84% 4%, 39% 70%); background: #fff; }
.field-check input[type='checkbox']:checked { border-color: var(--login-green-dark); background: var(--login-green-dark); }
.field-check input[type='checkbox']:checked::before { transform: scale(1); }
.field-check input[type='checkbox']:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 2px; }
.field-check label, .link-forgot { font-size: 12px; }
.field-check label { color: #58665F; cursor: pointer; }
.link-forgot { color: var(--login-green-deep); font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn-submit {
    width: 100%;
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0B2119 0%, #174A3A 100%);
    box-shadow: 0 9px 21px rgba(11, 33, 25, .19), inset 0 1px rgba(255, 255, 255, .14);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-submit::after { content: '→'; font-size: 17px; line-height: 1; transition: transform .18s; }
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 13px 27px rgba(11, 33, 25, .23); filter: brightness(1.04); }
.btn-submit:hover::after { transform: translateX(3px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:focus-visible { outline: 3px solid rgba(43, 200, 147, .36); outline-offset: 3px; }

.demo-panel {
    align-self: stretch;
    margin: 12px 12px 12px 0;
    border: 1px solid #CDEBDD;
    border-radius: 16px;
    background: linear-gradient(155deg, rgba(239, 250, 245, .95), rgba(226, 246, 237, .88));
    color: var(--login-ink);
}
.demo-panel summary { display: flex; align-items: center; gap: 9px; padding: 18px 17px 13px; list-style: none; cursor: pointer; }
.demo-panel summary::-webkit-details-marker { display: none; }
.demo-summary-icon { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .7); color: var(--login-green-dark); }
.demo-panel summary > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.demo-panel summary strong { font-size: 11.5px; }
.demo-panel summary small { color: #5B736A; font-size: 9.5px; line-height: 1.3; }
.demo-chevron { flex: none; color: #688078; transition: transform .18s; }
.demo-panel[open] .demo-chevron { transform: rotate(180deg); }
.demo-panel summary:focus-visible { outline: 3px solid var(--login-focus); outline-offset: -3px; border-radius: 15px; }
.demo-panel-content { padding: 0 14px 15px; }
.demo-panel-intro { margin-bottom: 10px; color: #536C63; font-size: 10.5px; line-height: 1.4; }
.demo-profiles { display: flex; flex-direction: column; gap: 7px; }
.demo-profile {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    padding: 7px 9px;
    border: 1px solid rgba(22, 135, 95, .12);
    border-radius: 11px;
    background: rgba(255, 255, 255, .68);
    color: var(--login-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.demo-profile:hover { transform: translateY(-1px); border-color: rgba(22, 135, 95, .3); background: #fff; }
.demo-profile:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 1px; }
.demo-profile.is-selected { border-color: rgba(22, 135, 95, .42); background: #fff; box-shadow: 0 4px 12px rgba(22, 107, 80, .08); }
.demo-profile-avatar { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 9px; background: #DDF5EC; color: var(--login-green-deep); font-size: 9px; font-weight: 800; }
.demo-profile-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.demo-profile-copy strong { font-size: 11px; }
.demo-profile-copy small { overflow: hidden; color: #63746D; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.demo-profile-check { flex: none; color: var(--login-green-dark); opacity: 0; }
.demo-profile.is-selected .demo-profile-check { opacity: 1; }
.demo-password { margin: 11px 0 9px; color: #587068; font-size: 9.5px; text-align: center; }
.demo-password code { color: #174F3E; font-family: 'SFMono-Regular', Consolas, monospace; font-weight: 700; }
.portal-switch { display: block; padding-top: 10px; border-top: 1px solid rgba(22, 135, 95, .14); color: var(--login-green-deep); font-size: 10px; font-weight: 700; line-height: 1.35; text-align: center; text-decoration: none; }
.portal-switch:hover { text-decoration: underline; text-underline-offset: 3px; }

.portal-crosslink { display: block; margin-top: 15px; color: #5B6C65; font-size: 10.5px; text-align: center; text-decoration: none; }
.portal-crosslink strong { color: var(--login-green-deep); }
.portal-crosslink:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.login-footer { margin-top: 13px; color: #7B8983; font-size: 10.5px; letter-spacing: .01em; text-align: center; }
.login-footer strong { color: #596861; font-weight: 700; }

[hidden] { display: none !important; }

@keyframes markNodeIn { to { opacity: 1; transform: translate(0, 0) scale(1); } }
@keyframes markConnect { to { stroke-dashoffset: 0; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }

@media (max-width: 759px) {
    .login-page { align-items: start; padding: 22px 15px; }
    .login-page--admin.login-page--demo .login-wrap { max-width: 440px; }
    .login-card--with-demo { grid-template-columns: 1fr; }
    .login-card--with-demo .login-main { padding: 27px 25px 25px; }
    .demo-panel { margin: 0 12px 12px; }
    .demo-panel summary { padding: 13px 14px; }
    .demo-panel-content { padding: 0 12px 13px; }
}

@media (max-width: 520px) {
    .login-page { padding: 19px 14px; }
    .asygna-mark { width: 32px; height: 32px; }
    .asygna-wordmark { font-size: 23px; }
    .brand-tagline { margin-bottom: 11px; }
    .portal-badge { margin-bottom: 12px; }
    .login-main, .login-card--with-demo .login-main { padding: 24px 20px 22px; }
    .login-card { border-radius: 19px; }
    .card-title { font-size: 21px; }
    .card-sub { margin-bottom: 18px; font-size: 12.5px; }
    .field input { height: 49px; font-size: 16px; }
    .field-extras { align-items: flex-start; }
}

@media (max-width: 370px) {
    .field-extras { flex-direction: column; gap: 9px; }
    .link-forgot { margin-left: 25px; }
    .login-main, .login-card--with-demo .login-main { padding-inline: 17px; }
}

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