:root {
  /* Authentic Google Cloud Platform (GCP Console) Light Palette */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --hover: #f8f9fa;
  --border: #dadce0;
  --border-light: #e8eaed;
  --text: #202124;
  --text-2: #3c4043;
  --muted: #5f6368;
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-tint: #e8f0fe;
  --primary-text: #1967d2;
  --ok-bg: #e6f4ea;
  --ok-text: #137333;
  --ok-dot: #1e8e3e;
  --warn-bg: #fef7e0;
  --warn-text: #b06000;
  --warn-border: #fdd663;
  --err-bg: #fce8e6;
  --err-text: #c5221f;
  --purple-bg: #f3e8fd;
  --purple-text: #7627bb;
  --code-bg: #f1f3f4;
  --code-text: #174ea6;
  --term-bg: #1e1f22;
  --term-text: #e8eaed;
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.12), 0 1px 3px 1px rgba(60, 64, 67, 0.06);
  --shadow-lg: 0 8px 24px rgba(60, 64, 67, 0.22);
}

html.dark {
  --bg: #131417;
  --surface: #1d1f23;
  --surface-2: #282b30;
  --hover: #24272c;
  --border: #353940;
  --border-light: #2b2e35;
  --text: #e8eaed;
  --text-2: #bdc1c6;
  --muted: #9aa0a6;
  --primary: #8ab4f8;
  --primary-hover: #aecbfa;
  --primary-tint: rgba(138, 180, 248, 0.16);
  --primary-text: #8ab4f8;
  --ok-bg: rgba(52, 168, 83, 0.18);
  --ok-text: #81c995;
  --ok-dot: #34a853;
  --warn-bg: rgba(251, 188, 4, 0.16);
  --warn-text: #fdd663;
  --warn-border: rgba(251, 188, 4, 0.35);
  --err-bg: rgba(234, 67, 53, 0.18);
  --err-text: #f28b82;
  --purple-bg: rgba(161, 66, 244, 0.18);
  --purple-text: #d7aefb;
  --code-bg: #282b30;
  --code-text: #8ab4f8;
  --term-bg: #0f1114;
  --term-text: #e8eaed;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Google Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
code {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}

/* Login Screen (Google Sign-in style) */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand-name { font-size: 18px; font-weight: 600; color: var(--text); }
.login-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.alert-error {
  background: var(--err-bg); color: var(--err-text);
  padding: 8px 12px; border-radius: 6px; font-size: 12px;
}

/* Console Layout Shell */
.console-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* GCP 48px Global Top Bar */
.gcp-header {
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-left, .header-right { display: flex; align-items: center; gap: 8px; }
.brand-lockup {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
}
.brand-lockup:hover { background: var(--surface-2); }
.brand-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-2); white-space: nowrap; }

.project-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--surface);
}
.project-net {
  font-family: "Roboto Mono", monospace; font-size: 11px;
  color: var(--primary-text); background: var(--primary-tint);
  padding: 1px 5px; border-radius: 4px;
}

.header-search {
  flex: 1; max-width: 520px; position: relative; display: flex; align-items: center;
}
.header-search .search-ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.header-search input {
  width: 100%; height: 34px; padding: 0 12px 0 36px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--surface-2); color: var(--text); font-size: 13px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.header-search input:focus {
  outline: none; background: var(--surface); border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.2);
}

.pve-live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok-text);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.pve-live-chip.err { background: var(--err-bg); color: var(--err-text); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); display: inline-block; }
.pve-live-chip.err .status-dot { background: var(--err-text); }

