/* ==========================================================================
   Mes Tâches — Premium MeisterTask Aesthetic + Photographic Wallpapers
   ========================================================================== */

:root {
  --accent: #32be59;
  --accent-hover: #28a74c;
  --card-bg: #ffffff;
  --card-text: #1c2430;
  --card-sub: #667384;
  --border: #e6ebf1;
  --text-dark: #18202c;
  --text-muted: #687586;

  --p1: #ef4444;
  --p2: #f59e0b;
  --p3: #3b82f6;
  --p4: #94a3b8;

  --done-bg: #eaf9ef;
  --done-text: #1a8a3d;

  --col-glass: rgba(255, 255, 255, 0.22);
  --col-glass-hover: rgba(255, 255, 255, 0.34);
  --topbar-bg: rgba(15, 28, 22, 0.34);
  --topbar-text: #ffffff;

  --shadow-card: 0 2px 8px rgba(10, 20, 30, 0.11), 0 1px 2px rgba(10, 20, 30, 0.06);
  --shadow-card-hover: 0 10px 24px rgba(10, 20, 30, 0.18), 0 2px 6px rgba(10, 20, 30, 0.08);
  --shadow-lg: 0 22px 60px rgba(8, 15, 28, 0.34);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Photographic Wallpapers (Nano Banana WebP) */
[data-wallpaper="forest"] .mt-wallpaper-layer {
  background-image: url('/assets/wp-forest.webp');
}
[data-wallpaper="ocean"] .mt-wallpaper-layer {
  background-image: url('/assets/wp-ocean.webp');
}
[data-wallpaper="ocean"] {
  --topbar-bg: rgba(12, 32, 54, 0.36);
}
[data-wallpaper="sunset"] .mt-wallpaper-layer {
  background-image: url('/assets/wp-sunset.webp');
}
[data-wallpaper="sunset"] {
  --topbar-bg: rgba(48, 20, 28, 0.36);
}
[data-wallpaper="aurora"] .mt-wallpaper-layer {
  background-image: url('/assets/wp-aurora.webp');
}
[data-wallpaper="aurora"] {
  --topbar-bg: rgba(8, 12, 22, 0.56);
  --col-glass: rgba(255, 255, 255, 0.10);
  --col-glass-hover: rgba(255, 255, 255, 0.18);
}
[data-wallpaper="light"] .mt-wallpaper-layer {
  background-image: linear-gradient(135deg, #eef2f7 0%, #e4ebf4 100%);
}
[data-wallpaper="light"] {
  --topbar-bg: rgba(255, 255, 255, 0.90);
  --topbar-text: #18202c;
  --col-glass: rgba(255, 255, 255, 0.65);
  --col-glass-hover: rgba(255, 255, 255, 0.85);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }

::-webkit-scrollbar { width: 8px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.42); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.65); }
[data-wallpaper="light"] ::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.2); }

/* ==========================================================================
   Shell, Wallpaper Layer & Frosted Topbar
   ========================================================================== */

.mt-shell {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.mt-wallpaper-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.01);
  transition: background-image 0.35s ease;
}
.mt-wallpaper-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.04) 35%, rgba(0, 0, 0, 0.16) 100%);
  pointer-events: none;
}
[data-wallpaper="light"] .mt-wallpaper-layer::after { display: none; }

.mt-topbar {
  position: relative;
  z-index: 30;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--topbar-text);
  flex-shrink: 0;
}
[data-wallpaper="light"] .mt-topbar {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.mt-topbar-left, .mt-topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}
.mt-brand-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.mt-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.24);
  margin: 0 2px;
}
[data-wallpaper="light"] .mt-divider { background: rgba(15, 23, 42, 0.12); }

.ic-sm { width: 17px; height: 17px; flex-shrink: 0; }
.ic-xs { width: 14px; height: 14px; flex-shrink: 0; }
.ic-xxs { width: 12.5px; height: 12.5px; flex-shrink: 0; }

