/* ---------- 色彩變數（與主站同步） ---------- */
:root {
  --primary-color: #243d51;
  --highlight-color: #f8ef32;
  --main-font-color: #23396c;
  --secondary-font-color: #999999;
  --white-color: #ffffff;
  --primary-color-dark: #1a2d60;
  --main-font-color-rgb: 35, 57, 108;
  --secondary-blue-accent: #3a5a9a;
  --background-color-light: #fafafa;
  --general-border-color: #dddddd;
  --light-grey-bg: #f9f9f9;
  --modal-pre-bg: #f5f5f5;
  --error-red: #d32f2f;
  --disabled-button-bg: #6c757d;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 8px 20px rgba(var(--main-font-color-rgb), 0.3);
  --login-card-radius: 12px;
  --login-card-width: 420px;
}

/* ---------- 基礎排版 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  line-height: 1.6;
  color: var(--main-font-color);
  background: var(--background-color-light);
  font-family: "Noto Sans HK", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

/* ---------- 連結 ---------- */
a {
  color: var(--main-font-color);
  text-decoration: none;
}
a:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}

/* ---------- 登入卡片（舊版結構保留） ---------- */
.login-card {
  width: 100%;
  max-width: var(--login-card-width);
  background: var(--white-color);
  border-radius: var(--login-card-radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem 2rem;
}

/* ---------- 頁籤 ---------- */
.tab-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
  background: #fff;
  border: 1px solid var(--general-border-color);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-button {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--main-font-color);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s;
}

.tab-button.active {
  color: var(--white-color);
  background: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- 表單元件 ---------- */
.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  border: 1px solid var(--general-border-color);
  border-radius: 8px;
  background: var(--light-grey-bg);
  transition: var(--transition);
}

input::placeholder {
  color: var(--secondary-font-color);
  opacity: 0.7;
}

input:focus {
  border-color: var(--primary-color);
  background: var(--white-color);
  outline: none;
  box-shadow: var(--hover-shadow);
}

.checkbox-group {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.checkbox-group input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.forgot-password {
  font-size: 0.9rem;
  display: inline-block;
  margin: -0.5rem 0 1rem;
  color: var(--main-font-color);
}

/* ---------- 按鈕 ---------- */
.form-btn {
  width: 100%;
  background: var(--primary-color);
  color: var(--white-color);
  border: none;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.form-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: #f8ef32;
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
}

.form-btn:disabled {
  background-color: var(--disabled-button-bg);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ---------- 訊息 ---------- */
.error-message {
  color: var(--error-red);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  display: none;
}

.success-message {
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.75rem;
  display: none;
}

/* ---------- 新增：重發驗證郵件連結樣式 ---------- */
.resend-verification-link {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
  margin-left: 4px;
}

.resend-verification-link:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}

/* ---------- Turnstile 預留 ---------- */
.turnstile-placeholder {
  margin: 1.25rem 0;
  border: 1px dashed var(--general-border-color);
  border-radius: 8px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-font-color);
  font-style: italic;
  font-size: 0.8125rem;
  background: var(--modal-pre-bg);
}

/* ---------- RWD ---------- */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem 1.5rem;
  }
}

/* ---------- 新增：參考 user_login_project.html 的左右排版 ---------- */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  background-color: var(--background-color-light);
}

.user_page_main_container {
  display: flex;
  width: 90vw;
  max-width: 960px;
  min-height: 640px;
  box-shadow: var(--shadow);
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--white-color);
}

.user_page_left_container {
  flex: 4;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-blue-accent) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.user_page_left_container img {
  width: 200px;
  height: auto;
  margin-bottom: 1rem;
}

.user_page_left_container::before {
  content: "Concierge Anywhere";
  color: var(--white-color);
  font-size: 2.2rem;
  font-weight: 700;
  opacity: 0.9;
  text-align: center;
  padding: 1rem;
}

.user_page_right_container {
  flex: 6;
  padding: 3rem 3.5rem;
  overflow-y: auto;
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

/* RWD：小螢幕改為上下排版 */
@media (max-width: 768px) {
  .user_page_main_container {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }

  .user_page_left_container {
    flex: none;
    min-height: 200px;
    border-radius: 12px 12px 0 0;
  }

  .user_page_left_container img {
    width: 150px;
  }

  .user_page_right_container {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .user_page_right_container {
    padding: 1.5rem;
  }
}