html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

html { position: relative; min-height: 100%; }
body { margin: 0; padding: 0; min-height: 100vh; overflow-x: hidden; }

.btn { 
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px;
  font-size: 14px; font-weight: 500; line-height: 1.5; border-radius: 6px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn svg { flex-shrink: 0; width: 16px; height: 16px; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn-primary { 
  color: #fff; background-color: #2563eb; border-color: #2563eb;
}
.btn-primary:hover { 
  background-color: #1e40af; border-color: #1e40af; color: #fff;
}

.btn-secondary {
  color: #374151; background-color: #fff; border-color: #d1d5db;
}
.btn-secondary:hover {
  background-color: #f9fafb; border-color: #9ca3af; color: #111827;
}

.btn-success {
  color: #fff; background-color: #16a34a; border-color: #16a34a;
}
.btn-success:hover {
  background-color: #15803d; border-color: #15803d; color: #fff;
}

.btn-danger {
  color: #fff; background-color: #dc2626; border-color: #dc2626;
}
.btn-danger:hover {
  background-color: #b91c1c; border-color: #b91c1c; color: #fff;
}

.btn-outline-primary {
  color: #2563eb; background-color: transparent; border-color: #2563eb;
}
.btn-outline-primary:hover {
  color: #fff; background-color: #2563eb; border-color: #2563eb;
}

.btn-outline-secondary {
  color: #6b7280; background-color: transparent; border-color: #d1d5db;
}
.btn-outline-secondary:hover {
  color: #374151; background-color: #f9fafb; border-color: #9ca3af;
}

.btn-outline-success {
  color: #16a34a; background-color: transparent; border-color: #16a34a;
}
.btn-outline-success:hover {
  color: #fff; background-color: #16a34a; border-color: #16a34a;
}

.btn-outline-danger {
  color: #dc2626; background-color: transparent; border-color: #dc2626;
}
.btn-outline-danger:hover {
  color: #fff; background-color: #dc2626; border-color: #dc2626;
}

.btn-sm {
  padding: 6px 12px; font-size: 13px; gap: 6px;
}
.btn-sm svg { width: 14px; height: 14px; }

.btn-lg {
  padding: 12px 20px; font-size: 16px; gap: 10px;
}
.btn-lg svg { width: 18px; height: 18px; }

.btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.btn-icon-only {
  padding: 8px; gap: 0;
}
.btn-icon-only .btn-text { display: none; }

.btn-group {
  display: inline-flex; gap: 8px; flex-wrap: wrap;
}

.d-inline { display: inline; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.mb-4 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.text-muted { color: #6b7280; }

.card { 
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; 
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); 
}

.card-header { 
  padding: 1.25rem 1.5rem; background-color: #f9fafb; 
  border-bottom: 1px solid #e5e7eb; border-radius: 0.5rem 0.5rem 0 0;
}

.card-body { 
  padding: 1.5rem; 
}

.form-label { 
  display: block; font-size: 0.875rem; font-weight: 500; color: #374151; 
  margin-bottom: 0.5rem; line-height: 1.25;
}

.form-control { 
  padding: 0.625rem 0.875rem; border: 1px solid #d1d5db; border-radius: 0.375rem; 
  font-size: 0.9375rem; transition: all 0.15s ease-in-out; background-color: #fff;
  line-height: 1.5;
}

.form-control:hover { border-color: #9ca3af; }

.form-control:focus { 
  outline: none; border-color: #2563eb; 
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:disabled { 
  background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; 
}

.form-control::placeholder { color: #9ca3af; }

.form-control.is-invalid, .input.is-invalid { 
  border-color: #dc2626; 
}

.form-control.is-invalid:focus, .input.is-invalid:focus { 
  border-color: #dc2626; 
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); 
}

.form-control.is-valid, .input.is-valid { 
  border-color: #16a34a; 
}

.form-control.is-valid:focus, .input.is-valid:focus { 
  border-color: #16a34a; 
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1); 
}

.invalid-feedback { 
  display: block; font-size: 0.8125rem; color: #dc2626; 
  margin-top: 0.375rem; line-height: 1.4; 
}

.valid-feedback { 
  display: block; font-size: 0.8125rem; color: #16a34a; 
  margin-top: 0.375rem; line-height: 1.4; 
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color); text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: #1e293b; border-bottom: 1px solid #334155;
  display: flex; align-items: center; padding: 0 16px; gap: 12px; z-index: 1000;
}

.nav-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #e2e8f0; border-radius: 6px; transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: #f8fafc; }
.logo-icon { flex-shrink: 0; }
.logo-text { white-space: nowrap; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.header-icon-btn {
  background: none; border: none; cursor: pointer; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #e2e8f0; border-radius: 6px; transition: background 0.2s;
  text-decoration: none;
}
.header-icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.auth-menu { position: relative; }
.auth-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #e2e8f0; border-radius: 6px; transition: background 0.2s;
}
.auth-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.auth-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); min-width: 200px;
  display: none; flex-direction: column; overflow: hidden; z-index: 1001;
}
.auth-dropdown.active { display: flex; }

.auth-item {
  padding: 12px 16px; color: #374151; text-decoration: none;
  transition: background 0.2s; display: block; white-space: nowrap;
}
.auth-item:hover { background: #f3f4f6; color: #111827; }

.auth-user-info {
  font-weight: 600; color: #111827; border-bottom: 1px solid #e5e7eb;
  cursor: default;
}
.auth-user-info:hover { background: transparent; }

.app-header .btn-primary {
  background-color: #3b82f6; border-color: #3b82f6;
}
.app-header .btn-primary:hover {
  background-color: #60a5fa; border-color: #60a5fa;
}

.app-layout { display: flex; padding-top: 56px; min-height: 100vh; }

.sidebar {
  position: fixed; top: 56px; left: 0; bottom: 0; width: 260px;
  background: #fff; border-right: 1px solid #e5e7eb;
  transition: width 0.3s ease, transform 0.3s ease; z-index: 900; overflow: hidden;
  display: flex; flex-direction: column;
}

.sidebar-nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.sidebar-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  color: #374151; text-decoration: none; border-radius: 6px;
  transition: background 0.2s, color 0.2s; font-weight: 500; white-space: nowrap;
  min-height: 44px; position: relative;
}
.sidebar-item:hover { background: #f3f4f6; color: #111827; }
.sidebar-item.active { background: #eff6ff; color: #2563eb; }
.sidebar-item.active:hover { background: #dbeafe; }
.sidebar-item svg { flex-shrink: 0; min-width: 20px; }
.sidebar-item .sidebar-text { 
  transition: opacity 0.3s ease, width 0.3s ease; overflow: hidden;
}

.sidebar-divider { height: 1px; background: #e5e7eb; margin: 8px 12px; }

.sidebar-section-label {
  padding: 4px 12px; font-size: 0.6875rem; font-weight: 600;
  color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}

.sidebar-footer {
  padding: 12px; border-top: 1px solid #e5e7eb; flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 6px; min-height: 44px;
}
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: #2563eb; color: #fff; font-size: 0.8125rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  min-width: 36px;
}
.sidebar-user-info { overflow: hidden; transition: opacity 0.3s ease; }
.sidebar-user-name {
  font-size: 0.8125rem; font-weight: 600; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.6875rem; color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.main-content {
  flex: 1; margin-left: 260px; transition: margin-left 0.3s ease;
  padding: 0; min-width: 0;
}

.content-wrapper {
  padding: 16px; max-width: 100%;
}

@media (max-width: 767px) {
  .app-header { height: 56px; padding: 0 12px; gap: 8px; }
  .logo { font-size: 16px; gap: 6px; }
  .logo-icon { width: 28px; height: 28px; }
  .logo-text { display: none; }
  
  .sidebar {
    width: 260px; transform: translateX(-100%);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-item .sidebar-text { opacity: 1; }
  .sidebar-section-label { opacity: 1; }
  .sidebar-user-info { opacity: 1; }
  
  .main-content { margin-left: 0; }
  
  .content-wrapper { padding: 12px; }
  
  .btn { padding: 8px 12px; font-size: 13px; gap: 6px; }
  .btn svg { width: 14px; height: 14px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
  .btn-lg { padding: 10px 16px; font-size: 14px; }
  
  .btn-hide-text-mobile .btn-text { display: none; }
  .btn-hide-text-mobile { padding: 8px; gap: 0; }
  
  .d-flex.gap-2 { gap: 8px !important; }
  .text-end { white-space: nowrap; }
}

@media (min-width: 768px) {
  .sidebar { width: 72px; }
  .sidebar.expanded { width: 260px; }
  .sidebar-item { justify-content: center; gap: 0; }
  .sidebar.expanded .sidebar-item { justify-content: flex-start; gap: 12px; }
  .sidebar-item .sidebar-text { opacity: 0; width: 0; }
  .sidebar.expanded .sidebar-item .sidebar-text { opacity: 1; width: auto; }
  .sidebar-section-label { opacity: 0; height: 0; padding: 0 12px; margin: 0; overflow: hidden; transition: opacity 0.3s ease; }
  .sidebar.expanded .sidebar-section-label { opacity: 1; height: auto; padding: 4px 12px; }
  .sidebar-user-info { opacity: 0; width: 0; transition: opacity 0.3s ease; }
  .sidebar.expanded .sidebar-user-info { opacity: 1; width: auto; }
  .main-content { margin-left: 72px; }
  .sidebar.expanded ~ .main-content { margin-left: 260px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .app-header { padding: 0 16px; }
  .content-wrapper { padding: 16px; }
}

@media (min-width: 1024px) {
  .app-header { height: 64px; padding: 0 24px; gap: 16px; }
  .logo { font-size: 20px; gap: 12px; }
  .sidebar { top: 64px; }
  .app-layout { padding-top: 64px; }
  .content-wrapper { padding: 24px; max-width: 1600px; }
}

@media (min-width: 1440px) {
  .content-wrapper { padding: 32px; }
}

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #29729c 100%); padding: 20px;
}

.login-container {
  background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 48px 40px; max-width: 440px; width: 100%;
}

.login-header { text-align: center; margin-bottom: 32px; }

.login-logo { margin: 0 auto 16px; }

.login-title {
  font-size: 28px; font-weight: 700; color: #111827; margin: 0 0 8px 0;
}

.login-subtitle {
  font-size: 15px; color: #6b7280; margin: 0;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-check {
  display: flex; align-items: center; gap: 8px; margin: -8px 0;
}

.form-check-input {
  width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 4px;
  cursor: pointer; margin: 0;
}

.form-check-input:checked {
  background-color: #2563eb; border-color: #2563eb;
}

.form-check-label {
  font-size: 14px; color: #374151; cursor: pointer; margin: 0;
}

.w-100 { width: 100%; }

.login-footer {
  text-align: center; margin-top: 8px;
}

.forgot-link {
  color: #2563eb; text-decoration: none; font-size: 14px; font-weight: 500;
}

.forgot-link:hover {
  color: #1e40af; text-decoration: underline;
}

.confirmation-message {
  text-align: center; padding: 24px 0; color: #374151; line-height: 1.6;
}

.confirmation-message p {
  margin: 0 0 12px 0;
}

.confirmation-message p:last-child {
  margin-bottom: 24px;
}

.alert {
  padding: 12px 16px; border-radius: 6px; margin-bottom: 20px;
}

.alert-danger {
  background-color: #fee2e2; border: 1px solid #fecaca; color: #991b1b;
}

.validation-summary {
  margin: 0; font-size: 14px;
}

.validation-summary ul {
  list-style: none; padding: 0; margin: 0;
}

.validation-summary li {
  margin: 4px 0;
}

@media (max-width: 480px) {
  .login-container {
    padding: 32px 24px;
  }
  
  .login-title {
    font-size: 24px;
  }
}

.table {
  width: 100%; border-collapse: collapse; margin: 0;
}

.table thead th {
  padding: 12px 16px; background-color: #f9fafb; border-bottom: 2px solid #e5e7eb;
  font-weight: 600; font-size: 14px; color: #374151; text-align: left;
}

.table tbody td {
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb; color: #374151;
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

.badge {
  display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 600;
  border-radius: 12px; line-height: 1;
}

.badge.bg-primary {
  background-color: #2563eb; color: #fff;
}

.badge.bg-secondary {
  background-color: #6b7280; color: #fff;
}

.alert-success {
  background-color: #d1fae5; border: 1px solid #a7f3d0; color: #065f46;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1100;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex !important; align-items: center; gap: 10px;
  padding: 0.875rem 1.25rem; border-radius: 0.5rem; color: white;
  font-size: 0.875rem; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: toastSlideIn 0.3s ease forwards; max-width: 400px;
}
.toast.removing { animation: toastSlideOut 0.3s ease forwards; }
.toast svg { flex-shrink: 0; width: 18px; height: 18px; }
.toast.success { background-color: #16a34a; }
.toast.error { background-color: #ef4444; }
.toast.warning { background-color: #f97316; }
.toast.info { background-color: #2563eb; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalSlideDown { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(20px) scale(0.95); } }

.confirm-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); display: none; align-items: center;
  justify-content: center; z-index: 1050; padding: 1rem;
}
.confirm-modal.active {
  display: flex; animation: modalFadeIn 0.2s ease forwards;
}
.confirm-modal.closing {
  animation: modalFadeOut 0.2s ease forwards;
}
.confirm-modal-content {
  background: white; border-radius: 0.75rem; width: 100%; max-width: 420px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideUp 0.25s ease forwards;
}
.confirm-modal.closing .confirm-modal-content {
  animation: modalSlideDown 0.2s ease forwards;
}
.confirm-modal-header {
  padding: 1.5rem 1.5rem 0; display: flex; align-items: center; gap: 12px;
}
.confirm-modal-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  background-color: #fee2e2; color: #dc2626;
}
.confirm-modal-icon svg { width: 20px; height: 20px; }
.confirm-modal-title { font-size: 1.125rem; font-weight: 600; color: #111827; margin: 0; }
.confirm-modal-body { padding: 0.75rem 1.5rem 1.5rem; color: #6b7280; font-size: 0.9375rem; line-height: 1.5; }
.confirm-modal-footer {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  padding: 1rem 1.5rem; border-top: 1px solid #e5e7eb; background-color: #f9fafb;
  border-radius: 0 0 0.75rem 0.75rem;
}

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 0.75rem; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-blue { background-color: #eff6ff; color: #2563eb; }
.stat-icon-green { background-color: #f0fdf4; color: #16a34a; }
.stat-icon-purple { background-color: #f5f3ff; color: #7c3aed; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: #111827; line-height: 1.2; }
.stat-label { font-size: 0.875rem; color: #6b7280; margin-top: 2px; }

.section-title { font-size: 1.125rem; font-weight: 600; color: #111827; margin: 0 0 1rem 0; }

.quick-actions-section { margin-bottom: 2rem; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.quick-action-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  text-decoration: none; transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.quick-action-card:hover {
  border-color: #2563eb; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.quick-action-icon {
  width: 44px; height: 44px; border-radius: 0.625rem; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.quick-action-icon-blue { background-color: #eff6ff; color: #2563eb; }
.quick-action-icon-green { background-color: #f0fdf4; color: #16a34a; }
.quick-action-icon-purple { background-color: #f5f3ff; color: #7c3aed; }
.quick-action-title { font-weight: 600; color: #111827; font-size: 0.9375rem; }
.quick-action-desc { color: #6b7280; font-size: 0.8125rem; margin-top: 2px; }

.recent-section { margin-bottom: 2rem; }

@media (max-width: 767px) {
  .stats-row { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }
}

/* ── AI Activity Header Button ── */
.ai-activity-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: none;
  background: transparent; color: #94a3b8; cursor: pointer;
  transition: all 0.2s ease;
}
.ai-activity-btn:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }
.ai-activity-btn.has-active { color: #60a5fa; }
.ai-activity-btn.has-active svg { animation: aiActivityPulse 1.5s ease-in-out infinite; }

@keyframes aiActivityPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ai-activity-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  line-height: 16px; text-align: center;
  background: #3b82f6; color: #fff;
}

/* ── AI Activity Offcanvas Panel ── */
.ai-activity-offcanvas { width: 380px !important; }
.ai-activity-offcanvas .offcanvas-header {
  border-bottom: 1px solid #e5e7eb; padding: 16px 20px;
}
.ai-activity-offcanvas .offcanvas-title {
  display: flex; align-items: center; font-size: 1rem; font-weight: 600; color: #111827;
}

.ai-activity-section-header {
  padding: 10px 20px 6px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af;
}

.ai-activity-list { display: flex; flex-direction: column; }

.ai-activity-empty {
  padding: 16px 20px; font-size: 0.85rem; color: #9ca3af; text-align: center;
}

/* ── Activity Item Card ── */
.ai-activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}
.ai-activity-item:hover { background: #f9fafb; }

.ai-activity-item-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ai-activity-item-icon.status-active {
  background: #eff6ff; color: #3b82f6;
}
.ai-activity-item-icon.status-completed {
  background: #f0fdf4; color: #22c55e;
}
.ai-activity-item-icon.status-failed {
  background: #fef2f2; color: #ef4444;
}

.ai-activity-item-body { flex: 1; min-width: 0; }
.ai-activity-item-title {
  font-size: 0.85rem; font-weight: 600; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-activity-item-status {
  font-size: 0.78rem; color: #6b7280; margin-top: 2px;
}
.ai-activity-item-time {
  font-size: 0.7rem; color: #9ca3af; margin-top: 2px;
}
.ai-activity-item-actions { margin-top: 6px; }
.ai-activity-item-actions .btn { font-size: 0.78rem; padding: 2px 10px; }
.ai-activity-item-updated .ai-activity-item-status {
  animation: statusPulse 0.3s ease-in-out;
}
@keyframes statusPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

@media (max-width: 480px) {
  .ai-activity-offcanvas { width: 100% !important; }
}