.mt-glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.14s, transform 0.1s;
  white-space: nowrap;
}
.mt-glass-pill:hover { background: rgba(255, 255, 255, 0.26); }
[data-wallpaper="light"] .mt-glass-pill { background: rgba(15, 23, 42, 0.05); border-color: rgba(15, 23, 42, 0.08); }
[data-wallpaper="light"] .mt-glass-pill:hover { background: rgba(15, 23, 42, 0.10); }

.mt-glass-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, transform 0.1s;
  flex-shrink: 0;
}
.mt-glass-icon:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-1px); }
[data-wallpaper="light"] .mt-glass-icon { background: rgba(15, 23, 42, 0.05); border-color: rgba(15, 23, 42, 0.08); }
[data-wallpaper="light"] .mt-glass-icon:hover { background: rgba(15, 23, 42, 0.10); }

.mt-primary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: #ffffff;
  color: #167a38;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s, box-shadow 0.12s;
}
.mt-primary-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24); }
[data-wallpaper="light"] .mt-primary-pill { background: #2fb14d; color: #ffffff; }

.mt-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3cc65c;
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.mt-kbd {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
  letter-spacing: 0.02em;
}
[data-wallpaper="light"] .mt-kbd { background: rgba(15, 23, 42, 0.08); }

.mt-view-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
}
[data-wallpaper="light"] .mt-view-tabs { background: rgba(15, 23, 42, 0.06); border-color: rgba(15, 23, 42, 0.07); }

.mt-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: inherit;
  opacity: 0.84;
  transition: background 0.15s, opacity 0.15s, color 0.15s;
}
.mt-view-tab:hover { opacity: 1; }
.mt-view-tab.active {
  background: #ffffff;
  color: #18202c;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.mt-mini-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 99px;
  background: #ef4444;
  color: #ffffff;
  line-height: 17px;
}

.mt-filter-bar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  background: rgba(15, 23, 42, 0.45);
  color: #ffffff;
  font-size: 12.5px;
  backdrop-filter: blur(12px);
}
.mt-filter-clear {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 600;
}
.mt-filter-clear:hover { background: rgba(255, 255, 255, 0.34); }

/* ==========================================================================
   MeisterTask Kanban Board
   ========================================================================== */

.mt-canvas {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow: auto;
  padding: 22px 24px 36px;
}

.mt-board {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-height: calc(100vh - 130px);
  padding-bottom: 24px;
}

.mt-column {
  width: 292px;
  min-width: 292px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Signature Colored Column Banner */
.mt-col-header {
  height: 46px;
  padding: 0 11px 0 15px;
  border-radius: 13px 13px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  position: relative;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.mt-col-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.mt-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.mt-col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  flex-shrink: 0;
}
.mt-col-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}
.mt-col-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background 0.12s;
}
.mt-col-menu-btn:hover { background: rgba(0, 0, 0, 0.18); color: #fff; }

/* Translucent Frosted Column Body */
.mt-col-body {
  background: var(--col-glass);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border-radius: 0 0 14px 14px;
  padding: 11px 9px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: none;
  transition: background 0.15s, box-shadow 0.15s;
}
.mt-column.drag-over .mt-col-body {
  background: var(--col-glass-hover);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.mt-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 8px;
}

/* Pure White Rounded MeisterTask Card */
.mt-card {
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.16s ease, opacity 0.15s;
}
.mt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.mt-card.dragging {
  opacity: 0.45;
  transform: rotate(1.5deg) scale(0.98);
}

/* Crisp Light-Green Completed Banner inside Card */
.mt-card-done-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--done-bg);
  color: var(--done-text);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(26, 138, 61, 0.12);
}
.mt-done-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mt-done-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #28b45c;
  color: #fff;
  display: grid;
  place-items: center;
}

.mt-card-inner {
  padding: 13px 14px 12px;
}

