/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* ===== Ecomobi AI Clone — Global styles ===== */

:root {
  /* Palette: indigo/violet trên nền sáng, sạch như bản gốc */
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-muted: #f3f4f8;
  --border: #e6e7ee;
  --text: #1a1c25;
  --text-muted: #6b7080;
  --text-faint: #9aa0b0;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --accent: #7c3aed;

  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --warning: #d97706;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 35, 0.04);
  --shadow-md: 0 8px 28px rgba(20, 22, 35, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 22, 35, 0.12);

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Nền có texture nhẹ cho đỡ phẳng */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 320px at 80% -5%, rgba(124, 58, 237, 0.07), transparent),
    radial-gradient(620px 300px at 10% 0%, rgba(79, 70, 229, 0.06), transparent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: var(--font-body);
}

a {
  color: var(--primary);
  text-decoration: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ===== Layout ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  
  display: grid;
  place-items: center;
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main {
  flex: 1 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.page-title {
  text-align: center;
  font-size: 34px;
  margin-bottom: 30px;
}

.page-title .grad {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.layout-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  grid-gap: 22px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 860px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 26px;
  }
}

/* ===== Card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-sm {
  padding: 5px 11px;
  font-size: 11.5px;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  border-color: #cdd0dd;
  background: var(--surface-muted);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: #fecaca;
}

/* ===== Progress sidebar ===== */
.progress-card {
  padding: 18px;
}
.progress-card h3 {
  font-size: 14px;
  margin-bottom: 14px;
}
.step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: background 0.15s;
}
.step.active {
  background: var(--primary-soft);
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-muted);
  flex-shrink: 0;
}
.step.active .step-num {
  background: var(--primary);
  color: #fff;
}
.step.done .step-num {
  background: var(--success);
  color: #fff;
}
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.step.active .step-label {
  color: var(--text);
}

/* ===== URL input panel ===== */
.panel {
  padding: 24px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.panel-head h2 {
  font-size: 17px;
}
.panel-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.url-index {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  width: 22px;
}
.url-input {
  flex: 1 1;
  padding: 11px 14px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
}
.url-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.add-row {
  width: 100%;
  padding: 11px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  transition: all 0.15s;
}
.add-row:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ===== Select (lang / mode) ===== */
.mini-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Status banner ===== */
.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0;
}
.banner-success {
  background: var(--success-soft);
  color: var(--success);
}
.banner-error {
  background: var(--danger-soft);
  color: var(--danger);
}
.banner-loading {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ===== Spinner ===== */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Video meta header ===== */
.video-head {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.video-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.video-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.video-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  gap: 10px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.stat b {
  color: var(--text);
  font-weight: 700;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  background: var(--surface-muted);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.tab {
  flex: 1 1;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}
.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ===== Score grid ===== */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin: 16px 0;
}
.score-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface);
}
.score-box .score-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.score-box .score-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 6px;
}
.score-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}
.score-bar > div {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ===== Section ===== */
.section {
  margin-bottom: 22px;
}
.section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(var(--primary), var(--accent));
}

