/* Nancy Salazar — Panel de control */
:root {
  --dash-ivory: #f9f7f2;
  --dash-champagne: #efe9df;
  --dash-champagne: #efe9df;
  --dash-ink: #0a0a0a;
  --dash-muted: #73737a;
  --dash-line: rgba(10, 10, 10, 0.12);
  --dash-serif: "Cormorant Garamond", Georgia, serif;
  --dash-sans: "Montserrat", system-ui, sans-serif;
  --dash-side: 240px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--dash-sans);
  font-weight: 400;
  color: var(--dash-ink);
  background: var(--dash-ivory);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.dash { display: flex; min-height: 100vh; }
.dash-side {
  width: var(--dash-side);
  flex-shrink: 0;
  background: var(--dash-ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.dash-brand {
  font-family: var(--dash-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.35rem;
  display: flex; align-items: center; gap: .55rem;
}
.dash-brand img {
  width: 34px; height: 34px; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 4px;
}
.dash-side-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 1.5rem;
}
.dash-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.dash-nav-btn, .dash-nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  text-align: left;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.dash-nav-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.dash-nav-btn.is-active { color: #fff; background: rgba(255,255,255,0.12); }
.dash-side-foot { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.dash-link {
  background: none; border: 0; color: rgba(255,255,255,0.55);
  font: inherit; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  text-align: left; padding: 0;
}
.dash-link:hover { color: #fff; }
.dash-link.danger { color: #e8a0a0; }

.dash-main { flex: 1; padding: 1.75rem 2rem 3rem; max-width: 920px; }
.dash-top {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  margin-bottom: 1.4rem; gap: .75rem 1rem;
}
.dash-top .eyebrow {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dash-muted); margin: 0 0 0.35rem;
}
.dash-top h1 {
  font-family: var(--dash-serif); font-weight: 500;
  font-size: 2rem; margin: 0; letter-spacing: 0.02em;
}
.dash-user { display: flex; align-items: center; gap: 0.75rem; }
.dash-avatar {
  width: 40px; height: 40px; min-width: 40px; max-height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(10,10,10,.12);
  display: grid; place-items: center;
  overflow: hidden;
}
.dash-avatar img { width: 70%; height: 70%; object-fit: contain; }
.dash-user { flex: none; max-width: 200px; }
.dash-user strong { display: block; font-size: 0.85rem; }
.dash-user small { color: var(--dash-muted); font-size: 0.7rem; }

.dash-panel { display: none; }
.dash-panel.is-active { display: block; }

.dash-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.dash-card {
  background: #fff; border: 1px solid var(--dash-line);
  padding: 1.25rem 1.35rem;
}
.dash-card h3 {
  font-family: var(--dash-serif); font-weight: 500;
  font-size: 1.15rem; margin: 0 0 0.5rem;
}
.dash-card p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: var(--dash-muted); }
.dash-card code {
  font-size: 0.78rem; background: var(--dash-champagne);
  padding: 0.1rem 0.35rem;
}

.dash-form {
  display: flex; flex-direction: column; gap: 1rem;
  background: #fff; border: 1px solid var(--dash-line);
  padding: 1.5rem;
}
.dash-form fieldset {
  border: 1px solid var(--dash-line); margin: 0; padding: 1rem 1.1rem 1.15rem;
}
.dash-form legend {
  font-family: var(--dash-serif); font-size: 1.05rem;
  padding: 0 0.4rem; letter-spacing: 0.02em;
}
.dash-form label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dash-muted);
}
.dash-form input, .dash-form textarea {
  font: inherit; font-size: 0.9rem; letter-spacing: 0;
  text-transform: none; color: var(--dash-ink);
  border: 1px solid var(--dash-line); background: var(--dash-ivory);
  padding: 0.65rem 0.75rem; border-radius: 0;
}
.dash-form textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
.dash-form input:focus, .dash-form textarea:focus {
  outline: 1px solid var(--dash-ink); border-color: var(--dash-ink);
}
.dash-save {
  align-self: flex-start; margin-top: 0.35rem;
  appearance: none; border: 0; cursor: pointer;
  background: var(--dash-ink); color: #fff;
  font: inherit; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.85rem 1.5rem;
  transition: opacity 0.2s;
}
.dash-save:hover { opacity: 0.85; }
.dash-reset {
  appearance: none; border: 1px solid var(--dash-line); cursor: pointer;
  background: transparent; color: var(--dash-ink);
  font: inherit; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.75rem 1.25rem; margin-top: 1rem;
}
.dash-reset:hover { background: var(--dash-champagne); }

.dash-hint { font-size: 0.8rem; color: var(--dash-muted); margin-top: 1rem; }
.dash-error { color: #a33; font-size: 0.85rem; margin: 0.5rem 0 0; }

.dash-gate {
  min-height: 100vh; display: grid; place-items: center;
  padding: 2rem; background: var(--dash-ivory);
}
.dash-gate-card {
  width: min(400px, 100%); background: #fff;
  border: 1px solid var(--dash-line); padding: 2rem 1.75rem;
}
.dash-gate-card .eyebrow {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dash-muted); margin: 0 0 0.5rem;
}
.dash-gate-card h1 {
  font-family: var(--dash-serif); font-weight: 500;
  font-size: 1.85rem; margin: 0 0 0.75rem;
}
.dash-gate-card > p { color: var(--dash-muted); font-size: 0.9rem; line-height: 1.5; }
.dash-gate-card a { color: var(--dash-ink); font-size: 0.85rem; }

.dash-burger { display: none; }

.dash-form fieldset + fieldset { margin-top: 0.35rem; }
.dash-form .dash-hint { text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

/* ─── Taller / Atelier (Fase A) ─── */
:root {
  --dash-pearl: #f5f3f0;
  --dash-white: #ffffff;
  --dash-soft: #e8e4de;
}

.dash-nav-group {
  margin: 1rem 0 0.35rem;
  padding: 0 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.dash-nav-group:first-child { margin-top: 0; }

.dash-main {
  max-width: none;
  background: var(--dash-pearl);
}

.at-motto {
  font-family: var(--dash-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--dash-muted);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.at-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.at-section-title {
  font-family: var(--dash-serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0;
  margin-right: auto;
}
.at-subh {
  font-family: var(--dash-serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
}
.at-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.at-stat-cards { margin-bottom: 0.5rem; }
.at-stat .at-stat-val {
  font-family: var(--dash-serif);
  font-size: 1.75rem;
  color: var(--dash-ink);
  margin: 0.25rem 0 0.35rem;
}

.at-empty {
  background: var(--dash-white);
  border: 1px dashed var(--dash-line);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.9rem;
}

.at-table-wrap {
  overflow-x: auto;
  background: var(--dash-white);
  border: 1px solid var(--dash-line);
}
.at-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.at-table th {
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dash-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dash-line);
  background: var(--dash-pearl);
}
.at-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dash-line);
  vertical-align: middle;
}
.at-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
.at-table tbody tr:hover { background: rgba(0, 0, 0, 0.02); }
.at-table tbody tr.is-warn { background: #faf6f0; }

.at-badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--dash-line);
  background: var(--dash-pearl);
  color: var(--dash-ink);
}
.at-badge-type {
  background: var(--dash-ink);
  color: #fff;
  border-color: var(--dash-ink);
}

.at-warn-days {
  color: #8a5a2b;
  font-style: normal;
  font-weight: 600;
  font-size: 0.8rem;
}

.at-link-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--dash-ink);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.15rem 0;
}
.at-link-btn:hover { opacity: 0.7; }

.at-detail-head h2 {
  font-family: var(--dash-serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}
.at-detail-head p { margin: 0.25rem 0; font-size: 0.9rem; color: var(--dash-muted); }
.at-detail-head strong { color: var(--dash-ink); }
.at-notes { font-size: 0.85rem; color: var(--dash-muted); font-style: italic; }

.at-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.at-block { margin: 1rem 0; }
.at-block h3 {
  font-family: var(--dash-serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0;
}

.at-list { display: flex; flex-direction: column; gap: 0.5rem; }
.at-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  width: 100%;
  background: var(--dash-white);
  border: 1px solid var(--dash-line);
  padding: 1rem 1.15rem;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button.at-list-item:hover { background: #fafafa; }
.at-list-item.is-done { opacity: 0.55; }
.at-list-item strong { display: block; margin-bottom: 0.25rem; }
.at-list-item .at-badge { margin: 0.25rem 0; }

.at-meas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.at-meas-grid span {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-muted);
}
.at-meas-grid strong { font-size: 0.95rem; }

.at-pay-list, .at-appt-mini {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.85rem;
}
.at-pay-list li, .at-appt-mini li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--dash-line);
}
.at-appt-mini li.is-done { opacity: 0.5; text-decoration: line-through; }

.at-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.at-gal-item {
  margin: 0;
  background: var(--dash-pearl);
  border: 1px solid var(--dash-line);
}
.at-gal-item img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.at-gal-item figcaption {
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  color: var(--dash-muted);
}

.at-file-btn { display: inline-block; cursor: pointer; }

/* Kanban */
.at-kanban {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
}
.at-col {
  flex: 0 0 200px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--dash-soft);
  min-height: 220px;
}
.at-col-h {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--dash-soft);
  background: var(--dash-white);
  color: var(--dash-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.3;
}
.at-col-count {
  font-size: 0.65rem;
  background: var(--dash-pearl);
  border: 1px solid var(--dash-line);
  padding: 0.1rem 0.35rem;
}
.at-col-body {
  padding: 0.5rem;
  min-height: 160px;
}
.at-col-body.is-over {
  background: rgba(0, 0, 0, 0.04);
  outline: 1px dashed var(--dash-ink);
}
.at-col-empty {
  font-size: 0.75rem;
  color: var(--dash-muted);
  text-align: center;
  padding: 1.5rem 0.5rem;
  margin: 0;
}
.at-card {
  background: var(--dash-white);
  border: 1px solid var(--dash-line);
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  color: var(--dash-ink);
}
.at-card.is-dragging { opacity: 0.5; }
.at-card.is-warn { border-left: 3px solid #8a5a2b; }
.at-card strong { display: block; font-size: 0.85rem; margin-bottom: 0.3rem; }
.at-card p { margin: 0.25rem 0; font-size: 0.75rem; color: var(--dash-muted); }
.at-card-meta { font-size: 0.7rem !important; }
.at-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.at-week-label {
  font-size: 0.8rem;
  color: var(--dash-muted);
  letter-spacing: 0.04em;
}

/* Modals */
body.at-modal-open { overflow: hidden; }
.at-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.at-modal[hidden] { display: none !important; }
.at-modal-card {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--dash-white);
  border: 1px solid var(--dash-line);
  padding: 1.25rem 1.35rem 1.5rem;
}
.at-modal-wide { width: min(640px, 100%); }
.at-modal-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.at-modal-h h2 {
  font-family: var(--dash-serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0;
}
.at-modal-x {
  appearance: none;
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--dash-muted);
}
.at-form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.at-form-grid .at-span-2 { grid-column: 1 / -1; }
.at-form-grid .dash-save { justify-self: start; }

