/* BOSQUE DE TAREAS — estilos agrupados por componentes */
:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --cream: #fffcf5;
  --cream-dark: #f1ebdd;
  --forest: #526e58;
  --forest-dark: #314e3c;
  --sage: #dfe9d8;
  --ink: #354439;
  --muted: #778176;
  --edge: #e5e1d5;
  --orange: #d7896c;
  --shadow: 0 10px 35px #5b674e11;
  --round: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 7%, #e7e9d9 0, transparent 31%),
    radial-gradient(circle at 97% 93%, #e5dcd4 0, transparent 29%),
    var(--paper);
  color: var(--ink);
  font: 15px/1.45 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #9bac82;
  outline-offset: 2px;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: Georgia, Cambria, serif; }
.app-layout { max-width: 1730px; margin: auto; display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 19px; padding: 18px; }
.sidebar { min-width: 0; display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--edge); background: #fdf9efec; border-radius: 25px; padding: 19px 17px; box-shadow: var(--shadow); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-icon { font-size: 29px; background: var(--sage); border: 1px solid #ccd8c5; border-radius: 14px; padding: 6px; }
.brand h1 { font-size: 23px; line-height: 1.06; margin: 0; }
.brand p { font-size: 11px; color: var(--muted); margin: 7px 0 0; }
.sidebar-hint { text-align: center; font-size: 11px; color: var(--muted); margin: -11px 0 0; }
.side-section { border-top: 1px solid var(--edge); padding-top: 15px; }
.section-head, .card-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.section-head h2 { font-size: 16px; margin: 0; }
.chip-list { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #deded0; padding: 6px 9px; background: #fffdf8; border-radius: 13px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); }
.chip.active { background: var(--sage); border-color: #abc3a7; }
.chip .avatar-emoji { font-size: 17px; line-height: 1; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #999); }
.chip .edit-mini { padding: 1px 2px; border: 0; background: transparent; color: var(--muted); }
.subtle, .fineprint, .helper, .drag-tip, small { color: var(--muted); }
.subtle { font-size: 12px; }
.pending-list { max-height: 335px; overflow: auto; }
.pending-item { padding: 9px 0; border-bottom: 1px dashed var(--edge); display: flex; align-items: flex-start; gap: 7px; }
.pending-item:last-child { border: 0; }
.pending-main { min-width: 0; flex: 1; cursor: pointer; }
.pending-main strong { display: block; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.pending-main small { display: block; font-size: 10px; margin-top: 3px; }
.check { background: #fffdf8; width: 21px; height: 21px; border: 1px solid #a6b5a3; border-radius: 7px; flex-shrink: 0; color: var(--forest); }
.forest-art { background: linear-gradient(0deg, #e0daca99, #f6f1e577), url('../assets/bosque-ilustrado.webp') center 49% / cover; min-height: 225px; border-radius: 20px; display: grid; place-items: end center; overflow: hidden; border: 1px solid #e4d8ba; }
.forest-art p { background: #fff9e9e8; border: 1px solid #d9c8ab; border-radius: 15px; text-align: center; padding: 10px 18px; font: italic 15px/1.35 Georgia, serif; margin: 0 0 10px; }

/* Barra de navegación y tarjetas */
.workspace { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.topbar, .calendar-card, .card, .hero { background: var(--cream); border: 1px solid var(--edge); border-radius: var(--round); box-shadow: var(--shadow); }
.topbar { padding: 13px 18px; display: flex; gap: 13px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.month-navigation, .view-tabs, .hero-right { display: flex; align-items: center; gap: 7px; }
.month-navigation h2 { margin: 0 0 0 9px; font-size: 24px; text-transform: capitalize; }
.btn { background: #fffdf8; border: 1px solid var(--edge); color: var(--ink); border-radius: 11px; padding: 8px 12px; font-weight: 650; transition: background .15s, transform .12s; }
.btn:hover { background: #eef2e5; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--orange); color: #fff; border-color: #cc7a5c; font-weight: 750; padding: 12px 15px; }
.btn.primary:hover { background: #c9795d; }
.btn.secondary { font-size: 12px; }
.btn.danger { color: #a6574b; border-color: #e7c8c1; }
.btn.full { width: 100%; }
.btn.circle { border-radius: 99px; min-width: 34px; }
.btn.icon-btn { padding: 3px 9px; font-size: 18px; line-height: 1.4; }
.view-tabs { padding: 4px; border: 1px solid var(--edge); background: #f4f0e7; border-radius: 14px; }
.view-tab { border: 0; border-radius: 10px; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 12px; font-weight: 750; }
.view-tab.active { background: var(--forest); color: #fff; box-shadow: 0 3px 7px #243a311c; }
.hero { background: linear-gradient(115deg, #eff2df, #f8f1e3 71%, #f5e7d4); display: flex; padding: 18px 27px; gap: 20px; align-items: center; justify-content: space-between; overflow: hidden; }
.eyebrow { font-size: 10px; color: #799072; letter-spacing: .15em; font-weight: 800; }
.hero h2 { font-size: 22px; margin: 4px 0 3px; }
.hero p { color: var(--muted); font-size: 12px; margin: 0; }
.hero-right { gap: 18px; }
.pet { font-size: 51px; filter: drop-shadow(1px 6px 3px #436b4540); cursor: pointer; user-select: none; animation: bob 3.5s ease-in-out infinite; }
.hero-progress { min-width: 145px; }
.hero-progress b { font-size: 25px; font-family: Georgia, serif; }
.hero-progress small { font-size: 11px; display: block; }
.meter { width: 100%; height: 8px; background: #d8dec9; border-radius: 20px; overflow: hidden; margin: 4px 0; }
.meter span { height: 100%; background: #789a74; display: block; border-radius: 20px; transition: width .4s; }
.tools-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.filters label { font-size: 11px; font-weight: 750; color: var(--muted); }
.filters select { min-width: 115px; max-width: 175px; background: var(--cream); border: 1px solid #ddd9cb; padding: 7px; border-radius: 9px; color: var(--ink); font-size: 12px; }
.drag-tip { font-size: 11px; }

/* Calendario: celdas de día y pastillas arrastrables */
.calendar-card { min-height: 255px; overflow: hidden; }
.weeknames, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weeknames { background: #f2eedf; border-bottom: 1px solid var(--edge); }
.weeknames span { text-align: center; padding: 11px 4px; font-size: 12px; font-weight: 750; }
.daycell { min-width: 0; min-height: 128px; padding: 8px; border-right: 1px solid #e9e5d9; border-bottom: 1px solid #e9e5d9; }
.daycell:nth-child(7n) { border-right: 0; }
.daycell:hover, .daycell.drop-active, .hour-drop:hover, .hour-drop.drop-active { background: #e9f1e3; }
.daycell.outside { background: #f8f5ee; color: #a7a99c; }
.daynum { display: inline-grid; place-items: center; min-width: 26px; height: 26px; font-size: 12px; border-radius: 50%; font-weight: 750; }
.daycell.today .daynum { background: var(--forest); color: #fff; }
.dayhead { display: flex; justify-content: space-between; align-items: center; }
.dayadd { opacity: 0; border: 0; background: transparent; color: var(--forest); font-size: 17px; }
.daycell:hover .dayadd, .dayadd:focus-visible { opacity: 1; }
.event { --event-color: #8aa58b; --event-fill: #eaf1e7; display: flex; gap: 4px; align-items: center; width: 100%; min-width: 0; margin: 3px 0; border: 1px solid #dde3d8; border-left: 4px solid var(--event-color); border-radius: 8px; background: var(--event-fill); font-size: 11px; padding: 5px 4px; color: var(--ink); }
.event.deadline { border-left-style: dashed; }
.event.done { opacity: .55; }
.event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; flex: 1; min-width: 0; }
.event-title:hover, .pending-main:hover strong { text-decoration: underline; }
.drag-handle { flex-shrink: 0; background: none; border: 0; color: #718671; font-size: 14px; padding: 2px; cursor: grab; line-height: 1; touch-action: none; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { background: #ffffff77; border-radius: 5px; }
.more-label { font-size: 10px; color: var(--muted); padding: 3px; }
.week-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.week-column { border: 1px solid var(--edge); background: #fdfbf6; border-radius: 12px; min-height: 250px; padding: 9px; }
.week-column h4 { font: 700 12px 'Trebuchet MS', sans-serif; text-align: center; margin-bottom: 8px; }
.week-column .event { align-items: flex-start; }
.week-column .event-title { white-space: normal; overflow-wrap: anywhere; }
.hour-line { display: grid; grid-template-columns: 75px minmax(0, 1fr); border-bottom: 1px solid var(--edge); min-height: 57px; }
.hour-label { border-right: 1px solid var(--edge); padding: 11px 14px; font-size: 12px; text-align: right; color: var(--muted); }
.hour-drop { padding: 5px 12px; min-height: 57px; }
.hour-drop .event { max-width: 520px; }
.hour-drop .btn { opacity: 0; padding: 3px 6px; font-size: 10px; }
.hour-drop:hover .btn, .hour-drop .btn:focus-visible { opacity: 1; }
.day-view-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; }
.day-view-head h3 { margin: 0; text-transform: capitalize; }
.all-day { padding: 10px 18px; background: #f6f3e8; }
.all-day .event { max-width: 550px; }

/* Árbol de clientes con tareas y sesiones anidadas */
.tree-container { padding: 24px 22px 30px; background: radial-gradient(ellipse at center bottom, #eff2e2 0, transparent 67%); }
.tree-intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.tree-intro h3 { font-size: 26px; margin-bottom: 4px; }
.tree-intro p { color: var(--muted); font-size: 12px; }
.tree-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; align-items: start; }
.tree-group { border-radius: 19px; border: 2px dashed #c6d4b9; background: #fffcf6ed; padding: 13px; min-height: 120px; }
.tree-group.drop-active, .tree-task.drop-active { background: #dcefd5; outline: 2px solid #85a77a; }
.tree-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--edge); padding-bottom: 10px; }
.tree-group-head .tree-trunk { font-size: 29px; }
.tree-group-head h4 { font-size: 18px; margin: 0; }
.tree-group-head small { font-size: 11px; }
.tree-task { position: relative; border: 1px solid #e4e5d9; border-radius: 12px; background: #fffefa; padding: 10px; margin: 10px 0; }
.tree-task::before { content: '└'; position: absolute; top: 9px; left: -13px; color: #95ac86; }
.tree-task-top { display: flex; align-items: center; gap: 6px; }
.tree-task-title { font-size: 13px; text-align: left; border: 0; background: transparent; color: var(--ink); font-weight: 750; flex: 1; overflow-wrap: anywhere; }
.tree-task.done { opacity: .65; }
.tree-task.done .tree-task-title { text-decoration: line-through; }
.tree-meta { margin: 6px 0; font-size: 11px; color: var(--muted); }
.tree-sessions { margin-top: 10px; margin-left: 14px; padding-left: 10px; border-left: 2px solid #afc5a0; }
.tree-session { font-size: 11px; display: flex; align-items: center; gap: 6px; margin-top: 5px; padding: 4px; border-radius: 6px; background: #f4f6ef; }
.tree-session .tree-session-label { cursor: pointer; flex: 1; }
.tree-progress { height: 5px; border-radius: 9px; overflow: hidden; background: #e2ead9; }
.tree-progress span { display: block; height: 100%; background: #91ad79; }
.empty-state { color: var(--muted); font-size: 12px; font-style: italic; padding: 15px 6px; }

/* Paneles secundarios y formularios */
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr); gap: 14px; align-items: start; }
.card { padding: 18px; min-width: 0; }
.card-heading h3 { margin: 0; font-size: 19px; }
.detail-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--edge); }
.detail-item:last-child { border: 0; }
.detail-item .detail-body { flex: 1; min-width: 0; }
.detail-item strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.detail-item small { display: block; margin-top: 3px; font-size: 11px; }
.detail-item .btn { padding: 5px 7px; font-size: 11px; }
.helper { font-size: 12px; line-height: 1.5; }
.fineprint { font-size: 11px; margin: 13px 0 0; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.overlay { position: fixed; inset: 0; z-index: 50; background: #1f342d92; backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: center; padding: 16px; }
.modal { background: #fffcf5; border-radius: 23px; padding: 22px; border: 1px solid #c8d2b9; width: min(600px, 100%); max-height: 93vh; overflow: auto; box-shadow: 0 25px 90px #101b1644; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.modal-heading h2 { font-size: 24px; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12px; font-weight: 750; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; display: block; color: var(--ink); background: #fffefa; border: 1px solid #d9decf; border-radius: 10px; padding: 10px; min-width: 0; }
.field textarea { min-height: 75px; resize: vertical; }
.field input[type=color] { height: 41px; padding: 3px; cursor: pointer; }
.field input[type=checkbox] { display: inline; width: auto; }
.check-field { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 3px 0 15px; }
.check-field input { width: auto; }
.modal-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.session-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 10px; border-bottom: 1px solid var(--edge); font-size: 12px; }
.picker-options { display: flex; flex-wrap: wrap; gap: 7px; }
.animal-choice { font-size: 22px; width: 40px; height: 39px; background: #f5f3e8; border: 1px solid var(--edge); border-radius: 11px; }
.animal-choice.active { background: #dce8d0; border-color: #8eae8b; }
.notice { background: #eef2e6; color: #4f6653; border: 1px solid #d5dfcd; padding: 12px; font-size: 12px; border-radius: 12px; line-height: 1.6; }
.notice a { color: #31553e; }
.divider { border: 0; border-top: 1px solid var(--edge); margin: 16px 0; }
#toast { position: fixed; z-index: 90; bottom: 20px; left: 50%; transform: translateX(-50%); background: #35493b; color: white; border-radius: 16px; padding: 12px 20px; font-size: 13px; box-shadow: 0 10px 35px #263c3155; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 30px); text-align: center; }
#toast.show { opacity: 1; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; background: #f7fcf1; color: var(--forest-dark); border: 2px solid #8bb48a; padding: 8px 12px; border-radius: 12px; box-shadow: 0 13px 35px #2c54353a; opacity: .94; }
#leafBurst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 100; }
.leaf { position: absolute; top: -30px; font-size: 24px; animation: leaf-fall 1.7s ease-in forwards; }
@keyframes leaf-fall { 0% { opacity: 0; transform: translateY(-30px) rotate(0deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift), 102vh) rotate(var(--spin)); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-7px) rotate(5deg); } }
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .sidebar { padding: 14px; }
  .bottom-grid { grid-template-columns: 1fr; }
  .daycell { min-height: 114px; }
}
@media (max-width: 760px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .workspace { order: 1; }
  .forest-art { display: none; }
  .sidebar .side-section { max-width: 100%; }
  .topbar, .hero { padding: 12px; }
  .hero h2 { font-size: 18px; }
  .hero-right { gap: 9px; }
  .pet { font-size: 37px; }
  .hero-progress { min-width: 94px; }
  .month-navigation h2 { font-size: 19px; }
  .daycell { min-height: 90px; padding: 4px; }
  .dayadd { display: none; }
  .event { font-size: 9px; padding: 3px 1px; border-radius: 5px; }
  .drag-handle { font-size: 12px; }
  .weeknames span { font-size: 10px; padding: 8px 1px; }
  .week-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-row { align-items: flex-start; }
  .drag-tip { display: block; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 380px) {
  .hero p, .hero-progress small { display: none; }
  .event-title { font-size: 8px; }
  .topbar { justify-content: center; }
  .tools-row select { min-width: 85px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.chip-inline { border: 0; background: transparent; color: inherit; font-size: inherit; display: inline-flex; align-items: center; gap: 5px; padding: 0; cursor: pointer; }
.week-slot { border-top: 1px dashed var(--edge); padding: 5px 2px; min-height: 43px; }
.week-slot small { font-size: 9px; }
.week-slot .event { margin: 3px 0; }

/* ===== v4: cartera de clientes + flujo de producción ===== */
.sidebar > .btn.full { margin-bottom: 7px; }
.view-tabs { flex-wrap: wrap; }
.flow-view, .projects-view, .capacity-view { padding: 22px; min-height: 450px; }
.flow-intro { display:flex; align-items:flex-start; justify-content:space-between; gap: 15px; margin-bottom: 18px; flex-wrap:wrap; }
.flow-intro h3 { font-size:clamp(19px, 2vw, 26px); margin: 0 0 6px; }
.flow-intro p { color:var(--muted); margin:0; font-size:12px; line-height:1.5; }
.flow-pills { display:flex; gap:9px; flex-wrap:wrap; font-size:12px; color:var(--forest-dark); }
.flow-pills span, .number-pill { border:1px solid #d8dfd1; background:#eff3e9; padding:5px 8px; border-radius:20px; font-size:11px; }
.kanban-board { display:grid; grid-template-columns:repeat(6,minmax(214px,1fr)); gap:10px; overflow-x:auto; padding:4px 4px 15px; align-items:start; }
.kanban-col { min-height:350px; border:1px solid #d9e2d2; background:#f3f5ed; padding:10px; border-radius:15px; }
.kanban-col:nth-child(2) { background:#edf1ee; }
.kanban-col:nth-child(3) { background:#edf2e6; }
.kanban-col:nth-child(4) { background:#f8f3e6; }
.kanban-col:nth-child(5) { background:#f1edf4; }
.kanban-col:nth-child(6) { background:#eaf4e9; }
.kanban-col.drop-active { outline:3px solid #76a47c; background:#e0f3d7; }
.kanban-heading { display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:12px;padding:5px 4px 10px; }
.kanban-policy { font-size:10px; margin:0 0 8px; color:var(--muted); }
.kanban-items { min-height:265px; }
.kanban-task { padding:11px; margin-bottom:9px; background:#fffdfa; border:1px solid #e4e5db; border-left:4px solid var(--card-accent); border-radius:11px; box-shadow: 0 4px 10px #20362309; }
.kanban-task.is-blocked { border-color:#dcad91; }
.kanban-card-top {display:flex;gap:4px;align-items:flex-start;}
.kanban-title { flex:1;text-align:left;font-weight:760;font-size:12px;line-height:1.4;color:var(--ink);border:none;background:transparent;word-break:break-word;cursor:pointer; }
.priority { font-size:9px; padding:3px 5px;border-radius:6px;background:#f0f1e8;white-space:nowrap; }
.priority.high {background:#fbeccc;color:#8b600c;}
.priority.urgent {background:#fbe0dd;color:#9d4736;}
.priority.low {background:#e7edf0;color:#507688;}
.kanban-client {display:block;margin:8px 0;font-size:10px;color:var(--muted);}
.kanban-card-meta {display:flex;justify-content:space-between;align-items:center;gap:7px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:5px 0;}
.kanban-blocked {font-size:11px;color:#98533b;background:#fff0e7;border-radius:8px;padding:7px;margin:7px 0;overflow-wrap:anywhere;}
.kanban-status-label {display:flex;align-items:center;justify-content:space-between;gap:5px;border-top:1px solid var(--edge);padding-top:8px;font-size:10px;color:var(--muted);margin-top:8px;}
.kanban-status-label select {min-width:0;width:125px;max-width:70%;font-size:11px;border:1px solid var(--edge);border-radius:7px;background:#fffdfa;padding:5px;color:var(--ink);}
.project-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;align-items:start;}
.project-card {border:1px solid #d9e1d4;border-top:5px solid var(--client-color);border-radius:16px;background:#fffdfa;padding:16px;}
.project-card header,.deliverable-header {display:flex;justify-content:space-between;align-items:flex-start;gap:8px;}
.project-card h4 {font-size:21px;margin:2px 0 6px;}
.project-card header p {margin:0;color:var(--muted);font-size:12px;white-space:pre-line;}
.project-client {font-size:11px;color:var(--muted);font-weight:800;}
.project-stats {display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:13px 0;padding:9px;background:#f1f4eb;border-radius:9px;font-size:11px;}
.project-deliverables {display:flex;flex-direction:column;gap:9px;}
.deliverable {background:#f9f8f0;border:1px solid #e5e8dc;padding:10px;border-radius:10px;}
.deliverable-header strong {font-size:13px;display:block;overflow-wrap:anywhere;}
.deliverable-header small {font-size:10px;color:var(--muted);display:block;margin-top:3px;}
.deliverable a {font-size:11px;display:block;margin:8px 0;}
.approval-select {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;font-size:11px;color:var(--muted);margin:9px 0;}
.approval-select select {font-size:11px;color:var(--ink);border:1px solid #d8decb;background:#fff;border-radius:8px;padding:6px;}
.deliverable-tasks {display:flex;flex-direction:column;gap:5px;margin-top:5px;}
.project-taskline {text-align:left;background:transparent;border:0;border-radius:5px;color:var(--ink);font-size:11px;padding:5px;cursor:pointer;}
.project-taskline:hover,.orphan-grid button:hover {background:#e7eee1;}
.project-actions {display:flex;gap:6px;margin-top:13px;flex-wrap:wrap;}
.orphan-tasks {margin-top:20px;border-top:1px solid var(--edge);padding-top:12px;}
.orphan-tasks h4 {margin:0 0 9px;}
.orphan-grid {display:flex;gap:6px;flex-wrap:wrap;}
.orphan-grid button {border:1px solid var(--edge);border-radius:8px;padding:8px;background:#fffdf6;color:var(--ink);font-size:11px;}
.capacity-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px;}
.capacity-summary div {background:#eff3e8;border:1px solid #d5dece;border-radius:14px;padding:14px;}
.capacity-summary small {display:block;color:var(--muted);font-size:12px;}
.capacity-summary strong {display:block;font-size:29px;margin-top:5px;}
.capacity-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-bottom:18px;}
.capacity-card {padding:15px;border:1px solid #d5dfce;border-radius:13px;background:#fffefa;}
.capacity-card.overload {background:#fff4ec;border-color:#ddaa88;}
.capacity-card header {display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap;}
.capacity-card header span {font-size:10px;color:var(--muted);}
.capacity-card p {font-size:12px;margin:11px 0 7px;}
.capacity-meter {margin-top:14px;height:10px;background:#e4e9df;border-radius:20px;overflow:hidden;}
.capacity-meter span {display:block;height:100%;border-radius:20px;}
.capacity-card-meta {font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:5px;}
.activity-list {max-height:450px;overflow:auto;}
.activity-list small {font-size:10px;color:var(--muted);}
@media(max-width:760px) {
  .kanban-board {grid-template-columns:repeat(6,minmax(210px,75vw));}
  .flow-view,.projects-view,.capacity-view {padding:12px;}
  .project-grid {grid-template-columns:1fr;}
  .capacity-summary {grid-template-columns:repeat(3,minmax(0,1fr));}
  .capacity-summary div {padding:9px;}
  .capacity-summary strong {font-size:20px;}
  .capacity-summary small {font-size:10px;}
  .view-tabs {justify-content:center;}
}
/* Ramas de proyectos y entregables */
.forest-project {padding:10px 9px 12px; margin:10px 0; background:#f4f8ed; border:1px solid #d6dfc8; border-radius:13px;}
.forest-project-head {display:flex;justify-content:space-between;align-items:center;gap:7px;margin-bottom:10px;}
.forest-project-head strong {font-size:13px;}
.forest-project-head small {font-size:10px;color:var(--muted);}
.forest-deliverable {margin:8px 0;padding:9px 6px 8px 12px;border-left:3px solid #95b68b;background:#fffefa;border-radius:0 9px 9px 0;}
.forest-deliverable-head {display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 7px;font-size:11px;font-weight:700;}
.forest-deliverable-head .btn {font-size:10px;padding:4px;}
.forest-project.drop-active,.forest-deliverable.drop-active {outline:2px solid #68a071;background:#e0eed9;}
.tree-hours {display:block;font-size:10px;color:var(--muted);margin:4px 0 7px;}
.event-title:is(button){display:block;cursor:pointer;border:none;background:transparent;color:inherit;text-align:left;padding:0;min-width:0;max-width:100%;}

/* Notion v5: origen de solo lectura y advertencia de revisión */
.notion-source{background:#edf2e5;border:1px solid #a9b99f;border-radius:12px;padding:13px 16px;margin:12px 0;color:#415044;font-size:13px;line-height:1.5;}
.notion-source p{margin:6px 0 10px;}
.notion-source a{color:#426750;text-decoration:underline;font-weight:700;}
.needs-review{background:#fff1d9;border-left:4px solid #bb8755;padding:7px;}

/* En tableros importados con decenas de tareas, cada columna tiene su propio scroll. */
.kanban-items { max-height: min(72vh, 760px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 3px; }
