/* 放心購統一樣式 - 現代卡片風格（藍色系配色） */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #e9ecef;
  line-height: 1.6;
  color: #212121;
}

/* 頁面頭部 */
.page-header {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, #0A4174 0%, #49769F 50%, #4E8EA2 100%);
  color: white;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(10, 65, 116, 0.3);
}

.page-header h1 {
  font-size: 42px;
  margin-bottom: 10px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-header p {
  font-size: 18px;
  opacity: 0.95;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 認證頁面小卡片容器（登入、註冊等） */
.auth-container {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.08);
}

/* 卡片樣式 */
.card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #0A4174, #49769F, #4E8EA2, #6EA2B3, #7BBDE8, #BDD8E9);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);
}

.card h2 {
  color: #0A4174;
  margin-bottom: 20px;
  font-size: 28px;
}

.card h3 {
  color: #49769F;
  margin-bottom: 15px;
  font-size: 22px;
}

/* 表單樣式 */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #0A4174;
  font-weight: 500;
  font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #BDD8E9;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4E8EA2;
  box-shadow: 0 0 0 3px rgba(78, 142, 162, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* 按鈕樣式 */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #0A4174, #4E8EA2);
  color: white;
  box-shadow: 0 8px 20px rgba(10, 65, 116, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 65, 116, 0.35);
}

.btn-secondary {
  background: linear-gradient(135deg, #49769F, #6EA2B3);
  color: white;
  box-shadow: 0 8px 20px rgba(73, 118, 159, 0.25);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(73, 118, 159, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, #6EA2B3, #7BBDE8);
  color: white;
  box-shadow: 0 8px 20px rgba(110, 162, 179, 0.25);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(110, 162, 179, 0.35);
}

.btn-outline {
  background: white;
  color: #0A4174;
  border: 2px solid #0A4174;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-outline:hover {
  background: #0A4174;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 65, 116, 0.25);
}

/* 導航欄 */
.navbar {
  background: linear-gradient(135deg, #0A4174, #49769F);
  padding: 15px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.navbar-brand {
  color: white;
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
}

.navbar-menu {
  display: flex;
  gap: 25px;
  list-style: none;
}

.navbar-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.navbar-menu a:hover {
  opacity: 0.8;
}

/* 表格樣式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th {
  background: linear-gradient(135deg, #0A4174, #49769F);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 15px;
  border-bottom: 1px solid #BDD8E9;
}

table tr:hover {
  background: #f8f9fa;
}

/* 標籤樣式 */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.badge-primary {
  background: linear-gradient(135deg, #0A4174, #4E8EA2);
  color: white;
}

.badge-success {
  background: linear-gradient(135deg, #6EA2B3, #7BBDE8);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #FFB800, #FFA000);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #E53935, #C62828);
  color: white;
}

/* 警告框 */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background: #d4edda;
  border-color: #6EA2B3;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border-color: #E53935;
  color: #721c24;
}

.alert-info {
  background: #d1ecf1;
  border-color: #7BBDE8;
  color: #0c5460;
}

/* 網格佈局 */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 響應式設計 */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 32px;
  }

  .card {
    padding: 20px;
  }

  .navbar .container {
    flex-direction: column;
    gap: 15px;
  }

  .navbar-menu {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  table {
    font-size: 14px;
  }

  table th,
  table td {
    padding: 10px;
  }
}

/* 載入動畫 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #BDD8E9;
  border-top-color: #0A4174;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 工具類 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.p-4 { padding: 40px; }

/* 修復商家註冊頁面佈局 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* 隱藏警告框（默認） */
.alert {
  display: none;
}

.alert.show {
  display: block;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