.dash-form select {
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dash-ink);
  border: 1px solid var(--dash-line);
  background: var(--dash-ivory);
  padding: 0.65rem 0.75rem;
}

.at-sig-canvas {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 120px;
  border: 1px solid var(--dash-line);
  background: var(--dash-pearl);
  touch-action: none;
  cursor: crosshair;
}

.at-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--dash-ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  pointer-events: none;
}
.at-toast.is-on {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.at-receipt, .at-meas-print {
  padding: 1rem;
}
.at-receipt h2, .at-meas-print h2 {
  font-family: var(--dash-serif);
  font-weight: 500;
  margin: 0 0 0.35rem;
}
.at-sign {
  max-width: 220px;
  border: 1px solid var(--dash-line);
  display: block;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .at-form-grid { grid-template-columns: 1fr; }
  .at-col { flex-basis: 170px; }
}

/* Print */
@media print {
  body.at-printing .dash-side,
  body.at-printing .dash-top,
  body.at-printing .dash-nav,
  body.at-printing .at-toolbar,
  body.at-printing .at-modal,
  body.at-printing .at-toast {
    display: none !important;
  }
  body.at-printing .dash-main {
    padding: 0;
    max-width: none;
    background: #fff;
  }
  body.at-printing .dash-panel { display: none !important; }
  body.at-printing .at-print-target {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    padding: 1.5rem;
    overflow: visible;
  }
  body.at-printing .at-print-target[hidden] {
    display: block !important;
  }
}


/* ── Fase B: ficha anatómica, portal, costos ── */
:root { --dash-pearl: #f5f3f0; --dash-white: #fff; --dash-soft: rgba(10,10,10,0.08); }

.at-motto, .at-motto {
  font-family: var(--dash-serif);
  font-style: italic;
  color: var(--dash-muted);
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}
.at-quick, .at-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0 1rem;
}
.at-stat-val { font-family: var(--dash-serif); font-size: 1.85rem; margin: 0.25rem 0; }
.at-section-title, .at-subh {
  font-family: var(--dash-serif); font-weight: 500; margin: 0;
}
.at-warn-days, .at-warn-days { color: #8a5a2b; font-weight: 600; font-style: normal; }
.at-margin-line { font-size: 0.82rem; color: var(--dash-muted); }
.at-checklist {
  list-style: none; margin: 0.5rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.at-checklist li {
  font-size: 0.78rem; padding: 0.35rem 0.5rem;
  background: var(--dash-pearl); border-left: 2px solid var(--dash-ink);
}
.at-bring { font-size: 0.78rem; color: var(--dash-muted); margin: 0.35rem 0; }
.at-checklist-box { margin-top: 0.75rem; }
.at-label { font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dash-muted); margin: 0 0 0.35rem; }

.at-meas-layout, .at-meas-modal-layout {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 720px) {
  .at-meas-layout, .at-meas-modal-layout { grid-template-columns: 1fr; }
}
.at-sil-panel { background: var(--dash-pearl); border: 1px solid var(--dash-line); padding: 0.5rem; }
.at-sil-svg, .at-sil-svg { width: 100%; height: auto; display: block; max-height: 420px; }
.at-hot { cursor: pointer; }
.at-hot-dot, .at-hot-dot { fill: #111; stroke: #fff; stroke-width: 1.5; transition: r 0.15s; }
.at-hot:hover .at-hot-dot, .at-hot:focus .at-hot-dot { fill: #8a5a2b; }
.at-hot-label {
  font-size: 8px; fill: #555; font-family: var(--dash-sans);
  letter-spacing: 0.02em;
}
.at-focus-pulse, .at-focus-pulse {
  outline: 2px solid #111; outline-offset: 2px;
  background: #fff8e8 !important;
}
.at-meas-hist { margin-top: 1rem; }
.at-meas-hist ul { list-style: none; margin: 0; padding: 0; font-size: 0.8rem; }
.at-meas-hist li { padding: 0.35rem 0; border-bottom: 1px solid var(--dash-line); }

.at-modal-xl { width: min(920px, 100%) !important; }
.at-mat-table { font-size: 0.8rem; margin: 0.5rem 0 0.75rem; }

.at-portal-box code {
  font-size: 0.72rem; word-break: break-all;
  background: var(--dash-pearl); padding: 0.35rem 0.5rem; display: block;
}

/* Kanban wider for boutique labels */
.at-col { flex: 0 0 210px; }
.at-col-h { font-size: 0.62rem; line-height: 1.35; min-height: 2.8rem; }

.at-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.at-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.at-table th, .at-table td {
  text-align: left; padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--dash-line);
}
.at-table th {
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dash-muted); font-weight: 600;
}
.at-table tr.is-warn { background: rgba(138, 90, 43, 0.06); }
.at-table tr[data-open-order], .at-table tr[data-open-client] { cursor: pointer; }
.at-table tr[data-open-order]:hover, .at-table tr[data-open-client]:hover { background: rgba(0,0,0,0.03); }

.at-link-btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--dash-ink); text-decoration: underline;
  padding: 0;
}
.at-empty { padding: 1.5rem; text-align: center; color: var(--dash-muted); }
.at-detail-head h2 { font-family: var(--dash-serif); font-weight: 500; margin: 0 0 0.5rem; }
.at-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0;
}
@media (max-width: 720px) { .at-grid-2 { grid-template-columns: 1fr; } }
.at-block { margin: 1rem 0; }
.at-list { display: flex; flex-direction: column; gap: 0.5rem; }
.at-list-item {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
  text-align: left; width: 100%;
  background: var(--dash-white); border: 1px solid var(--dash-line);
  padding: 0.85rem 1rem; cursor: pointer; font: inherit; color: inherit;
}
.at-list-item.is-done { opacity: 0.55; }
.at-badge {
  display: inline-block; font-size: 0.65rem; letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem; border: 1px solid var(--dash-line);
  background: var(--dash-pearl);
}
.at-badge-type { background: var(--dash-ink); color: #fff; border-color: var(--dash-ink); }

@media print {
  body.at-printing * { visibility: hidden; }
  body.at-printing .at-print-target,
  body.at-printing .at-print-target * { visibility: visible; }
  body.at-printing .at-print-target {
    position: absolute; left: 0; top: 0; width: 100%;
  }
}

/* Interactive agenda calendar */
.at-cal-toolbar { flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.at-cal-nav { display: flex; align-items: center; gap: 0.4rem; }
.at-cal-month { text-transform: capitalize; font-weight: 600; min-width: 9.5rem; text-align: center; }
.at-cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.at-cal {
  background: #fff;
  border: 1px solid var(--dash-line);
  padding: 0.75rem;
}
.at-cal-weekdays, .at-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.at-cal-weekdays span {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-muted);
  text-align: center;
  padding: 0.25rem 0 0.4rem;
}
.at-cal-cell {
  min-height: 72px;
  border: 1px solid var(--dash-line);
  background: #faf9f7;
  text-align: left;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
  color: inherit;
}
.at-cal-cell.is-pad { background: transparent; border-color: transparent; cursor: default; }
.at-cal-cell.is-today { outline: 1px solid #111; }
.at-cal-cell.is-selected { background: #111; color: #fff; }
.at-cal-cell.has-appts { border-color: #c9b79a; }
.at-cal-num { font-size: 0.78rem; font-weight: 600; }
.at-cal-dots { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.at-cal-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #8a5a2b; display: inline-block;
}
.at-cal-dot.t-prueba1 { background: #3d5a4c; }
.at-cal-dot.t-prueba2 { background: #5a4c3d; }
.at-cal-dot.t-prueba3 { background: #4c3d5a; }
.at-cal-dot.t-prueba4 { background: #3d4c5a; }
.at-cal-dot.t-entrega { background: #111; }
.at-cal-dot.is-done { opacity: 0.35; }
.at-cal-more { font-size: 0.6rem; }
.at-cal-who { font-size: 0.62rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-cal-cell.is-selected .at-cal-dot { background: #fff; }
.at-cal-day {
  background: #fff;
  border: 1px solid var(--dash-line);
  padding: 0.9rem 1rem 1.1rem;
  min-height: 280px;
}
.at-cal-day-h { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.at-cal-day-h h3 { margin: 0; font-size: 1.05rem; font-weight: 500; }
.at-cal-list .at-list-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 0.6rem; align-items: start; }
.at-cal-time { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
@media (max-width: 900px) {
  .at-cal-layout { grid-template-columns: 1fr; }
  .at-cal-cell { min-height: 54px; padding: 0.25rem; }
  .at-cal-who { display: none; }
  .at-cal-list .at-list-item { grid-template-columns: 44px 1fr; }
  .at-cal-list .at-card-actions { grid-column: 1 / -1; }
}


.login-form input {
  width: 100%;
  box-sizing: border-box;
}
.pass-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.pass-wrap input {
  width: 100% !important;
  padding-right: 44px !important;
  box-sizing: border-box;
}
.pass-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0 !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  padding: 0 !important;
  cursor: pointer;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
}
.pass-eye:hover {
  background-color: rgba(0,0,0,.05) !important;
}
.pass-wrap.is-shown .pass-eye {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cline x1='4' y1='4' x2='20' y2='20'/%3E%3C/svg%3E");
}
.pass-eye svg { display: none !important; }

.dash-lead { margin: 0.25rem 0 0; color: var(--dash-muted); font-size: 0.86rem; max-width: 36rem; }
.at-pipe {
  letter-spacing: 0.04em; font-size: 0.8rem; color: #7a6a60;
  background: #fff; border: 1px dashed #eadfd4; padding: 0.55rem 0.8rem; margin: 0 0 1rem;
}

.dash-main { max-width: 1180px; }
.dash-live { text-align: right; min-width: 180px; }
.dash-clock {
  font-family: var(--dash-serif);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.dash-next {
  font-size: 0.75rem;
  color: var(--dash-muted);
  margin-top: 0.15rem;
}
.dash-next.is-soon { color: #9a4a3a; font-weight: 600; }
.dash-panel.is-active {
  animation: dashIn 0.35s ease;
}
@keyframes dashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.at-stat .at-stat-val {
  font-family: var(--dash-serif);
  font-size: 2rem;
  margin: 0.15rem 0 0.2rem;
  letter-spacing: 0.02em;
}
.at-stat.is-live {
  border-color: #d9b3a4;
  box-shadow: 0 10px 28px rgba(80,40,20,.06);
}
.at-stat.is-live .at-stat-val { color: #7a3d32; }
.at-table tbody tr { cursor: pointer; transition: background .15s; }
.at-table tbody tr:hover { background: #f6eee6; }
.dash-nav-btn.is-active { box-shadow: inset 3px 0 0 #e8cfc0; }
@media (prefers-reduced-motion: reduce) {
  .dash-panel.is-active { animation: none; }
}

.cms-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin:1.5rem 0 .8rem; }
.cms-toolbar h3 { margin:0; font-family:var(--dash-serif); font-weight:500; }
.cms-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:1rem; }
.cms-card { background:#fff; border:1px solid var(--dash-line); padding:.85rem; display:flex; flex-direction:column; gap:.45rem; }
.cms-photo { position:relative; aspect-ratio:3/4; background:#efe9df; overflow:hidden; display:grid; place-items:center; color:#8a7a70; font-size:.8rem; }
.cms-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.cms-photo-btn { position:absolute; left:8px; right:8px; bottom:8px; background:rgba(255,255,255,.92); text-align:center; padding:.35rem; font-size:.72rem; cursor:pointer; }
.cms-card-actions { display:flex; gap:.4rem; margin-top:.2rem; }
.dash-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
@media (max-width:700px){ .dash-grid-2 { grid-template-columns:1fr; } }

.cms-upload {
  display: block;
  margin: 0.35rem 0 0.15rem;
  background: #111;
  color: #fff;
  text-align: center;
  padding: 0.5rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.cms-upload input[type=file] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
}
.cms-photo { min-height: 220px; }

/* Tablero Élégance */
.dash-panel[data-panel-view="taller-pizarra"] { max-width: none; }
.el-board { font-family: var(--dash-sans); }
.el-board-h { display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; margin-bottom:1rem; }
.el-board-h h2 { font-family: var(--dash-serif); font-weight:500; font-size:1.8rem; margin:0; }
.el-kicker { margin:0; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:#9a7b6c; }
.el-sub { margin:.2rem 0 0; color:var(--dash-muted); font-size:.85rem; }
.el-layout { display:grid; grid-template-columns: minmax(0,1fr) 270px; gap:1.2rem; align-items:start; }
.el-cols { display:flex; gap:.75rem; overflow-x:auto; padding-bottom:.6rem; }
.el-col {
  flex: 0 0 210px;
  background: #f4ece4;
  border-radius: 14px;
  padding: .55rem;
  min-height: 320px;
}
.el-col-h { display:flex; justify-content:space-between; align-items:center; font-size:.78rem; padding:.35rem .4rem .55rem; }
.el-col-h b { background:#fff; border-radius:999px; padding:.05rem .45rem; font-size:.7rem; }
.el-col-body { min-height: 180px; }
.el-card {
  background:#fff;
  border-radius:12px;
  padding:.7rem .75rem;
  margin-bottom:.55rem;
  box-shadow: 0 6px 16px rgba(70,40,20,.06);
  cursor: grab;
}
.el-card strong { display:block; font-size:.88rem; }
.el-card p { margin:.25rem 0 0; font-size:.75rem; color:#6d625b; }
.el-tag { display:inline-block; margin-top:.3rem; font-size:.65rem; letter-spacing:.04em; text-transform:uppercase; color:#8a6a5a; }
.el-when { font-size:.72rem !important; }
.el-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#c4a090; margin-right:.3rem; }
.el-add { border:0; background:transparent; color:#7a6558; cursor:pointer; font:inherit; font-size:.78rem; padding:.25rem; }
.el-composer { display:flex; flex-direction:column; gap:.35rem; margin-top:.35rem; }
.el-composer input, .el-composer textarea { width:100%; box-sizing:border-box; padding:.4rem; border:1px solid #e4d8ce; }
.el-rail { display:flex; flex-direction:column; gap:1rem; }
.el-cal { background:#fff; border-radius:14px; padding:.8rem; border:1px solid #eadfd6; }
.el-cal-h { display:flex; justify-content:space-between; align-items:center; margin-bottom:.5rem; }
.el-cal-h button { border:0; background:#f4ece4; width:28px; height:28px; border-radius:50%; cursor:pointer; }
.el-cal-wd, .el-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; text-align:center; }
.el-cal-wd { font-size:.62rem; color:#9a8b82; margin-bottom:.2rem; }
.el-day { border:0; background:transparent; padding:.35rem 0; border-radius:50%; cursor:pointer; font:inherit; font-size:.78rem; }
.el-day.is-today { background:#111; color:#fff; }
.el-day.has-fit { box-shadow: inset 0 -3px 0 #c48a78; }
.el-day.has-due { box-shadow: inset 0 -3px 0 #c4b07a; }
.el-notes-grid { display:grid; gap:.5rem; }
.el-note { border-radius:12px; padding:.7rem; background:#f8efe4; }
.el-note.k-importante { background:#f6e4dc; }
.el-note.k-idea { background:#eee8df; }
.el-note b { display:block; font-size:.78rem; margin-bottom:.2rem; }
.el-note p { margin:0; font-size:.78rem; }
.el-legend { font-size:.7rem; color:#8a7a70; }
@media (max-width: 980px) {
  .el-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-burger {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border: 1px solid var(--dash-line);
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
  }
  .dash-side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(82vw, 280px);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  body.nav-open .dash-side { transform: none; }
  body.nav-open::after {
    content: "";
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 30;
  }
  .dash-main { padding: 1rem 1rem 4rem; max-width: none; }
  .dash-top { align-items: center; }
  .dash-top h1 { font-size: 1.45rem; }
  .dash-live { text-align: left; width: 100%; order: 4; }
  .dash-clock { font-size: 1.1rem; }
  .at-stat .at-stat-val { font-size: 1.45rem; }
  .at-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
  .at-quick .dash-save, .at-quick .dash-reset { flex: 1 1 140px; }
  .at-table { display: block; overflow-x: auto; }
  .el-layout { grid-template-columns: 1fr; }
  .el-cols {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .el-col { flex: 0 0 78vw; scroll-snap-align: start; }
  .el-board-h { flex-direction: column; align-items: flex-start; }
  .cms-grid { grid-template-columns: 1fr; }
  .dash-form input, .dash-form textarea, .dash-form select,
  .el-composer input, .el-composer textarea {
    font-size: 16px; /* no zoom iOS */
  }
  .dash-nav-btn { min-height: 40px; }
}

.at-admin-stats { margin-top: 1.6rem; }
.at-stage-stats { list-style:none; padding:0; margin: .8rem 0 0; display:grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap:.4rem; }
.at-stage-stats li { display:flex; justify-content:space-between; background:#fff; border:1px solid #eadfd4; padding:.4rem .6rem; font-size:.8rem; }
.at-stock-alert { background:#f6e4dc; border:1px solid #e4c4b4; padding:.6rem .8rem; }
tr.is-low td { background:#fbf0ea; }
.at-cost-break { max-width: 520px; }
.at-cost-form { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:.8rem; align-items:end; }
.at-cost-form label { font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:#7a6a60; }
.at-cost-form input { display:block; margin-top:.2rem; width:7rem; padding:.4rem; }
.at-now {
  font-size: 1.15rem; font-weight: 600; line-height: 1.35;
  background: #111; color: #fff; padding: .85rem 1rem; margin: 0 0 1rem;
}
.el-next {
  font-size: .82rem !important; font-weight: 600; color: #1f2a6b !important;
  margin: .35rem 0 .15rem !important;
}
@media (max-width: 900px) {
  .at-now { font-size: 1rem; padding: .7rem .8rem; }
  .at-howto { font-size: .88rem; padding-left: 1.1rem; }
  .at-stat-cards { grid-template-columns: 1fr 1fr; }
  .rc-paper-top { grid-template-columns: 1fr; }
  .rc-totals { grid-template-columns: 1fr; }
  .rc-sigs { grid-template-columns: 1fr; }
  .rc-qr-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
  .dash-top {
    grid-template-columns: auto 1fr auto;
  }
  .dash-live { display: none; }
  .dash-user small { display: none; }
  .dash-main { padding: .9rem .85rem 3.5rem; }
}
@media (max-width: 520px) {
  .dash-top { grid-template-columns: auto 1fr; }
  .dash-user { grid-column: 1 / -1; }
  .at-now { font-size: .95rem; }
}

/* ——— Hoy pro (no pisar) ——— */
.at-kpi {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 0 18px !important;
}
.at-kpi-card {
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  background: #fff !important;
  border: 1px solid #e4d8cc !important;
  padding: 16px 18px !important;
  cursor: pointer;
  font: inherit !important;
  color: #1a1a1a !important;
  box-shadow: 0 1px 0 rgba(20,16,12,.04);
}
.at-kpi-card:hover { border-color: #111 !important; }
.at-kpi-card i {
  display: block !important;
  font-style: normal !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 1.85rem !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
}
.at-kpi-card span {
  display: block !important;
  margin-top: 6px !important;
  font-size: .65rem !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: #8a7a70 !important;
}
.at-kicker {
  font-size: .68rem !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  color: #8a7a70 !important;
  font-weight: 500 !important;
  margin: 1.5rem 0 .55rem !important;
}
.at-day-list { display: flex !important; flex-direction: column !important; gap: 8px !important; }
.at-day-row {
  display: grid !important;
  grid-template-columns: 5.2rem 1fr auto !important;
  gap: 12px !important;
  align-items: center !important;
  background: #fff !important;
  border: 1px solid #e4d8cc !important;
  padding: 12px 16px !important;
  cursor: pointer;
}
.at-day-row:hover { border-color: #111 !important; }
.at-day-time {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
}
.at-day-body { display: flex !important; flex-direction: column !important; gap: 2px !important; min-width: 0 !important; }
.at-day-body strong { font-size: .95rem !important; }
.at-day-body em { font-style: normal !important; font-size: .78rem !important; color: #7a6a60 !important; }
.at-day-body span { font-size: .72rem !important; color: #9a8a82 !important; }
.at-pill {
  display: inline-block !important;
  font-size: .62rem !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  border: 1px solid #111 !important;
  padding: 6px 10px !important;
  color: #111 !important;
  text-decoration: none !important;
  background: #fff !important;
}
.at-pill:hover { background: #111 !important; color: #fff !important; }
.at-now {
  font-size: 1.08rem !important;
  font-weight: 500 !important;
  background: #111 !important;
  color: #fff !important;
  padding: 14px 18px !important;
  margin: 0 0 16px !important;
}
.at-help { margin: 1.6rem 0 .5rem; color: #7a6a60; }
.at-help summary { cursor: pointer; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 800px) {
  .at-kpi { grid-template-columns: 1fr 1fr !important; }
  .at-day-row { grid-template-columns: 4rem 1fr !important; }
  .at-day-act { grid-column: 1 / -1 !important; }
}


/* Menú simple: 5 entradas + detalles */
.dash-nav-main {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 0.85rem;
  min-height: 44px;
}
.dash-more {
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.35rem;
}
.dash-more > summary {
  list-style: none;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.55rem 0.85rem;
  user-select: none;
}
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more > summary::after {
  content: " ▾";
  opacity: 0.6;
}
.dash-more[open] > summary {
  color: rgba(255,255,255,0.85);
}
.dash-more[open] > summary::after { content: " ▴"; }
.dash-more .dash-nav-btn {
  padding-left: 1.15rem;
  font-size: 0.82rem;
  opacity: 0.92;
}
