:root {
  --bg: #0f3527;
  --panel: #fff6df;
  --panel-strong: #e5d1ad;
  --border: rgba(76, 55, 37, 0.18);
  --border-strong: rgba(255, 238, 202, 0.32);
  --text: #254231;
  --muted: #736a52;
  --accent: #b7794c;
  --accent-strong: #173c2b;
  --accent-soft: #e9ead4;
  --danger: #9a3324;
  --danger-soft: #f5d2bd;
  --warning: #956538;
  --warning-soft: #f3dfb8;
  --success: #2e6742;
  --success-soft: #dbe8c2;
  --info: #315f4c;
  --info-soft: #d5e1c8;
  --leaf: #6f8f58;
  --leaf-dark: #143d2c;
  --clay: #7b4a35;
  --sand: #d2a46d;
  --cream: #fff0cf;
  --shadow: 0 22px 52px rgba(10, 37, 25, 0.22);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

.decision-intelligence {
  display: grid;
  gap: 16px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.decision-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(177, 205, 129, 0.18), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(210, 164, 109, 0.18), transparent 22%),
    linear-gradient(160deg, #123c2c 0%, #315b3e 45%, #0f2f24 100%);
}

body::before,
body::after {
  display: none;
}

body::before {
  top: 48px;
  right: 64px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0));
}

body::after {
  bottom: 36px;
  left: 32px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0));
}

.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 20px 42px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand-ribbon,
.auth-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.34);
  background: rgba(255, 240, 207, 0.9);
  box-shadow: var(--shadow);
}

.brand-ribbon {
  background: rgba(255, 255, 255, 0.96);
}

.brand-kicker,
.auth-strip-label,
.auth-mode-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.brand-ribbon strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--accent-strong);
}

.auth-strip {
  margin-left: auto;
}

.auth-strip-meta {
  display: grid;
  gap: 2px;
}

.auth-strip-meta strong {
  color: var(--accent-strong);
}

.auth-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.auth-role-pill.admin {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.94), rgba(255, 255, 255, 0.92));
  color: #166534;
  border-color: rgba(34, 197, 94, 0.22);
}

.auth-role-pill.viewer {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(255, 255, 255, 0.92));
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.22);
}