/* key-value list */
.kv {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.kv:last-child {
  border-bottom: none;
}
.kv-key {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 150px;
  flex-shrink: 0;
}
.kv-val {
  color: var(--text);
}

/* ===== Table ===== */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th,
.tbl td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.tbl th {
  background: var(--surface-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.tbl tr:nth-child(even) td {
  background: var(--surface-muted);
}

/* good/bad point cells */
.gp {
  color: var(--success);
}
.bp {
  color: var(--danger);
}

/* transcript line */
.tx-line {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.tx-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding-top: 2px;
}
.tx-body {
  font-size: 13px;
}
.tx-note {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* badge */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

/* empty state */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}

/* fade-in animation */
.fade-in {
  animation: fade 0.35s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* recommendation card */
.rec {
  border-left: 3px solid var(--primary);
  background: var(--surface-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.rec-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}
.rec-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Result list (compact rows, expand inline) ===== */
.panel-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.result-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.result-row {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 20px;
  transition: background 0.15s;
}
.result-row.is-expanded {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.result-row.is-failed {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
}
.result-error-msg {
  margin-top: 8px;
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
  word-break: break-word;
}
.failed-count {
  color: var(--danger);
  font-weight: 500;
}
.result-row-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.result-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 140px;
  border-radius: var(--radius-sm);
  background-color: rgba(20, 22, 35, 0.06);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}
.result-thumb-icon {
  color: rgba(20, 22, 35, 0.25);
}
.result-thumb-dur {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 4px;
}
.result-row-body {
  flex: 1 1;
  min-width: 0;
}
.result-caption {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.result-meta-creator {
  font-weight: 500;
  color: var(--text);
}
.result-meta-sep {
  color: var(--text-faint);
}
.result-meta-link {
  color: var(--primary);
  text-decoration: none;
}
.result-meta-link:hover {
  text-decoration: underline;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px 28px;
  gap: 10px 28px;
  margin-top: 14px;
}
.result-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.result-stat b {
  color: var(--text);
  font-weight: 500;
  margin-right: 2px;
}
.result-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}
.result-row-detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===== History popover ===== */
.history-wrap {
  position: relative;
}
.history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.history-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 420px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.history-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.history-error {
  color: var(--danger);
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.history-row:hover,
.history-row.is-active {
  background: var(--surface-muted);
}
.history-row-main {
  flex: 1 1;
  min-width: 0;
}
.history-row-time {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.history-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.history-badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.history-badge-partial {
  background: #fef3c7;
  color: var(--warning);
}
.history-badge-failed {
  background: var(--danger-soft);
  color: var(--danger);
}
.history-del {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.history-del:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.history-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 6px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.history-tab {
  flex: 1 1;
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}
.history-tab:hover {
  background: var(--surface-muted);
}
.history-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}
.history-kind-tag {
  font-size: 12px;
  font-weight: 400;
  color: var(--primary);
}
a.history-row {
  text-decoration: none;
  color: inherit;
}

/* ===== Framework 20 tiêu chí Pass/Fail ===== */
.fw-section { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.fw-total { font-weight: 400; color: var(--text-muted); font-size: 14px; }

.fw-verdict {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid; border-radius: 10px;
  background: var(--surface-muted);
}
.fw-verdict-pill {
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0.5px;
}
.fw-verdict-score { font-weight: 700; font-size: 18px; }
.fw-hook-kill {
  color: #A82F3A; font-weight: 700; font-size: 13px;
  padding: 3px 9px; border: 1px solid #A82F3A; border-radius: 6px;
  background: rgba(168, 47, 58, 0.08);
}
.fw-verdict-reason { flex-basis: 100%; font-size: 13px; color: var(--text-muted); }

.fw-mod-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-gap: 10px;
  gap: 10px;
}
@media (max-width: 900px) { .fw-mod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .fw-mod-grid { grid-template-columns: repeat(2, 1fr); } }

.fw-mod {
  padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); display: flex; flex-direction: column; gap: 4px;
}
.fw-mod-head { display: flex; align-items: baseline; gap: 6px; }
.fw-mod-code { font-weight: 700; font-size: 12px; color: var(--text-muted); }
.fw-mod-name { font-size: 12px; color: var(--text); }
.fw-mod-score { font-weight: 700; font-size: 20px; line-height: 1.1; margin-top: 2px; }
.fw-mod-max { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.fw-mod-pass { font-size: 11px; color: var(--text-muted); }
.fw-mod-bar {
  height: 4px; border-radius: 2px; background: var(--surface-muted);
  overflow: hidden; margin-top: 4px;
}
.fw-mod-bar i { display: block; height: 100%; transition: width 0.3s ease; }

.fw-weak-box {
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(168, 47, 58, 0.04);
}
.fw-weak-h { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #A82F3A; }
.fw-weak-list { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.6; }

.fw-pillars { display: flex; flex-direction: column; gap: 8px; }
.fw-pillar {
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  overflow: hidden;
}
.fw-pillar-sum {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; list-style: none;
}
.fw-pillar-sum::-webkit-details-marker { display: none; }
.fw-pillar-code { font-weight: 700; color: var(--text-muted); min-width: 28px; }
.fw-pillar-name { flex: 1 1; font-weight: 600; }
.fw-pillar-rate { font-weight: 600; font-size: 13px; }
.fw-pillar-score { font-size: 12px; color: var(--text-muted); }
.fw-pillar-caret { transition: transform 0.2s; color: var(--text-muted); }
.fw-pillar[open] .fw-pillar-caret { transform: rotate(180deg); }

.fw-criteria {
  margin: 0; padding: 0 14px 12px 14px; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.fw-crit {
  padding: 10px 12px; border-left: 3px solid; border-radius: 4px;
  background: var(--surface-muted);
}
.fw-crit.is-pass { border-color: #0E6E4E; }
.fw-crit.is-fail { border-color: #A82F3A; }
.fw-crit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fw-crit-badge {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  color: #fff;
}
.fw-crit.is-pass .fw-crit-badge { background: #0E6E4E; }
.fw-crit.is-fail .fw-crit-badge { background: #A82F3A; }
.fw-crit-id { font-weight: 700; font-size: 12px; color: var(--text-muted); }
.fw-crit-name { font-size: 13px; }
.fw-crit-evi, .fw-crit-reason {
  font-size: 12px; line-height: 1.5; color: var(--text-muted); margin-top: 4px;
}

/* ===== Framework v2 — tier distribution + markers + Excel styling ===== */

.fw-tier-dist {
  padding: 10px 14px; background: var(--surface-muted);
  border-radius: 8px; display: flex; flex-direction: column; gap: 6px;
}
.fw-tier-labels {
  display: flex; gap: 14px; font-size: 13px; align-items: center;
}
.fw-tier-total { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.fw-tier-bar {
  height: 8px; border-radius: 4px; background: var(--surface);
  overflow: hidden; display: flex;
}
.fw-tier-bar i { display: block; height: 100%; }

.fw-opp-box {
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(14, 110, 78, 0.04);
}
.fw-opp-h { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #0E6E4E; }

.fw-markers-box {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
}
.fw-markers-h { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.fw-markers-count {
  font-weight: 700; color: #0E6E4E; margin-left: 6px;
}
.fw-markers-note {
  font-weight: 400; font-size: 11px; color: var(--text-muted);
}
.fw-markers-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 8px; gap: 8px;
}
@media (max-width: 700px) { .fw-markers-grid { grid-template-columns: repeat(2, 1fr); } }
.fw-marker {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px;
}
.fw-marker.is-on {
  background: rgba(14, 110, 78, 0.08); border-color: #0E6E4E; color: #0E6E4E;
  font-weight: 600;
}
.fw-marker.is-off { color: var(--text-muted); }
.fw-marker-dot { font-size: 14px; line-height: 1; }

.fw-pillar-total { color: var(--text-muted); font-weight: 400; }

.fw-crit.is-excel {
  border-color: #0E6E4E; background: rgba(14, 110, 78, 0.06);
}
.fw-crit.is-excel .fw-crit-badge { background: #0E6E4E; }
.fw-crit.is-pass { border-color: #A9791A; background: rgba(169, 121, 26, 0.04); }
.fw-crit.is-pass .fw-crit-badge { background: #A9791A; }
.fw-crit.is-fail { border-color: #A82F3A; background: rgba(168, 47, 58, 0.06); }
.fw-crit.is-fail .fw-crit-badge { background: #A82F3A; }

.fw-crit-score {
  margin-left: auto; font-weight: 700; font-size: 13px; color: var(--text-muted);
}

