/* CC-House inspired color scheme and animations */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #1e3d72;
  --accent-color: #4a90e2;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-bg: #f8f9fa;
  --dark-text: #333;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--dark-text);
}

/* Animated background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
  25% { background: linear-gradient(135deg, #2c5aa0 0%, #4a90e2 100%); }
  50% { background: linear-gradient(135deg, #4a90e2 0%, #667eea 100%); }
  75% { background: linear-gradient(135deg, #764ba2 0%, #2c5aa0 100%); }
}

/* Floating particles animation */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
  50% { transform: translateY(-100px) rotate(180deg); opacity: 1; }
}

/* Login container */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  animation: slideInUp 0.8s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.system-title {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.company-name {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 5px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* 只對登入頁面的標籤應用浮動效果 */
.login-card .form-label {
  position: absolute;
  top: 12px;
  left: 15px;
  color: #999;
  transition: var(--transition);
  pointer-events: none;
  background: white;
  padding: 0 5px;
}

.login-card .form-control:focus + .form-label,
.login-card .form-control:not(:placeholder-shown) + .form-label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  color: var(--primary-color);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(44, 90, 160, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

/* Dashboard styles */
.dashboard-container {
  background: var(--light-bg);
  min-height: 100vh;
}

.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 15px 0;
  box-shadow: var(--box-shadow);
}

.navbar-brand {
  color: white !important;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.navbar-brand .logo-small {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 16px;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  transition: var(--transition);
  padding: 8px 15px !important;
  border-radius: var(--border-radius);
  margin: 0 5px;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
}

.user-info {
  color: white;
  margin-right: 20px;
}

.btn-logout {
  background: var(--danger-color);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.btn-logout:hover {
  background: #c82333;
  transform: translateY(-1px);
}

/* Tab content */
.tab-content {
  padding: 30px;
}

.tab-pane {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  background: white;
}

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

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  padding: 20px;
  font-weight: bold;
  font-size: 18px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: var(--light-bg);
  border: none;
  font-weight: bold;
  color: var(--dark-text);
  padding: 15px;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: rgba(44, 90, 160, 0.05);
  /* 移除往上漂移效果 */
}

.table tbody td {
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

/* DataTables custom styling */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 8px 15px;
  transition: var(--transition);
  min-width: 80px;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  min-width: 100px;
  padding: 8px 30px 8px 15px;
  font-size: 14px;
  background-color: white;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  appearance: none;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
  /* 移除往上漂移效果 */
}

.dataTables_wrapper .dataTables_length {
  margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_length label {
  font-weight: 500;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 15px;
  text-align: right;
}

.dataTables_wrapper .dataTables_filter label {
  font-weight: 500;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.dataTables_wrapper .dataTables_filter input {
  min-width: 200px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--border-radius) !important;
  margin: 0 2px !important;
  transition: var(--transition) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-1px);
}

/* 改善 DataTables 整體佈局 */
.dataTables_wrapper .dataTables_info {
  padding-top: 15px;
  font-weight: 500;
  color: var(--dark-text);
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 15px;
}

/* Loading spinner */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert animations */
.alert {
  border-radius: var(--border-radius);
  border: none;
  animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .login-card {
    padding: 30px 20px;
  }
  
  .tab-content {
    padding: 15px;
  }
  
  .navbar-brand {
    font-size: 20px;
  }
  
  .table-responsive {
    border-radius: var(--border-radius);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* 表格編輯樣式 */
.editable-row:hover {
    background-color: #f8f9fa !important;
}

.editable-row td:hover {
    background-color: #e3f2fd !important;
}

/* 識別證管理表格樣式 - 只有同步週期可編輯 */
#cardsTable .editable-row:hover {
    background-color: #f8f9fa !important;
    cursor: default;
}

#cardsTable .editable-row td:hover {
    background-color: transparent !important;
    cursor: default;
}

#cardsTable .editable-row td[data-field="wifiInterval"]:hover {
    background-color: #e3f2fd !important;
    cursor: pointer;
    position: relative;
}

#cardsTable .editable-row td[data-field="wifiInterval"]:hover::after {
    content: "雙擊編輯";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0.9;
}

.editable-row td:hover::after {
    content: "雙擊編輯";
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
}

/* 不可編輯的欄位 */
.editable-row td[data-field="companyID"]:hover::after,
.editable-row td[data-field="lastSeen"]:hover::after {
    content: "不可編輯";
    background: #6c757d;
}

/* 員工表格中的位置欄位不可編輯 */
#employeesTable .editable-row td[data-field="position"]:hover::after {
    content: "不可編輯";
    background: #6c757d;
}