.panel {
  background:
    linear-gradient(145deg, rgba(255, 246, 223, 0.97), rgba(230, 217, 185, 0.92)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 {
  font-size: 24px;
}

p {
  margin: 0;
}

.stats-grid,
.main-grid,
.form-grid,
.jobs-list {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 20px;
}

body:not(.show-advanced-stats) .stats-grid {
  display: none;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stats-grid .stat-card:nth-child(5n + 1) {
  background: linear-gradient(145deg, #dbe8c2, #eef3d8);
  border-color: rgba(111, 143, 88, 0.28);
}

.stats-grid .stat-card:nth-child(5n + 2) {
  background: linear-gradient(145deg, #f1d8b8, #fff0cf);
  border-color: rgba(183, 121, 76, 0.28);
}

.stats-grid .stat-card:nth-child(5n + 3) {
  background: linear-gradient(145deg, #7b4a35, #563728);
  border-color: rgba(255, 240, 207, 0.22);
  color: #fff0cf;
}

.stats-grid .stat-card:nth-child(5n + 4) {
  background: linear-gradient(145deg, #e6d7b8, #bc8f5d);
  border-color: rgba(86, 55, 40, 0.2);
}

.stats-grid .stat-card:nth-child(5n + 5) {
  background: linear-gradient(145deg, #214b36, #143d2c);
  border-color: rgba(255, 240, 207, 0.18);
  color: #fff0cf;
}

.stats-grid .stat-card:nth-child(5n + 3) .stat-label,
.stats-grid .stat-card:nth-child(5n + 3) .stat-hint,
.stats-grid .stat-card:nth-child(5n + 5) .stat-label,
.stats-grid .stat-card:nth-child(5n + 5) .stat-hint {
  color: rgba(255, 240, 207, 0.72);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 30px;
  font-family: Georgia, "Times New Roman", serif;
}

.stat-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.main-grid {
  grid-template-columns: 1.45fr 1fr;
  margin-top: 20px;
}

.panel {
  padding: 22px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #6f8f58 0%, #d2a46d 45%, #7b4a35 100%);
}

.danger-panel {
  background: rgba(255, 255, 255, 0.98);
}

.compact-panel {
  padding-top: 18px;
  padding-bottom: 18px;
}

.quickstart-panel {
  background: rgba(255, 255, 255, 0.98);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.panel-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 13px;
  color: #4e463e;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hidden-panel {
  display: none;
}

.hidden-section {
  display: none !important;
}

.accordion-panel {
  padding: 0;
}

.dropdown-zone {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 10%, rgba(210, 164, 109, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(15, 53, 39, 0.72), rgba(31, 72, 50, 0.54));
  border: 1px solid rgba(255, 240, 207, 0.18);
  box-shadow: var(--shadow);
}

.dropdown-zone-head {
  padding: 4px 4px 8px;
  color: var(--cream);
}

.dropdown-zone-head h2 {
  margin: 0;
  color: #fff6df;
}

.accordion-panel::before {
  display: none;
}

.accordion-summary,
.dropdown-card-summary,
.accordion-card-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.accordion-summary::-webkit-details-marker,
.dropdown-card-summary::-webkit-details-marker,
.accordion-card-summary::-webkit-details-marker {
  display: none;
}

.accordion-summary {
  min-height: 76px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 240, 207, 0.32), transparent 28%),
    linear-gradient(135deg, rgba(33, 75, 54, 0.96), rgba(19, 61, 44, 0.96));
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
}

.accordion-summary::after,
.dropdown-card-summary::after,
.accordion-card-summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
  opacity: 0.78;
}

.accordion-panel[open] > .accordion-summary::after,
.dropdown-card[open] > .dropdown-card-summary::after,
.accordion-card[open] > .accordion-card-summary::after {
  transform: rotate(-135deg);
}

.accordion-summary:hover,
.dropdown-card-summary:hover,
.accordion-card-summary:hover,
button:hover,
.query-chip:hover,
.metric-chip:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 34px rgba(18, 60, 44, 0.22);
}

.accordion-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.accordion-panel > .decision-intelligence,
.accordion-panel > .autonomous-control,
.accordion-panel > .admin-list {
  padding: 22px;
}

.accordion-panel[open] .accordion-content,
.accordion-panel[open] > .decision-intelligence,
.accordion-panel[open] > .autonomous-control,
.accordion-panel[open] > .admin-list {
  animation: dropdownReveal 220ms ease both;
}

.dropdown-card,
.accordion-card {
  border-radius: 18px;
  border: 1px solid rgba(76, 55, 37, 0.16);
  background: rgba(255, 246, 223, 0.78);
  overflow: hidden;
}

.dropdown-card-summary,
.accordion-card-summary {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(219, 232, 194, 0.94), rgba(255, 240, 207, 0.92));
  color: #244732;
  font-weight: 800;
}

.dropdown-card-body,
.accordion-card > .admin-list {
  padding: 16px;
}

.stat-card,
.mail-health-grid .metric-chip,
.metric-chip,
.query-chip,
.admin-list-card,
.monitor-card,
.history-table th,
.history-table td,
.weekly-category-card,
.autonomous-card {
  border-color: rgba(76, 55, 37, 0.16);
}

.scan-reason-box,
.scan-link-box,
input,
textarea,
select {
  background: rgba(255, 246, 223, 0.88);
  border-color: rgba(76, 55, 37, 0.18);
}

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

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(14, 165, 233, 0.9);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #f8fcff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.secondary-button {
  background: linear-gradient(135deg, rgba(255, 237, 213, 1), rgba(254, 249, 195, 1));
  color: #8a3b12;
  border: 1px solid rgba(251, 146, 60, 0.24);
}

.danger-button {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.24);
}

.ghost-button {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(204, 251, 241, 0.92));
  color: #0f5a7e;
  border: 1px solid rgba(96, 165, 250, 0.24);
  padding-inline: 14px;
}

.control-center-panel {
  padding: 0;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(223, 186, 135, 0.35), transparent 24%),
    radial-gradient(circle at 12% 84%, rgba(94, 135, 83, 0.28), transparent 28%),
    linear-gradient(145deg, #7ea489 0%, #3f7458 38%, #153c2c 100%);
  color: #fff8e8;
  box-shadow: 0 28px 70px rgba(20, 58, 39, 0.28);
}

.control-center-panel::before {
  display: none;
}

.control-hero {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 28px;
  padding: clamp(26px, 4vw, 54px);
  overflow: hidden;
}

