/* ==========================================================================
   shintai-app 互換 認証系 画面共通 スタイル
   karte2 /css/shintai_auth.css
   使用ページ:
     - invitation_welcome.php
     - invitation_registration.php
     - verification_email_sent.php
     - verification_email_resend.php
     - password_forgot.php
     - password_forgot_sent.php
     - password_reset.php
     - password_reset_complete.php
   ========================================================================== */

:root {
    --bg-main:       #050a1a;
    --bg-card:       #081126;
    --bg-inner-card: #081126;
    --border-color:  rgba(255, 255, 255, 0.16);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus:  rgba(255, 255, 255, 0.40);
    --text-main:     #ffffff;
    --text-sub:      rgba(255, 255, 255, 0.72);
    --text-mute:     rgba(255, 255, 255, 0.40);
    --text-placeholder: rgba(255, 255, 255, 0.40);
    --accent-blue:   #586EFF;
    --btn-disabled:  rgba(255, 255, 255, 0.10);
    --btn-disabled-text: rgba(255, 255, 255, 0.20);
    --error-red:     #FF4D50;
    --warning-yellow:#E6C200;
    --ok-green:      #2ecc71;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
    min-height: 100vh;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* カード本体 */
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 36px 28px 28px;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    text-align: center;
}

/* ロゴ */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}
.auth-logo img { width: 40px; height: 40px; object-fit: contain; }
.auth-logo .logo-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

/* タイトル */
.auth-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 説明テキスト */
.auth-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* 送信先メールアドレス表示 */
.auth-sent-to {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 6px;
}
.auth-sent-to-email {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 20px;
    word-break: break-all;
}

/* 区切り線 */
.auth-divider {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 18px 0;
}

/* 入力フィールド */
.auth-field {
    text-align: left;
    margin-bottom: 18px;
}
.auth-field label {
    display: block;
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 6px;
}
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.auth-field input::placeholder { color: var(--text-placeholder); }
.auth-field input:focus { border-color: var(--border-focus); }
.auth-field input[readonly] {
    color: var(--text-sub);
    background-color: rgba(255, 255, 255, 0.03);
    cursor: default;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-main) inset !important;
    caret-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
}

/* パスワード表示切替ボタン */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 40px; }
.password-toggle {
    position: absolute;
    right: 10px; top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-sub);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
}

/* フィールド下のヒント */
.auth-field-note {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 6px;
}
.auth-field-error {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--error-red);
    margin-top: 6px;
}

/* プライマリボタン */
.auth-btn {
    display: inline-block;
    width: 100%;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    background-color: var(--accent-blue);
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
}
.auth-btn:hover { opacity: 0.92; color: #ffffff; text-decoration: none; }
.auth-btn:focus { outline: none; color: #ffffff; text-decoration: none; }

.auth-btn.disabled,
.auth-btn:disabled {
    background-color: var(--btn-disabled);
    color: var(--btn-disabled-text);
    cursor: not-allowed;
    pointer-events: none;
}

/* セカンダリリンク(下部のリンク) */
.auth-sub-link {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 14px;
}
.auth-sub-link a {
    color: var(--text-main);
    text-decoration: underline;
    margin-left: 6px;
}
.auth-sub-link a:hover { color: var(--text-main); opacity: 0.85; }

.auth-muted-link {
    font-size: 12px;
    color: var(--text-main);
    text-decoration: underline;
    display: inline-block;
    margin-top: 12px;
}
.auth-muted-link:hover { color: var(--text-main); opacity: 0.85; }

/* 小さな注記(下部) */
.auth-footnote {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-top: 16px;
}

/* エラーカード(無効な招待の表示) */
.auth-warning-icon {
    font-size: 24px;
    color: var(--warning-yellow);
    margin-bottom: 6px;
}

/* コピーライト */
.auth-copyright {
    position: fixed;
    left: 0; right: 0;
    bottom: 12px;
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.32);
}

/* ローディング・オーバーレイ */
.auth-loading {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}
.auth-loading.show { display: flex; }
.auth-loading .spinner {
    width: 38px; height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin {
    to { transform: rotate(360deg); }
}
