/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --color-primary:        #5045e6;
  --color-primary-hover:  #3b30d4;
  --color-primary-light:  #ede9fe;
  --color-sidebar-bg:     #252d4f;
  --color-page-bg:        #f0f4f8;
  --color-card-bg:        #fdfdfd;
  --color-active:         #2fb344;
  --color-paused:         #f76707;
  --color-waiting:        #5045e6;
  --color-offline:        #94a3b8;
  --color-error:          #d63939;
  --color-text-primary:   #0d0d0d;
  --color-text-muted:     #858585;
  --color-border:         #e2e8f0;
}

/* ─── Base ───────────────────────────────────────────────────── */
body {
  background-color: var(--color-page-bg);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
}

/* Thin overlay-style scrollbars — no reserved gutter space */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.30); }
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.18) transparent; }

/* ─── Sidebar ────────────────────────────────────────────────── */
.navbar-vertical {
  border-right: 1px solid rgba(255,255,255,.06) !important;
  background: var(--color-sidebar-bg) !important;
  overflow-y: auto !important;   /* Tabler forces scroll; auto removes the empty gutter */
}
.navbar-brand-text { line-height: 1.2; }

/* ── Sidebar brand bar ────────────────────────────────────────── */
.navbar-vertical .navbar-brand {
  height: 60px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  margin: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.04);
  text-decoration: none;
}

.sidebar-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary), #7c6ef0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(80,69,230,.4);
}

.navbar-brand .app-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
.navbar-brand .app-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
}

/* ── 4. Icon glow on active nav item ─────────────────────────── */
.navbar-vertical .nav-link.active .nav-link-icon {
  color: #a89df8;
}

/* Nav links */
.navbar-vertical .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 6px;
  margin: 1px 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.6) !important;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.navbar-vertical .nav-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9) !important;
}
.navbar-vertical .nav-link.active {
  background: rgba(80,69,230,.22) !important;
  color: #fff !important;
  border-left-color: var(--color-primary);
}
.navbar-vertical .nav-link .nav-link-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Sidebar user footer */
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .user-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
}
.sidebar-user .user-role {
  font-size: 10px;
  color: rgba(255,255,255,.4);
  letter-spacing: .04em;
}

/* ── Main topbar ──────────────────────────────────────────────── */
.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  width: 100%;
  height: 60px;
  flex-shrink: 0;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 8px rgba(15,23,42,.07);
}

.topbar-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.topbar-title-wrap { min-width: 0; }
.topbar-pretitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1;
  margin-bottom: 2px;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── User menu pill ───────────────────────────────────────────── */
.topbar-right { flex-shrink: 0; }

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--color-border);
  border-radius: 40px;
  background: var(--color-card-bg);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.topbar-user-btn::after { display: none; } /* remove BS caret */
.topbar-user-btn:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  background: #fff;
}
.topbar-user-btn[aria-expanded="true"] {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7c6ef0);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-user-text { line-height: 1.2; text-align: left; }
.topbar-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.topbar-user-role {
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: .02em;
}
.topbar-chevron {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-left: 2px;
}

/* ── User dropdown menu ───────────────────────────────────────── */
.topbar-dropdown {
  min-width: 220px;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(15,23,42,.14);
  border-radius: 12px;
  margin-top: 8px;
  padding: 6px;
  overflow: hidden;
}
.topbar-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
}
.topbar-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7c6ef0);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}
.topbar-dropdown-email {
  font-size: 11px;
  color: var(--color-text-muted);
}
.topbar-dropdown-signout {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #e03333 !important;
  padding: 7px 10px;
}
.topbar-dropdown-signout:hover {
  background: #fff1f1;
}

/* ── Action bar ───────────────────────────────────────────────── */
.actionbar {
  position: sticky;
  top: 60px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  transition: max-height .25s ease;
  max-height: 64px;
}
.actionbar-body {
  flex: 1;
  min-width: 0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  overflow: hidden;
  transition: opacity .2s ease;
}
.actionbar-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: background .15s, color .15s, border-color .15s;
}
.actionbar-toggle:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Collapsed state */
.actionbar--collapsed {
  max-height: 0;
  border-bottom-color: transparent;
}
.actionbar--collapsed .actionbar-body {
  opacity: 0;
  pointer-events: none;
}
.actionbar--collapsed .actionbar-toggle {
  /* Button floats outside the collapsed bar via fixed positioning */
}

/* Collapsed toggle floats below the topbar */
.actionbar--collapsed {
  max-height: 0;
  overflow: visible;
  border-bottom: none;
}
.actionbar--collapsed .actionbar-toggle {
  position: absolute;
  right: 16px;
  top: 68px;
  z-index: 150;
  background: var(--color-card-bg);
  box-shadow: 0 2px 8px rgba(15,23,42,.12);
  border-color: var(--color-border);
}

/* Actionbar form control sizing */
.actionbar-search { width: 240px; flex-shrink: 0; }
.actionbar-search .form-control { height: 36px; }
.actionbar-search .input-group-text { height: 36px; }
.actionbar-select { width: auto; min-width: 130px; height: 36px; }

