/* ===== VARIABLES ===== */
:root {
  --bg:       #0D0D0D;
  --bg2:      #161616;
  --card:     #1C1C1E;
  --card2:    #242426;
  --border:   #2C2C2E;
  --accent:   #F5C518;
  --accent2:  #E0B010;
  --text:     #FFFFFF;
  --text2:    #AEAEB2;
  --text3:    #636366;
  --green:    #30D158;
  --yellow:   #FFD60A;
  --red:      #FF453A;
  --radius:   16px;
  --radius-sm:8px;
  --shadow:   0 4px 24px rgba(0,0,0,.45);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body.ms-body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== UTILITIES ===== */
.hidden    { display: none !important; }
.ms-hidden { display: none; }
.ms-mt     { margin-top: 20px; }

/* ===== SCREENS ===== */
.ms-screen         { display: none; min-height: 100vh; }
.ms-screen.active  { display: block; }

/* ===== LOGIN ===== */
.ms-login-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.ms-logo-wrap { text-align: center; margin-bottom: 32px; }
.ms-logo      { max-height: 60px; width: auto; }
.ms-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.ms-login-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.ms-login-sub {
  text-align: center;
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* ===== FORMS ===== */
.ms-form { display: flex; flex-direction: column; gap: 16px; }
.ms-field { display: flex; flex-direction: column; gap: 6px; }
.ms-field label { font-size: 0.82rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }
.ms-field input,
.ms-field select,
.ms-input {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 14px 16px;
  width: 100%;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.ms-field input:focus,
.ms-field select:focus,
.ms-input:focus {
  outline: none;
  border-color: var(--accent);
}
.ms-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23AEAEB2' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.ms-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== BUTTONS ===== */
.ms-btn-primary {
  background: var(--accent);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: var(--radius);
  width: 100%;
  transition: background .2s, transform .1s;
  letter-spacing: .2px;
}
.ms-btn-primary:active { transform: scale(.98); background: var(--accent2); }
.ms-btn-secondary {
  background: var(--card2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: var(--radius);
  width: 100%;
  border: 1.5px solid var(--border);
  transition: border-color .2s;
}
.ms-btn-secondary:hover { border-color: var(--accent); }
.ms-btn-sm { padding: 10px 18px; width: auto; font-size: 0.9rem; border-radius: var(--radius-sm); }
.ms-btn-large { padding: 20px 24px; font-size: 1.1rem; }
.ms-btn-logout { color: var(--red); font-size: 0.9rem; padding: 12px 16px; margin-top: auto; text-align: left; }

/* ===== ERROR ===== */
.ms-error {
  background: rgba(255,69,58,.15);
  border: 1px solid rgba(255,69,58,.4);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* ===== TOPBAR ===== */
.ms-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.ms-topbar.sticky { position: sticky; top: 0; z-index: 100; }
.ms-topbar-img  { max-height: 36px; width: auto; }
.ms-topbar-name { font-weight: 700; font-size: 1rem; color: var(--accent); }
.ms-topbar-score {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 999px;
}
#topbar-score-val, #survey-score-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.ms-semaphore-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.ms-semaphore-dot.verde    { background: var(--green); box-shadow: 0 0 8px var(--green); }
.ms-semaphore-dot.amarillo { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.ms-semaphore-dot.rojo     { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ===== PROGRESS ===== */
.ms-progress-wrap {
  padding: 12px 20px 8px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text2);
}
.ms-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.ms-progress-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ===== LIVE DASHBOARD ===== */
.ms-live-dashboard {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.ms-dashboard-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}
.toggle-arrow { transition: transform .3s; display: inline-block; }
.ms-live-dashboard.open .toggle-arrow { transform: rotate(180deg); }
.ms-dashboard-body { display: none; padding: 0 16px 16px; }
.ms-live-dashboard.open .ms-dashboard-body { display: block; }

/* ===== CONTAINER ===== */
.ms-container { max-width: 640px; margin: 0 auto; padding: 16px 16px; }

/* ===== CARDS ===== */
.ms-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.ms-pillar-card { margin-bottom: 12px; }

/* ===== PILLAR ===== */
.ms-pillar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--accent);
}
.ms-pillar-weight {
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 16px;
}
.ms-pillar-avg {
  float: right;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== QUESTION ===== */
.ms-question {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.ms-question:last-child { border-bottom: none; padding-bottom: 4px; }
.ms-q-text {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 14px;
  color: var(--text);
}
.ms-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ms-score-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  accent-color: var(--accent);
}
.ms-score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245,197,24,.4);
}
.ms-score-display {
  width: 44px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.ms-score-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text3);
  margin-bottom: 10px;
}
.ms-obs-toggle {
  font-size: 0.8rem;
  color: var(--text2);
  padding: 4px 0;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}
.ms-obs-wrap { margin-top: 8px; display: none; }
.ms-obs-wrap.open { display: block; }
.ms-obs-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
  resize: none;
  font-family: inherit;
  min-height: 60px;
}
.ms-obs-input:focus { outline: none; border-color: var(--accent); }
.ms-photo-btn {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text2);
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
}
.ms-photo-preview { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; margin-top: 8px; }

