/* Mastermind TNT - Post-it Miro Style - Transposed Matrix Design System */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;

  /* Post-it Color Palette */
  --postit-gray: #e2e8f0;
  --postit-gray-text: #1e293b;
  --postit-gray-shadow: rgba(148, 163, 184, 0.4);

  --postit-green: #bbf7d0;
  --postit-green-text: #14532d;
  --postit-green-shadow: rgba(34, 197, 94, 0.4);

  --postit-red: #fecaca;
  --postit-red-text: #7f1d1d;
  --postit-red-shadow: rgba(239, 68, 68, 0.4);

  --postit-gold: #fef08a;
  --postit-gold-text: #713f12;
  --postit-gold-shadow: rgba(245, 158, 11, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-postit: 'Caveat', 'Comic Sans MS', cursive, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  max-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: pan-x pan-y pinch-zoom;
}

/* Header & Controls Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(30, 41, 59, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 20px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
}

/* Custom Multi-Select Member Dropdown */
.multi-select-container {
  position: relative;
  display: inline-block;
}

.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  width: 220px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 500;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.multi-select-dropdown.active,
.multi-select-dropdown.open,
.multi-select-container.open .multi-select-dropdown {
  display: flex !important;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.multi-select-option:hover {
  background: var(--bg-card);
}

.multi-select-option input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent-gold);
  width: 16px;
  height: 16px;
}