.control-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.landing-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.16);
  border: 1px solid rgba(255, 248, 232, 0.22);
  color: #f9e6c4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.control-hero h1 {
  margin: 0;
  max-width: 520px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: #fff4d5;
}

.control-hero p {
  max-width: 480px;
  margin-top: 18px;
  color: rgba(255, 248, 232, 0.82);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.75;
}

.control-hero .button-row {
  position: relative;
  z-index: 2;
  justify-content: flex-start;
  align-self: end;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  background: rgba(14, 49, 34, 0.38);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.agent-action-status {
  position: relative;
  z-index: 2;
  grid-column: 2;
  width: 100%;
  margin-top: -10px;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  box-shadow: 0 16px 32px rgba(13, 39, 27, 0.2);
}

.control-hero .agent-action-status.status-success {
  background: rgba(218, 239, 196, 0.95);
  color: #173c2b;
  border-color: rgba(91, 132, 67, 0.45);
}

.control-hero .agent-action-status.status-info {
  background: rgba(226, 240, 230, 0.95);
  color: #173c2b;
  border-color: rgba(49, 95, 76, 0.35);
}

.control-hero .agent-action-status.status-warning {
  background: rgba(255, 232, 180, 0.96);
  color: #5f3817;
  border-color: rgba(149, 101, 56, 0.45);
}

.control-hero .agent-action-status.status-error {
  background: rgba(250, 210, 194, 0.97);
  color: #6f1f16;
  border-color: rgba(154, 51, 36, 0.45);
}

.control-hero .primary-button,
.control-hero .secondary-button,
.control-hero .danger-button {
  min-width: 118px;
  border: 1px solid rgba(255, 248, 232, 0.18);
}

.control-hero .primary-button {
  background: linear-gradient(135deg, #f2d6ac, #fff1d1);
  color: #254b34;
  box-shadow: 0 14px 28px rgba(22, 48, 35, 0.28);
}

.control-hero .secondary-button {
  background: rgba(255, 248, 232, 0.12);
  color: #fff1d1;
}

.control-hero .danger-button {
  background: rgba(122, 51, 35, 0.58);
  color: #ffe6d2;
}

.botanical-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.leaf,
.stem {
  position: absolute;
  display: block;
}

.leaf {
  width: 160px;
  height: 74px;
  border-radius: 100% 0 100% 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.16), transparent 48%),
    linear-gradient(145deg, #bfd19b, #46744d 65%, #22472f);
  box-shadow: 0 24px 42px rgba(19, 43, 30, 0.28);
  transform-origin: center;
}

.leaf::after {
  content: "";
  position: absolute;
  inset: 50% 12px auto 10px;
  height: 1px;
  background: rgba(255, 245, 217, 0.38);
  transform: rotate(-24deg);
}

.leaf-a {
  right: 110px;
  top: 18px;
  transform: rotate(-18deg) scale(1.18);
}

.leaf-b {
  right: 28px;
  top: 106px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.18), transparent 46%),
    linear-gradient(145deg, #d7c3a2, #9b7557 62%, #564130);
  transform: rotate(28deg) scale(1.06);
}

.leaf-c {
  right: 265px;
  top: 145px;
  transform: rotate(43deg) scale(0.9);
  opacity: 0.92;
}

.leaf-d {
  right: 170px;
  bottom: -18px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(145deg, #879c70, #365f45 62%, #183528);
  transform: rotate(-48deg) scale(1.34);
}

.stem {
  width: 2px;
  height: 250px;
  background: linear-gradient(180deg, transparent, rgba(255, 231, 188, 0.42), transparent);
}

.stem-a {
  right: 178px;
  top: 4px;
  transform: rotate(22deg);
}

.stem-b {
  right: 80px;
  top: 52px;
  transform: rotate(-18deg);
}

.agent-control-center {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
  padding: 0 clamp(18px, 3vw, 38px) clamp(22px, 3vw, 42px);
}

.control-card {
  min-height: 138px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  background: rgba(8, 43, 31, 0.42);
  box-shadow: 0 18px 36px rgba(8, 34, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 10px;
  align-items: start;
}

.control-card-ok {
  background: linear-gradient(145deg, rgba(47, 106, 67, 0.92), rgba(22, 63, 44, 0.94));
}

.control-card-working {
  background: linear-gradient(145deg, rgba(188, 122, 50, 0.94), rgba(110, 61, 31, 0.95));
}

.control-card-warning {
  background: linear-gradient(145deg, rgba(185, 138, 58, 0.94), rgba(101, 70, 31, 0.95));
}

.control-card-error {
  background: linear-gradient(145deg, rgba(150, 56, 38, 0.95), rgba(78, 29, 23, 0.96));
}

.control-card-info {
  background: linear-gradient(145deg, rgba(49, 95, 76, 0.94), rgba(23, 60, 43, 0.95));
}

.control-card span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 240, 211, 0.64);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.control-card strong {
  display: block;
  color: #fff1cf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.15;
}

.control-card small {
  display: block;
  margin-top: 9px;
  color: rgba(255, 248, 232, 0.82);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.executive-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 239, 0.94)),
    #ffffff;
}

