/* ==============================================================================
   88LAB CONSULTORIA & GESTÃO ESTRATÉGICA - DESIGN SYSTEM & SAAS APP
   Interface clara com navegação lateral e hierarquia de informações
   ============================================================================== */

:root {
  --bg-primary: #f8f7f4;
  --bg-secondary: #f0eeea;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: #f8f7f4;
  --border-color: #e9e7e2;
  --border-highlight: #d0d8d7;

  --accent-gold: #287780;
  --accent-gold-glow: rgba(40, 119, 128, 0.12);
  --accent-cyan: #237d89;
  --accent-blue: #2463a1;
  --accent-emerald: #16745a;
  --accent-rose: #bc354d;
  --accent-amber: #9c6409;
  --accent-purple: #7752a3;

  --text-main: #19242d;
  --text-muted: #617182;
  --text-dim: #617182;

  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-card: 0 3px 16px rgba(31, 40, 38, 0.035);
  --shadow-glow: 0 0 25px rgba(229, 184, 105, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(229, 184, 105, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #d0d8d7;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Typography Helpers */
.serif-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(229, 184, 105, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 184, 105, 0.3);
  font-weight: 600;
}

/* Client Selector Toolbar (for Consultant) */
.client-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9f7;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.client-switcher-wrap label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.client-select {
  background: transparent;
  color: var(--text-main);
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.client-select option {
  background: #fff;
  color: var(--text-main);
}

/* User & Profile Controls */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-gold);
  color: #f8f7f4;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background: #f1c77f;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(229, 184, 105, 0.3);
}

.btn-secondary {
  background: #edf2f0;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: #e9eeec;
  border-color: var(--border-highlight);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: #f1f3f1;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* User Profile Badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #7752a3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.75rem;
}
.user-info-text {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-main);
}
.user-role {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Sub-header / Company Context Banner */
.workspace-banner {
  background: linear-gradient(180deg, rgba(22, 27, 38, 0.6) 0%, rgba(10, 12, 16, 0.3) 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.workspace-title-box h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.company-segment-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 500;
}

.workspace-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.workspace-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.workspace-meta-item strong {
  color: var(--text-main);
}

/* Cycle Status Indicator (Diagnóstico -> Plano -> Execução -> Monitoramento) */
.cycle-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.cycle-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}
.cycle-step.active {
  color: var(--accent-gold);
  font-weight: 700;
}
.cycle-step.completed {
  color: var(--accent-emerald);
}
.cycle-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.cycle-separator {
  color: var(--border-highlight);
  font-size: 0.8rem;
}

/* Navigation Tabs */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 2rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 12, 16, 0.4);
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}
.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.tab-count {
  font-size: 0.7rem;
  background: #e9eeec;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}
.tab-btn.active .tab-count {
  background: rgba(229, 184, 105, 0.2);
  color: var(--accent-gold);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 1.75rem 2rem 3rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Header / Action bar */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ==============================================================================
   TAB 1: VISÃO GERAL & DIAGNÓSTICO
   ============================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
}
.kpi-card.gold::before {
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}
.kpi-card.cyan::before {
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}
.kpi-card.emerald::before {
  background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0.5rem 0 0.25rem 0;
}
.kpi-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kpi-progress-bar {
  height: 6px;
  width: 100%;
  background: #e9e7e2;
  border-radius: var(--radius-full);
  margin-top: 0.75rem;
  overflow: hidden;
}
.kpi-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
}

/* Strategic Grid: SWOT & OKRs */
.strategic-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}
@media (max-width: 1024px) {
  .strategic-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* SWOT Matrix Grid */
.swot-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .swot-matrix {
    grid-template-columns: 1fr;
  }
}

.swot-quadrant {
  background: #f8faf9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.swot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.swot-strengths .swot-header { color: var(--accent-emerald); }
.swot-weaknesses .swot-header { color: var(--accent-amber); }
.swot-opportunities .swot-header { color: var(--accent-cyan); }
.swot-threats .swot-header { color: var(--accent-rose); }

.swot-list {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.swot-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.4;
}
.swot-bullet {
  color: var(--text-dim);
  margin-top: 0.1rem;
}

/* OKR List */
.okr-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.okr-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.okr-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.875rem;
}
.okr-category {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.okr-numbers {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.4rem 0;
  display: flex;
  justify-content: space-between;
}

/* ==============================================================================
   TAB 2: ORGANIZADOR DE TAREFAS (5W2H / KANBAN)
   ============================================================================== */
.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  background: #f8f9f7;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  background: #e9e7e2;
  color: var(--text-main);
}
.filter-btn.active {
  background: rgba(229, 184, 105, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.search-input {
  background: #f8f9f7;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  outline: none;
  min-width: 220px;
}
.search-input:focus {
  border-color: var(--accent-gold);
}

/* Kanban Board Columns */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(280px, 1fr));
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  align-items: start;
}

