/* ═══════════════════════════════════════════════════════════════════
   PING V3 — TASK TEMPLATES PREMIUM REDESIGN  |  May 2026
   Reference: Clean two-panel layout — Departments | Main Tasks + KPIs
   Load order: LAST stylesheet → wins all specificity conflicts
   ═══════════════════════════════════════════════════════════════════ */

/* ─── GOOGLE FONTS ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  --tt-white:       #ffffff;
  --tt-bg:          #f7f8fc;
  --tt-border:      #e8edf3;
  --tt-border-2:    #d4dce8;
  --tt-text:        #1a2640;
  --tt-sub:         #5a6a80;
  --tt-muted:       #8a9ab0;
  --tt-brand:       #0cc8a8;
  --tt-brand-dk:    #09a98e;
  --tt-brand-bg:    #eafaf7;
  --tt-blue:        #3b82f6;
  --tt-blue-bg:     #eff6ff;
  --tt-purple:      #8b5cf6;
  --tt-purple-bg:   #f5f3ff;
  --tt-orange:      #f59e0b;
  --tt-orange-bg:   #fffbeb;
  --tt-radius-sm:   6px;
  --tt-radius:      12px;
  --tt-font:        "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --tt-shadow:      0 4px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
}

/* ══════════════════════════════════════════════════════════════════
   BODY / CONTENT AREA
   ══════════════════════════════════════════════════════════════════ */
body.mttp-active .content-area {
  background: var(--tt-bg) !important;
  font-family: var(--tt-font) !important;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE ROOT
   ══════════════════════════════════════════════════════════════════ */
#mttp-root {
  font-family: var(--tt-font) !important;
  color: var(--tt-text) !important;
  padding: 20px 24px !important;
}

.mttp-page {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  min-height: unset !important;
}

/* ══════════════════════════════════════════════════════════════════
   TOP HEADER BAR
   ══════════════════════════════════════════════════════════════════ */
.mttp-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 0 4px !important;
  gap: 16px !important;
  grid-template-columns: unset !important;
  position: static !important;
}
.mttp-header::before { display: none !important; }

/* Title group */
.mttp-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  min-width: 0 !important;
  flex-wrap: wrap !important;
}

