/* Ruta: /hub_proyectos/assets/style.css */

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

:root {
  --bg: #f7f4f0;
  --surface: #ffffff;
  --surface2: #f0ece6;
  --surface3: #e8e2da;
  --border: #e0d9d0;
  --border2: #c8bfb4;
  --text: #1a1614;
  --text2: #5a5248;
  --muted: #9c9188;

  /* Personal — terracota */
  --personal:       #BF7449;
  --personal-bg:    #fdf2eb;
  --personal-mid:   #edc9ac;

  /* Gladel — teal profundo */
  --gladel:         #126173;
  --gladel-bg:      #e8f3f5;
  --gladel-mid:     #9dcdd6;

  /* Crossingnet — óxido oscuro */
  --crossing:       #8C442A;
  --crossing-bg:    #f7ede9;
  --crossing-mid:   #d4a492;

  /* Acento global */
  --accent:         #4E9DA6;
  --sandy:          #D9A679;

  --sidebar-w: 272px;
  --radius: 14px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 10px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

html, body { height: 100%; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 28px 22px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #126173, #4E9DA6);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(18,97,115,0.3);
}

.sidebar-header h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.sidebar-header p {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-left: 44px;
}

nav { padding: 12px 0 20px; flex: 1; }

/* Grupo principal */
.group { margin-bottom: 2px; }

.group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  letter-spacing: 0.1px;
}

.group-btn:hover { background: var(--surface2); color: var(--text); }
.group-btn.open { color: var(--text); background: var(--surface2); }

.group-btn[data-group="personal"]:hover,
.group-btn[data-group="personal"].open { border-left-color: var(--personal); background: var(--personal-bg); }
.group-btn[data-group="gladel"]:hover,
.group-btn[data-group="gladel"].open   { border-left-color: var(--gladel);   background: var(--gladel-bg); }
.group-btn[data-group="crossingnet"]:hover,
.group-btn[data-group="crossingnet"].open { border-left-color: var(--crossing); background: var(--crossing-bg); }

.group-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.group-btn[data-group="personal"] .group-icon { background: var(--personal-mid); }
.group-btn[data-group="gladel"]   .group-icon { background: var(--gladel-mid); }
.group-btn[data-group="crossingnet"] .group-icon { background: var(--crossing-mid); }

.chevron { margin-left: auto; color: var(--muted); font-size: 9px; transition: transform 0.2s; }
.group-btn.open .chevron { transform: rotate(90deg); }

.group-children { display: none; padding-bottom: 4px; }
.group-children.open { display: block; }

/* Sub-grupo (categoría) */
.sub-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 18px 6px 40px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sub-group-btn:hover { color: var(--text2); background: var(--surface2); }
.sub-group-btn.open { color: var(--text2); }

.mini-chevron { margin-left: auto; font-size: 8px; transition: transform 0.2s; }
.sub-group-btn.open .mini-chevron { transform: rotate(90deg); }

.sub-items { display: none; }
.sub-items.open { display: block; }

/* Sub-sub-grupo */
.subsub-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 18px 6px 56px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.subsub-group-btn:hover { color: var(--text2); background: var(--surface2); }
.subsub-group-btn.open { color: var(--text2); }

.subsub-items { display: none; }
.subsub-items.open { display: block; }

/* Ítem de dashboard */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px 7px 58px;
  background: none;
  border: none;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--surface2); color: var(--text); font-weight: 700; }

.nav-item-l2 { padding-left: 44px; }
.nav-item-l3 { padding-left: 72px; }

.nav-item-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  background: var(--surface3);
}

.sidebar-divider { height: 1px; background: var(--border); margin: 10px 18px; }

/* ── MAIN ─────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  padding: 0 20px 0 40px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; flex: 1; }
.crumb { color: var(--muted); cursor: pointer; transition: color 0.15s; }
.crumb:hover { color: var(--text); }
.crumb.active { color: var(--text); font-weight: 700; cursor: default; }
.sep { color: var(--border2); font-size: 11px; }

.content { padding: 44px 48px; flex: 1; }

/* ── HOME ─────────────────────────────── */
#view-home { max-width: 820px; }

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.welcome-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