/* ===== NPS ===== */
.ms-nps-section { margin-top: 8px; }
.ms-nps-question { color: var(--text2); font-size: 0.95rem; margin-bottom: 16px; }
.ms-nps-btns { display: flex; gap: 12px; }
.ms-nps-btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card2);
  border: 2px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.ms-nps-btn.selected { border-color: var(--accent); background: rgba(245,197,24,.12); }

/* ===== SUBMIT ===== */
.ms-submit-section { padding-top: 8px; padding-bottom: 40px; }
.ms-submit-note { text-align: center; color: var(--text3); font-size: 0.8rem; margin-top: 10px; }

/* ===== SUMMARY ===== */
.ms-summary-wrap { padding-top: 40px; padding-bottom: 60px; }
.ms-summary-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.ms-semaphore-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.ms-semaphore-circle.verde    { background: rgba(48,209,88,.2); border: 3px solid var(--green); }
.ms-semaphore-circle.amarillo { background: rgba(255,214,10,.2); border: 3px solid var(--yellow); }
.ms-semaphore-circle.rojo     { background: rgba(255,69,58,.2); border: 3px solid var(--red); }
.ms-summary-result { font-size: 1.3rem; font-weight: 700; }
.ms-summary-store  { color: var(--text2); font-size: 0.9rem; }
.ms-summary-date   { color: var(--text3); font-size: 0.82rem; }
.ms-score-big {
  text-align: center;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.ms-score-big span:first-child { font-size: 4rem; font-weight: 800; color: var(--accent); }
.ms-score-max { font-size: 1.5rem; color: var(--text2); font-weight: 400; vertical-align: super; }

/* ===== CHARTS ===== */
.ms-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .ms-charts-grid { grid-template-columns: 1fr; } }
.ms-chart-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}
.ms-chart-card h4 { font-size: 0.82rem; font-weight: 600; color: var(--text2); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .4px; }

/* ===== PILLARS SUMMARY ===== */
.ms-pillars-summary { margin-top: 12px; }
.ms-pillar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--border);
  gap: 10px;
}
.ms-pillar-row-name { font-size: 0.88rem; font-weight: 600; flex: 1; }
.ms-pillar-row-bar-wrap { flex: 2; background: var(--border); border-radius: 3px; height: 6px; overflow: hidden; }
.ms-pillar-row-bar { height: 100%; border-radius: 3px; transition: width .5s ease; }
.ms-pillar-row-score { font-size: 0.95rem; font-weight: 700; color: var(--accent); min-width: 36px; text-align: right; }

/* ===== ADMIN LAYOUT ===== */
.ms-admin-body { overflow: hidden; }
#admin-screen-dashboard.ms-screen.active { display: flex; height: 100vh; overflow: hidden; }

.ms-sidebar {
  width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0 16px;
  flex-shrink: 0;
}
.ms-sidebar-logo { padding: 0 20px 24px; }
.ms-sidebar-img  { max-height: 40px; width: auto; }
.ms-sidebar-brand { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

.ms-sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; flex: 1; }
.ms-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  transition: background .15s, color .15s;
  text-align: left;
}
.ms-nav-item:hover  { background: var(--card); color: var(--text); }
.ms-nav-item.active { background: rgba(245,197,24,.12); color: var(--accent); font-weight: 700; }
.ms-nav-icon { font-size: 1rem; }