.mt-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mt-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--card-text);
  line-height: 1.4;
  letter-spacing: -0.008em;
  word-break: break-word;
  flex: 1;
}
.mt-card.is-done .mt-card-title { color: #5b6776; }

/* Tactile Priority Checkbox */
.mt-card-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.15s ease;
}
.mt-card-check.p1 { border-color: var(--p1); background: rgba(239, 68, 68, 0.08); }
.mt-card-check.p2 { border-color: var(--p2); background: rgba(245, 158, 11, 0.08); }
.mt-card-check.p3 { border-color: var(--p3); background: rgba(59, 130, 246, 0.08); }
.mt-card-check:hover { color: #64748b; transform: scale(1.1); }
.mt-card-check.p1:hover { color: var(--p1); background: rgba(239, 68, 68, 0.18); }
.mt-card-check.p2:hover { color: var(--p2); background: rgba(245, 158, 11, 0.18); }
.mt-card-check.p3:hover { color: var(--p3); background: rgba(59, 130, 246, 0.18); }
.mt-card-check.checked {
  background: #2eb85c !important;
  border-color: #2eb85c !important;
  color: #ffffff !important;
}
.mt-card-check svg { width: 12px; height: 12px; stroke-width: 3; }

.mt-card-desc {
  font-size: 12.5px;
  color: var(--card-sub);
  margin-top: 5px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mt-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.mt-due-chip, .mt-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6877;
  background: #f2f5f9;
  padding: 3px 7px;
  border-radius: 6px;
}
.mt-due-chip.overdue { background: #fee2e2; color: #dc2626; }
.mt-due-chip.today { background: #dcfce7; color: #15803d; }
.mt-due-chip.tomorrow { background: #fef3c7; color: #b45309; }

.mt-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Signature Centered Floating White Pill "+ Ajouter une tâche" */
.mt-add-task-pill {
  margin: 4px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #26323f;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.14s, background 0.14s, box-shadow 0.14s;
}
.mt-add-task-pill:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

/* Add New Column Button */
.mt-add-col-btn {
  width: 268px;
  min-width: 268px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s, border-color 0.15s;
}
.mt-add-col-btn:hover { background: rgba(255, 255, 255, 0.30); border-color: rgba(255, 255, 255, 0.85); }
[data-wallpaper="light"] .mt-add-col-btn {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.22);
  color: #334155;
}

/* Inline Composer inside Column */
.mt-inline-composer {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 13px;
  box-shadow: var(--shadow-card-hover);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mt-inline-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
}
.mt-inline-input::placeholder { color: #94a3b8; font-weight: 500; }
.mt-nlp-tokens { display: flex; flex-wrap: wrap; gap: 5px; }
.mt-nlp-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: #e7f8ec;
  color: #167c37;
}
.mt-inline-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

/* ==========================================================================
   Focused Glass Sheet Views (Today, List, Calendar)
   ========================================================================== */

.mt-sheet {
  max-width: 960px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 26px 30px 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.mt-sheet.wide { max-width: 1180px; }

.mt-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.mt-sheet-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.mt-sheet-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.mt-list-group { margin-bottom: 22px; }
.mt-list-group-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.mt-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.1s;
}
.mt-list-row:hover { background: #f8fafc; }

/* Calendar */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.cal-dow {
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #f8fafc;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cal-cell {
  min-height: 112px;
  padding: 7px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
}
.cal-cell.other { background: #f8fafc; opacity: 0.62; }
.cal-cell.drag-over { background: #eaf9ef; }
.cal-day-top { display: flex; justify-content: space-between; align-items: center; }
.cal-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.cal-cell.today .cal-num { background: #2eb85c; color: #fff; }
.cal-pill {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  border-left: 3px solid var(--p4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-pill.p1 { border-left-color: var(--p1); background: #fef2f2; }
.cal-pill.p2 { border-left-color: var(--p2); background: #fffbeb; }
.cal-pill.p3 { border-left-color: var(--p3); background: #eff6ff; }
.cal-pill.done { opacity: 0.6; text-decoration: line-through; border-left-color: #2eb85c; background: #ecfdf5; }

/* ==========================================================================
   Controls, Modals, Popovers & Photo Wallpaper Picker
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s, transform 0.1s;
}
.btn-primary { background: #2eb85c; color: #fff; }
.btn-primary:hover { background: #259e4d; }
.btn-secondary { background: #eef2f6; color: #334155; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 11px; font-size: 12px; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: #eef2f6; color: var(--text-dark); }

.text-input, .select-input {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid #dce3ec;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.12s;
}
.text-input:focus, .select-input:focus { border-color: #2eb85c; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 30, 0.54);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 16px 24px;
  z-index: 120;
  overflow-y: auto;
  animation: fadeIn 0.12s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-box.modal-lg { max-width: 830px; }
.modal-box.modal-sm { max-width: 440px; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid #eef2f6;
}
.modal-title { margin: 0; font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.modal-body { padding: 18px; max-height: 75vh; overflow-y: auto; }
.modal-footer { padding: 13px 18px; border-top: 1px solid #eef2f6; display: flex; justify-content: flex-end; gap: 8px; }

.inspector-grid { display: grid; grid-template-columns: minmax(0, 1fr) 256px; min-height: 460px; max-height: 76vh; }
.inspector-main { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.inspector-side { background: #f8fafc; border-left: 1px solid #eef2f6; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.field-label { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; display: block; }
.ins-title { width: 100%; border: none; outline: none; font-size: 19px; font-weight: 800; color: var(--text-dark); }
.ins-desc { width: 100%; border: 1.5px solid transparent; border-radius: 9px; padding: 8px 10px; margin-top: 6px; min-height: 68px; resize: vertical; background: #f8fafc; outline: none; }
.ins-desc:focus { background: #fff; border-color: #2eb85c; }
.sub-block { border-top: 1px solid #eef2f6; padding-top: 14px; }
.sub-title { font-size: 13px; font-weight: 800; color: #475569; margin-bottom: 10px; }
.comment-card { padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #eef2f6; margin-bottom: 8px; }

/* Popovers */
.popover-menu {
  position: fixed;
  min-width: 240px;
  max-width: 330px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 7px;
  z-index: 200;
  animation: popIn 0.1s ease;
}
.popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
}
.popover-item:hover { background: #f1f5f9; }
.popover-item.active { background: #eaf9ef; color: #167a38; }
.popover-item.danger { color: #dc2626; }
.popover-sep { height: 1px; background: #eef2f6; margin: 5px 0; }
.popover-heading { font-size: 11px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 10px 4px; }

/* Photographic Wallpaper Picker Swatches */
.wp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 4px; }
.wp-swatch {
  height: 68px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: flex-end;
  padding: 7px 9px;
  border: 2.5px solid transparent;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s;
}
.wp-swatch:hover { transform: scale(1.02); }
.wp-swatch.active { border-color: #2eb85c; box-shadow: 0 0 0 2px #fff inset; }

.color-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid transparent; transition: transform 0.1s; }
.color-dot:hover { transform: scale(1.12); }
.color-dot.active { border-color: #0f172a; box-shadow: 0 0 0 2px #fff inset; }

.icon-picker-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  display: grid;
  place-items: center;
  color: #475569;
}
.icon-pick-btn.active { border-color: #2eb85c; background: #eaf9ef; color: #167a38; }

.karma-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.karma-card { background: #f8fafc; border-radius: 12px; padding: 14px 10px; text-align: center; border: 1px solid #eef2f6; }
.karma-val { font-size: 22px; font-weight: 800; color: #16a34a; }
.karma-lbl { font-size: 12px; color: #64748b; }
.karma-bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; height: 132px; padding: 12px 8px 6px; background: #f8fafc; border-radius: 12px; }
.karma-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.karma-fill { width: 24px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #3cc65c, #259e4d); min-height: 4px; }

.toast-container { position: fixed; bottom: 22px; left: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: rgba(20, 28, 40, 0.94); backdrop-filter: blur(12px); color: #fff; padding: 11px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; }
.toast-btn { color: #4ade80; font-weight: 800; }

.lock-screen { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; }
.lock-card { width: 100%; max-width: 360px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(16px); border-radius: 18px; padding: 30px 26px; box-shadow: var(--shadow-lg); text-align: center; }

@media (max-width: 960px) { .hide-md { display: none; } }
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .mt-topbar { padding: 0 12px; gap: 6px; }
  .mt-view-tab span:not(.mt-mini-badge) { display: none; }
  .mt-canvas { padding: 14px 12px 24px; }
  .mt-sheet { padding: 16px; }
  .inspector-grid { grid-template-columns: 1fr; }
  .inspector-side { border-left: none; border-top: 1px solid #eef2f6; }
}
