/**
 * 身份驗證頁面樣式
 * 包括登入、註冊、密碼重設等頁面的通用樣式
 */

/* 卡片標題區域樣式 */
.auth-card {
    max-width: 36rem; /* 與密碼重設頁一致的卡片寬度 (max-w-xl) */
    margin-left: auto;
    margin-right: auto;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.auth-card .card-header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 標題內的圖標與文字布局 */
.auth-card .card-header h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

/* 圖標樣式 */
.auth-card .card-header i {
    font-size: 1.8rem;
    margin-right: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 輸入框組樣式 */
.auth-card .input-group {
    margin-bottom: 1.25rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-card .input-group-text {
    border: none;
    background-color: #f8f9fa;
    color: #6c757d;
    display: flex;
    align-items: center;
    height: 3rem; /* 統一高度為 48px */
}

.auth-card input, 
.auth-card select {
    border-left: none;
    border-color: #e9ecef;
    height: 3rem; /* 統一高度為 48px */
    padding: 0.75rem 1rem; /* py-3 px-4 */
}

/* 確保表單控件（.form-control）高度一致 */
.auth-card .form-control {
    height: 3rem; /* 統一高度為 48px */
    padding: 0.75rem 1rem;
    border-radius: 0 0.5rem 0.5rem 0; /* 右側圓角 */
}

/* 圖示容器高度與輸入框一致 */
.auth-card .inline-flex.items-center {
    height: 3rem; /* 統一高度為 48px */
}

/* 提交按鈕樣式 */
.auth-card .btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    transition: all 0.3s ease;
    padding: 0.6rem 0;
    font-weight: 500;
}

.auth-card .btn-submit:hover,
.auth-card .btn-submit:focus {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* 驗證碼容器樣式 */
.auth-card .captcha-container {
    margin-bottom: 0.5rem;
    width: 100%;
}

/* 驗證碼輸入框樣式 */
.auth-card .captcha-container input {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    width: 100%;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 3rem; /* 統一高度為 48px (py-3 = 0.75rem * 2 + line-height) */
}

.auth-card .captcha-container input::placeholder {
    color: #adb5bd;
    text-transform: none;
    font-size: 0.9rem;
}

/* 驗證碼圖片樣式 - 恢復自然尺寸 */
.auth-card .captcha-container img {
    border-radius: 0.5rem; /* 小圓角設計 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    width: auto; /* 恢復自動寬度 */
    max-width: 330px; /* 限制最大寬度 */
    margin-bottom: 0.5rem;
    display: block; /* 確保寬度計算正確 */
}

/* 修正表單組和錯誤訊息的間距 */
.auth-card .form-group {
    margin-bottom: 0;
}

.auth-card .text-danger {
    margin-top: -1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

/* 卡片頁尾樣式 */
.auth-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 連結樣式 */
.auth-card a {
    color: var(--primary-color);
    transition: color 0.2s;
}

.auth-card a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* ============================================
   深色模式支援
   ============================================ */

/* 卡片標題 */
.dark .auth-card .card-header {
  background-color: #1f2937;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* 輸入框組 */
.dark .auth-card .input-group {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark .auth-card .input-group-text {
  background-color: #374151;
  color: #d1d5db;
}

.dark .auth-card input,
.dark .auth-card select {
  background-color: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

.dark .auth-card .form-control {
  background-color: #374151;
  color: #f3f4f6;
}

/* 驗證碼容器 */
.dark .auth-card .captcha-container input {
  background-color: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

.dark .auth-card .captcha-container input::placeholder {
  color: #6b7280;
}

/* 驗證碼圖片 - 保持原樣 */
.dark .auth-card .captcha-container img {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 卡片頁尾 */
.dark .auth-card .card-footer {
  background-color: #1f2937;
  border-top-color: rgba(255, 255, 255, 0.1);
}
