/* 26-11-01 KN ログイン／パスワード再設定画面の共通スタイル（login.php・forgotpassword.php で読み込む） */
/* honmachi.info の lg-* をベースに、SMPWO 向けに配色とモチーフを調整。Bootstrap には依存しない */

:root {
    --lg-ink: #0f172a;
    --lg-soft: #64748b;
    --lg-line: #e2e8f0;
    --lg-accent: #0d9488;        /* teal */
    --lg-accent-2: #0f766e;
    --lg-accent-soft: #99f6e4;
    --lg-night-1: #071a1f;
    --lg-night-2: #0b2a33;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--lg-night-1);
    font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.lg-stage {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: hidden;
    color: #fff;
}

/* 背景: 夜明け前の海と光。格子を薄く重ねる */
.lg-stage::before {
    content: "";
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(60% 45% at 12% 8%, rgba(20, 184, 166, .50), transparent 70%),
        radial-gradient(50% 40% at 95% 20%, rgba(56, 189, 248, .28), transparent 70%),
        radial-gradient(70% 50% at 50% 110%, rgba(13, 148, 136, .55), transparent 70%),
        linear-gradient(180deg, var(--lg-night-1) 0%, var(--lg-night-2) 100%);
}
.lg-stage::after {
    content: "";
    position: absolute; inset: -40%; z-index: -1;
    background-image:
        linear-gradient(rgba(153, 246, 228, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(153, 246, 228, .10) 1px, transparent 1px),
        linear-gradient(rgba(153, 246, 228, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(153, 246, 228, .05) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 30px 30px, 30px 30px;
    transform: rotate(-12deg);
    -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
            mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
    animation: lg-drift 60s linear infinite;
}
@keyframes lg-drift { to { background-position: 120px 120px, 120px 120px, 30px 30px, 30px 30px; } }

/* 背景のきらめき */
.lg-pin {
    position: absolute; z-index: -1;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--lg-accent-soft);
    animation: lg-pulse 3.2s ease-out infinite;
}
.lg-pin:nth-child(1) { top: 7%; left: 10%; }
.lg-pin:nth-child(2) { top: 12%; right: 9%; animation-delay: 1.1s; }
.lg-pin:nth-child(3) { bottom: 9%; left: 16%; animation-delay: 2.1s; }
.lg-pin:nth-child(4) { bottom: 14%; right: 12%; animation-delay: .5s; }
@keyframes lg-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(153, 246, 228, .55); }
    70%  { box-shadow: 0 0 0 18px rgba(153, 246, 228, 0); }
    100% { box-shadow: 0 0 0 0 rgba(153, 246, 228, 0); }
}

.lg-inner {
    width: 100%; max-width: 420px;
    margin: auto 0;
    animation: lg-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes lg-rise { from { opacity: 0; transform: translateY(14px); } }

/* ブランド */
.lg-brand { margin: 0 4px 22px; padding-left: 14px; border-left: 4px solid var(--lg-accent-soft); }
.lg-brand-name { font-size: 1.6rem; font-weight: 800; letter-spacing: .08em; line-height: 1.15; }
.lg-brand-sub {
    font-size: .72rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
    color: var(--lg-accent-soft); margin-top: 2px;
}

/* カード */
.lg-card {
    background: #fff; color: var(--lg-ink);
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow: 0 30px 60px -20px rgba(2, 6, 23, .7), 0 0 0 1px rgba(255, 255, 255, .08);
}
.lg-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; }
.lg-lead  { font-size: .85rem; color: var(--lg-soft); margin: 0 0 20px; line-height: 1.6; }

.lg-msg {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: .88rem; font-weight: 600; line-height: 1.5;
    border-radius: 12px; padding: 11px 12px; margin-bottom: 16px;
}
.lg-msg svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.lg-msg-info  { background: #f0fdfa; color: #0f766e; }
.lg-msg-error { background: #fef2f2; color: #b91c1c; }

.lg-field { margin-bottom: 14px; }
.lg-label { display: block; font-size: .8rem; font-weight: 700; color: #334155; margin-bottom: 6px; }
.lg-input-wrap { position: relative; }
.lg-input-wrap > svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #94a3b8; pointer-events: none;
    transition: color .15s;
}
.lg-input {
    display: block; width: 100%; height: 52px;
    padding: 0 14px 0 44px;
    font-size: 16px;          /* 16px 未満だと iOS が入力時に画面を拡大する */
    font-family: inherit;
    color: var(--lg-ink);
    background: #f8fafc;
    border: 1.5px solid var(--lg-line); border-radius: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input::placeholder { color: #a8b3c4; }
.lg-input:focus { background: #fff; border-color: var(--lg-accent); box-shadow: 0 0 0 4px rgba(13, 148, 136, .15); }
.lg-input-wrap:focus-within > svg { color: var(--lg-accent); }
.lg-input-pw { padding-right: 52px; }

.lg-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 0; background: none; color: #94a3b8; border-radius: 10px; cursor: pointer;
}
.lg-eye:hover { color: #475569; }
.lg-eye:focus-visible { outline: 2px solid var(--lg-accent); outline-offset: -4px; }
.lg-eye svg { width: 20px; height: 20px; }
.lg-eye .lg-eye-off { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-on  { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-off { display: block; }

.lg-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 54px; margin-top: 22px;
    border: 0; border-radius: 14px;
    font-size: 1rem; font-weight: 700; letter-spacing: .06em; color: #fff;
    font-family: inherit;
    background: linear-gradient(135deg, #14b8a6, var(--lg-accent-2));
    box-shadow: 0 12px 24px -10px rgba(13, 148, 136, .8);
    cursor: pointer; touch-action: manipulation;
    transition: transform .12s, box-shadow .15s, filter .15s;
}
.lg-submit:hover { filter: brightness(1.07); box-shadow: 0 14px 28px -10px rgba(13, 148, 136, .95); }
.lg-submit:active { transform: scale(.985); }
.lg-submit:focus-visible { outline: 3px solid rgba(13, 148, 136, .4); outline-offset: 3px; }
.lg-submit svg { width: 18px; height: 18px; transition: transform .15s; }
.lg-submit:hover svg { transform: translateX(3px); }
.lg-submit[disabled] { opacity: .75; cursor: progress; }
.lg-spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
    animation: lg-spin .7s linear infinite;
}
.lg-submit[disabled] .lg-spinner { display: block; }
.lg-submit[disabled] svg { display: none; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

.lg-forgot { display: block; text-align: center; margin-top: 16px; padding: 8px;
             font-size: .88rem; font-weight: 600; color: var(--lg-accent-2); text-decoration: none; }
.lg-forgot:hover { color: #115e59; text-decoration: underline; }

.lg-foot { margin: 18px 0 0; text-align: center; font-size: .72rem; letter-spacing: .08em; color: rgba(153, 246, 228, .6); }

@media (min-width: 576px) {
    .lg-card { padding: 34px 32px 28px; }
    .lg-brand { margin-bottom: 26px; }
}
@media (max-height: 620px) {
    .lg-brand { margin-bottom: 14px; }
    .lg-brand-name { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-stage::after, .lg-pin, .lg-inner { animation: none; }
}
