/* 店长看板样式 */

:root {
  --primary: #a64b2a;
  --primary-light: #f3dfd6;
  --primary-dark: #8a3d22;
  --bg: #f4efe7;
  --surface: #fffdf9;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e7dccd;
  --error: #dc2626;
  --warning: #a14c16;
  --success: #1f7a4f;
  --info: #2563eb;
  --shadow: 0 2px 12px rgba(166, 75, 42, 0.08);
  --shadow-lg: 0 8px 30px rgba(166, 75, 42, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.manager-dashboard {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.manager-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 90px;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Header ===== */
.manager-header {
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.manager-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* ===== Date Picker ===== */
.date-picker {
  display: flex;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.date-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all 0.25s;
  position: relative;
}

.date-tab.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.date-tab:not(.active):hover {
  background: var(--primary-light);
}

/* ===== KPI Grid ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.kpi-card:active {
  transform: scale(0.97);
}

.kpi-card.highlight {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.kpi-card.warning {
  background: #fef3c7;
  border-color: #fcd34d;
}

.kpi-card.danger {
  background: #fee2e2;
  border-color: #fca5a5;
}

.kpi-number {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 2px;
}

.kpi-card.highlight .kpi-number {
  color: white;
}

.kpi-card.warning .kpi-number {
  color: var(--warning);
}

.kpi-card.danger .kpi-number {
  color: var(--error);
}

.kpi-label {
  font-size: 11px;
  color: var(--muted);
}

.kpi-card.highlight .kpi-label {
  color: rgba(255, 255, 255, 0.8);
}

.kpi-card.warning .kpi-label,
.kpi-card.danger .kpi-label {
  color: var(--ink);
}

.kpi-change {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 6px;
}

.kpi-change.up {
  background: #dcfce7;
  color: var(--success);
}

.kpi-change.down {
  background: #fee2e2;
  color: var(--error);
}

.kpi-card.highlight .kpi-change.up {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.kpi-card.highlight .kpi-change.down {
  background: rgba(255, 255, 255, 0.2);
  color: #fca5a5;
}

/* ===== Quick Actions ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--ink);
}

.quick-action-btn:active {
  transform: scale(0.95);
  background: var(--primary-light);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.quick-action-icon.notify {
  background: #dbeafe;
}

.quick-action-icon.report {
  background: #d1fae5;
}

.quick-action-icon.config {
  background: #fef3c7;
}

.quick-action-icon.staff {
  background: #fce7f3;
}

.quick-action-label {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.command-section {
  background: linear-gradient(180deg, #fff7ef 0%, #fffdf9 100%);
}

.command-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
}

.command-summary-card {
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.command-summary-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.command-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  color: var(--ink);
}

.command-summary-card p {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.command-action-list {
  display: grid;
  gap: 10px;
}

.command-action-card {
  display: block;
  padding: 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}

.command-action-card:active {
  transform: scale(0.98);
}

.command-action-card.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.command-action-card strong {
  display: block;
  font-size: 15px;
}

.command-action-card p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.command-action-card.primary p {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Section ===== */
.section {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  border: 1px solid var(--line);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title .title-icon {
  font-size: 18px;
}

.section-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* ===== Trend Mini Chart (CSS) ===== */
.trend-container {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 60px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.trend-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trend-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.7;
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.trend-bar:hover {
  opacity: 1;
}

.trend-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.trend-bar:hover::after {
  opacity: 1;
}

.trend-label {
  font-size: 10px;
  color: var(--muted);
}

.trend-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
}

.trend-summary-label {
  font-size: 12px;
  color: var(--muted);
}

.trend-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== Pie Chart ===== */
.chart-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pie-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0deg 120deg,
    var(--info) 120deg 200deg,
    var(--warning) 200deg 280deg,
    var(--success) 280deg 340deg,
    var(--muted) 340deg 360deg
  );
  position: relative;
  flex-shrink: 0;
}

.pie-chart::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: var(--surface);
  border-radius: 50%;
}

.chart-legend {
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.repair {
  background: var(--primary);
}

.legend-dot.service {
  background: var(--info);
}

.legend-dot.complaint {
  background: var(--warning);
}

.legend-dot.cleaning {
  background: var(--success);
}

.legend-dot.other {
  background: var(--muted);
}

.legend-text {
  flex: 1;
}

.legend-value {
  font-weight: 600;
}

/* ===== Alert Section (Red Warning) ===== */
.alert-section {
  background: var(--surface);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid var(--error);
  animation: alertGlow 3s infinite;
}

@keyframes alertGlow {
  0%, 100% {
    box-shadow: var(--shadow), 0 0 0 0 rgba(220, 38, 38, 0);
  }
  50% {
    box-shadow: var(--shadow), 0 0 20px 0 rgba(220, 38, 38, 0.15);
  }
}

.alert-section-header {
  background: linear-gradient(135deg, var(--error), #b91c1c);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-section-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-count-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.alert-list {
  padding: 12px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.alert-item:last-child {
  margin-bottom: 0;
}

.alert-item:active {
  transform: scale(0.98);
}

.alert-item.danger {
  background: #fee2e2;
}

.alert-item.warning {
  background: #fef3c7;
}

.alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: white;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.alert-content p {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.alert-time {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.call-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--error);
  color: white;
  transition: all 0.2s;
  white-space: nowrap;
}

.call-btn:active {
  transform: scale(0.92);
}

.call-btn:hover {
  background: #b91c1c;
}

/* ===== Task List ===== */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}

.task-item:last-child {
  border-bottom: none;
}

.task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-status-dot.pending {
  background: var(--warning);
}

.task-status-dot.in_progress {
  background: var(--info);
}

.task-status-dot.completed {
  background: var(--success);
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-info p {
  font-size: 12px;
  color: var(--muted);
}

.task-badge {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.task-badge.repair {
  background: #fce7f3;
  color: #be185d;
}

.task-badge.complaint {
  background: #fef3c7;
  color: var(--warning);
}

.task-badge.service {
  background: #dbeafe;
  color: var(--info);
}

.task-badge.cleaning {
  background: #d1fae5;
  color: var(--success);
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  max-width: 430px;
  margin: 0 auto;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  transition: color 0.2s;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 22px;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--error);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--ink);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  max-width: 300px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Notify Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 430px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.modal-textarea:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .action-btn {
  flex: 1;
  padding: 14px;
  font-size: 15px;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(166, 75, 42, 0.3);
}

.action-btn.secondary {
  background: var(--bg);
  color: var(--ink);
}

/* ===== Mini sparkline (CSS) ===== */
.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}

.sparkline-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.5;
}

.sparkline-bar:last-child {
  opacity: 1;
}

/* ===== Empty Text ===== */
.empty-text {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 14px;
}

/* ===== Loading Text ===== */
.loading-text {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== Legacy Styles (for backward compatibility) ===== */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.header-left h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hotel-name {
  font-size: 14px;
  color: var(--muted);
}

.update-time {
  font-size: 13px;
  color: var(--muted);
}

.refresh-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card.pending {
  background: var(--warning-light);
  border-color: var(--warning);
}

.kpi-card.in-progress {
  background: var(--info-light);
  border-color: var(--info);
}

.kpi-card.completed {
  background: var(--success-light);
  border-color: var(--success);
}

.kpi-card.timeout {
  background: var(--error-light);
  border-color: var(--error);
}

.kpi-card.complaint {
  background: #fef3c7;
  border-color: #d97706;
}

.kpi-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
}

.kpi-card.pending .kpi-value {
  color: var(--warning);
}

.kpi-card.in-progress .kpi-value {
  color: var(--info);
}

.kpi-card.completed .kpi-value {
  color: var(--success);
}

.kpi-card.timeout .kpi-value {
  color: var(--error);
}

.kpi-card.complaint .kpi-value {
  color: #d97706;
}

.chart-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.chart-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.type-distribution {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.type-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.type-name {
  width: 80px;
  font-size: 14px;
  flex-shrink: 0;
}

.type-progress {
  flex: 1;
  height: 24px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}

.type-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 12px;
  transition: width 0.3s ease;
}

.type-count {
  width: 40px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.recent-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.recent-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
}

.recent-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recent-type {
  font-size: 12px;
  color: var(--muted);
}

.recent-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.recent-status.pending {
  background: var(--warning-light);
  color: var(--warning);
}

.recent-status.in_progress {
  background: var(--info-light);
  color: var(--info);
}

.recent-status.completed {
  background: var(--success-light);
  color: var(--success);
}

.recent-status.timeout {
  background: var(--error-light);
  color: var(--error);
}

.recent-content {
  font-size: 14px;
  line-height: 1.5;
}

.recent-time {
  font-size: 12px;
  color: var(--muted);
}

/* 响应式 */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 12px;
  }

  .kpi-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .kpi-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.ops-shell {
  max-width: 430px;
}

.ops-eyebrow {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.ops-hero-card,
.ops-note-card,
.ops-list-card,
.ops-trace-card,
.ops-timeout-card,
.ops-field-card,
.ops-switch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.ops-hero-card {
  padding: 16px;
  margin-bottom: 18px;
  display: grid;
  gap: 14px;
}

.ops-hero-card h2 {
  font-size: 22px;
  margin: 6px 0 8px;
}

.ops-hero-card p,
.ops-note-card p,
.ops-field-card span,
.ops-switch-card p,
.ops-list-card p,
.ops-trace-card p,
.ops-trace-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.ops-hero-actions,
.ops-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-action-btn.compact {
  width: auto;
  min-width: 110px;
  padding: 10px 14px;
}

.quick-action-btn.compact.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.ops-chip-button {
  border: none;
  cursor: pointer;
}

.ops-form-grid,
.ops-card-list,
.ops-trace-list,
.ops-timeout-grid {
  display: grid;
  gap: 12px;
}

.ops-field-card,
.ops-switch-card,
.ops-list-card,
.ops-timeout-card,
.ops-note-card,
.ops-trace-card {
  padding: 14px;
}

.ops-switch-card,
.ops-list-card,
.ops-trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-switch-card.slim {
  padding: 12px 0 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ops-field-card input,
.ops-field-card select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.ops-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ops-anomaly-grid,
.ops-anomaly-samples {
  display: grid;
  gap: 12px;
}

.ops-anomaly-card {
  background: linear-gradient(180deg, #fff7ef 0%, #fffdf9 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.ops-anomaly-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ops-anomaly-head h3 {
  margin-top: 8px;
  font-size: 16px;
}

.ops-anomaly-count {
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.ops-anomaly-sample {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.ops-anomaly-sample strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.ops-anomaly-sample p,
.ops-anomaly-empty {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.ops-anomaly-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--line);
}

.ops-status {
  position: sticky;
  bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
}

.ops-status.ok {
  background: rgba(31, 122, 79, 0.95);
}

.ops-status.warn {
  background: rgba(161, 76, 22, 0.96);
}

.ops-list-card.buttonlike {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ops-trace-payload {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f8f4ee;
  color: #5b4637;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.ops-war-card.ok {
  border-color: #b9e1ca;
  background: #f3fbf6;
}

.ops-war-card.warn {
  border-color: #f3c79f;
  background: #fff8f2;
}

.ops-war-card.danger {
  border-color: #efb0b0;
  background: #fff5f5;
}

.ops-war-top {
  margin-bottom: 10px;
}

.ops-war-tone {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.ops-war-tone.ok {
  background: #dff3e8;
  color: var(--success);
}

.ops-war-tone.warn {
  background: #f8e4d6;
  color: var(--warning);
}

.ops-war-tone.danger {
  background: #fde3e3;
  color: var(--error);
}

.ops-war-actions {
  margin-top: 10px;
}

.ops-top-command-bar {
  display: grid;
  gap: 12px;
}

.ops-top-card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ops-top-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: var(--ink);
}

.ops-top-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.ops-top-card.ok {
  background: #f3fbf6;
  border-color: #b9e1ca;
}

.ops-top-card.warn {
  background: #fff8f2;
  border-color: #f3c79f;
}

.ops-top-card.danger {
  background: #fff5f5;
  border-color: #efb0b0;
}

.ops-breakpoint-grid {
  display: grid;
  gap: 12px;
}

.ops-breakpoint-card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ops-breakpoint-card.ok {
  background: #f3fbf6;
  border-color: #b9e1ca;
}

.ops-breakpoint-card.warn {
  background: #fff8f2;
  border-color: #f3c79f;
}

.ops-breakpoint-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  color: #6e4b36;
}

.ops-breakpoint-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: var(--ink);
}

.ops-breakpoint-card p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 380px) {
  .command-summary {
    grid-template-columns: 1fr;
  }
}

/* AI 摘要卡片样式 */
.command-summary-card.ai-summary {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border: 2px solid #b9e3ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.command-summary-card.ai-summary .command-summary-label {
  color: var(--info);
}
