/* ===== YOSS Login Page ===== */
/* カラーパレット「深碧のアトリエ」(Nordic Dawn) に基づくスタイル
   Ocean Depth: #113236  |  Rustic Orange: #ce7500
   Breeze Blue: #76b1bd  |  Linen White: #dcdad1  |  #bba186 */

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

.login-body {
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Noto Sans JP", sans-serif;
    min-height: 100vh;
    margin: 0;
    background: #dcdad1;
}

/* ===== レイアウト ===== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== 左：ブランドパネル ===== */
.login-brand {
    flex: 0 0 420px;
    background: linear-gradient(160deg, #113236 0%, #1a4a4f 40%, #225a60 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.login-brand::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(118,177,189,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-content {
    text-align: center;
    z-index: 1;
}

.brand-logo {
    margin-bottom: 32px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.brand-footer {
    position: absolute;
    bottom: 28px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    z-index: 1;
}

/* ===== 右：フォームエリア ===== */
.login-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #dcdad1;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 36px;
}

/* モバイル用ロゴ（デスクトップでは非表示） */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #113236;
    margin-bottom: 4px;
}

.tenant-label {
    font-size: 13px;
    color: #bba186;
    margin-bottom: 28px;
}

/* ===== フォーム要素 ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #113236;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #bba186;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #113236;
    background: #faf9f7;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    margin-top: 0;
}

.form-input:focus {
    outline: none;
    border-color: #76b1bd;
    box-shadow: 0 0 0 3px rgba(118, 177, 189, 0.2);
    background: #fff;
}

.form-input::placeholder {
    color: #bba186;
}

/* パスワードフィールド */
.password-field {
    position: relative;
}

.password-field .form-input {
    padding-right: 40px;
}

.toggle-mask {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    opacity: 0.5;
}

.toggle-mask:hover {
    opacity: 1;
}

.toggle-mask svg {
    width: 18px;
    height: 18px;
    stroke: #113236;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toggle-mask .icon-hidden {
    display: none;
}

/* エラーメッセージ */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

#error {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

/* ===== ログインボタン ===== */
.login-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ce7500 0%, #d98a1a 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 2px 8px rgba(206, 117, 0, 0.3);
    margin-top: 4px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(206, 117, 0, 0.4);
}

.login-btn:active {
    transform: translateY(0);
    opacity: 0.9;
}

/* ===== リンクエリア ===== */
.login-links {
    text-align: center;
    margin-top: 20px;
}

.link-item {
    color: #76b1bd;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.link-item:hover {
    color: #113236;
    text-decoration: underline;
}

.passkey-link {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.badge-new {
    font-size: 10px;
    font-weight: 700;
    background: #ce7500;
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.5px;
}

.passkey-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #bba186;
    line-height: 1.6;
}

.passkey-hint-link {
    color: #bba186;
    font-size: 11px;
    text-decoration: underline;
}

/* ===== 区切り線 ===== */
.login-divider {
    height: 1px;
    background: #dcdad1;
    margin: 24px 0;
}

/* ===== サポート情報 ===== */
.login-support {
    text-align: center;
}

.login-support p {
    font-size: 12px;
    color: #113236;
    line-height: 1.7;
    margin-bottom: 8px;
}

.support-email {
    font-size: 14px !important;
    font-weight: 500;
}

.link-accent {
    color: #ce7500;
    text-decoration: underline;
    font-weight: 600;
}

.link-accent:hover {
    color: #113236;
}

.support-ml {
    font-size: 11px !important;
    color: #bba186 !important;
}

/* ===== 推奨ブラウザ ===== */
.browser-info {
    margin-top: 20px;
}

.browser-info details {
    font-size: 12px;
    color: #bba186;
}

.browser-info summary {
    cursor: pointer;
    font-weight: 500;
    color: #76b1bd;
    padding: 4px 0;
}

.browser-info details p {
    margin-top: 8px;
    line-height: 1.6;
    color: #bba186;
    font-size: 11px;
}

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand {
        flex: none;
        padding: 40px 20px;
        min-height: auto;
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .login-form-area {
        padding: 24px 16px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 60px;
    }

    .login-card {
        padding: 32px 24px;
        border-radius: 12px;
    }
}

/* ===== Edge / Chrome パスワード表示ボタン非表示 ===== */
::-ms-reveal {
    display: none;
}

/* ===== 共通認証画面スタイル ===== */
/* パスキー・OTP・同意・エラー画面で共通使用 */

.auth-icon {
    font-size: 40px;
    margin-bottom: 12px;
    text-align: center;
}

.auth-description {
    font-size: 13px;
    color: #113236;
    line-height: 1.8;
    margin-bottom: 24px;
    text-align: center;
}

.auth-btn-group {
    margin-top: 4px;
}

/* セカンダリボタン */
.btn-secondary {
    width: 100%;
    height: 46px;
    border: 1.5px solid #bba186;
    border-radius: 8px;
    background: #ffffff;
    color: #113236;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: #f5f3ef;
    border-color: #113236;
}

/* ステータスメッセージ（成功） */
.status-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
}

/* OTP入力フィールド */
.otp-input {
    letter-spacing: 0.3em;
    font-size: 20px !important;
    text-align: center;
    max-width: 200px;
    margin: 0 auto;
}

.otp-input::placeholder {
    font-size: 13px;
    letter-spacing: 0;
}

/* 利用規約ボックス */
.terms-box {
    border: 1px solid #bba186;
    border-radius: 8px;
    padding: 16px;
    height: 240px;
    overflow-y: auto;
    background: #faf9f7;
    font-size: 13px;
    line-height: 1.8;
    color: #113236;
    text-align: left;
    margin-bottom: 20px;
}

/* 同意チェックボックス */
.agree-check {
    margin-bottom: 20px;
    text-align: center;
}

.agree-check label {
    font-size: 14px;
    color: #113236;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agree-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ce7500;
}

/* disabledボタン */
.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* エラー画面 */
.error-detail {
    text-align: left;
    margin-top: 20px;
}

.error-detail p {
    font-size: 14px;
    color: #113236;
    line-height: 1.8;
    margin-bottom: 8px;
}

.error-note {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.8;
    color: #7f1d1d;
}

.error-action {
    margin-top: 24px !important;
    padding-top: 16px;
    border-top: 1px solid #dcdad1;
    color: #bba186 !important;
    font-size: 13px !important;
}