.welcome-title span { color: var(--personal); }

.welcome-sub { color: var(--text2); font-size: 15px; font-weight: 400; margin-bottom: 44px; line-height: 1.7; }

.project-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.project-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(.25,.8,.25,1);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-card[data-group="personal"]:hover { border-color: var(--personal-mid); }
.project-card[data-group="gladel"]:hover   { border-color: var(--gladel-mid); }
.project-card[data-group="crossingnet"]:hover { border-color: var(--crossing-mid); }

.card-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.project-card[data-group="personal"] .card-icon-wrap  { background: var(--personal-bg); }
.project-card[data-group="gladel"]   .card-icon-wrap  { background: var(--gladel-bg); }
.project-card[data-group="crossingnet"] .card-icon-wrap { background: var(--crossing-bg); }

.project-card h3 { font-size: 17px; margin-bottom: 4px; font-weight: 800; }
.project-card p  { font-size: 12px; color: var(--text2); font-weight: 400; line-height: 1.5; }

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

.card-count { font-size: 11px; color: var(--muted); font-weight: 600; }

.card-arrow {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all 0.18s;
}

.project-card[data-group="personal"] .card-arrow  { background: var(--personal-bg); color: var(--personal); }
.project-card[data-group="gladel"]   .card-arrow  { background: var(--gladel-bg);   color: var(--gladel); }
.project-card[data-group="crossingnet"] .card-arrow { background: var(--crossing-bg); color: var(--crossing); }

.project-card:hover .card-arrow { transform: translate(2px,-2px); }

/* ── SECTION VIEW ─────────────────────── */
.section-view { display: none; }
.section-view.active { display: block; max-width: 960px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.section-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

[data-sec-icon="personal"]    .section-icon { background: var(--personal-bg); }
[data-sec-icon="gladel"]      .section-icon { background: var(--gladel-bg); }
[data-sec-icon="crossingnet"] .section-icon { background: var(--crossing-bg); }

.section-header h2 { font-size: 28px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 3px; }
.section-header p  { color: var(--text2); font-size: 13px; font-weight: 400; }

.subsection { margin-bottom: 40px; }

.subsection-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.subsection-label-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.subsection-label-line { flex: 1; height: 1px; background: var(--border); }

/* Sub-subsección (ej: Líderes dentro de Educación) */
.subsubsection { margin-bottom: 24px; padding-left: 0; }

.subsubsection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.3px;
}

.subsubsection-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border2);
}

.dashboards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* Dashboard card */
.dash-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.25,.8,.25,1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.dash-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dash-card-open {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  color: var(--muted);
  font-size: 12px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.dash-card:hover .dash-card-open {
  background: var(--text);
  color: var(--surface);
}

.dash-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.dash-card p  { font-size: 12px; color: var(--text2); font-weight: 400; line-height: 1.5; flex: 1; }

.dash-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-tag {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Botón agregar */
.add-btn {
  background: none;
  border: 1.5px dashed var(--border2);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  text-align: left;
}

.add-btn:hover { border-color: var(--text2); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }

.add-btn-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--muted);
  transition: all 0.15s;
}

.add-btn:hover .add-btn-icon { background: var(--text); color: var(--surface); }

/* ── IFRAME ─────────────────────────────── */
.iframe-view { display: none; height: calc(100vh - 57px); }
.iframe-view.active { display: flex; flex-direction: column; }

.iframe-topbar {
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text2);
}

.iframe-topbar .iframe-name { font-weight: 700; font-size: 13px; }

.iframe-btn {
  display: flex; align-items: center; gap: 5px;
  color: var(--text2);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}

.iframe-btn:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }

iframe { flex: 1; border: none; background: #fff; }

/* ── MODAL ─────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,26,23,0.5);
  z-index: 200;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  width: 480px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
}

.modal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-header-icon { font-size: 22px; }
.modal h3 { font-size: 20px; font-weight: 800; }
.modal > p { color: var(--text2); font-size: 13px; margin-bottom: 24px; font-weight: 400; }

.form-row { margin-bottom: 16px; }
.form-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; display: block; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }

.form-input, .form-select {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus { border-color: var(--border2); background: var(--surface); }
.form-input::placeholder { color: var(--muted); }
.form-select option { background: var(--surface); }

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

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }

.btn { padding: 9px 22px; border-radius: 9px; font-family: 'Nunito', sans-serif; font-size: 13px; cursor: pointer; transition: all 0.15s; border: none; font-weight: 700; }
.btn-ghost { background: none; border: 1.5px solid var(--border); color: var(--text2); }
.btn-ghost:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.btn-primary { background: var(--text); color: var(--surface); }
.btn-primary:hover { opacity: 0.85; }

/* ── SCROLLBAR ─────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── LOGIN SCREEN ──────────────────────── */
#login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
}

.login-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 52px 48px 44px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: loginFadeIn 0.4s ease;
}

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

.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #126173, #4E9DA6);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(18,97,115,0.3);
}

.login-card h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text);
}

.login-card p {
  font-size: 14px;
  color: var(--text2);
  font-weight: 400;
  margin-bottom: 36px;
  line-height: 1.6;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}

.google-btn:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.google-btn svg { flex-shrink: 0; }

.login-footer {
  margin-top: 28px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.6;
}

.google-signin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.login-error {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: 8px;
  font-size: 12px;
  color: #c00;
  font-weight: 600;
  display: none;
}

/* Avatar en topbar */
.user-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  flex-shrink: 0;
}

.user-avatar img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  flex-shrink: 0;
  display: block;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  padding: 3px 10px;
  border: 1px solid var(--border2);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 2px;
}
.logout-btn:hover { background: var(--text); color: var(--surface); border-color: var(--text); }

/* Botón ayuda */
.help-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.help-btn:hover { border-color: var(--border2); background: var(--surface2); color: var(--text); }

/* Panel de notas/ayuda */
.notes-panel {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.10);
  z-index: 300;
  flex-direction: column;
  animation: slideIn 0.25s ease;
}
.notes-panel.open { display: flex; }

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

.notes-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.notes-header h3 { font-size: 16px; font-weight: 800; }
.notes-header p  { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }

.notes-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text2);
  transition: all 0.15s;
  flex-shrink: 0;
}
.notes-close:hover { background: var(--text); color: var(--surface); }

.notes-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
  flex-shrink: 0;
}

.notes-tab {
  padding: 10px 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.notes-tab:hover { color: var(--text); }
.notes-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.notes-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.notes-tab-content { display: none; }
.notes-tab-content.active { display: block; }

.note-entry {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.note-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.note-project-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 5px;
}

.note-date { font-size: 10px; color: var(--muted); font-weight: 500; }
.note-text { font-size: 13px; color: var(--text2); line-height: 1.6; }

.add-note-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.add-note-select {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.add-note-select:focus { border-color: var(--border2); }

.add-note-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  outline: none;
  resize: none;
  height: 80px;
  transition: border-color 0.15s;
  margin-bottom: 10px;
}
.add-note-input:focus { border-color: var(--border2); }
.add-note-input::placeholder { color: var(--muted); }

.add-note-btn {
  width: 100%;
  padding: 9px;
  background: var(--text);
  color: var(--surface);
  border: none;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.add-note-btn:hover { opacity: 0.85; }

.notes-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.notes-empty-icon { font-size: 32px; margin-bottom: 10px; }

/* ── LÍNEAS PUNTEADAS DECORATIVAS ─────── */
/* decoración sidebar removida */

.dot-line-h {
  height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--border2) 0, var(--border2) 6px, transparent 6px, transparent 14px);
  margin: 6px 18px;
  opacity: 0.6;
}

