/* ==========================================
成功大學圖書館 - 讀者個人資料修改與登入系統 統一全域樣式表 (main-style.css)
========================================== */

:root {
  --primary-color: #0066cc;
  --primary-hover: #0052a3;
  --text-color: #1e293b;
  --text-muted: #475569;
  --card-bg: #ffffff;
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 10px;
  --transition: all 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Microsoft JhengHei", "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: var(--text-color);
  padding: 40px 20px;
  line-height: 1.65;
  background-color: #0f172a;
  background-image: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.7)),
    url('https://images.unsplash.com/photo-1513694203232-719a280e022f?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.login-wrapper {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.edit-wrapper {
  max-width: 900px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.login-card {
  background-color: var(--card-bg);
  padding: 42px 38px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

.edit-card {
  max-width: 900px;
  padding: 45px 50px;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #0066cc, #3b82f6, #93c5fd);
}

.header-area {
  text-align: center;
  margin-bottom: 32px;
}

h1.main-title {
  font-size: 26px;
  color: #0f172a;
  margin-bottom: 6px;
  font-weight: 700;
}

.sub-title {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.section-title {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 18px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.readonly-text {
  color: #64748b;
  font-weight: 500;
}

.divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 30px 0;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-md);
  transition: var(--transition);
  background-color: #f8fafc;
  color: var(--text-color);
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.edit-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  font-size: 15px;
  color: var(--text-color);
  background-color: #f8fafc;
  transition: var(--transition);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.edit-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
}

.radio-group label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 500;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 15px;
}

.data-table th {
  background-color: #f8fafc;
  width: 30%;
  color: #475569;
  font-weight: 600;
  border-right: 1px solid #f1f5f9;
}

.data-table td {
  color: #1e293b;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: none;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

.forgot-action-area {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.btn-forgot {
  display: inline-block;
  padding: 12px 42px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-forgot:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.info-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.notice-box {
  flex: 1;
  padding: 24px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 15px;
  line-height: 1.7;
  text-align: justify;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.notice-box ul {
  padding-left: 20px;
}

/* 新增：優化忘記密碼頁面的清單排版 */

.notice-danger {
  border-left: 6px solid #ef4444;
  color: #7f1d1d;
}

.notice-danger strong {
  color: #dc2626;
}

.notice-danger a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 700;
}

.notice-info {
  background-color: #f0f9ff;
  border-left: 6px solid #0ea5e9;
  color: #1e293b;
}

.notice-info strong {
  color: #0f172a;
}

/* RWD */
@media (max-width: 768px) {
  .edit-card {
    padding: 35px 30px;
  }
}

@media (max-width: 640px) {
  .info-container {
    flex-direction: column;
    gap: 16px;
  }

  .edit-wrapper {
    margin-top: 10px;
    margin-bottom: 20px;
  }

  .edit-card {
    padding: 25px 20px;
    border-radius: var(--border-radius-md);
  }

  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table th {
    border-right: none;
    border-bottom: none;
    padding-bottom: 4px;
  }

  .data-table td {
    padding-top: 4px;
    margin-bottom: 10px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn-submit,
  .action-buttons .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 20px 12px;
    align-items: flex-start;
    padding-top: 15px;
  }

  .login-wrapper {
    gap: 20px;
  }

  .login-card {
    padding: 32px 22px;
  }

  .edit-card {
    padding: 25px 16px;
  }

  h1.main-title {
    font-size: 22px;
  }

  .notice-box {
    padding: 18px;
    font-size: 14px;
  }

  .btn-forgot {
    width: 100%;
    padding: 13px;
  }
}