.executive-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.executive-card {
  min-height: 104px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(77, 107, 83, 0.16);
  background: #f9fbf6;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.executive-card span {
  color: #6a715f;
  font-size: 12px;
  line-height: 1.35;
}

.executive-card strong {
  color: #244732;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.executive-card:nth-child(4n + 1) {
  background: #eef8e8;
}

.executive-card:nth-child(4n + 2) {
  background: #f6ecd9;
}

.executive-card:nth-child(4n + 3) {
  background: #e9f1e0;
}

.executive-card:nth-child(4n + 4) {
  background: #f7efe7;
}

.capture-field .capture-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(236, 253, 245, 0.72));
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.toggle-row input {
  display: none;
}

.toggle-ui {
  width: 72px;
  height: 38px;
  border-radius: 999px;
  background: #bfdbfe;
  position: relative;
  flex: none;
  transition: background 160ms ease;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}

.toggle-row input:checked + .toggle-ui {
  background: linear-gradient(135deg, #14b8a6, #2563eb);
}

.toggle-row input:checked + .toggle-ui .toggle-thumb {
  transform: translateX(-34px);
}

.toggle-text {
  color: #4d443b;
  line-height: 1.7;
}

.capture-status,
.decision-box,
.job-status {
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.7;
  font-size: 14px;
}

.status-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 255, 0.92));
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #284b69;
}

.status-success {
  background: var(--success-soft);
  border-color: rgba(72, 98, 75, 0.24);
  color: var(--success);
}

.status-warning {
  background: var(--warning-soft);
  border-color: rgba(139, 106, 29, 0.24);
  color: var(--warning);
}

.status-error {
  background: var(--danger-soft);
  border-color: rgba(156, 75, 66, 0.24);
  color: var(--danger);
}

.status-info {
  background: var(--info-soft);
  border-color: rgba(111, 86, 165, 0.22);
  color: var(--info);
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.job-status {
  flex: 1;
  min-height: 52px;
}

#dailyScheduleInfo {
  margin-top: 12px;
}

.jobs-list {
  gap: 14px;
}

.scan-history {
  display: grid;
  gap: 14px;
}

.history-table-wrap {
  overflow-x: visible;
  padding-bottom: 6px;
}

.history-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.history-table th,
.history-table td {
  min-width: 0;
  padding: 16px;
  vertical-align: top;
  border: 1px solid rgba(143, 178, 216, 0.34);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.history-table thead th {
  background: linear-gradient(180deg, rgba(233, 244, 255, 0.98), rgba(255, 241, 225, 0.95));
}

.history-label-head,
.history-row-label {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent-strong);
}

.history-label-head {
  z-index: 3;
}

.history-table thead .history-day-column {
  min-width: 0;
}

.history-day-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  color: var(--accent-strong);
}

.history-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.history-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(236, 253, 245, 0.92));
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #24506f;
  font-size: 13px;
}

.history-plan-title {
  font-weight: 700;
  color: var(--accent-strong);
  line-height: 1.5;
}

.history-plan-subtitle,
.history-summary-cell {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.history-chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-metric-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: rgba(255, 255, 255, 0.84);
}

.history-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.history-metric-card strong {
  display: block;
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--accent-strong);
}

