


.auth-page {
    margin: 0;
    padding: 6vh 0 0;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

body[lang="en"] .auth-container,
body[lang="ja"] .auth-container,
body[lang="ko"] .auth-container,
body[lang="fr"] .auth-container,
body[lang="de"] .auth-container,
body[lang="es"] .auth-container{
    max-width: 530px;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}


.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}


.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74,144,217,0.1);
}


.btn-primary {
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.btn-primary:hover {
    background: #333;
}

.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}


.auth-divider {
    display: flex;
    align-items: center;
    margin: 12px 0;
    color: #666;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.auth-divider span {
    padding: 0 16px;
}


.auth-oauth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}


.auth-oauth > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.btn-oauth {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 36px;
    border: 1px solid #d9d9d9;
    border-left-width: 4px;
    border-left-style: solid;
    border-left-color: var(--oauth-brand, #d9d9d9);   
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;                              
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.btn-oauth:hover {
    background: #f8f8f8;
}

.btn-oauth:active {
    background: #f0f0f0;
}


.oauth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.oauth-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}


.auth-links {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.auth-links a {
    color: #4a90d9;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}


.auth-hint {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

.auth-hint a {
    color: #4a90d9;
    text-decoration: none;
}


.form-error {
    padding: 10px 14px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    color: #ff4d4f;
    font-size: 13px;
}


#oauth-error.form-error {
    margin-top: 14px;
    white-space: pre-line;
    line-height: 1.7;
}


.field-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.oauth-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.oauth-badge {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid currentColor;
    background: #fff;
    line-height: 1.6;
    white-space: nowrap;
}

.oauth-bind-block {
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.oauth-bind-title {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}


.oauth-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-all;
    line-height: 1;
}


.oauth-action {
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    margin-left: auto;
    font-size: 12px;
    color: #4a90d9;
    white-space: nowrap;
}
.btn-oauth.is-bound .oauth-action {
    color: #ff4d4f;
}


.oauth-guide {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
    
    max-height: 220px;
    overflow-y: auto;
}
.oauth-guide p { margin: 0 0 8px; }
.oauth-guide ol, .oauth-guide ul { margin: 0 0 8px 18px; padding: 0; }
.oauth-guide strong { color: #333; }

.form-success {
    padding: 10px 14px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    color: #52c41a;
    font-size: 13px;
}


.bs-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.bs-toast {
    padding: 10px 18px;
    border-radius: 8px;
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    animation: bs-toast-in 0.25s ease;
    pointer-events: auto;
    white-space: pre-line;   
}
.bs-toast.success { background: #16a34a; }
.bs-toast.error   { background: #dc2626; }
.bs-toast.info    { background: #1d4ed8; }
.bs-toast.warning { background: #d97706; }
@keyframes bs-toast-in {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}


.form-group input.is-invalid {
    border-color: #e74c3c;
    background-color: #ffe5e5;
}


.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}



.profile-container { max-width: 520px; }

.btn-back {
    display: inline-block;
    margin-bottom: 12px;
    color: #4a90d9;
    text-decoration: none;
    font-size: 14px;
}
.btn-back:hover { text-decoration: underline; }


.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 24px;
}

.profile-tab {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}
.profile-tab:hover { color: #333; }
.profile-tab.active {
    color: #1a1a1a;
    font-weight: 500;
    border-bottom-color: #1a1a1a;
}


.profile-section { display: none; }
.profile-section.show { display: block; }
.profile-section.auth-form.show { display: flex; flex-direction: column; gap: 16px; }


#pwd-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.session-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    gap: 12px;
}
.session-item:last-child { border-bottom: none; }

.session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.session-device {
    color: #333;
    font-weight: 500;
}

.session-time {
    font-size: 12px;
    color: #999;
}

.session-current-badge {
    margin-left: 6px;
    padding: 1px 6px;
    background: #f6ffed;
    color: #52c41a;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.btn-danger {
    padding: 6px 12px;
    background: #fff;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-danger:hover { background: #fff2f0; }


.profile-logout-row {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    text-align: center;
}
.profile-logout-row .btn-danger {
    padding: 8px 40px;
    font-size: 13px;
}


.dlg-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.dlg-checkbox input { cursor: pointer; }


.fp-step { display: none; }
.fp-step.show { display: flex; flex-direction: column; gap: 16px; }


.pwd-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pwd-wrap input {
    width: 100%;
    padding-right: 44px;
}

.pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.pwd-toggle:hover { color: #333; background: rgba(0, 0, 0, 0.05); }
.pwd-toggle:focus-visible {
    outline: 2px solid #4a90d9;
    outline-offset: 1px;
}
.pwd-toggle svg { display: block; }


.pwd-wrap input::-ms-reveal,
.pwd-wrap input::-ms-clear {
    display: none;
}
