/**
 * LINE 通知轉移系統 - 自訂 CSS 樣式
 * 
 * 補充 Bootstrap 5 的基本樣式，並提供系統特定的樣式需求
 */

/* 全局樣式 */
:root {
  --primary-color: #06c755; /* LINE 綠色 */
  --primary-dark: #05a349;
  --secondary-color: #212529;
  --light-bg: #f8f9fa;
  --border-radius: 0.25rem;
}

body {
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* 主題色調 - 覆蓋 Bootstrap 預設 */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.text-primary {
  color: var(--primary-color) !important;
}

/* 卡片樣式增強 */
.card {
  border-radius: var(--border-radius);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem;
}

/* 資料表增強 */
.table-hover tbody tr:hover {
  background-color: rgba(6, 199, 85, 0.05);
}

.table th {
  font-weight: 600;
  background-color: var(--light-bg);
}

/* 狀態徽章樣式 */
.badge.bg-success {
  background-color: var(--primary-color) !important;
}

/* 客戶卡片邊框色彩 */
.card.border-left-primary {
  border-left: 4px solid var(--primary-color) !important;
}

.card.border-left-success {
  border-left: 4px solid #1cc88a !important;
}

.card.border-left-info {
  border-left: 4px solid #36b9cc !important;
}

.card.border-left-warning {
  border-left: 4px solid #f6c23e !important;
}

.card.border-left-danger {
  border-left: 4px solid #e74a3b !important;
}

/* 側邊導航樣式 */
.nav-link.active {
  background-color: var(--primary-color);
  color: white !important;
}

/* 表單樣式增強 */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(6, 199, 85, 0.25);
}

.form-floating > .form-control:focus ~ label {
  color: var(--primary-color);
}

/* 進度條樣式 */
.progress-bar {
  transition: width 0.6s ease;
}

/* 卡片懸停效果 */
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* 通知預覽區域 */
.notification-preview {
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: var(--border-radius);
  border: 1px solid #dee2e6;
  font-family: monospace;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* LINE 風格的對話框 */
.line-message-bubble {
  background-color: #fff;
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  display: inline-block;
  max-width: 80%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.line-message-outgoing {
  background-color: var(--primary-color);
  color: white;
  align-self: flex-end;
  margin-left: auto;
}

/* 提示訊息容器 */
.message-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 350px;
}

/* 數據儀表板卡片 */
.dashboard-stat-card {
  text-align: center;
  padding: 1.5rem;
}

.dashboard-stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-stat-card .stat-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  color: #6c757d;
}

/* 用戶對照表行樣式 */
.mapping-row-migrated {
  background-color: rgba(28, 200, 138, 0.05);
}

.mapping-row-not-migrated {
  background-color: rgba(246, 194, 62, 0.05);
}

/* 輔助樣式 */
.text-monospace {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.cursor-pointer {
  cursor: pointer;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .btn-responsive {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }
}

/* 打印樣式 */
@media print {
  .no-print {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
  }
}
