:root{
  --clay:#A47864; --clay-dark:#8A6250; --clay-light:#DECFCA;
  --cream:#FBF7F4; --paper:#FFFFFF; --ink:#2E2622; --ink-soft:#6B5D56;
  --line:#E8DDD6; --sage:#7C9070; --sage-light:#E4EAE0;
  --amber:#C79A4B; --amber-light:#F3E9D3;
}
#lcac-root, #lcac-root *{ box-sizing:border-box; font-family:'Montserrat',sans-serif; }
#lcac-root{ background:var(--cream); color:var(--ink); border-radius:12px; overflow:hidden; border:1px solid var(--line); }

/* ---- Login ---- */
.lcac-login-wrap{ display:flex; justify-content:center; padding:40px 20px; font-family:'Montserrat',sans-serif; }
.lcac-login-card{ background:#FFFFFF; border:1px solid #E8DDD6; border-radius:16px; padding:32px; max-width:360px; width:100%; text-align:left; }
.lcac-login-logo{ width:100%; height:auto; display:block; border-radius:10px; margin-bottom:14px; }
.lcac-login-card p{ font-size:13px; color:#6B5D56; margin-bottom:18px; }
.lcac-login-card p.login-username, .lcac-login-card p.login-password{ text-align:left; }
.lcac-login-card label{ font-size:12px; font-weight:600; color:#6B5D56; display:block; margin-bottom:4px; }
.lcac-login-card input[type=text], .lcac-login-card input[type=password]{ width:100%; padding:10px 12px; border:1px solid #E8DDD6; border-radius:8px; margin-bottom:14px; font-size:14px; }
.lcac-login-card input[type=submit]{ width:100%; padding:11px; background:#A47864; color:#fff; border:none; border-radius:8px; font-weight:700; cursor:pointer; font-size:14px; }
.lcac-login-card input[type=submit]:hover{ background:#8A6250; }
.lcac-error{ color:#B4544A; font-size:13px; margin-top:10px; }

/* ---- Admin project picker ---- */
.lcac-admin-bar{ display:flex; align-items:center; gap:10px; padding:10px 18px; background:var(--paper); border-bottom:1px solid var(--line); font-size:13px; }
.lcac-admin-bar select{ padding:6px 10px; border-radius:8px; border:1px solid var(--line); font-size:13px; }

.lcac-loading{ padding:40px; text-align:center; color:var(--ink-soft); }

/* ---- Top bar ---- */
.lcac-top{ display:flex; align-items:center; gap:16px; padding:12px 20px; background:var(--paper); border-bottom:1px solid var(--line); }
.lcac-logo-badge{ display:flex; align-items:center; justify-content:center; width:46px; height:46px; flex-shrink:0; }
.lcac-logo-badge img{ height:100%; width:100%; object-fit:contain; display:block; }
.lcac-project-name{ font-size:17px; font-weight:700; }
.lcac-project-name input{ font:700 17px 'Montserrat',sans-serif; border:none; border-bottom:2px solid var(--clay-light); background:transparent; }
.lcac-last-update{ font-size:12px; color:var(--ink-soft); }
.lcac-btn{ border:1px solid var(--line); background:var(--paper); color:var(--ink-soft); border-radius:8px; padding:7px 12px; font-size:12px; cursor:pointer; }
.lcac-btn:hover{ background:var(--cream); }
.lcac-btn.primary{ background:var(--clay); color:#fff; border:none; font-weight:600; }
.lcac-readonly-flag{ display:flex; align-items:center; gap:8px; background:var(--clay-light); color:var(--clay-dark); border-radius:10px; padding:8px 14px; font-size:13px; margin-bottom:18px; width:fit-content; }

/* ---- Layout ---- */
.lcac-body{ display:flex; min-height:560px; }
.lcac-sidebar{ width:230px; flex-shrink:0; background:var(--paper); border-right:1px solid var(--line); padding:16px 8px; }
.lcac-nav-item{ display:flex; align-items:center; gap:8px; width:100%; padding:9px 12px; border:none; background:transparent; color:var(--ink-soft); border-radius:8px; cursor:pointer; font-size:13px; font-weight:500; text-align:left; margin-bottom:2px; }
.lcac-nav-item.active{ background:var(--clay-light); color:var(--clay-dark); font-weight:700; }
.lcac-nav-item.sub{ padding-left:26px; font-size:12.5px; }
.lcac-nav-group{ margin:14px 10px 6px; font-size:10.5px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.5px; }
.lcac-main{ flex:1; overflow-y:auto; padding:24px 28px; }

/* ---- Cards / dashboard ---- */
.lcac-stats-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:24px; }
.lcac-stat{ background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.lcac-stat.accent{ background:var(--clay); color:#fff; border:none; }
.lcac-stat .label{ font-size:10.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--ink-soft); margin-bottom:4px; }
.lcac-stat.accent .label{ color:rgba(255,255,255,.85); }
.lcac-stat .value{ font-size:21px; font-weight:700; }
.lcac-section-title{ font-size:13px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.5px; margin:0 0 10px; }
.lcac-chapters-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px; margin-bottom:26px; }
.lcac-chapter-card{ text-align:left; background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:12px; cursor:pointer; display:flex; flex-direction:column; gap:6px; }
.lcac-chapter-card .title{ font-size:12.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lcac-chapter-card .meta{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--ink-soft); }
.lcac-progress{ height:6px; background:var(--line); border-radius:99px; overflow:hidden; }
.lcac-progress > div{ height:100%; background:var(--sage); }

.lcac-chap-row, .lcac-pago-row, .lcac-hito-row { min-width: 0; }
.lcac-chap-row input, .lcac-chap-row select,
.lcac-pago-row input, .lcac-pago-row select,
.lcac-hito-row input { min-width: 0; width: 100%; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; }

/* ---- Table-ish list (items) ---- */
.lcac-item-row{ display:grid; grid-template-columns:1fr 120px 150px 34px; gap:10px; align-items:center; padding:9px 10px; border:1px solid var(--line); border-radius:9px; margin-bottom:8px; background:var(--paper); }
.lcac-item-row input, .lcac-item-row select{ border:1px solid var(--line); border-radius:6px; padding:6px 8px; font-size:13px; width:100%; }
.lcac-status-badge{ font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:99px; display:inline-block; }
.lcac-add-btn{ display:flex; align-items:center; gap:6px; border:1px dashed var(--clay); background:var(--clay-light); color:var(--clay-dark); font-weight:600; font-size:13px; padding:9px 14px; cursor:pointer; border-radius:9px; margin-bottom:14px; }
.lcac-icon-btn{ border:none; background:transparent; color:var(--ink-soft); cursor:pointer; padding:6px; border-radius:6px; }
.lcac-icon-btn.danger:hover{ background:#F6E4E2; color:#B4544A; }
.lcac-empty{ color:var(--ink-soft); font-size:13.5px; }

/* ---- Visits / seguimiento ---- */
.lcac-visit{ background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:16px; margin-bottom:12px; }
.lcac-visit-head{ display:flex; gap:12px; align-items:center; margin-bottom:10px; }
.lcac-visit-head input[type=date], .lcac-visit-head input[type=text]{ border:1px solid var(--line); border-radius:6px; padding:6px 8px; font-size:13px; }
.lcac-visit textarea{ width:100%; min-height:70px; border:1px solid var(--line); border-radius:8px; padding:8px; font-size:13px; margin-bottom:10px; }
.lcac-attachments{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.lcac-thumb{ width:84px; height:84px; border-radius:8px; overflow:hidden; border:1px solid var(--line); position:relative; cursor:pointer; }
.lcac-thumb img, .lcac-thumb video{ width:100%; height:100%; object-fit:cover; }
.lcac-thumb .pdf-chip{ display:flex; align-items:center; justify-content:center; height:100%; background:var(--cream); font-size:11px; color:var(--ink-soft); }
.lcac-modal-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.7); display:flex; align-items:center; justify-content:center; z-index:9999; }
.lcac-modal-content{ max-width:90vw; max-height:90vh; }
.lcac-modal-content img, .lcac-modal-content video{ max-width:90vw; max-height:85vh; border-radius:8px; }

/* ---- Tareas ---- */
.lcac-task-row{ display:flex; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--line); border-radius:9px; padding:9px 12px; margin-bottom:8px; }
.lcac-task-row.done{ opacity:.55; text-decoration:line-through; }

/* ---- Calendario ---- */
.lcac-event-row{ display:flex; gap:12px; align-items:center; background:var(--paper); border:1px solid var(--line); border-radius:9px; padding:9px 12px; margin-bottom:8px; }
.lcac-event-row .date{ font-weight:700; color:var(--clay-dark); font-size:13px; min-width:90px; }
.lcac-gantt-row{ display:grid; grid-template-columns:200px 1fr; align-items:center; gap:8px; margin-bottom:6px; font-size:12px; }
.lcac-gantt-track{ position:relative; height:14px; background:var(--line); border-radius:6px; }
.lcac-gantt-bar{ position:absolute; top:0; height:100%; background:var(--clay); border-radius:6px; }
