﻿:root {
  --gsc-panel: #ffffff;
  --gsc-text: #17202a;
  --gsc-muted: #627083;
  --gsc-border: #d8dee8;
  --gsc-accent: #0f6b5f;
  --gsc-accent-hover: #0a5a50;
  --gsc-danger: #b42318;
}

* {
  box-sizing: border-box;
}

.gsc-app {
  width: min(1120px, calc(100vw - 48px));
  margin: 32px auto 56px;
  color: var(--gsc-text);
}

.gsc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.gsc-eyebrow {
  margin: 0 0 6px;
  color: var(--gsc-accent);
  font-size: 13px;
  font-weight: 800;
}

.gsc-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

.gsc-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--gsc-muted);
}

.gsc-status {
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid var(--gsc-border);
  border-radius: 6px;
  background: var(--gsc-panel);
  color: var(--gsc-muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.gsc-status.connected {
  border-color: rgba(15, 107, 95, 0.35);
  color: var(--gsc-accent);
}

.gsc-panel {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--gsc-border);
  border-radius: 8px;
  background: var(--gsc-panel);
}

.gsc-panel h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.gsc-panel p {
  margin: 0;
  color: var(--gsc-muted);
  font-size: 14px;
}

.gsc-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gsc-panel label,
.gsc-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.gsc-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.gsc-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gsc-info-grid > div {
  padding: 14px;
  border-left: 3px solid var(--gsc-accent);
  background: #f6f8fa;
}

.gsc-info-grid strong {
  display: block;
  font-size: 16px;
}

.gsc-output-grid {
  margin-top: 12px;
}

.gsc-output-grid p {
  margin-top: 5px;
  line-height: 1.6;
}

.gsc-note {
  margin-top: 14px !important;
  line-height: 1.65;
}

.gsc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.gsc-app button,
.gsc-app select {
  font: inherit;
}

.gsc-app button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--gsc-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.gsc-app button:hover:not(:disabled) {
  background: var(--gsc-accent-hover);
}

.gsc-app button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gsc-app select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--gsc-border);
  border-radius: 6px;
  background: #fff;
  color: var(--gsc-text);
}

.gsc-progress-panel {
  margin-bottom: 0;
}

.gsc-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--gsc-muted);
  font-size: 14px;
  font-weight: 800;
}

.gsc-progress-row .error,
.error {
  color: var(--gsc-danger);
}

.gsc-app progress {
  width: 100%;
  height: 14px;
  accent-color: var(--gsc-accent);
}

.gsc-details {
  margin-top: 14px;
}

.gsc-details summary {
  cursor: pointer;
  color: var(--gsc-muted);
  font-size: 13px;
  font-weight: 800;
}

.gsc-details pre {
  min-height: 120px;
  max-height: 300px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 6px;
  background: #111827;
  color: #d6e4ff;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .gsc-app {
    width: min(100% - 28px, 1120px);
    margin: 18px auto 40px;
  }

  .gsc-header,
  .gsc-section-heading {
    display: block;
  }

  .gsc-header h1 {
    font-size: 27px;
  }

  .gsc-status {
    width: fit-content;
    margin-top: 12px;
  }

  .gsc-panel {
    padding: 15px;
  }

  .gsc-section-heading button {
    width: 100%;
    margin-top: 14px;
  }

  .gsc-inline,
  .gsc-info-grid {
    grid-template-columns: 1fr;
  }

  .gsc-inline button,
  .gsc-actions button {
    width: 100%;
  }

  .gsc-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
.gsc-period, .gsc-actions { display:flex; align-items:center; gap:12px; }
.gsc-period input { width:180px; }
.gsc-period span { color:var(--gsc-muted); font-size:14px; }
.gsc-actions { justify-content:flex-end; }
.gsc-actions button:first-child { margin-left:auto; }
.gsc-section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.gsc-section-heading h2 { margin:0 0 4px; font-size:18px; }
.gsc-section-heading p { margin:0; color:var(--gsc-muted); }
.gsc-note { line-height:1.6; }
@media (max-width:720px) { .gsc-period, .gsc-section-heading { display:block; } .gsc-period input { width:100%; margin-bottom:8px; } .gsc-actions { display:grid; } .gsc-actions button:first-child { margin-left:0; } }