.user-chip {
  display: flex; align-items: center; gap: 6px;
  padding-left: 8px; border-left: 1px solid var(--border);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
html.dark .avatar { color: #131417; }
.user-name { font-size: 12px; font-weight: 500; color: var(--text-2); }

/* Body + Left Sidebar */
.console-body { display: flex; flex: 1; min-height: calc(100vh - 48px); }
.gcp-sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  transition: width 0.18s ease;
}
.gcp-sidebar.collapsed { width: 64px; }
.gcp-sidebar.collapsed .nav-group-label,
.gcp-sidebar.collapsed .nav-text,
.gcp-sidebar.collapsed .nav-badge,
.gcp-sidebar.collapsed .sidebar-foot { display: none; }

.nav-group { margin-bottom: 14px; }
.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--muted); padding: 6px 12px 4px;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-2); cursor: pointer;
  font-size: 13px; font-weight: 500; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-tint); color: var(--primary-text); }
.nav-item svg { flex-shrink: 0; }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.nav-item.active .nav-badge { background: var(--primary); color: #fff; }
html.dark .nav-item.active .nav-badge { color: #131417; }

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border-light);
}
.sidebar-meta-title { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cache-pills { display: flex; flex-wrap: wrap; gap: 4px; }

/* Main Area */
.gcp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.gcp-banner-warn {
  background: var(--warn-bg); color: var(--warn-text);
  border-bottom: 1px solid var(--warn-border);
  padding: 8px 20px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.banner-left { display: flex; align-items: center; gap: 8px; }

/* GCP Compute Engine Sub-Header */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.page-header-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.page-header h1 { margin: 0; font-size: 18px; font-weight: 500; color: var(--text); }
.page-sub { color: var(--muted); font-size: 12px; }
.header-inline-actions { display: flex; align-items: center; gap: 4px; }
.mini-kpi { font-size: 12px; color: var(--muted); font-weight: 500; }

.page-content { padding: 20px 24px 48px; width: 100%; max-width: none; }

/* Cards & KPIs */
.gcp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.table-card { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }

.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.kpi-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-val { font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); }

.progress-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s ease; }
.progress-bar.bar-green { background: #1e8e3e; }
.progress-bar.bar-amber { background: #f9ab00; }
.progress-bar.bar-red { background: #d93025; }

.quota-block { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; min-width: 215px; }
.quota-group-title { font-size: 11px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.quota-row { display: flex; flex-direction: column; gap: 2px; }
.quota-row-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); gap: 8px; }
.quota-row-head strong { color: var(--text); font-weight: 600; }
.quota-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.quota-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.25s ease; }
.quota-bar-fill.bar-green { background: #1e8e3e; }
.quota-bar-fill.bar-amber { background: #f9ab00; }
.quota-bar-fill.bar-red { background: #d93025; }

.kv-list { display: flex; flex-direction: column; gap: 10px; }
.kv-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-light); font-size: 13px;
}
.kv-item:last-child { border-bottom: none; padding-bottom: 0; }
.kv-item > span:first-child { color: var(--muted); }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-tile {
  text-align: left; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.quick-tile:hover { border-color: var(--primary); background: var(--primary-tint); }
.quick-tile strong { font-size: 13px; color: var(--primary-text); }
.quick-tile span { font-size: 11px; color: var(--muted); }

/* sub2api TablePageLayout Filter Bar */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-wrap: wrap;
}
.filter-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-pill:hover { background: var(--surface-2); }
.filter-pill.active { background: var(--primary-tint); color: var(--primary-text); border-color: transparent; }
.filter-pill span { font-size: 11px; opacity: 0.85; }
.filter-input {
  width: 260px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px;
}
.filter-input:focus { outline: none; border-color: var(--primary); }
.filter-select {
  height: 32px; width: auto; min-width: 130px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px;
}

.timeline-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 136px; padding: 12px 4px 2px; overflow-x: auto;
}
.tl-col {
  flex: 1 1 28px; min-width: 24px; max-width: 76px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
}
.tl-bar-wrap {
  width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center;
}
.tl-bar {
  width: 72%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: var(--primary); transition: height 0.25s ease;
  position: relative;
}
.tl-bar.has-err { background: linear-gradient(180deg, #d93025 0%, var(--primary) 45%); }
.tl-val { font-size: 10px; color: var(--muted); line-height: 1; }
.tl-label { font-size: 10px; color: var(--muted); white-space: nowrap; }

.table-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--border-light); background: var(--surface);
}
.log-row-clickable { cursor: pointer; }
.log-preview-cell { max-width: 320px; }
.log-preview-text {
  font-size: 12px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.log-err-text { color: var(--err-text); font-size: 12px; }
.tok-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 4px; font-size: 11px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.tok-pill strong { color: var(--text); font-weight: 600; }
.tok-pill.tok-thought { background: var(--purple-bg); color: var(--purple-text); }
.tok-pill.tok-thought strong { color: var(--purple-text); }
.tok-pill.tok-cache { background: var(--ok-bg); color: var(--ok-text); }
.tok-pill.tok-cache strong { color: var(--ok-text); }
.session-list { display: flex; flex-direction: column; gap: 8px; }
.session-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; background: var(--bg);
}
.session-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* GCP Data Table */
.table-wrap { overflow-x: auto; }
.gcp-table { width: 100%; border-collapse: collapse; }
.gcp-table th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.gcp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.gcp-table tbody tr:hover td { background: var(--hover); }
.empty-cell { text-align: center; padding: 48px 16px !important; color: var(--muted); }

.vm-link {
  color: var(--primary-text); font-weight: 600; cursor: pointer;
  background: none; border: none; padding: 0; font-size: 13px; text-align: left;
}
.vm-link:hover { text-decoration: underline; }

/* Chips & Badges */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.chip-green { background: var(--ok-bg); color: var(--ok-text); }
.chip-blue { background: var(--primary-tint); color: var(--primary-text); }
.chip-gray { background: var(--surface-2); color: var(--muted); }
.chip-red { background: var(--err-bg); color: var(--err-text); }
.chip-amber { background: var(--warn-bg); color: var(--warn-text); }
.chip-purple { background: var(--purple-bg); color: var(--purple-text); }

.badge-running { background: var(--ok-bg); color: var(--ok-text); }
.badge-creating, .badge-provisioning { background: var(--primary-tint); color: var(--primary-text); }
.badge-stopped { background: var(--surface-2); color: var(--muted); }
.badge-error { background: var(--err-bg); color: var(--err-text); }

.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

/* Buttons (GCP Material 3 flat & filled) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent;
  font-size: 12px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
.btn-lg { height: 38px; font-size: 14px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 4px; }
.btn-full { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 1px 3px rgba(26,115,232,0.3); }
html.dark .btn-primary { color: #131417; }

.btn-tonal { background: var(--primary-tint); color: var(--primary-text); }
.btn-tonal:hover { filter: brightness(0.95); }

.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn-outline:hover { background: var(--surface-2); }

.btn-text { background: transparent; color: var(--text-2); padding: 0 10px; }
.btn-text:hover { background: var(--surface-2); }
.btn-text-primary { background: transparent; color: var(--primary-text); padding: 0 10px; font-weight: 600; }
.btn-text-primary:hover { background: var(--primary-tint); }

.btn-danger-outline { background: var(--surface); border-color: var(--border); color: var(--err-text); }
.btn-danger-outline:hover { background: var(--err-bg); border-color: transparent; }

.btn-link { background: none; border: none; color: var(--primary-text); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.btn-link:hover { text-decoration: underline; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-tint);
}

.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1; }

.hub-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.hub-kv {
  padding: 12px; border-radius: 8px; border: 1px solid var(--border-light); background: var(--bg);
  display: flex; flex-direction: column; gap: 6px;
}
.hub-kv-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.hub-kv-val { display: flex; align-items: center; gap: 8px; justify-content: space-between; }

/* Wizard & Modals */
.modal {
  position: fixed; inset: 0; background: rgba(32, 33, 36, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 60;
}
.modal-card {
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 24px; box-shadow: var(--shadow-lg);
}
.modal-lg { max-width: 780px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 500; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border-light); }

.step-section {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.step-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
html.dark .step-num { color: #131417; }

.checkbox-row {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2); cursor: pointer;
}
.checkbox-row input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--primary); }