.history-cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.history-cell-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(143, 178, 216, 0.22);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.history-asin-box {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.history-table-simple {
  table-layout: fixed;
}

.history-table-simple th,
.history-table-simple td {
  min-width: 0;
}

.history-table-simple .history-label-head,
.history-table-simple .history-row-label {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  background: #f8fafc;
}

.history-table-simple .simple-day-column {
  min-width: 0;
  max-width: none;
  text-align: center;
}

.history-table-simple .simple-day-title {
  font-size: clamp(12px, 1.05vw, 16px);
}

.history-table-simple .simple-row-label {
  vertical-align: top;
  padding-top: 24px;
  font-size: 15px;
}

.simple-history-cell {
  min-height: 170px;
  background: rgba(255, 255, 255, 0.76);
  vertical-align: top;
}

.history-table-simple thead th:nth-child(2),
.history-table-simple tbody td:nth-child(2) {
  background: #fcfdff;
}

.history-table-simple thead th:nth-child(3),
.history-table-simple tbody td:nth-child(3) {
  background: #fbfcfe;
}

.history-table-simple thead th:nth-child(4),
.history-table-simple tbody td:nth-child(4) {
  background: #fcfdff;
}

.history-table-simple thead th:nth-child(5),
.history-table-simple tbody td:nth-child(5) {
  background: #fbfcfe;
}

.history-table-simple thead th:nth-child(6),
.history-table-simple tbody td:nth-child(6) {
  background: #fcfdff;
}

.history-table-simple thead th:nth-child(7),
.history-table-simple tbody td:nth-child(7) {
  background: #fbfcfe;
}

.history-table-simple thead th:nth-child(8),
.history-table-simple tbody td:nth-child(8) {
  background: #fcfdff;
}

.simple-asin-list {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 6px 12px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(10px, 0.78vw, 13px);
  line-height: 1.45;
  color: var(--accent-strong);
  user-select: text;
}

.autonomous-control {
  display: grid;
  gap: 16px;
}

.autonomous-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.autonomous-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 18px;
}

.autonomous-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--accent-strong);
}

.autonomous-card p {
  color: var(--muted);
  line-height: 1.7;
}

.autonomous-hero-card {
  grid-column: 1 / -1;
  background: #ffffff;
}

.autonomous-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.autonomous-status {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.autonomous-status.green {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.94), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #166534;
}

.autonomous-status.yellow {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #9a6700;
}

.autonomous-status.red {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #b42318;
}

.autonomous-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.autonomous-metric-card {
  border-radius: 14px;
  border: 1px solid rgba(143, 178, 216, 0.24);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.autonomous-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.autonomous-metric-card strong {
  display: block;
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--accent-strong);
}

.autonomous-text-list {
  display: grid;
  gap: 10px;
}

.autonomous-text-item {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 178, 216, 0.22);
  padding: 12px 14px;
  color: #35526f;
  line-height: 1.7;
}

.autonomous-chip-list {
  display: grid;
  gap: 10px;
}

.autonomous-chip {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(143, 178, 216, 0.24);
  padding: 12px 14px;
}

.autonomous-chip strong {
  display: block;
  color: var(--accent-strong);
}

.autonomous-chip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.adjustment-log-list {
  display: grid;
  gap: 12px;
}

.adjustment-log-item {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(143, 178, 216, 0.24);
  padding: 14px;
}

.adjustment-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adjustment-log-reason {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.simple-asin-list.asin-columns-1 {
  grid-template-columns: 1fr;
}

.simple-asin-list.asin-columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simple-asin-list.asin-columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.simple-asin-list-all {
  min-height: 280px;
}

.simple-asin-list-approved {
  min-height: 170px;
}

.asin-item {
  display: block;
  padding: 2px 0;
  break-inside: avoid;
  word-break: break-word;
}

.history-copy-button {
  width: 100%;
  justify-content: center;
}

.weekly-summary {
  display: grid;
  gap: 16px;
}

.weekly-summary-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(230, 243, 255, 0.94), rgba(255, 244, 230, 0.92));
  border: 1px solid rgba(96, 165, 250, 0.22);
  color: #36526f;
  line-height: 1.7;
}

.weekly-category-grid {
  display: grid;
  gap: 16px;
}

.weekly-category-card {
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.3);
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
}

.weekly-category-card:nth-child(3n + 1) {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.64), rgba(255, 255, 255, 0.9));
  border-color: rgba(34, 197, 94, 0.24);
}

.weekly-category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.72), rgba(255, 255, 255, 0.9));
  border-color: rgba(59, 130, 246, 0.24);
}

.weekly-category-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.72), rgba(255, 255, 255, 0.9));
  border-color: rgba(249, 115, 22, 0.22);
}

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

.weekly-category-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--accent-strong);
}

.weekly-category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.weekly-table-wrap {
  overflow-x: auto;
}

.weekly-table {
  width: 100%;
  border-collapse: collapse;
}

