/* =====================================================================
   MW-Immigration CRM — modern theme layer (visual only)
   Loaded after style.css. Changes appearance only; no page logic.
   Light by default, dark via html[data-theme="dark"].
   ===================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --mw-primary: #4f46e5;
  --mw-primary-600: #4338ca;
  --mw-primary-soft: rgba(79, 70, 229, 0.1);
  --mw-accent: #06b6d4;
  --mw-success: #10b981;
  --mw-warning: #f59e0b;
  --mw-danger: #ef4444;
  --mw-bg: #f5f7fb;
  --mw-surface: #ffffff;
  --mw-surface-2: #f8fafc;
  --mw-border: #e6e9f0;
  --mw-text: #0f172a;
  --mw-muted: #64748b;
  --mw-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --mw-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --mw-radius: 14px;
  --mw-radius-sm: 10px;
  --mw-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --mw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --mw-primary: #818cf8;
  --mw-primary-600: #6366f1;
  --mw-primary-soft: rgba(129, 140, 248, 0.14);
  --mw-bg: #0b1120;
  --mw-surface: #111827;
  --mw-surface-2: #0f172a;
  --mw-border: #1f2a3d;
  --mw-text: #e5e7eb;
  --mw-muted: #94a3b8;
  --mw-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --mw-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ---------- Base ---------- */
html body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--mw-bg) !important;
  color: var(--mw-text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--mw-ease), color 0.3s var(--mw-ease);
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .h4, body .text-blue { color: var(--mw-text) !important; font-weight: 700; letter-spacing: -0.01em; }
body .text-muted, body p.text-muted { color: var(--mw-muted) !important; }
body a { color: var(--mw-primary); }
::selection { background: var(--mw-primary-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--mw-border) transparent; }

/* ---------- Header ---------- */
body .header {
  background: color-mix(in srgb, var(--mw-surface) 82%, transparent) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--mw-border);
  box-shadow: none !important;
}
body .header .menu-icon, body .header .search-toggle-icon,
body .header .user-info-dropdown .dropdown-toggle { color: var(--mw-text) !important; }
body .header .user-info-dropdown .user-icon {
  box-shadow: 0 0 0 2px var(--mw-surface), 0 0 0 4px var(--mw-primary-soft);
  background: var(--mw-primary-soft);
  overflow: hidden;
}
body .header .user-info-dropdown .user-icon img { width: 100%; height: 100%; object-fit: cover; }
body .header .user-name { font-weight: 600; color: var(--mw-text) !important; }
body .dropdown-menu {
  background: var(--mw-surface);
  border: 1px solid var(--mw-border);
  border-radius: var(--mw-radius-sm);
  box-shadow: var(--mw-shadow-lg);
  padding: 6px;
  animation: mw-pop 0.18s var(--mw-ease);
}
body .dropdown-item { border-radius: 8px; color: var(--mw-text) !important; font-weight: 500; }
body .dropdown-item:hover { background: var(--mw-primary-soft) !important; color: var(--mw-primary) !important; }

/* theme toggle (injected) */
.mw-theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--mw-border);
  background: var(--mw-surface); color: var(--mw-text); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; margin-right: 14px;
  transition: transform 0.25s var(--mw-ease), background 0.25s;
  font-size: 18px; vertical-align: middle;
}
.mw-theme-toggle:hover { transform: rotate(-15deg) scale(1.06); background: var(--mw-primary-soft); color: var(--mw-primary); }
.header-right { display: flex; align-items: center; }
.mw-theme-toggle.mw-floating { position: fixed; top: 18px; right: 18px; z-index: 50; margin: 0; }

