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

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

:root {
  --primary: #5b6ef5;
  --primary-dark: #4455d4;
  --primary-dim: rgba(91,110,245,0.1);
  --bg: #f3f6ff;
  --card: #ffffff;
  --card-2: #f7f9ff;
  --text: #0d1527;
  --muted: #536179;
  --border: #dce5f7;
  --border-2: #c8d5ef;
  --success: #0aaa6e;
  --warning: #e8940d;
  --danger: #e53935;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(13,21,39,0.07), 0 1px 2px rgba(13,21,39,0.04);
  --shadow-md: 0 4px 16px rgba(13,21,39,0.1), 0 2px 6px rgba(13,21,39,0.06);
  --shadow-lg: 0 12px 40px rgba(13,21,39,0.14);
  /* Aliases used by individual pages */
  --acc: #5b6ef5;
  --bd: #dce5f7;
  --t: #0d1527;
  --t2: #536179;
  --t3: #94a8c5;
}

[data-theme="dark"] {
  --primary: #7187f7;
  --primary-dark: #8fa0ff;
  --primary-dim: rgba(113,135,247,0.14);
  --bg: #070d1c;
  --card: #0f1829;
  --card-2: #162035;
  --text: #e0eaff;
  --muted: #8aa0cc;
  --border: #1d2e47;
  --border-2: #243a5c;
  --success: #0fd47e;
  --warning: #f5a623;
  --danger: #f05252;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --acc: #7187f7;
  --bd: #1d2e47;
  --t: #e0eaff;
  --t2: #8aa0cc;
  --t3: #4a6085;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}

/* ===== LOGIN ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.login-logo p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--primary-dark); }

.error-msg {
  background: rgba(229,57,53,0.1);
  color: var(--danger);
  border: 1px solid rgba(229,57,53,0.25);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  background: #FAFAF8;
  border-right: 1px solid #EDEAE4;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.25s ease;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.sidebar-hidden .sidebar { transform: translateX(-260px); }

.sidebar::before { display: none; }

.sidebar-logo {
  padding: 28px 24px 8px;
  border-bottom: none;
}
.sidebar-logo h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1A1714;
  letter-spacing: -0.3px;
  margin: 0;
}
.sidebar-logo span {
  font-size: 12px;
  color: #8C857A;
  letter-spacing: 0;
  margin-top: 2px;
  display: block;
}

/* Search bar */
.sidebar-search { padding: 12px 16px 8px; }
.sidebar-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: #F2F0EB;
  border-radius: 10px;
  color: #8C857A;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: text;
}

/* User section */
.sidebar-doctor {
  padding: 12px 20px 16px;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-doctor .sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7175F5, #9B9DF8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-doctor .label {
  font-size: 11px;
  color: #8C857A;
  text-transform: none;
  letter-spacing: 0;
}
.sidebar-doctor .name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1714;
  margin-top: 0;
}

.sidebar-nav {
  padding: 0 10px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 4px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #8C857A;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 12px 6px;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1A1714;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  background: transparent;
  position: relative;
  margin-bottom: 2px;
  font-family: 'DM Sans', sans-serif;
}
.nav-item::after { display: none; }

.nav-item:hover { background: rgba(113,117,245,0.05); }

.nav-item.active {
  background: #EEEEFF;
  color: #7175F5;
  font-weight: 600;
}