.welcome-dots {
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  pointer-events: none;
  overflow: hidden;
}

/* ── SVG ICONS ───────────────────────── */
.icon-svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: block;
}

.group-icon .icon-svg { width: 16px; height: 16px; }
.nav-item-icon .icon-svg { width: 13px; height: 13px; }

/* ── SIDEBAR BOTTOM ──────────────────── */
.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 0;
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-bottom-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
}

.sidebar-bottom-user img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-signout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  border-radius: 0;
}

.sidebar-signout-btn:hover { color: var(--crossing); background: var(--crossing-bg); }

.sidebar-notes-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.sidebar-notes-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-left-color: var(--accent);
}

.sidebar-notes-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.15); }
  .main { margin-left: 0; }
  .project-cards { grid-template-columns: 1fr; }
  .content { padding: 24px 20px; }
  .topbar { padding: 12px 20px; }
  .mobile-menu-btn { display: flex !important; }
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text2);
  font-size: 15px;
  flex-shrink: 0;
}

/* ── SIDEBAR OVERLAY (mobile) ──────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,22,20,0.4);
  z-index: 99;
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.28s cubic-bezier(.4,0,.2,1); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.18); }
  .sidebar.open ~ .sidebar-overlay,
  .sidebar-overlay.visible { display: block; }
  .main { margin-left: 0; }
  .project-cards { grid-template-columns: 1fr; gap: 12px; }
  .content { padding: 24px 18px; }
  .topbar { padding: 0 16px; }
  .mobile-menu-btn { display: flex !important; }
  .welcome-title { font-size: 28px; }
  .welcome-sub { font-size: 14px; }
  .dashboards-grid { grid-template-columns: 1fr; }
  .notes-panel { width: 100vw; }
  .section-view.active { max-width: 100%; }
  .iframe-topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .iframe-topbar .iframe-name { width: 100%; font-size: 12px; }
}

@media (max-width: 480px) {
  .sidebar-header h1 { font-size: 15px; }
  .topbar { height: 50px; }
  .content { padding: 20px 14px; }
  .welcome-title { font-size: 24px; }
  .project-card { padding: 18px; }
  .modal { padding: 24px 18px; }
  .form-row-grid { grid-template-columns: 1fr; }
}

/* ── VER TODO — icono inline en grupo ──── */
.group { position: relative; }

.group-ver-todo {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 6px;
  background: none;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
  padding: 0;
  flex-shrink: 0;
}

.group:hover .group-ver-todo { display: flex; }
.group-ver-todo:hover { background: var(--surface3); color: var(--text); }

/* ── SECTION ICON — igual que el menú ─── */
.section-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

[data-sec-icon="personal"]    .section-icon { background: var(--personal-bg);  color: var(--personal); }
[data-sec-icon="gladel"]      .section-icon { background: var(--gladel-bg);    color: var(--gladel); }
[data-sec-icon="crossingnet"] .section-icon { background: var(--crossing-bg);  color: var(--crossing); }

/* ══════════════════════════════════════════
   PANEL DE ADMINISTRACIÓN
══════════════════════════════════════════ */

/* ── Botón en sidebar ───────────────────── */
.sidebar-admin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.sidebar-admin-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-left-color: var(--accent);
}
.sidebar-admin-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Panel principal ────────────────────── */
.admin-panel {
  position: fixed;
  top: 0; right: 0;
  width: 520px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
}
.admin-panel.open { transform: translateX(0); }

.admin-panel-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}
.admin-panel-header h2 { font-size: 17px; font-weight: 800; margin-bottom: 2px; }
.admin-panel-header p  { font-size: 12px; color: var(--muted); }
.admin-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; padding: 2px 6px;
  border-radius: 6px; transition: all 0.15s; line-height: 1;
}
.admin-close-btn:hover { background: var(--surface2); color: var(--text); }

#admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Proyecto ───────────────────────────── */
.adm-project { border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }

.adm-project-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.adm-project-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.adm-project-name { font-size: 14px; font-weight: 800; }

