/* ══════════════════════════════════════════════
   مدير مشاريعي — WordPress Plugin Styles v6
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;900&display=swap');

:root {
  --mpm-bg:          #f2f5fb;
  --mpm-surface:     #ffffff;
  --mpm-surface2:    #edf0f8;
  --mpm-border:      #dde3ef;
  --mpm-text:        #0f172a;
  --mpm-muted:       #64748b;
  --mpm-primary:     #4338ca;
  --mpm-primary-h:   #3730a3;
  --mpm-success:     #047857;
  --mpm-warning:     #b45309;
  --mpm-danger:      #b91c1c;
  --mpm-radius:      14px;
  --mpm-radius-sm:   9px;
  --mpm-shadow:      0 2px 12px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.04);
  --mpm-shadow-md:   0 8px 28px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.05);
  --mpm-shadow-lg:   0 20px 50px rgba(15,23,42,.14), 0 4px 12px rgba(15,23,42,.07);
}

.mpm-wrap * { box-sizing: border-box; font-family: 'Cairo', sans-serif !important; }

/* ── Layout ── */
.mpm-wrap,
.mpm-kaizen-wrap,
.mpm-sc-wrap {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.mpm-wrap {
  background: var(--mpm-bg);
  min-height: 100vh;
  padding: 28px clamp(16px, 3vw, 48px);
  color: var(--mpm-text);
}
#wpcontent { background: var(--mpm-bg); overflow-x: hidden; }
body.wp-admin { overflow-x: hidden; }

/* ── Header ── */
.mpm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 18px 24px;
  background: var(--mpm-surface);
  border-radius: var(--mpm-radius);
  border: 1px solid var(--mpm-border);
  box-shadow: var(--mpm-shadow);
  gap: 12px;
  flex-wrap: wrap;
}
.mpm-header-inner { display: flex; align-items: center; gap: 14px; }
.mpm-logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--mpm-primary) 0%, #7c3aed 100%);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(67,56,202,.30);
  flex-shrink: 0;
}
.mpm-title { font-size: 20px; font-weight: 800; color: var(--mpm-text); margin: 0; line-height: 1.2; letter-spacing: -.3px; }
.mpm-subtitle { color: var(--mpm-muted); font-size: 12px; margin: 2px 0 0; }

/* ── Stats ── */
.mpm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.mpm-stat-card {
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: var(--mpm-radius);
  padding: 18px 16px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--mpm-shadow);
  position: relative;
  overflow: hidden;
}
.mpm-stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: var(--accent, var(--mpm-primary));
  border-radius: 14px 14px 0 0;
}
.mpm-stat-card:hover { transform: translateY(-3px); box-shadow: var(--mpm-shadow-md); }
.mpm-stat-icon { font-size: 26px; margin-bottom: 8px; display: block; }
.mpm-stat-num { font-size: 32px; font-weight: 900; color: var(--mpm-text); line-height: 1; letter-spacing: -1px; }
.mpm-stat-label { font-size: 11px; font-weight: 600; color: var(--mpm-muted); margin-top: 5px; text-transform: uppercase; letter-spacing: .4px; }

/* ── Dashboard grid ── */
.mpm-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mpm-card-wide { grid-column: 1 / -1; }
@media(max-width: 768px) { .mpm-dashboard-grid { grid-template-columns: 1fr; } }

/* ── Card ── */
.mpm-card {
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: var(--mpm-radius);
  overflow: hidden;
  box-shadow: var(--mpm-shadow);
  transition: box-shadow .2s;
}
.mpm-card:hover { box-shadow: var(--mpm-shadow-md); }
.mpm-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--mpm-border);
  background: #f8fafc;
  gap: 8px;
}
.mpm-card-title { font-size: 14px; font-weight: 700; color: var(--mpm-text); margin: 0; letter-spacing: -.2px; }

