/* simpleroute client app — aligned to simpleroute.com brand palette */
:root {
  --sr-green: #06b059;
  --sr-green-hover: #078845;
  --sr-green-soft: #81c784;
  --sr-green-tint: #e8f5e9;
  --sr-ink: #131b17;
  --sr-ink-2: #272e2a;
  --sr-muted: #636466;
  --sr-line: #d9ddd9;
  --sr-surface: #ffffff;
  --sr-canvas: #f1f0f0;
  --sr-warn: #b45309;
  --radius: 10px;
  --shadow: 0 10px 28px rgba(41, 51, 61, 0.08);
  --font-body: "stevie-sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "rig-sans", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  color: var(--sr-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--sr-canvas);
  position: relative;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(6, 176, 89, 0.18), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(129, 199, 132, 0.22), transparent 55%),
    linear-gradient(180deg, #f7faf7 0%, var(--sr-canvas) 42%, #e9eee9 100%);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(19, 27, 23, 0.08);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
}

.brand-product {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sr-green);
  border-left: 1px solid var(--sr-line);
  padding-left: 0.75rem;
  line-height: 1.2;
  max-width: 9.5rem;
}

.user-chip {
  font-size: 0.85rem;
  max-width: min(52vw, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  flex: 1;
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 9rem);
  padding: 1rem 0;
}

.auth-card,
.panel {
  width: 100%;
  background: var(--sr-surface);
  border: 1px solid rgba(19, 27, 23, 0.08);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}

.auth-card {
  max-width: 440px;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sr-green);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sr-ink);
  margin: 0 0 0.5rem;
}

h1 { font-size: clamp(1.75rem, 3vw, 2.1rem); }
h2 { font-size: 1.35rem; }

.lede {
  margin: 0 0 1.25rem;
  color: var(--sr-muted);
}

.panel-lede {
  margin: -0.15rem 0 1rem;
}

.oauth-stack,
.stack {
  display: grid;
  gap: 0.75rem;
}

.btn,
button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
}

.btn.primary,
button.primary {
  background: var(--sr-green);
  color: #fff;
}

.btn.primary:hover,
button.primary:hover {
  background: var(--sr-green-hover);
}

.btn.secondary,
button.secondary {
  background: var(--sr-green-tint);
  color: var(--sr-ink);
  border-color: rgba(6, 176, 89, 0.25);
}

.btn.secondary:hover,
button.secondary:hover {
  background: #d9efdc;
}

.btn.ghost,
button.ghost {
  background: transparent;
  color: var(--sr-ink-2);
  border-color: var(--sr-line);
}

.btn.oauth {
  width: 100%;
  background: #fff;
  color: var(--sr-ink);
  border-color: var(--sr-line);
  box-shadow: 0 1px 2px rgba(19, 27, 23, 0.04);
}

.btn.oauth:hover {
  border-color: var(--sr-green);
  box-shadow: 0 4px 14px rgba(6, 176, 89, 0.12);
}

.oauth-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: var(--sr-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--sr-line);
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sr-ink-2);
}

input {
  width: 100%;
  border: 1px solid var(--sr-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--sr-ink);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(6, 176, 89, 0.35);
  border-color: var(--sr-green);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.tab {
  background: #fff;
  border: 1px solid var(--sr-line);
  color: var(--sr-ink-2);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.tab.active {
  background: var(--sr-green);
  border-color: var(--sr-green);
  color: #fff;
}

.tab-logout {
  margin-left: auto;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.metric-card {
  border: 1px solid rgba(19, 27, 23, 0.08);
  border-radius: var(--radius);
  padding: 1rem;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.metric-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.metric-card .value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sr-green-hover);
  letter-spacing: -0.02em;
}

.metric-card label {
  margin-top: 0.65rem;
  font-weight: 500;
  color: var(--sr-muted);
}

.muted { color: var(--sr-muted); }
.msg { min-height: 1.25rem; color: var(--sr-warn); margin: 0.75rem 0 0; font-size: 0.9rem; }
.hint { margin: 0.85rem 0 0; font-size: 0.8rem; line-height: 1.4; }
.hidden { display: none !important; }

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--sr-line);
  align-items: center;
}

.ticket-row button {
  background: var(--sr-green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.5rem 0.85rem;
}

.slot {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--sr-line);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  font-size: 0.9rem;
}

.slot:hover {
  border-color: var(--sr-green);
  background: var(--sr-green-tint);
}

.slots-wrap { margin-top: 1rem; }

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.8rem;
}

.site-foot a {
  color: var(--sr-green-hover);
  text-decoration: none;
  font-weight: 600;
}

.site-foot a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .top { padding: 0.85rem 1rem; }
  .brand-logo { height: 28px; }
  .brand-product { font-size: 0.72rem; padding-left: 0.55rem; max-width: 7.5rem; }
  .auth-card, .panel { padding: 1.35rem 1.1rem; }
  main { width: min(960px, calc(100% - 1.25rem)); }
}