/* Drag-and-drop states */
.nav-item.nav-dragging { opacity: 0.35; }
.nav-item.nav-drop-over { background: rgba(113,117,245,0.1); color: #7175F5; }

.nav-item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #8C857A;
}
.nav-item.active .icon { color: #7175F5; }
.nav-item:hover .icon { color: #7175F5; }

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid #EDEAE4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-logout {
  background: none;
  border: none;
  color: #9B6B5A;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}
.btn-logout:hover { background: rgba(155,107,90,0.08); }

/* Theme toggle button */
.theme-toggle-btn {
  background: none;
  border: none;
  color: #8C857A;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}
.theme-toggle-btn:hover { background: rgba(0,0,0,0.04); color: #1A1714; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 36px 40px;
  background: #FAFAFA;
  color: var(--text);
  transition: margin-left 0.25s ease;
}
body.sidebar-hidden .main-content { margin-left: 0; }

/* ===== SIDEBAR TOGGLE BUTTON ===== */
.sidebar-toggle-btn {
  position: fixed;
  top: 50%;
  left: 260px;
  transform: translateY(-50%);
  z-index: 200;
  width: 18px; height: 52px;
  background: #FAFAF8;
  border: 1px solid #EDEAE4;
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #8C857A;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  transition: left 0.25s ease, background 0.15s, color 0.15s;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}
.sidebar-toggle-btn:hover { background: #EDEAE4; color: #1A1714; }
body.sidebar-hidden .sidebar-toggle-btn { left: 0; border-left: 1px solid #EDEAE4; border-right: none; border-radius: 8px 0 0 8px; }

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

/* ===== MONTH SELECTOR ===== */
.month-selector {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  overflow-x: auto;
}

.month-selector select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  outline: none;
}

.month-selector select:focus { border-color: var(--primary); }

.ms-arrow {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 30px; height: 30px;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: inherit;
}
.ms-arrow:hover { border-color: var(--primary); color: var(--primary); }
.ms-year {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  min-width: 42px;
  text-align: center;
  flex-shrink: 0;
}
.ms-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.ms-pills {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.ms-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  background: var(--card-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}
.ms-pill:hover { background: var(--primary-dim); color: var(--primary); }
.ms-pill.active { background: var(--primary); color: #fff; }

/* ===== SUMMARY CARDS ===== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

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

.summary-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  letter-spacing: -0.5px;
}

.summary-card .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.summary-card.highlight .value { color: var(--primary); }
.summary-card.success .value { color: var(--success); }

/* ===== FUNNEL ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.funnel-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.funnel-step {
  flex: 1;
  text-align: center;
}

.step-box {
  background: var(--card-2);
  border-radius: 10px;
  padding: 16px 8px;
  margin: 0 6px;
  height: 100%;
  border: 1px solid var(--border);
}

.step-icon { font-size: 22px; margin-bottom: 6px; }

.step-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.3;
}

.step-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.step-rate {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== CONVERSION RATE CARDS ===== */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.rate-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rate-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.rate-card-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

.rate-card-bar-wrap {
  background: var(--card-2);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.rate-card-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.7s ease;
}

.rate-card-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ===== ROI CARD ===== */
.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.roi-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.roi-card .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.roi-card .amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
}

.roi-card.primary-bg {
  background: var(--primary);
  border-color: var(--primary-dark);
}

.roi-card.primary-bg .label { color: rgba(255,255,255,0.7); }
.roi-card.primary-bg .amount { color: #fff; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ===== ADMIN SPECIFIC ===== */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-save {
  padding: 11px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save:hover { background: var(--primary-dark); }

.success-msg {
  background: rgba(10,170,110,0.12);
  color: var(--success);
  border: 1px solid rgba(10,170,110,0.25);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.records-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

.records-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

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

.records-table tr:hover td { background: var(--card-2); }

.btn-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-delete:hover { background: rgba(229,57,53,0.1); }

.btn-edit {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-edit:hover { background: var(--primary-dim); }

/* ===== FUNNEL ARROWS ===== */
.funnel-steps {
  display: flex;
  align-items: center;
}

.funnel-arrow {
  font-size: 24px;
  flex-shrink: 0;
  margin: 0 2px;
  opacity: 0.7;
}

/* ===== CHART ===== */
.chart-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

/* ===== FORM SECTION LABEL ===== */
.form-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  margin-top: 4px;
}

/* ===== DOCUMENTOS ===== */
.doc-add-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.doc-add-icon { font-size: 28px; }

.doc-add-content { flex: 1; }

.doc-add-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.doc-add-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-add-link {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-add-link:hover { background: var(--primary-dark); }

.doc-link-form {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.btn-cancel {
  padding: 10px 18px;
  background: var(--card-2);
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover { background: var(--bg); }

.doc-category-section { margin-bottom: 28px; }

.doc-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.doc-count {
  background: var(--card-2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.doc-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
  border: 1.5px solid var(--border);
}

.doc-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.doc-card-icon { font-size: 22px; }

.doc-card-info { flex: 1; min-width: 0; }

.doc-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.doc-card-arrow {
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
}

/* ===== ESTRATEGIA FORM (ADMIN) ===== */
.estrategia-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.estrategia-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estrategia-block-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.estrategia-block-icon { font-size: 22px; margin-top: 2px; }

.estrategia-block-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.estrategia-block-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.estrategia-block textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.estrategia-block textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* Embudo inputs en admin */
.embudo-inputs {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.embudo-input-item {
  flex: 1;
  min-width: 80px;
}

.embudo-input-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.embudo-input-item input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  outline: none;
  text-align: center;
}

.embudo-arrow-input {
  font-size: 20px;
  padding-bottom: 10px;
  opacity: 0.6;
}

/* Comentarios en admin */
.comment-item {
  background: var(--card-2);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 3px solid var(--border);
}

.comment-item.comment-new {
  border-left-color: var(--primary);
  background: var(--primary-dim);
}

.comment-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-item.comment-new .comment-badge { color: var(--primary); }

.comment-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.comment-date {
  font-size: 12px;
  color: var(--muted);
}

/* ===== ESTRATEGIA DOCTOR VIEW ===== */
.estrategia-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border-left: 4px solid var(--border);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.estrategia-section.accent-green { border-left-color: var(--success); }
.estrategia-section.accent-blue { border-left-color: var(--primary); }
.estrategia-section.accent-purple { border-left-color: #8B5CF6; }
.estrategia-section.accent-orange { border-left-color: var(--warning); }

.estrategia-section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.estrategia-section-icon { font-size: 24px; margin-top: 2px; }

.estrategia-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.estrategia-section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.estrategia-section-body p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 8px;
}

.estrategia-section-body p:last-child { margin-bottom: 0; }

/* Link a dashboard */
.estrategia-link-card {
  background: #0a0f1e;
  border-radius: var(--radius);
  border: 1px solid #1a2540;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 8px;
}

.btn-go {
  padding: 11px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-go:hover { background: var(--primary-dark); }

/* Comentarios del doctor */
.comments-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  border: 1.5px solid var(--border);
}

.comments-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.comments-card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comments-card textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* ===== DOCUMENTOS — UPLOAD ===== */
.doc-actions-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.doc-action-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 24px;
}

.doc-action-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.doc-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.doc-action-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.doc-form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1.5px solid var(--border);
}

.doc-form-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.file-drop-zone:hover, .file-drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.file-drop-icon { font-size: 32px; }

.file-drop-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.file-drop-sub {
  font-size: 12px;
  color: var(--muted);
}

.file-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-dim);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
}

.file-selected-name {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.file-clear-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.upload-progress {
  height: 4px;
  background: var(--card-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}

.upload-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  width: 0%;
  transition: width 0.3s;
}

/* ===== DOCUMENTOS — CARD WRAP + DELETE ===== */
.doc-card-wrap {
  position: relative;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.doc-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.doc-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  z-index: 2;
}

.doc-card-wrap:hover .doc-delete-btn {
  opacity: 1;
}

.doc-delete-btn:hover {
  background: rgba(229,57,53,0.12);
  color: var(--danger);
}

/* ===== DOCUMENTOS — DOCTOR BADGE ===== */
.doc-card-doctor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-dim);
  border-radius: 99px;
  padding: 2px 8px;
  margin-bottom: 2px;
  width: fit-content;
}

.doc-card-doctor::before {
  content: '👤';
  font-size: 10px;
}

/* ===== DOCUMENTOS — FILTRO DOCTOR ===== */
.doc-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.doc-filter-wrap:focus-within {
  border-color: var(--primary);
}

.doc-filter-wrap::before {
  content: '🔍';
  font-size: 15px;
  flex-shrink: 0;
}

.doc-filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.doc-filter-select {
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  min-width: 160px;
}

/* ===== MODAL ELIMINAR ===== */
.delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.delete-modal-card {
  background: var(--card);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
  animation: slideUp 0.18s ease;
}

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

.delete-modal-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.delete-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.delete-modal-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.delete-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-danger {
  padding: 11px 24px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, opacity 0.2s;
}

.btn-danger:hover { opacity: 0.88; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== COMING SOON ===== */
.coming-soon-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 56px 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.coming-soon-icon { font-size: 52px; margin-bottom: 16px; }

.coming-soon-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.coming-soon-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.coming-soon-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.coming-soon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ===== SIDEBAR INBOX PINNED ===== */
.sidebar-inbox-pin {
  margin: 0 16px 12px;
  background: #EEEEFF;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sidebar-inbox-pin:hover { opacity: 0.85; }
.sidebar-inbox-pin.has-notifications { background: #EEEEFF; }

.sb-inbox-bell { position: relative; flex-shrink: 0; display: flex; }
.sb-inbox-dot {
  position: absolute; top: -2px; right: -2px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7175F5;
  border: 2px solid #EEEEFF;
}

.sidebar-inbox-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.sidebar-inbox-title {
  font-size: 13px;
  font-weight: 600;
  color: #7175F5;
}

.sidebar-inbox-sub {
  font-size: 11px;
  color: #8F91D4;
  margin-top: 1px;
}

/* ===== INBOX / NOTIFICACIONES ===== */
.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 6px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inbox-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border-left: 4px solid var(--border);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.inbox-item.inbox-unread {
  border-left-color: var(--primary);
  background: var(--primary-dim);
}

.inbox-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.inbox-doctor-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.inbox-date {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

.inbox-new-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.inbox-type {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.inbox-message {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.inbox-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 10px;
}

.inbox-title-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 6px;
}

.inbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.inbox-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.inbox-cta-btn:hover { background: var(--primary-dark); }

.btn-mark-read {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-mark-read:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-delete-msg {
  background: none;
  border: 1.5px solid transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.btn-delete-msg:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(229,57,53,0.08);
}

/* ===== TEXTAREA ===== */
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* ===== MODAL GENERAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal-card {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideUp 0.18s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-lg { max-width: 700px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--card-2); }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== COLOR PALETTE ===== */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2.5px solid transparent;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
  transform: scale(1.1);
}

/* ===== DETAIL MODAL CONTENT ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.detail-field { }
.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.detail-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.status-pill {
  font-weight: 700;
  font-size: 13px;
}
.detail-desc-box {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 4px;
}
.detail-desc-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ===== CRONOGRAMA CONTROLS ===== */
.crono-controls {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
  row-gap: 12px;
}
.crono-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0 20px 0 0;
  margin-right: 20px;
  border-right: 1.5px solid var(--border);
  box-shadow: none;
}
.crono-range-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.crono-date-input {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
  transition: border-color 0.2s;
}
.crono-date-input:focus { border-color: var(--primary); }
.btn-apply-range {
  padding: 7px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-apply-range:hover { background: var(--primary-dark); }
.crono-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.filter-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-left: 2px;
}
.crono-filter-sel {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.crono-filter-sel:focus { border-color: var(--primary); }

/* ===== DOCTOR PILLS BAR ===== */
.doctor-pills-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.doctor-pill {
  padding: 9px 22px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  box-shadow: var(--shadow);
}
.doctor-pill:hover { border-color: var(--primary); color: var(--primary); }
.doctor-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-dim);
}

/* ===== PUBLISH BUTTON ===== */
.btn-publish {
  padding: 10px 20px;
  background: var(--card-2);
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-publish:not([disabled]) {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  cursor: pointer;
}
.btn-publish:not([disabled]):hover { opacity: 0.88; }

.publish-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
  background: rgba(232,148,13,0.1);
  border: 1px solid rgba(232,148,13,0.25);
  border-radius: 99px;
  padding: 5px 12px;
}
.publish-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ===== GANTT ===== */
.gantt-wrap {
  overflow: auto;
  max-height: calc(100vh - 280px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
  margin-bottom: 20px;
}

/* Header row: sticky top */
.g-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0a0f1e;
}

/* Top-left corner: sticky left + sticky top */
.g-corner {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 15;
  background: #050b17;
  color: rgba(224,234,255,0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: flex-end;
  padding: 0 16px 8px;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.g-days-area { flex-shrink: 0; }

.g-months {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.g-month {
  flex-shrink: 0;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(224,234,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.g-days { display: flex; }
.g-day-num {
  width: 38px;
  flex-shrink: 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: rgba(224,234,255,0.5);
  border-right: 1px solid rgba(255,255,255,0.04);
}
.g-today-num {
  background: rgba(91,110,245,0.35);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
}
.g-weekend-num { color: rgba(224,234,255,0.25); }

/* Body rows */
.g-body { }

.g-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.g-row:last-child { border-bottom: none; }
.g-row:nth-child(even) .g-timeline { background-color: var(--card-2); }

/* Label column: sticky left */
.g-label {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 5;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 2px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: filter 0.15s;
}
.g-label:hover { filter: brightness(1.08); }

.g-label-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.g-label-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Group header row */
.g-group-row { background: var(--card-2); min-height: 34px; }
.g-group-row .g-timeline { background: var(--bg) !important; }
.g-group-label {
  background: #0a0f1e !important;
  color: rgba(224,234,255,0.85) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: default !important;
}
.g-group-label:hover { filter: none !important; }

/* Timeline */
.g-timeline {
  flex-shrink: 0;
  position: relative;
  min-height: 56px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 37px,
    rgba(0,0,0,0.04) 37px,
    rgba(0,0,0,0.04) 38px
  );
}

.g-today-bg {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(91,110,245,0.06);
  pointer-events: none;
  z-index: 0;
}

/* The bar */
.g-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
  transition: filter 0.15s, transform 0.12s;
}
.g-bar:hover {
  filter: brightness(1.1);
  transform: translateY(calc(-50% - 1px));
}

/* "Mis tareas" badge */
.my-task-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  border-radius: 99px;
  padding: 1px 6px;
  flex-shrink: 0;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0a0f1e;
  color: #e0eaff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid #1a2540;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  white-space: nowrap;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SIDEBAR NAV GROUPS ===== */
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 10px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8C857A;
  user-select: none;
  transition: color 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.nav-group-toggle:hover { color: #1A1714; }
.nav-group-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  opacity: 0.5;
}
.nav-group-items { /* visible by default */ }
.nav-group-sep {
  height: 1px;
  background: #EDEAE4;
  margin: 8px 12px;
}

/* Custom group drag-over highlight on header */
.nav-group-toggle.nav-drop-over { color: #7175F5; }

/* Delete custom group button */
.nav-group-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  color: #b4b0aa;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  background: none;
  border: none;
}
.nav-group-del-btn:hover { background: rgba(235,87,87,0.1); color: #eb5757; }

/* ===== CLIENTES GRID ===== */
.clientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.cliente-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.cliente-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cliente-card-cover {
  height: 130px;
  background: linear-gradient(135deg, #0a0f1e 0%, #1d2e47 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
}
.cliente-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cliente-card-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
}
.cliente-card-cover-name {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  z-index: 1;
}
.cliente-card-cover-upload {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.cliente-card-cover-upload:hover { background: rgba(0,0,0,0.65); }
.cliente-card-body {
  padding: 14px 16px 16px;
}
.cliente-card-status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  min-height: 40px;
}
.cliente-card-status em {
  color: var(--muted);
  font-style: italic;
  opacity: 0.5;
}
.cliente-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.btn-card-edit {
  flex: 1;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-card-edit:hover { background: var(--bg); }
.btn-card-delete {
  flex: 1;
  background: rgba(229,57,53,0.08);
  border: 1px solid rgba(229,57,53,0.2);
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-card-delete:hover { background: rgba(229,57,53,0.16); }
.btn-card-go {
  flex: 1;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  transition: opacity 0.15s;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-card-go:hover { opacity: 0.88; }

/* Edit client modal */
.edit-client-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edit-client-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 28px 24px;
  width: 460px;
  max-width: 96vw;
  box-shadow: var(--shadow-lg);
}
.edit-client-modal h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}
.edit-client-modal label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.edit-client-modal textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font-size: 14px;
}
.edit-client-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-modal-cancel:hover { background: var(--card-2); }

/* ===== PIPELINE PLACEHOLDER ===== */
.pipeline-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  gap: 14px;
  text-align: center;
}
.pipeline-placeholder .ph-icon {
  font-size: 48px;
  opacity: 0.4;
}
.pipeline-placeholder h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.pipeline-placeholder p {
  font-size: 14px;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.6;
  margin: 0;
}
.pipeline-placeholder .ph-badge {
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: #a78bfa;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .main-content { margin-left: 200px; padding: 20px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .funnel-steps { flex-direction: column; gap: 8px; }
  .funnel-step::after { display: none; }
  .rates-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .summary-grid { grid-template-columns: 1fr; }
  .roi-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
