﻿:root {
        --bg-left: #ffffff;
        --bg-right: #eef6ff;
        --surface: #ffffff;
        --surface-soft: #f8fbff;
        --text-main: #111827;
        --text-strong: #0f1f3a;
        --text-sub: #6b7684;
        --text-muted: #8b95a1;
        --line: #e5ecf5;
        --line-strong: #d4dfec;
        --blue: #3182F6;
        --blue-deep: #0b5fe8;
        --blue-soft: #eaf3ff;
        --shadow-card: 0 26px 70px rgba(31, 84, 147, 0.12);
        --shadow-soft: 0 14px 34px rgba(31, 84, 147, 0.07);
        --radius-card: 28px;
        --radius-field: 14px;
    }

    * { box-sizing: border-box; }

    a,
    button:not(:disabled),
    select,
    label[for],
    input[type=checkbox] {
        cursor: pointer;
    }

    input[type=text],
    input[type=password],
    input[type=email],
    textarea {
        cursor: text;
    }

    html,
    body {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', Arial, sans-serif;
        background: var(--bg-right);
        color: var(--text-main);
        -webkit-font-smoothing: antialiased;
        text-rendering: geometricPrecision;
    }

    body { overflow: hidden; }

    .ax-body.login {
        position: relative;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: auto;
        background:
            radial-gradient(circle at -4% 2%, rgba(49,130,246,0.09), transparent 28%),
            radial-gradient(circle at 86% 10%, rgba(49,130,246,0.07), transparent 26%),
            linear-gradient(90deg, var(--bg-left) 0%, #fbfdff 42%, #f2f8ff 54%, var(--bg-right) 100%);
        animation: backgroundFadeIn .42s ease both;
    }

    .ax-body.login:before {
        content: "";
        position: fixed;
        left: -12%;
        top: -18%;
        width: 36%;
        height: 48%;
        border-radius: 50%;
        background: rgba(49, 130, 246, 0.06);
        pointer-events: none;
        filter: blur(58px);
    }

    .ax-body.login:after {
        content: "";
        position: fixed;
        right: 10%;
        top: 4%;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        background: rgba(49, 130, 246, 0.06);
        filter: blur(72px);
        pointer-events: none;
    }

    .login-page {
        position: relative;
        z-index: 1;
        min-height: 100vh;
        min-height: 100dvh;
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
    }

    .brand-panel {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 72px clamp(54px, 6.2vw, 112px);
        overflow: hidden;
    }

    .brand-content {
        position: relative;
        z-index: 2;
        max-width: 690px;
        margin-bottom: 250px;
    }

    .brand-kicker,
    .brand-title,
    .brand-subtitle,
    .brand-line,
    .brand-desc,
    .dashboard-ghost,
    .login-card,
    .login-card-title,
    .login-card-sub,
    .login-card .form-group,
    .login-options,
    .login-btn,
    .login-divider,
    .login-links {
        opacity: 0;
        animation: revealUp .42s cubic-bezier(.2, .8, .2, 1) both;
    }

    .brand-kicker {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 30px;
        color: var(--blue);
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
        animation-delay: .08s;
    }

    .brand-kicker:before {
        content: "";
        width: 42px;
        height: 2px;
        border-radius: 99px;
        background: var(--blue);
    }

    .brand-title {
        margin: 0 0 20px;
        color: #111827;
        font-size: 82px;
        line-height: .96;
        font-weight: 900;
        letter-spacing: 0;
        animation-delay: .08s;
    }

    .brand-title span {
        color: var(--blue);
        letter-spacing: 0;
    }

    .brand-subtitle {
        margin: 0 0 36px;
        color: #6f7c90;
        font-size: 24px;
        line-height: 1.35;
        font-weight: 700;
        letter-spacing: 0;
        animation-delay: .16s;
    }

    .brand-line {
        width: 48px;
        height: 3px;
        margin-bottom: 34px;
        border-radius: 99px;
        background: var(--blue);
        animation-delay: .22s;
    }

    .brand-desc {
        margin: 0;
        color: #465872;
        font-size: 17px;
        line-height: 1.9;
        font-weight: 500;
        word-break: keep-all;
        letter-spacing: 0;
        animation-delay: .28s;
    }

    .brand-tags {
        display: block;
        margin-top: 10px;
        color: #6b7684;
        font-size: 15px;
        font-weight: 700;
    }

    .dashboard-ghost {
        position: absolute;
        left: clamp(18px, 3.2vw, 56px);
        bottom: clamp(14px, 4.4vw, 72px);
        z-index: 1;
        width: min(780px, 82vw);
        height: 330px;
        transform: rotate(-5deg);
        transform-origin: left bottom;
        border: 1px solid rgba(167, 195, 231, 0.34);
        border-radius: 26px;
        background: rgba(255,255,255,0.72);
        box-shadow: 0 28px 76px rgba(49, 130, 246, 0.16);
        filter: blur(.6px);
        overflow: hidden;
        pointer-events: none;
        animation-name: dashboardReveal;
        animation-delay: .36s;
    }

    .dashboard-ghost:before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 4;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.14), rgba(238,246,255,0.48)),
            linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.54));
    }

    .dashboard-side {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 142px;
        padding: 24px 18px;
        background: rgba(246, 250, 255, 0.92);
        border-right: 1px solid rgba(213, 225, 240, 0.72);
    }

    .dashboard-side span,
    .dashboard-metric,
    .dashboard-gauge,
    .dashboard-chart,
    .dashboard-list {
        display: block;
        border-radius: 14px;
        background: rgba(49, 130, 246, 0.10);
    }

    .dashboard-side span {
        height: 14px;
        margin-bottom: 18px;
    }

    .dashboard-side span:nth-child(2) {
        width: 96px !important;
        height: 30px;
        margin-left: -6px;
        padding: 0;
        border-radius: 10px;
        background: rgba(49,130,246,0.18);
    }

    .dashboard-main {
        position: absolute;
        left: 172px;
        right: 28px;
        top: 30px;
        bottom: 30px;
        display: grid;
        grid-template-columns: 1.05fr 1fr .9fr;
        grid-template-rows: 96px 1fr;
        gap: 18px;
    }

    .dashboard-metric,
    .dashboard-gauge,
    .dashboard-chart,
    .dashboard-list {
        background-color: rgba(255,255,255,0.88);
        border: 1px solid rgba(218,229,242,0.86);
        box-shadow: 0 14px 30px rgba(31, 84, 147, 0.08);
    }

    .dashboard-metric {
        position: relative;
    }

    .dashboard-metric:before,
    .dashboard-metric:after {
        content: "";
        position: absolute;
        left: 22px;
        right: 28px;
        height: 12px;
        border-radius: 99px;
        background: rgba(49,130,246,0.16);
    }

    .dashboard-metric:before { top: 24px; }
    .dashboard-metric:after {
        top: 52px;
        right: 56px;
        background: rgba(15,31,58,0.12);
    }

    .dashboard-gauge {
        position: relative;
        display: grid;
        place-items: center;
    }

    .dashboard-gauge:before {
        content: "";
        width: 62px;
        height: 62px;
        border-radius: 50%;
        background: conic-gradient(rgba(49,130,246,.58) 0 305deg, rgba(214,227,246,.84) 305deg 360deg);
        mask: radial-gradient(circle, transparent 48%, #000 50%);
        -webkit-mask: radial-gradient(circle, transparent 48%, #000 50%);
    }

    .dashboard-chart {
        grid-column: span 2;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
            repeating-linear-gradient(90deg, rgba(49,130,246,0.24) 0 18px, transparent 18px 34px);
        position: relative;
    }

    .dashboard-chart:after {
        content: "";
        position: absolute;
        left: 30px;
        right: 30px;
        bottom: 30px;
        height: 86px;
        background: repeating-linear-gradient(90deg, rgba(49,130,246,.30) 0 16px, transparent 16px 34px);
        clip-path: polygon(0 100%, 0 66%, 7% 66%, 7% 100%, 12% 100%, 12% 40%, 19% 40%, 19% 100%, 24% 100%, 24% 56%, 31% 56%, 31% 100%, 36% 100%, 36% 22%, 43% 22%, 43% 100%, 48% 100%, 48% 48%, 55% 48%, 55% 100%, 60% 100%, 60% 30%, 67% 30%, 67% 100%, 72% 100%, 72% 62%, 79% 62%, 79% 100%, 84% 100%, 84% 18%, 91% 18%, 91% 100%, 100% 100%);
    }

    .dashboard-list {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
            repeating-linear-gradient(180deg, rgba(49,130,246,0.12) 0 12px, transparent 12px 28px);
    }

    .login-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 64px clamp(34px, 5vw, 92px);
    }

    .login-card {
        width: 100%;
        max-width: 520px;
        padding: 64px 56px 48px;
        border: 1px solid rgba(213, 225, 240, 0.95);
        border-radius: var(--radius-card);
        background: rgba(255,255,255,0.94);
        box-shadow: var(--shadow-card);
        backdrop-filter: blur(18px);
        animation-duration: .44s;
        animation-delay: .42s;
    }

    .login-card-title {
        margin: 0 0 10px;
        color: var(--text-strong);
        font-size: 42px;
        line-height: 1.12;
        font-weight: 900;
        letter-spacing: 0;
        animation-delay: .48s;
    }

    .login-card-sub {
        margin: 0 0 38px;
        color: #7d8898;
        font-size: 16px;
        line-height: 1.55;
        font-weight: 600;
        letter-spacing: 0;
        animation-delay: .54s;
    }

    .form-group { margin-bottom: 22px; }

    .login-card .form-group:nth-of-type(1) { animation-delay: .62s; }
    .login-card .form-group:nth-of-type(2) { animation-delay: .70s; }
    .login-card .form-group:nth-of-type(3) { animation-delay: .78s; }

    .form-group label {
        display: block;
        margin-bottom: 10px;
        color: #1f2937;
        font-size: 14px;
        font-weight: 850;
        letter-spacing: 0;
    }

    .form-control,
    input[type=text],
    input[type=password] {
        width: 100%;
        height: 58px;
        border: 1px solid var(--line) !important;
        border-radius: var(--radius-field);
        outline: none;
        background-color: #ffffff !important;
        color: #1f2937 !important;
        padding: 0 18px;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0;
        box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
        transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
    }

    .form-control:hover,
    input[type=text]:hover,
    input[type=password]:hover {
        border-color: var(--line-strong) !important;
        background-color: #fbfdff !important;
    }

    .form-control:focus,
    input[type=text]:focus,
    input[type=password]:focus {
        border-color: var(--blue) !important;
        background-color: #ffffff !important;
        box-shadow: 0 0 0 4px rgba(49,130,246,.08);
    }

    select.form-control {
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
        padding-right: 48px;
        background-image:
            linear-gradient(45deg, transparent 50%, #6b7684 50%),
            linear-gradient(135deg, #6b7684 50%, transparent 50%);
        background-position:
            calc(100% - 25px) 50%,
            calc(100% - 18px) 50%;
        background-size: 7px 7px, 7px 7px;
        background-repeat: no-repeat;
    }

    select.form-control option {
        color: #1f2937;
        background: #ffffff;
    }

    input::placeholder { color: #9aa4b2; opacity: 1; }

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
        -webkit-text-fill-color: #1f2937 !important;
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
        transition: background-color 9999s ease-in-out 0s;
    }

    .password-field { position: relative; }
    .password-field input { padding-right: 56px; }

    .password-toggle {
        position: absolute;
        top: 50%;
        right: 14px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 11px;
        background: transparent;
        color: #8b95a7;
        transform: translateY(-50%);
        cursor: pointer;
        transition: color .16s ease, background .16s ease;
    }

    .password-toggle:hover,
    .password-toggle:focus {
        color: var(--blue);
        background: #f1f6ff;
        outline: none;
    }

    .password-toggle svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .password-toggle .icon-eye { display: none; }
    .password-toggle.is-visible .icon-eye { display: inline-block; }
    .password-toggle.is-visible .icon-eye-off { display: none; }

    .login-options {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 2px 0 26px;
        color: #667085;
        font-size: 14px;
    }

    .login-options label {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        margin: 0;
        color: #667085;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0;
    }

    .login-options { animation-delay: .86s; }

    .login-options input {
        width: 18px;
        height: 18px;
        accent-color: var(--blue);
        cursor: pointer;
        transition: box-shadow .16s ease, transform .16s ease;
    }

    .login-options input:hover,
    .login-options label:hover input {
        box-shadow: 0 0 0 4px rgba(49,130,246,.12);
        transform: translateY(-1px);
    }

    .login-btn {
        width: 100%;
        height: 58px;
        border: 0;
        border-radius: 16px;
        background: var(--blue);
        color: #ffffff;
        font-size: 17px;
        font-weight: 900;
        letter-spacing: 0;
        cursor: pointer;
        box-shadow: 0 14px 26px rgba(49,130,246,0.24);
        transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
        animation-delay: .94s;
    }

    .login-btn:hover {
        background: var(--blue-deep);
        transform: translateY(-1px);
        box-shadow: 0 18px 32px rgba(49,130,246,0.29);
    }

    .login-btn:active {
        transform: translateY(0);
        box-shadow: 0 10px 22px rgba(27,118,255,0.22);
    }

    .login-divider {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 18px;
        margin: 34px 0 26px;
        color: #a1aab8;
        font-size: 13px;
        font-weight: 800;
        animation-delay: 1.02s;
    }

    .login-divider:before,
    .login-divider:after {
        content: "";
        height: 1px;
        background: #e6edf6;
    }

    .login-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
    }

    .login-links a,
    .login-links button {
        border: 0;
        background: transparent;
        color: #6b7684;
        padding: 0 24px;
        font-size: 15px;
        font-weight: 850;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        letter-spacing: 0;
        transition: color .16s ease, text-shadow .16s ease, transform .16s ease;
    }

    .login-links { animation-delay: 1.10s; }

    .login-links a:first-child { color: var(--blue); }
    .login-links a:hover,
    .login-links button:hover {
        color: var(--blue-deep);
        text-decoration: none;
        transform: translateY(-1px);
        text-shadow: 0 6px 14px rgba(49,130,246,0.26);
    }

    .login-links a:focus,
    .login-links button:focus {
        outline: none;
        color: var(--blue-deep);
        text-shadow: 0 6px 14px rgba(49,130,246,0.26);
        transform: translateY(-1px);
    }

    .login-links a + button,
    .login-links button + button {
        border-left: 1px solid #d9e2ef;
    }

    .password-reset-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1000;
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    .password-reset-modal.open {
        display: flex;
    }

    .password-reset-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.34);
        backdrop-filter: blur(4px);
    }

    .password-reset-card {
        position: relative;
        z-index: 1;
        width: min(420px, 100%);
        padding: 34px 30px 30px;
        border: 1px solid #d9e2ef;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
        animation: cardRise 0.24s ease both;
    }

    .password-reset-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #8b95a1;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .password-reset-close:hover,
    .password-reset-close:focus {
        color: var(--blue);
        background: #f1f6ff;
        outline: none;
    }

    .password-reset-card h3 {
        margin: 0 0 8px;
        color: var(--text-strong);
        font-size: 24px;
        line-height: 1.25;
        font-weight: 900;
    }

    .password-reset-card p {
        margin: 0 0 22px;
        color: #6b7684;
        font-size: 14px;
        line-height: 1.6;
    }

    .password-reset-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 22px;
    }

    .password-reset-actions button {
        height: 48px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 900;
        cursor: pointer;
    }

    .password-reset-cancel {
        border: 1px solid #d8e2ef;
        background: #ffffff;
        color: #475569;
    }

    .password-reset-submit {
        border: 0;
        background: var(--blue);
        color: #ffffff;
    }

    .password-reset-submit:disabled {
        cursor: wait;
        opacity: 0.65;
    }

    .password-reset-message {
        display: none;
        margin: 16px 0 0;
        padding: 12px 14px;
        border-radius: 12px;
        background: #f3f8ff;
        border: 1px solid #d8e8ff;
        color: #21578f;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.5;
    }

    .password-reset-message.error {
        display: block;
        background: #fff5f5;
        border-color: #ffd6d6;
        color: #b42318;
    }

    .password-reset-message.success,
    .password-reset-message.info {
        display: block;
    }

    .password-reset-spinner {
        display: none;
        width: 14px;
        height: 14px;
        margin-right: 7px;
        border: 2px solid rgba(255,255,255,0.45);
        border-top-color: #ffffff;
        border-radius: 50%;
        vertical-align: -2px;
        animation: spin .7s linear infinite;
    }

    .password-reset-submit.is-loading .password-reset-spinner {
        display: inline-block;
    }

    @media (max-width: 1100px) {
        body { overflow: auto; }
        .ax-body.login {
            background: linear-gradient(180deg, #ffffff 0%, #ffffff 34%, #eef6ff 34%, #eef6ff 100%);
        }
        .ax-body.login:before,
        .ax-body.login:after { display: none; }
        .login-page { grid-template-columns: 1fr; }
        .brand-panel {
            padding: 42px 28px 24px;
            text-align: center;
            align-items: center;
        }
        .brand-kicker { margin-bottom: 16px; }
        .brand-kicker:before { display: none; }
        .brand-title { font-size: 48px; letter-spacing: 0; }
        .brand-subtitle { margin-bottom: 0; font-size: 18px; }
        .brand-desc,
        .brand-line,
        .dashboard-ghost { display: none; }
        .login-panel { padding: 22px 20px 72px; align-items: flex-start; }
        .login-card { max-width: 520px; }
    }

    @media (max-width: 560px) {
        .brand-panel { padding: 30px 18px 18px; }
        .brand-kicker { font-size: 10px; letter-spacing: 0; }
        .brand-title { font-size: 38px; }
        .brand-subtitle { font-size: 14px; }
        .login-panel { padding: 14px 14px 28px; }
        .login-card { padding: 34px 20px 30px; border-radius: 22px; }
        .login-card-title { font-size: 32px; }
        .login-card-sub { margin-bottom: 28px; font-size: 14px; }
        .form-control,
        input[type=text],
        input[type=password] { height: 54px; }
        .login-btn { height: 56px; }
        .login-links a,
        .login-links button { padding: 0 15px; }
    }

    @keyframes backgroundFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes revealUp {
        from { opacity: 0; transform: translateY(24px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes dashboardReveal {
        from { opacity: 0; transform: rotate(-5deg) translateY(24px); }
        to { opacity: .58; transform: rotate(-5deg) translateY(0); }
    }

    @keyframes cardRise {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }

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