:root {
  --teal: #49b39c;
  --teal-deep: #1f6e5d;
  --navy: #1a2c30;
  --ink: #203235;
  --cream: #fffcd5;
  --paper: #f5f1e7;
  --white: #fffef9;
  --coral: #ec765d;
  --muted: #758487;
  --line: rgba(26, 44, 48, .12);
  --shadow: 0 22px 60px rgba(26, 44, 48, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.is-hidden { display: none !important; }

.login-scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  min-height: 100vh;
  overflow: hidden;
  background: var(--navy);
}

.login-scene::after {
  content: '';
  position: absolute;
  inset: 0 43% 0 0;
  opacity: .15;
  background-image: url('../assets/network-pattern.png');
  pointer-events: none;
}

.login-atmosphere { position: absolute; inset: 0 42% 0 0; overflow: hidden; }
.orbit { position: absolute; border: 1px solid rgba(73,179,156,.28); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; left: -100px; top: -160px; }
.orbit-two { width: 650px; height: 650px; right: -320px; bottom: -310px; }
.paw { position: absolute; color: var(--teal); opacity: .28; font-size: 24px; box-shadow: 20px 0 0 -7px var(--teal), 9px -18px 0 -8px var(--teal); transform: rotate(22deg); }
.paw-one { top: 15%; right: 16%; }
.paw-two { bottom: 14%; left: 18%; transform: rotate(-34deg) scale(.65); }

.login-story {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 720px;
  padding: 8vw;
  color: white;
  animation: rise .8s cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow { margin: 0 0 7px; color: var(--teal-deep); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: #8ce3cd; }
.login-story h1 { margin: 0; font-family: 'Fredoka', sans-serif; font-size: clamp(52px, 6vw, 92px); font-weight: 600; letter-spacing: -.045em; line-height: .92; }
.login-story h1 span { color: var(--teal); }
.story-copy { max-width: 590px; margin: 30px 0 40px; color: rgba(255,255,255,.64); font-size: 16px; line-height: 1.75; }
.story-status, .sync-status { display: flex; align-items: center; gap: 13px; }
.story-status { width: max-content; padding: 12px 18px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.05); backdrop-filter: blur(12px); }
.story-status div, .sync-status div, .admin-chip div { display: grid; }
.story-status strong { font-size: 12px; }
.story-status small { margin-top: 2px; color: rgba(255,255,255,.46); font-size: 10px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #80e7c6; box-shadow: 0 0 0 0 rgba(128,231,198,.45); animation: pulse 2s infinite; }

.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(42px, 8vw, 110px);
  background: var(--cream);
  box-shadow: -30px 0 80px rgba(0,0,0,.13);
  animation: slideIn .8s .12s cubic-bezier(.2,.8,.2,1) both;
}

.login-panel::before { content: ''; position: absolute; top: 0; left: -38px; width: 76px; height: 100%; background: var(--cream); clip-path: polygon(50% 0,100% 0,65% 16%,100% 32%,62% 50%,100% 68%,65% 84%,100% 100%,50% 100%,0 83%,35% 66%,0 50%,36% 33%,0 16%); }
.login-logo { width: 168px; height: auto; margin-bottom: clamp(42px, 9vh, 90px); }
.tiny-label { color: var(--teal-deep); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-heading h2 { margin: 8px 0 4px; font-family: 'Fredoka', sans-serif; font-size: 38px; font-weight: 600; letter-spacing: -.03em; }
.login-heading p { margin: 0 0 34px; color: #667678; font-size: 13px; }
.login-panel form { display: grid; gap: 9px; }
.login-panel label { margin-top: 9px; color: #47585b; font-size: 11px; font-weight: 600; }
.input-wrap { display: grid; grid-template-columns: 42px 1fr; align-items: center; border-bottom: 1.5px solid rgba(26,44,48,.25); transition: border .2s, background .2s; }
.input-wrap:focus-within { border-bottom-color: var(--teal-deep); background: rgba(73,179,156,.055); }
.input-wrap span { color: var(--teal-deep); text-align: center; font-weight: 600; }
.input-wrap input { width: 100%; padding: 14px 10px 13px 0; border: 0; outline: 0; background: transparent; color: var(--navy); font-size: 14px; }
.form-error { min-height: 18px; margin: 5px 0 -1px; color: #b43c2d; font-size: 11px; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 3px; padding: 16px 18px; border: 0; background: var(--navy); color: white; font-weight: 600; cursor: pointer; transition: transform .2s, background .2s; }
.primary-button:hover { transform: translateY(-2px); background: var(--teal-deep); }
.primary-button:disabled { cursor: wait; opacity: .66; transform: none; }
.primary-button span { font-size: 21px; }
.demo-note { margin: 22px 0 0; color: #69787a; font-size: 10px; }
.demo-note span { margin-right: 6px; padding: 3px 7px; background: var(--teal); color: var(--navy); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.dashboard-shell { display: grid; grid-template-columns: 88px minmax(0,1fr); min-width: 0; min-height: 100vh; }
.side-rail { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 88px; flex-direction: column; align-items: center; padding: 27px 10px 20px; background: var(--navy); color: white; }
.rail-mark { width: 48px; height: 48px; object-fit: contain; margin-bottom: 54px; }
.side-rail nav { display: grid; width: 100%; gap: 16px; }
.rail-link { position: relative; display: grid; justify-items: center; gap: 5px; padding: 11px 2px; color: rgba(255,255,255,.42); text-decoration: none; transition: color .2s; }
.rail-link::before { content: ''; position: absolute; left: -10px; top: 11px; width: 3px; height: 28px; background: transparent; }
.rail-link svg { width: 21px; fill: currentColor; }
.rail-link span { font-size: 8px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.rail-link:hover, .rail-link.active { color: #8ce3cd; }
.rail-link.active::before { background: var(--teal); }
.rail-foot { display: grid; justify-items: center; gap: 18px; margin-top: auto; }
.environment { padding: 4px 6px; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.5); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.logout-button, .icon-button { border: 0; cursor: pointer; }
.logout-button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); color: white; }

.dashboard-main { grid-column: 2; width: 100%; min-width: 0; max-width: 1640px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 72px) 64px; background-image: radial-gradient(rgba(26,44,48,.045) 1px, transparent 1px); background-size: 18px 18px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.topbar h1 { margin: 0; color: var(--navy); font-family: 'Fredoka', sans-serif; font-size: clamp(30px, 3.5vw, 50px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.topbar h1 span { color: var(--teal-deep); }
.version-chip { display: inline-block; margin-left: 7px; padding: 2px 6px; border: 1px solid rgba(31,110,93,.24); color: var(--teal-deep) !important; font-size: 8px; letter-spacing: .08em; vertical-align: middle; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.sync-status { padding-right: 22px; border-right: 1px solid var(--line); }
.sync-status strong, .admin-chip strong { font-size: 11px; }
.sync-status small, .admin-chip small { color: var(--muted); font-size: 9px; }
.admin-chip { display: flex; align-items: center; gap: 11px; }
.admin-chip > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 46% 54% / 58% 42% 58% 42%; background: var(--teal); color: var(--navy); font-family: 'Fredoka'; font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: 1.05fr repeat(3, 1fr); gap: 13px; margin-bottom: 13px; }
.metric-card { position: relative; min-height: 155px; padding: 22px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,254,249,.9); box-shadow: 0 8px 24px rgba(26,44,48,.045); }
.metric-card::after { content: ''; position: absolute; right: -30px; bottom: -38px; width: 95px; height: 95px; border: 1px solid rgba(73,179,156,.15); border-radius: 50%; }
.metric-lead { background: var(--teal); border-color: var(--teal); }
.metric-lead::after { width: 130px; height: 130px; right: -25px; bottom: -64px; border-color: rgba(26,44,48,.16); }
.metric-icon { float: right; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(73,179,156,.1); color: var(--teal-deep); font-family: 'Fredoka'; font-weight: 700; }
.metric-lead .metric-icon { background: rgba(255,255,255,.28); color: var(--navy); }
.metric-card p { margin: 3px 0 17px; color: #607174; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.metric-lead p, .metric-lead small { color: rgba(26,44,48,.7); }
.metric-card > strong { display: block; color: var(--navy); font-family: 'Fredoka'; font-size: 35px; font-weight: 600; line-height: 1; }
.metric-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.metric-card small span { color: var(--teal-deep); font-weight: 700; }
.revenue-card > strong { font-size: 27px; }

.insights-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 13px; margin-bottom: 13px; }
.weekly-panel, .radar-panel { min-height: 218px; }
.weekly-total { display: flex; align-items: baseline; gap: 5px; color: var(--muted); }
.weekly-total strong { color: var(--navy); font-family: 'Fredoka'; font-size: 24px; }
.weekly-total span { font-size: 8px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.weekly-chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 12px; height: 132px; padding: 5px 24px 20px; }
.week-column { display: grid; gap: 7px; justify-items: center; height: 100%; }
.bar-track { position: relative; display: flex; align-items: end; justify-content: center; width: 100%; height: 100%; background: linear-gradient(to top, rgba(26,44,48,.04), transparent); border-bottom: 1px solid rgba(26,44,48,.1); }
.bar-track > span { position: relative; display: block; width: min(34px, 68%); min-height: 5px; background: var(--teal); transition: height .55s cubic-bezier(.2,.8,.2,1); }
.bar-track > span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent); }
.bar-track > em { position: absolute; bottom: calc(var(--bar-height, 10%) + 5px); color: var(--navy); font-size: 8px; font-style: normal; font-weight: 700; }
.week-column.today .bar-track > span { background: var(--navy); }
.week-column small { color: var(--muted); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.radar-panel { position: relative; overflow: hidden; background: var(--navy); color: white; }
.radar-panel .panel-heading h2 { color: white; }
.radar-panel .eyebrow { color: #83ddc5; }
.radar-panel::after { content: ''; position: absolute; right: -70px; top: -78px; width: 190px; height: 190px; border: 1px solid rgba(73,179,156,.16); border-radius: 50%; box-shadow: 0 0 0 34px rgba(73,179,156,.025), 0 0 0 68px rgba(73,179,156,.018); }
.radar-sweep { position: relative; z-index: 2; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(73,179,156,.12); }
.alert-list { position: relative; z-index: 2; display: grid; padding: 0 22px 18px; }
.alert-item { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.09); color: white; }
.alert-signal { width: 7px; height: 7px; border-radius: 50%; background: #8ce3cd; }
.alert-item.urgent .alert-signal { background: var(--coral); box-shadow: 0 0 0 4px rgba(236,118,93,.1); }
.alert-item.review .alert-signal { background: #f1c75b; }
.alert-item strong { display: block; font-size: 9px; }
.alert-item p { margin: 2px 0 0; color: rgba(255,255,255,.46); font-size: 7.5px; }
.alert-jump { border: 0; background: none; color: #8ce3cd; font-size: 14px; cursor: pointer; }

.operations-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 13px; margin-bottom: 13px; }
.panel { border: 1px solid var(--line); background: rgba(255,254,249,.94); box-shadow: 0 10px 30px rgba(26,44,48,.045); }
.panel.radar-panel { background: var(--navy); }
.map-panel { display: flex; flex-direction: column; }
.map-panel .city-map { flex: 1; min-height: 420px; height: auto; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px 17px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-family: 'Fredoka'; font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.map-legend { color: var(--muted); font-size: 9px; }
.map-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(73,179,156,.16); }
.city-map { position: relative; height: 330px; overflow: hidden; background: #b9c6b6; }
.city-map::after { content: 'CALI · ZONA URBANA'; position: absolute; z-index: 3; top: 12px; right: 12px; padding: 7px 11px; background: rgba(255,252,213,.94); color: var(--navy); font-size: 8px; font-weight: 700; letter-spacing: .12em; box-shadow: 0 4px 14px rgba(26,44,48,.14); }
.interactive-map { position: absolute; inset: 0; z-index: 1; }
.interactive-map .leaflet-tile-pane { filter: saturate(.52) contrast(.92) sepia(.08); }
.interactive-map .leaflet-control-zoom { margin: 12px 0 0 12px; border: 0; box-shadow: 0 5px 18px rgba(26,44,48,.18); }
.interactive-map .leaflet-control-zoom a { border: 0; color: var(--navy); font-family: 'Fredoka'; }
.interactive-map .leaflet-control-attribution { background: rgba(255,255,255,.75); color: #637274; font-size: 7px; }
.interactive-map .leaflet-control-attribution a { color: var(--teal-deep); }
.map-unavailable { display: grid; place-items: center; width: 100%; height: 100%; padding: 30px; background: url('../assets/mapa-cali.jpg') center/cover; color: var(--navy); font-size: 10px; font-weight: 700; text-align: center; }
.gps-signal-label { position: absolute; z-index: 500; top: 12px; left: 54px; display: flex; align-items: center; gap: 6px; padding: 8px 11px; background: rgba(26,44,48,.88); color: white; font-size: 11px; font-weight: 800; letter-spacing: .06em; box-shadow: 0 4px 14px rgba(26,44,48,.2); }
.gps-signal-label i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6a7; box-shadow: 0 0 0 4px rgba(154,166,167,.15); }
.gps-signal-label.is-live i { background: var(--teal); box-shadow: 0 0 0 4px rgba(73,179,156,.19); }
.gps-signal-label.is-stale i { background: var(--coral); box-shadow: 0 0 0 4px rgba(236,118,93,.17); }
.gps-marker { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 3px solid white; border-radius: 50%; background: var(--teal); color: var(--navy); font-family: 'Fredoka'; font-size: 8px; font-weight: 700; box-shadow: 0 6px 17px rgba(26,44,48,.34); }
.gps-marker::after { content: ''; position: absolute; width: 46px; height: 46px; border: 1px solid rgba(31,110,93,.55); border-radius: 50%; animation: ripple 2.5s infinite; }
.gps-marker.on_walk { background: var(--coral); color: white; }
.gps-marker.offline { background: #9aa5a4; color: white; opacity: .75; }
.gps-marker.pending { background: var(--cream); }
.gps-dog-marker { display: grid; place-items: center; width: 29px; height: 29px; border: 3px solid white; border-radius: 50%; background: var(--navy); color: var(--cream); font-family: 'Fredoka'; font-size: 7px; font-weight: 700; box-shadow: 0 5px 16px rgba(26,44,48,.35); }
.gps-dog-marker::after { content: ''; position: absolute; width: 40px; height: 40px; border: 2px solid rgba(236,118,93,.45); border-radius: 50%; animation: ripple 1.8s infinite; }
.gps-dog-marker.live { background: var(--teal-deep); }
.gps-dog-marker.stale { background: #788586; }
.gps-dog-marker.stale::after { animation: none; border-style: dashed; }
.leaflet-popup-content-wrapper { border-radius: 0; color: var(--navy); font-family: 'Poppins'; font-size: 9px; box-shadow: 0 10px 30px rgba(26,44,48,.18); }
.leaflet-popup-content strong { font-family: 'Fredoka'; font-size: 13px; }
.leaflet-popup-content small { color: var(--teal-deep); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.city-map > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.45) contrast(.88) sepia(.12); transform: scale(1.03); }
.map-fade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26,44,48,.74), transparent 48%), linear-gradient(0deg, rgba(26,44,48,.16), transparent 50%); pointer-events: none; }
.route-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.route-line path { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 8; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); animation: dash 18s linear infinite; }
.map-callout { position: absolute; z-index: 500; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; padding: 14px 17px; background: rgba(26,44,48,.9); color: white; backdrop-filter: blur(8px); pointer-events: none; }
.dog-orb { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--cream); color: var(--navy); font-family: 'Fredoka'; font-weight: 700; }
.map-callout div { display: grid; }
.map-callout small { color: #8ce3cd; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.map-callout strong { margin: 2px 0; font-size: 11px; }
.map-callout em { color: rgba(255,255,255,.56); font-size: 8px; font-style: normal; }
.map-marker { position: absolute; z-index: 3; display: grid; place-items: center; width: 29px; height: 29px; border: 3px solid white; border-radius: 50%; background: var(--teal); color: var(--navy); font-family: 'Fredoka'; font-size: 8px; font-weight: 700; box-shadow: 0 5px 14px rgba(26,44,48,.3); }
.map-marker::after { content: ''; position: absolute; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; animation: ripple 2.5s infinite; }
.map-marker.pending { background: var(--cream); }
.map-marker.offline { background: #95a5a3; opacity: .7; }

.activity-panel { min-height: 420px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--teal-deep); font-size: 17px; transition: transform .25s; }
.icon-button:hover { transform: rotate(80deg); }
.activity-list { display: grid; padding: 0 22px 20px; }
.activity-item { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: start; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.activity-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(73,179,156,.11); color: var(--teal-deep); font-size: 11px; }
.activity-item strong { display: block; color: var(--navy); font-size: 10px; }
.activity-item p { margin: 3px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.activity-time { color: #9aa6a8; font-size: 8px; }
.loading-line { color: var(--muted); font-size: 11px; }

.walks-panel { margin-bottom: 13px; scroll-margin-top: 20px; }
.table-heading { border-bottom: 1px solid var(--line); }
.table-summary { color: var(--muted); font-size: 9px; }
.table-summary span { color: var(--coral); font-family: 'Fredoka'; font-size: 19px; font-weight: 600; }
.walk-toolbar { display: grid; grid-template-columns: minmax(230px, 1fr) auto auto; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid rgba(26,44,48,.07); background: rgba(73,179,156,.035); }
.search-field { display: grid; grid-template-columns: 28px 1fr; align-items: center; max-width: 390px; border-bottom: 1px solid rgba(26,44,48,.2); color: var(--teal-deep); }
.search-field input { min-width: 0; padding: 9px 5px; border: 0; outline: 0; background: transparent; color: var(--navy); font-size: 9px; }
.search-field input::placeholder { color: #94a0a2; }
.filter-group { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-button { padding: 6px 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .04em; cursor: pointer; text-transform: uppercase; }
.filter-button:hover, .filter-button.active { border-color: var(--navy); background: var(--navy); color: white; }
.result-count { color: var(--muted); font-size: 8px; white-space: nowrap; }
.walk-row { display: grid; grid-template-columns: 1.45fr .48fr .9fr .48fr .72fr .58fr .38fr; align-items: center; min-width: 930px; padding: 13px 22px; border-bottom: 1px solid rgba(26,44,48,.07); color: #536366; font-size: 9px; transition: background .18s; }
.walk-row:not(.walk-head):hover { background: rgba(73,179,156,.055); }
.walk-row:last-child { border-bottom: 0; }
.walk-head { color: #8b9799; font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.walk-pet { display: flex; align-items: center; gap: 10px; }
.pet-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 48% 52% 39% 61%; background: var(--cream); color: var(--navy); font-family: 'Fredoka'; font-weight: 700; }
.walk-pet div { display: grid; }
.walk-pet strong { color: var(--navy); font-size: 10px; }
.walk-pet small { color: #8b9799; font-size: 8px; }
.status-badge { width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 7.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-in_progress { background: rgba(73,179,156,.17); color: var(--teal-deep); }
.status-assigned { background: rgba(255,207,95,.24); color: #8b690f; }
.status-requested { background: rgba(236,118,93,.14); color: #b14835; }
.status-completed { background: rgba(26,44,48,.08); color: #627174; }
.status-cancelled { background: #eee; color: #888; }
.manage-walk { padding: 6px 8px; border: 1px solid rgba(31,110,93,.22); background: transparent; color: var(--teal-deep); font-size: 7px; font-weight: 700; cursor: pointer; }
.manage-walk:hover { background: var(--teal-deep); color: white; }
.walk-table { overflow-x: auto; }

.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 13px; scroll-margin-top: 20px; }
.walker-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 20px; padding: 0 22px 20px; }
.walker-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.walker-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50% 50% 42% 58%; background: var(--navy); color: white; font-family: 'Fredoka'; font-size: 10px; font-weight: 600; }
.walker-row strong { display: block; color: var(--navy); font-size: 10px; }
.walker-row small { color: var(--muted); font-size: 8px; }
.walker-meta { display: grid; justify-items: end; gap: 4px; }
.walker-state { color: var(--teal-deep); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.walker-state.offline { color: #8a9799; }
.walker-state.pending { color: var(--coral); }
.walker-state.draft { color: #9b771d; }
.walker-state.rejected { color: #b14835; }
.review-button { padding: 7px 10px; border: 1px solid rgba(31,110,93,.25); background: transparent; color: var(--teal-deep); font-size: 9px; font-weight: 700; cursor: pointer; }
.review-button:hover { background: var(--teal-deep); color: white; }
.pending-pill { color: var(--muted); font-size: 8px; }
.pending-pill strong { color: var(--coral); font-size: 14px; }
.field-note { position: relative; min-height: 280px; padding: 32px; overflow: hidden; background: var(--teal-deep); color: white; box-shadow: var(--shadow); }
.field-note::after { content: ''; position: absolute; width: 190px; height: 190px; right: -80px; bottom: -90px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.03); }
.field-note h2 { max-width: 320px; margin: 12px 0; font-family: 'Fredoka'; font-size: 31px; font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
.field-note > p:not(.eyebrow) { max-width: 370px; color: rgba(255,255,255,.65); font-size: 10px; line-height: 1.7; }
.field-note a { position: absolute; z-index: 2; left: 32px; bottom: 28px; color: var(--cream); font-size: 9px; font-weight: 600; text-decoration: none; }
.field-note a span { margin-left: 5px; }
.stamp { position: absolute; right: 27px; top: 27px; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid rgba(255,252,213,.55); border-radius: 50%; color: var(--cream); font-family: 'Fredoka'; font-size: 16px; font-weight: 700; line-height: .8; transform: rotate(9deg); }
.stamp span { font-size: 7px; letter-spacing: .12em; }

.drawer-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(12,25,28,.53); backdrop-filter: blur(3px); }
.drawer-backdrop[hidden], .walk-drawer[hidden] { display: none; }
.walk-drawer { position: fixed; z-index: 71; inset: 0 0 0 auto; width: min(520px, 100%); overflow-y: auto; background: var(--paper); box-shadow: -24px 0 70px rgba(0,0,0,.22); animation: drawerIn .28s cubic-bezier(.2,.8,.2,1) both; }
.drawer-header { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 25px 27px; background: var(--navy); color: white; }
.drawer-header h2 { margin: 3px 0 0; font-family: 'Fredoka'; font-size: 27px; font-weight: 600; }
.drawer-header h2 > small { display: block; margin: 4px 0 0 58px; color: rgba(255,255,255,.7); font: 500 10px 'Poppins'; }
.dashboard-chat-identity { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.dashboard-chat-mark { width: 22px; height: 22px; flex: 0 0 auto; object-fit: contain; }
.dashboard-chat-avatar { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; overflow: hidden; }
.drawer-header .dashboard-chat-avatar { width: 38px; height: 38px; border: 2px solid rgba(255,255,255,.65); }
.dashboard-operator-images { display: inline-flex !important; align-items: center; gap: 5px; width: auto !important; padding: 0 3px; background: transparent !important; }
.assistant-message .dashboard-chat-identity { font-weight: 800; }
.assistant-message .dashboard-chat-mark { width: 18px; height: 18px; }
.assistant-message .dashboard-chat-avatar { width: 26px; height: 26px; }
.drawer-close { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: transparent; color: white; font-size: 21px; cursor: pointer; }
.drawer-body { padding: 24px 27px 40px; }
.drawer-loading { color: var(--muted); font-size: 10px; }
.drawer-status-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 15px 16px; border-left: 4px solid var(--teal); background: var(--white); }
.drawer-status-line small { display: block; color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.drawer-status-line strong { font-family: 'Fredoka'; font-size: 18px; }
.drawer-section { margin-top: 13px; padding: 18px; border: 1px solid var(--line); background: rgba(255,254,249,.9); }
.drawer-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.drawer-section-title h3 { margin: 0; font-family: 'Fredoka'; font-size: 17px; font-weight: 600; }
.drawer-section-title span { color: var(--muted); font-size: 8px; }
.walker-profile-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.walker-profile-heading img, .walker-profile-placeholder { display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50% 50% 43% 57%; background: var(--navy); color: white; object-fit: cover; font-family: 'Fredoka'; font-size: 20px; font-weight: 600; }
.walker-profile-heading div { display: grid; gap: 4px; }
.walker-profile-heading strong { color: var(--navy); font-family: 'Fredoka'; font-size: 21px; }
.walker-profile-heading small { color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 15px; }
.detail-item { display: grid; gap: 2px; }
.detail-item small { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-item strong { color: var(--navy); font-size: 9px; }
.detail-item.detail-wide { grid-column: 1 / -1; }
.detail-note { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #5e6e71; font-size: 8.5px; line-height: 1.6; }
.rejection-note { margin: 15px 0 0; padding: 12px 14px; border-left: 4px solid var(--coral); background: rgba(236,118,93,.09); color: #77372b; font-size: 12px; line-height: 1.55; }
.document-list { display: grid; gap: 8px; }
.document-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); background: var(--paper); color: var(--navy); text-decoration: none; }
.document-row > span { display: grid; place-items: center; width: 42px; height: 42px; background: var(--navy); color: var(--cream); font-size: 10px; font-weight: 800; }
.document-row div { min-width: 0; }
.document-row strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-row small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.document-row b { color: var(--teal-deep); font-size: 10px; }
.review-decision textarea { width: 100%; margin-bottom: 12px; padding: 13px; resize: vertical; border: 1px solid var(--line); outline: none; background: var(--paper); color: var(--navy); font: 12px/1.5 'Poppins', sans-serif; }
.review-decision textarea:focus { border-color: var(--teal-deep); }
.assignment-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.assignment-box select { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); outline: 0; background: var(--paper); color: var(--navy); font-size: 9px; }
.drawer-action { padding: 11px 14px; border: 0; background: var(--teal-deep); color: white; font-size: 8px; font-weight: 700; cursor: pointer; }
.drawer-action.secondary { border: 1px solid var(--line); background: transparent; color: var(--navy); }
.drawer-action.danger { background: var(--coral); }
.drawer-action:disabled { opacity: .5; cursor: wait; }
.status-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.timeline-list { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.timeline-item i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--teal); }
.timeline-item strong { display: block; font-size: 8px; }
.timeline-item p { margin: 2px 0 0; color: var(--muted); font-size: 7.5px; }
.timeline-item time { color: var(--muted); font-size: 7px; }
.empty-timeline { color: var(--muted); font-size: 8px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 340px; padding: 13px 18px; background: var(--navy); color: white; font-size: 10px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s; }
.toast.show { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(42px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(128,231,198,0); } 100% { box-shadow: 0 0 0 0 rgba(128,231,198,0); } }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: -120; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .operations-grid, .bottom-grid, .insights-grid { grid-template-columns: 1fr; }
  .activity-panel { min-height: auto; }
}

@media (max-width: 760px) {
  .login-scene { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 48px 28px; }
  .login-panel::before { display: none; }
  .dashboard-shell { grid-template-columns: 1fr; padding-bottom: 68px; }
  .side-rail { inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; padding: 7px 16px; }
  .rail-mark, .environment { display: none; }
  .side-rail nav { display: flex; justify-content: space-around; }
  .rail-link { min-width: 70px; padding: 5px 2px; }
  .rail-link::before { inset: auto 14px -7px; width: auto; height: 3px; }
  .rail-foot { margin: 0 0 0 auto; }
  .dashboard-main { grid-column: 1; padding: 25px 16px 45px; }
  .topbar { align-items: center; }
  .topbar-actions .sync-status { display: none; }
  .admin-chip div { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .metric-card { min-height: 130px; padding: 16px; }
  .metric-card > strong { font-size: 29px; }
  .revenue-card > strong { font-size: 19px; }
  .city-map { height: 290px; }
  .map-panel .city-map { flex: none; min-height: 290px; height: 290px; }
  .walker-list { grid-template-columns: 1fr; }
  .walk-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .filter-group { overflow-x: auto; flex-wrap: nowrap; }
  .filter-button { white-space: nowrap; }
  .result-count { display: none; }
  .weekly-chart { gap: 6px; padding-inline: 14px; }
  .drawer-body { padding-inline: 17px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.detail-wide { grid-column: auto; }
  .document-row { grid-template-columns: 38px 1fr; }
  .document-row > span { width: 38px; height: 38px; }
  .document-row b { grid-column: 2; }
}

.nova-section { margin-top: 70px; scroll-margin-top: 28px; }
.nova-heading { align-items: flex-end; }
.nova-heading > div > p:last-child { max-width: 740px; color: var(--muted); }
.nova-state { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(24,44,49,.12); background: var(--white); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.nova-state i, .nova-integrations i { width: 8px; height: 8px; border-radius: 50%; background: #c98663; box-shadow: 0 0 0 4px rgba(201,134,99,.13); }
.nova-state.ready i, .nova-integrations .ready i { background: var(--teal); box-shadow: 0 0 0 4px rgba(73,179,156,.14); }
.nova-grid { display: grid; grid-template-columns: minmax(270px,.72fr) repeat(2,minmax(320px,1fr)); gap: 15px; margin-top: 24px; }
.nova-console { position: relative; overflow: hidden; min-height: 420px; padding: 34px; background: var(--navy); color: var(--white); }
.nova-console::after { content: ''; position: absolute; width: 340px; height: 340px; right: -145px; top: -150px; border: 1px solid rgba(73,179,156,.24); border-radius: 50%; }
.nova-avatar { position: relative; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(73,179,156,.34); background: rgba(73,179,156,.1); }
.nova-avatar span { font-family: Fredoka,sans-serif; font-size: 42px; font-weight: 700; color: var(--cream); }
.nova-avatar i { position: absolute; right: 4px; bottom: 9px; width: 16px; height: 16px; border: 3px solid var(--navy); border-radius: 50%; background: var(--teal); }
.nova-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 38px; }
.nova-metrics div { padding: 16px 12px; border: 1px solid rgba(255,255,255,.1); }
.nova-metrics small { display: block; min-height: 30px; color: rgba(255,255,255,.55); font-size: 9px; font-weight: 700; letter-spacing: .55px; }
.nova-metrics strong { display: block; margin-top: 8px; color: var(--cream); font-family: Fredoka,sans-serif; font-size: 29px; }
.nova-integrations { display: grid; gap: 10px; margin-top: 28px; }
.nova-integrations span { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.72); font-size: 12px; }
.nova-settings, .niko-settings { padding: 27px; }
.nova-settings form, .niko-settings form { display: grid; gap: 16px; margin-top: 22px; }
.nova-settings label, .niko-settings label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.nova-settings input:not([type="checkbox"]), .nova-settings textarea, .nova-settings select, .niko-settings input:not([type="checkbox"]), .niko-settings textarea, .niko-settings select { width: 100%; border: 1px solid rgba(24,44,49,.14); background: #fbfcf8; padding: 13px 14px; color: var(--navy); font: 500 14px/1.5 Poppins,sans-serif; resize: vertical; }
.provider-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.nova-toggle { grid-template-columns: auto 1fr !important; align-items: start; padding: 13px; background: var(--paper); }
.nova-toggle input { width: 18px; height: 18px; accent-color: var(--teal-deep); }
.nova-toggle span { display: grid; gap: 2px; }
.nova-toggle strong { color: var(--navy); }
.nova-toggle small { color: var(--muted); font-weight: 500; }
.niko-settings { position: relative; border-top: 5px solid var(--coral); }
.niko-safety-chip { padding: 5px 7px; background: #fff0eb; color: #9b4335; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.niko-guardrails { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.niko-guardrails span { padding: 6px 8px; border: 1px solid rgba(236,118,93,.25); color: #805249; font-size: 9px; font-weight: 700; }
.channel-bridge { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); gap: 13px; margin-top: 13px; }
.whatsapp-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; min-height: 150px; padding: 24px; overflow: hidden; background: var(--navy); color: white; }
.whatsapp-mark { display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid rgba(140,227,205,.38); border-radius: 50%; background: rgba(73,179,156,.12); color: var(--teal); font-family: Fredoka,sans-serif; font-size: 21px; font-weight: 700; }
.whatsapp-card h3 { margin: 2px 0 4px; color: var(--cream); font: 600 24px Fredoka,sans-serif; }
.whatsapp-card p { margin: 0; color: rgba(255,255,255,.64); font-size: 12px; }
.whatsapp-card small { color: var(--teal); font-size: 10px; }
.whatsapp-actions { display: grid; justify-items: end; gap: 12px; }
.whatsapp-card .channel-state { color: rgba(255,255,255,.72); }
.whatsapp-lines-card { min-height: 180px; padding: 24px; background: var(--navy); color: white; }
.whatsapp-lines-heading { align-items: center; margin-bottom: 16px; }
.whatsapp-lines-heading h2 { color: var(--cream); }
.whatsapp-lines-heading > div > p:last-child { margin: 5px 0 0; color: rgba(255,255,255,.62); font-size: 12px; }
.whatsapp-instance-list { display: grid; gap: 8px; }
.whatsapp-instance-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045); }
.whatsapp-instance-row.ready { border-color: rgba(73,179,156,.5); background: rgba(73,179,156,.08); }
.whatsapp-region { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: var(--cream); color: var(--navy); font: 700 11px Fredoka,sans-serif; letter-spacing: .06em; }
.whatsapp-instance-row > div:nth-child(2) { display: grid; gap: 2px; }
.whatsapp-instance-row strong { color: white; font: 600 17px Fredoka,sans-serif; }
.whatsapp-instance-row small { color: var(--teal); font-size: 10px; }
.whatsapp-instance-row p { margin: 3px 0 0; color: rgba(255,255,255,.57); font-size: 11px; }
.whatsapp-instance-form { display: grid; gap: 14px; margin-top: 16px; padding: 17px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(135deg,rgba(255,255,255,.07),rgba(73,179,156,.06)); }
.whatsapp-editor-heading,.whatsapp-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.whatsapp-editor-heading > div { display: grid; gap: 2px; }.whatsapp-editor-heading small { color: var(--teal); font-size: 8px; font-weight: 800; letter-spacing: .16em; }.whatsapp-editor-heading strong { color: var(--cream); font: 600 18px Fredoka,sans-serif; }
.whatsapp-editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.whatsapp-editor-grid label { display: grid; gap: 6px; color: rgba(255,255,255,.63); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }.whatsapp-editor-grid label small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.whatsapp-editor-grid input:not([type='checkbox']) { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.16); outline: none; background: rgba(255,255,255,.08); color: white; font: 500 11px Poppins,sans-serif; }.whatsapp-editor-grid input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(73,179,156,.12); }.whatsapp-editor-grid input[readonly] { color: rgba(255,255,255,.5); cursor: not-allowed; }
.whatsapp-editor-wide { grid-column: 1 / -1; }.whatsapp-editor-footer > span { color: rgba(255,255,255,.54); font-size: 9px; }.whatsapp-editor-footer .drawer-action { min-width: 145px; }
.whatsapp-instance-edit { padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--cream); font-size: 8px; font-weight: 800; cursor: pointer; }.whatsapp-instance-edit:hover { border-color: var(--teal); color: var(--teal); }
.qr-button { min-width: 136px; padding: 12px 16px; border: 0; background: var(--teal); color: var(--navy); font-weight: 800; cursor: pointer; }
.qr-button:disabled { opacity: .45; cursor: not-allowed; }
.routing-card { display: grid; grid-template-columns: auto 1fr auto auto 1fr; align-items: center; gap: 10px; padding: 24px; border: 1px solid var(--line); background: var(--cream); }
.routing-card p { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.routing-card i { color: var(--muted); font-size: 10px; font-style: normal; }
.webchat-settings-card { grid-column: 1 / -1; padding: 22px; }
.webchat-settings-card .panel-heading { margin-bottom: 16px; }
.webchat-settings-card .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.webchat-settings-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.webchat-settings-form > label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.webchat-settings-form label small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.webchat-settings-form input,
.webchat-settings-form select,
.webchat-settings-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: white; color: var(--navy); font: 500 11px/1.45 'Poppins'; resize: vertical; }
.webchat-settings-form input[readonly],
.webchat-settings-form textarea[readonly] { background: var(--paper); color: var(--muted); }
.webchat-wide { grid-column: 1 / -1; }
.webchat-actions { display: flex; gap: 9px; align-items: center; }
.webchat-actions .drawer-action { width: auto; }
.route-agent { padding: 8px 9px; color: white; font: 700 10px Fredoka,sans-serif; letter-spacing: .08em; }
.nova-route { background: var(--navy); }
.niko-route { background: var(--coral); }
.qr-dialog { width: min(92vw,480px); padding: 35px; border: 0; background: var(--cream); color: var(--navy); box-shadow: 0 30px 100px rgba(6,18,20,.35); }
.qr-dialog::backdrop { background: rgba(13,29,32,.78); backdrop-filter: blur(4px); }
.qr-dialog h2 { margin: 3px 0 10px; font: 600 34px Fredoka,sans-serif; }
.qr-dialog > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-close { position: absolute; top: 14px; right: 15px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--navy); color: white; font-size: 22px; cursor: pointer; }
.qr-frame { display: grid; place-items: center; width: min(100%,320px); aspect-ratio: 1; margin: 24px auto 14px; padding: 14px; background: white; border: 1px solid var(--line); }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-dialog > small { display: block; color: #9b4335; text-align: center; font-size: 10px; font-weight: 700; }

.assistant-monitor-section { margin-top: 70px; scroll-margin-top: 24px; }
.assistant-monitor-section .control-heading > div > p:last-child { max-width: 840px; color: var(--muted); }
.assistant-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.assistant-metrics article { display: grid; gap: 4px; min-height: 112px; padding: 18px; border-top: 4px solid var(--teal); background: var(--white); box-shadow: 0 8px 22px rgba(26,44,48,.045); }
.assistant-metrics article.attention { border-top-color: var(--coral); }
.assistant-metrics small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.assistant-metrics strong { color: var(--navy); font: 600 32px Fredoka,sans-serif; }
.assistant-metrics span { color: var(--muted); font-size: 10px; }
.conversation-boards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-top: 13px; }
.conversation-board { min-width: 0; padding-bottom: 10px; }
.niko-board { border-top: 5px solid var(--coral); }
.nova-board { border-top: 5px solid var(--navy); }
.service-board { border-top: 5px solid var(--teal-deep); }
.monitor-list { display: grid; gap: 1px; max-height: 520px; overflow: auto; padding: 0 18px 12px; }
.monitor-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 13px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.monitor-row:hover { background: var(--paper); }
.monitor-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: var(--navy); font: 700 12px Fredoka,sans-serif; }
.niko-board .monitor-avatar { background: var(--coral); color: white; }
.monitor-copy { min-width: 0; }
.monitor-copy strong, .monitor-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-copy strong { color: var(--navy); font-size: 11px; }
.monitor-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.monitor-state { padding: 5px 7px; background: rgba(73,179,156,.13); color: var(--teal-deep); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.monitor-state.escalated, .monitor-state.review, .monitor-state.blocked { background: #fff0eb; color: #9b4335; }
.assistant-chat { display: grid; gap: 9px; }
.assistant-message { padding: 12px; border-left: 4px solid var(--teal); background: var(--paper); }
.assistant-message.actor-niko { border-left-color: var(--coral); }
.assistant-message.actor-nova { border-left-color: var(--navy); }
.assistant-message.actor-admin { border-left-color: #d4a62f; }
.assistant-message > div { display: flex; justify-content: space-between; gap: 12px; }
.assistant-message strong { color: var(--teal-deep); font-size: 10px; text-transform: uppercase; }
.assistant-message time { color: var(--muted); font-size: 9px; }
.assistant-message p { margin: 6px 0 0; white-space: pre-wrap; color: var(--navy); font-size: 12px; line-height: 1.55; }
.assistant-control { display: grid; gap: 10px; margin-top: 14px; padding: 15px; background: var(--cream); }
.assistant-control-row { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-control select, .assistant-control textarea, .conversation-control textarea { width: 100%; padding: 10px; border: 1px solid var(--line); background: white; color: var(--navy); font: 12px Poppins,sans-serif; }
.conversation-control { display: grid; gap: 10px; margin-top: 12px; padding: 15px; border-left: 4px solid var(--coral); background: var(--cream); }
.conversation-control > strong { color: var(--navy); font-size: 12px; }
.message-moderation { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.message-moderation small { flex: 1 1 100%; color: var(--muted); font-size: 9px; }
.message-moderation button { padding: 5px 7px; border: 1px solid var(--line); background: white; color: var(--navy); font: 700 8px Poppins,sans-serif; cursor: pointer; }
.assistant-directory { display: grid; gap: 5px; margin-top: 10px; }
.assistant-directory span { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); background: white; }
.assistant-directory strong { color: var(--navy); font-size: 10px; }
.assistant-directory small { color: var(--muted); font-size: 9px; }
.monitor-state.humano { background: #fff4cf; color: #7b5c00; }
.channel-state.ready i { background: var(--teal); box-shadow: 0 0 0 4px rgba(73,179,156,.14); }

@media (max-width: 900px) {
  .nova-grid { grid-template-columns: 1fr; }
  .nova-heading { align-items: flex-start; }
  .channel-bridge, .conversation-boards { grid-template-columns: 1fr; }
  .assistant-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .nova-console, .nova-settings, .niko-settings { padding: 22px; }
  .nova-metrics { grid-template-columns: 1fr; }
  .nova-metrics small { min-height: 0; }
  .whatsapp-card { grid-template-columns: auto 1fr; padding: 20px; }
  .whatsapp-instance-row { grid-template-columns: auto 1fr; }
  .whatsapp-instance-row .whatsapp-actions { grid-column: 1 / -1; justify-content: space-between; }
  .whatsapp-actions { grid-column: 1 / -1; width: 100%; justify-items: stretch; }
  .whatsapp-editor-grid { grid-template-columns: 1fr; }.whatsapp-editor-wide { grid-column: auto; }.whatsapp-editor-footer { align-items: stretch; flex-direction: column; }
  .routing-card { grid-template-columns: auto 1fr; }
  .routing-card b { display: none; }
  .assistant-metrics { grid-template-columns: 1fr 1fr; }
  .assistant-metrics article { min-height: 98px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Control, correo y trazabilidad */
.control-section { margin-top: 13px; scroll-margin-top: 20px; }
.control-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 18px; }
.control-heading h2 { margin: 0; color: var(--navy); font-family: 'Fredoka'; font-size: 34px; font-weight: 600; }
.security-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.security-strip article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; min-height: 94px; padding: 18px; border: 1px solid var(--line); background: var(--white); }
.security-strip article > span { color: var(--teal); font-family: 'Fredoka'; font-size: 21px; font-weight: 700; }
.security-strip article div { display: grid; gap: 4px; }
.security-strip article strong { color: var(--navy); font-size: 14px; }
.security-strip article small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.security-strip article b { padding: 5px 7px; background: rgba(73,179,156,.13); color: var(--teal-deep); font-size: 10px; }
.control-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(380px,.9fr); gap: 13px; }
.mail-panel, .audit-panel { min-width: 0; }
.channel-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.channel-state i { width: 8px; height: 8px; border-radius: 50%; background: #9aa6a8; }
.channel-state.ready { color: var(--teal-deep); }
.channel-state.ready i { background: var(--teal); box-shadow: 0 0 0 4px rgba(73,179,156,.14); }
.channel-state.pending { color: #9b771d; }
.channel-state.pending i { background: #d2a62f; }
.mail-summary { display: grid; grid-template-columns: 1.7fr repeat(3,.55fr); gap: 8px; padding: 0 22px 18px; }
.mail-summary > div { display: grid; gap: 4px; min-width: 0; padding: 13px; background: var(--paper); }
.mail-summary small { color: var(--muted); font-size: 11px; font-weight: 700; }
.mail-summary strong { overflow: hidden; color: var(--navy); font-family: 'Fredoka'; font-size: 17px; text-overflow: ellipsis; }
.mail-compose { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 0 22px 18px; padding: 18px; background: var(--navy); color: white; }
.compose-title { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.compose-title strong { color: var(--cream); font-family: 'Fredoka'; font-size: 20px; }
.compose-title small { color: rgba(255,255,255,.55); font-size: 12px; }
.mail-compose label { display: grid; gap: 6px; color: var(--teal-bright); font-size: 12px; font-weight: 700; }
.mail-compose label:nth-of-type(3) { grid-column: 1 / -1; }
.mail-compose input, .mail-compose textarea { width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,.16); outline: none; background: rgba(255,255,255,.07); color: white; font: 14px/1.5 'Poppins', sans-serif; }
.mail-compose input:focus, .mail-compose textarea:focus { border-color: var(--teal); }
.mail-compose textarea { resize: vertical; }
.mail-compose .drawer-action { justify-self: start; background: var(--teal); color: var(--navy); font-size: 13px; }
.mail-list, .audit-list { max-height: 560px; overflow-y: auto; padding: 0 22px 22px; }
.mail-row { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--navy); text-align: left; cursor: pointer; }
.mail-row:hover { background: rgba(73,179,156,.05); }
.mail-row > div { min-width: 0; }
.mail-row strong, .audit-row strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mail-row small, .audit-row small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mail-direction { display: grid; place-items: center; width: 30px; height: 30px; background: rgba(73,179,156,.13); color: var(--teal-deep); font-size: 13px; font-weight: 800; }
.mail-direction.outbound { background: rgba(236,118,93,.12); color: #a74734; }
.mail-status { padding: 4px 7px; background: var(--paper); color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.mail-status.sent, .mail-status.received { background: rgba(73,179,156,.13); color: var(--teal-deep); }
.mail-status.failed { background: rgba(236,118,93,.13); color: #a74734; }
.mail-row time { color: var(--muted); font-size: 11px; }
.audit-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: start; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-actor { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: white; font-size: 12px; font-weight: 800; }
.audit-actor.walker { background: var(--teal-deep); }
.audit-actor.owner { background: var(--coral); }
.audit-origin { display: grid; justify-items: end; gap: 2px; }
.audit-origin time { color: var(--navy); font-size: 11px; font-weight: 700; }
.audit-origin small { max-width: 130px; }
.empty-control { padding: 18px 0; color: var(--muted); font-size: 13px; }
.mail-body { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--navy); font: 14px/1.6 'Poppins', sans-serif; }

/* Legibilidad mínima del dashboard en teléfonos, tabletas y escritorio. */
.eyebrow, .tiny-label { font-size: 12px; }
.panel-heading h2 { font-size: 24px; }
.metric-card p, .metric-card small, .map-legend, .table-summary, .pending-pill { font-size: 12px; }
.activity-item strong, .walk-pet strong, .walker-row strong { font-size: 14px; }
.activity-item p, .activity-time, .walker-row small, .walk-pet small { font-size: 12px; }
.walk-row { font-size: 13px; }
.walk-head { font-size: 11px; }
.search-field input, .filter-button, .manage-walk, .review-button { font-size: 12px; }
.status-badge, .walker-state { font-size: 11px; }
.field-note > p:not(.eyebrow), .field-note a { font-size: 13px; }
.drawer-loading, .drawer-status-line small, .detail-item small, .detail-item strong, .detail-note, .drawer-section-title span, .assignment-box select, .drawer-action, .timeline-item strong, .timeline-item p, .timeline-item time, .empty-timeline { font-size: 12px; }
.drawer-action { font-size: 13px; }

@media (max-width: 1100px) {
  .control-grid, .security-strip { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .side-rail { padding-inline: 7px; }
  .side-rail nav { flex: 1; gap: 0; }
  .rail-link { min-width: 0; flex: 1; padding-inline: 0; }
  .rail-link span { font-size: 10px; letter-spacing: .01em; }
  .rail-foot { margin-left: 4px; }
  .security-strip article { grid-template-columns: 34px 1fr; }
  .security-strip article b { grid-column: 2; justify-self: start; }
  .mail-summary { grid-template-columns: repeat(3,1fr); padding-inline: 16px; }
  .mail-summary > div:first-child { grid-column: 1 / -1; }
  .mail-compose { grid-template-columns: 1fr; margin-inline: 16px; }
  .mail-compose label, .mail-compose label:nth-of-type(3) { grid-column: auto; }
  .compose-title { display: grid; }
  .mail-list, .audit-list { padding-inline: 16px; }
  .mail-row { grid-template-columns: 30px 1fr auto; }
  .mail-row time { grid-column: 2; }
  .audit-row { grid-template-columns: 32px 1fr; }
  .audit-origin { grid-column: 2; justify-items: start; }
  .control-heading h2 { font-size: 30px; }
  .map-callout { left: 14px; right: 14px; bottom: 14px; padding: 13px 14px; }
  .map-callout small, .map-callout em { font-size: 11px; }
  .map-callout strong { font-size: 14px; }
  .agenda-day span, .agenda-day b, .agenda-day i { font-size: 11px; }
  .business-identity em, .business-performance small, .business-controls > label,
  .business-checks, .business-controls > button { font-size: 11px; }
}

/* Agenda de reservas y operación comercial V1.3 */
.agenda-calendar { display: grid; grid-template-columns: repeat(14,minmax(84px,1fr)); gap: 8px; overflow-x: auto; padding: 0 22px 18px; scrollbar-width: thin; }
.agenda-day { display: grid; justify-items: start; min-height: 108px; padding: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--navy); text-align: left; cursor: pointer; }
.agenda-day:hover, .agenda-day.active { border-color: var(--teal-deep); background: var(--teal); }
.agenda-day small { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.agenda-day strong { font-family: 'Fredoka'; font-size: 27px; line-height: 1.1; }
.agenda-day span, .agenda-day b, .agenda-day i { font-size: 10px; font-style: normal; }
.agenda-day span { color: var(--muted); }
.agenda-day b { color: #9b3c2c; }
.agenda-day i { color: var(--teal-deep); }
.agenda-day.active span { color: rgba(26,44,48,.7); }

.commerce-section { margin: 13px 0; scroll-margin-top: 20px; }
.commerce-heading { align-items: center; }
.commerce-heading > div > p:last-child { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.commerce-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.commerce-metrics article { display: grid; gap: 5px; min-height: 118px; padding: 20px; border: 1px solid var(--line); background: var(--white); }
.commerce-metrics small { color: var(--teal-deep); font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.commerce-metrics strong { color: var(--navy); font-family: 'Fredoka'; font-size: 26px; line-height: 1.05; }
.commerce-metrics span { color: var(--muted); font-size: 12px; }
.commerce-metrics .commerce-signal { background: var(--navy); }
.commerce-metrics .commerce-signal small { color: var(--teal); }
.commerce-metrics .commerce-signal strong { color: var(--cream); font-size: 21px; }
.commerce-metrics .commerce-signal span { color: rgba(255,255,255,.62); }
.campaign-board { display: grid; grid-template-columns: minmax(290px,.65fr) minmax(0,1.35fr); margin-bottom: 13px; background: var(--navy); color: white; }
.campaign-summary { display: grid; align-content: center; min-height: 250px; padding: 28px; border-right: 1px solid rgba(255,255,255,.12); }
.campaign-summary h3 { max-width: 370px; margin: 8px 0 24px; color: var(--cream); font-family: 'Fredoka'; font-size: 30px; line-height: 1.05; }
.campaign-summary > div { display: flex; flex-wrap: wrap; gap: 18px; }
.campaign-summary span { display: grid; gap: 2px; }
.campaign-summary strong { color: var(--teal); font-family: 'Fredoka'; font-size: 25px; }
.campaign-summary small { color: rgba(255,255,255,.48); font-size: 10px; text-transform: uppercase; }
.campaign-list { display: grid; align-content: center; padding: 18px 24px; }
.campaign-list article { display: grid; grid-template-columns: auto minmax(160px,1fr) auto; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.12); }
.campaign-list article:first-child { border-top: 0; }
.campaign-list article > div { display: grid; gap: 3px; }
.campaign-list article strong { color: white; font-family: 'Fredoka'; font-size: 17px; }
.campaign-list article small { color: rgba(255,255,255,.5); font-size: 10px; }
.campaign-status { padding: 5px 7px; background: rgba(73,179,156,.15); color: var(--teal); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.campaign-numbers { display: flex !important; grid-auto-flow: column; gap: 8px !important; }
.campaign-numbers span { display: grid; min-width: 55px; color: rgba(255,255,255,.48); font-size: 9px; text-align: center; }
.campaign-numbers b { color: var(--cream); font-family: 'Fredoka'; font-size: 17px; }
.plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.plan-card { position: relative; display: grid; gap: 8px; min-height: 204px; padding: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.plan-card.recommended { border-color: var(--teal-deep); background: var(--cream); }
.plan-card small { color: var(--teal-deep); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-card h3 { margin: 0; color: var(--navy); font-family: 'Fredoka'; font-size: 25px; }
.plan-card > strong { color: var(--teal-deep); font-family: 'Fredoka'; font-size: 25px; }
.plan-card > strong em { color: var(--muted); font: 11px 'Poppins'; }
.plan-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.plan-card > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.plan-card > div span { padding: 5px 8px; background: var(--paper); color: var(--navy); font-size: 10px; font-weight: 700; }
.business-create { margin-bottom: 13px; border: 1px solid var(--line); background: var(--white); }
.business-create summary { display: flex; align-items: center; gap: 14px; padding: 19px 22px; cursor: pointer; list-style: none; }
.business-create summary::-webkit-details-marker { display: none; }
.business-create summary > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: var(--navy); font-size: 23px; }
.business-create summary > div { display: grid; gap: 2px; }
.business-create summary strong { color: var(--navy); font-family: 'Fredoka'; font-size: 20px; }
.business-create summary small { color: var(--muted); font-size: 12px; }
.business-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; padding: 0 22px 24px; border-top: 1px solid var(--line); }
.business-form label { display: grid; gap: 6px; padding-top: 18px; color: var(--teal-deep); font-size: 12px; font-weight: 700; }
.business-form input, .business-form select, .business-form textarea, .business-controls select { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); outline: none; background: var(--paper); color: var(--navy); font: 13px/1.45 'Poppins'; }
.business-form input:focus, .business-form select:focus, .business-form textarea:focus { border-color: var(--teal-deep); }
.business-form textarea { resize: vertical; }
.business-form .form-wide { grid-column: 1 / -1; }
.business-form .check-label { display: flex; align-items: center; align-self: end; min-height: 46px; }
.business-form .check-label input { width: 18px; height: 18px; }
.business-location-picker { display: grid; gap: 12px; padding-top: 18px; }
.business-location-picker > div:first-child { display: grid; gap: 3px; }
.business-location-picker strong { color: var(--navy); font-family: 'Fredoka'; font-size: 18px; }
.business-location-picker small { color: var(--muted); font-size: 12px; font-weight: 400; }
#businessLocationMap { height: 320px; border: 1px solid var(--line); background: #dce5dd; }
.category-list { display: grid; gap: 1px; padding: 0 22px 22px; background: var(--line); border-top: 1px solid var(--line); }
.category-list article { display: grid; grid-template-columns: 48px minmax(130px,.8fr) 80px 78px minmax(220px,1.4fr) 78px 68px 90px; align-items: end; gap: 9px; padding: 14px; background: var(--white); }
.category-pin { display: grid; place-items: center; width: 44px; height: 44px; border: 4px solid white; border-radius: 50%; background: var(--pin); color: white; font-size: 21px; box-shadow: 0 5px 13px rgba(26,44,48,.15); }
.category-list label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.category-list input { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--navy); font: 11px 'Poppins'; }
.category-list input[type='color'] { height: 37px; padding: 3px; }
.category-list .category-active { display: flex; align-items: center; gap: 5px; min-height: 38px; }
.category-list .category-active input { width: 16px; }
.category-list button { min-height: 37px; padding: 8px; font-size: 10px; }
.category-actions { align-items: center; display: flex; gap: 6px; }
.category-actions small { color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.category-delete { border-color: rgba(197,69,55,.3) !important; color: #a9392e !important; }
.form-actions { display: flex; align-items: center; gap: 14px; padding-top: 5px !important; }
.form-actions small { color: var(--muted); font-weight: 400; }
.business-panel { min-width: 0; }
.business-list { padding: 0 22px 22px; }
.business-row { display: grid; grid-template-columns: 52px minmax(240px,1fr) auto minmax(210px,.65fr); align-items: start; gap: 15px; padding: 18px 0; border-top: 1px solid var(--line); }
.business-icon { display: grid; place-items: center; width: 50px; height: 50px; background: var(--cream); font-size: 24px; }
.business-identity { min-width: 0; }
.business-identity > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.business-identity strong { color: var(--navy); font-family: 'Fredoka'; font-size: 18px; }
.business-identity b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); color: var(--navy); font-size: 11px; }
.business-identity em { padding: 3px 6px; background: var(--coral); color: white; font-size: 9px; font-style: normal; font-weight: 800; }
.business-identity small { color: var(--teal-deep); font-size: 11px; font-weight: 700; }
.business-identity p { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.business-performance { display: flex; gap: 8px; }
.business-performance > span { display: grid; min-width: 78px; padding: 10px; background: var(--paper); text-align: center; }
.business-performance strong { color: var(--navy); font-family: 'Fredoka'; font-size: 21px; }
.business-performance small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.business-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.business-controls > label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.business-controls > label:nth-child(3), .business-checks, .business-controls > button { grid-column: 1 / -1; }
.business-controls select { padding: 8px; font-size: 11px; }
.business-checks { display: flex; flex-wrap: wrap; gap: 12px; color: var(--navy); font-size: 10px; }
.business-controls > button { justify-self: stretch; font-size: 11px; }
.business-row-editor { grid-column: 1 / -1; }
.business-row-editor summary { color: var(--teal-deep); font-size: 11px; font-weight: 700; cursor: pointer; }
.business-row-editor > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 10px; padding: 13px; background: var(--paper); }
.business-row-editor label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.business-row-editor input, .business-row-editor select, .business-row-editor textarea { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font: 11px 'Poppins'; }
.business-row-editor select[multiple] { min-height: 98px; }
.business-row-editor .business-editor-wide { grid-column: 1 / -1; }
.commerce-settings-form { grid-template-columns: 1fr; }
.settings-block { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.settings-block legend { padding: 0 8px; color: var(--navy); font-family: 'Fredoka'; font-size: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.settings-grid label { padding-top: 0; }
.settings-list { display: grid; gap: 8px; }
.settings-row { display: grid; grid-template-columns: repeat(var(--settings-columns, 5),minmax(90px,1fr)); align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); background: var(--white); }
.settings-row label { padding-top: 0; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.settings-row .check-label { align-self: end; min-height: 42px; color: var(--navy); text-transform: none; }
.settings-row .check-label input { width: 17px; }
.settings-add { margin-top: 10px; }
.settings-note { display: block; margin-top: 10px; color: var(--muted); }
.wallet-admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1px; padding: 0 22px 22px; border-top: 1px solid var(--line); background: var(--line); }
.wallet-admin-grid > section { min-width: 0; padding: 18px; background: var(--white); }
.wallet-admin-grid h3 { margin: 0 0 12px; color: var(--navy); font-family: 'Fredoka'; font-size: 19px; }
.wallet-admin-list { display: grid; gap: 8px; }
.wallet-admin-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 11px; background: var(--paper); }
.wallet-admin-row > div { display: grid; gap: 2px; min-width: 0; }
.wallet-admin-row strong { color: var(--navy); font-size: 12px; }
.wallet-admin-row small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.wallet-admin-row .wallet-amount { color: var(--teal-deep); font-family: 'Fredoka'; font-size: 18px; }
.wallet-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.wallet-actions button { padding: 7px 9px; border: 1px solid var(--teal-deep); background: transparent; color: var(--teal-deep); font: 700 10px 'Poppins'; cursor: pointer; }
.wallet-actions button:last-child { border-color: #a9392e; color: #a9392e; }
.campaign-list .campaign-actions { display: flex !important; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; }
.campaign-actions select, .campaign-actions input { min-height: 34px; padding: 7px; border: 1px solid rgba(255,255,255,.2); background: #243c42; color: white; font: 10px 'Poppins'; }
.campaign-actions input[type='file'] { max-width: 230px; }
.campaign-actions button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--teal); background: transparent; color: var(--teal); font: 700 10px 'Poppins'; cursor: pointer; }
.campaign-editor { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); }
.campaign-editor summary { padding: 9px 0; color: var(--teal); font-size: 10px; font-weight: 700; cursor: pointer; }
.campaign-editor-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 6px 0 12px; }
.campaign-editor-grid label { display: grid; gap: 3px; color: rgba(255,255,255,.55); font-size: 9px; text-transform: uppercase; }
.campaign-editor-grid input, .campaign-editor-grid select, .campaign-editor-grid textarea { width: 100%; min-width: 0; padding: 8px; border: 1px solid rgba(255,255,255,.18); background: #243c42; color: white; font: 10px 'Poppins'; }
.campaign-editor-grid .campaign-wide { grid-column: 1 / -1; }
.campaign-editor-grid button { align-self: end; min-height: 38px; border: 1px solid var(--teal); background: transparent; color: var(--teal); font: 700 10px 'Poppins'; cursor: pointer; }
.business-form select[multiple] { min-height: 112px; }
.business-form label > small { color: var(--muted); font-weight: 400; }

@media (max-width: 1200px) {
  .commerce-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .business-row { grid-template-columns: 52px 1fr minmax(210px,.6fr); }
  .business-performance { grid-column: 2; }
  .business-controls { grid-column: 3; grid-row: 1 / span 2; }
  .category-list article { grid-template-columns: 48px repeat(3,minmax(100px,1fr)); }
  .category-keywords { grid-column: 2 / span 2; }
  .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-row { grid-template-columns: repeat(3,minmax(100px,1fr)); }
  .business-row-editor > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .agenda-calendar { padding-inline: 16px; }
  .agenda-day { min-width: 92px; }
  .commerce-metrics, .plan-grid, .business-form { grid-template-columns: 1fr; }
  .campaign-board { grid-template-columns: 1fr; }
  .campaign-summary { min-height: 220px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .campaign-list article { grid-template-columns: auto 1fr; }
  .campaign-numbers { grid-column: 1 / -1; }
  .business-form .form-wide { grid-column: auto; }
  .commerce-heading { align-items: end; }
  .commerce-heading > div > p:last-child { font-size: 12px; }
  .business-row { grid-template-columns: 48px 1fr; }
  .business-performance, .business-controls { grid-column: 1 / -1; grid-row: auto; }
  .business-controls { grid-template-columns: 1fr; }
  .business-controls > label:nth-child(3), .business-checks, .business-controls > button { grid-column: auto; }
  .category-list { padding-inline: 12px; }
  .category-list article { grid-template-columns: 44px 1fr; }
  .category-list article > *:not(.category-pin) { grid-column: 2; }
  .category-list .category-keywords { grid-column: 2; }
  #businessLocationMap { height: 260px; }
  .form-actions { display: grid; }
  .settings-grid, .settings-row, .wallet-admin-grid { grid-template-columns: 1fr; }
  .campaign-editor-grid { grid-template-columns: 1fr; }
  .campaign-editor-grid .campaign-wide { grid-column: auto; }
  .business-row-editor > div { grid-template-columns: 1fr; }
  .business-row-editor .business-editor-wide { grid-column: auto; }
}

/* Centro de seguridad, incidentes y conversación V1.5 */
.safety-section { margin: 13px 0; scroll-margin-top: 20px; }
.safety-heading { align-items: center; }
.safety-heading > div > p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.safety-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.safety-summary article { position: relative; display: grid; gap: 5px; min-height: 122px; padding: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.safety-summary article::after { content: ''; position: absolute; right: -25px; bottom: -42px; width: 94px; height: 94px; border: 14px solid rgba(73,179,156,.08); border-radius: 50%; }
.safety-summary small { color: var(--teal-deep); font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.safety-summary strong { color: var(--navy); font-family: 'Fredoka'; font-size: 34px; line-height: 1; }
.safety-summary span { color: var(--muted); font-size: 12px; }
.safety-summary .safety-critical { border-color: rgba(185,47,38,.32); background: #fff7f3; }
.safety-summary .safety-critical small, .safety-summary .safety-critical strong { color: #a72b23; }
.safety-summary .safety-channel { background: var(--navy); }
.safety-summary .safety-channel small { color: var(--teal); }
.safety-summary .safety-channel strong { color: var(--cream); font-size: 27px; }
.safety-summary .safety-channel span { color: rgba(255,255,255,.62); }
.safety-panel { min-width: 0; }
.safety-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 700; }
.safety-legend span { display: flex; align-items: center; gap: 5px; }
.safety-legend i { width: 8px; height: 8px; border-radius: 50%; background: #d5a736; }
.safety-legend i.urgent { background: var(--coral); }
.safety-legend i.sos { background: #b92f26; box-shadow: 0 0 0 4px rgba(185,47,38,.1); }
.incident-list { padding: 0 22px 22px; }
.incident-row { display: grid; grid-template-columns: 112px minmax(260px,1fr) minmax(280px,.56fr); gap: 18px; padding: 21px 0; border-top: 1px solid var(--line); }
.incident-row.severity-sos { margin-inline: -22px; padding-inline: 22px; border-left: 5px solid #b92f26; background: linear-gradient(90deg,rgba(185,47,38,.07),transparent 38%); }
.incident-row.severity-urgent { border-left: 5px solid var(--coral); padding-left: 14px; }
.incident-priority { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.incident-priority span { padding: 6px 9px; background: rgba(210,167,54,.13); color: #85650f; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.severity-sos .incident-priority span { background: #b92f26; color: white; }
.severity-urgent .incident-priority span { background: rgba(236,118,93,.16); color: #a23e2d; }
.incident-priority b { color: var(--muted); font-size: 11px; }
.incident-copy { min-width: 0; }
.incident-copy > small { color: var(--teal-deep); font-size: 11px; font-weight: 700; }
.incident-copy h3 { margin: 5px 0; color: var(--navy); font-family: 'Fredoka'; font-size: 21px; }
.incident-copy > p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.55; }
.incident-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.incident-meta span { padding: 5px 7px; background: var(--paper); color: var(--muted); font-size: 11px; }
.incident-copy blockquote, .drawer-incident blockquote { display: grid; gap: 3px; margin: 12px 0 0; padding: 11px 13px; border-left: 3px solid var(--teal); background: rgba(73,179,156,.08); color: var(--navy); font-size: 12px; line-height: 1.5; }
.incident-actions { display: grid; align-content: start; gap: 9px; }
.incident-actions > .review-button { justify-self: start; }
.incident-actions textarea, .drawer-chat textarea { width: 100%; padding: 11px 12px; resize: vertical; border: 1px solid var(--line); outline: none; background: var(--paper); color: var(--navy); font: 13px/1.5 'Poppins'; }
.incident-actions textarea:focus, .drawer-chat textarea:focus { border-color: var(--teal-deep); }
.incident-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.drawer-action.secondary { border: 1px solid var(--teal-deep); background: transparent; color: var(--teal-deep); }
.incident-closed { justify-self: start; padding: 7px 9px; background: rgba(73,179,156,.13); color: var(--teal-deep); font-size: 11px; font-weight: 800; }
.safety-empty { display: grid; justify-items: center; padding: 42px 18px; text-align: center; }
.safety-empty span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: var(--navy); font-size: 24px; }
.safety-empty strong { margin-top: 12px; color: var(--navy); font-family: 'Fredoka'; font-size: 21px; }
.safety-empty p { max-width: 520px; margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.drawer-incidents, .drawer-conversation { display: grid; gap: 9px; }
.drawer-incident { padding: 13px; border-left: 4px solid #d5a736; background: var(--paper); }
.drawer-incident.severity-sos { border-left-color: #b92f26; background: #fff3ef; }
.drawer-incident.severity-urgent { border-left-color: var(--coral); }
.drawer-incident > div:first-child, .drawer-message > div { display: flex; justify-content: space-between; gap: 10px; }
.drawer-incident > div:first-child strong { color: var(--navy); font-size: 12px; }
.drawer-incident > div:first-child span { color: var(--teal-deep); font-size: 11px; font-weight: 800; }
.drawer-incident > p { margin: 8px 0 4px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.drawer-incident > small { color: var(--muted); font-size: 11px; }
.incident-photos { display: grid; gap: 5px; margin-top: 9px; }
.incident-photos a { color: var(--teal-deep); font-size: 11px; font-weight: 700; }
.drawer-message { padding: 11px 13px; border: 1px solid var(--line); background: var(--white); }
.drawer-message.role-admin { border-left: 4px solid var(--navy); }
.drawer-message.role-walker { border-left: 4px solid var(--teal-deep); }
.drawer-message.role-owner { border-left: 4px solid var(--coral); }
.drawer-message > div strong { color: var(--teal-deep); font-size: 11px; }
.drawer-message > div time { color: var(--muted); font-size: 10px; }
.drawer-message > p { margin: 5px 0 0; color: var(--navy); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.drawer-chat { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-chat .drawer-action { justify-self: start; }

@media (max-width: 1100px) {
  .safety-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .incident-row { grid-template-columns: 100px 1fr; }
  .incident-actions { grid-column: 2; }
}

@media (max-width: 760px) {
  .side-rail { overflow-x: auto; overflow-y: hidden; }
  .side-rail nav { min-width: 560px; justify-content: flex-start; }
  .rail-link { flex: 0 0 74px; }
  .rail-foot { flex: 0 0 auto; }
  .safety-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .safety-summary article { min-height: 112px; padding: 16px; }
  .safety-summary strong { font-size: 29px; }
  .safety-heading { align-items: end; }
  .safety-heading > div > p:last-child { font-size: 12px; }
  .safety-panel .panel-heading { align-items: flex-start; }
  .safety-legend { display: none; }
  .incident-list { padding-inline: 16px; }
  .incident-row, .incident-row.severity-sos { grid-template-columns: 1fr; margin-inline: -16px; padding: 18px 16px; }
  .incident-row.severity-urgent { padding-left: 12px; }
  .incident-priority { flex-direction: row; align-items: center; }
  .incident-actions { grid-column: auto; }
  .incident-actions > .review-button, .incident-actions .drawer-action { min-height: 42px; }
}

/* V1.6.5 — centro de mando por vistas, sin página interminable */
.dashboard-view[hidden], .view-tabs[hidden] { display: none !important; }
.dashboard-view.is-active { animation: viewReveal .28s ease both; }
.topbar-copy { max-width: 780px; }
.view-subtitle { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.help-shortcut { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--teal-deep); font-family: 'Fredoka'; font-size: 17px; font-weight: 700; text-decoration: none; }
.help-shortcut:hover { border-color: var(--teal-deep); background: var(--teal-deep); color: white; }
.rail-link-chat { color: var(--cream); }
.rail-live-dot { position: absolute; top: 7px; right: 13px; width: 7px; height: 7px; border: 2px solid var(--navy); border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(236,118,93,.14); }

.view-tabs { display: flex; align-items: center; gap: 7px; margin: -7px 0 24px; padding: 7px; overflow-x: auto; border: 1px solid var(--line); background: rgba(255,254,249,.82); box-shadow: 0 8px 26px rgba(26,44,48,.04); scrollbar-width: none; }
.view-tabs::-webkit-scrollbar { display: none; }
.view-tabs button { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 17px; border: 0; background: transparent; color: var(--muted); font: 700 10px/1 'Poppins'; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.view-tabs button span { color: #9badaa; font: 600 9px/1 'Fredoka'; }
.view-tabs button:hover { color: var(--teal-deep); }
.view-tabs button.active { background: var(--navy); color: white; }
.view-tabs button.active span { color: var(--teal); }

.agent-command-deck { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) minmax(300px,1.18fr); gap: 12px; margin: 24px 0 13px; }
.agent-command { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; min-height: 126px; padding: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--white); color: var(--navy); text-align: left; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.agent-command::after { content: ''; position: absolute; right: -42px; bottom: -61px; width: 128px; height: 128px; border: 18px solid rgba(73,179,156,.07); border-radius: 50%; }
.agent-command:hover { z-index: 2; transform: translateY(-3px); border-color: rgba(31,110,93,.45); box-shadow: 0 18px 44px rgba(26,44,48,.11); }
.agent-command > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.agent-command small { color: var(--teal-deep); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.agent-command strong { font-family: 'Fredoka'; font-size: 25px; line-height: 1; }
.agent-command em { overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.agent-command > b { position: relative; z-index: 1; align-self: end; color: var(--teal-deep); font-size: 8px; letter-spacing: .08em; }
.agent-orbit { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: var(--cream); }
.agent-orbit > b { font: 700 25px/1 'Fredoka'; }
.agent-orbit i { position: absolute; right: 0; bottom: 4px; width: 12px; height: 12px; border: 3px solid white; border-radius: 50%; background: var(--teal); }
.niko-command { background: #f7f1df; }
.niko-command .agent-orbit { background: var(--teal-deep); }
.voice-command { background: var(--navy); color: white; }
.voice-command::after { border-color: rgba(140,227,205,.08); }
.voice-command small, .voice-command > b { color: var(--teal); }
.voice-command em { color: rgba(255,255,255,.58); }
.voice-digits { display: grid; place-items: center; width: 64px; height: 54px; border: 1px solid rgba(140,227,205,.32); color: var(--cream); font: 700 20px/1 'Fredoka'; letter-spacing: .08em; }

.voice-hub { margin-top: 4px; }
.voice-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(420px,.9fr); min-height: 440px; overflow: hidden; background: var(--navy); color: white; box-shadow: 0 20px 70px rgba(26,44,48,.13); }
.voice-hero::before { content: ''; position: absolute; width: 520px; height: 520px; right: -155px; top: -260px; border: 1px solid rgba(140,227,205,.22); border-radius: 50%; box-shadow: 0 0 0 65px rgba(140,227,205,.025),0 0 0 130px rgba(140,227,205,.018); }
.voice-hero-copy { position: relative; z-index: 1; display: grid; align-content: center; padding: clamp(38px,6vw,86px); }
.voice-hero-copy h2 { max-width: 760px; margin: 12px 0 22px; color: var(--cream); font: 600 clamp(34px,4.2vw,64px)/.96 'Fredoka'; letter-spacing: -.045em; }
.voice-hero-copy h2 span { color: var(--teal); }
.voice-hero-copy > a { width: max-content; color: white; font: 600 clamp(21px,2.4vw,35px)/1 'Fredoka'; letter-spacing: .025em; text-decoration: none; }
.voice-hero-copy > p:last-child { max-width: 660px; margin: 22px 0 0; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.7; }
.voice-route-visual { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-content: center; align-items: center; gap: 16px; padding: 42px; background: rgba(255,255,255,.025); border-left: 1px solid rgba(255,255,255,.1); }
.voice-route-visual article { display: grid; justify-items: center; gap: 13px; padding: 26px 12px; text-align: center; }
.voice-route-visual article > span { display: grid; place-items: center; width: 78px; height: 78px; border: 1px solid rgba(140,227,205,.38); border-radius: 50%; background: rgba(73,179,156,.1); color: var(--cream); font: 700 35px/1 'Fredoka'; box-shadow: 0 0 0 12px rgba(73,179,156,.035); }
.voice-route-visual article > div { display: grid; gap: 4px; }
.voice-route-visual small { color: var(--teal); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.voice-route-visual strong { color: white; font: 600 25px/1 'Fredoka'; }
.voice-route-visual p { margin: 0; color: rgba(255,255,255,.5); font-size: 10px; }
.voice-route-visual > b { color: var(--teal); font-size: 22px; }
.voice-status-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.voice-status-grid article { min-height: 145px; padding: 22px; border: 1px solid var(--line); background: var(--white); }
.voice-status-grid small { color: var(--teal-deep); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.voice-status-grid strong { display: block; margin: 11px 0 6px; color: var(--navy); font: 600 19px/1.1 'Fredoka'; }
.voice-status-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.voice-history-panel { margin-top: 13px; padding: 25px; }
.voice-settings-panel { margin-top: 13px; padding: 25px; border-top: 5px solid var(--teal-deep); }
.voice-settings-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-top: 18px; }
.voice-settings-form > label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.voice-settings-form select { width: 100%; padding: 13px 14px; border: 1px solid rgba(24,44,49,.14); background: #fbfcf8; color: var(--navy); font: 500 14px Poppins,sans-serif; }
.voice-settings-form textarea { width: 100%; padding: 13px 14px; border: 1px solid rgba(24,44,49,.14); background: #fbfcf8; color: var(--navy); font: 500 13px/1.5 Poppins,sans-serif; resize: vertical; }
.voice-settings-form .nova-toggle { grid-column: 1 / 3; }
.voice-settings-form .drawer-action { align-self: stretch; }
.human-escalation-panel { margin-top: 13px; padding: 25px; border-top: 5px solid var(--coral); }
.human-escalation-panel .panel-heading > div > p:last-child { max-width: 680px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.human-escalation-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,.72fr); gap: 18px; margin-top: 19px; }
.human-responsible-list { display: grid; align-content: start; gap: 9px; min-height: 168px; }
.human-responsible-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); background: #fafbf7; }
.human-responsible-order { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--navy); color: var(--cream); font: 700 12px/1 'Fredoka'; }
.human-responsible-copy { display: grid; gap: 4px; min-width: 0; }.human-responsible-copy strong { overflow: hidden; color: var(--navy); font: 600 15px/1.1 'Fredoka'; text-overflow: ellipsis; white-space: nowrap; }.human-responsible-copy small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.human-responsible-state { padding: 5px 7px; border-radius: 999px; background: #e8f4ed; color: var(--teal-deep); font-size: 7px; font-weight: 800; text-transform: uppercase; }.human-responsible-state.off { background: #f6e7e2; color: #9b4335; }
.human-responsible-edit { padding: 7px 9px; border: 1px solid rgba(31,110,93,.25); background: transparent; color: var(--teal-deep); font-size: 8px; font-weight: 800; cursor: pointer; }
.human-responsible-form { display: grid; gap: 10px; padding: 17px; border: 1px solid rgba(26,44,48,.12); background: var(--navy); color: white; }.human-responsible-form label { display: grid; gap: 6px; color: rgba(255,255,255,.64); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }.human-responsible-form input:not([type='checkbox']), .human-responsible-form select { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.16); outline: 0; background: rgba(255,255,255,.08); color: white; font: 500 12px Poppins,sans-serif; }.human-responsible-form option { color: var(--navy); }
.human-form-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.12); }.human-form-heading > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(140,227,205,.5); color: var(--teal); font: 700 10px 'Fredoka'; }.human-form-heading div { display: grid; gap: 2px; }.human-form-heading strong { font-size: 11px; }.human-form-heading small { color: rgba(255,255,255,.48); font-size: 8px; }
.human-channel-fieldset, .human-days { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 8px; border: 1px solid rgba(255,255,255,.14); }.human-channel-fieldset legend, .human-days legend { padding: 0 4px; color: rgba(255,255,255,.48); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.human-channel-fieldset label, .human-days label, .human-availability-toggle { display: flex !important; align-items: center; gap: 5px; color: rgba(255,255,255,.78) !important; font-size: 8px !important; letter-spacing: 0 !important; text-transform: none !important; }.human-channel-fieldset input, .human-days input, .human-availability-toggle input { accent-color: var(--teal); }
.human-form-split { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; align-items: end; }.human-availability-toggle { min-height: 38px; padding: 0 2px; }.human-schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.human-schedule-fields > label:nth-child(2) { grid-template-columns: 1fr 1fr; }.human-days { grid-column: 1 / -1; }.human-active-toggle { padding-top: 5px; }.human-active-toggle small { color: rgba(255,255,255,.48) !important; }.human-form-actions { display: flex; gap: 8px; }.human-form-actions .drawer-action { flex: 1; }.human-form-actions .qr-button { border-color: rgba(255,255,255,.24); color: white; }
.voice-history-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.voice-history-summary span { padding: 14px; border: 1px solid var(--line); background: #fafbf7; }
.voice-history-summary small { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.voice-history-summary strong { display: block; margin-top: 4px; color: var(--navy); font: 600 25px/1 'Fredoka'; }
.voice-call-list { display: grid; gap: 9px; }
.voice-call-row { padding: 16px; border: 1px solid var(--line); background: white; }
.voice-call-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.voice-call-head div { display: grid; gap: 3px; }
.voice-call-head strong { color: var(--navy); font: 600 16px/1.15 'Fredoka'; }
.voice-call-head small { color: var(--muted); font-size: 9px; }
.voice-call-state { padding: 6px 9px; border-radius: 999px; background: #eaf4ef; color: #1e6c4f; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.voice-transcript-preview { display: grid; gap: 5px; margin-top: 12px; }
.voice-transcript-preview p { margin: 0; padding: 8px 10px; border-left: 3px solid var(--teal); background: #f7faf7; color: var(--muted); font-size: 10px; }
.voice-transcript-preview p.assistant { border-color: var(--coral); }
.voice-recording-links { display: flex; gap: 8px; margin-top: 10px; }
.voice-recording-links a { padding: 7px 10px; border: 1px solid var(--line); color: var(--teal-deep); font-size: 9px; font-weight: 800; text-decoration: none; }

.trust-center { margin-top: 4px; }
.trust-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0 13px; }
.trust-metrics article { min-height: 116px; padding: 19px; border-top: 4px solid var(--teal); background: var(--white); box-shadow: 0 8px 22px rgba(26,44,48,.05); }
.trust-metrics article.attention { border-top-color: var(--coral); }
.trust-metrics small { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.trust-metrics strong { display: block; margin: 7px 0 5px; color: var(--navy); font: 600 31px/1 'Fredoka'; }
.trust-metrics span { color: var(--muted); font-size: 9px; }
.trust-board { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; align-items: start; }
.trust-list { display: grid; gap: 9px; max-height: 610px; padding: 0 18px 18px; overflow-y: auto; }
.trust-row { padding: 15px; border: 1px solid var(--line); background: white; }
.trust-row.needs-review { border-left: 4px solid var(--coral); background: #fffaf7; }
.trust-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.trust-row-head div { display: grid; gap: 3px; }
.trust-row-head strong { color: var(--navy); font: 600 15px/1.15 'Fredoka'; }
.trust-row-head small, .trust-row > p, .trust-row blockquote, .moderation-reason { color: var(--muted); font-size: 9px; line-height: 1.55; }
.trust-row-head > span { padding: 5px 8px; border-radius: 999px; background: #edf5ef; color: var(--teal-deep); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.trust-row > p { margin: 11px 0; }
.trust-row blockquote { margin: 8px 0; padding: 9px 10px; border-left: 3px solid var(--teal); background: #f6f8f4; }
.trust-row-meta, .trust-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.trust-row-meta span { padding: 5px 7px; background: var(--paper); color: var(--muted); font-size: 8px; }
.trust-row-actions { margin-top: 11px; }
.trust-row-actions a, .trust-row-actions button { min-height: 34px; padding: 7px 10px; border: 1px solid rgba(31,110,93,.25); background: transparent; color: var(--teal-deep); font-size: 8px; font-weight: 800; text-decoration: none; cursor: pointer; }
.trust-row-actions .danger { border-color: rgba(236,118,93,.34); color: #9b4335; }
.trust-row-actions button:hover, .trust-row-actions a:hover { background: var(--navy); color: white; }

.commerce-section[data-dashboard-view='businesses'] { margin-top: 0; }
.commerce-section .business-list { max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.nova-section[data-dashboard-panel='agents'] { margin-top: 0; }
.assistant-monitor-section[data-dashboard-panel='inbox'] { margin-top: 0; }

@keyframes viewReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .agent-command-deck { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .voice-command { grid-column: 1 / -1; }
  .voice-hero { grid-template-columns: 1fr; }
  .voice-route-visual { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .voice-status-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .human-escalation-layout { grid-template-columns: 1fr; }
  .trust-board { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dashboard-shell { padding-bottom: 78px; }
  .side-rail { height: 72px; padding: 6px 7px; overflow: hidden; }
  .side-rail nav { min-width: 0; flex: 1; gap: 0; justify-content: stretch; }
  .rail-link { flex: 1 1 20%; min-width: 0; padding: 5px 1px; }
  .rail-link span { font-size: 7px; letter-spacing: .02em; }
  .rail-live-dot { top: 2px; right: calc(50% - 18px); }
  .rail-foot { flex: 0 0 34px; margin-left: 2px; }
  .dashboard-main { padding-top: 20px; }
  .human-schedule-fields { grid-template-columns: 1fr; }.human-days { grid-column: auto; }
  .topbar { align-items: flex-start; margin-bottom: 20px; }
  .topbar h1 { font-size: 31px; }
  .view-subtitle { margin-top: 9px; font-size: 11px; }
  .topbar-actions { gap: 8px; }
  .help-shortcut { width: 34px; height: 34px; }
  .view-tabs { margin: 0 0 16px; padding: 5px; }
  .view-tabs button { min-height: 39px; padding: 8px 12px; font-size: 9px; }
  .agent-command-deck { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .agent-command, .voice-command { grid-column: auto; min-height: 108px; padding: 17px; }
  .agent-orbit { width: 48px; height: 48px; }
  .agent-command strong { font-size: 22px; }
  .voice-hero { min-height: auto; }
  .voice-hero-copy { padding: 34px 24px; }
  .voice-hero-copy h2 { font-size: 37px; }
  .voice-route-visual { grid-template-columns: 1fr; gap: 3px; padding: 25px 18px; }
  .voice-route-visual > b { transform: rotate(90deg); }
  .voice-route-visual article { padding: 16px 10px; }
  .voice-status-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .voice-status-grid article { min-height: 135px; padding: 16px; }
  .voice-settings-form { grid-template-columns: 1fr; }
  .voice-settings-form .nova-toggle { grid-column: auto; }
  .voice-history-summary { grid-template-columns: 1fr 1fr 1fr; }
  .trust-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .webchat-settings-form { grid-template-columns: 1fr; }
  .webchat-wide { grid-column: auto; }
}

@media (max-width: 440px) {
  .rail-foot { display: none; }
  .voice-status-grid { grid-template-columns: 1fr; }
  .trust-metrics { grid-template-columns: 1fr; }
}

.readiness-grid,
.social-verification-list { display: grid; gap: 9px; }
.readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.readiness-item { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 12px; font-weight: 700; }
.readiness-item i { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #efe9dc; color: #8c7357; font-style: normal; }
.readiness-item.complete { border-color: rgba(40,133,91,.22); color: #225e45; background: rgba(188,235,207,.16); }
.readiness-item.complete i { background: #c8efda; color: #17583c; }
.social-verification-row { min-height: 58px; padding: 12px 14px; display: grid; grid-template-columns: 90px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.social-verification-row span { font-weight: 800; text-transform: capitalize; }
.social-verification-row small { color: var(--muted); }
.social-verification-row b { color: var(--teal-deep); font-size: 11px; }

@media (max-width: 640px) {
  .readiness-grid { grid-template-columns: 1fr; }
  .social-verification-row { grid-template-columns: 1fr auto; }
  .social-verification-row small { grid-column: 1 / -1; }
}

/* Readable on tablets and phones: no operational text below 12 px. */
@media (max-width: 1180px) {
  .dashboard-main small,
  .dashboard-main p,
  .dashboard-main label,
  .dashboard-main button,
  .dashboard-main input,
  .dashboard-main select,
  .dashboard-main textarea,
  .dashboard-main time { font-size: 12px; }
  .dashboard-main .eyebrow { font-size: 12px; }
  .rail-link span { font-size: 10px; }
}

@media (max-width: 760px) {
  .dashboard-main small,
  .dashboard-main p,
  .dashboard-main label,
  .dashboard-main button,
  .dashboard-main input,
  .dashboard-main select,
  .dashboard-main textarea,
  .dashboard-main time { font-size: 13px; }
  .trust-row-head { align-items: flex-start; }
}
