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

* { box-sizing: border-box; }

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

.ga4-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.ga4-eyebrow { margin: 0 0 6px; color: var(--ga4-accent); font-size: 13px; font-weight: 800; }
.ga4-header h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.ga4-lead { max-width: 720px; margin: 10px 0 0; color: var(--ga4-muted); }
.ga4-status { min-width: 92px; padding: 8px 12px; border: 1px solid var(--ga4-border); border-radius: 6px; background: var(--ga4-panel); color: var(--ga4-muted); text-align: center; font-size: 13px; font-weight: 800; }
.ga4-status.connected { border-color: rgba(15, 107, 95, 0.35); color: var(--ga4-accent); }
.ga4-panel { margin-bottom: 14px; padding: 20px; border: 1px solid var(--ga4-border); border-radius: 8px; background: var(--ga4-panel); }
.ga4-panel h2 { margin: 0 0 4px; font-size: 18px; }
.ga4-panel p { margin: 0; color: var(--ga4-muted); font-size: 14px; }
.ga4-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ga4-panel label, .ga4-field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.ga4-inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.ga4-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ga4-info-grid > div { padding: 14px; border-left: 3px solid var(--ga4-accent); background: #f6f8fa; }
.ga4-info-grid strong { display: block; font-size: 16px; }
.ga4-output-grid { margin-top: 12px; }
.ga4-output-grid p { margin-top: 5px; line-height: 1.6; }
.ga4-note { margin-top: 14px !important; line-height: 1.65; }
.ga4-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ga4-app button, .ga4-app select { font: inherit; }
.ga4-app button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--ga4-accent); color: #fff; cursor: pointer; font-weight: 800; }
.ga4-app button:hover:not(:disabled) { background: var(--ga4-accent-hover); }
.ga4-app button:disabled { cursor: not-allowed; opacity: 0.45; }
.ga4-app select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--ga4-border); border-radius: 6px; background: #fff; color: var(--ga4-text); }
.ga4-progress-panel { margin-bottom: 0; }
.ga4-progress-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: var(--ga4-muted); font-size: 14px; font-weight: 800; }
.ga4-progress-row .error, .error { color: var(--ga4-danger); }
.ga4-app progress { width: 100%; height: 14px; accent-color: var(--ga4-accent); }
.ga4-details { margin-top: 14px; }
.ga4-details summary { cursor: pointer; color: var(--ga4-muted); font-size: 13px; font-weight: 800; }
.ga4-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) {
  .ga4-app { width: min(100% - 28px, 1120px); margin-top: 22px; }
  .ga4-header, .ga4-section-heading { align-items: flex-start; flex-direction: column; }
  .ga4-header h1 { font-size: 27px; }
  .ga4-info-grid { grid-template-columns: 1fr; }
  .ga4-inline { grid-template-columns: 1fr; }
}
.ga4-period { display:flex; align-items:center; gap:12px; }
.ga4-period input { width:180px; }
.ga4-period span { color:var(--ga4-muted); font-size:14px; }
.ga4-actions { justify-content:flex-end; }
.ga4-actions button:first-child { margin-left:auto; }
.ga4-section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.ga4-section-heading h2 { margin:0 0 4px; font-size:18px; }
.ga4-section-heading p { margin:0; color:var(--ga4-muted); }
.ga4-note { line-height:1.65; }
@media (max-width:720px) { .ga4-period, .ga4-section-heading { display:block; } .ga4-period input { width:100%; margin-bottom:8px; } .ga4-actions { display:grid; } .ga4-actions button:first-child { margin-left:0; } }


/* Shared polish: consistent typography and a modern period control. */
.ga4-app, .ga4-app button, .ga4-app input, .ga4-app select, .ga4-app textarea { font-family: inherit; }
.ga4-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; }
.ga4-app button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(15, 107, 95, .95); }
.ga4-period { width: 100%; justify-content: flex-end; }
.ga4-period span { margin-right: auto; }
.ga4-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(--ga4-text); font-size: 16px; font-weight: 800; text-align: center; }
.ga4-period input:focus { outline: 3px solid rgba(15, 107, 95, .16); border-color: var(--ga4-accent); }
@media (max-width: 720px) {
  .ga4-period { display: flex; flex-direction: column; align-items: stretch; }
  .ga4-period input { width: min(100%, 260px); align-self: flex-end; }
  .ga4-period span { order: 2; margin: 0; }
  .ga4-section-heading button { width: auto; margin: 12px 0 0 auto; }
  .ga4-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)); }
}