.ms-admin-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.ms-hamburger { font-size: 1.4rem; color: var(--text); background: none; border: none; }
.ms-admin-topbar-title { font-weight: 700; font-size: 1rem; }

.ms-admin-main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 32px;
}

.ms-panel { display: none; }
.ms-panel.active { display: block; }
.ms-panel-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }

/* ===== KPI GRID ===== */
.ms-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .ms-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.ms-kpi-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.ms-kpi-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.ms-kpi-label { font-size: 0.78rem; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; }
.kpi-green  { color: var(--green); }
.kpi-yellow { color: var(--yellow); }
.kpi-red    { color: var(--red); }

/* ===== SECTION SUBTITLE ===== */
.ms-section-title    { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.ms-section-subtitle { font-size: 1rem; font-weight: 700; color: var(--text2); margin-bottom: 12px; }

/* ===== VISITS LIST ===== */
.ms-visit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
  gap: 10px;
}
.ms-visit-row:hover { border-color: var(--accent); }
.ms-visit-info { flex: 1; }
.ms-visit-store { font-weight: 700; font-size: 0.95rem; }
.ms-visit-meta  { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.ms-visit-score { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.ms-visit-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.ms-badge-verde    { background: rgba(48,209,88,.15); color: var(--green); }
.ms-badge-amarillo { background: rgba(255,214,10,.15); color: var(--yellow); }
.ms-badge-rojo     { background: rgba(255,69,58,.15); color: var(--red); }
.ms-badge-progress { background: rgba(255,255,255,.1); color: var(--text2); }

/* ===== FILTERS ===== */
.ms-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.ms-select  { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 14px; font-size: 0.9rem; min-width: 160px; }
.ms-input-sm { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 14px; font-size: 0.9rem; }

/* ===== BACK BUTTON ===== */
.ms-back-btn { color: var(--accent); font-size: 0.9rem; font-weight: 600; padding: 0 0 20px; display: block; }

/* ===== VISIT DETAIL ===== */
.ms-detail-header { margin-bottom: 20px; }
.ms-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.ms-detail-meta span { font-size: 0.85rem; color: var(--text2); }
.ms-score-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.ms-score-hero-val { font-size: 3.5rem; font-weight: 800; color: var(--accent); }
.ms-action-plan-section { margin-top: 24px; }
.ms-action-plan-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text2);
  white-space: pre-wrap;
}
.ms-action-plan-content h2 { color: var(--text); font-size: 1rem; margin: 16px 0 8px; }
.ms-action-plan-content h2:first-child { margin-top: 0; }

/* ===== SETTINGS ===== */
.ms-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .ms-settings-grid { grid-template-columns: 1fr; } }
.ms-settings-list { margin-bottom: 16px; }
.ms-settings-form { display: flex; flex-direction: column; gap: 8px; }
.ms-settings-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.ms-settings-item .ms-tag { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--text2); }

/* ===== EMPTY STATE ===== */
.ms-empty-state { text-align: center; padding: 60px 20px; color: var(--text3); font-size: 0.95rem; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .ms-sidebar { display: none; }
  .ms-sidebar.open { display: flex; position: fixed; top: 0; left: 0; height: 100vh; z-index: 200; box-shadow: var(--shadow); }
  .ms-admin-topbar { display: flex; }
  #admin-screen-dashboard.ms-screen.active { flex-direction: column; }
  .ms-admin-main { padding: 20px 16px; }
  .ms-panel-title { font-size: 1.2rem; }
  .ms-filters { flex-direction: column; }
  .ms-select, .ms-input-sm { width: 100%; }
}
@media (max-width: 480px) {
  .ms-kpi-grid { grid-template-columns: 1fr 1fr; }
  .ms-score-hero-val { font-size: 2.5rem; }
}

/* ===== SPINNER ===== */
.ms-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOPBAR STEP ===== */
.ms-topbar-step {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
  background: var(--card);
  padding: 4px 10px;
  border-radius: 999px;
}
.ms-section-sub {
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 24px;
  margin-top: -8px;
}