.kanban-column {
  background: #f0efec;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.column-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.column-count {
  background: #e9eeec;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

/* Task Card */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.task-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.role-badge.consultor {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.role-badge.cliente {
  background: rgba(229, 184, 105, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 184, 105, 0.3);
}

.priority-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.priority-tag.low { background: rgba(148, 163, 184, 0.15); color: #617182; }
.priority-tag.medium { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.priority-tag.high { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.priority-tag.urgent { background: rgba(244, 63, 94, 0.2); color: #bc354d; font-weight: 800; }

.task-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.task-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid #f1f3f1;
}
.task-due-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.task-due-date.overdue {
  color: var(--accent-rose);
  font-weight: 700;
}
.task-checklist-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
}

/* Move Card Action Buttons (Quick Shift) */
.card-quick-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.btn-shift {
  background: #f1f3f1;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  text-align: center;
}
.btn-shift:hover {
  background: #d0d8d7;
  color: var(--text-main);
}

/* ==============================================================================
   TAB 3: CENTRAL DE DOCUMENTOS (UPLOAD BIDIRECIONAL)
   ============================================================================== */
.upload-dropzone {
  background: #fff;
  border: 2px dashed rgba(229, 184, 105, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2rem;
}
.upload-dropzone:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.04);
}
.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-gold);
}
.dropzone-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}
.dropzone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Category Filters */
.doc-categories {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* Documents Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.docs-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: #f6f7f5;
}
.docs-table td {
  padding: 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}
.docs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.file-info-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.file-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.file-name-title {
  font-weight: 600;
  color: var(--text-main);
}
.file-subname {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==============================================================================
   TAB 4: CALENDÁRIO DE RITOS & PRAZOS
   ============================================================================== */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}
@media (max-width: 1024px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.current-month-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.cal-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-bottom: 0.5rem;
}
.cal-day {
  min-height: 75px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #f8f9f7;
  border-radius: var(--radius-md);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}
.cal-day:hover {
  background: #edf2f0;
  border-color: var(--border-highlight);
}
.cal-day.today {
  border-color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.05);
}
.cal-day.empty {
  opacity: 0.2;
  pointer-events: none;
}
.cal-day-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cal-day.today .cal-day-number {
  color: var(--accent-gold);
  font-weight: 800;
}
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cal-event-dot {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event-dot.task {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
.cal-event-dot.meeting {
  background: rgba(40, 119, 128, 0.12);
  color: #fde047;
}

/* Calendar Sidebar (Upcoming Events) */
.upcoming-events-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.event-item {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.75rem 1rem;
}
.event-item.meeting {
  border-left-color: var(--accent-cyan);
}
.event-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}
.event-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==============================================================================
   MODALS (POPUP DIALOGS)
   ============================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: #fff;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  padding: 1.75rem;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-main);
}

/* Form Controls inside Modals */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  background: #f8f9f7;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.07);
}
.form-control option {
  background: #fff;
  color: var(--text-main);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: #fff;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: var(--text-main);
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlide 0.3s ease-out;
}
.toast.success { border-left: 4px solid var(--accent-emerald); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Supabase Connection Alert Pill */
.supabase-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: #f1f3f1;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.supabase-status-pill.connected {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}
.supabase-status-pill.demo {
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }
  .workspace-banner {
    padding: 1rem;
  }
  .tabs-nav {
    padding: 0.5rem 1rem 0 1rem;
  }
  .main-content {
    padding: 1rem;
  }
}

