/**
 * Migrant Ticket - Authentication Pages (Login & Register)
 * 搭配共用 header/footer 使用，非獨立頁面佈局
 */

/* ========== 認證卡片 ========== */
.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #1a56db 0%, #0f3d9e 100%);
    color: white;
    padding: 16px 24px;
    text-align: center;
}

.auth-header i {
    font-size: 28px;
    margin-bottom: 2px;
    display: block;
}

.auth-header h3 {
    margin: 0 0 2px 0;
    font-weight: 700;
    font-size: 1.15rem;
}

.auth-header p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.875rem;
}

/* ========== 認證卡片 Body ========== */
.auth-body {
    padding: 24px 28px;
}

.auth-body .form-floating {
    margin-bottom: 16px;
}

.auth-body .form-control:focus,
.auth-body .form-select:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 0.2rem rgba(26, 86, 219, 0.2);
}

/* ========== 認證按鈕 ========== */
.btn-auth {
    background: linear-gradient(135deg, #1a56db 0%, #0f3d9e 100%);
    border: none;
    color: white;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.4);
    color: white;
}

.btn-auth:active {
    transform: translateY(0);
}

/* ========== 切換連結（登入/註冊） ========== */
.auth-switch-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.auth-switch-link a {
    color: #1a56db;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch-link a:hover {
    text-decoration: underline;
}

/* ========== Alert ========== */
.auth-body .alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ========== 身份類型選擇（註冊專用） ========== */
.role-selection {
    margin-bottom: 20px;
}

.role-selection-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
}

.role-options {
    display: flex;
    gap: 12px;
}

.role-option {
    flex: 1;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option label {
    display: block;
    padding: 14px 10px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.role-option label:hover {
    border-color: #1a56db;
    background: #f0f5ff;
}

.role-option input[type="radio"]:checked + label {
    border-color: #1a56db;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8edfe 100%);
}

.role-option .role-icon {
    font-size: 26px;
    margin-bottom: 6px;
    display: block;
}

.role-option .role-name {
    font-weight: 600;
    color: #222;
    display: block;
    font-size: 0.95rem;
}

.role-option .role-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 3px;
    display: block;
}

/* ========== 公司選擇（註冊專用） ========== */
.company-selection {
    display: none;
    margin-bottom: 16px;
}

.company-selection.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ========== 審核提示（註冊專用） ========== */
.approval-notice {
    display: none;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin-bottom: 16px;
    align-items: flex-start;
    gap: 8px;
}

.approval-notice.show {
    display: flex;
}

.approval-notice i {
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}

.approval-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: #78350f;
    line-height: 1.4;
}

/* ========== 動畫 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 響應式 ========== */
@media (max-width: 576px) {
    .auth-body {
        padding: 24px 20px;
    }

    .role-options {
        flex-direction: column;
    }
}