/* ===== CAMERA ===== */
.ms-camera-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-camera-canvas  { display: none; }
.ms-camera-captured {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-camera-controls {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}
.ms-camera-btn {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .1s;
}
.ms-camera-btn:active { transform: scale(.92); }
.ms-camera-fallback {
  padding-top: 8px;
  display: none;
}

/* ===== LIVE PANEL ===== */
.ms-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.ms-live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text2);
}
.ms-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-red 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
.ms-live-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  min-width: 18px;
  text-align: center;
}
.ms-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.ms-live-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, transform .1s;
}
.ms-live-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ms-live-card-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ms-live-evidence {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.ms-live-evidence-placeholder {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.ms-live-card-info { flex: 1; min-width: 0; }
.ms-live-store     { font-weight: 700; font-size: 0.95rem; }
.ms-live-meta      { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.ms-live-score-col { text-align: right; flex-shrink: 0; }
.ms-live-score     { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.ms-live-sem       { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-top: 4px; display: inline-block; }
.ms-live-progress-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ms-live-progress-bar  { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ms-live-progress-bar > div { height: 100%; border-radius: 3px; transition: width .5s ease; }
.ms-live-progress-label { font-size: 0.75rem; color: var(--text2); flex-shrink: 0; }
.ms-live-pillars { display: flex; flex-direction: column; gap: 6px; }
.ms-live-pillar-row { display: flex; align-items: center; gap: 8px; }
.ms-live-pillar-name { font-size: 0.75rem; color: var(--text2); width: 120px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== EVIDENCE PHOTO IN DETAIL ===== */
.ms-detail-evidence-wrap {
  margin-bottom: 16px;
  display: inline-block;
  position: relative;
}
.ms-detail-evidence {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.ms-detail-evidence-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ===== LIVE PAGE ===== */
.ms-live-body { background: var(--bg); }
.ms-live-loading-screen,
.ms-live-error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  color: var(--text2);
}
.ms-live-error-icon { font-size: 3rem; }
.ms-live-error-screen h2 { font-size: 1.3rem; color: var(--text); }
.ms-spinner-lg {
  width: 40px; height: 40px;
  border-width: 3px;
  margin-bottom: 8px;
}
.ms-live-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.ms-live-logo     { max-height: 38px; width: auto; }
.ms-live-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.ms-live-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,69,58,.12);
  border: 1px solid rgba(255,69,58,.3);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 999px;
}
.ms-live-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg2);
  font-size: 0.85rem;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.ms-live-info-sep { color: var(--text3); }
.ms-live-evidence-full {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}
.ms-live-evidence-caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text3);
  padding: 6px;
  background: var(--bg2);
}
.ms-live-score-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px;
  background: var(--card);
  margin: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.ms-live-score-wrap   { display: flex; align-items: baseline; gap: 6px; }
.ms-live-big-score    { font-size: 4.5rem; font-weight: 900; line-height: 1; }
.ms-live-score-label  { font-size: 1.3rem; color: var(--text2); font-weight: 400; }
.ms-live-semaphore-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ms-live-semaphore-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  border: 3px solid transparent;
}
.ms-live-semaphore-circle.verde    { background: rgba(48,209,88,.15);  border-color: var(--green); }
.ms-live-semaphore-circle.amarillo { background: rgba(255,214,10,.15); border-color: var(--yellow); }
.ms-live-semaphore-circle.rojo     { background: rgba(255,69,58,.15);  border-color: var(--red); }
.ms-live-semaphore-text { font-size: 0.82rem; font-weight: 700; }
.ms-live-section {
  padding: 0 16px;
  margin-bottom: 20px;
}
.ms-live-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}
.ms-live-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text2);
}
.ms-live-progress-bar-full {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ms-live-progress-bar-full > div {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .6s ease;
}
.ms-live-progress-sub { font-size: 0.78rem; color: var(--text3); }
.ms-live-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .ms-live-charts-grid { grid-template-columns: 1fr; } }
.ms-live-completed-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(48,209,88,.1);
  border: 1px solid rgba(48,209,88,.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 16px 20px;
}
.ms-live-completed-icon { font-size: 1.8rem; flex-shrink: 0; }
.ms-live-refresh-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 20px 16px 40px;
  font-size: 0.78rem;
  color: var(--text3);
}
.ms-live-refresh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* ===== SHARE FAB ===== */
.ms-share-fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
  background: var(--accent);
  color: #000;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(245,197,24,.4);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.ms-share-fab:active { transform: scale(.95); }