/* ── List items ── */
.mpm-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--mpm-border);
  transition: background .15s;
}
.mpm-list-item:last-child { border-bottom: none; }
.mpm-list-item:hover { background: var(--mpm-surface2); }
.mpm-list-item.overdue { border-right: 3px solid var(--mpm-danger); }
.mpm-color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mpm-list-info { flex: 1; min-width: 0; }
.mpm-list-title { font-size: 14px; font-weight: 500; color: var(--mpm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpm-list-meta { font-size: 12px; color: var(--mpm-muted); margin-top: 2px; }
.mpm-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mpm-mt-sm { margin-top: 10px; }

/* ── Badge ── */
.mpm-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .3px;
}
.status-active      { background: rgba(4,120,87,.10);  color: #047857; }
.status-paused      { background: rgba(180,83,9,.10);   color: #b45309; }
.status-completed   { background: rgba(67,56,202,.10);  color: #4338ca; }
.status-cancelled   { background: rgba(185,28,28,.10);  color: #b91c1c; }
.status-todo        { background: rgba(100,116,139,.10); color: #64748b; }
.status-inprogress  { background: rgba(8,145,178,.10);  color: #0891b2; }
.status-done        { background: rgba(4,120,87,.10);   color: #047857; }
.pri-low    { background: rgba(100,116,139,.10); color: #64748b; }
.pri-medium { background: rgba(180,83,9,.10);    color: #b45309; }
.pri-high   { background: rgba(185,28,28,.10);   color: #b91c1c; }
.pri-urgent { background: rgba(185,28,28,.18);   color: #991b1b; border: 1px solid rgba(185,28,28,.28); font-weight: 700; }

/* ── Projects Grid ── */
.mpm-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}
.mpm-project-card {
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: var(--mpm-radius);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: var(--mpm-shadow);
}
.mpm-project-card:hover { transform: translateY(-4px); box-shadow: var(--mpm-shadow-lg); }
.mpm-project-bar { height: 5px; background: var(--pcolor); }
.mpm-project-body { padding: 18px 20px; }
.mpm-project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mpm-project-title { font-size: 15px; font-weight: 800; color: var(--mpm-text); margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.2px; }
.mpm-project-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.mpm-project-card:hover .mpm-project-actions { opacity: 1; }
.mpm-project-desc { font-size: 13px; color: var(--mpm-muted); margin: 10px 0 0; line-height: 1.6; }
.mpm-progress-wrap { height: 5px; background: var(--mpm-border); border-radius: 3px; margin: 14px 0 10px; overflow: hidden; }
.mpm-progress-bar { height: 100%; background: var(--pcolor); border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.mpm-project-footer { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mpm-meta-pill { font-size: 12px; color: var(--mpm-muted); }
.overdue-pill { color: var(--mpm-danger) !important; }
.mpm-project-links { margin-top: 12px; }
.mpm-link { color: var(--mpm-primary); font-size: 13px; text-decoration: none; font-weight: 500; }
.mpm-link:hover { color: #4338ca; }

/* ── Tasks ── */
.mpm-filters { margin-bottom: 20px; }
.mpm-filter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mpm-filter-input { width: auto !important; min-width: 180px; }
.mpm-tasks-list { }
.mpm-task-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--mpm-border);
  transition: background .15s;
}
.mpm-task-row:last-child { border-bottom: none; }
.mpm-task-row:hover { background: var(--mpm-surface2); }
.mpm-task-row.task-done .mpm-task-title { text-decoration: line-through; color: var(--mpm-muted); }
.mpm-task-row.task-overdue { border-right: 3px solid var(--mpm-danger); background: rgba(185,28,28,.025); }
.mpm-task-check { flex-shrink: 0; }
.mpm-check-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--mpm-border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--mpm-success);
  transition: all .2s;
}
.mpm-check-btn:hover { border-color: var(--mpm-success); background: rgba(5,150,105,.1); }
.mpm-check-btn.checked { background: var(--mpm-success); border-color: var(--mpm-success); color: #fff; }
.mpm-task-info { flex: 1; min-width: 0; }
.mpm-task-title { font-size: 14px; font-weight: 500; color: var(--mpm-text); }
.mpm-task-meta { font-size: 12px; color: var(--mpm-muted); margin-top: 3px; }
.mpm-task-excerpt { opacity: .7; }
.mpm-task-badges { display: flex; gap: 6px; }
.mpm-task-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.mpm-task-row:hover .mpm-task-actions { opacity: 1; }

/* ── Notes ── */
.mpm-notes-masonry {
  columns: 3;
  gap: 20px;
}
@media(max-width:1200px) { .mpm-notes-masonry { columns: 2; } }
@media(max-width:800px)  { .mpm-notes-masonry { columns: 1; } }
.mpm-note-card {
  break-inside: avoid;
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: var(--mpm-radius);
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  transition: transform .2s;
  box-shadow: var(--mpm-shadow);
}
.mpm-note-card:hover { transform: translateY(-2px); border-color: var(--mpm-primary); box-shadow: 0 8px 24px rgba(79,70,229,.12); }
.mpm-note-card.note-pinned { border-color: rgba(217,119,6,.4); background: rgba(217,119,6,.04); }
.mpm-pin-icon { position: absolute; top: 12px; left: 12px; font-size: 14px; }
.mpm-note-content { font-size: 14px; color: var(--mpm-text); line-height: 1.7; white-space: pre-wrap; }
.mpm-note-proj-tag { font-size: 12px; color: var(--mpm-primary); margin-top: 10px; }
.mpm-note-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--mpm-border); }
.mpm-note-date { font-size: 11px; color: var(--mpm-muted); }
.mpm-note-btns { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.mpm-note-card:hover .mpm-note-btns { opacity: 1; }

/* Notes inside dashboard */
.mpm-notes-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 16px; padding: 16px; }
.mpm-note-preview { background: var(--mpm-surface2); border-radius: var(--mpm-radius-sm); padding: 14px; border: 1px solid var(--mpm-border); }
.mpm-note-text { font-size: 13px; color: var(--mpm-muted); line-height: 1.6; }
.mpm-note-proj { font-size: 11px; color: var(--mpm-primary); margin-top: 8px; }

/* ── Buttons ── */
.mpm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: var(--mpm-radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  font-family: 'Cairo', sans-serif !important;
  transition: all .2s;
}
.mpm-btn-primary { background: var(--mpm-primary); color: #fff; }
.mpm-btn-primary:hover { background: var(--mpm-primary-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.3); }
.mpm-btn-ghost { background: var(--mpm-surface2); color: var(--mpm-text); border: 1px solid var(--mpm-border); }
.mpm-btn-ghost:hover { background: var(--mpm-border); color: var(--mpm-text); }
.mpm-icon-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 6px; font-size: 14px;
  transition: background .15s;
}
.mpm-icon-btn:hover { background: var(--mpm-border); }

/* ── Forms ── */
.mpm-input {
  width: 100%;
  background: var(--mpm-surface) !important;
  border: 1px solid var(--mpm-border) !important;
  color: var(--mpm-text) !important;
  padding: 10px 14px !important;
  border-radius: var(--mpm-radius-sm) !important;
  font-size: 13px !important;
  font-family: 'Cairo', sans-serif !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .2s !important;
}
.mpm-input:focus { border-color: var(--mpm-primary) !important; box-shadow: 0 0 0 3px rgba(79,70,229,.1) !important; }
.mpm-textarea { min-height: 100px; resize: vertical; }
.mpm-textarea-lg { min-height: 180px; }
.mpm-form-row { margin-bottom: 16px; }
.mpm-form-row label { display: block; font-size: 13px; color: var(--mpm-muted); margin-bottom: 6px; font-weight: 500; }
.mpm-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mpm-checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; color: var(--mpm-text) !important; }
.mpm-checkbox-label input { width: auto !important; margin: 0; cursor: pointer; }

/* Color picker */
.mpm-color-picker-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mpm-color-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s, border-color .2s;
}
.mpm-color-swatch:hover, .mpm-color-swatch.active { transform: scale(1.2); border-color: var(--mpm-text); }
.mpm-color-custom { width: 36px; height: 36px; padding: 2px !important; border-radius: 8px !important; cursor: pointer; }

/* ── Modal ── */
.mpm-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.mpm-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(4px); }
.mpm-modal-box {
  position: relative; z-index: 1;
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: 16px;
  width: 90%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  animation: mpm-slide-in .25s ease;
}
@keyframes mpm-slide-in { from { opacity:0; transform: translateY(20px) scale(.97); } to { opacity:1; transform: none; } }
.mpm-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--mpm-border);
  background: #f8fafc;
}
.mpm-modal-header h2 { font-size: 17px; font-weight: 700; color: var(--mpm-text); margin: 0; }
.mpm-close-btn { background: var(--mpm-surface2); border: none; color: var(--mpm-muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; transition: all .2s; }
.mpm-close-btn:hover { background: var(--mpm-border); color: var(--mpm-text); }
.mpm-modal-box form { padding: 24px; }
.mpm-modal-footer { display: flex; gap: 10px; justify-content: flex-start; margin-top: 4px; }

/* ── Empty states ── */
.mpm-empty { padding: 20px; text-align: center; color: var(--mpm-muted); font-size: 13px; }
.mpm-empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--mpm-muted); }
.mpm-empty-icon { font-size: 48px; margin-bottom: 12px; }
.mpm-empty-state p { font-size: 16px; margin-bottom: 20px; }

/* ── Toast ── */
.mpm-toast {
  position: fixed; bottom: 24px; left: 24px; z-index: 999999;
  background: var(--mpm-surface);
  border: 1px solid var(--mpm-border);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 13px; color: var(--mpm-text);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  animation: mpm-toast-in .3s ease;
  display: flex; align-items: center; gap: 10px;
}
@keyframes mpm-toast-in { from { opacity:0; transform: translateY(10px); } to { opacity:1; } }
.mpm-toast.success { border-color: var(--mpm-success); }
.mpm-toast.error   { border-color: var(--mpm-danger); }

/* ── Scrollbar ── */
.mpm-modal-box::-webkit-scrollbar { width: 6px; }
.mpm-modal-box::-webkit-scrollbar-track { background: transparent; }
.mpm-modal-box::-webkit-scrollbar-thumb { background: var(--mpm-border); border-radius: 3px; }

/* ── Admin menu icon color ── */
#adminmenu .toplevel_page_mpm-dashboard .wp-menu-image { color: #4f46e5 !important; }

/* ══════════════════════════════════════════════
   Shortcode Frontend Styles
   ══════════════════════════════════════════════ */
.mpm-sc-wrap {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  color: var(--mpm-text, #1e293b);
}
.mpm-sc-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.mpm-sc-header h3 { margin: 0; font-size: 19px; font-weight: 800; color: #0f172a; letter-spacing: -.3px; }

/* Shortcode projects grid */
.mpm-sc-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mpm-sc-project-card {
  background: #fff;
  border: 1px solid #d1dce8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.mpm-sc-project-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.mpm-sc-project-bar { height: 4px; }
.mpm-sc-project-body { padding: 16px; }
.mpm-sc-project-title { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 8px; }
.mpm-sc-project-desc { font-size: 13px; color: #64748b; margin: 0 0 10px; line-height: 1.6; }
.mpm-sc-project-footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.mpm-sc-progress-wrap { height: 5px; background: #e2e8f0; border-radius: 3px; margin: 10px 0; overflow: hidden; }
.mpm-sc-progress-bar { height: 100%; border-radius: 3px; transition: width .5s; }
.mpm-sc-actions { display: flex; gap: 6px; margin-top: 10px; }

/* Shortcode tasks */
.mpm-sc-tasks-list { background: #fff; border: 1px solid var(--mpm-border); border-radius: 13px; overflow: hidden; box-shadow: var(--mpm-shadow); max-height: 520px; overflow-y: auto; }
.mpm-sc-tasks-list::-webkit-scrollbar { width: 5px; }
.mpm-sc-tasks-list::-webkit-scrollbar-track { background: transparent; }
.mpm-sc-tasks-list::-webkit-scrollbar-thumb { background: var(--mpm-border); border-radius: 3px; }
.mpm-sc-task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #e8eef4;
  transition: background .15s;
}
.mpm-sc-task-row:last-child { border-bottom: none; }
.mpm-sc-task-row:hover { background: #f8fafc; }
.mpm-sc-task-row.sc-task-done .mpm-sc-task-title { text-decoration: line-through; color: #94a3b8; }
.mpm-sc-task-row.sc-task-overdue { border-right: 3px solid #dc2626; }
.mpm-sc-check-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #d1dce8; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #059669; flex-shrink: 0; transition: all .2s;
}
.mpm-sc-check-btn:hover { border-color: #059669; background: rgba(5,150,105,.08); }
.mpm-sc-check-btn.checked { background: #059669; border-color: #059669; color: #fff; }
.mpm-sc-task-info { flex: 1; min-width: 0; }
.mpm-sc-task-title { font-size: 14px; font-weight: 500; color: #1e293b; }
.mpm-sc-task-meta { font-size: 12px; color: #64748b; margin-top: 2px; }
.mpm-sc-task-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.mpm-sc-task-row:hover .mpm-sc-task-actions { opacity: 1; }

/* Shortcode notes */
.mpm-sc-notes-masonry { columns: 3; gap: 16px; }
@media(max-width:900px) { .mpm-sc-notes-masonry { columns: 2; } }
@media(max-width:600px) { .mpm-sc-notes-masonry { columns: 1; } }
.mpm-sc-note-card {
  break-inside: avoid;
  background: #fff;
  border: 1px solid #d1dce8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, border-color .2s;
  position: relative;
}
.mpm-sc-note-card:hover { transform: translateY(-2px); border-color: #4f46e5; }
.mpm-sc-note-card.sc-pinned { border-color: rgba(217,119,6,.4); background: rgba(253,246,236,1); }
.mpm-sc-note-content { font-size: 13px; color: #334155; line-height: 1.7; white-space: pre-wrap; }
.mpm-sc-note-proj { font-size: 11px; color: #4f46e5; margin-top: 8px; }
.mpm-sc-note-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid #e8eef4; }
.mpm-sc-note-date { font-size: 11px; color: #94a3b8; }
.mpm-sc-note-btns { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.mpm-sc-note-card:hover .mpm-sc-note-btns { opacity: 1; }

/* Shared sc buttons */
.mpm-sc-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; font-family: 'Cairo', sans-serif;
  transition: all .2s;
}
.mpm-sc-btn-primary { background: #4338ca; color: #fff; box-shadow: 0 2px 7px rgba(67,56,202,.28); }
.mpm-sc-btn-primary:hover { background: #3730a3; box-shadow: 0 4px 12px rgba(67,56,202,.38); }
.mpm-sc-btn-ghost { background: #e8eef4; color: #1e293b; border: 1px solid #d1dce8; }
.mpm-sc-btn-ghost:hover { background: #d1dce8; }
.mpm-sc-btn-danger { background: rgba(220,38,38,.1); color: #dc2626; border: 1px solid rgba(220,38,38,.2); }
.mpm-sc-btn-danger:hover { background: rgba(220,38,38,.2); }
.mpm-sc-btn-sm { padding: 4px 10px; font-size: 12px; }
.mpm-sc-icon-btn { background: none; border: none; cursor: pointer; padding: 4px; border-radius: 6px; font-size: 13px; transition: background .15s; }
.mpm-sc-icon-btn:hover { background: #e8eef4; }

/* Shortcode modal */
.mpm-sc-modal { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center; }
.mpm-sc-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(3px); }
.mpm-sc-modal-box {
  position: relative; z-index: 1;
  background: #fff;
  border: 1px solid #d1dce8;
  border-radius: 16px;
  width: 92%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  animation: mpm-slide-in .25s ease;
  direction: rtl;
}
.mpm-sc-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #e8eef4;
  background: #f8fafc;
}
.mpm-sc-modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #1e293b; }
.mpm-sc-modal-close { background: #e8eef4; border: none; color: #64748b; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.mpm-sc-modal-close:hover { background: #d1dce8; }
.mpm-sc-modal-body { padding: 22px; }
.mpm-sc-form-row { margin-bottom: 14px; }
.mpm-sc-form-row label { display: block; font-size: 13px; color: #64748b; margin-bottom: 5px; font-weight: 500; }
.mpm-sc-input {
  width: 100%; background: #fff; border: 1px solid #d1dce8;
  color: #1e293b; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-family: 'Cairo', sans-serif;
  outline: none; box-sizing: border-box;
  transition: border-color .2s;
}
.mpm-sc-input:focus { border-color: #4338ca; box-shadow: 0 0 0 3px rgba(67,56,202,.10); }
.mpm-sc-textarea { min-height: 120px; resize: vertical; }
.mpm-sc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mpm-sc-modal-footer { display: flex; gap: 8px; margin-top: 6px; }
.mpm-sc-checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; color: #1e293b; font-size: 13px; }
.mpm-sc-checkbox-label input { width: auto; margin: 0; }
.mpm-sc-badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   Overview Page  [mpm_overview]
   ═══════════════════════════════════════════════════════════════════ */

.mpm-ov-wrap { width: 100%; max-width: 100%; overflow-x: hidden; }

/* Hero */
.mpm-ov-hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 32px; margin-bottom: 22px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 16px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--mpm-shadow-md);
  flex-wrap: wrap; gap: 12px;
}
.mpm-ov-hero::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
  pointer-events: none;
}
.mpm-ov-hero-title { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.4px; }
.mpm-ov-hero-sub  { margin: 5px 0 0; font-size: 13px; opacity: .70; }

/* Stats */
.mpm-ov-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media(max-width:900px) { .mpm-ov-stats { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .mpm-ov-stats { grid-template-columns: 1fr 1fr; } }

.mpm-ov-stat {
  background: #fff; border-radius: 13px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-top: 3px solid var(--ov-accent, #4338ca);
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
  transition: transform .2s, box-shadow .2s;
}
.mpm-ov-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15,23,42,.12); }
.mpm-ov-stat-icon { font-size: 20px; }
.mpm-ov-stat-num  { font-size: 28px; font-weight: 900; color: var(--ov-accent); line-height: 1; letter-spacing: -1px; }
.mpm-ov-stat-lbl  { font-size: 11px; color: #64748b; font-weight: 600; text-align: center; letter-spacing: .3px; }

/* Section */
.mpm-ov-section { margin-bottom: 28px; }
.mpm-ov-section-title { font-size: 17px; font-weight: 700; color: #1e293b; margin: 0 0 14px; }
.mpm-ov-empty { text-align: center; padding: 30px; color: #94a3b8; font-size: 14px; }

/* Featured */
.mpm-ov-featured {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  display: flex;
}
.mpm-ov-feat-stripe {
  width: 6px; background: var(--feat-color, #4f46e5);
  flex-shrink: 0;
}
.mpm-ov-feat-body { flex: 1; padding: 22px 24px; }
.mpm-ov-feat-top  { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mpm-ov-feat-title { margin: 0; font-size: 20px; font-weight: 800; color: #1e293b; }
.mpm-ov-feat-badges { display: flex; gap: 6px; flex-shrink: 0; }
.mpm-ov-feat-desc { margin: 0 0 14px; font-size: 13px; color: #64748b; line-height: 1.7; }
.mpm-ov-feat-meta { display: flex; gap: 16px; font-size: 12px; color: #94a3b8; margin-bottom: 10px; flex-wrap: wrap; }
.mpm-ov-feat-progress-wrap { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.mpm-ov-feat-progress-bar  { height: 100%; border-radius: 4px; transition: width .8s ease; }
.mpm-ov-feat-pct  { font-size: 12px; color: #64748b; margin-bottom: 14px; font-weight: 600; }

.mpm-ov-feat-tasks       { border-top: 1px solid #f1f5f9; padding-top: 12px; }
.mpm-ov-feat-tasks-label { font-size: 12px; color: #94a3b8; margin: 0 0 8px; font-weight: 600; }
.mpm-ov-feat-task {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #f8fafc;
  font-size: 13px; color: #334155;
}
.mpm-ov-feat-task:last-child { border-bottom: none; }
.mpm-ov-feat-task-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpm-ov-feat-task-date { font-size: 11px; color: #94a3b8; flex-shrink: 0; }
.ov-feat-task-overdue .mpm-ov-feat-task-name { color: #dc2626; }

/* Two columns */
.mpm-ov-two-col {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media(max-width:768px) { .mpm-ov-two-col { grid-template-columns: 1fr; } }

/* Projects list inside overview */
.mpm-ov-projects-list {
  background: #fff; border: 1px solid var(--mpm-border); border-radius: 13px;
  overflow-y: auto; overflow-x: hidden;
  max-height: 520px;
  box-shadow: var(--mpm-shadow);
}
.mpm-ov-projects-list::-webkit-scrollbar { width: 5px; }
.mpm-ov-projects-list::-webkit-scrollbar-track { background: transparent; }
.mpm-ov-projects-list::-webkit-scrollbar-thumb { background: var(--mpm-border); border-radius: 3px; }
.mpm-ov-proj-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
  transition: background .15s;
}
.mpm-ov-proj-row:last-child { border-bottom: none; }
.mpm-ov-proj-row:hover { background: #f8fafc; }
.mpm-ov-proj-row:hover .mpm-sc-task-actions { opacity: 1; }
.mpm-ov-proj-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mpm-ov-proj-info { flex: 1; min-width: 0; }
.mpm-ov-proj-name { font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpm-ov-proj-bar-wrap { height: 4px; background: #e2e8f0; border-radius: 2px; margin: 4px 0; overflow: hidden; }
.mpm-ov-proj-bar  { height: 100%; border-radius: 2px; transition: width .5s; }
.mpm-ov-proj-meta { font-size: 10px; color: #94a3b8; }
.mpm-ov-proj-badges { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════
   Shortcode Pages Section (Dashboard)
   ═══════════════════════════════════════════════════════════════════ */

.mpm-sc-pages-card { margin-top: 24px; }

.mpm-sc-pages-intro {
  font-size: 13px; color: #64748b;
  margin: 0 0 18px; line-height: 1.6;
}

.mpm-sc-pages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media(max-width: 700px) { .mpm-sc-pages-grid { grid-template-columns: 1fr; } }

.mpm-sc-page-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px;
  transition: box-shadow .2s, transform .2s;
}
.mpm-sc-page-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.mpm-sc-page-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: color-mix(in srgb, var(--sc-color) 12%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.mpm-sc-page-info { flex: 1; min-width: 0; }

.mpm-sc-page-name {
  font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 3px;
}
.mpm-sc-page-desc {
  font-size: 12px; color: #64748b; line-height: 1.5; margin-bottom: 10px;
}

.mpm-sc-page-code-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #1e293b; border-radius: 8px;
  padding: 6px 10px; width: fit-content;
}
.mpm-sc-code {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: #a5f3fc;
  background: transparent; border: none;
  user-select: all;
}
.mpm-sc-copy-btn {
  background: none; border: none; cursor: pointer;
  font-size: 14px; padding: 0; line-height: 1;
  opacity: .7; transition: opacity .15s, transform .15s;
}
.mpm-sc-copy-btn:hover { opacity: 1; transform: scale(1.15); }
.mpm-sc-copy-btn.copied { opacity: 1; }

.mpm-sc-pages-note {
  font-size: 12px; color: #94a3b8;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 10px 14px;
  line-height: 1.6;
}
.mpm-sc-pages-note code {
  background: rgba(0,0,0,.06); border-radius: 4px;
  padding: 1px 5px; font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════
   Recurrence UI
   ═══════════════════════════════════════════════════════════════════ */

/* Badge */
.mpm-badge-recur {
  background: rgba(16,185,129,.12);
  color: #059669;
  font-size: 11px;
}
.mpm-recur-inline { font-size: 12px; color: #059669; font-weight: 600; }

/* Weekday picker */
.mpm-weekdays-wrap {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.mpm-weekday-btn { cursor: pointer; }
.mpm-weekday-btn input { display: none; }
.mpm-weekday-btn span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #d1dce8; background: #f8fafc;
  font-size: 12px; font-weight: 700; color: #64748b;
  transition: all .15s; user-select: none;
}
.mpm-weekday-btn input:checked + span {
  background: #4f46e5; border-color: #4f46e5; color: #fff;
}
.mpm-weekday-btn:hover span { border-color: #4f46e5; }

/* Recur tools card in dashboard */
.mpm-recur-tools {
  margin-top: 18px; padding: 16px 18px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px;
}
.mpm-recur-tools-title { font-size: 14px; font-weight: 700; color: #065f46; margin-bottom: 4px; }
.mpm-recur-tools-desc  { font-size: 12px; color: #047857; margin: 0 0 12px; line-height: 1.5; }

/* ── Dashboard Task Project Filter ────────────────────────────── */
.mpm-dash-task-filter {
  padding: 10px 18px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.mpm-dash-filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mpm-dash-project-select {
  flex: 1;
  font-size: 13px;
  padding: 6px 10px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  transition: border-color .15s;
  min-width: 0;
}
.mpm-dash-project-select:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
}
.mpm-dash-clear-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  height: 36px;
  display: flex;
  align-items: center;
  color: #64748b;
}
.mpm-dash-clear-btn:hover { color: #ef4444; }

/* ── Overview Shortcode Task Project Filter ───────────────────── */
.mpm-ov-task-filter {
  margin-bottom: 10px;
}
.mpm-ov-filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mpm-ov-project-select {
  flex: 1;
  font-size: 13px;
  padding: 6px 10px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  transition: border-color .15s;
  min-width: 0;
  cursor: pointer;
}
.mpm-ov-project-select:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
}
.mpm-ov-clear-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  height: 36px;
  display: flex;
  align-items: center;
  color: #64748b;
  text-decoration: none;
}
.mpm-ov-clear-btn:hover { color: #ef4444; }

/* ── Date Filter Buttons (shared: dashboard + overview) ───────── */
.mpm-dash-date-btns,
.mpm-ov-date-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.mpm-date-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1.5px solid #dde3ef;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
}
.mpm-date-btn:hover {
  background: #ede9fe;
  border-color: #4338ca;
  color: #4338ca;
  text-decoration: none;
}
.mpm-date-btn-active {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff !important;
  box-shadow: 0 2px 7px rgba(67,56,202,.28);
}
.mpm-date-btn-active:hover {
  background: #3730a3;
  border-color: #3730a3;
  color: #fff;
}
.mpm-date-btn-clear {
  color: #94a3b8;
  border-color: #e2e8f0;
  background: transparent;
}
.mpm-date-btn-clear:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: #fef2f2;
}
/* تعديل الحاوية لتصبح عمودين */
.mpm-dash-task-filter,
.mpm-ov-task-filter {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ═══════════════════════════════════════════════
   KAIZEN — التحسين اليومي
   ═══════════════════════════════════════════════ */

/* Logo */
.mpm-kaizen-logo {
  font-size: 28px;
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  font-family: serif !important;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

/* Streak Banner */
.mpm-kaizen-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 30%, #4338ca 70%, #7c3aed 100%);
  border-radius: var(--mpm-radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(67,56,202,.28);
}
.mpm-kaizen-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  flex-wrap: wrap;
  min-width: 0;
}
.mpm-kaizen-flame { font-size: 40px; line-height: 1; }
.mpm-kaizen-streak-num  { font-size: 32px; font-weight: 900; color: #fbbf24; line-height: 1; }
.mpm-kaizen-streak-label { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }
.mpm-kaizen-banner-quote {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  font-style: italic;
  line-height: 1.6;
  min-width: 200px;
}
.mpm-kaizen-banner-prog { margin-right: auto; min-width: 160px; }
.mpm-kaizen-banner-prog-label { font-size: 12px; color: rgba(255,255,255,.8); margin-bottom: 6px; }
.mpm-kaizen-banner-prog-label strong { color: #fbbf24; }
.mpm-kaizen-prog-bar-wrap {
  height: 8px; background: rgba(255,255,255,.2); border-radius: 4px; overflow: hidden;
}
.mpm-kaizen-prog-bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 4px;
  transition: width .6s ease;
}

/* Stats */
.mpm-kaizen-stats { margin-bottom: 20px; }

/* Main grid */
.mpm-kaizen-main-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 320px);
  grid-template-rows: auto auto;
  gap: 20px;
  min-width: 0;
}
.mpm-kaizen-today-card  { grid-row: 1 / 3; }
.mpm-kaizen-heat-card   { grid-column: 2; grid-row: 1; }
.mpm-kaizen-reflect-card{ grid-column: 2; grid-row: 2; }

/* Category Tabs */
.mpm-kaizen-cat-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.mpm-kaizen-tab {
  font-size: 12px; padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--mpm-border);
  background: transparent; color: var(--mpm-muted);
  cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: all .15s;
}
.mpm-kaizen-tab.active,
.mpm-kaizen-tab:hover {
  background: var(--mpm-primary); color: #fff; border-color: var(--mpm-primary);
}

/* Habit Row */
.mpm-kaizen-habit-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mpm-border);
  transition: background .15s;
}
.mpm-kaizen-habit-row:last-child { border-bottom: none; }
.mpm-kaizen-habit-row:hover { background: var(--mpm-surface2); }
.mpm-kaizen-habit-row.kz-done { opacity: .6; }
.mpm-kaizen-habit-row.kz-done .mpm-kaizen-habit-name { text-decoration: line-through; color: var(--mpm-muted); }

/* Checkbox */
.mpm-kaizen-check {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid var(--mpm-border);
  background: transparent;
  cursor: pointer;
  font-size: 14px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.mpm-kaizen-check:hover { border-color: var(--mpm-primary); }
.mpm-kaizen-check.kz-checked {
  background: var(--mpm-success);
  border-color: var(--mpm-success);
}

.mpm-kaizen-habit-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.mpm-kaizen-habit-info { flex: 1; min-width: 0; }
.mpm-kaizen-habit-name { font-size: 14px; font-weight: 600; color: var(--mpm-text); }
.mpm-kaizen-habit-sub  { font-size: 12px; color: var(--mpm-muted); margin-top: 2px; }
.mpm-kaizen-habit-streak {
  font-size: 12px; font-weight: 700; color: var(--mpm-muted);
  min-width: 32px; text-align: center; flex-shrink: 0;
}
.mpm-kaizen-habit-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.mpm-kaizen-habit-row:hover .mpm-kaizen-habit-actions { opacity: 1; }

/* Week Heatmap */
.mpm-kaizen-week-grid {
  display: flex; gap: 8px; justify-content: space-between;
  padding: 8px 0 4px;
}
.mpm-kaizen-day-col {
  flex: 1; text-align: center;
}
.mpm-kaizen-day-label {
  font-size: 11px; color: var(--mpm-muted); margin-bottom: 6px;
}
.mpm-kaizen-heat-cell {
  width: 100%; aspect-ratio: 1;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  transition: transform .15s;
}
.mpm-kaizen-heat-cell:hover { transform: scale(1.1); }
.kz-today-col .mpm-kaizen-heat-cell { outline: 2px solid var(--mpm-primary); }
.kz-today-dot { font-size: 8px; color: var(--mpm-primary); margin-top: 4px; }

/* Month mini grid */
.mpm-kaizen-month-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 8px 0;
}
.mpm-kaizen-mini-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  cursor: default;
  transition: transform .1s;
}
.mpm-kaizen-mini-cell:hover { transform: scale(1.3); }
.kz-today-mini { outline: 2px solid var(--mpm-primary); }

/* Heatmap colors — shared for both week & month */
.heat-empty { background: var(--mpm-border); }
.heat-0     { background: var(--mpm-border); color: var(--mpm-muted); }
.heat-1     { background: rgba(16,185,129,.2);  color: #064e3b; }
.heat-2     { background: rgba(16,185,129,.4);  color: #065f46; }
.heat-3     { background: rgba(16,185,129,.6);  color: #fff; }
.heat-4     { background: rgba(16,185,129,.8);  color: #fff; }
.heat-5     { background: #059669;              color: #fff; }

/* Legend */
.mpm-kaizen-heat-legend {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--mpm-muted);
  margin-top: 4px;
}
.mpm-kaizen-heat-legend div {
  width: 14px; height: 14px; border-radius: 3px;
}

/* Reflection */
.mpm-kaizen-reflect-txt {
  width: 100%; resize: vertical; font-size: 13px; line-height: 1.7;
}
.mpm-kaizen-reflect-date { font-size: 12px; color: var(--mpm-muted); }
.mpm-kaizen-reflect-saved { font-size: 12px; color: var(--mpm-success); margin-top: 8px; text-align: center; }

/* Days Picker */
.mpm-kaizen-days-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mpm-kaizen-day-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--mpm-border);
  background: transparent; color: var(--mpm-muted);
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all .15s;
}
.mpm-kaizen-day-btn.active {
  background: var(--mpm-primary); border-color: var(--mpm-primary); color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .mpm-kaizen-main-grid {
    grid-template-columns: 1fr;
  }
  .mpm-kaizen-today-card  { grid-row: auto; }
  .mpm-kaizen-heat-card   { grid-column: 1; grid-row: auto; }
  .mpm-kaizen-reflect-card{ grid-column: 1; grid-row: auto; }
  .mpm-kaizen-banner-inner { gap: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
   KAIZEN — Overview Section (mpm_overview shortcode)
   ═══════════════════════════════════════════════════════════════════ */

.mpm-ov-kaizen-section {
  background: linear-gradient(135deg, rgba(16,185,129,.06) 0%, rgba(245,158,11,.04) 100%);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 16px;
  padding: 20px 22px;
  margin-top: 24px;
}

/* Streak badge */
.mpm-ov-kaizen-streak-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  background: rgba(245,158,11,.15); color: #d97706;
  border: 1px solid rgba(245,158,11,.3);
}
.mpm-ov-kaizen-streak-badge.kzov-fire { background:rgba(239,68,68,.12); color:#dc2626; border-color:rgba(239,68,68,.25); }
.mpm-ov-kaizen-streak-badge.kzov-bolt { background:rgba(99,102,241,.12); color:#4f46e5; border-color:rgba(99,102,241,.25); }
.mpm-ov-kaizen-streak-badge.kzov-seed { background:rgba(16,185,129,.12); color:#059669; border-color:rgba(16,185,129,.25); }

/* Progress bar */
.mpm-ov-kaizen-prog-wrap {
  height: 8px; background: var(--mpm-border);
  border-radius: 99px; overflow: hidden; margin: 12px 0 4px;
}
.mpm-ov-kaizen-prog-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transition: width .4s ease;
}
.mpm-ov-kaizen-prog-label {
  font-size: 12px; color: var(--mpm-text-2); margin-bottom: 14px;
}

/* Category filter tabs */
.mpm-ov-kaizen-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}

/* Habits list */
.mpm-ov-kaizen-habits { display: flex; flex-direction: column; gap: 6px; }

.mpm-ov-kaizen-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--mpm-surface); border: 1px solid var(--mpm-border);
  transition: background .15s, opacity .15s;
}
.mpm-ov-kaizen-row.kzov-done {
  opacity: .55;
  background: rgba(16,185,129,.06);
}
.mpm-ov-kaizen-row:hover { border-color: rgba(16,185,129,.35); }

.mpm-ov-kaizen-cat-icon { font-size: 18px; flex-shrink: 0; }

.mpm-ov-kaizen-habit-info {
  display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.mpm-ov-kaizen-habit-name {
  font-size: 14px; font-weight: 600; color: var(--mpm-text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mpm-ov-kaizen-row.kzov-done .mpm-ov-kaizen-habit-name { text-decoration: line-through; }
.mpm-ov-kaizen-habit-sub {
  font-size: 11px; color: var(--mpm-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mpm-ov-kaizen-cat-tag {
  font-size: 11px; padding: 2px 8px;
  border-radius: 99px; background: var(--mpm-bg); border: 1px solid var(--mpm-border);
  color: var(--mpm-text-2); white-space: nowrap; flex-shrink: 0;
}

.mpm-ov-kaizen-habit-streak {
  font-size: 12px; font-weight: 700; color: #d97706; flex-shrink: 0;
}

@media (max-width: 600px) {
  .mpm-ov-kaizen-cat-tag { display: none; }
}