/* ---------- Sidebar ---------- */
body .left-side-bar {
  background: var(--mw-surface) !important;
  border-right: 1px solid var(--mw-border);
  box-shadow: none !important;
}
body .left-side-bar .brand-logo { border-bottom: 1px solid var(--mw-border) !important; }
body .left-side-bar .brand-logo img.light-logo { display: none !important; }
body .left-side-bar .brand-logo img.dark-logo { display: inline-block !important; }
html[data-theme="dark"] body .left-side-bar .brand-logo img.dark-logo,
html[data-theme="dark"] .login-header .brand-logo img,
html[data-theme="dark"] .mw-auth-brand img { filter: brightness(0) invert(1); }
body .sidebar-menu .dropdown-toggle,
body .sidebar-menu .submenu li a {
  color: var(--mw-muted) !important;
  border-radius: 10px;
  margin: 2px 12px;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--mw-ease);
}
body .sidebar-menu > ul > li > .dropdown-toggle { padding-left: 54px; font-weight: 500; }
body .sidebar-menu .dropdown-toggle .micon { color: inherit !important; font-size: 19px; }
body .sidebar-menu .dropdown-toggle:hover,
body .sidebar-menu .submenu li a:hover {
  background: var(--mw-primary-soft) !important; color: var(--mw-primary) !important; transform: translateX(2px);
}
body .sidebar-menu .dropdown-toggle.active,
body .sidebar-menu .submenu li a.active,
body .sidebar-menu li.mw-active > .dropdown-toggle {
  background: var(--mw-grad) !important; color: #fff !important;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
body .sidebar-menu .submenu { background: transparent !important; }
body .sidebar-menu .submenu li a { padding-left: 54px !important; font-size: 14px; }
body .highlight-tab { background: rgba(245, 158, 11, 0.12) !important; border-left: 3px solid var(--mw-warning) !important; }
body .mobile-menu-overlay { backdrop-filter: blur(3px); }

/* ---------- Main ---------- */
body .main-container { background: transparent; min-height: 100vh; display: flex; flex-direction: column; }
body .main-container > .pd-ltr-20, body .main-container > div:first-child { flex: 1 0 auto; }
body .page-header, body .card-box, body .card, body .login-box, body .pd-20.card-box {
  background: var(--mw-surface) !important;
  border: 1px solid var(--mw-border) !important;
  border-radius: var(--mw-radius) !important;
  box-shadow: var(--mw-shadow) !important;
  color: var(--mw-text);
}
body .card-box, body .card, body .page-header { animation: mw-rise 0.5s var(--mw-ease) both; }
body .breadcrumb { background: transparent; }
body .breadcrumb-item.active { color: var(--mw-muted); }

/* ---------- Dashboard stat cards ---------- */
body .stat-card {
  cursor: pointer; overflow: hidden; position: relative;
  transition: transform 0.3s var(--mw-ease), box-shadow 0.3s var(--mw-ease);
}
body .stat-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--mw-grad);
}
body .stat-card:hover { transform: translateY(-4px); box-shadow: var(--mw-shadow-lg) !important; }
body .stat-card .card-body { text-align: left !important; padding: 22px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; }
body .stat-card .stat-icon {
  grid-column: 2; grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex !important; align-items: center; justify-content: center; font-size: 22px !important;
  background: var(--mw-primary-soft); color: var(--mw-primary) !important; margin: 0 !important;
}
body #remarketingTicketsCard .stat-icon { background: rgba(6, 182, 212, 0.12); color: #0891b2 !important; }
body #qualifiedTicketsCard .stat-icon { background: rgba(16, 185, 129, 0.12); color: #059669 !important; }
body #unqualifiedTicketsCard .stat-icon { background: rgba(239, 68, 68, 0.12); color: #dc2626 !important; }
body .stat-card h6 { grid-column: 1; font-size: 12px; letter-spacing: 0.06em; margin: 0; color: var(--mw-muted) !important; }
body .stat-card h3 { grid-column: 1; font-size: 30px; margin: 0; font-weight: 800; }

/* dashboard charts (injected) */
.mw-dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 24px; }
.mw-panel {
  grid-column: span 6; background: var(--mw-surface); border: 1px solid var(--mw-border);
  border-radius: var(--mw-radius); box-shadow: var(--mw-shadow); padding: 20px; min-width: 0;
  animation: mw-rise 0.6s var(--mw-ease) both;
}
.mw-panel.wide { grid-column: span 8; }
.mw-panel.narrow { grid-column: span 4; }
.mw-panel.full { grid-column: span 12; }
.mw-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 10px; }
.mw-panel-head h5 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.mw-panel-head h5 i { color: var(--mw-primary); }
.mw-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--mw-primary-soft); color: var(--mw-primary); font-weight: 600; white-space: nowrap; }
.mw-empty { color: var(--mw-muted); text-align: center; padding: 40px 10px; font-size: 14px; }
.mw-list { list-style: none; margin: 0; padding: 0; }
.mw-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--mw-border); }
.mw-list li:last-child { border-bottom: 0; }
.mw-list .mw-li-main { flex: 1; min-width: 0; }
.mw-list .mw-li-main b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-list .mw-li-main small { color: var(--mw-muted); }
.mw-skeleton { height: 260px; border-radius: 12px; background: linear-gradient(90deg, var(--mw-surface-2) 25%, var(--mw-border) 50%, var(--mw-surface-2) 75%); background-size: 200% 100%; animation: mw-shimmer 1.3s infinite; }
.apexcharts-text, .apexcharts-legend-text { fill: var(--mw-muted) !important; color: var(--mw-muted) !important; }
.apexcharts-tooltip { background: var(--mw-surface) !important; border-color: var(--mw-border) !important; color: var(--mw-text) !important; }

/* ---------- Avatars ---------- */
.mw-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px;
  background: var(--mw-grad); text-transform: uppercase; letter-spacing: 0.02em;
}

