:root {
    --card-bg: rgba(20, 28, 40, 0.78);
    --card-border: rgba(255, 255, 255, 0.10);
    --text-light: #f5f9ff;
    --text-muted: rgba(245, 249, 255, 0.62);
    --accent: #2f6fd6;
    --accent-hover: #3d80e8;
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    color: var(--text-light);
    overflow: hidden;
}

/* 멀티 레이어 배경 — radial 오브 + 베이스 그라데이션.
   실제 사진을 쓰려면 views/img/login-bg.jpg 두고 .bg-stage::before 의 background-image 를 그 경로로 교체. */
.bg-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* background:
        radial-gradient(ellipse at 20% 20%, rgba(80, 160, 240, 0.32), transparent 55%),
        radial-gradient(ellipse at 80% 75%, rgba(160, 90, 220, 0.28), transparent 55%),
        radial-gradient(ellipse at 55% 50%, rgba(40, 200, 200, 0.16), transparent 60%),
        linear-gradient(135deg, #07101f 0%, #0e2342 45%, #173657 100%); */
    background: url('../img/survey.png') no-repeat center / cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* 미세 그리드 패턴 레이어 — 도시 야경 느낌의 정밀함 */
.bg-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><path d='M0 0 L44 0 M0 0 L0 44' stroke='rgba(255,255,255,0.045)' stroke-width='1' fill='none'/></svg>");
    background-size: 44px 44px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 30%, transparent 80%);
}

/* vignette — 가장자리 어둡게 처리해 중앙 보드에 시선 집중 */
.bg-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}

/* 타이틀과 카드를 하나의 큰 보드로 묶어 화면 중앙에 정렬 (ui1.png 처럼 한 프레임 안에 좌/우 영역) */
.center-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: min(1040px, 92vw);
    min-height: 360px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

/* 좌측 브랜드 영역 — 외곽 보드의 내부 컬럼 */
.brand {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 56px 72px;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-sub {
    font-size: 12px;
    letter-spacing: 0.35em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.brand-title {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

/* 우측 카드 — 외곽 보드의 내부 컬럼 */
.card {
    flex: 0 0 420px;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
}

.field {
    margin-bottom: 12px;
}

.hidden { display: none !important; }

.text-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.text-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.text-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.13);
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0 16px;
    user-select: none;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

.login-button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.14s ease, transform 0.14s ease;
}

.login-button:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.login-button:disabled {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.hint {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

.status {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(47, 111, 214, 0.14);
    border: 1px solid rgba(47, 111, 214, 0.3);
    border-radius: 8px;
}

.status p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.5;
}

.status.error {
    background: rgba(214, 47, 73, 0.16);
    border-color: rgba(214, 47, 73, 0.36);
}

/* 폼 하단 보조 링크 영역 — 비밀번호 찾기 / 회원가입 */
.form-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.form-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.14s ease, text-shadow 0.14s ease;
}

.form-link:hover,
.form-link:focus-visible {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-shadow: 0 0 8px rgba(61, 128, 232, 0.35);
    outline: none;
}

.forgot-link {
    font-size: 12.5px;
    letter-spacing: 0.01em;
    color: var(--accent);
    font-weight: 600;
}

.forgot-link:hover,
.forgot-link:focus-visible {
    color: var(--accent-hover);
}

.signup-row {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

.signup-link {
    margin-left: 4px;
    color: var(--accent);
    font-weight: 600;
}

.signup-link:hover,
.signup-link:focus-visible {
    color: var(--accent-hover);
}

@media (max-width: 768px) {
    .center-wrap {
        flex-direction: column;
    }
    .brand {
        align-items: center;
        text-align: center;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .brand-title { font-size: clamp(32px, 9vw, 56px); }
}
