/* Apartado Arbolado. Reutiliza las variables y componentes de styles.css. */

.topbar-links { display: flex; align-items: center; gap: 6px; }
.link-button { background: none; cursor: pointer; font-family: inherit; }
.dashboard-actions a.secondary-button { display: inline-flex; align-items: center; text-decoration: none; }

.arbolado-page .app-name { color: var(--teal); }

/* Informe en Word: rango de fechas y casillas */
.report-card { margin-bottom: 24px; }
.report-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: end; }
.report-form > label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.report-form input[type="date"] { min-height: 44px; min-width: 0; width: 100%; }
.report-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; border: 0; }
.report-fields legend { width: 100%; margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 750; }
.report-fields label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; font-size: 14px; font-weight: 650; cursor: pointer; }
.report-fields input { width: 18px; height: 18px; accent-color: var(--teal); }
.report-form .form-error { grid-column: 1 / -1; }
.report-form .form-error:empty { display: none; }
.report-button { justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.report-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.activity-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: end; }
.activity-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.activity-form label small { color: var(--muted); font-weight: 600; }
.activity-form .wide { grid-column: 1 / -1; }
.activity-form .form-error:empty { display: none; }
.activity-form .save-button { justify-self: start; }

.activities-section { margin-top: 28px; }
.segmented { display: inline-flex; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.segmented button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 750; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--teal-soft); color: var(--teal-dark); }

.activity-list { display: grid; gap: 18px; margin-top: 18px; }
.arbolado-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 30px rgba(20, 28, 92, .05); }
.arbolado-card.archived { opacity: .72; }
/* Cada actividad se despliega para ver sus elementos */
.arbolado-card-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.arbolado-card-header::-webkit-details-marker { display: none; }
.arbolado-card-header h3 { margin: 0 0 4px; font-size: 19px; }
.arbolado-card-header p { margin: 0; color: var(--muted); font-size: 13px; }
.card-chevron { flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.arbolado-card[open] .card-chevron { transform: rotate(-135deg); }
.arbolado-card-body { margin-top: 16px; }
.arbolado-notes { margin: 0 0 14px; font-size: 13px; font-style: italic; }

.item-form { display: flex; gap: 10px; margin-bottom: 16px; }
.item-form input { flex: 1; min-width: 0; min-height: 44px; }
.item-form .save-button { flex: none; }
.item-list { display: grid; gap: 14px; }
.item-empty { margin: 0; color: var(--muted); font-size: 14px; }
.item-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfcfe; }
.item-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.item-header h4 { margin: 0; font-size: 16px; }
.item-card .stage-grid { margin: 12px 0 4px; }
.item-delete { margin-top: 6px; color: var(--muted); }
.progress-pill { flex: none; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #fff4e5; color: #8a5a00; }
.progress-pill.complete { background: var(--teal-soft); color: var(--teal-dark); }

.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 14px; }
.stage-slot { display: grid; gap: 7px; align-content: start; }
.stage-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.stage-empty, .stage-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; cursor: pointer; }
.stage-empty { display: grid; place-content: center; justify-items: center; gap: 6px; border: 2px dashed #b9c7dd; background: var(--paper); color: var(--blue); font-weight: 750; font-size: 13px; }
.stage-empty svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.stage-empty:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--blue); }
.stage-empty:disabled { cursor: not-allowed; opacity: .55; }
.stage-photo { border: 0; padding: 0; background: #e6ebf3; }
.stage-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-slot small { color: var(--muted); font-size: 11.5px; }
.stage-slot .stage-author { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.user-greeting { margin: 4px 0 8px; font-weight: 750; color: var(--teal-dark); }
.stage-replace { justify-self: start; border: 0; background: none; color: var(--blue); font-weight: 750; font-size: 12px; padding: 0; cursor: pointer; text-decoration: underline; }

/* Ubicación: solo la palabra y un punto de color (verde buena, amarillo regular, rojo mala o sin ubicación). */
.stage-location, .location-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; color: var(--ink); }
.stage-location { justify-self: start; font-size: 12px; text-decoration: none; }
.location-status { margin: 10px 0 0; font-size: 13px; }
.location-status[hidden] { display: none; }
.location-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; transition: background-color .3s; }
.location-dot.good { background: #1f9d55; }
.location-dot.fair { background: #e6b400; }
.location-dot.poor { background: #d93025; }

.arbolado-actions { justify-content: flex-end; }
.confirm-note { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .activity-form { grid-template-columns: 1fr; }
  .activity-form .save-button { justify-self: stretch; }
  .arbolado-card { padding: 16px; }
  .stage-grid { gap: 8px; }
  .stage-empty span { font-size: 11px; }
  .report-button { justify-self: stretch; }
  .item-card { padding: 10px; }
  .arbolado-actions { justify-content: flex-start; flex-wrap: wrap; }
  .arbolado-page .topbar-links .back-link { padding: 8px; font-size: 12.5px; }
  .arbolado-page .brand-divider, .arbolado-page .app-name { display: none; }
}
