/* 高階主管每日 AI 助理 - 自訂樣式 */

.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(16, 42, 67, 0.08), 0 1px 2px rgba(16, 42, 67, 0.04);
  border: 1px solid #e3ebf3;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.1);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-high { background: #fee2e2; color: #b91c1c; }
.badge-medium { background: #fef3c7; color: #b45309; }
.badge-low { background: #e0f2fe; color: #0369a1; }
.badge-vip { background: #fdf6e3; color: #92600a; border: 1px solid #e9b949; }
.badge-sensitive { background: #fce7f3; color: #9d174d; }
.badge-cat-needs_reply { background: #fee2e2; color: #b91c1c; }
.badge-cat-delegate { background: #ede9fe; color: #6d28d9; }
.badge-cat-fyi { background: #f1f5f9; color: #64748b; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  color: #9fb3c8;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: rgba(233,185,73,0.15); color: #e9b949; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #243b53; color: white; }
.btn-primary:hover:not(:disabled) { background: #102a43; }
.btn-gold { background: #e9b949; color: #102a43; }
.btn-gold:hover:not(:disabled) { background: #cf9f2e; }
.btn-outline { background: white; border: 1px solid #cbd5e1; color: #475569; }
.btn-outline:hover:not(:disabled) { background: #f8fafc; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover:not(:disabled) { background: #fecaca; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideIn 0.25s ease-out;
  max-width: 22rem;
}
.toast-success { background: #15803d; }
.toast-error { background: #b91c1c; }
.toast-info { background: #243b53; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: white;
  border-radius: 0.75rem;
  max-width: 42rem;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: #334e68; box-shadow: 0 0 0 3px rgba(51,78,104,0.1); }

.tab-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border: none;
  background: transparent;
}
.tab-btn.active { background: #243b53; color: white; }

.mic-pulse {
  animation: micPulse 1.5s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 14px rgba(220,38,38,0); }
}

.sst-segment { border-left: 3px solid #e2e8f0; }
.sst-segment.tag-decision { border-left-color: #15803d; background: #f0fdf4; }
.sst-segment.tag-pending { border-left-color: #b45309; background: #fffbeb; }
.sst-segment.tag-risk { border-left-color: #b91c1c; background: #fef2f2; }
.sst-segment.tag-todo { border-left-color: #6d28d9; background: #f5f3ff; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.mobile-open {
    display: block;
    position: fixed;
    inset: 0 30% 0 0;
    z-index: 80;
  }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