.adm-cat-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }

/* ── Fila genérica ──────────────────────── */
.adm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  transition: background 0.12s;
}
.adm-row:hover { background: var(--surface2); }

.adm-row-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.adm-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.adm-row:hover .adm-row-actions { opacity: 1; }

/* ── Categoría ──────────────────────────── */
.adm-cat-row { border-radius: 8px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 4px; }
.adm-cat-header { background: var(--bg); }
.adm-cat-name   { font-size: 13px; font-weight: 800; }
.adm-badge      { font-size: 10px; color: var(--muted); background: var(--surface3); padding: 1px 6px; border-radius: 10px; }

.adm-cat-body   { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.adm-cat-body:not(.open)   { display: none; }

/* ── Subcategoría ───────────────────────── */
.adm-subsub-row { border-radius: 6px; background: var(--bg); border: 1px dashed var(--border2); margin: 4px 0; }
.adm-subsub-header { }
.adm-subsub-name { font-size: 12px; font-weight: 700; color: var(--text2); }
.adm-subsub-body { padding: 4px 8px 6px 24px; display: flex; flex-direction: column; gap: 2px; }
.adm-subsub-body:not(.open) { display: none; }

/* ── Dashboard ──────────────────────────── */
.adm-dash-row { padding-left: 20px; }
.adm-dash-name { font-size: 12px; font-weight: 600; color: var(--text2); }
.adm-dash-url  {
  color: var(--accent); text-decoration: none; opacity: 0.6;
  display: flex; align-items: center;
}
.adm-dash-url:hover { opacity: 1; }

/* ── Botones de acción ──────────────────── */
.adm-btn {
  width: 24px; height: 24px;
  border-radius: 5px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  color: var(--muted);
  padding: 0;
}
.adm-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.adm-btn-move:hover:not(:disabled)  { background: var(--surface3); color: var(--text); }
.adm-btn-edit:hover                 { background: var(--gladel-bg); color: var(--gladel); }
.adm-btn-delete:hover               { background: var(--crossing-bg); color: var(--crossing); }

.adm-collapse-btn {
  width: 18px; height: 18px;
  border: none; background: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0;
  transition: transform 0.15s;
}

/* ── Botones agregar ────────────────────── */
.adm-add-cat-btn, .adm-add-subsub-btn, .adm-add-dash-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px dashed var(--border2);
  border-radius: 7px;
  background: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s;
  width: 100%;
  margin-top: 4px;
}
.adm-add-cat-btn    { color: var(--accent); border-color: var(--accent); margin: 8px 0 4px; }
.adm-add-subsub-btn { color: var(--muted);  margin-top: 4px; }
.adm-add-dash-btn   { color: var(--muted);  padding-left: 20px; }
.adm-add-cat-btn:hover    { background: var(--gladel-bg);  color: var(--gladel); border-color: var(--gladel); }
.adm-add-subsub-btn:hover { background: var(--surface2);   color: var(--text); }
.adm-add-dash-btn:hover   { background: var(--surface2);   color: var(--text); }

/* ══════════════════════════════════════════
   MODALES DE ADMINISTRACIÓN
══════════════════════════════════════════ */
.adm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.adm-modal-overlay.open { display: flex; }

.adm-modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  width: 420px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
}
.adm-modal h3  { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.adm-modal p   { font-size: 13px; color: var(--text2); margin-bottom: 18px; }
.adm-modal label { font-size: 12px; font-weight: 700; color: var(--text2); display: block; margin-bottom: 6px; }
.adm-modal input, .adm-modal textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 14px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.adm-modal input:focus, .adm-modal textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.adm-modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px;
}
.adm-modal-actions .btn { min-width: 90px; }

/* ── Toast ──────────────────────────────── */
.adm-toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  z-index: 700;
  opacity: 0;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.adm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.adm-toast.adm-toast-error { background: var(--crossing); }

@media (max-width: 768px) {
  .admin-panel { width: 100vw; }
}