/* Floating Sticky Stock Pad */
.sticky-stock-bar {
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.stock-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-gray-btn {
  width: auto !important;
  min-width: 140px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: grab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  user-select: none;
  background: var(--postit-gray);
  color: var(--postit-gray-text);
}

.stock-gray-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

.stock-gray-btn:active {
  cursor: grabbing;
}

/* Global KPI Banner (Synthese Globale) */
.kpi-banner {
  background: #1e293b;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}
.kpi-green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.kpi-gray { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.kpi-red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.kpi-empty { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* Main Workspace / Transposed Grid */
.grid-container {
  flex: 1;
  height: calc(100vh - 58px);
  max-height: calc(100vh - 58px);
  overflow: auto;
  padding: 0;
  position: relative;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.miro-table {
  border-collapse: separate;
  border-spacing: 10px;
  min-width: max-content;
  table-layout: fixed;
}

.miro-table th, .miro-table td {
  vertical-align: top;
  box-sizing: border-box;
}

/* Sticky Header Rows (Nom des personnes + Objectifs figes lors du scroll) */
.miro-table thead tr.member-super-header-row th {
  position: sticky;
  top: 0;
  z-index: 35;
  background: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.miro-table thead tr.goal-sub-header-row th {
  position: sticky;
  top: 38px;
  z-index: 30;
  background: #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Super Header Cell for Merged Member Name */
.header-member-super-cell {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  user-select: none;
}

.drag-handle {
  cursor: grab;
  margin-right: 4px;
  font-size: 11px;
  opacity: 0.4;
}

.btn-subtle-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-subtle-icon:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* Discreet Add Goal Button with Hover Animation (Visible only when unfolded) */
.btn-add-goal-discreet {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  margin-left: 6px;
}

.btn-add-goal-discreet:hover {
  opacity: 1;
  background: rgba(34, 197, 94, 0.3);
  border-color: #4ade80;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.btn-collapse-toggle {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  min-height: 24px;
  transition: background 0.15s ease;
}
.btn-collapse-toggle:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Column Drag Positioning Line Indicators */
.header-member-super-cell {
  cursor: grab;
  position: relative;
  transition: border-left 0.15s ease, border-right 0.15s ease, box-shadow 0.15s ease;
}

.header-member-super-cell:active {
  cursor: grabbing;
}

.header-member-super-cell.column-drag-over-left {
  border-left: 6px solid var(--accent-gold) !important;
  box-shadow: -6px 0 20px rgba(245, 158, 11, 0.9) !important;
}

.header-member-super-cell.column-drag-over-right {
  border-right: 6px solid var(--accent-gold) !important;
  box-shadow: 6px 0 20px rgba(245, 158, 11, 0.9) !important;
}

.header-goal-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.header-goal-desc {
  font-size: 11px;
  color: #e2e8f0;
  margin-top: 4px;
  font-weight: 600;
  line-height: 1.3;
}

.header-okr-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Stat Progress Bar in Column Header */
.stat-progress-bar {
  display: flex;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
  background: rgba(255,255,255,0.1);
}

.stat-segment-green { background: #22c55e; }
.stat-segment-gray { background: #94a3b8; }
.stat-segment-red { background: #ef4444; }
.stat-segment-empty { background: #f59e0b; opacity: 0.6; }

.stat-details-text {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

/* Brand Week Square Button S33 */
.brand-week-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  line-height: 1;
}

.brand-week-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.6);
}

.btn-toggle-week-col {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-week-col:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Week Row Header (Left sticky column) */
.week-cell {
  position: sticky;
  left: 0;
  z-index: 10;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px 8px;
  width: 95px;
  min-width: 95px;
  max-width: 95px;
  height: 120px;
  min-height: 120px;
  box-shadow: 4px 0 12px rgba(0,0,0,0.3);
  transition: width 0.2s ease, min-width 0.2s ease, max-width 0.2s ease;
}

.header-week-col {
  position: sticky;
  left: 0;
  z-index: 15;
  background: rgba(15, 23, 42, 0.95);
  width: 95px;
  min-width: 95px;
  max-width: 95px;
  transition: width 0.2s ease, min-width 0.2s ease, max-width 0.2s ease;
}

.header-week-col.collapsed,
.week-cell.collapsed {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 4px 2px !important;
}

.week-cell-content.collapsed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.week-title-compact {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-primary);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.week-cell-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.week-cell .week-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.week-cell .month-badge {
  font-size: 10px;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 700;
}

/* Current Week Row Highlighting */
tr.current-week-row {
  background: rgba(245, 158, 11, 0.08) !important;
}

tr.current-week-row .week-cell {
  background: rgba(245, 158, 11, 0.25) !important;
  border: 2px solid var(--accent-gold) !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

tr.current-week-row .drop-cell {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Post-it Drop Cell */
.drop-cell {
  background: rgba(30, 41, 59, 0.3);
  border: 2px dashed rgba(71, 85, 105, 0.4);
  border-radius: 12px;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  height: 120px;
  min-height: 120px;
  padding: 6px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.drop-cell.week-win-cell {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.3);
}

.drop-cell.collapsed-cell {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
  padding: 4px;
}

/* Non-applicable empty cells before first active post-it week */
.drop-cell.not-applicable-cell {
  opacity: 0.35;
  background: rgba(0, 0, 0, 0.04) !important;
  border-style: dotted !important;
}

body.light-mode .drop-cell.not-applicable-cell {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: #cbd5e1 !important;
}

/* Vacant Available Member Slot Columns (Semi-transparent until someone arrives) */
.header-member-super-cell.vacant-member-cell,
.header-goal-col.vacant-member-cell,
.drop-cell.vacant-member-cell {
  opacity: 0.4;
  filter: grayscale(45%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.header-member-super-cell.vacant-member-cell:hover,
.header-goal-col.vacant-member-cell:hover,
.drop-cell.vacant-member-cell:hover,
.drop-cell.vacant-member-cell.drag-over {
  opacity: 0.85;
  filter: grayscale(0%);
}

.drop-cell.drag-over {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-gold);
  transform: scale(1.02);
}

/* Milestone / Forecast Objective (Discrete Gray Style with Finish Flag 🏁) */
.cell-milestone-text {
  font-size: 11px;
  font-style: italic;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 6px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  line-height: 1.3;
  word-break: break-word;
  overflow: hidden;
  user-select: none;
  transition: color 0.2s ease;
}

.cell-milestone-text:hover {
  color: #f8fafc;
}

.milestone-comment-preview {
  font-size: 10px;
  font-style: normal;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  padding: 2px 4px;
  margin-top: 2px;
  line-height: 1.2;
}

.milestone-flag-icon {
  font-style: normal;
  font-size: 12px;
  flex-shrink: 0;
}

/* Discrete Milestone Badge inside Post-it Card when both exist */
.postit-milestone-tag {
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.85);
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s ease;
}

.postit-milestone-tag:hover {
  background: rgba(0, 0, 0, 0.16);
  color: #000;
}

/* Post-it Card (Miro Sticky Note Style) */
.postit-card {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: grab;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(-1deg);
}

.postit-card:hover {
  transform: rotate(0deg) scale(1.04);
  z-index: 15;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.postit-card:active {
  cursor: grabbing;
}

.postit-card.gray {
  background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
  color: var(--postit-gray-text);
  box-shadow: 2px 4px 10px var(--postit-gray-shadow);
}

.postit-card.green {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--postit-green-text);
  box-shadow: 2px 4px 10px var(--postit-green-shadow);
}

.postit-card.red {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: var(--postit-red-text);
  box-shadow: 2px 4px 10px var(--postit-red-shadow);
}

.postit-card.week-win-card {
  background: linear-gradient(135deg, #fef9c3, #fef08a);
  color: var(--postit-gold-text);
  box-shadow: 2px 4px 10px var(--postit-gold-shadow);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.postit-content {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  margin-top: 2px;
  flex: 1;
}

.postit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
  font-size: 11px;
  opacity: 0.95;
  width: 100%;
}

.status-toggle-btn {
  cursor: pointer;
  user-select: none;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.status-toggle-btn:hover {
  transform: scale(1.08);
  background: rgba(0,0,0,0.12);
}

.postit-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.7;
  padding: 2px;
  border-radius: 4px;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  opacity: 1;
  background: rgba(0,0,0,0.12);
}

/* Collapsed Cell Container (Week Win + Status Bar underneath) */
.collapsed-cell-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 4px;
}

.collapsed-win-container {
  flex: 1;
  min-height: 70px;
}

/* Sleek Stacked Color Synthesis Bar in Collapsed Cell Mode */
.collapsed-synthesis-bar {
  width: 100%;
  height: 12px;
  min-height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-top: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: help;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.collapsed-synthesis-bar:hover {
  transform: scaleY(1.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  border-color: var(--accent-gold);
}

body.light-mode .collapsed-synthesis-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Sleek Stacked Color Synthesis Bar in Header Cells */
.header-synthesis-bar {
  width: 100%;
  height: 10px;
  min-height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  margin-top: 6px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: help;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-synthesis-bar:hover {
  transform: scaleY(1.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  border-color: var(--accent-gold);
}

body.light-mode .header-synthesis-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Modal & Bottom Sheet for Mobile */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000000 !important;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}

.modal-backdrop.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  width: 100%; max-width: 480px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transform: translateY(20px); transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-content { transform: translateY(0); }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }

.form-control {
  width: 100%; background: var(--bg-primary); border: 1px solid var(--border-color);
  border-radius: 8px; padding: 12px; color: var(--text-primary); font-family: inherit; font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }

/* SUPER MOBILE UX RESPONSIVE RULES */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }
  
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 10px; }

  .sticky-stock-bar {
    width: 100%;
    justify-content: space-between;
  }

  .header-controls {
    display: flex;
    overflow: visible;
    padding-bottom: 4px;
  }

  /* Bottom Drawer Modal on Mobile */
  .modal-backdrop {
    align-items: flex-end;
  }
  
  .modal-content {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    padding: 20px;
    transform: translateY(100%);
  }

  .modal-backdrop.active .modal-content {
    transform: translateY(0);
  }

  .modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 16px auto;
  }

}

/* Mobile UX Streamlining: Hide Master Console buttons on mobile screens */
@media (max-width: 768px) {
  #headerSuperAdminBtn,
  #portalSuperAdminBtn {
    display: none !important;
  }
}

/* Square Subtle Post-it Stock Block in Header Cell (Taille doublee ~68px) */
.stock-square-postit {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  border-radius: 8px;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 2px dashed rgba(148, 163, 184, 0.5);
  box-shadow: 3px 5px 12px rgba(0,0,0,0.35);
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 6px auto;
  cursor: grab;
  user-select: none;
  transform: rotate(-3deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stock-square-postit:hover {
  transform: rotate(0deg) scale(1.1);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
}

.stock-square-postit:active {
  cursor: grabbing;
}

.stock-square-postit span {
  font-size: 12px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.7);
  text-transform: lowercase;
  letter-spacing: 0.5px;
}

/* Theme Toggle Button (Jour / Nuit) */
.btn-theme-toggle {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-theme-toggle:hover {
  background: var(--border-color);
  transform: scale(1.1) rotate(15deg);
}

/* Mode Jour (Light Mode) Theme Override - Haute Lisibilité */
body.light-mode {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #f1f5f9;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
}

body.light-mode .app-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: #cbd5e1;
}

body.light-mode .header-member-super-cell {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.light-mode .miro-table thead tr.member-super-header-row th {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1;
}

body.light-mode .miro-table thead tr.goal-sub-header-row th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1;
}

body.light-mode .header-goal-col {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode .header-goal-title {
  color: #d97706 !important;
  font-weight: 800 !important;
}

body.light-mode .header-goal-desc {
  color: #0f172a !important;
  font-weight: 700 !important;
}

body.light-mode .header-okr-badge {
  background: rgba(217, 119, 6, 0.15) !important;
  color: #b45309 !important;
  font-weight: 800 !important;
}

body.light-mode .stat-details-text {
  color: #475569 !important;
  font-weight: 700 !important;
}

body.light-mode .header-week-col,
body.light-mode .week-cell {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: #cbd5e1;
}

body.light-mode .drop-cell {
  background: rgba(241, 245, 249, 0.6);
  border-color: rgba(148, 163, 184, 0.5);
}

body.light-mode .kpi-banner {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-bottom-color: #cbd5e1 !important;
}

body.light-mode .sync-status-pill {
  background: rgba(255, 255, 255, 0.9);
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode .stock-square-postit {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-color: rgba(100, 116, 139, 0.5);
}

body.light-mode .stock-square-postit span {
  color: rgba(30, 41, 59, 0.7);
}

/* Lean Skipper Password Auth Landing Overlay */
.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0f172a;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(13, 110, 253, 0.08) 0%, transparent 50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.light-mode .auth-overlay {
  background: #f8fafc;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(13, 110, 253, 0.1) 0%, transparent 50%);
}

.auth-overlay.authenticated {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.auth-card {
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
}

body.light-mode .auth-card {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-logo-badge {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.auth-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-top: 4px;
}

.auth-brand-tagline {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
  opacity: 0.6;
}

.auth-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.auth-input-group {
  position: relative;
  margin-bottom: 16px;
}

.auth-input {
  width: 100%;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 44px 14px 16px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.auth-eye-btn:hover {
  opacity: 1;
}

.auth-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.45);
}

.auth-footer-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
}

/* Header Click Info Badge */
.header-click-info-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed var(--accent-gold);
  border-radius: 8px;
  padding: 4px 6px;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  cursor: help;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

body.light-mode .header-click-info-badge {
  background: rgba(217, 119, 6, 0.12);
  border-color: #d97706;
  color: #0f172a;
}

.header-click-info-badge:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: scale(1.04);
}

/* Mobile Responsiveness for Header Menu & Controls */
.mobile-menu-toggle-btn {
  display: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Minimalist Navigation Tabs: Roadmap & Scoreboard */
.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.5);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

body.light-mode .nav-tabs-wrapper {
  background: rgba(241, 245, 249, 0.9);
  border-color: #cbd5e1;
}

.nav-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.08);
}

body.light-mode .nav-tab-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.nav-tab-btn.active {
  background: var(--accent-gold);
  color: #000000;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transform: scale(1.04);
}

/* Discreet Theme Switch Toggle (Sun - Switch - Moon) */
.theme-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  user-select: none;
  cursor: pointer;
}

body.light-mode .theme-switch-wrapper {
  background: #ffffff;
  border-color: #cbd5e1;
}

.theme-switch-icon {
  font-size: 13px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-switch-icon.active {
  opacity: 1;
  transform: scale(1.15);
}

.theme-switch-track {
  width: 38px;
  height: 20px;
  background: #475569;
  border-radius: 10px;
  border: none;
  position: relative;
  cursor: pointer;
  padding: 2px;
  transition: background 0.25s ease;
  outline: none;
}

body.light-mode .theme-switch-track {
  background: #cbd5e1;
}

.theme-switch-track[aria-checked="true"] {
  background: var(--accent-gold);
}

.theme-switch-thumb {
  display: block;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(0);
}

.theme-switch-track[aria-checked="true"] .theme-switch-thumb {
  transform: translateX(18px);
}

/* Sync Status Circle Only Button */
.sync-status-circle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode .sync-status-circle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

.sync-status-circle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Dedicated Analytics Dashboard Page Layout */
.dashboard-view-page {
  flex: 1;
  height: calc(100vh - 58px);
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-primary);
}

.dashboard-content-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.light-mode .dashboard-top-bar {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.dashboard-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.dashboard-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.dashboard-period-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* Dashboard KPI Cards Grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.dashboard-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

body.light-mode .dashboard-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.dashboard-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-card-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.dashboard-card-sub {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

/* Pareto Card */
.pareto-card {
  grid-column: span 1;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dashboard-card-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.badge-tag {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}

.pareto-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.pareto-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.pareto-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  overflow: hidden;
}

body.light-mode .pareto-bar-track {
  background: #e2e8f0;
}

.pareto-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
}

/* Mood Ranking Section Styles */
.mood-ranking-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 10px;
}

body.light-mode .mood-ranking-row {
  background: rgba(0, 0, 0, 0.02);
  border-color: #e2e8f0;
}

.mood-ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.mood-ranking-scores {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.mood-score-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mood-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

body.light-mode .mood-bar-track {
  background: #e2e8f0;
}

.mood-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f59e0b, #10b981);
}

/* Unified Comparative Bar Chart in Dashboard */
.comparative-chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: background 0.2s ease;
}

.comparative-chart-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.light-mode .comparative-chart-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .comparative-chart-row:hover {
  background: #f1f5f9;
}

.comparative-chart-rank {
  width: 52px;
  min-width: 52px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

.comparative-chart-name {
  width: 120px;
  min-width: 120px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.comparative-chart-track {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  position: relative;
}

body.light-mode .comparative-chart-track {
  background: #e2e8f0;
}

.stat-segment-green,
.stat-segment-gray,
.stat-segment-red,
.stat-segment-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  box-sizing: border-box;
  font-size: 10px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.85);
  transition: width 0.4s ease;
  overflow: hidden;
}

.stat-segment-green { background: #22c55e; }
.stat-segment-gray { background: #94a3b8; color: #000; }
.stat-segment-red { background: #ef4444; color: #fff; }
.stat-segment-empty { background: rgba(245, 158, 11, 0.35); color: #fbbf24; }

.comparative-chart-presence {
  width: 135px;
  min-width: 135px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  white-space: nowrap;
}

body.light-mode .comparative-chart-presence {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.comparative-chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-box.green { background: #22c55e; }
.legend-box.gray { background: #94a3b8; }
.legend-box.red { background: #ef4444; }
.legend-box.empty { background: rgba(245, 158, 11, 0.5); border: 1px solid #f59e0b; }

.member-perf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-perf-name {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-perf-score {
  font-size: 16px;
  font-weight: 900;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  padding: 4px 10px;
  border-radius: 10px;
}

.rank-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
}

/* Mood Picker Buttons (LinkedIn-style reactions) */
.mood-picker-btn {
  font-size: 28px;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  opacity: 0.5;
}

.mood-picker-btn:hover {
  transform: scale(1.3);
  opacity: 1;
}

.mood-picker-btn.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  transform: scale(1.25);
  opacity: 1;
}

body.light-mode .mood-picker-btn.selected {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}

/* Mood badge on post-it card */
.mood-badge {
  font-size: 16px;
  display: inline-block;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .brand-text {
    display: none !important;
  }

  .brand {
    gap: 6px;
  }

  .brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .multi-select-container {
    display: flex !important;
    flex: 1;
    max-width: 50vw;
  }

  .multi-select-container .btn {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    overflow: visible !important;
  }

  .mobile-menu-toggle-btn {
    display: none !important;
  }

  .header-controls {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
    overflow: visible !important;
  }

  /* Adjust sticky table headers on mobile so they stick smoothly right under app-header */
  .miro-table thead tr.member-super-header-row th {
    top: 0 !important;
    z-index: 35;
  }

  .miro-table thead tr.goal-sub-header-row th {
    top: 38px !important;
    z-index: 30;
  }

  .multi-select-dropdown {
    position: fixed;
    top: 54px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 900;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 12px 40px rgba(0,0,0,0.85);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 12px;
    pointer-events: auto;
  }

  body.light-mode .multi-select-dropdown {
    background: #ffffff;
    border-color: #d97706;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  }

  .multi-select-option {
    padding: 10px 14px;
    font-size: 15px;
  }

  .grid-container {
    padding: 0 0 16px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  .miro-table {
    border-spacing: 6px;
    width: max-content !important;
    min-width: max-content !important;
    table-layout: fixed !important;
  }
}

/* PORTAL MULTI-GROUP LANDING PAGE STYLES */
.portal-container {
  padding: 30px 24px;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  height: 100vh;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 24px;
}

.portal-container.active {
  display: flex;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.portal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.portal-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-stats-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.portal-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.group-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.group-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.group-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.group-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}

.group-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.group-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}




/* Clean Single Line Goal Header: Title Left, OKR Badge Right */
.header-goal-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  width: 100%;
}

.header-goal-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.header-okr-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .header-goal-title {
  color: #d97706 !important;
}

body.light-mode .header-okr-badge {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #b45309 !important;
  border-color: rgba(217, 119, 6, 0.25) !important;
}

.header-goal-desc {
  font-size: 11px;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.light-mode .header-goal-desc {
  color: #334155 !important;
}
