/* Automan.CP UI mocks — mirrors app pages with sample data */

.app-mock-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: var(--shadow), 0 16px 40px rgba(15,23,42,.06);
}
.app-mock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.app-mock-bar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-mock-dots { display: flex; gap: 5px; }
.app-mock-dots span { width: 8px; height: 8px; border-radius: 50%; }
.app-mock-dots span:nth-child(1) { background: #fca5a5; }
.app-mock-dots span:nth-child(2) { background: #fcd34d; }
.app-mock-dots span:nth-child(3) { background: #86efac; }
.app-mock-route {
  display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-mock-route img { height: 13px; }
.app-mock-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--indigo);
  white-space: nowrap;
}
.app-mock-body {
  padding: 16px; background: #f3f4f6; font-size: 12px; color: var(--text);
}

.am-page-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text);
}

/* KPI cards (dashboard stats) */
.am-kpi-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px;
}
.am-kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: flex; align-items: flex-start; gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.am-kpi-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; color: #fff; flex-shrink: 0;
}
.am-kpi-icon.blue { background: #2563eb; }
.am-kpi-icon.indigo { background: #4f46e5; }
.am-kpi-icon.teal { background: #0d9488; }
.am-kpi-icon.orange { background: #ea580c; }
.am-kpi-icon.purple { background: #7c3aed; }
.am-kpi-val { font-size: 18px; font-weight: 900; line-height: 1.1; }
.am-kpi-lbl { font-size: 9px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* App cards */
.am-card-mock {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.03); margin-bottom: 12px; overflow: hidden;
}
.am-card-mock-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.am-card-mock-head i { font-size: 20px; }
.am-card-mock-head.purple i { color: #7c3aed; }
.am-card-mock-head.amber i { color: #f57f17; }
.am-card-mock-head h4 { font-size: 13px; font-weight: 700; flex: 1; }
.am-card-mock-body { padding: 14px; }

/* PM stat strip */
.am-stat-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px;
}
.am-stat {
  text-align: center; padding: 8px 4px; background: var(--soft); border-radius: 8px;
  border: 1px solid var(--line);
}
.am-stat b { display: block; font-size: 16px; font-weight: 800; }
.am-stat span { font-size: 9px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.am-stat.ok b { color: var(--green); }
.am-stat.warn b { color: #f57f17; }
.am-stat.bad b { color: #c62828; }

/* Mini bar chart */
.am-bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; padding-top: 4px; }
.am-bar {
  flex: 1; border-radius: 4px 4px 0 0; min-height: 8px;
  background: linear-gradient(180deg, #3f51b5, #1a237e);
}
.am-bar.light { background: #e8eaf6; }
.am-bar.warn { background: linear-gradient(180deg, #ffb74d, #f57f17); }
.am-bar.bad { background: linear-gradient(180deg, #ef5350, #c62828); }

/* DRR summary */
.am-summary-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px;
}
.am-summary {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  text-align: center;
}
.am-summary b { font-size: 20px; font-weight: 800; display: block; }
.am-summary span { font-size: 10px; color: var(--muted); font-weight: 600; }
.am-summary.open b { color: #c62828; }
.am-summary.closed b { color: var(--green); }
.am-summary.reopen b { color: #f57f17; }

/* Tables */
.am-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.am-table-mock { width: 100%; min-width: 320px; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.am-table-mock th {
  text-align: left; padding: 8px 10px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: var(--soft); border-bottom: 2px solid var(--line);
}
.am-table-mock td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.am-table-mock tr:last-child td { border-bottom: none; }
.am-table-mock tr:nth-child(even) { background: rgba(0,0,0,.015); }

.am-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff;
}
.am-chip.open { background: #c62828; }
.am-chip.closed { background: var(--green); }
.am-chip.progress { background: #f57f17; }
.am-chip.running { background: #4caf50; }
.am-chip.offline { background: #9e9e9e; }
.am-chip.pm-ok { background: var(--green); }
.am-chip.pm-due { background: #f57f17; }
.am-chip.pm-over { background: #c62828; }
.am-chip.l1 { background: #e3f2fd; color: #1565c0; }
.am-chip.l2 { background: #e8f5e9; color: #2e7d32; }
.am-chip.l3 { background: #fff3e0; color: #ef6c00; }
.am-chip.l4 { background: #f3e5f5; color: #7b1fa2; }
.am-chip.gap { background: #ffebee; color: #c62828; }

.am-search {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px;
  color: var(--muted); font-size: 12px;
}

/* Runtime / machine tiles */
.am-tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.am-runtime-tile {
  background: linear-gradient(180deg, rgba(63,81,181,.06), rgba(63,81,181,.01));
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  border-left: 4px solid #4caf50;
}
.am-runtime-tile.offline { border-left-color: #9e9e9e; }
.am-runtime-head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.am-runtime-title { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.am-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #4caf50;
  animation: amPulse 2s infinite;
}
.am-pulse.off { background: #9e9e9e; animation: none; }
@keyframes amPulse {
  0% { transform: scale(1); opacity: .9; }
  70% { transform: scale(1.8); opacity: .2; }
  100% { transform: scale(1); opacity: 0; }
}
.am-runtime-body { padding: 8px 10px; }
.am-progress {
  height: 6px; background: #e8eaf6; border-radius: 999px; overflow: hidden; margin: 4px 0 8px;
}
.am-progress > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.am-runtime-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 10px; color: var(--muted); }
.am-runtime-meta b { display: block; color: var(--text); font-size: 11px; }

/* PM checklist */
.am-pm-groups { display: grid; gap: 8px; }
.am-pm-group {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.am-pm-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.am-pm-group-head b { font-size: 12px; }
.am-pm-progress { font-size: 10px; color: var(--muted); }
.am-pm-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px solid var(--line); font-size: 11px;
}
.am-pm-item i.ok { color: var(--green); }
.am-pm-item i.pending { color: #f57f17; }

/* Skill matrix */
.am-matrix-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.am-matrix-filters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px;
}
.am-filter {
  padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px;
}
.am-matrix-table { font-size: 10px; }
.am-matrix-table th, .am-matrix-table td { padding: 6px 8px; text-align: center; }
.am-matrix-table th:first-child, .am-matrix-table td:first-child { text-align: left; font-weight: 600; }

/* Chat mock */
.am-chat {
  background: #f4f6fb; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
}
.am-chat-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line);
}
.am-chat-brand { display: flex; align-items: center; gap: 10px; }
.am-chat-brand-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--blue);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.am-chat-brand b { display: block; font-size: 13px; }
.am-chat-brand span { font-size: 10px; color: var(--muted); }
.am-chat-body { padding: 16px; min-height: 220px; }
.am-chat-welcome { text-align: center; padding: 12px 0 16px; }
.am-chat-welcome i { font-size: 28px; color: var(--blue); }
.am-chat-welcome h3 { font-size: 16px; margin: 8px 0 4px; }
.am-chat-welcome p { font-size: 11px; color: var(--muted); }
.am-suggestions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.am-suggestion {
  font-size: 10px; padding: 6px 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; display: inline-flex; align-items: center; gap: 4px;
}
.am-thread { display: flex; flex-direction: column; gap: 10px; }
.am-bubble {
  max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: 11px; line-height: 1.5;
}
.am-bubble.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.am-bubble.ai {
  align-self: flex-start; background: #fff; border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.am-bubble.ai .cite {
  display: inline-block; margin-top: 6px; font-size: 9px; padding: 2px 6px;
  background: var(--blue-soft); color: var(--indigo); border-radius: 4px; font-weight: 600;
}
.am-chat-input {
  display: flex; gap: 8px; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line);
}
.am-chat-input input {
  flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font: inherit; font-size: 12px; background: var(--soft);
}

/* Module showcase layout on marketing pages */
.module-showcase {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start;
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.module-showcase:last-child { border-bottom: none; }
.module-showcase-text h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.module-showcase-text .tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--blue); background: var(--blue-soft);
  padding: 3px 8px; border-radius: 6px; margin-bottom: 12px;
}
.module-showcase-text p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.module-showcase-text ul { list-style: none; }
.module-showcase-text li {
  font-size: 13px; color: var(--muted); padding: 5px 0;
  display: flex; align-items: center; gap: 8px;
}
.module-showcase-text li i { color: var(--blue); font-size: 16px; }

.am-kpi-row-4 { grid-template-columns: repeat(4, 1fr); }
.am-stat-strip-4 { grid-template-columns: repeat(4, 1fr); }

.am-split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.am-split-chart { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }

@media (max-width: 900px) {
  .am-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .am-summary-row, .am-stat-strip, .am-matrix-kpis { grid-template-columns: repeat(2, 1fr); }
  .am-tile-grid { grid-template-columns: 1fr; }
  .module-showcase { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  .module-showcase-text { order: 1; }
  .module-showcase .app-mock-wrap,
  .module-showcase [data-app-mock] { order: 2; }
  .am-matrix-filters { grid-template-columns: 1fr; }
  .am-split-2, .am-split-chart { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .app-mock-wrap { box-shadow: var(--shadow); border-radius: 12px; }
  .app-mock-dots { display: none; }
  .app-mock-bar { padding: 8px 10px; }
  .app-mock-route { font-size: 10px; }
  .app-mock-body { padding: 10px; }
  .module-showcase { padding: 20px 0; gap: 16px; }
  .module-showcase-text h2 { font-size: 18px; }
  .module-showcase-text p { font-size: 13px; margin-bottom: 10px; }
  .module-showcase-text li { font-size: 12px; padding: 4px 0; }
  .app-mock-badge { font-size: 9px; padding: 2px 6px; }
  .am-kpi { padding: 8px; gap: 8px; }
  .am-kpi-val { font-size: 16px; }
  .am-kpi-icon { width: 28px; height: 28px; font-size: 14px; }
  .am-page-title { font-size: 13px; }
  .am-table-mock { min-width: 280px; font-size: 11px; }
  .am-table-mock th, .am-table-mock td { padding: 6px 8px; }
  .am-chip { font-size: 9px; padding: 2px 6px; }
  .am-stat-strip { grid-template-columns: repeat(3, 1fr); }
  .am-summary-row { grid-template-columns: repeat(2, 1fr); }
  .sibling-nav { margin-top: 32px; padding-top: 24px; }
}

@media (max-width: 380px) {
  .am-kpi-row { grid-template-columns: 1fr 1fr; }
  .am-stat-strip { grid-template-columns: repeat(2, 1fr); }
}