.weekly-table th,
.weekly-table td {
  padding: 12px 10px;
  border-top: 1px solid rgba(143, 178, 216, 0.26);
  text-align: left;
  vertical-align: top;
}

.weekly-table thead th {
  border-top: 0;
  color: #24506f;
  font-size: 13px;
  font-weight: 600;
}

.weekly-asin {
  font-family: "Consolas", "Courier New", monospace;
  color: var(--accent-strong);
  font-weight: 700;
}

.weekly-title {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.confidence-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.confidence-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
}

.confidence-chip.final {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.92), rgba(255, 255, 255, 0.92));
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.confidence-chip.amazon {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(255, 255, 255, 0.92));
  border-color: rgba(59, 130, 246, 0.22);
  color: #1d4ed8;
}

.confidence-chip.monitor {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(255, 255, 255, 0.92));
  border-color: rgba(245, 158, 11, 0.22);
  color: #9a6700;
}

.confidence-chip.reliability {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.94), rgba(255, 255, 255, 0.92));
  border-color: rgba(139, 92, 246, 0.2);
  color: #6d28d9;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.query-chip,
.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(143, 178, 216, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.query-chip {
  color: #0d5c87;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(204, 251, 241, 0.92));
}

.metric-chip:nth-child(4n + 1) {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.92), rgba(255, 255, 255, 0.9));
  border-color: rgba(34, 197, 94, 0.22);
}

.metric-chip:nth-child(4n + 2) {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(255, 255, 255, 0.9));
  border-color: rgba(59, 130, 246, 0.22);
}

.metric-chip:nth-child(4n + 3) {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(255, 255, 255, 0.9));
  border-color: rgba(245, 158, 11, 0.22);
}

.metric-chip:nth-child(4n + 4) {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.94), rgba(255, 255, 255, 0.9));
  border-color: rgba(244, 63, 94, 0.18);
}

.scan-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-family: Georgia, "Times New Roman", serif;
}

.job-card {
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 255, 0.82));
  padding: 18px;
}

.admin-mail-grid {
  margin-top: 18px;
}

.mail-health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.admin-metric-chip {
  justify-content: space-between;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-card {
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 248, 255, 0.88));
  padding: 18px;
}

.admin-log-card {
  margin-top: 18px;
}

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

.admin-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--accent-strong);
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-list-card {
  border-radius: 16px;
  border: 1px solid rgba(143, 178, 216, 0.24);
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

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

.admin-action-row {
  justify-content: flex-start;
  margin-top: 12px;
}

.inline-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.inline-link-row a {
  color: var(--accent-strong);
  text-decoration: none;
  word-break: break-all;
}

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

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.job-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.job-pill.completed {
  color: var(--success);
  background: var(--success-soft);
}

.job-pill.running {
  color: var(--info);
  background: var(--info-soft);
}

.job-pill.failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.job-pill.waiting {
  color: var(--warning);
  background: var(--warning-soft);
}

.job-pill.queued {
  color: var(--info);
  background: var(--info-soft);
}

.steps {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.step {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 178, 216, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}

.step-label {
  font-weight: 600;
}

.step-detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.screenshot-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--accent-strong);
  text-decoration: none;
}

.muted {
  color: var(--muted);
}

.daily-grid {
  margin-top: 18px;
}

.scan-reason-box,
.scan-link-box {
  border-radius: 14px;
  border: 1px solid rgba(143, 178, 216, 0.26);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 255, 0.86));
  padding: 14px 16px;
  line-height: 1.7;
  min-height: 56px;
}

.asin-output {
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.compact-row {
  justify-content: flex-start;
  margin-top: 4px;
}

.scan-card {
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 250, 255, 0.86));
  padding: 18px;
}

.scan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.scan-reason {
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0;
}

.scan-link-box a {
  color: var(--accent-strong);
  text-decoration: none;
}

.monitor-intelligence,
.today-products {
  display: grid;
  gap: 14px;
}

.monitor-warning {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #9a6700;
  line-height: 1.6;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.monitor-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.monitor-card span,
.monitor-card small {
  display: block;
  color: var(--muted);
}

.monitor-card strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  color: var(--accent-strong);
}

.monitor-card small {
  margin-top: 6px;
  font-size: 12px;
}

.monitor-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.monitor-detail-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

.monitor-detail-card-wide {
  grid-column: 1 / -1;
}