/* ===== SHARE MODAL ===== */
.ms-share-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ms-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}
.ms-share-modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 24px 40px;
  width: 100%;
  max-width: 520px;
  border-top: 1px solid var(--border);
  animation: slide-up .25s ease;
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.ms-share-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.ms-share-sub   { font-size: 0.88rem; color: var(--text2); margin-bottom: 20px; }
.ms-share-url-wrap { display: flex; gap: 8px; margin-bottom: 8px; }
.ms-share-url-input {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.82rem;
  padding: 10px 12px;
  min-width: 0;
}
.ms-copy-feedback {
  font-size: 0.82rem;
  color: var(--green);
  margin-bottom: 16px;
}
.ms-share-actions { display: flex; gap: 10px; margin-top: 16px; }
.ms-btn-close { flex: 1; }

/* ===== MARKDOWN RENDERING ===== */
.ms-md h2  { color: var(--text); font-size: 0.95rem; margin: 14px 0 6px; }
.ms-md h3  { color: var(--accent); font-size: 0.88rem; margin: 10px 0 4px; }
.ms-md ul  { padding-left: 18px; margin: 6px 0; }
.ms-md li  { margin-bottom: 4px; color: var(--text2); }
.ms-md p   { color: var(--text2); margin-bottom: 8px; }
.ms-md strong { color: var(--text); }


/* ===== AJUSTES FOOCUS (Revesderecho) ===== */
/* 2) Títulos corporativos en amarillo (antes heredaban un azul oscuro del tema) */
.ms-section-title,
.ms-login-title,
.ms-panel-title,
.ms-section-subtitle { color: var(--accent) !important; }

/* 0) Fix alineación vertical: el tema fuerza height:40px y recorta el texto */
.ms-field select { height: auto !important; min-height: 52px; line-height: 1.4; }

/* 1) Texto centrado en el selector de Campaña */
#f-campaign { text-align: center; text-align-last: center; }
#f-campaign option { text-align: center; }

/* 4) Galería "Respaldo Multimedia" en el panel de clientes */
.ms-media-section { margin-top: 24px; }
.ms-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.ms-media-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card);
  text-decoration: none;
  display: block;
}
.ms-media-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ms-media-item span { display: block; font-size: .72rem; color: var(--text2); padding: 6px 8px; line-height: 1.3; }
.ms-media-empty { color: var(--text3); font-size: .88rem; margin-top: 8px; }


/* ===== AJUSTES FOOCUS v1.1.2 ===== */
/* (config) Títulos de tarjetas en dorado: antes heredaban un azul oscuro del tema */
.ms-card h3,
.ms-card h2,
.ms-card h4 { color: var(--accent) !important; }

/* (config) Fila de tienda/usuario: acciones a la derecha + botón eliminar */
.ms-settings-item-actions { display: flex; align-items: center; gap: 8px; }
.ms-store-del,
.ms-visit-del {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.ms-store-del:hover,
.ms-visit-del:hover { color: var(--red); background: rgba(255,69,58,.12); }
.ms-store-del:disabled,
.ms-visit-del:disabled { opacity: .5; cursor: default; }

/* (evaluaciones) Botón eliminar dentro de la fila de evaluación */
.ms-visit-del { margin-left: 8px; flex-shrink: 0; }

/* (multimedia) Referencia del punto evaluado bajo cada foto */
.ms-media-ref strong { color: var(--accent); font-weight: 700; }
.ms-media-ref { line-height: 1.35; }

/* (comentarios) Sección de comentarios adicionales */
.ms-comments-section { margin-top: 24px; }
.ms-comments-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ms-comment-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.ms-comment-ref { font-size: .8rem; color: var(--text2); margin-bottom: 4px; }
.ms-comment-ref strong { color: var(--accent); }
.ms-comment-text { font-size: .9rem; color: var(--text); line-height: 1.45; white-space: pre-wrap; }