.mttp-title a {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--tt-brand-dk) !important;
  background: var(--tt-brand-bg) !important;
  border: 1px solid #b2ece2 !important;
  border-radius: var(--tt-radius-sm) !important;
  text-decoration: none !important;
  transition: background 0.15s !important;
  min-height: unset !important;
}
.mttp-title a:hover { background: #d0f5ee !important; }

.mttp-title h1 {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--tt-text) !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* Subtitle injected by JS */
.mttp-subtitle {
  font-size: 12.5px !important;
  color: var(--tt-sub) !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  align-self: center !important;
}

/* ─── HIDE: Global KPI stats tiles from header ──────────────────── */
.mttp-stats,
.mttp-header .mttp-stats {
  display: none !important;
}

/* ─── HIDE: Old inline mini-metrics text row ─────────────────────── */
/* This is "15 total | 0 statutory | 15 internal" text above search */
.mttp-mini-metrics,
.mttp-panel-tasks .mttp-mini-metrics,
#mttp-root .mttp-mini-metrics {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ─── ACTION BUTTONS ─────────────────────────────────────────────── */
.mttp-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.mttp-page button {
  font-family: var(--tt-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: var(--tt-radius-sm) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* "Add Department" — secondary outline */
.mttp-actions button.mttp-secondary {
  background: var(--tt-white) !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-border-2) !important;
  padding: 9px 16px !important;
  min-height: 38px !important;
  box-shadow: none !important;
}
.mttp-actions button.mttp-secondary:hover {
  background: var(--tt-bg) !important;
  border-color: #b0bdd0 !important;
}

/* "+ Add Main Task" — teal primary */
.mttp-actions button:not(.mttp-secondary) {
  background: var(--tt-brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--tt-brand) !important;
  padding: 9px 18px !important;
  min-height: 38px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(12, 200, 168, 0.35) !important;
}
.mttp-actions button:not(.mttp-secondary):hover:not(:disabled) {
  background: var(--tt-brand-dk) !important;
  border-color: var(--tt-brand-dk) !important;
  box-shadow: 0 3px 12px rgba(12, 200, 168, 0.45) !important;
  transform: translateY(-1px) !important;
}
.mttp-actions button:not(.mttp-secondary):disabled {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   WORKSPACE — strict 2-column, hide third panel
   ══════════════════════════════════════════════════════════════════ */
.mttp-workspace {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  gap: 20px !important;
  align-items: start !important;
  min-height: unset !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* HIDE third detail panel completely */
.mttp-detail,
.mttp-panel.mttp-detail,
aside.mttp-panel.mttp-detail {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   PANELS
   ══════════════════════════════════════════════════════════════════ */
.mttp-panel {
  background: var(--tt-white) !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: var(--tt-radius) !important;
  box-shadow: var(--tt-shadow) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ─── PANEL HEADER ───────────────────────────────────────────────── */
.mttp-panel-head {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 16px 16px 12px !important;
  border-bottom: 1px solid var(--tt-border) !important;
  background: var(--tt-white) !important;
  flex-shrink: 0 !important;
}

/* Inner header row (icon + title) */
.mttp-panel-head > div:not(.mttp-mini-metrics) {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Departments panel icon */
.mttp-panel-departments .mttp-panel-head > div:first-child::before {
  content: "" !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  background: var(--tt-brand-bg) !important;
  flex-shrink: 0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230cc8a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 14px !important;
  display: inline-block !important;
}

.mttp-panel-head h2 {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--tt-text) !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.mttp-panel-head p,
.mttp-panel-head p.mttp-kicker,
.mttp-panel-tasks .mttp-panel-head p {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--tt-sub) !important;
  margin: 0 !important;
  text-transform: none !important;
  display: inline !important;
}

/* ─── SEARCH INPUT ───────────────────────────────────────────────── */
.mttp-panel input[data-search] {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--tt-bg) !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: var(--tt-radius-sm) !important;
  padding: 7px 12px 7px 32px !important;
  font-size: 13px !important;
  font-family: var(--tt-font) !important;
  color: var(--tt-text) !important;
  margin: 0 !important;
  min-height: unset !important;
  height: 34px !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a9ab0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 10px center !important;
}
.mttp-panel input[data-search]::placeholder { color: var(--tt-muted) !important; }
.mttp-panel input[data-search]:focus {
  outline: none !important;
  border-color: var(--tt-brand) !important;
  box-shadow: 0 0 0 3px rgba(12, 200, 168, 0.14) !important;
  background-color: var(--tt-white) !important;
}

/* ══════════════════════════════════════════════════════════════════
   KPI TILES — injected between panel-head and search input by JS
   ══════════════════════════════════════════════════════════════════ */
.mttp-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--tt-border) !important;
  background: var(--tt-white) !important;
  flex-shrink: 0 !important;
}

.mttp-kpi-tile {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  background: var(--tt-bg) !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
}

.mttp-kpi-tile .kpi-num {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  color: var(--tt-text) !important;
}
.mttp-kpi-tile .kpi-lbl {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--tt-sub) !important;
}

.mttp-kpi-tile.kpi-stat    { background: var(--tt-blue-bg);   border-color: #bfdbfe !important; }
.mttp-kpi-tile.kpi-stat  .kpi-num { color: var(--tt-blue)   !important; }
.mttp-kpi-tile.kpi-stat  .kpi-lbl { color: var(--tt-blue)   !important; }

.mttp-kpi-tile.kpi-intern  { background: var(--tt-purple-bg); border-color: #ddd6fe !important; }
.mttp-kpi-tile.kpi-intern .kpi-num { color: var(--tt-purple) !important; }
.mttp-kpi-tile.kpi-intern .kpi-lbl { color: var(--tt-purple) !important; }

.mttp-kpi-tile.kpi-custom  { background: var(--tt-orange-bg); border-color: #fde68a !important; }
.mttp-kpi-tile.kpi-custom .kpi-num { color: var(--tt-orange) !important; }
.mttp-kpi-tile.kpi-custom .kpi-lbl { color: var(--tt-orange) !important; }

/* ══════════════════════════════════════════════════════════════════
   TASKS PANEL — search area (below KPI tiles)
   ══════════════════════════════════════════════════════════════════ */
.mttp-panel-tasks .mttp-panel-head {
  /* Only header — search+kpi are outside via JS injection */
  padding-bottom: 12px !important;
}

/* Wrapper for search bar added by JS */
.mttp-search-wrap {
  padding: 10px 16px 8px !important;
  border-bottom: 1px solid var(--tt-border) !important;
  background: var(--tt-white) !important;
}
.mttp-search-wrap input {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--tt-bg) !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: var(--tt-radius-sm) !important;
  padding: 7px 12px 7px 32px !important;
  font-size: 13px !important;
  font-family: var(--tt-font) !important;
  color: var(--tt-text) !important;
  height: 34px !important;
  outline: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a9ab0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 10px center !important;
  transition: border-color 0.15s !important;
}
.mttp-search-wrap input::placeholder { color: var(--tt-muted) !important; }
.mttp-search-wrap input:focus { border-color: var(--tt-brand) !important; }

/* ══════════════════════════════════════════════════════════════════
   LIST CONTAINERS
   ══════════════════════════════════════════════════════════════════ */
.mttp-list,
.mttp-task-list {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  max-height: calc(100vh - 280px) !important;
}

/* ══════════════════════════════════════════════════════════════════
   DEPARTMENT ROWS
   ══════════════════════════════════════════════════════════════════ */
.mttp-dept {
  /* Override grid layout from pro CSS */
  display: flex !important;
  grid-template-columns: unset !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 9px 14px !important;
  min-height: 48px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  cursor: pointer !important;
  color: var(--tt-text) !important;
  transition: background 0.12s ease !important;
}
.mttp-dept:hover { background: #f5fafd !important; }
.mttp-dept.active {
  background: var(--tt-brand-bg) !important;
  border-left: 3px solid var(--tt-brand) !important;
  padding-left: 11px !important;
}
.mttp-dept:last-child { border-bottom: none !important; }

/* Avatar circle */
.mttp-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  color: #ffffff !important;
  background: var(--tt-brand) !important;
}

/* Per-letter colours */
.mttp-avatar[data-color="teal"]   { background: #0cc8a8 !important; }
.mttp-avatar[data-color="blue"]   { background: #3b82f6 !important; }
.mttp-avatar[data-color="purple"] { background: #8b5cf6 !important; }
.mttp-avatar[data-color="orange"] { background: #f59e0b !important; }
.mttp-avatar[data-color="red"]    { background: #ef4444 !important; }
.mttp-avatar[data-color="pink"]   { background: #ec4899 !important; }
.mttp-avatar[data-color="indigo"] { background: #6366f1 !important; }
.mttp-avatar[data-color="green"]  { background: #10b981 !important; }

/* Name column */
.mttp-dept-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.mttp-dept-copy strong {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--tt-text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}
.mttp-dept-copy small {
  display: none !important;  /* hide the code slug */
}

/* Count */
.mttp-count {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--tt-sub) !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  min-width: unset !important;
}

/* Arrow indicator added by JS */
.mttp-dept-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  color: #c4cdd9 !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
}
.mttp-dept.active .mttp-dept-arrow { color: var(--tt-brand-dk) !important; }

/* ══════════════════════════════════════════════════════════════════
   MAIN TASK ROWS
   ══════════════════════════════════════════════════════════════════ */
.mttp-task {
  display: flex !important;              /* override pro CSS grid */
  grid-template-columns: unset !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 11px 16px !important;
  min-height: 52px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  cursor: pointer !important;
  color: var(--tt-text) !important;
  transition: background 0.12s ease !important;
}
.mttp-task:hover { background: #f5fafd !important; }
.mttp-task.active {
  background: var(--tt-brand-bg) !important;
  border-left: 3px solid var(--tt-brand) !important;
  padding-left: 13px !important;
}
.mttp-task:last-child { border-bottom: none !important; }

/* ── Drag handle: FIXED width, must NOT grow ─────────────────────
   BUG ROOT CAUSE: span:first-child now targets the drag handle
   after we prepend it, giving it flex:1 and stealing all space.
   Explicit flex:0 0 auto prevents this.
   ─────────────────────────────────────────────────────────────── */
.mttp-drag-handle {
  flex: 0 0 auto !important;   /* ← critical: do NOT grow */
  width: 14px !important;
  min-width: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #c8d4e0 !important;
  cursor: grab !important;
  font-size: 13px !important;
  line-height: 1 !important;
  user-select: none !important;
  letter-spacing: 1px !important;
}

/* ── Content span (task name + description) ──────────────────────
   Use :not() to target ONLY the content span, NOT the drag handle
   or the type chip — this survives JS prepend/append.
   ─────────────────────────────────────────────────────────────── */
.mttp-task > span:not(.mttp-drag-handle):not(.mttp-chip) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  flex: 1 1 0% !important;     /* ← takes all remaining space */
  min-width: 0 !important;
  text-align: left !important;
  overflow: hidden !important;
}

/* Task name */
.mttp-task strong {
  display: block !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--tt-text) !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
}

/* Task description */
.mttp-task small {
  display: block !important;
  font-size: 11.5px !important;
  color: var(--tt-sub) !important;
  font-weight: 400 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
}

/* Type badge */
.mttp-chip {
  flex-shrink: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  font-family: var(--tt-font) !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  background: #f0f4f8 !important;
  border: 1px solid var(--tt-border) !important;
  color: var(--tt-sub) !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}
.mttp-chip.statutory {
  background: var(--tt-orange-bg) !important;
  border-color: #fde68a !important;
  color: var(--tt-orange) !important;
}

/* Kebab menu */
.mttp-task-menu {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  color: var(--tt-muted) !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  font-size: 15px !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  min-height: unset !important;
  line-height: 1 !important;
  transition: background 0.12s !important;
}
.mttp-task-menu:hover {
  background: var(--tt-bg) !important;
  color: var(--tt-text) !important;
}

/* ══════════════════════════════════════════════════════════════════
   HIDDEN ROWS
   ══════════════════════════════════════════════════════════════════ */
.mttp-dept.is-hidden,
.mttp-task.is-hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.mttp-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 20px !important;
  color: var(--tt-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: center !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  min-height: 100px !important;
}

/* ══════════════════════════════════════════════════════════════════
   ALERT
   ══════════════════════════════════════════════════════════════════ */
.mttp-alert {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  border-radius: var(--tt-radius) !important;
  color: #9f1239 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
}

/* ══════════════════════════════════════════════════════════════════
   SLIDE-IN DRAWER
   ══════════════════════════════════════════════════════════════════ */
.mttp-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.35) !important;
  z-index: 90 !important;
  backdrop-filter: blur(2px) !important;
}
.mttp-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  height: 100vh !important;
  width: min(460px, 94vw) !important;
  background: var(--tt-white) !important;
  border-left: 1px solid var(--tt-border) !important;
  box-shadow: -20px 0 60px rgba(0,0,0,0.12) !important;
  z-index: 91 !important;
  overflow: auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
.mttp-drawer-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--tt-border) !important;
  position: sticky !important;
  top: 0 !important;
  background: var(--tt-white) !important;
  z-index: 1 !important;
  margin-bottom: 0 !important;
}
.mttp-drawer-head h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--tt-text) !important;
  margin: 0 !important;
}
.mttp-drawer-head button {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--tt-sub) !important;
  background: transparent !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: var(--tt-radius-sm) !important;
  padding: 6px 14px !important;
  min-height: unset !important;
  cursor: pointer !important;
}
.mttp-drawer-head button:hover {
  background: var(--tt-bg) !important;
  color: var(--tt-text) !important;
}
.mttp-form {
  display: grid !important;
  gap: 18px !important;
  padding: 24px !important;
}
.mttp-form label {
  display: grid !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--tt-text) !important;
}
.mttp-form input,
.mttp-form select,
.mttp-form textarea {
  font-family: var(--tt-font) !important;
  font-size: 13px !important;
  color: var(--tt-text) !important;
  background: var(--tt-white) !important;
  border: 1px solid var(--tt-border-2) !important;
  border-radius: 8px !important;
  padding: 10px 13px !important;
  min-height: 40px !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}
.mttp-form input:focus,
.mttp-form select:focus,
.mttp-form textarea:focus {
  border-color: var(--tt-brand) !important;
  box-shadow: 0 0 0 3px rgba(12, 200, 168, 0.15) !important;
}
.mttp-form textarea { resize: vertical !important; }
.mttp-switch {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--tt-border) !important;
  border-radius: 8px !important;
  background: var(--tt-bg) !important;
  cursor: pointer !important;
}
.mttp-switch input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: unset !important;
  flex-shrink: 0 !important;
  accent-color: var(--tt-brand) !important;
}
.mttp-switch span { font-size: 13px !important; font-weight: 500 !important; color: var(--tt-text) !important; }
.mttp-form > button[type="submit"] {
  background: var(--tt-brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--tt-brand) !important;
  border-radius: 8px !important;
  padding: 11px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  min-height: 42px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(12, 200, 168, 0.3) !important;
  transition: all 0.15s !important;
  width: 100% !important;
}
.mttp-form > button[type="submit"]:hover {
  background: var(--tt-brand-dk) !important;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .mttp-workspace { grid-template-columns: 260px 1fr !important; }
  .mttp-kpi-row { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 720px) {
  .mttp-workspace { grid-template-columns: 1fr !important; }
  #mttp-root { padding: 14px 12px !important; }
  .mttp-header { flex-wrap: wrap !important; }
  .mttp-actions { width: 100% !important; }
  .mttp-actions button { flex: 1 !important; }
}
body[data-section="notices"] .notice-lite-strip {
  display: none !important;
}