.monitor-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.monitor-detail-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--accent-strong);
}

.monitor-self-test-pill,
.monitor-selector-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.monitor-self-test-pill.pass {
  background: rgba(220, 252, 231, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #166534;
}

.monitor-self-test-pill.partial {
  background: rgba(254, 243, 199, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #9a6700;
}

.monitor-self-test-pill.fail {
  background: rgba(255, 228, 230, 0.96);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #b42318;
}

.monitor-detail-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.monitor-selector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monitor-selector-pill {
  background: rgba(233, 244, 255, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.22);
  color: #24506f;
  font-weight: 600;
}

.monitor-failure-reason {
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.product-card {
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: #ffffff;
  padding: 16px;
}

.product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.product-score {
  margin-top: 10px;
  font-weight: 700;
  color: var(--accent-strong);
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.94), rgba(204, 251, 241, 0.92));
  color: #0f5a7e;
  font-size: 13px;
}

.product-badges .product-badge:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.94), rgba(255, 255, 255, 0.92));
  border-color: rgba(34, 197, 94, 0.2);
  color: #1e5d3a;
}

.product-badges .product-badge:nth-child(3n + 3) {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(255, 255, 255, 0.92));
  border-color: rgba(245, 158, 11, 0.18);
  color: #8a5a06;
}

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

.product-badge.evidence-strong {
  background: #f0fdf4;
  border-color: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.product-badge.evidence-moderate {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

.product-badge.evidence-weak {
  background: #fff7ed;
  border-color: rgba(245, 158, 11, 0.2);
  color: #9a6700;
}

.product-badge.evidence-missing,
.product-badge.evidence-failed {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.similar-listings-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(143, 178, 216, 0.2);
  color: #35526f;
  font-size: 13px;
}

.recovery-quality-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quickstart-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quickstart-step {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(143, 178, 216, 0.24);
  color: #36526f;
  line-height: 1.7;
}

.quickstart-step:nth-child(3n + 1) {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.88), rgba(255, 255, 255, 0.92));
  border-color: rgba(34, 197, 94, 0.22);
}

.quickstart-step:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.92));
  border-color: rgba(59, 130, 246, 0.22);
}

.quickstart-step:nth-child(3n + 3) {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.9), rgba(255, 255, 255, 0.92));
  border-color: rgba(249, 115, 22, 0.2);
}

.legend-item {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
}

.legend-item.success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(72, 98, 75, 0.24);
}

.legend-item.warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(139, 106, 29, 0.24);
}

.legend-item.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(156, 75, 66, 0.24);
}

.legend-item.info {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(111, 86, 165, 0.22);
}

.auth-page {
  overflow-x: hidden;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 22px;
  padding: 28px 20px 36px;
  position: relative;
  z-index: 1;
}

.auth-hero-panel,
.auth-card {
  border: 1px solid rgba(143, 178, 216, 0.36);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.auth-hero-panel {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(255, 255, 255, 0.92) 40%, rgba(249, 115, 22, 0.16) 100%),
    rgba(255, 255, 255, 0.96);
}

.auth-hero-panel h1 {
  max-width: 760px;
}

.auth-hero-panel p {
  max-width: 760px;
  margin-top: 14px;
  color: #36526f;
  font-size: 17px;
  line-height: 1.8;
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.auth-info-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(143, 178, 216, 0.3);
  background: rgba(255, 255, 255, 0.8);
}

.auth-info-card:nth-child(3n + 1) {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.88), rgba(255, 255, 255, 0.92));
}

.auth-info-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.92));
}

.auth-info-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.9), rgba(255, 255, 255, 0.92));
}

.auth-info-card h2 {
  font-size: 22px;
}

.auth-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 255, 0.9));
  align-self: start;
}

.auth-card-head p {
  margin-top: 8px;
  color: #4e6885;
  line-height: 1.7;
}

.auth-admin-setup {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(255, 255, 255, 0.94));
}

.auth-admin-setup p {
  margin-top: 0;
  color: #7a5b00;
  font-size: 14px;
}

.auth-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-token-box {
  border-radius: 16px;
  border: 1px solid rgba(143, 178, 216, 0.28);
  background: rgba(255, 255, 255, 0.84);
  padding: 14px 16px;
  color: #35526f;
  line-height: 1.7;
}