/* Workspace shell: warm neutrals, teal actions and a persistent navigation. */
:root {
  color-scheme: light;
  --sidebar-width: 224px;
  --surface-sidebar: #efebe3;
  --surface-teal: #eaf4f2;
  --shadow-card: 0 3px 16px rgba(31, 40, 38, .035);
  --transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body { background: var(--bg-primary); overflow-x: visible; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled, select:disabled { cursor: default; opacity: .75; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
.ui-icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 3000; background: white; color: var(--accent-gold); padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-container { display: block; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 200; display: flex; flex-direction: column; padding: 30px 14px 20px; background: var(--surface-sidebar); border-right: 1px solid #e6e1d8; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 28px; margin-bottom: 25px; color: var(--text-main); text-decoration: none; border-bottom: 1px solid #dfdbd3; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: #287780; box-shadow: 0 3px 7px #28778020; color: white; font-size: 19px; font-weight: 800; letter-spacing: -1px; }
.brand-wordmark { display: flex; flex-direction: column; gap: 1px; }
.brand-wordmark strong { font-size: 15px; letter-spacing: -.5px; }
.brand-wordmark > span { font-size: 10px; letter-spacing: 1.1px; color: var(--text-muted); }
.sidebar-section-label { padding: 0 15px 12px; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: #6e746f; }
.tabs-nav { flex-direction: column; padding: 0; gap: 7px; background: transparent; border: 0; overflow: visible; }
.tab-btn { width: 100%; min-height: 46px; padding: 11px 14px; border: 0; border-radius: 10px; color: #4d5c66; font-size: 13px; font-weight: 500; gap: 11px; text-align: left; white-space: normal; }
.tab-btn:hover, .sidebar-action:hover { background: #e3e6e0; color: #1b535b; }
.tab-btn.active { color: white; background: #287780; box-shadow: 0 3px 8px #28778015; }
.tab-btn[data-tab="calendar"] { font-size: 12px; }
.tab-count { margin-left: auto; background: #e2e4de; color: #58656b; font-size: 10px; min-width: 21px; text-align: center; }
.tab-btn.active .tab-count { background: #ffffff24; color: white; }
.sidebar-footer { margin-top: auto; padding: 30px 0 0; }
.workspace-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 12px 24px; padding: 16px 0; border-bottom: 1px solid #dfdbd3; font-size: 11px; color: var(--text-muted); line-height: 1.9; }
.workspace-note strong { font-weight: 500; color: #50625e; }
.workspace-note-dot { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #4d9387; }
.sidebar-action { display: flex; align-items: center; width: 100%; gap: 11px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 8px; background: transparent; color: #4d5c66; font-size: 12px; cursor: pointer; transition: var(--transition); }
.workspace-shell { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.navbar { position: relative; padding: 16px 32px; min-height: 78px; gap: 20px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--border-color); }
.client-switcher-wrap { background: transparent; border: 0; padding: 0; min-width: 0; gap: 12px; }
.client-switcher-wrap label { font-size: 12px; letter-spacing: 0; text-transform: none; color: #4d5c66; }
.client-select { border: 1px solid #e1e5e4; background: white; border-radius: 9px; color: var(--text-main); font-size: 12px; font-weight: 500; padding: 11px 30px 11px 12px; width: min(29vw, 340px); text-overflow: ellipsis; }
.client-select:disabled { opacity: 1; background: #f2f3f0; }
.nav-actions { gap: 24px; margin-left: auto; flex-shrink: 0; }
.supabase-status-pill { font-family: inherit; white-space: nowrap; font-size: 10px; min-height: 30px; padding: 5px 12px; border: 0; }
.supabase-status-pill.demo { color: #8a5906; background: #fff0cf; }
.supabase-status-pill.connected { color: #126247; background: #e7f3ed; }
.user-badge { border-radius: 0; border: 0; border-left: 1px solid var(--border-color); padding: 0 0 0 22px; min-height: 44px; background: transparent; text-align: left; gap: 9px; cursor: pointer; }
.user-badge:hover { background: #efeeeb; }
.user-avatar { width: 34px; height: 34px; font-size: 15px; color: #7752a3; background: #eee3f5; font-weight: 500; }
.user-name { font-size: 12px; color: var(--text-main); }
.user-role { font-size: 10px; }
.user-badge > [data-icon] { margin-left: 9px; color: var(--text-muted); }
.user-badge > [data-icon] .ui-icon { width: 14px; }
.workspace-banner { padding: 27px 32px 24px; background: transparent; border: 0; gap: 16px; align-items: center; }
.workspace-title-box { flex: 1; min-width: 0; }
.workspace-breadcrumb { display: flex; gap: 9px; margin-bottom: 8px; font-size: 11px; color: var(--text-muted); }
.workspace-breadcrumb > :last-child { color: #495e68; }
.workspace-title-box h1 { font-size: clamp(21px, 2vw, 28px); color: #17232e; font-weight: 650; letter-spacing: -1px; line-height: 1.3; }
.workspace-meta { margin-top: 9px; font-size: 11px; gap: 12px; flex-wrap: wrap; }
.workspace-meta-item { gap: 4px; }
.workspace-meta-item strong { font-weight: 400; color: var(--text-muted); }
.company-segment-tag { padding: 0; background: none; border: 0; font-size: 11px; color: var(--text-muted); }
.workspace-meta-item::before { content: '·'; margin-right: 5px; }
.workspace-actions { display: flex; gap: 9px; align-self: center; }
.btn { min-height: 40px; font-weight: 500; padding: 10px 16px; font-size: 12px; border-radius: 9px; }
.btn-primary { background: #287780; border-color: #287780; color: #fff; }
.btn-primary:hover { background: #1e6169; border-color: #1e6169; color: #fff; box-shadow: 0 3px 8px #28778020; transform: none; }
.btn-secondary { background: white; border-color: #dce2df; }
.btn-secondary:hover { background: #f0f5f2; border-color: #b6ccc5; }
.btn-ghost:hover { color: var(--text-main); background: #e9eeeb; }
.btn-sm { min-height: 36px; padding: 8px 11px; font-size: 11px; }
.btn .ui-icon { width: 15px; height: 15px; }
.cycle-progress { flex: 0 0 100%; justify-content: flex-end; gap: 8px; background: transparent; padding: 8px 0 0; border: 0; }
.cycle-step { font-size: 10px; gap: 6px; color: var(--text-muted); white-space: nowrap; }
.cycle-step.active { color: #216c74; }
.cycle-step.completed { color: #3e6e65; }
.cycle-step-dot { width: 20px; height: 20px; display: grid; place-items: center; background: transparent; border: 1px solid #c8d0d5; font-size: 10px; color: #617182; }
.cycle-step.active .cycle-step-dot { background: #287780; border-color: #287780; color: white; }
.cycle-step.completed .cycle-step-dot { background: #deeee7; border-color: #deeee7; color: #237662; }
.cycle-separator { width: 24px; height: 1px; background: #d7dfdc; }
.main-content { max-width: 1680px; padding: 6px 32px 32px; min-width: 0; }
.main-content:focus { outline: none; }
.section-header { margin-bottom: 18px; gap: 12px; }
.section-title { color: var(--text-main); font-size: 18px; font-weight: 650; letter-spacing: -.5px; }
.section-subtitle { font-size: 12px; line-height: 1.6; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { padding: 20px 18px; border-radius: 14px; backdrop-filter: none; }
.kpi-card::before { display: none; }
.kpi-card:hover { transform: none; border-color: var(--border-color); }
.kpi-label { justify-content: flex-end; flex-direction: row-reverse; gap: 10px; color: #485e6b; text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 500; line-height: 1.5; }
.kpi-label > span:last-child { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #edf6f2; color: #287780; flex-shrink: 0; }
.kpi-label .ui-icon { width: 17px; height: 17px; }
.kpi-value { font-size: clamp(24px, 2.2vw, 32px); color: #17232e; letter-spacing: -1px; margin: 14px 0 3px; line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi-desc { font-size: 11px; line-height: 1.6; }
.kpi-progress-bar { background: #e9eef1; height: 6px; margin-top: 14px; }
.kpi-progress-fill { background: #2d8790; }
.strategic-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.card { padding: 20px; border-radius: 14px; backdrop-filter: none; min-width: 0; }
.card-header { gap: 12px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.card-title { font-size: 14px; color: var(--text-main); gap: 10px; line-height: 1.5; }
.card-title > [data-icon] { width: 34px; height: 34px; border-radius: 50%; color: #287780; background: #f0f6f6; flex-shrink: 0; }
.card-title .ui-icon { width: 19px; height: 19px; }
.card-subtitle { color: var(--text-muted); font-size: 11px; margin-left: 44px; margin-top: -4px; }
.review-badge { display: flex; align-items: center; gap: 5px; background: #edf5f8; color: #306276; font-size: 9px; border-radius: 20px; padding: 5px 9px; margin-top: 5px; }
.review-badge .ui-icon { width: 12px; height: 12px; }
.swot-matrix { gap: 12px; }
.swot-quadrant { padding: 16px; border-radius: 10px; }
.swot-strengths { background: #f0f8f3; border-color: #dceee4; }
.swot-weaknesses { background: #fff8ec; border-color: #f2e6cd; }
.swot-opportunities { background: #eff7fe; border-color: #dcecfb; }
.swot-threats { background: #fff2f3; border-color: #f6dfe3; }
.swot-header { font-size: 12px; margin-bottom: 12px; gap: 8px; font-weight: 600; }
.swot-list { font-size: 11px; gap: 8px; }
.swot-item { line-height: 1.65; }
.swot-empty { color: var(--text-muted); font-size: 11px; padding: 10px 0; }
.okr-list { gap: 12px; }
.okr-item { background: #fafbf9; padding: 16px; }
.okr-title-row { font-size: 12px; gap: 10px; align-items: flex-start; }
.okr-category { font-size: 9px; padding-top: 3px; }
.okr-numbers { font-size: 11px; gap: 8px; flex-wrap: wrap; }
.empty-state { min-height: 245px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 18px; }
.empty-state-icon { width: 72px; height: 72px; display: grid; place-items: center; background: #f3f5f4; color: #617182; border-radius: 50%; margin-bottom: 20px; }
.empty-state-icon .ui-icon { width: 32px; height: 32px; }
.empty-state strong { font-size: 13px; font-weight: 600; }
.empty-state p { max-width: 235px; margin-top: 8px; font-size: 11px; line-height: 1.8; color: var(--text-muted); }
.workspace-footer { display: flex; justify-content: space-between; gap: 16px; margin: auto 32px 0; padding: 18px 0; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 10px; }
.filter-btn { min-height: 38px; display: inline-flex; gap: 6px; align-items: center; text-transform: none; }
.filter-btn .ui-icon { width: 14px; height: 14px; }
.filter-btn.active { background: #e5f0ec; border-color: #a8c7bc; color: #215c4d; }
.search-input { min-height: 40px; background: white; border-color: #d5ddda; }
.kanban-board { gap: 14px; grid-template-columns: repeat(5, minmax(240px, 1fr)); }
.kanban-column { padding: 14px; }
.column-title { font-size: 11px; text-transform: none; letter-spacing: 0; }
.task-card:hover { transform: none; box-shadow: var(--shadow-card); }
.role-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; }
.role-badge .ui-icon { width: 12px; height: 12px; }
.role-badge.cliente { background: #ecf3e9; color: #49623a; border-color: #dbe6d4; }
.role-badge.consultor { background: #eaf3f7; color: #316178; border-color: #d4e5ed; }
.priority-tag.low { color: #536273; }.priority-tag.medium { color: #24579a; }.priority-tag.high { color: #8e5b08; }.priority-tag.urgent { color: #ac2542; }
.task-card-title { font-size: 12px; margin-top: 10px; }
.btn-shift { min-height: 36px; background: white; }.btn-shift:hover { color: #215c4d; background: #e5f0ec; }
.upload-dropzone { width: 100%; font-family: inherit; color: inherit; border: 1px dashed #a1bbb3; margin-bottom: 24px; }
.dropzone-icon .ui-icon { width: 32px; height: 32px; }
.docs-table { min-width: 750px; }.docs-table th { font-size: 10px; }.docs-table td { font-size: 12px; }
.calendar-layout { grid-template-columns: minmax(0, 1fr) 280px; }
.calendar-card, .upcoming-events-card { padding: 20px; min-width: 0; box-shadow: var(--shadow-card); }
.calendar-nav { gap: 12px; flex-wrap: wrap; }.current-month-label { font-size: 16px; }
.calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { background: #fafbf9; border-color: #e8ece8; cursor: default; }
.cal-day.today { background: #edf5f0; }.cal-event-dot.task { background: #eaf1fc; color: #305a8b; }.cal-event-dot.meeting { background: #e9f3eb; color: #376349; }
.cal-event-dot .ui-icon { width: 10px; height: 10px; }
.modal-overlay { background: #17272e66; backdrop-filter: blur(4px); }
.modal-card { box-shadow: 0 20px 80px #17272e26; padding: 28px; }
.modal-close { min-width: 44px; min-height: 44px; border-radius: 8px; }
.form-label { font-size: 11px; text-transform: none; letter-spacing: 0; color: #425b65; }
.form-control { background: #fff; border-color: #cad4d0; min-height: 44px; font-size: 13px; }
.modal-actions { flex-wrap: wrap; }.toast { box-shadow: var(--shadow-card); }
.clients-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.client-card h3 { font-size: 16px; margin: 16px 0 4px; }.client-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.client-card .btn { width: 100%; }.client-card-current { border-color: #8eb9ad; }.client-card-label { font-size: 10px; color: #276d60; margin-left: 8px; }
.menu-toggle, .sidebar-backdrop { display: none; }
@media (min-width: 1600px) { .main-content { padding-top: 18px; }.workspace-banner { padding-top: 36px; padding-bottom: 30px; } }
@media (max-width: 1200px) {
  :root { --sidebar-width: 224px; }
  .navbar { padding: 16px 24px; }.nav-actions { gap: 14px; }.user-badge { padding-left: 14px; }
  .workspace-banner { padding-left: 24px; padding-right: 24px; }.main-content { padding-left: 24px; padding-right: 24px; }
  .kpi-card { padding: 18px 14px; }.kpi-label { gap: 7px; font-size: 10px; }.kpi-label > span:last-child { width: 28px; height: 28px; }
  .strategic-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }.card { padding: 18px; }.review-badge { font-size: 8px; }
  .workspace-meta-item:last-child { display: none; }.calendar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .user-info-text { display: none; }.user-badge > [data-icon] { display: none; }
  .workspace-title-box h1 { font-size: 23px; }.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strategic-grid { grid-template-columns: 1fr; }.kpi-label { font-size: 12px; }.kpi-value { font-size: 28px; }
  .workspace-actions { align-self: flex-start; padding-top: 22px; }.workspace-actions .btn { padding: 10px 12px; font-size: 11px; }
}
@media (max-width: 760px) {
  .sidebar { width: 236px; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease; z-index: 500; }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .workspace-shell { margin-left: 0; }.menu-toggle { display: inline-flex; min-width: 44px; min-height: 44px; padding: 10px; }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; background: #17272e66; z-index: 400; border: 0; width: 100%; height: 100%; }
  body.drawer-open, body.modal-open { overflow: hidden; }
  .navbar { flex-wrap: nowrap; padding: 12px 16px; min-height: 70px; gap: 8px; }.client-switcher-wrap { flex: 1; gap: 0; }.client-switcher-wrap label { display: none; }
  .client-select { width: 100%; min-width: 0; }.nav-actions { gap: 8px; }.supabase-status-pill { display: none; }.user-badge { border: 0; padding: 0 0 0 4px; }
  .workspace-banner { padding: 24px 20px 22px; gap: 20px; }.workspace-title-box { flex-basis: 100%; }.workspace-title-box h1 { font-size: 25px; }
  .workspace-actions { padding-top: 0; align-self: auto; }.workspace-actions .btn { min-height: 44px; font-size: 12px; padding: 10px 15px; }
  .cycle-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; padding: 0; gap: 12px; }.cycle-step { font-size: 10px; gap: 7px; }.cycle-separator { display: none; }.cycle-step-dot { width: 19px; height: 19px; font-size: 9px; }
  .main-content { padding: 4px 20px 24px; }.section-title { font-size: 18px; }.section-subtitle { font-size: 11px; }
  .kpi-grid { gap: 10px; margin-bottom: 16px; }.kpi-card { padding: 16px 13px; }.kpi-label { font-size: 10px; gap: 6px; }.kpi-value { font-size: 25px; }.kpi-desc { font-size: 10px; }
  .strategic-grid { gap: 16px; }.swot-matrix { grid-template-columns: 1fr 1fr; gap: 10px; }.swot-quadrant { padding: 12px; }.swot-list { font-size: 10px; }
  .card-header { margin-bottom: 16px; }.card-title { font-size: 13px; }.review-badge { font-size: 8px; }.card { padding: 16px; }
  .workspace-footer { margin: auto 20px 0; font-size: 9px; }.workspace-footer > :last-child { display: none; }
  .filter-btn { min-height: 44px; }.search-input { width: 100%; min-width: 0; }.kanban-toolbar > div:last-child { width: 100%; }.btn-shift { min-height: 44px; }
  .calendar-card, .upcoming-events-card { padding: 14px; }.cal-day { min-height: 62px; padding: 4px; }.calendar-grid { gap: 3px; }.cal-event-dot { padding: 2px; font-size: 8px; }.cal-event-dot .ui-icon { display: none; }
  .calendar-nav .btn { font-size: 10px; padding: 8px; min-height: 44px; }.modal-card { padding: 20px; }.modal-title { font-size: 17px; }
  .modal-actions { gap: 8px; }.modal-actions > div { flex-wrap: wrap; }.toast-container { left: 16px; right: 16px; bottom: 16px; }
}
@media (max-width: 380px) { .swot-matrix { grid-template-columns: 1fr; }.kpi-label > span:last-child { width: 23px; height: 23px; }.kpi-value { font-size: 23px; }.workspace-meta { gap: 6px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
