/* ============================================================
   ESTRATEGISTA IA — MENTORIA FIRE
   Premium Dark & Gold Design System
   ============================================================ */

:root {
  /* Core Colors */
  --bg-dark: #0a0a0f;
  --bg-surface: #12121a;
  --bg-card: #1a1a27;
  --bg-card-hover: #22222f;
  --bg-input: #15151f;
  --border: #2a2a3a;
  --border-hover: #3a3a4f;
  
  /* Gold Palette */
  --gold: #d4a843;
  --gold-light: #f0d078;
  --gold-dark: #a07820;
  --gold-glow: rgba(212, 168, 67, 0.15);
  --gold-subtle: rgba(212, 168, 67, 0.08);
  
  /* Accent Colors */
  --blue: #4a90d9;
  --green: #4caf82;
  --red: #e74c5e;
  --purple: #9b6ed0;
  --orange: #e8934a;
  --cyan: #4ac1c1;
  
  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c0;
  --text-muted: #6a6a80;
  --text-gold: #d4a843;
  
  /* Sizing */
  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESETS & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark) url('img/bg.webp') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

::selection {
  background: var(--gold);
  color: var(--bg-dark);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: var(--radius);
  box-shadow: 0 4px 15px var(--gold-glow);
}

.logo-title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--gold-subtle);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 168, 67, 0.05));
  color: var(--gold);
  border-left: 3px solid var(--gold);
  font-weight: 600;
}

.nav-icon { font-size: 1.1rem; min-width: 24px; text-align: center; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bg-dark);
}