/* Shared polish: consistent typography and a modern period control. */
.gsc-app, .gsc-app button, .gsc-app input, .gsc-app select, .gsc-app textarea { font-family: inherit; }
.gsc-app button { border-radius: 10px; box-shadow: 0 8px 18px -12px rgba(15, 107, 95, .8); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.gsc-app button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(15, 107, 95, .95); }
.gsc-period { width: 100%; justify-content: flex-end; }
.gsc-period span { margin-right: auto; }
.gsc-period input { width: 220px; height: 50px; padding: 0 16px; border: 1px solid rgba(15, 107, 95, .24); border-radius: 14px; background: linear-gradient(135deg, #ffffff 0%, #f2faf8 100%); box-shadow: 0 10px 24px -18px rgba(15, 107, 95, .8); color: var(--gsc-text); font-size: 16px; font-weight: 800; text-align: center; }
.gsc-period input:focus { outline: 3px solid rgba(15, 107, 95, .16); border-color: var(--gsc-accent); }
@media (max-width: 720px) {
  .gsc-period { display: flex; flex-direction: column; align-items: stretch; }
  .gsc-period input { width: min(100%, 260px); align-self: flex-end; }
  .gsc-period span { order: 2; margin: 0; }
  .gsc-section-heading button { width: auto; margin: 12px 0 0 auto; }
  .gsc-actions button { width: auto; }
}
/* Numbered steps use one visual hierarchy across every tool. */
.step-label { display: block; margin-bottom: 10px; font-size: 18px !important; line-height: 1.3; font-weight: 800 !important; letter-spacing: -0.01em; }
/* Calendar-like month picker: the control stays anchored to the right edge. */
.gsc-period, .ga4-period { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.period-help { flex: 1 1 auto; color: var(--gsc-muted, var(--ga4-muted)); font-size: 14px; line-height: 1.6; }
.period-picker { position: relative; flex: 0 0 auto; margin-left: auto; }
.period-picker-trigger { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 232px; min-height: 56px; padding: 8px 14px; border: 1px solid rgba(15, 107, 95, .22) !important; border-radius: 14px !important; background: #fff !important; color: var(--gsc-text, var(--ga4-text)) !important; box-shadow: 0 10px 26px -18px rgba(15, 107, 95, .85) !important; text-align: left; }
.period-picker-trigger:hover { border-color: rgba(15, 107, 95, .55) !important; background: #f5fbf9 !important; }
.period-picker-caption { color: var(--gsc-muted, var(--ga4-muted)); font-size: 12px; font-weight: 700; }
.period-picker-trigger strong { font-size: 16px; font-weight: 800; white-space: nowrap; }
.period-picker-chevron { color: var(--gsc-accent, var(--ga4-accent)); font-size: 20px; line-height: 1; transform: translateY(-2px); }
.period-picker-popover { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: 306px; padding: 16px; border: 1px solid rgba(15, 107, 95, .16); border-radius: 16px; background: #fff; box-shadow: 0 20px 46px -20px rgba(15, 35, 32, .38); }
.period-picker-popover[hidden] { display: none; }
.period-picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: var(--gsc-text, var(--ga4-text)); }
.period-picker-header strong { font-size: 17px; }
.period-picker-nav { display: inline-grid !important; place-items: center; width: 34px !important; min-height: 34px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--gsc-text, var(--ga4-text)) !important; box-shadow: none !important; font-size: 24px !important; line-height: 1; }
.period-picker-nav:hover { background: #eef7f4 !important; color: var(--gsc-accent, var(--ga4-accent)) !important; transform: none !important; }
.period-picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.period-picker-month { min-height: 42px !important; padding: 0 8px !important; border: 0 !important; border-radius: 10px !important; background: #f5f7f8 !important; color: var(--gsc-text, var(--ga4-text)) !important; box-shadow: none !important; font-size: 14px !important; font-weight: 700 !important; }
.period-picker-month:hover { background: #dff1ec !important; color: var(--gsc-accent, var(--ga4-accent)) !important; transform: none !important; }
.period-picker-month.selected { background: var(--gsc-accent, var(--ga4-accent)) !important; color: #fff !important; }
@media (max-width: 720px) {
  .gsc-period, .ga4-period { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .period-picker { align-self: flex-end; }
  .period-picker-popover { width: min(306px, calc(100vw - 48px)); }
}
