.etm-root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e5e7eb;
  color: #0f172a;
  padding: 1.5rem;
}
.etm-app {
  max-width: 1200px;
  margin: 0 auto;
  background: #f9fafb;
  border-radius: 1.75rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
}
.etm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.etm-topbar-left {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.etm-icon-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
}
.etm-topbar-sub {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6b7280;
}
.etm-topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}
.etm-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #1f2937;
}
.etm-layout {
  display: flex;
  min-height: 540px;
  gap: 1rem;
}
.etm-sidebar {
  width: 230px;
  border-right: 1px solid #e5e7eb;
  padding-right: 1rem;
  display: flex;
  flex-direction: column;
}
.etm-sidebar-title {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.5rem;
}
.etm-sidebar-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 0.9rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: #1f2937;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.etm-sidebar-btn span:first-child {
  width: 1.4rem;
  text-align: center;
}
.etm-sidebar-btn:hover {
  background: #e5e7eb;
}
.etm-sidebar-btn.etm-active {
  background: #2563eb;
  color: white;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
}
.etm-sidebar-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.7rem;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.etm-main {
  flex: 1;
}
.etm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1rem;
}
.etm-grid.login {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
}
.etm-grid.admin {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
}
.etm-grid.inspector {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.etm-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.etm-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}
.etm-card.gradient-light {
  background: linear-gradient(135deg, #eff6ff, #ffffff, #ecfdf5);
}
.etm-card.gradient-green {
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}
.etm-card.subtle {
  background: #f9fafb;
}
.etm-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.etm-eyebrow.green {
  color: #047857;
}
.etm-eyebrow.amber {
  color: #b45309;
}
.etm-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #111827;
}
.etm-card-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #111827;
}
.etm-muted {
  font-size: 0.8rem;
  color: #6b7280;
}
.etm-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.etm-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.etm-input.small {
  border-radius: 999px;
}
.etm-input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #2563eb;
}
.etm-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.etm-checkbox-label {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: #6b7280;
}
.etm-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
}
.etm-btn {
  border-radius: 999px;
  border: none;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 0.1rem;
}
.etm-btn.small {
  padding: 0.35rem 0.8rem;
}
.etm-btn-primary {
  background: #2563eb;
  color: white;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
}
.etm-btn-primary:hover {
  background: #1d4ed8;
}
.etm-btn-outline {
  background: transparent;
  color: #111827;
  border: 1px solid #d1d5db;
}
.etm-btn-outline:hover {
  background: #f3f4f6;
}
.etm-list {
  margin-top: 0.4rem;
  padding-left: 1rem;
  font-size: 0.8rem;
  color: #4b5563;
}
.etm-list li {
  margin-bottom: 0.15rem;
}
.etm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.etm-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}
.etm-kpi-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0369a1;
}
.etm-kpi-header.obra { color: #b45309; }
.etm-kpi-header.comercio { color: #15803d; }
.etm-kpi-header.industria { color: #7c3aed; }
.etm-kpi-label {
  font-size: 0.75rem;
  color: #6b7280;
}
.etm-kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}
.etm-kpi-note {
  font-size: 0.75rem;
  color: #6b7280;
}
.etm-kpi-note.green { color: #047857; }
.etm-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.etm-header-row.small {
  margin-bottom: 0.4rem;
}
.etm-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.etm-step-btn {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.etm-step-number {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.etm-step-btn.etm-step-active {
  border-color: #34d399;
  background: #ecfdf5;
  color: #166534;
}
.etm-phone {
  width: 260px;
  height: 480px;
  border-radius: 2rem;
  border: 1px solid #d1d5db;
  background: white;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.etm-phone-notch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 150px;
  height: 18px;
  background: #e5e7eb;
  border-radius: 0 0 1rem 1rem;
}
.etm-phone-header {
  padding: 1.4rem 0.8rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #6b7280;
  position: relative;
  z-index: 1;
  background: white;
}
.etm-phone-body {
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  background: #f3f4f6;
  height: calc(100% - 2.4rem);
  overflow-y: auto;
}
.etm-phone-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #111827;
}
.etm-phone-text {
  font-size: 0.72rem;
  color: #6b7280;
  margin-bottom: 0.45rem;
}
.etm-phone-text.green {
  color: #16a34a;
}
.etm-phone-text-muted {
  font-size: 0.68rem;
  color: #9ca3af;
}
.etm-phone-text-muted.center {
  text-align: center;
}
.etm-phone-btn {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  padding: 0.45rem 0.6rem;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.etm-phone-footer {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: #6b7280;
}
.etm-phone-input {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  margin-bottom: 0.35rem;
}
.etm-phone-label {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 0.1rem;
}
.etm-phone-summary {
  border-radius: 0.9rem;
  border: 1px solid #d1d5db;
  background: white;
  padding: 0.5rem 0.6rem;
  font-size: 0.7rem;
  margin-bottom: 0.4rem;
}
.etm-phone-summary.success {
  border-color: #6ee7b7;
}
.etm-phone-label-inline {
  color: #6b7280;
  margin-right: 0.2rem;
}
.etm-phone-actions {
  display: flex;
  gap: 0.35rem;
}
.etm-phone-secondary,
.etm-phone-primary {
  flex: 1;
  border-radius: 0.9rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  cursor: pointer;
}
.etm-phone-primary {
  background: #059669;
  border-color: #10b981;
  color: white;
}
.etm-phone-secondary.full {
  width: 100%;
  margin-top: 0.3rem;
}
.etm-phone-qr {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  margin: 0.25rem auto;
  color: #6b7280;
}
.etm-pill-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
}
.etm-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 130px;
}
.etm-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.7rem;
  color: #6b7280;
}
.etm-bar-fill {
  width: 100%;
  border-radius: 0.75rem 0.75rem 0 0;
  background: linear-gradient(to top, #0ea5e9, #22c55e);
}
.etm-bar-fill.h1 { height: 80%; }
.etm-bar-fill.h2 { height: 35%; }
.etm-bar-fill.h3 { height: 20%; }
.etm-bar-fill.h4 { height: 10%; }
.etm-filter-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.etm-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.etm-table-wrapper {
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: white;
}
.etm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}
.etm-table th,
.etm-table td {
  padding: 0.35rem 0.45rem;
  text-align: left;
}
.etm-table thead {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}
.etm-table tbody tr {
  border-top: 1px solid #e5e7eb;
}
.etm-table tbody tr:nth-child(even) {
  background: #f9fafb;
}
.etm-chip-btn {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: white;
  color: #111827;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  cursor: pointer;
  margin-right: 0.2rem;
}
.etm-chip-btn:hover {
  background: #f3f4f6;
}
.etm-note {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: #6b7280;
}
.etm-detail-card {
  margin-top: 0.5rem;
  background: #f9fafb;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  padding: 0.6rem 0.7rem;
  font-size: 0.72rem;
  color: #111827;
}
.etm-detail-card p {
  margin: 0.08rem 0;
}
.etm-detail-card span {
  color: #6b7280;
}

/* disclaimers */
.etm-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .etm-layout {
    flex-direction: column;
  }
  .etm-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .etm-grid,
  .etm-grid.login,
  .etm-grid.admin,
  .etm-grid.inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .etm-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .etm-root {
    padding: 0.75rem;
  }
  .etm-app {
    padding: 1rem;
    border-radius: 1.25rem;
  }
}