.auth-approve-row {
  justify-content: flex-start;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .control-hero {
    grid-template-columns: 1fr;
    min-height: 420px;
  }

  .control-hero .button-row {
    max-width: 620px;
  }

  .agent-action-status {
    grid-column: 1;
    max-width: 620px;
    margin-top: 0;
  }

  .botanical-scene {
    opacity: 0.62;
  }

  .stats-grid,
  .agent-control-center,
  .executive-dashboard,
  .main-grid,
  .form-grid,
  .quickstart-steps,
  .auth-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid,
  .form-grid,
  .quickstart-steps,
  .auth-info-grid {
    grid-template-columns: 1fr;
  }

  .mail-health-grid,
  .admin-grid,
  .monitor-grid,
  .similar-listings-panel {
    grid-template-columns: 1fr;
  }

  .action-row,
  .panel-head,
  .job-head,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .history-table th,
  .history-table td,
  .history-table thead .history-day-column {
    min-width: 0;
  }

  .history-table-simple .simple-day-column {
    min-width: 0;
    max-width: none;
  }

  .simple-asin-list.asin-columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-label-head,
  .history-row-label {
    min-width: 92px;
    max-width: 92px;
  }

  .autonomous-grid,
  .autonomous-metric-grid {
    grid-template-columns: 1fr;
  }

  .adjustment-log-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: 12px;
  }

  .control-hero {
    min-height: 520px;
    padding: 24px;
  }

  .control-hero h1 {
    font-size: 42px;
  }

  .control-hero .button-row {
    padding: 14px;
  }

  .agent-control-center {
    padding-inline: 14px;
  }

  .auth-shell {
    padding-inline: 14px;
  }

  .auth-card,
  .auth-hero-panel {
    padding: 18px;
  }

  .stats-grid,
  .agent-control-center,
  .executive-dashboard {
    grid-template-columns: 1fr;
  }

  .history-table-wrap {
    overflow-x: auto;
  }

  .history-table {
    width: max-content;
    min-width: 100%;
  }

  .history-table-simple .simple-day-column {
    min-width: 220px;
    max-width: 220px;
  }

  .simple-asin-list.asin-columns-2,
  .simple-asin-list.asin-columns-3 {
    grid-template-columns: 1fr;
  }
}

/* Readability pass: make helper text and small labels clear enough for daily use. */
.stat-hint,
.field-hint,
.metric-label,
.history-meta-pill,
.job-meta,
.step-detail,
.weekly-title,
.product-meta,
.product-queries,
.recovery-quality-row,
.admin-list-card,
.monitor-card small,
.monitor-detail-list,
.monitor-failure-reason,
.autonomous-chip span,
.autonomous-text-item,
.adjustment-log-reason,
.executive-card span,
.control-card span,
.control-card small,
.muted {
  color: #3f4f39;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.stat-label,
.auth-strip-label,
.brand-kicker,
.metric-chip span,
.query-chip,
.job-pill,
.confidence-chip,
.monitor-selector-pill {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stat-value,
.metric-value,
.control-card strong,
.executive-card strong {
  font-weight: 800;
}

.stats-grid .stat-card:nth-child(5n + 3) .stat-hint,
.stats-grid .stat-card:nth-child(5n + 5) .stat-hint,
.stats-grid .stat-card:nth-child(5n + 3) .stat-label,
.stats-grid .stat-card:nth-child(5n + 5) .stat-label {
  color: rgba(255, 240, 207, 0.9);
}

.control-center-panel .control-card span,
.control-center-panel .control-card small,
.control-center-panel .control-card strong,
.control-center-panel .landing-kicker,
.control-center-panel .control-hero p,
.control-center-panel .button-row,
.control-center-panel .secondary-button,
.control-center-panel .danger-button,
.accordion-summary,
.stats-grid .stat-card:nth-child(5n + 3),
.stats-grid .stat-card:nth-child(5n + 5),
.job-card,
.job-card .job-meta,
.job-card .step-detail {
  color: #fff6df;
}

.control-center-panel .control-card span,
.control-center-panel .control-card small,
.control-center-panel .control-hero p,
.stats-grid .stat-card:nth-child(5n + 3) .stat-hint,
.stats-grid .stat-card:nth-child(5n + 5) .stat-hint {
  color: rgba(255, 246, 223, 0.92);
}

.control-center-panel .control-card strong,
.stats-grid .stat-card:nth-child(5n + 3) .stat-value,
.stats-grid .stat-card:nth-child(5n + 5) .stat-value {
  color: #ffffff;
}