.probe-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 12px;
}
.probe-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--border-light);
}
.probe-row:last-child { border-bottom: none; }

.advanced-box {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; background: var(--surface);
}
.advanced-box summary { cursor: pointer; font-size: 12px; font-weight: 500; color: var(--primary-text); }

/* Right-side GCP Detail Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(32, 33, 36, 0.35); z-index: 45; }
.gcp-drawer {
  position: fixed; top: 48px; right: 0; bottom: 0; width: 520px; max-width: 95vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); z-index: 50;
  display: flex; flex-direction: column;
}
.drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }

.oauth-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.kv-row { display: flex; align-items: center; gap: 10px; }
.kv-row > span { color: var(--muted); font-size: 12px; }

.code-box {
  background: var(--term-bg); color: var(--term-text);
  border-radius: 6px; padding: 10px 12px; font-size: 12px;
  font-family: "Roboto Mono", monospace;
  max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0;
}
.logs-list { display: flex; flex-direction: column; gap: 10px; }
.log-entry { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--bg); }
.log-entry-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; color: var(--muted); }

.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 99;
  background: #202124; color: #fff;
  padding: 10px 16px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-lg);
}
html.dark .toast { background: #e8eaed; color: #202124; }

@media (min-width: 1800px) {
  .page-header { padding: 14px 32px; }
  .page-content { padding: 24px 32px 56px; }
  .header-search { max-width: 680px; }
  .gcp-drawer { width: 640px; }
  .modal-lg { max-width: 940px; }
  .log-preview-cell { max-width: 480px; }
  .tl-col { max-width: 96px; }
}

@media (min-width: 2300px) {
  .gcp-sidebar { width: 260px; }
  .page-header { padding: 14px 40px; }
  .page-content { padding: 24px 40px 64px; }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gcp-drawer { width: 720px; }
  .log-preview-cell { max-width: 640px; }
  .hub-kv-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
}

@media (max-width: 1120px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .gcp-sidebar { width: 64px; }
  .gcp-sidebar .nav-group-label,
  .gcp-sidebar .nav-text,
  .gcp-sidebar .nav-badge,
  .gcp-sidebar .sidebar-foot { display: none; }
  .header-search { display: none; }
  .form-grid, .quick-grid { grid-template-columns: 1fr; }
}

/* Coding Key -> Local AGY Guide */
.guide-head { margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.guide-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg);
}
.guide-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guide-key-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.guide-key-picker select { min-width: 190px; padding: 5px 8px; font-size: 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.guide-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.guide-tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 8px; }
.guide-tab {
  border: none; background: transparent; color: var(--text-2);
  padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.guide-tab:hover { color: var(--text); }
.guide-tab.active { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow-sm); font-weight: 600; }
.guide-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 12px; border-radius: 8px;
  background: #fef7e0; border: 1px solid #f6d365; color: #7a4f01; font-size: 12px;
}
.guide-note { font-size: 12px; color: var(--text-2); margin-bottom: 10px; line-height: 1.6; }
.guide-footnote { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.guide-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.guide-step { min-width: 0; }
.guide-step-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.guide-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.guide-code-box {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #1e2430; color: #e6edf3;
}
.guide-code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px; background: #262e3d; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; color: #b7c4d6;
}
.guide-code-head .btn-outline { color: #e6edf3; border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
.guide-code-head .btn-outline:hover { background: rgba(255,255,255,0.14); }
.guide-pre {
  margin: 0; padding: 12px 14px; overflow-x: auto; max-height: 380px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px; line-height: 1.55; white-space: pre; color: #e6edf3;
}
.guide-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.guide-tips li strong { color: var(--text); }