/* ---------- Forms ---------- */
body .form-control, body .custom-select, body select.form-control {
  background-color: var(--mw-surface) !important;
  border: 1px solid var(--mw-border) !important;
  border-radius: var(--mw-radius-sm) !important;
  color: var(--mw-text) !important;
  height: 44px; font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
body textarea.form-control { height: auto; min-height: 100px; }
body .form-control:focus, body select.form-control:focus {
  border-color: var(--mw-primary) !important;
  box-shadow: 0 0 0 4px var(--mw-primary-soft) !important;
}
body .form-control::placeholder { color: var(--mw-muted); opacity: 0.8; }
body label, body .col-form-label { font-weight: 600; font-size: 13px; color: var(--mw-text); }
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
body .input-group-text { background: var(--mw-surface-2) !important; border-color: var(--mw-border) !important; color: var(--mw-muted); }

/* filter areas */
body .filter-container .filter-row, body .filter-row {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 0;
}
body .filter-row > [class*="col"] { padding: 0 !important; max-width: none; width: auto; }
body .button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Buttons ---------- */
body .btn {
  border-radius: var(--mw-radius-sm) !important; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.55rem 1.1rem; border-width: 1px;
  transition: transform 0.2s var(--mw-ease), box-shadow 0.2s, filter 0.2s;
}
body .btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
body .btn:active { transform: translateY(0) scale(0.98); }
body .btn-primary { background: var(--mw-grad) !important; border: 0 !important; color: #fff !important; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3); }
body .btn-success { background: linear-gradient(135deg, #10b981, #059669) !important; border: 0 !important; box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25); }
body .btn-danger { background: linear-gradient(135deg, #f43f5e, #dc2626) !important; border: 0 !important; }
body .btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b) !important; border: 0 !important; color: #1f2937 !important; }
body .btn-info { background: linear-gradient(135deg, #22d3ee, #0891b2) !important; border: 0 !important; color: #fff !important; }
body .btn-secondary { background: var(--mw-surface-2) !important; color: var(--mw-text) !important; border: 1px solid var(--mw-border) !important; }
body .btn-sm { padding: 0.35rem 0.7rem; font-size: 12.5px; }
body table .btn { margin: 2px; }

/* ---------- Tables (DataTables + plain) ---------- */
body table.dataTable, body .table {
  color: var(--mw-text) !important; border-collapse: separate !important; border-spacing: 0; width: 100% !important;
}
body table.dataTable thead th, body .table thead th {
  background: var(--mw-surface-2) !important; color: var(--mw-muted) !important;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  border-bottom: 1px solid var(--mw-border) !important; border-top: 0 !important; padding: 14px 12px !important; white-space: nowrap;
}
body table.dataTable thead th:first-child { border-top-left-radius: 10px; }
body table.dataTable thead th:last-child { border-top-right-radius: 10px; }
body table.dataTable tbody td, body .table td {
  border-top: 0 !important; border-bottom: 1px solid var(--mw-border) !important;
  padding: 13px 12px !important; vertical-align: middle; font-size: 14px; background: transparent !important;
}
body table.dataTable tbody tr { background: transparent !important; transition: background 0.15s; }
body table.dataTable tbody tr:hover td, body .table-hover tbody tr:hover td { background: var(--mw-primary-soft) !important; }
body .dataTables_wrapper { padding: 0 20px; color: var(--mw-text); }
body .dataTables_wrapper .dataTables_filter input, body .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--mw-border) !important; border-radius: 10px !important; padding: 6px 12px !important;
  background: var(--mw-surface) !important; color: var(--mw-text) !important; height: 38px;
}
body .dataTables_wrapper .dataTables_info { color: var(--mw-muted) !important; font-size: 13px; }
body .page-item .page-link, body .dataTables_wrapper .paginate_button {
  border: 1px solid var(--mw-border) !important; background: var(--mw-surface) !important; color: var(--mw-text) !important;
  border-radius: 9px !important; margin: 0 3px; min-width: 36px; text-align: center;
}
body .page-item.active .page-link { background: var(--mw-grad) !important; color: #fff !important; border-color: transparent !important; }
body .page-item.disabled .page-link { opacity: 0.5; }
body table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
body table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before { background-color: var(--mw-primary) !important; box-shadow: none !important; border: 0 !important; }
body .table-responsive, body .pb-20 { overflow-x: auto; }

/* status pills (applied by JS to plain status words) */
.mw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.mw-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mw-pill.open { background: rgba(16, 185, 129, 0.12); color: #059669; }
.mw-pill.closed { background: rgba(100, 116, 139, 0.14); color: var(--mw-muted); }
.mw-pill.qualified { background: rgba(79, 70, 229, 0.12); color: var(--mw-primary); }
.mw-pill.unqualified { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.mw-pill.yes { background: rgba(6, 182, 212, 0.12); color: #0891b2; }
.mw-pill.no { background: rgba(100, 116, 139, 0.12); color: var(--mw-muted); }

/* ---------- Modals & alerts ---------- */
body .modal-content { background: var(--mw-surface); color: var(--mw-text); border: 1px solid var(--mw-border); border-radius: 18px; box-shadow: var(--mw-shadow-lg); }
body .modal-header, body .modal-footer { border-color: var(--mw-border); }
body .modal.fade .modal-dialog { transform: translateY(16px) scale(0.98); transition: transform 0.3s var(--mw-ease); }
body .modal.show .modal-dialog { transform: none; }
body .modal-backdrop.show { opacity: 0.45; backdrop-filter: blur(2px); }
body .close { color: var(--mw-text); text-shadow: none; }
html[data-theme="dark"] .swal2-popup { background: var(--mw-surface) !important; color: var(--mw-text) !important; }
html[data-theme="dark"] .swal2-title, html[data-theme="dark"] .swal2-html-container { color: var(--mw-text) !important; }
body .swal2-popup { border-radius: 18px !important; font-family: "Inter", sans-serif; }
body #toast-container > div { border-radius: 12px; box-shadow: var(--mw-shadow-lg); opacity: 1; }

/* ---------- Loaders ---------- */
/* full-page preloader -> small, calm, animated brand mark */
body .pre-loader {
  background: color-mix(in srgb, var(--mw-bg) 70%, transparent) !important;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
body .pre-loader .pre-loader-box {
  width: auto !important; padding: 0 !important; background: transparent !important;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
body .pre-loader .loader-logo, body .pre-loader .percent, body .pre-loader .loading-text { display: none !important; }
body .pre-loader .loader-progress {
  width: 96px !important; height: 3px !important; border-radius: 3px; overflow: hidden;
  background: var(--mw-border) !important; margin: 0 !important; position: relative;
}
body .pre-loader .loader-progress .bar { background: var(--mw-grad) !important; height: 100%; border-radius: 3px; }

.mw-mark {
  position: relative; width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #06b6d4, #4f46e5); background-size: 300% 300%;
  color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
  animation: mw-flow 4s ease-in-out infinite, mw-float-y 3s ease-in-out infinite;
  isolation: isolate;
}
/* soft ripple pulse */
.mw-mark::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: inherit; animation: mw-ripple 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
/* glossy sheen sweep */
.mw-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  background-size: 250% 100%; animation: mw-gloss 2.8s ease-in-out infinite;
}
.mw-mark.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }

/* in-page ajax loader (#loader) -> small floating pill */
body #loader {
  background: transparent !important; pointer-events: none; inset: auto 0 28px 0 !important;
  top: auto !important; height: auto !important; align-items: center !important; justify-content: flex-end !important;
}
body #loader .loader-spinner { display: none !important; }
body #loader::before { content: none; }
body #loader .loader-text {
  margin: 0 !important; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px; border-radius: 999px; background: var(--mw-surface);
  border: 1px solid var(--mw-border); box-shadow: var(--mw-shadow-lg);
  color: var(--mw-text) !important; font-size: 14px !important; font-weight: 600; pointer-events: auto;
  animation: mw-rise 0.3s var(--mw-ease);
}
body #loader .loader-text .mw-mark::before { display: none; }

/* ---------- Login / reset ---------- */
body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(79, 70, 229, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(6, 182, 212, 0.18), transparent 60%),
    var(--mw-bg) !important;
  overflow-x: hidden;
}
body.login-page .login-header { background: transparent !important; box-shadow: none !important; position: absolute; width: 100%; z-index: 3; }
body.login-page .login-wrap { position: relative; z-index: 2; padding: 90px 16px 40px; }
.mw-blob { position: fixed; border-radius: 50%; filter: blur(60px); opacity: 0.55; z-index: 0; pointer-events: none; animation: mw-float 14s ease-in-out infinite; }
.mw-blob.b1 { width: 340px; height: 340px; background: #6366f1; top: -80px; left: -60px; }
.mw-blob.b2 { width: 300px; height: 300px; background: #06b6d4; bottom: -90px; right: -40px; animation-delay: -5s; }
.mw-blob.b3 { width: 220px; height: 220px; background: #a855f7; top: 45%; left: 55%; animation-delay: -9s; opacity: 0.3; }
body.login-page .login-box {
  background: color-mix(in srgb, var(--mw-surface) 78%, transparent) !important;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--mw-border) 70%, transparent) !important;
  border-radius: 24px !important; padding: 40px 36px !important; box-shadow: var(--mw-shadow-lg) !important;
  animation: mw-rise 0.7s var(--mw-ease) both;
}
body.login-page .login-title h2 { font-size: 26px !important; text-align: left !important; margin-bottom: 6px; }
.mw-login-sub { color: var(--mw-muted); margin-bottom: 26px; font-size: 14px; }
.mw-login-badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
body.login-page .input-group.custom { margin-bottom: 18px; }
body.login-page .input-group.custom .form-control { height: 52px; padding-left: 16px; border-radius: 12px !important; }
body.login-page .input-group.custom .input-group-append .input-group-text { background: transparent !important; border: 0 !important; }
body.login-page .btn-primary { height: 52px; font-size: 16px; position: relative; overflow: hidden; }
body.login-page .btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); animation: mw-sheen 3.2s ease-in-out infinite;
}
body.login-page .forgot-password a { color: var(--mw-primary) !important; font-weight: 600; }
body.login-page .custom-control-label { font-weight: 500; }
.mw-login-foot { text-align: center; margin-top: 22px; font-size: 12.5px; color: var(--mw-muted); }

/* ---------- Profile ---------- */
.mw-profile-hero {
  display: flex; align-items: center; gap: 22px; padding: 26px; margin-bottom: 24px; border-radius: var(--mw-radius);
  background: var(--mw-grad); color: #fff; position: relative; overflow: hidden; box-shadow: var(--mw-shadow-lg);
  animation: mw-rise 0.5s var(--mw-ease) both;
}
.mw-profile-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.mw-profile-hero .mw-avatar { width: 84px; height: 84px; font-size: 28px; border: 4px solid rgba(255, 255, 255, 0.6); }
.mw-profile-hero h3 { color: #fff !important; margin: 0 0 4px; }
.mw-profile-hero .mw-role { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 12px; font-weight: 600; text-transform: capitalize; }
.mw-swatches { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.mw-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.7); cursor: pointer; transition: transform 0.2s var(--mw-ease); }
.mw-swatch:hover, .mw-swatch.on { transform: scale(1.18); border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }

/* ---------- Footer (injected) ---------- */
.mw-footer {
  margin: 30px 20px 0; padding: 18px 4px 22px; border-top: 1px solid var(--mw-border);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  color: var(--mw-muted); font-size: 13px;
}
.mw-footer .mw-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--mw-text); }
.mw-footer a { color: var(--mw-primary); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.3s var(--mw-ease); }
.mw-footer a:hover { background-size: 100% 1px; }
.mw-footer .mw-heart { color: #f43f5e; display: inline-block; animation: mw-beat 1.6s ease-in-out infinite; }

/* ---------- Report page ---------- */
.mw-report-toolbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.mw-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 20px 0; }
.mw-kpi { background: var(--mw-surface); border: 1px solid var(--mw-border); border-radius: var(--mw-radius); padding: 18px; box-shadow: var(--mw-shadow); animation: mw-rise 0.5s var(--mw-ease) both; }
.mw-kpi small { color: var(--mw-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
.mw-kpi b { display: block; font-size: 26px; font-weight: 800; margin-top: 4px; }
.mw-kpi i { float: right; font-size: 20px; color: var(--mw-primary); }
.mw-seg { display: inline-flex; background: var(--mw-surface-2); border: 1px solid var(--mw-border); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.mw-seg button { border: 0; background: transparent; color: var(--mw-muted); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.mw-seg button.on { background: var(--mw-surface); color: var(--mw-primary); box-shadow: var(--mw-shadow); }
.mw-bar-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.mw-bar-cell span.track { flex: 1; height: 6px; border-radius: 6px; background: var(--mw-border); overflow: hidden; }
.mw-bar-cell span.fill { display: block; height: 100%; background: var(--mw-grad); border-radius: 6px; }

/* ---------- Dark-mode fixes for template colours ---------- */
html[data-theme="dark"] body .bg-white, html[data-theme="dark"] body .card-body,
html[data-theme="dark"] body .card-header, html[data-theme="dark"] body .list-group-item { background: transparent !important; color: var(--mw-text); }
html[data-theme="dark"] body .card-header { border-color: var(--mw-border); }
html[data-theme="dark"] body .text-dark, html[data-theme="dark"] body strong, html[data-theme="dark"] body b { color: var(--mw-text) !important; }
html[data-theme="dark"] body .bg-light, html[data-theme="dark"] body [style*="background-color: #f"],
html[data-theme="dark"] body [style*="background: #f"], html[data-theme="dark"] body [style*="background-color:#f"],
html[data-theme="dark"] body [style*="background: white"], html[data-theme="dark"] body [style*="background-color: white"],
html[data-theme="dark"] body [style*="background: #fff"], html[data-theme="dark"] body [style*="background-color: #fff"] {
  background: var(--mw-surface-2) !important; color: var(--mw-text) !important;
}
html[data-theme="dark"] body hr { border-color: var(--mw-border); }
html[data-theme="dark"] body .table-striped tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, 0.02); }

/* ---------- Animations ---------- */
@keyframes mw-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mw-pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes mw-spin { to { transform: rotate(360deg); } }
@keyframes mw-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.92); } }
@keyframes mw-shimmer { to { background-position: -200% 0; } }
@keyframes mw-float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(0.95); } }
@keyframes mw-sheen { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes mw-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }
.mw-count { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .mw-panel, .mw-panel.wide, .mw-panel.narrow { grid-column: span 12; }
}
@media (max-width: 767px) {
  body .main-container .pd-ltr-20 { padding: 16px 12px !important; }
  body .dataTables_wrapper { padding: 0 8px; }
  body .dataTables_wrapper .dataTables_filter, body .dataTables_wrapper .dataTables_length { text-align: left !important; float: none !important; }
  body .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin-left: 0 !important; }
  body .button-row .btn { flex: 1 1 auto; }
  body .stat-card h3 { font-size: 24px; }
  body.login-page .login-box { padding: 28px 22px !important; border-radius: 20px !important; }
  .mw-profile-hero { flex-direction: column; text-align: center; }
  .mw-swatches { justify-content: center; }
  .mw-footer { justify-content: center; text-align: center; }
  .mw-theme-toggle { margin-right: 8px; width: 36px; height: 36px; }
  body .header .user-name { display: none; }
  .mw-dash-grid { gap: 14px; }
  .mw-panel { padding: 14px; }
}