/* 編輯按鈕樣式 */
.edit-employee-btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.edit-employee-btn:hover:not(:disabled) {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    transform: scale(1.1);
}

/* 編輯欄位不顯示編輯提示 */
#employeesTable .editable-row td[data-field="edit"]:hover::after {
    display: none;
}

/* 站點表格中的不可編輯欄位 */
#positionsTable .editable-row td[data-field="id"]:hover::after,
#positionsTable .editable-row td[data-field="rssi"]:hover::after,
#positionsTable .editable-row td[data-field="lastSeen"]:hover::after {
    content: "不可編輯";
    background: #6c757d;
}

/* 刪除按鈕樣式 */
.delete-station-btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.delete-station-btn:hover:not(:disabled) {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    transform: scale(1.1);
}

.delete-station-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 刪除欄位不顯示編輯提示 */
#positionsTable .editable-row td[data-field="delete"]:hover::after {
    display: none;
}

/* 編輯中的樣式 */
.editing-cell {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
}

/* 更新成功的動畫 */
.update-success {
    background-color: #d4edda !important;
    transition: background-color 2s ease;
}

/* 更新失敗的動畫 */
.update-error {
    background-color: #f8d7da !important;
    transition: background-color 2s ease;
}
/* 登入成功覆蓋層樣式 */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.success-message {
  background: white;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: successSlideIn 0.5s ease-out;
}

.success-icon {
  font-size: 4rem;
  color: var(--success-color);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.success-icon.animate {
  transform: scale(1.2);
  animation: successPulse 0.6s ease-in-out;
}

.success-message h3 {
  color: var(--success-color);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.success-message p {
  color: #666;
  margin: 0;
}

.login-card.fade-out {
  opacity: 0.3;
  transform: scale(0.95);
  transition: all 0.5s ease;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1.4);
  }
}

/* 檔案管理美化樣式 */
.file-icon {
    margin-right: 12px !important;
    width: 16px;
    display: inline-block;
    text-align: center;
    color: #6c757d;
}

/* 拖拉上傳區域 */
.drag-drop-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #ffffff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drag-drop-area:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.drag-drop-area.drag-over {
    border-color: #28a745;
    background: #f8fff8;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.drag-drop-area .upload-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.drag-drop-area.drag-over .upload-icon {
    color: #28a745;
    animation: bounce 0.6s ease-in-out;
}

.drag-drop-text {
    font-size: 18px;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.drag-drop-hint {
    font-size: 14px;
    color: #6c757d;
}

/* 檔案表格美化 */
.file-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 16px 12px;
}

.file-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-table tbody tr:hover {
    background-color: #f8f9fa;
}

.file-table tbody tr.table-primary {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-left: 4px solid #007bff;
}

.file-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

/* 按鈕組美化 */
.file-actions .btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.file-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 動畫效果 */
@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item-enter {
    animation: fadeInUp 0.3s ease-out;
}

/* 檔案類型圖標顏色 */
.file-icon.fa-folder {
    color: #ffc107 !important;
}

.file-icon.fa-file {
    color: #6c757d !important;
}

/* 檔案名稱hover效果 */
.file-name:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-radius: 4px;
    padding: 4px 8px;
    margin: -4px -8px;
    transition: all 0.2s ease;
}


/* ===== 推播管理美化樣式 ===== */

/* 推播表格整體美化 */
#notificationsTable {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    background: white;
    table-layout: fixed;
    width: 100%;
}

/* 表格欄位寬度設定 */
#notificationsTable th:nth-child(1),
#notificationsTable td:nth-child(1) {
    width: 80px;
}

#notificationsTable th:nth-child(2),
#notificationsTable td:nth-child(2) {
    width: 360px;
}

#notificationsTable th:nth-child(3),
#notificationsTable td:nth-child(3) {
    width: auto;
    min-width: 120px;
}

#notificationsTable th:nth-child(4),
#notificationsTable td:nth-child(4) {
    width: 180px;
}

#notificationsTable th:nth-child(5),
#notificationsTable td:nth-child(5) {
    width: 80px;
}

#notificationsTable thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