.user-name { font-weight: 600; font-size: 0.85rem; display: block; }
.user-role { font-size: 0.72rem; color: var(--text-muted); display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* Pages */
.page { display: none; animation: fadeIn 0.35s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

/* ============================================================
   KPI CARDS (Dashboard)
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.kpi-gold::before { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.kpi-blue::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.kpi-green::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.kpi-red::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.kpi-purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.kpi-orange::before { background: linear-gradient(90deg, #ea580c, #fb923c); }

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--border-hover);
}

.kpi-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.kpi-value { font-size: 2rem; font-weight: 800; letter-spacing: -1px; }
.kpi-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 500; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.dashboard-clickable {
  transition: var(--transition) !important;
}

.dashboard-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border-color: var(--gold) !important;
}

.card:hover {
  border-color: var(--border-hover);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-dark);
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--gold-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-danger {
  background: rgba(231, 76, 94, 0.1);
  color: var(--red);
  border: 1px solid rgba(231, 76, 94, 0.3);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: rgba(231, 76, 94, 0.2);
  border-color: var(--red);
}

.btn-generate {
  width: 100%;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--bg-dark);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-generate::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--gold-glow), 0 0 60px rgba(212, 168, 67, 0.1);
}

.btn-generate:hover::before { opacity: 1; }

.btn-icon-only {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-only:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================
   FORMS
   ============================================================ */
.diagnostico-form {
  max-width: 900px;
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.form-section:hover {
  border-color: var(--border-hover);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
}

.section-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.form-group small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-with-toggle {
  display: flex;
  gap: 0.5rem;
}

.input-with-toggle input {
  flex: 1;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.checkbox-item:hover {
  border-color: var(--gold);
  background: var(--gold-subtle);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

.form-actions {
  margin-top: 2rem;
}

.search-bar {
  margin-bottom: 1.5rem;
}

.search-bar input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-container {
  background: var(--bg-card);
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-surface);
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--gold-subtle);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold { background: var(--gold-glow); color: var(--gold); border: 1px solid rgba(212,168,67,0.3); }
.badge-green { background: rgba(76, 175, 130, 0.1); color: var(--green); border: 1px solid rgba(76,175,130,0.3); }
.badge-red { background: rgba(231, 76, 94, 0.1); color: var(--red); border: 1px solid rgba(231,76,94,0.3); }
.badge-blue { background: rgba(74, 144, 217, 0.1); color: var(--blue); border: 1px solid rgba(74,144,217,0.3); }
.badge-purple { background: rgba(155, 110, 208, 0.1); color: var(--purple); border: 1px solid rgba(155,110,208,0.3); }
.badge-orange { background: rgba(232, 147, 74, 0.1); color: var(--orange); border: 1px solid rgba(232,147,74,0.3); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

.modal-large {
  max-width: 850px;
}

.modal-fullscreen {
  max-width: 1000px;
  max-height: 90vh;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
  font-size: 1.15rem;
  color: var(--gold);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--red);
  background: rgba(231,76,94,0.1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.loading-overlay.show {
  display: flex;
}

.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 0 60px var(--gold-glow);
}

.loading-card h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--gold);
}

.loading-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.loading-tip {
  margin-top: 1rem;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   PLANS GRID
   ============================================================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3), 0 0 30px var(--gold-glow);
}

.plan-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.plan-card-negocio {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.plan-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.plan-card-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ============================================================
   PLAN VIEWER (Inside Modal)
   ============================================================ */
.plan-view {
  color: var(--text-primary);
}

.plan-cover {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  margin-bottom: 2rem;
}

.plan-cover h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.plan-cover .plan-meta-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.plan-meta-item {
  text-align: center;
}

.plan-meta-item .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.plan-meta-item .value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
}

.plan-section {
  margin-bottom: 2rem;
}

.plan-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.plan-pillar {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.plan-pillar-name {
  font-weight: 700;
  color: var(--gold);
  min-width: 120px;
}

.plan-phase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.plan-phase-title {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.plan-phase-weeks {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.plan-week {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-week-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-week-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.plan-week-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.plan-week-focus {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--gold-subtle);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.plan-task {
  padding: 1rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--border);
}

.plan-task-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 0.5rem;
}

.plan-task-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline;
}

.plan-task-desc {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.plan-task-why {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.plan-task-why strong {
  color: var(--gold);
  font-style: normal;
}

.plan-obs {
  padding: 1rem;
  background: linear-gradient(135deg, var(--gold-subtle), transparent);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.plan-obs strong {
  color: var(--gold);
}

.plan-trilha {
  margin-top: 1rem;
}

.plan-trilha-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.trilha-day {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.trilha-day:last-child {
  border-bottom: none;
}

.trilha-dia-num {
  min-width: 50px;
  font-weight: 700;
  color: var(--gold);
}

.trilha-curso {
  color: var(--text-muted);
  min-width: 180px;
}

.trilha-aula {
  color: var(--text-secondary);
}

/* ============================================================
   PERSONA STUDY
   ============================================================ */
.persona-container .persona-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.persona-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.persona-kpi .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.persona-kpi .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.persona-list {
  list-style: none;
}

.persona-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.persona-list li:last-child {
  border-bottom: none;
}

.persona-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-glow);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
}

.persona-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.persona-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ============================================================
   CHART (Simple CSS)
   ============================================================ */
.chart-container {
  padding: 1rem 0;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chart-bar-label {
  min-width: 80px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chart-bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg-dark);
}

/* ============================================================
   AULA RESULT
   ============================================================ */
.aula-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.aula-result-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
  border-bottom: 1px solid var(--gold);
}

.aula-result-header h2 {
  font-size: 1.25rem;
  color: var(--gold);
}

.aula-result-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.aula-secao {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.aula-secao:last-child {
  border-bottom: none;
}

.aula-secao-title {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.aula-secao-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.aula-secao-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.aula-frase {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--gold-subtle), transparent);
  border-top: 1px solid rgba(212,168,67,0.2);
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  text-align: center;
  font-weight: 600;
}

/* ============================================================
   PROGRESS
   ============================================================ */
.progress-entry {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr 2fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  align-items: center;
}

.progress-entry:last-child {
  border-bottom: none;
}

/* ============================================================
   CONFIG
   ============================================================ */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.config-grid .card:first-child {
  grid-column: 1 / -1;
}

.about-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  font-size: 0.88rem;
}

.empty-state-small {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
}

.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(30px); }
}

/* ============================================================
   ALERT LIST
   ============================================================ */
.alert-list .alert-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.alert-item .alert-icon {
  font-size: 1.2rem;
}

.alert-item .alert-name {
  font-weight: 600;
  flex: 1;
}

.alert-item .alert-reason {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   RANKING TABLE
   ============================================================ */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--border);
}

.ranking-table th {
  padding: 0.65rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.1);
  vertical-align: middle;
  text-align: center;
}

.ranking-table th small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 0.2rem;
}

.ranking-header-groups th {
  font-size: 0.8rem;
  padding: 0.5rem;
  border-right: 2px solid #000;
}

.ranking-table td {
  padding: 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  text-align: center;
  color: var(--text-primary);
}

.ranking-table td.text-left {
  text-align: left;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
}

.ranking-input {
  width: 100%;
  min-width: 50px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.ranking-input:focus, .ranking-input:hover {
  background: var(--bg-input);
  border-color: var(--gold);
  outline: none;
}

.ranking-total {
  font-weight: 800;
  background: rgba(21, 128, 61, 0.1);
  color: #4ade80;
}

.ranking-percent {
  font-weight: 800;
  background: rgba(185, 28, 28, 0.1);
  color: #f87171;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .plan-cover .plan-meta-grid { flex-wrap: wrap; }
  .progress-entry { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT / PDF STYLES
   ============================================================ */
@media print {
  .sidebar, .modal-header, .btn-primary, .btn-secondary, .toast-container {
    display: none !important;
  }
  body { background: white; color: #111; }
  .plan-view { color: #111; }
  .plan-week { border: 1px solid #ddd; break-inside: avoid; page-break-inside: avoid; }
}