/* login layout refinements */
body.login-page .login-wrap { flex-direction: column; }
body.login-page .login-wrap > .container { max-width: 480px; }
body.login-page .login-wrap .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
body.login-page .login-title h2, body.login-page .login-title .text-primary { color: var(--mw-text) !important; }
body.login-page .login-header .brand-logo img { max-height: 34px; }
body.login-page .mw-footer { width: 100%; margin: 18px 0 0; }

/* charts: keep panel surface behind ApexCharts in both themes */
body .apexcharts-canvas, body .apexcharts-canvas.apexcharts-theme-dark { background: transparent !important; }
/* static (non-spinning) brand mark in the footer */
.mw-footer .mw-mark { animation: mw-flow 6s ease-in-out infinite; box-shadow: none; }
.mw-footer .mw-mark::before { display: none; }

/* table + filter polish */
body .dataTables_scrollBody { border-bottom: 1px solid var(--mw-border) !important; }
body .dataTables_scrollHead { border-radius: 10px 10px 0 0; }
body td.dataTables_empty { background: transparent !important; color: var(--mw-muted); padding: 30px !important; }
body .card-box > .pd-20.row { row-gap: 14px; margin: 0; }
body .card-box > .pd-20.row > [class*="col-"] { padding-left: 7px; padding-right: 7px; }

