:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #202924;
  background: #f5f7f6;
  font-synthesis: none;
  --green: #287457;
  --muted: #7b8680;
  --border: #e5eae7;
  --shadow: 0 3px 12px #253d3003;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8bd7b0;
  outline-offset: 3px;
}
a {
  color: var(--green);
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: white;
  color: #202924;
  padding: 12px 13px;
  outline: none;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #519b79;
  box-shadow: 0 0 0 3px #28745712;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input::placeholder,
textarea::placeholder {
  color: #a3aca6;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 23px 0 0;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 9px;
}
label small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 0;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.8;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
  margin-bottom: 0;
}
.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #818f86;
  margin-bottom: 16px;
}
.primary {
  background: var(--green);
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  transition: background 0.15s;
}
.primary:hover {
  background: #205e46;
}
.secondary {
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 7px;
  background: white;
}
.full {
  width: 100%;
  margin-top: 26px;
  justify-content: space-between;
}
.text-button {
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
  padding: 8px 0;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  height: 32px;
  width: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 19px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  background: #152b23;
  color: #c2cec6;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 34px 18px 22px;
  z-index: 5;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand {
  color: white;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 13px 38px;
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 650;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -4px;
  padding-right: 3px;
}
.brand-mark.small {
  width: 36px;
  height: 38px;
  font-size: 29px;
  border-radius: 9px;
  background: #c8e9ba;
  color: #1a3928;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 3.5px;
  color: #98ad9e;
  margin-top: 2px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #82988b;
  padding-left: 15px;
  margin: 0 0 12px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  padding: 13px 14px;
  border-radius: 8px;
  gap: 12px;
  font-size: 13px;
  margin: 4px 0;
}
.nav-item:hover {
  background: #ffffff08;
  color: white;
}
.nav-item.selected {
  background: #ffffff0e;
  color: #e0f2d6;
}
.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 20px;
  line-height: 20px;
  color: #91a99b;
}
.selected .nav-icon {
  color: #c6e4b6;
}
.nav-count {
  margin-left: auto;
  background: #ffffff12;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 65px;
}
.architecture {
  font-size: 11px;
  padding: 16px 14px;
  border: 1px solid #ffffff0f;
  border-radius: 10px;
  margin: 0 4px 24px;
  color: #c6d4c9;
}
.architecture p {
  font-size: 10px;
  color: #82998c;
  margin: 8px 0 0 14px;
  line-height: 1.9;
}
.live-dot {
  height: 5px;
  width: 5px;
  display: inline-block;
  border-radius: 50%;
  background: #99cc8f;
  margin-right: 4px;
}
.muted-nav {
  color: #8d9e93;
}
.workspace {
  margin-left: 224px;
  width: calc(100% - 224px);
  min-width: 0;
}
.topbar {
  height: 76px;
  background: #ffffffcc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.breadcrumb {
  font-size: 12px;
  color: #9aa39d;
  display: flex;
  gap: 15px;
}
.breadcrumb strong {
  font-weight: 500;
  color: #526258;
}
.top-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.sync-state {
  font-size: 11px;
  color: #91a096;
}
.avatar {
  background: #eef2ef;
  color: #5b6d61;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 38px 40px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 30px;
}
.page-heading .muted {
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat > span {
  font-size: 12px;
  color: #75847a;
}
.stat strong {
  display: block;
  font-size: 35px;
  font-weight: 550;
  letter-spacing: -1.5px;
  margin: 15px 0 10px;
}
.stat small {
  font-size: 10px;
  color: #9aa69e;
}
.accent-stat {
  background: #edf4ee;
  border-color: #d8e7db;
}
.accent-stat strong {
  color: var(--green);
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.quick-start .eyebrow {
  margin-bottom: 14px;
}
.quick-start h2 {
  font-size: 22px;
  margin-bottom: 10px;
}
.quick-start .muted {
  font-size: 12px;
}
.steps {
  margin-top: 22px;
}
.steps > div {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid #f0f3f1;
}
.steps b {
  font-size: 11px;
  color: #8e9e92;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.steps span {
  font-size: 12px;
}
.steps small {
  display: block;
  font-size: 10px;
  color: #8e9a92;
  margin-top: 4px;
}
.steps button {
  margin-left: auto;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  padding: 5px 8px;
  white-space: nowrap;
  line-height: 1.2;
}
.green {
  background: #edf5ee;
  color: #328359;
}
.neutral {
  background: #f0f3f1;
  color: #7a887f;
}
.amber {
  background: #fff3dc;
  color: #a57419;
}
.red {
  background: #fff0ed;
  color: #ba5640;
}
.blue {
  background: #eaf2fc;
  color: #427bb4;
}
.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f3f1;
  font-size: 12px;
}
.connection-row b {
  font-weight: 500;
  color: #718076;
  max-width: 60%;
  overflow-wrap: anywhere;
}
.info-note {
  font-size: 11px;
  color: #829087;
  background: #f7f9f7;
  padding: 13px 15px;
  line-height: 1.8;
  border-radius: 8px;
  margin-top: 20px;
}
.model-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 9px;
}
.model-icon {
  background: #ecf2e9;
  color: #5a8a56;
  border-radius: 9px;
  padding: 10px;
  font-size: 22px;
}
.model-card b {
  font-size: 12px;
  font-weight: 600;
}
.model-card small {
  display: block;
  font-size: 10px;
  color: #8e9a91;
  margin-top: 4px;
}
.model-card .badge {
  margin-left: auto;
}
.empty {
  padding: 54px 20px;
  text-align: center;
  color: #8e9c93;
  font-size: 13px;
}
.empty strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #64756a;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  margin: 6px 0 0;
}
.compact {
  padding: 35px 12px;
}
.count-pill {
  display: inline-block;
  background: #eff3f0;
  padding: 3px 7px;
  font-size: 10px;
  color: #86978c;
  border-radius: 4px;
  margin-left: 7px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  color: #89968e;
  background: #fafbfa;
  font-size: 10px;
  font-weight: 500;
  padding: 12px 13px;
  border-block: 1px solid #eff2f0;
}
td {
  padding: 17px 13px;
  border-bottom: 1px solid #edf1ee;
  line-height: 1.5;
}
td small {
  display: block;
  color: #9ba49e;
  font-size: 10px;
  margin-top: 4px;
}
td .text-button + button {
  margin-left: 13px;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
}
.email {
  font-weight: 550;
  color: #43564a;
}
.form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-grid > .panel {
  padding: 30px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  gap: 10px;
  color: #6f7d74;
}
.checkbox input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 4px;
  accent-color: var(--green);
}
.form-error {
  color: #ba5640;
  font-size: 12px;
  margin: 12px 0 0;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
.generate-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
  align-items: stretch;
}
.generate-grid label:first-child {
  margin-top: 0;
}
.parameter-strip {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}
.parameter-strip span {
  font-size: 10px;
  color: #76877b;
  border: 1px solid #e6ece7;
  border-radius: 5px;
  padding: 5px 7px;
}
.result-panel {
  min-height: 550px;
  display: flex;
  flex-direction: column;
}
.result-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #f5f8f4, white 75%);
  padding: 45px 20px;
  color: #8b988f;
}
.result-placeholder h3 {
  font-weight: 500;
  font-size: 14px;
  color: #667c6c;
  margin-bottom: 7px;
}
.result-placeholder p {
  font-size: 12px;
}
.placeholder-symbol {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  border: 1px solid #e4ebe3;
  background: #f1f6ee;
  font-size: 40px;
  color: #8eb087;
  margin-bottom: 26px;
}
.result-image {
  display: block;
  max-height: 500px;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 10px;
  object-fit: contain;
}
.result-info {
  font-size: 12px;
  color: #7b887f;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.search-label {
  margin: 0;
}
.search-label input,
.search-label select {
  margin: 0;
  max-width: 230px;
  font-size: 12px;
  padding: 9px 11px;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-note ol {
  padding: 0 0 0 22px;
  margin: 26px 0 0;
  color: #4d6657;
}
.settings-note li {
  padding: 0 0 17px 8px;
  font-size: 12px;
}
.settings-note p {
  font-size: 12px;
  color: #89978d;
  margin: 8px 0 0;
}
.event-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.event-list li {
  border-left: 1px solid #d9e6dc;
  padding: 0 0 18px 16px;
  font-size: 12px;
  line-height: 1.7;
  position: relative;
  color: #64776b;
}
.event-list li:before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: #85ab92;
  border-radius: 50%;
  left: -3px;
  top: 6px;
}
.event-list time {
  display: block;
  color: #98a39c;
  font-size: 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #f6f8f6;
  padding: 18px;
  border-radius: 9px;
  margin: 20px 0;
}
.detail-grid dt {
  color: #91a095;
  font-size: 11px;
}
.detail-grid dd {
  margin: 7px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 12px;
  line-height: 1.7;
}
.notice.error {
  background: #fff1ed;
  color: #b95842;
  border: 1px solid #f3d9d1;
}
footer {
  margin-top: 42px;
  padding: 23px 0;
  border-top: 1px solid var(--border);
  color: #9eaaa2;
  font-size: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 20% 20%, #e5efe3, transparent 60%), #f5f7f4;
}
.auth-card {
  width: min(430px, calc(100% - 36px));
  background: white;
  padding: 38px;
  border: 1px solid #e2e9e1;
  border-radius: 20px;
  box-shadow: 0 20px 65px #233b2810;
}
.auth-card .brand-mark {
  margin-bottom: 30px;
}
.auth-card h1 {
  font-size: 28px;
}
.auth-card .muted {
  font-size: 13px;
}
.auth-card .fine {
  margin: 20px 0 0;
  font-size: 10px;
}
.auth-card .eyebrow {
  font-size: 10px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 15px;
  width: min(620px, calc(100% - 32px));
  padding: 27px;
  color: #2b3c30;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 30px 100px #0002;
}
dialog::backdrop {
  background: #112d2466;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #234732;
  color: #e9f5e8;
  box-shadow: 0 4px 30px #0002;
  padding: 13px 23px;
  border-radius: 10px;
  font-size: 12px;
  max-width: 90vw;
  line-height: 1.6;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  main {
    padding-top: 50px;
  }
  .stats {
    gap: 24px;
  }
  .stat {
    padding: 26px;
  }
  .overview-grid {
    gap: 28px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  main {
    padding: 28px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .stat small {
    line-height: 1.8;
    display: block;
  }
  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .panel {
    padding: 20px;
  }
  .generate-grid {
    grid-template-columns: 330px 1fr;
    gap: 16px;
  }
  .form-grid {
    gap: 16px;
  }
  .form-grid > .panel {
    padding: 22px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 72px;
    padding: 25px 10px 16px;
  }
  .brand {
    padding: 0 8px 25px;
  }
  .brand > span:last-child,
  .nav-label,
  .nav-count,
  .architecture {
    display: none;
  }
  .nav-item {
    font-size: 0;
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  .nav-icon {
    font-size: 23px;
  }
  .workspace {
    margin-left: 72px;
    width: calc(100% - 72px);
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .overview-grid,
  .form-grid,
  .generate-grid {
    grid-template-columns: 1fr;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .badge {
    display: none;
  }
  .topbar {
    height: 60px;
  }
  .sync-state {
    display: none;
  }
  .result-panel {
    min-height: 400px;
  }
  .sidebar-bottom {
    padding-top: 25px;
  }
}
@media (max-width: 500px) {
  main {
    padding: 23px 14px 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 30px;
  }
  .stat small {
    font-size: 9px;
  }
  .panel {
    padding: 17px;
  }
  .breadcrumb {
    gap: 9px;
  }
  .top-actions {
    gap: 10px;
  }
  .avatar {
    display: none;
  }
  footer span {
    display: none;
  }
  .input-row {
    gap: 10px;
  }
  .form-grid > .panel {
    padding: 20px;
  }
  .panel-title {
    flex-wrap: wrap;
  }
}

.model-parameters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:12px 0; }
.parameter-field { min-width:0; }
.parameter-field label { margin:0; }
.parameter-pair { display:flex; align-items:center; gap:8px; }
.parameter-pair input { min-width:0; }
.parameter-pair .checkbox { flex-shrink:0; }
.parameter-help { font-size:12px; color:var(--muted, #68747c); margin:6px 0 12px; overflow-wrap:anywhere; }
.parameter-help summary { cursor:pointer; }
.parameter-help pre { white-space:pre-wrap; overflow-wrap:anywhere; }
#model-inputs textarea { margin-top:8px; }
@media(max-width:600px) { .model-parameters { grid-template-columns:minmax(0,1fr); } }

.proxy-panel { margin-bottom:24px; }
.proxy-panel .form-grid { margin-top:20px; }
.proxy-panel table small { display:block; overflow-wrap:anywhere; }
.proxy-panel form { min-width:0; }
.login-batch { margin-bottom:20px; font-size:12px; }
.login-batch summary { cursor:pointer; line-height:1.8; }
.batch-items { padding:0; list-style:none; max-height:480px; overflow:auto; }
.batch-items li { border-bottom:1px solid var(--border); padding:12px 0; }
.batch-items li > div { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.batch-items .email, .batch-items p { overflow-wrap:anywhere; }
.batch-items p { margin:6px 0; }
.batch-error { color:#ba5640; }

.catalog-overview { display:flex; align-items:center; gap:36px; margin-bottom:24px; }
.catalog-overview > div { flex-shrink:0; display:flex; flex-direction:column; gap:6px; }
.catalog-overview strong { font-size:28px; font-weight:650; letter-spacing:-1px; }
.catalog-overview span { font-size:12px; color:var(--muted); }
.catalog-overview p { margin:0 0 0 auto; max-width:320px; color:var(--muted); font-size:12px; }
.catalog-toolbar { display:flex; align-items:center; gap:16px; justify-content:space-between; margin-bottom:18px; }
.catalog-filters { display:flex; flex-wrap:wrap; gap:7px; }
.catalog-filters button { border:1px solid var(--border); border-radius:8px; background:white; padding:9px 13px; font-size:12px; }
.catalog-filters button[aria-pressed=true] { background:#e4eee7; color:#245c43; border-color:#bcd7c8; font-weight:650; }
.catalog-search-label { margin:0; width:290px; }
.catalog-search-label input { margin:0; font-weight:400; }
.catalog-results-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:17px; font-size:12px; color:var(--muted); }
.catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.catalog-card { min-width:0; margin:0; padding:23px; }
.catalog-card-heading { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; margin-bottom:18px; }
.catalog-card-heading > div { min-width:0; }
.catalog-card-heading h2 { font-size:18px; line-height:1.5; }
.catalog-card-heading .badge { flex-shrink:0; }
.catalog-family { font-size:11px; color:var(--muted); display:block; margin-bottom:8px; }
.catalog-product { color:var(--green); font-size:12px; margin:5px 0 0; }
.catalog-id { display:flex; gap:10px; justify-content:space-between; align-items:center; padding:11px 12px; background:#f3f6f4; border-radius:8px; }
.catalog-id code, .catalog-aliases code { min-width:0; overflow-wrap:anywhere; font-size:12px; }
.catalog-id button, .catalog-aliases button { flex-shrink:0; font-size:11px; }
.catalog-capabilities { display:flex; flex-wrap:wrap; gap:6px; margin:16px 0; }
.catalog-capabilities span { font-size:11px; border:1px solid var(--border); border-radius:5px; padding:4px 7px; color:#54655b; }
.catalog-resolution, .catalog-note { font-size:12px; color:var(--muted); margin:0 0 8px; }
.catalog-resolution strong { color:#495a50; font-weight:500; margin-left:8px; }
.catalog-details { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.catalog-details summary { font-size:12px; cursor:pointer; color:#47564d; }
.catalog-details summary span { margin-left:6px; color:var(--muted); font-size:11px; }
.catalog-aliases { list-style:none; padding:0; margin:8px 0 0; }
.catalog-aliases li { display:flex; gap:12px; justify-content:space-between; align-items:center; padding:7px 0; }
.catalog-endpoints { display:grid; gap:9px; margin:16px 0 8px; }
.catalog-endpoints code { overflow-wrap:anywhere; font-size:11px; line-height:1.7; }
.catalog-example { background:#f3f6f4; border-radius:8px; padding:14px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; font-size:11px; }
.catalog-copy-example { font-size:12px; }
.catalog-source { display:inline-block; margin-top:20px; font-size:11px; }
.catalog-footnote { margin:22px 0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:1200px) { .catalog-overview { gap:24px; flex-wrap:wrap; } .catalog-overview p { max-width:none; flex-basis:100%; margin:0; } .catalog-toolbar { align-items:stretch; flex-direction:column; } .catalog-search-label { width:100%; } }
@media(max-width:760px) { .catalog-grid { grid-template-columns:minmax(0,1fr); } .catalog-overview { gap:28px; } }
@media(max-width:500px) { .catalog-card { padding:18px; } .catalog-card-heading h2 { font-size:16px; } .catalog-overview { gap:24px; } .catalog-overview strong { font-size:24px; } .catalog-filters { gap:5px; } .catalog-filters button { padding:9px; } }
.history-pagination { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.history-pagination > span { flex: 1; }

/* Task browsing: lightweight rows, images loaded only inside a detail. */
.history-pagination { flex-wrap:wrap; gap:12px; }
.history-search { flex:1 1 240px; max-width:330px; margin:0; }
.history-search input { margin:0; font-weight:400; }
.history-table { min-width:1030px; width:100%; }
.history-table td { vertical-align:middle; padding:17px 12px; font-size:12px; }
.history-table th { white-space:nowrap; padding:13px 12px; }
.history-table small { display:block; margin-top:7px; font-size:11px; color:var(--muted); }
.history-time { white-space:nowrap; }
.history-account { max-width:195px; overflow-wrap:anywhere; }
.history-model { max-width:210px; overflow-wrap:anywhere; }
.history-prompt { max-width:270px; min-width:160px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#68786e; line-height:1.65; }
.history-status-cell { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.history-actions { white-space:nowrap; }
.history-actions .text-button { padding:7px; }
#job-dialog { width:min(960px,calc(100% - 32px)); padding:0 28px 28px; max-height:90vh; }
#job-dialog > .dialog-header, #image-viewer > .dialog-header { position:sticky; top:0; background:white; z-index:2; padding:20px 0; margin:0; border-bottom:1px solid var(--border); }
.task-detail-tools, .task-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px 0; }
.task-detail-tools .fine { margin-left:10px; }
.task-summary { margin:18px 0 24px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.job-media-panel { margin:24px 0; }
.job-media-panel h3, .task-prompt-section h3 { margin:0 0 12px; font-size:14px; }
.task-section-heading h3 { margin:0; }
.task-images { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.task-image { margin:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; min-width:0; }
.image-preview { display:flex; flex-direction:column; align-items:center; width:100%; border:0; background:#f2f5f2; padding:12px; cursor:zoom-in; color:var(--muted); }
.image-preview img { width:100%; height:250px; object-fit:contain; }
.image-load-message { font-size:11px; margin:9px 0 0; }
.task-image figcaption { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px; font-size:12px; }
.reference-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.reference-grid .image-preview img { height:140px; }
.task-prompt { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow:auto; padding:18px; background:#f5f7f5; border:1px solid var(--border); border-radius:10px; line-height:1.8; font-family:inherit; font-size:12px; }
.task-diagnostics { padding-top:20px; border-top:1px solid var(--border); margin-top:24px; }
.task-diagnostics > summary { color:#466152; font-weight:600; }
#image-viewer { width:min(1200px,calc(100% - 24px)); max-height:96vh; padding:0 20px 20px; }
#image-viewer .dialog-header { display:flex; gap:14px; }
#image-viewer-title { margin-right:auto; }
.image-viewer-content { text-align:center; min-height:100px; }
#image-viewer-image { display:block; max-width:100%; max-height:76vh; object-fit:contain; margin:16px auto 0; }
.image-unavailable { opacity:.25; }
@media(max-width:650px) {
  #job-dialog { padding:0 16px 18px; width:calc(100% - 16px); }
  .task-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .task-images { grid-template-columns:minmax(0,1fr); }
  .reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .task-image figcaption { flex-wrap:wrap; gap:0; }
  .history-search { max-width:none; flex-basis:100%; }
  .history-pagination .fine { flex-basis:100%; }
}
.history-prompt { white-space:normal; }
.task-media-layout { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.task-media-layout > :only-child { grid-column:1 / -1; }
.task-media-layout .task-images { grid-template-columns:minmax(0,1fr); }
.task-media-layout .reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:650px) { .task-media-layout { grid-template-columns:minmax(0,1fr); gap:0; } }

/* Account library: bounded rows, explicit filters and readable details. */
.account-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:18px; margin:0 0 24px; }
.account-metrics > div { padding:20px 24px; background:white; border:1px solid var(--border); border-radius:12px; }
.account-metrics span, .account-detail-metrics span { display:block; color:var(--muted); font-size:12px; margin-bottom:10px; }
.account-metrics strong { font-size:26px; font-weight:600; font-variant-numeric:tabular-nums; }
.account-metrics > :last-child strong { color:var(--green); }
.account-panel .search-label { width:310px; max-width:100%; }
.account-filters { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; padding:0 0 22px; }
.account-filters label { flex:1 1 130px; margin:0; font-size:12px; color:var(--muted); font-weight:400; min-width:0; }
.account-filters select { margin:7px 0 0; padding:10px 12px; font-size:12px; }
.account-filters #account-proxy { max-width:250px; }
.account-filters button { margin-bottom:1px; white-space:nowrap; font-size:12px; }
.accounts-table { min-width:990px; }
.account-panel .table-wrap { max-height:clamp(320px,calc(100vh - 620px),720px); overflow:auto; }
.accounts-table thead { position:sticky; top:0; z-index:1; background:#f8faf9; }
.accounts-table th { font-size:11px; padding:13px 12px; white-space:nowrap; }
.accounts-table td { padding:18px 12px; vertical-align:middle; font-size:12px; }
.account-identity { width:28%; max-width:300px; }
.account-email { font:inherit; font-weight:500; text-align:left; border:0; background:none; color:#253c30; padding:0; overflow-wrap:anywhere; }
.account-email:hover { color:var(--green); text-decoration:underline; }
.account-state { margin-top:9px; display:flex; align-items:center; gap:8px; }
.account-state .badge { flex-shrink:0; }
.account-error { color:#a46a32; max-width:190px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:11px; }
.accounts-table small { display:block; color:var(--muted); font-size:11px; margin-top:7px; }
.account-balance { font-variant-numeric:tabular-nums; }
.account-balance strong { font-size:16px; font-weight:600; }
.account-running { color:var(--green); font-weight:600; }
.account-egress, .account-time { white-space:nowrap; }
.account-actions { white-space:nowrap; }
.account-actions .text-button { padding:6px 7px; }
.account-pagination { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding-top:20px; flex-wrap:wrap; }
.account-pagination > span { margin-right:auto; }
.account-pagination label { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); margin:0; font-weight:400; }
.account-pagination select { width:70px; margin:0; padding:8px; }
.account-pagination button { padding:9px 13px; font-size:12px; }
#account-dialog { width:min(740px,calc(100% - 32px)); padding:0 28px 24px; max-height:90vh; }
#account-dialog > .dialog-header { position:sticky; top:0; background:white; z-index:2; padding:20px 0; margin:0; border-bottom:1px solid var(--border); }
.account-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin:24px 0; }
.account-detail-email { font-size:18px; font-weight:600; overflow-wrap:anywhere; margin:0 0 12px; }
.account-detail-heading > div { min-width:0; }
.account-detail-heading button { white-space:nowrap; }
.account-detail-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; border-radius:10px; padding:20px; background:#f3f7f4; }
.account-detail-metrics strong { font-size:24px; font-weight:600; color:var(--green); }
.account-detail-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:26px 0; }
.account-detail-fields dt { font-size:12px; color:var(--muted); margin-bottom:8px; }
.account-detail-fields dd { font-size:13px; margin:0; overflow-wrap:anywhere; }
.account-error-detail { padding:16px 18px; background:#fff7ed; border:1px solid #f1debf; border-radius:10px; margin:20px 0; }
.account-error-detail h3 { color:#945e26; font-size:12px; margin:0 0 10px; }
.account-error-detail p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.8; margin:0; }
.account-detail-actions { display:flex; flex-wrap:wrap; gap:8px; border-top:1px solid var(--border); padding-top:18px; }
.account-detail-actions .text-button { padding:8px; }
@media(max-width:1100px) { .account-metrics { gap:10px; } .account-metrics > div { padding:18px 14px; } }
@media(max-width:700px) {
  .account-metrics { grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; }
  .account-metrics > div { grid-column:span 2; padding:12px; }
  .account-metrics > :nth-child(4), .account-metrics > :last-child { grid-column:span 3; }
  .account-metrics strong { font-size:22px; }
  .account-metrics span { font-size:11px; }
  .account-panel .panel-title { align-items:stretch; flex-direction:column; gap:16px; }
  .account-panel .search-label { width:100%; }
  .account-filters label { flex:1 1 calc(50% - 14px); }
  .account-filters #account-proxy { max-width:none; }
  .account-pagination > span { flex-basis:100%; }
  #account-dialog { width:calc(100% - 16px); padding:0 16px 20px; }
  .account-detail-metrics { gap:8px; padding:16px 12px; }
  .account-detail-email { font-size:15px; }
  .account-detail-fields { gap:20px 14px; }
}
.purchase-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-bottom:24px; }
.purchase-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.purchase-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.purchase-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:16px 0; }
.purchase-check { display:flex; align-items:center; gap:8px; }
.purchase-check input { width:auto; }
.purchase-channel { border:1px solid var(--border); border-radius:14px; padding:20px; margin:20px 0; min-width:0; }
.purchase-channel legend { font-weight:700; padding:0 8px; }
.purchase-product { display:grid; grid-template-columns:1fr 2fr 1fr auto auto; gap:12px; align-items:end; margin:14px 0; }
.purchase-product button, .purchase-product .purchase-check { margin-bottom:6px; }
.purchase-channels { margin-bottom:24px; }
.purchase-route-list { margin:20px 0; }
.purchase-route-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid var(--border); }
.purchase-route-row span { min-width:0; overflow-wrap:anywhere; }
.purchase-route-row button { padding:8px 12px; }
.purchase-table { max-height:560px; overflow:auto; margin-top:16px; }
.purchase-table small { display:block; color:var(--muted); overflow-wrap:anywhere; max-width:300px; margin-top:6px; }
.purchase-pagination { justify-content:flex-end; }
#purchase-detail { width:min(1000px,calc(100% - 32px)); max-height:90vh; padding:24px; }
.purchase-events { line-height:1.9; overflow-wrap:anywhere; padding-left:20px; }
[data-section=purchases] input, [data-section=purchases] select { min-width:0; }
[data-section=purchases] form > label { margin:16px 0; }
@media(max-width:800px) { .purchase-grid { grid-template-columns:minmax(0,1fr); } .purchase-product { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:500px) { .purchase-fields { grid-template-columns:minmax(0,1fr); } .purchase-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .purchase-metrics > div:nth-child(n) { grid-column:auto; } .purchase-channel { padding:12px; } }

.network-log-panel {margin:24px 0;min-width:0;}
.network-log-panel .task-section-heading {display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.network-log-panel select {width:auto;max-width:160px;}
.network-log-entry {padding:8px 12px;border-bottom:1px solid var(--line,#dce4dd);min-width:0;}
.network-log-entry button {text-align:left;max-width:100%;overflow-wrap:anywhere;}
.network-log-entry small {display:block;overflow-wrap:anywhere;}
.network-log-entry pre {white-space:pre-wrap;overflow-wrap:anywhere;max-height:480px;overflow:auto;font-size:12px;}

#browser-pool, .browser-key-panel {margin-bottom:24px;}
#browser-pool .section-heading {display:flex;gap:20px;justify-content:space-between;align-items:flex-start;}
#browser-pool .section-heading p {margin:10px 0;max-width:760px;color:var(--muted);}
#browser-pool .section-heading button {flex-shrink:0;}
#browser-key-form > .checkbox {margin-bottom:16px;}
#browser-pool td:last-child {white-space:normal;min-width:155px;}
@media(max-width:700px) {#browser-pool .section-heading {flex-direction:column;} #browser-key-form .input-row {grid-template-columns:minmax(0,1fr);}}
.network-log-entry.log-error {border-left:3px solid #b95241;}

.proxy-metrics { margin-bottom:24px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.proxy-table { min-width:1060px; }
.proxy-table td { vertical-align:top; font-size:13px; padding:18px 12px; }
.proxy-table td:nth-child(3) { min-width:210px; max-width:320px; }
.proxy-table details { margin-top:8px; font-size:12px; }
.proxy-table small { white-space:normal; overflow-wrap:anywhere; }
.proxy-panel .table-wrap { max-height:65vh; overflow:auto; }
.proxy-table thead { position:sticky; top:0; background:#f8faf9; z-index:1; }
.proxy-filters input { margin:7px 0 0; padding:10px 12px; font-size:12px; }
.proxy-panel > .form-grid { border-top:1px solid var(--border); padding-top:24px; margin-top:24px; }
@media(max-width:700px) { .proxy-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.account-metrics.proxy-metrics > div { grid-column:auto; }

.batch-failures-open { margin:14px 0; }
#batch-failures-dialog { width:min(1100px,calc(100% - 40px)); }
.batch-failure-actions { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.batch-failure-table { min-width:880px; }
.batch-failure-table td { vertical-align:top; max-width:260px; white-space:normal; overflow-wrap:anywhere; font-size:13px; }
.batch-failure-table td strong,.batch-failure-table td small { display:block; margin:4px 0; }
#batch-failures-content .table-wrap { max-height:55vh; overflow:auto; }
@media(max-width:700px) { #batch-failures-dialog { width:calc(100% - 16px); padding:16px; } }

.account-usage { min-width:145px; white-space:nowrap; }
.account-usage-detail { margin:20px 0; }
.account-usage-detail h3 { font-size:14px; margin-bottom:12px; }