/* ─── Page layout ────────────────────────────────────────────── */
.page-body { padding-top: 1.5rem; padding-bottom: 2rem; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding: 14px 20px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}
.card-body { padding: 20px; }
.card-footer {
  background: transparent;
  border-top: 1px solid var(--color-border);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-responsive { border-radius: 0 0 10px 10px; }
.table { margin: 0; }
.table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border) !important;
  padding: 10px 16px;
  white-space: nowrap;
}
.table td {
  font-size: 13.5px;
  vertical-align: middle;
  color: var(--color-text-primary);
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover td {
  background: #f8fafc;
}
.table th a.text-reset {
  color: var(--color-text-muted) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.table th a.text-reset:hover { color: var(--color-text-primary) !important; }

/* ─── Status Badges ──────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-active  { background: #dcfce7; color: #15803d; }
.badge-active::before  { background: #22c55e; }
.badge-paused  { background: #fff7ed; color: #c2410c; }
.badge-paused::before  { background: var(--color-paused); }
.badge-waiting { background: #dbeafe; color: #1d4ed8; }
.badge-waiting::before { background: var(--color-waiting); }
.badge-offline { background: #f1f5f9; color: #64748b; }
.badge-offline::before { background: var(--color-offline); }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-error::before   { background: var(--color-error); }

/* Apply status-badge mixin to all badge classes */
.badge-active, .badge-paused, .badge-waiting, .badge-offline, .badge-error {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}
.stat-card-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon-blue   { background: linear-gradient(135deg, #5045e6, #7c6ef0); color: #fff; }
.stat-icon-green  { background: linear-gradient(135deg, #2fb344, #52c76e); color: #fff; }
.stat-icon-orange { background: linear-gradient(135deg, #ff9d75, #ffb296); color: #fff; }
.stat-icon-purple { background: linear-gradient(135deg, #50c3d5, #6ed6e4); color: #fff; }

/* Stat card gradient top accent */
.card:has(.stat-icon-blue)   { border-top: 3px solid #5045e6; }
.card:has(.stat-icon-green)  { border-top: 3px solid #2fb344; }
.card:has(.stat-icon-orange) { border-top: 3px solid #ff9d75; }
.card:has(.stat-icon-purple) { border-top: 3px solid #50c3d5; }

/* ─── Avatars ────────────────────────────────────────────────── */
.agent-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ─── Filters ────────────────────────────────────────────────── */
.filter-card .card-body { padding: 14px 16px; }
.filter-input-wrap { position: relative; }
.filter-input-wrap .ti {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 15px;
  pointer-events: none;
}
.filter-input-wrap input { padding-left: 34px; }
.form-control, .form-select {
  border-color: var(--color-border);
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--color-text-primary);
  background: #fff;
  height: 38px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(32,107,196,.12);
}
.input-group-text {
  border-color: var(--color-border);
  background: #f8fafc;
  color: var(--color-text-muted);
  border-radius: 7px 0 0 7px;
}
.input-group .form-control { border-radius: 0 7px 7px 0; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 7px;
  padding: 6px 14px;
  min-height: 36px;
}
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(80, 69, 230, .35);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 4px 18px rgba(80, 69, 230, .5);
}
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }

/* ─── HTMX loading indicator ─────────────────────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

/* ─── Live badge ─────────────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.live-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
  border-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 6px !important;
  margin: 0 2px;
}
.pagination .page-item.active .page-link {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ─── Empty state ────────────────────────────────────────────── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}
.empty-state .ti {
  font-size: 40px;
  color: var(--color-border);
  display: block;
  margin-bottom: 12px;
}
.empty-state p { color: var(--color-text-muted); font-size: 14px; }

/* ── 2. Pulsing dot on active (on-call) badges ───────────────── */
.badge-active::before {
  animation: pulse 1.5s infinite;
}

/* ── 3. Tabulator theme overrides ────────────────────────────── */
.tabulator {
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  background: transparent;
}
.tabulator .tabulator-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}
.tabulator .tabulator-header .tabulator-col {
  background: #f8fafc;
  border-right: 1px solid var(--color-border);
  padding: 2px 8px;
  border-bottom: 2px solid var(--color-border);
}
.tabulator .tabulator-header .tabulator-col:hover {
  background: var(--color-primary-light);
}
.tabulator .tabulator-header .tabulator-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
}
.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {
  color: var(--color-text-primary);
}
.tabulator-col-sorter-element { color: var(--color-primary); opacity: .5; }
.tabulator .tabulator-header .tabulator-col[aria-sort="ascending"] .tabulator-col-sorter-element,
.tabulator .tabulator-header .tabulator-col[aria-sort="descending"] .tabulator-col-sorter-element {
  opacity: 1;
  color: var(--color-primary);
}
.tabulator .tabulator-row {
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.tabulator .tabulator-row:last-child { border-bottom: none; }
.tabulator .tabulator-row:hover { background: #f8fafc; }
.tabulator .tabulator-row .tabulator-cell {
  padding: 3px 6px 0;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 12.5px;
  display: inline-flex !important;
  align-items: center;
  overflow: hidden;
}
.tabulator .tabulator-placeholder-contents { color: var(--color-text-muted); }
.tabulator-col-sorter { color: var(--color-text-muted); }

/* Tabulator action icon button */
.action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 15px;
  transition: background .15s, color .15s;
}
.action-icon-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Compact badges inside Tabulator rows */
.tabulator .tabulator-row .tabulator-cell .badge {
  padding: 1px 7px;
  font-size: 11px;
  gap: 4px;
}
.tabulator .tabulator-row .tabulator-cell .badge::before {
  width: 5px;
  height: 5px;
}

/* ─── Mobile hamburger button (shown only on mobile) ─────────── */
.topbar-hamburger {
  display: none;   /* hidden on desktop */
  align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  border-radius: 8px; color: var(--color-text-muted);
  margin-right: 4px;
  transition: background .12s, color .12s;
}
.topbar-hamburger:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ─── Sidebar overlay backdrop ───────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 399;
}
.nav-overlay.open { display: block; }

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .page-header { padding: 16px 0 12px; }
  .page-title  { font-size: 1.15rem; }
  .stat-card-value { font-size: 1.6rem; }
  .card-body { padding: 16px; }
  .table td, .table th { padding: 10px 12px; }

  /* ── Sidebar: entire <aside> slides in from left (staff-portal pattern) ──
     No Bootstrap collapse involved — the whole aside is the drawer.
     Nav links are always visible inside it once the aside slides in. */
  .navbar-vertical {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    width: 260px !important;
    background: var(--color-sidebar-bg) !important;
    overflow-y: auto !important;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 400 !important;
  }
  .navbar-vertical.open {
    transform: translateX(0);
  }
  /* Always show nav links inside the drawer (bypass Bootstrap collapse) */
  #sidebar-menu {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  /* Hide Bootstrap's own toggler — we use .topbar-hamburger instead */
  .navbar-toggler { display: none !important; }
  /* Mobile user avatar chip in the aside header — not needed, hide it */
  .navbar-nav.flex-row.d-lg-none { display: none !important; }

  /* Content takes full width — sidebar is an overlay */
  .page-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    overflow-x: hidden;
  }

  /* Show hamburger in topbar */
  .topbar-hamburger { display: flex !important; }

  /* Lock page scroll while drawer is open */
  body.sidebar-open { overflow: hidden !important; }

  /* Topbar padding tighter on mobile */
  .topbar { padding: 0 12px; }
  .topbar-title { font-size: 14px; }

  /* Page body scrollable on mobile */
  .page-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* ─── Audio Store summary cards ───────────────────────────────── */
.page-body .row-deck .card-body {
  padding: 12px 16px;
}
.page-body .row-deck .display-6 {
  font-size: 1.8rem;
  margin-bottom: 0;
}
.page-body .row-deck .text-muted {
  font-size: 12px;
  margin-bottom: 8px;
}

/* ─── Audio Store table column sizing ─────────────────────────── */
.card-table th:nth-child(7),
.card-table td:nth-child(7) {
  width: 90px;
  text-align: center;
}
.card-table th:nth-child(7) { white-space: nowrap; }

@media (max-width: 575.98px) {
  .page-title { font-size: 1.05rem; }
  .stat-card-value { font-size: 1.4rem; }
  .card-body { padding: 14px; }
  .btn { min-height: 44px; padding: 10px 16px; }  /* touch target */
  .btn-sm { min-height: 36px; }
  .form-control, .form-select { height: 44px; font-size: 16px; } /* prevent iOS zoom */
}

/* ─── Global app footer ────────────────────────────────────────── */
.app-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 36px;
  background: #fff;
  background: var(--tblr-card-bg, #fff);
  border-top: 1px solid var(--tblr-border-color);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  font-size: 12px; color: var(--tblr-muted);
  z-index: 200;
  box-shadow: 0 -2px 8px rgba(0,0,0,.04);
}
.app-footer-brand {
  display: flex; align-items: center; gap: 6px;
}
.app-footer-brand i { font-size: 14px; color: var(--color-primary); }
.app-footer-brand strong { color: var(--tblr-body-color); font-size: 12px; }
.app-footer-sep { color: var(--tblr-border-color); margin: 0 2px; }
.app-footer-user { display: flex; align-items: center; gap: 5px; }
body { padding-bottom: 36px; }

/* ─── App footer layout ────────────────────────────────────────── */
.app-footer {
  display: flex; align-items: center;
  gap: 16px;
}
.app-footer-center {
  flex: 1; display: flex; justify-content: center; align-items: center;
}
.app-footer-right {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.app-footer-user { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tblr-muted); }

/* ─── Workflow builder footer slots ────────────────────────────── */
.app-footer-wf-name {
  font-weight: 600; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 240px;
}
.app-footer-wf-meta { font-size: 11px; color: var(--tblr-muted); }
@media (max-width: 991.98px) {
  .app-footer-wf-name { display: none; }
}
