/* ===== Mira Console ? Glassmorphism Design System ===== */
/* Design source: ui-ux-pro-max ? MASTER.md (mira-console) */

:root {
  color-scheme: light;
  --color-primary: #171717;
  --color-on-primary: #ffffff;
  --color-secondary: #404040;
  --color-accent: #a16207;
  --color-accent-strong: #854d06;
  --color-background: #ffffff;
  --color-foreground: #171717;
  --color-muted: #e8ecf0;
  --color-border: #e5e5e5;
  --color-destructive: #dc2626;
  --color-ring: #171717;
  --color-muted-text: #5d6a61;
  --color-muted-strong: #3f4a42;
  --color-soft-text: #5d6a61;
  --color-strong-text: #17201a;
  --color-gold: #a16207;
  --color-gold-soft: #d8b25c;
  --color-gold-light: #b07213;
  --color-danger: #b3261e;
  --color-success: #168e50;
  --color-success-dot: #168e50;
  --color-code-bg: #f4f6f3;
  --color-code-text: #17201a;
  --color-code-border: #c9d1ca;

  --space-xs: 2px;
  --space-sm: 4px;
  --space-md: 8px;
  --space-lg: 12px;
  --space-xl: 16px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 8px 28px rgba(23, 23, 23, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-body: "Fira Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Fira Code", Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-width: 320px;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-foreground);
  background: linear-gradient(180deg, #faf9f7 0%, #f4f2ee 100%);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.62; }
.btn-primary:disabled, .secondary:disabled, .icon-btn:disabled, .table-action:disabled { cursor: not-allowed; }

[hidden] { display: none !important; }

::selection { background: rgba(161, 98, 7, 0.18); }

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Glass primitives ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Login ---------- */
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(400px, 100%);
  padding: 40px 36px 32px;
  border-radius: var(--radius-lg);
  animation: riseIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #171717, #3f3f3f);
  color: var(--color-gold-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; margin: 0; }
.brand-mark.small svg { width: 18px; height: 18px; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 22px; margin-bottom: 6px; letter-spacing: 0.2px; }
h2 { font-size: 21px; margin: 2px 0 0; }
h3 { font-size: 15px; margin: 0; }

.login-caption { margin-bottom: 28px; color: var(--color-secondary); font-size: 13px; }

label { display: grid; gap: 6px; margin-bottom: 16px; color: var(--color-secondary); font-size: 13px; font-weight: 500; }
label > span { display: flex; align-items: center; gap: 4px; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  color: var(--color-foreground);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #dcdcdc;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
input::placeholder, textarea::placeholder { color: var(--color-soft-text); }
input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.16);
  background: #ffffff;
}
input[readonly] { color: var(--color-soft-text); background: rgba(235, 235, 235, 0.55); }
textarea { resize: vertical; font-family: var(--font-mono); line-height: 1.55; }

.btn-primary {
  min-height: 44px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--color-accent-strong);
  background: linear-gradient(180deg, #b07213, var(--color-accent));
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  box-shadow: 0 4px 12px rgba(161, 98, 7, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 6px 16px rgba(161, 98, 7, 0.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled, .secondary:disabled, .icon-btn:disabled { transform: none !important; box-shadow: none !important; filter: none !important; }
.btn-primary:disabled::after, .secondary:disabled::after {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.secondary:disabled::after { border-color: rgba(23, 23, 23, 0.16); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }

button.secondary, .icon-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
  border: 1px solid #d5d5d5;
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
button.secondary:hover, .icon-btn:hover { border-color: var(--color-accent); background: #ffffff; transform: translateY(-1px); }

.error, .success-message { min-height: 18px; margin: 12px 0 0; font-size: 13px; }
.error { color: var(--color-destructive); }
.success-message { color: var(--color-success); }
.helper { color: var(--color-muted-text); font-size: 12px; line-height: 1.6; margin: -4px 0 16px; }
.req { color: var(--color-destructive); font-style: normal; }

/* ---------- Console shell ---------- */
.console-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid rgba(23, 23, 23, 0.08);
  z-index: 3;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 20px; }
.brand strong { font-size: 17px; letter-spacing: 0.3px; }
.rail nav { min-width: 0; display: grid; gap: 3px; }
.nav-item, .logout {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  touch-action: manipulation;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-muted-strong);
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.nav-item svg, .logout svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item:hover, .logout:hover { background: rgba(255, 255, 255, 0.78); color: var(--color-primary); transform: translateX(2px); }
.nav-item.active { background: #ffffff; border-color: #e9e0c8; color: var(--color-primary); box-shadow: var(--shadow-sm); }
.nav-item.active::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--color-accent); margin-left: -4px; }
.logout { margin-top: auto; color: var(--color-danger); }
.logout:hover { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.2); color: var(--color-danger); }

.workspace { min-width: 0; padding: 0 30px 56px; }
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  margin-bottom: 26px;
}
.eyebrow { display: block; color: var(--color-gold); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px; }
.admin-identity { display: flex; align-items: center; gap: 12px; color: var(--color-muted-strong); font-size: 13px; text-align: right; }
.status-dot {
  color: var(--color-success);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success-dot); box-shadow: 0 0 0 3px rgba(47, 158, 88, 0.14); }

.view { min-width: 0; display: none; }
.active-view { display: block; }

#view-title:focus { outline: none; }

/* ---------- Overview ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric-card {
  min-height: 104px;
  padding: 18px 18px 14px;
  border-radius: var(--radius-md);
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: riseIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.metric-card:nth-child(2) { animation-delay: 0.05s; }
.metric-card:nth-child(3) { animation-delay: 0.1s; }
.metric-card:nth-child(4) { animation-delay: 0.15s; }
.metric-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.metric-card span { display: block; color: var(--color-muted-strong); font-size: 12.5px; font-weight: 500; }
.metric-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 600;
  color: var(--color-primary);
}
.metric-card small { display: block; margin-top: 6px; color: var(--color-soft-text); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.4px; }

.notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
}
.notice-label { display: flex; align-items: baseline; gap: 14px; }
.notice-label span { color: var(--color-muted-strong); font-size: 13.5px; }
.notice-label strong { font-family: var(--font-mono); font-size: 20px; }
.ops-panel { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-md); }
.ops-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 10px; }
.ops-grid > div { min-height: 70px; padding: 12px; border: 1px solid rgba(23, 23, 23, 0.08); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.58); }
.ops-grid span { display: block; color: var(--color-muted-text); font-size: 12px; }
.ops-grid strong { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 21px; }

/* ---------- Panels & layouts ---------- */
.section-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.section-head input { max-width: 290px; }

.split-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(520px, 1fr);
  gap: 22px;
  align-items: start;
}
.provider-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 430px);
  gap: 22px;
  align-items: start;
}
.client-defaults-panel { margin-bottom: 16px; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, 440px); align-items: start; }
.admin-table-panel { margin-top: 22px; }
.form-panel, .table-panel { min-width: 0; border-radius: var(--radius-md); padding: 22px; }
.form-panel.narrow { max-width: 460px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel-note { color: var(--color-muted-text); font-size: 12.5px; margin: -6px 0 14px; }

.issued {
  margin-top: 18px;
  padding: 14px;
  background: rgba(212, 175, 55, 0.10);
  border: 1px solid rgba(161, 98, 7, 0.28);
  border-radius: var(--radius-sm);
}
.issued span, .issued code { display: block; margin-bottom: 10px; }
.issued span { font-size: 12px; color: var(--color-gold); }
.issued code { word-break: break-all; color: var(--color-accent-strong); font-family: var(--font-mono); font-size: 13px; }

/* ---------- Tables ---------- */
.table-scroll { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; border: 1px solid rgba(23, 23, 23, 0.07); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.55); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 11px 12px; border-bottom: 1px solid rgba(23, 23, 23, 0.06); text-align: left; font-size: 12.5px; white-space: nowrap; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 150ms ease; }
tbody tr:hover { background: rgba(212, 175, 55, 0.055); }
th { color: var(--color-muted-text); background: rgba(250, 249, 247, 0.9); font-weight: 600; position: sticky; top: 0; z-index: 1; }
td { color: var(--color-strong-text); }
.muted { color: var(--color-muted-text); }
.empty { height: 96px; color: var(--color-muted-text); text-align: center; }
.table-actions { min-width: 124px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.table-action {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  touch-action: manipulation;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  color: var(--color-strong-text);
  font-size: 12px;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}
.table-action:hover { border-color: var(--color-accent); color: var(--color-accent-strong); background: #ffffff; }
.table-action.danger { color: var(--color-danger); border-color: #e0b4b4; }
.table-action.danger:hover { background: rgba(220, 38, 38, 0.06); border-color: var(--color-destructive); color: var(--color-destructive); }

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  color: var(--color-muted-strong);
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
.state-active { color: #1f7a44; border-color: #a9d8ba; background: rgba(47, 158, 88, 0.09); }
.state-revoked, .state-expired, .state-disabled, .state-suspended { color: var(--color-danger); border-color: #e0b4b4; background: rgba(220, 38, 38, 0.07); }
.self-tag { margin-left: 7px; padding: 2px 6px; color: var(--color-gold); border: 1px solid var(--color-gold-soft); border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(212, 175, 55, 0.10); }

/* ---------- Providers ---------- */
.provider-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.provider-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 23, 23, 0.08);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.provider-card.clickable { cursor: pointer; }
.provider-card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(161, 98, 7, 0.4); }
.provider-card.selected { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.12), var(--shadow-md); }
.provider-card-head { display: flex; align-items: center; gap: 10px; }
.vendor-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #171717, #3d3d3d);
  color: var(--color-gold-light);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}
.provider-card-title { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.provider-card-title strong { font-size: 14px; }
.provider-vendor { color: var(--color-muted-text); font-size: 12px; }
.provider-card p { margin: 0; color: var(--color-muted-strong); font-size: 12.5px; line-height: 1.5; }
.provider-models { display: flex; flex-wrap: wrap; gap: 6px; }
.provider-models code {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(23, 23, 23, 0.05);
  border: 1px solid rgba(23, 23, 23, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-strong-text);
  white-space: nowrap;
}
.provider-updated { margin-top: auto; color: var(--color-soft-text); font-size: 12px; font-family: var(--font-mono); }

.endpoint-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 8px 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(23, 23, 23, 0.045);
  border: 1px solid rgba(23, 23, 23, 0.09);
}
.endpoint-box code { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 12px; color: var(--color-strong-text); word-break: break-all; }
.icon-btn { min-height: 44px; min-width: 44px; padding: 4px 12px; font-size: 12px; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 14px 0 8px;
  padding: 6px 0;
  font-weight: 500;
  touch-action: manipulation;
}
.switch-row input { width: 18px; min-height: 18px; flex: 0 0 auto; accent-color: var(--color-accent); cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: rgba(23, 23, 23, 0.92);
  color: #f7f5ef;
  font-size: 13px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(212, 175, 55, 0.35);
  animation: toastIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .provider-grid { grid-template-columns: 1fr; }
  .provider-cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}

@media (max-width: 1080px) {
  .split-layout { grid-template-columns: 1fr; }
  .form-panel { max-width: 560px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .ops-grid { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
}

@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  .console-shell { display: block; }
  .rail {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 8px 12px;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 23, 23, 0.08);
    overflow-x: auto;
  }
  .brand { padding: 0 12px 0 0; }
  .brand strong { display: none; }
  .rail nav { min-width: 0; flex: 1 1 auto; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .nav-item, .logout { min-width: max-content; text-align: center; }
  .nav-item.active::before { display: none; }
  .logout { margin: 0 0 0 auto; }
  .workspace { padding: 0 16px 40px; }
  .topbar { min-height: 70px; margin-bottom: 22px; }
  .admin-identity { max-width: 52%; align-items: flex-end; flex-direction: column; gap: 3px; }
  .metrics { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .section-head { align-items: stretch; flex-direction: column; }
  .section-head input { max-width: none; }
  .two-col { grid-template-columns: 1fr; }
  .table-scroll { max-width: 100%; }
  .table-action { min-height: 44px; min-width: 44px; padding: 8px 12px; }
}

@media (max-width: 440px) {
  .login-shell { padding: 14px; }
  .login-panel { padding: 30px 22px 26px; }
  h2 { font-size: 18px; }
  .workspace { padding-inline: 12px; }
  .status-dot { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --color-primary: #000000;
    --color-foreground: #000000;
    --color-border: #000000;
    --color-accent: #7a4a00;
    --glass-border: #000000;
    --color-muted-text: #000000;
    --color-muted-strong: #000000;
    --color-soft-text: #000000;
    --color-strong-text: #000000;
    --color-gold: #5b3500;
    --color-gold-soft: #5b3500;
    --color-gold-light: #5b3500;
    --color-danger: #8f0000;
    --color-success: #00592f;
    --color-success-dot: #00592f;
    --color-code-bg: #ffffff;
    --color-code-text: #000000;
    --color-code-border: #000000;
  }
  body {
    color: #000000;
    background: #ffffff;
  }
  .nav-item, .logout, .provider-vendor, .metric-card small,
  .muted, .helper, .panel-note, .admin-identity, .provider-updated {
    color: #000000;
  }
}

.plugin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.plugin-layout textarea {
  width: 100%;
  min-height: 220px;
  padding: 10px 12px;
  border: 1px solid var(--color-code-border);
  border-radius: 6px;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-family: "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

.price-panel {
  margin-top: 20px;
}

.price-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.price-layout .form-panel {
  max-width: none;
}

@media (max-width: 900px) {
  .price-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .plugin-layout {
    grid-template-columns: 1fr;
  }
}
/* ---------- Studio presets ---------- */
.preset-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
  align-items: start;
}
.preset-layout-secondary { margin-top: 20px; }
.preset-layout .form-panel { max-width: none; }
.preset-layout textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--color-code-border);
  border-radius: 6px;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-family: "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}
.preset-layout .table-scroll { max-height: 520px; }
@media (max-width: 900px) {
  .preset-layout { grid-template-columns: 1fr; }
}
