:root {
  color-scheme: light;
  --bg: #eff2f7;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.18);
  --text: rgba(0, 0, 0, 0.87);
  --muted: #708090;
  --brand: #1f2b3d;
  --brand-strong: #23324a;
  --primary: #3457d5;
  --primary-soft: rgba(52, 87, 213, 0.08);
  --green: #198754;
  --danger: #dc3545;
  --warning: #d9822b;
  --shadow: 0 3px 11px -4px rgba(125, 125, 125, 0.75);
  --radius: 16px;
}

* {
  box-sizing: border-box;
  letter-spacing: normal !important;
}

html,
body {
  min-height: 100%;
}

body.tc-app-styles {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
}

a {
  color: #337ab7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.top-banner {
  background: #eef4ff;
  color: #1d3f91;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
}

.top-banner a {
  color: inherit !important;
}

.fixed-top-navigation {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px rgba(31, 43, 61, 0.22);
}

.tc-nav-container {
  width: min(1320px, calc(100% - 28px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.toolbar-logo {
  flex-shrink: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, #dbe7ff);
  color: var(--brand);
  font-family: Roboto, sans-serif;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.08em !important;
}

.toolbar-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.toolbar-eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em !important;
  color: rgba(255, 255, 255, 0.64);
  font-weight: 700;
}

.toolbar-title strong {
  font-family: Roboto, sans-serif;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 500;
}

.toolbar-right,
.gpt-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-right a {
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 13px;
  white-space: nowrap;
}

.toolbar-btn,
.landing-btn,
.primary-action,
.secondary-action,
.step-link,
.list-account-btn,
.account-option,
.icon-btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.toolbar-btn,
.icon-btn {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.toolbar-btn:hover,
.icon-btn:hover,
.landing-btn:hover,
.primary-action:hover,
.secondary-action:hover,
.step-link:hover,
.list-account-btn:hover,
.account-option:hover {
  transform: translateY(-1px);
}

.app-shell {
  width: min(1320px, calc(100% - 30px));
  margin: 0 auto;
}

.body-container {
  margin-top: 36px;
  margin-left: 15px;
  margin-right: 15px;
}

.home-content {
  padding-bottom: 40px;
}

.select-google-or-ms-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 28px 28px;
  text-align: center;
}

.select-google-or-ms-header h2 {
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em !important;
}

.select-google-or-ms-header p {
  width: min(760px, 100%);
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.select-google-or-ms-text {
  width: 100%;
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.16em !important;
}

.button-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.landing-btn {
  min-width: 250px;
  min-height: 56px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 43, 61, 0.16);
}

.landing-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.landing-btn-light {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.landing-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: Roboto, sans-serif;
  background: rgba(255, 255, 255, 0.16);
}

.landing-btn-light .landing-btn-icon {
  background: rgba(31, 43, 61, 0.08);
}

.landing-btn-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.landing-btn-copy strong {
  font-size: 15px;
}

.landing-btn-copy span {
  font-size: 12px;
  opacity: 0.86;
}

.own-credentials-card {
  width: min(620px, 100%);
  margin: 24px auto 0;
  padding: 18px 18px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
}

.own-credentials-card summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.own-credentials-card summary::-webkit-details-marker {
  display: none;
}

.own-credential-text {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.input-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.input-shell {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.input-shell span {
  font-weight: 700;
  color: var(--text);
}

.input-shell input,
.input-shell textarea,
.input-shell select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
}

.input-shell textarea {
  min-height: 116px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.6;
}

.continue-btn {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.primary-action,
.secondary-action,
.step-link {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-action {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 26px rgba(52, 87, 213, 0.24);
}

.secondary-action,
.step-link {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 24px;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.faq-card h3 {
  margin: 0 0 10px;
  font-family: Roboto, sans-serif;
  font-size: 19px;
}

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

.faq-card ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.logical-content {
  margin-top: 84px;
  margin-left: 15px;
  margin-right: 15px;
}

.horizontal-stepper {
  background: transparent;
}

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

.step-link {
  min-height: 74px;
  justify-content: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  text-align: left;
  background: #fff;
}

.step-link strong {
  display: block;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.12em !important;
}

.step-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.step-link.is-current {
  border-color: rgba(52, 87, 213, 0.45);
  background: rgba(52, 87, 213, 0.08);
}

.step-link.is-complete {
  border-color: rgba(25, 135, 84, 0.24);
}

.stepper-panel {
  margin-top: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.stepper-section-title {
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: 24px;
}

.stepper-section-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.mcc-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.list-account-btn {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: left;
}

.list-account-btn.is-selected {
  border-color: rgba(52, 87, 213, 0.45);
  background: rgba(52, 87, 213, 0.08);
}

.mcc-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.customer-name {
  font-weight: 700;
  font-size: 15px;
}

.customer-id {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.is-manager {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.14);
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.query-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  margin-top: 18px;
}

.account-picker {
  display: grid;
  gap: 12px;
  align-content: start;
}

.account-option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-align: left;
}

.account-option.active {
  border-color: rgba(52, 87, 213, 0.45);
  background: rgba(52, 87, 213, 0.08);
}

.account-option strong {
  display: block;
}

.account-option span {
  color: var(--muted);
}

.query-workspace {
  display: grid;
  gap: 18px;
}

.query-row {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 165px;
  align-items: start;
}

.query-tx textarea {
  min-height: 260px;
}

.query-actions {
  display: grid;
  gap: 12px;
}

.execute-btn,
.export-btn {
  width: 165px;
}

.execute-btn {
  height: 60px;
  line-height: 20px;
}

.execute-btn .second-line {
  font-size: 10px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 22px;
  font-size: 14px;
}

.resource-link .material-symbols-outlined {
  font-size: 17px;
}

.result-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.result-info span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.table-container {
  overflow: auto;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  vertical-align: top;
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.results-table thead th {
  position: sticky;
  top: 0;
  background: #fafbff;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.results-table td {
  word-break: break-word;
}

.empty-state,
.unavailable-state {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.7;
}

.pager-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.pager-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

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

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-width: 260px;
  max-width: min(440px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #1f2433;
  color: #fff;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
}

.toast.is-error {
  background: #862634;
}

.toast.is-success {
  background: #11653a;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(13, 18, 28, 0.56);
}

.copy-dialog {
  width: min(860px, 100%);
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.copy-dialog-head,
.copy-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.copy-dialog-head {
  border-bottom: 1px solid var(--line);
}

.copy-dialog-head h2 {
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: 24px;
}

.copy-dialog-content {
  padding: 20px;
}

.copy-token-field textarea {
  min-height: 220px;
}

.copy-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.tc-footer {
  text-align: center;
  margin: 20px 0 12px;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .tc-nav-container {
    width: min(1320px, calc(100% - 18px));
    flex-wrap: wrap;
    justify-content: center;
  }

  .toolbar-right,
  .gpt-area {
    width: 100%;
    justify-content: center;
  }

  .query-layout,
  .query-row {
    grid-template-columns: 1fr;
  }

  .query-actions {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .execute-btn,
  .export-btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .top-banner {
    font-size: 12px;
    line-height: 1.5;
  }

  .toolbar-title strong {
    font-size: 17px;
  }

  .select-google-or-ms-panel,
  .stepper-panel,
  .faq-card {
    padding: 18px;
  }

  .stepper-track {
    grid-template-columns: 1fr;
  }

  .mcc-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-info,
  .pager-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-btn {
    width: 100%;
    justify-content: center;
  }
}