@keyframes mw-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes mw-float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes mw-ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes mw-gloss { 0%, 30% { background-position: 150% 0; } 70%, 100% { background-position: -60% 0; } }

/* ================= Dark mode: tables & page-specific light boxes ================= */
html[data-theme="dark"] body table.dataTable.display tbody tr.odd,
html[data-theme="dark"] body table.dataTable.display tbody tr.even,
html[data-theme="dark"] body table.dataTable.stripe tbody tr.odd,
html[data-theme="dark"] body table.dataTable tbody tr,
html[data-theme="dark"] body table.dataTable tbody tr > * { background: transparent !important; box-shadow: none !important; color: var(--mw-text) !important; }
html[data-theme="dark"] body table.dataTable.display tbody tr.odd > * { background: rgba(255, 255, 255, 0.025) !important; }
html[data-theme="dark"] body table.dataTable.display tbody tr:hover > *,
html[data-theme="dark"] body table.dataTable.hover tbody tr:hover > * { background: var(--mw-primary-soft) !important; }
html body table.dataTable.display tbody tr.odd, html body table.dataTable.stripe tbody tr.odd { background: var(--mw-surface-2) !important; }
html body table.dataTable.display tbody tr:hover > *, html body table.dataTable.hover tbody tr:hover > * { background: var(--mw-primary-soft) !important; }
html[data-theme="dark"] body table.dataTable td, html[data-theme="dark"] body table.dataTable th { border-color: var(--mw-border) !important; }
html[data-theme="dark"] body select option, html[data-theme="dark"] body select optgroup { background: var(--mw-surface); color: var(--mw-text); }
html[data-theme="dark"] body table select.form-control, html[data-theme="dark"] body table select { background: var(--mw-surface-2) !important; color: var(--mw-text) !important; border-color: var(--mw-border) !important; }
html[data-theme="dark"] body .dataTables_wrapper label, html[data-theme="dark"] body .dataTables_wrapper .dataTables_info { color: var(--mw-muted) !important; }
html[data-theme="dark"] body .mw-dk-bg:not(#mw-x) { background-color: var(--mw-surface-2) !important; border-color: var(--mw-border) !important; }
html[data-theme="dark"] body .mw-dk-fg:not(#mw-x) { color: var(--mw-text) !important; }
html[data-theme="dark"] body .mw-dk-muted:not(#mw-x) { color: var(--mw-muted) !important; }
html[data-theme="dark"] body .modal-body, html[data-theme="dark"] body .modal-title { color: var(--mw-text); }
html[data-theme="dark"] body input:-webkit-autofill { -webkit-text-fill-color: var(--mw-text); -webkit-box-shadow: 0 0 0 40px var(--mw-surface) inset !important; }

/* ================= Popups (SweetAlert2) ================= */
body .swal2-container.swal2-backdrop-show { background: rgba(15, 23, 42, 0.45) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body .swal2-popup {
  width: min(420px, 92vw) !important; padding: 34px 28px 26px !important; border-radius: 24px !important;
  background: var(--mw-surface) !important; color: var(--mw-text) !important;
  border: 1px solid var(--mw-border); box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25) !important;
  font-family: "Inter", sans-serif !important; overflow: hidden;
}
body .swal2-popup::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--mw-grad); }
body .swal2-popup.swal2-show { animation: mw-swal-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important; }
body .swal2-popup.swal2-hide { animation: mw-swal-out 0.2s ease-in forwards !important; }
body .swal2-title { font-size: 21px !important; font-weight: 800 !important; color: var(--mw-text) !important; padding: 6px 0 0 !important; letter-spacing: -0.01em; }
body .swal2-html-container { font-size: 14.5px !important; color: var(--mw-muted) !important; margin-top: 8px !important; }
body .swal2-icon { width: 64px !important; height: 64px !important; margin: 4px auto 12px !important; border-width: 0 !important; border-radius: 20px !important; }
body .swal2-icon .swal2-icon-content { font-size: 34px !important; font-weight: 800; }
body .swal2-icon.swal2-success { background: rgba(16, 185, 129, 0.12); }
body .swal2-icon.swal2-error { background: rgba(239, 68, 68, 0.12); }
body .swal2-icon.swal2-warning { background: rgba(245, 158, 11, 0.14); color: #d97706 !important; }
body .swal2-icon.swal2-info, body .swal2-icon.swal2-question { background: var(--mw-primary-soft); color: var(--mw-primary) !important; }
body .swal2-icon.swal2-success .swal2-success-ring, body .swal2-icon.swal2-success [class^="swal2-success-circular-line"],
body .swal2-icon.swal2-success .swal2-success-fix { display: none !important; }
body .swal2-icon.swal2-success [class^="swal2-success-line"] { background-color: #10b981 !important; height: 5px !important; }
body .swal2-icon.swal2-success .swal2-success-line-tip { top: 34px !important; left: 12px !important; width: 18px !important; }
body .swal2-icon.swal2-success .swal2-success-line-long { top: 29px !important; right: 9px !important; width: 34px !important; }
body .swal2-icon.swal2-error [class^="swal2-x-mark-line"] { background-color: #ef4444 !important; height: 5px !important; top: 30px !important; width: 36px !important; left: 14px !important; }
body .swal2-icon.swal2-error [class^="swal2-x-mark-line"][class$="right"] { right: 14px !important; left: auto !important; }
body .swal2-actions { gap: 10px; margin-top: 22px !important; }
body .swal2-styled { margin: 0 !important; border-radius: 12px !important; padding: 11px 22px !important; font-weight: 700 !important; font-size: 14px !important; box-shadow: none !important; transition: transform 0.2s, filter 0.2s; }
body .swal2-styled:hover { transform: translateY(-1px); filter: brightness(1.06); }
body .swal2-styled.swal2-confirm { background: var(--mw-grad) !important; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3) !important; }
body .swal2-styled.swal2-cancel, body .swal2-styled.swal2-deny { background: var(--mw-surface-2) !important; color: var(--mw-text) !important; border: 1px solid var(--mw-border) !important; }
body .swal2-styled.swal2-deny { color: #dc2626 !important; }
body .swal2-timer-progress-bar { background: var(--mw-grad) !important; height: 3px; }
body .swal2-input, body .swal2-textarea, body .swal2-select { border-radius: 12px !important; border: 1px solid var(--mw-border) !important; background: var(--mw-surface) !important; color: var(--mw-text) !important; box-shadow: none !important; }
body .swal2-input:focus, body .swal2-textarea:focus { border-color: var(--mw-primary) !important; box-shadow: 0 0 0 4px var(--mw-primary-soft) !important; }
body .swal2-validation-message { background: rgba(239, 68, 68, 0.08) !important; color: #dc2626 !important; border-radius: 10px; font-size: 13px; }
body .swal2-close { color: var(--mw-muted) !important; border-radius: 10px; }
@keyframes mw-swal-in { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes mw-swal-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ================= Toasts (toastr) ================= */
body #toast-container { z-index: 3000; }
body #toast-container > div {
  width: 340px !important; max-width: 92vw; padding: 14px 16px 14px 58px !important; border-radius: 16px !important; opacity: 1 !important;
  background-color: var(--mw-surface) !important; color: var(--mw-text) !important; border: 1px solid var(--mw-border);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18) !important; background-position: 18px center !important; background-size: 0 !important;
  position: relative; overflow: hidden; animation: mw-toast-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
body #toast-container > div::before {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-family: "bootstrap-icons"; font-size: 17px;
}
body #toast-container > .toast-success::before { content: "\F26A"; background: rgba(16, 185, 129, 0.14); color: #059669; }
body #toast-container > .toast-error::before { content: "\F622"; background: rgba(239, 68, 68, 0.14); color: #dc2626; }
body #toast-container > .toast-warning::before { content: "\F33A"; background: rgba(245, 158, 11, 0.16); color: #d97706; }
body #toast-container > .toast-info::before { content: "\F430"; background: var(--mw-primary-soft); color: var(--mw-primary); }
body #toast-container > div::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
body #toast-container > .toast-success::after { background: #10b981; }
body #toast-container > .toast-error::after { background: #ef4444; }
body #toast-container > .toast-warning::after { background: #f59e0b; }
body #toast-container > .toast-info::after { background: var(--mw-primary); }
body #toast-container .toast-title { font-weight: 700; font-size: 14px; color: var(--mw-text); }
body #toast-container .toast-message { font-size: 13.5px; color: var(--mw-muted); }
body #toast-container .toast-close-button { color: var(--mw-muted); text-shadow: none; opacity: 0.7; }
body #toast-container .toast-progress { background: var(--mw-grad); opacity: 0.9; height: 3px; }
@keyframes mw-toast-in { from { opacity: 0; transform: translateX(24px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ================= Inline field validation (replaces browser bubbles) ================= */
body .mw-invalid, body .mw-invalid:focus { border-color: #ef4444 !important; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important; animation: mw-shake 0.35s; }
.mw-field-msg { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #dc2626; animation: mw-rise 0.25s var(--mw-ease); }
.mw-field-msg::before { content: "\F333"; font-family: "bootstrap-icons"; }
@keyframes mw-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* DataTables pager (plain a.paginate_button variant) */
body .dataTables_wrapper .dataTables_paginate a.paginate_button:not(#mw-x) {
  color: var(--mw-text) !important; background: var(--mw-surface) !important; border: 1px solid var(--mw-border) !important;
  border-radius: 9px !important; padding: 6px 12px !important; margin: 0 3px; min-width: 36px;
}
body .dataTables_wrapper .dataTables_paginate a.paginate_button.current:not(#mw-x) { background: var(--mw-grad) !important; color: #fff !important; border-color: transparent !important; }
body .dataTables_wrapper .dataTables_paginate a.paginate_button:hover:not(.disabled):not(.current):not(#mw-x) { background: var(--mw-primary-soft) !important; color: var(--mw-primary) !important; }
body .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:not(#mw-x) { opacity: 0.45; }

/* ================= Activity History timeline ================= */
body ul.mw-tl-host { padding: 0 !important; margin: 0 !important; list-style: none; }
body ul.mw-tl-host > li.mw-tl-root { background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0 !important; list-style: none; }
.mw-avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.mw-avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.mw-avatar-unknown { background: var(--mw-surface-2) !important; color: var(--mw-muted) !important; border: 1px dashed var(--mw-border); font-size: 15px !important; }
.mw-tl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mw-tl-stats { font-size: 13px; color: var(--mw-muted); }
.mw-tl-stats b { color: var(--mw-text); }
.mw-tl-order button { padding: 5px 10px; font-size: 12px; }
.mw-tl-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mw-tl-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--mw-surface-2); border: 1px solid var(--mw-border); font-size: 12.5px; font-weight: 600; color: var(--mw-text); }
.mw-tl-person small { color: var(--mw-muted); font-weight: 500; }
ol.mw-tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
ol.mw-tl::before { content: ""; position: absolute; left: 20px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--mw-primary-soft), var(--mw-border)); border-radius: 2px; }
body ol.mw-tl > li.mw-tl-item { position: relative; display: flex; gap: 12px; margin: 0 0 14px !important; padding: 0 !important; background: transparent !important; border: 0 !important; animation: mw-rise 0.35s var(--mw-ease) both; }
.mw-tl-dot { position: relative; z-index: 1; flex-shrink: 0; }
.mw-tl-dot .mw-avatar { box-shadow: 0 0 0 4px var(--mw-surface); }
.mw-tl-card { flex: 1; min-width: 0; background: var(--mw-surface) !important; border: 1px solid var(--mw-border); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); transition: box-shadow 0.2s, border-color 0.2s; }
.mw-tl-card:hover { border-color: color-mix(in srgb, var(--mw-primary) 35%, var(--mw-border)); box-shadow: var(--mw-shadow); }
.mw-tl-item.unknown .mw-tl-card { border-style: dashed; }
.mw-tl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mw-tl-by { font-size: 13.5px; color: var(--mw-muted); line-height: 1.5; }
.mw-tl-by b { color: var(--mw-text); font-weight: 700; }
.mw-tl-num { display: inline-block; font-size: 11px; font-weight: 700; color: var(--mw-primary); background: var(--mw-primary-soft); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.mw-tl-role { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(6, 182, 212, 0.12); color: #0891b2; margin-left: 2px; }
.mw-tl-role.muted { background: var(--mw-surface-2); color: var(--mw-muted); border: 1px solid var(--mw-border); cursor: help; }
.mw-tl-top time { font-size: 12px; color: var(--mw-muted); white-space: nowrap; }
.mw-tl-text { margin: 8px 0 10px; font-size: 14.5px; line-height: 1.55; color: var(--mw-text); white-space: normal; word-break: break-word; background: var(--mw-surface-2); border-radius: 10px; padding: 10px 12px; }
.mw-tl-text.empty { color: var(--mw-muted); font-style: italic; }
.mw-tl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mw-chip-s { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--mw-surface-2); color: var(--mw-muted); border: 1px solid var(--mw-border); }
.mw-chip-s.ok { color: #059669; background: rgba(16, 185, 129, 0.1); border-color: transparent; }
.mw-chip-s.warn { color: #b45309; background: rgba(245, 158, 11, 0.12); border-color: transparent; }
body ol.mw-tl > li.mw-tl-handover { list-style: none; margin: -4px 0 12px !important; padding: 0 0 0 52px !important; background: transparent !important; border: 0 !important; }
.mw-tl-handover span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mw-primary); background: var(--mw-primary-soft); padding: 3px 10px; border-radius: 999px; }
@media (max-width: 575px) {
  .mw-tl-top time { width: 100%; }
  ol.mw-tl::before { left: 17px; }
  .mw-tl-dot .mw-avatar.sm { width: 28px; height: 28px; font-size: 10px; }
}
body .activity-list-container { max-height: min(62vh, 620px) !important; height: auto !important; overflow-y: auto !important; padding: 2px 6px 2px 2px; overscroll-behavior: contain; }
.mw-tl-sticky { position: sticky; top: 0; z-index: 2; background: var(--mw-surface); padding: 2px 0 6px; }
body #activity-history-card { max-height: none !important; height: auto !important; overflow: visible !important; display: flex; flex-direction: column; }
body #activity-history-card .activity-list-container { flex: 1; }
.mw-tl-role.likely { background: rgba(245, 158, 11, 0.12); color: #b45309; cursor: help; }
html[data-theme="dark"] .mw-tl-role.likely { color: #fbbf24; }
.mw-tl-item.likely .mw-tl-card { border-style: dashed; }
