/* ===== Console Shell ===== */
.c-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(640px circle at 12% -8%, rgba(16, 245, 160, 0.12), transparent 60%),
    radial-gradient(560px circle at 88% -10%, rgba(34, 211, 238, 0.12), transparent 60%);
}

.c-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(6, 8, 13, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.c-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.c-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: rgba(16, 245, 160, 0.09);
  border: 1px solid rgba(16, 245, 160, 0.3);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.c-mode-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.c-mtab {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 7px;
  transition: all 0.16s ease;
}

.c-mtab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-0);
  font-weight: 550;
}

/* ===== Status Banner ===== */
.c-status-banner {
  position: relative;
  z-index: 2;
  max-width: 1380px;
  margin: 14px auto 0;
  padding: 0 20px;
}

.c-status-banner:empty { display: none; }

.c-status-inner {
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(16, 245, 160, 0.35);
  color: var(--accent);
  font-size: 13.5px;
}

/* ===== Login Gate ===== */
.c-gate-wrap {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.c-gate-card {
  width: min(100%, 460px);
  border-radius: 22px;
  padding: 32px;
  background: linear-gradient(180deg, rgba(16, 22, 36, 0.94), rgba(10, 14, 24, 0.98));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 60px -24px rgba(16, 245, 160, 0.25);
}

.c-gate-logos {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.c-gate-card h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.c-gate-sub {
  margin: 8px 0 22px;
  color: var(--text-2);
  font-size: 14px;
}

/* ===== Form Controls ===== */
.c-field {
  margin-bottom: 14px;
}

.c-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-1);
  margin-bottom: 6px;
}

.c-field label .req {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.c-input, .c-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(6, 8, 13, 0.85);
  color: var(--text-0);
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.c-input:focus, .c-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 245, 160, 0.15);
}

.c-alert {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--danger);
}

/* ===== Workspace 2-Column IDE Layout ===== */
.c-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}

.c-sidebar {
  border-right: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.9);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}

.c-side-top {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c-search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(6, 8, 13, 0.9);
  color: var(--text-0);
  font-size: 13.5px;
}

.c-search:focus {
  outline: none;
  border-color: var(--accent);
}

.c-pf-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.c-pf-filters::-webkit-scrollbar { display: none; }

.c-pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 5px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
  flex: none;
}

.c-pf-chip.active {
  background: var(--accent-dim);
  border-color: rgba(16, 245, 160, 0.4);
  color: var(--accent);
}

.c-side-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}

.c-toggle-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.c-ep-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-ep-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-1);
  transition: all 0.14s ease;
}

.c-ep-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-0);
}

.c-ep-item.active {
  background: rgba(16, 245, 160, 0.09);
  border-color: rgba(16, 245, 160, 0.34);
  color: var(--text-0);
}

.c-ep-info {
  min-width: 0;
  flex: 1;
}

.c-ep-name {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-ep-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-ep-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  flex: none;
}

.c-ep-tag.paused {
  color: var(--text-3);
}

/* ===== Main Right Panel ===== */
.c-main {
  padding: 24px 28px 48px;
  max-width: 980px;
  width: 100%;
}

.c-panel-card {
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
  margin-bottom: 18px;
}

.c-ep-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.c-ep-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.c-ep-route {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-1);
  background: rgba(6, 8, 13, 0.78);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 8px;
}

.c-ep-route b {
  color: var(--accent);
}

.c-price-bar {
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 13px;
  color: #fde68a;
  margin-bottom: 18px;
}

.c-price-bar.paused {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border);
  color: var(--text-2);
}

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

.c-actions-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Response & Snippets Pane ===== */
.c-out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.c-out-tabs {
  display: flex;
  gap: 6px;
}

.c-otab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 8px;
}

.c-otab.active {
  background: var(--accent-dim);
  border-color: rgba(16, 245, 160, 0.36);
  color: var(--accent);
}

.c-meta-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

.c-pre {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #05070c;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text-1);
  max-height: 460px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.jk { color: #7dd3fc; }
.js { color: #86efac; }
.jn { color: #fbbf24; }
.jb { color: #c084fc; }
.jp { color: #64748b; }

/* ===== Billing & Usage View ===== */
.c-billing-wrap {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

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

.c-tier {
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  background: rgba(6, 8, 13, 0.72);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}

.c-tier:hover {
  border-color: var(--border-strong);
}

.c-tier.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: 0 0 24px -8px rgba(16, 245, 160, 0.45);
}

.c-tier b {
  display: block;
  font-size: 22px;
  font-family: var(--mono);
  color: var(--text-0);
}

.c-tier span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent);
}

.c-usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.c-usage-table th, .c-usage-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.c-usage-table th {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 960px) {
  .c-workspace { grid-template-columns: 1fr; }
  .c-sidebar { position: static; height: auto; max-height: 360px; border-right: 0; border-bottom: 1px solid var(--border); }
  .c-params-grid { grid-template-columns: 1fr; }
  .c-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
