
/* Hootag · Project Template Core · CP03.3 C09 */
.project-template-core-field{grid-column:auto}
.project-template-core-field select{width:100%}

.project-template-core-preview{
  display:none;
  margin:12px 0 16px;
  padding:15px;
  border:1px solid var(--border,#d3dde7);
  border-radius:15px;
  background:var(--surface-alt,#f6f9fc);
}
.project-template-core-preview.visible{display:block}
.project-template-core-preview small{display:block;color:var(--muted,#718197)}
.project-template-core-preview h3{margin:3px 0 7px}
.project-template-core-preview p{margin:0 0 10px;color:var(--muted,#718197)}

.project-template-core-group{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:12px;
}
.project-template-core-group>b{
  width:100%;
  font-size:10px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted,#718197);
}

.project-template-core-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 10px;
  border:1px solid var(--border,#d3dde7);
  border-radius:999px;
  background:var(--surface,#fff);
  color:var(--text,#18283b);
  font:inherit;
  font-size:11px;
  cursor:default;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}
button.project-template-core-chip{cursor:pointer}
button.project-template-core-chip:hover{
  border-color:#8fa9c1;
  background:#fff;
}
button.project-template-core-chip.selected{
  background:#e8f2fb;
  border-color:#4f8fbe;
  color:#154f7b;
  box-shadow:inset 0 0 0 1px rgba(79,143,190,.12);
}
button.project-template-core-chip.optional{
  border-style:dashed;
}
button.project-template-core-chip.optional.selected{
  border-style:solid;
}
.project-template-core-chip.required{
  cursor:default;
}

.project-template-core-summary{
  margin-top:14px;
  padding:12px 13px;
  border:1px solid #d4dee8;
  border-radius:12px;
  background:#fff;
}
.project-template-core-summary>strong{
  display:block;
  margin-bottom:7px;
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#52667d;
}
.project-template-core-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 14px;
}
.project-template-core-summary-item{
  min-width:0;
  font-size:11px;
  color:#62758b;
}
.project-template-core-summary-item b{
  display:block;
  margin-top:2px;
  color:#1c2d41;
  font-size:12px;
  word-break:break-word;
}
.project-template-core-note{
  margin-top:10px!important;
  font-size:11px!important;
}
.project-template-core-loading{
  font-size:11px;
  color:var(--muted,#718197);
  margin:0 0 10px;
}
.project-template-save-state{
  margin-top:8px;
  font-size:11px;
  color:#60758c;
}
.project-template-save-state.ok{color:#26734b}
.project-template-save-state.error{color:#a33b45}

@media(max-width:700px){
  .project-template-core-summary-grid{grid-template-columns:1fr}
}


.project-template-matters-card{margin-top:16px}
.project-template-matters-help{margin:0 0 12px;color:var(--muted,#718197);font-size:13px}
.project-template-matter-list{display:grid;gap:8px}
.project-template-matter-row{
  display:flex;align-items:center;gap:11px;padding:11px 12px;
  border:1px solid var(--border,#d3dde7);border-radius:12px;background:#fff;
  color:inherit;text-decoration:none;
}
.project-template-matter-row:hover{border-color:#9fb3c6;background:#fbfdff}
.project-template-matter-state{width:9px;height:9px;border-radius:999px;background:#8fa0b1;flex:0 0 auto}
.project-template-matter-state.open{background:#2d8b62}
.project-template-matter-state.in_progress{background:#2c74a7}
.project-template-matter-state.waiting{background:#c79a35}
.project-template-matter-state.closed{background:#2d8b62}
.project-template-matter-copy{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}
.project-template-matter-copy b{font-size:13px}
.project-template-matter-copy small{color:var(--muted,#718197);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-template-matter-open{font-size:12px;font-weight:700;color:#245d8a;white-space:nowrap}
@media(max-width:700px){
 .project-template-matter-row{align-items:flex-start}
 .project-template-matter-open{display:none}
 .project-template-matter-copy small{white-space:normal}
}


/* CP03.3 C11 · Project 360° matters workspace */
.project-template-progress-strip{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0 14px;
}
.project-template-progress-strip>div{
 padding:10px 12px;border:1px solid var(--border,#d3dde7);border-radius:12px;background:#fff;
 display:flex;flex-direction:column;gap:2px;
}
.project-template-progress-strip b{font-size:18px;color:#17324d}
.project-template-progress-strip small{color:var(--muted,#718197);font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.project-template-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.project-template-matter-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px}
.project-template-matter-table th{
 text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted,#718197);
 padding:9px 10px;border-bottom:1px solid var(--border,#d3dde7);
}
.project-template-matter-table td{
 padding:11px 10px;border-bottom:1px solid #e5ebf1;vertical-align:middle;font-size:12px;
}
.project-template-matter-table tr:last-child td{border-bottom:0}
.project-template-matter-title{display:block;font-weight:700;color:#1b2d41;text-decoration:none;margin-bottom:2px}
.project-template-matter-title:hover{text-decoration:underline}
.project-template-matter-table td small{display:block;color:var(--muted,#718197)}
.project-template-dependency{display:block;margin-top:4px;color:#8a6a21;font-size:10px}
.project-template-status-pill{
 display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:700;
 background:#eef2f6;color:#506275;
}
.project-template-status-pill.open{background:#e8f6ef;color:#256a4c}
.project-template-status-pill.in_progress{background:#e7f1fa;color:#245e8e}
.project-template-status-pill.waiting{background:#fff5dc;color:#856218}
.project-template-status-pill.closed{background:#e8f6ef;color:#256a4c}
.project-template-status-select{
 min-width:118px;border:1px solid var(--border,#d3dde7);border-radius:9px;background:#fff;padding:7px 8px;font:inherit;
}
.project-template-open-link{font-weight:700;color:#245d8a;text-decoration:none;white-space:nowrap}
@media(max-width:700px){
 .project-template-progress-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* CP03.3 C15B · responsive Project 360 tables / Hitos */
.project-template-matter-table td,
.project-template-matter-table th{min-width:0}
.project-template-open-link{white-space:nowrap}

@media (max-width: 1180px){
  .project-template-table-wrap{overflow:visible!important}
  .project-template-matter-table,
  .project-template-matter-table tbody,
  .project-template-matter-table tr,
  .project-template-matter-table td{display:block;width:100%}
  .project-template-matter-table thead{display:none}
  .project-template-matter-table tbody{display:grid;gap:10px}
  .project-template-matter-table tr{
    border:1px solid #dce5ed;
    border-radius:12px;
    padding:10px 12px;
    background:#fff;
  }
  .project-template-matter-table td{
    display:grid;
    grid-template-columns:minmax(105px,135px) minmax(0,1fr);
    align-items:center;
    gap:10px;
    border:0!important;
    padding:7px 0!important;
  }
  .project-template-matter-table td:first-child{display:block;padding-top:2px!important}
  .project-template-matter-table td:not(:first-child)::before{
    content:attr(data-label);
    font-size:10px;
    font-weight:700;
    letter-spacing:.035em;
    text-transform:uppercase;
    color:#718197;
  }
  .project-template-status-select{width:100%;max-width:260px;justify-self:end}
  .project-template-open-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:7px 12px;
    border:1px solid #cbd8e4;
    border-radius:9px;
    background:#fff;
    justify-self:end;
  }
  .project-task-hitos-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .project-hitos-responsive-card{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    overflow:hidden;
  }
  .project-hitos-responsive-card input,
  .project-hitos-responsive-card textarea,
  .project-hitos-responsive-card select,
  .project-hitos-responsive-card button{
    max-width:100%;
    min-width:0;
  }
}

@media (max-width: 640px){
  .project-template-matter-table td{
    grid-template-columns:1fr;
    gap:4px;
  }
  .project-template-status-select,
  .project-template-open-link{max-width:none;width:100%;justify-self:stretch}
}


/* CP03.3 C15C · containment correction for responsive Trámites */
@media (max-width:1180px){
  .project-template-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  .project-template-matter-table{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    box-sizing:border-box!important;
  }
  .project-template-matter-table tbody{
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .project-template-matter-table tr{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .project-template-matter-table td{
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .project-template-matter-table td>*{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .project-template-status-select{
    min-width:0!important;
    width:min(100%,260px)!important;
    max-width:100%!important;
  }
  .project-template-open-link{
    max-width:100%!important;
    white-space:normal!important;
    text-align:center;
  }
}