#notificationsTable thead th {
    border: none;
    padding: 18px 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.85rem;
    text-align: center;
    position: relative;
}

#notificationsTable thead th:first-child {
    border-top-left-radius: 12px;
}

#notificationsTable thead th:last-child {
    border-top-right-radius: 12px;
}

/* 新增推播區域樣式 */
#newNotificationSection {
    border: 1px solid #e3f2fd;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    transition: all 0.3s ease;
}

#newNotificationSection:hover {
    border-color: #007bff;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
}

#newNotificationSection .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

/* 移除左側標籤，避免視覺混亂 */


/* 新增推播輸入框美化 */
#newNotificationSubject {
    border: 2px dashed #007bff !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#newNotificationSubject:focus {
    border-color: #0056b3 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    outline: none;
}

#newNotificationSubject::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* 發送推播按鈕使用與更新預覽按鈕相同的樣式 (btn-preview) */

/* 推播記錄的按鈕組美化 */
#notificationsTable .d-flex {
    flex-wrap: nowrap;
    justify-content: flex-start;
}

#notificationsTable .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

#notificationsTable .view-targets-btn {
    border-radius: 15px;
    min-width: auto;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 120px;
}

/* 選擇對象按鈕美化 */
#selectTargetEmployeesBtn {
    border: 2px solid #3498db;
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: white;
    color: #3498db;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#selectTargetEmployeesBtn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

#selectTargetEmployeesBtn.btn-success {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    color: white;
}

#selectTargetEmployeesBtn.btn-success:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #0056b3;
}

/* 已選擇員工顯示 */
#selectedEmployeesDisplay {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    color: #2980b9;
    margin-top: 4px;
    border-left: 3px solid #3498db;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 推播記錄列美化 */
#notificationsTable tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#notificationsTable tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

#notificationsTable tbody td {
    padding: 16px 15px;
    vertical-align: middle;
    border: none;
}

/* 編輯按鈕現在使用 edit-employee-btn 類別，與員工資料列表完全一致 */

/* 查看對象按鈕美化 */
.view-targets-btn {
    border: 1px solid #17a2b8;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.view-targets-btn:hover {
    background: #17a2b8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(23, 162, 184, 0.3);
}

/* 刪除按鈕美化 */
.delete-notification-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.delete-notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* 狀態標籤美化 */
.badge {
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

/* 員工選擇 Modal 美化 */
#employeeSelectionModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#employeeSelectionModal .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px 25px;
}

#employeeSelectionModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#employeeSelectionModal .btn-close {
    filter: brightness(0) invert(1);
}

/* 篩選區域美化 */
#employeeSelectionModal .row.mb-3:first-child {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 20px 0;
}

#employeeSelectionModal .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

#employeeSelectionModal .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 已選擇員工顯示區域 */
#employeeSelectionModal .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #b6d4da;
    border-radius: 10px;
    padding: 15px 20px;
}

/* 員工列表表格美化 */
#employeeSelectionModal .table {
    border-radius: 8px;
    overflow: hidden;
}

#employeeSelectionModal .table thead {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
}

#employeeSelectionModal .table thead th {
    border: none;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.85rem;
}

#employeeSelectionModal .table tbody tr {
    transition: all 0.2s ease;
}

#employeeSelectionModal .table tbody tr {
    cursor: pointer;
}

#employeeSelectionModal .table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.01);
}

#employeeSelectionModal .form-check-input {
    transform: scale(1.2);
    margin-top: 0.2rem;
}

/* 快速選擇按鈕美化 */
#selectAllEmployees, #clearAllEmployees {
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#selectAllEmployees:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

#clearAllEmployees:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

/* Modal footer 按鈕美化 */
#confirmEmployeeSelection {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

#confirmEmployeeSelection:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* 響應式設計 */
@media (max-width: 768px) {
    
    #notificationsTable thead th {
        padding: 12px 8px;
        font-size: 0.75rem;
    }
    
    #notificationsTable tbody td {
        padding: 12px 8px;
    }
    
    #createNotificationBtn {
        width: 35px;
        height: 35px;
    }
    
    #selectTargetEmployeesBtn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}


/* 統一表單控制項高度 */
.form-control, .form-select {
    height: 38px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
}

/* 確保日期時間選擇器的統一外觀 */
#scheduleDate, #scheduleHour, #scheduleMinute {
    height: 38px !important;
    padding: 6px 12px !important;
    box-sizing: border-box !important;
}
