/* Country Fantasy Football app shell.
   Header, nav and colours carried over from the Apps Script dashboard
   (DashboardApp.html header/nav and its Tailwind colour tokens), written
   as plain CSS so no Tailwind CDN is needed. */

:root {
  --surface-dim: #131313;
  --surface-border: #262626;
  --surface-container: #1f1f1f;
  --surface-container-high: #2a2a2a;
  --brand-green: #86c43f;
  --on-primary: #1e3700;
  --on-surface: #e2e2e2;
  --on-surface-variant: #c2c9b3;
  --page: #dbd9d9;
  --panel: #ffffff;
  --ink: #333333;
  --muted: #666666;
  --line: #d8d8d8;
  --font-title: "Hanken Grotesk", Arial, Helvetica, sans-serif;
  --font-body: Inter, Arial, Helvetica, sans-serif;
  --gutter: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

/* Top black bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: var(--surface-dim);
  border-bottom: 1px solid var(--surface-border);
}

.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: none;
}

.brand-name {
  overflow: hidden;
  color: var(--brand-green);
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.env-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--on-surface);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Second bar: tabs */

.tabs {
  position: sticky;
  top: calc(65px + env(safe-area-inset-top));
  z-index: 40;
  background: var(--surface-container-high);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tabs-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tab {
  padding: 6px 16px;
  border-radius: 0.75rem;
  color: var(--on-surface-variant);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 800;
  line-height: 16px;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.tab:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}

.tab:active {
  transform: scale(0.95);
}

.tab.active {
  background: var(--brand-green);
  color: var(--on-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Page body */

.page {
  flex: 1;
  padding-bottom: env(safe-area-inset-bottom);
}

.page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 48px;
}

.page-title {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.empty-card {
  padding: 40px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.empty-title {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.empty-text {
  margin: 0;
  color: var(--muted);
}

/* Phones */

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }

  .topbar-inner {
    height: 56px;
  }

  .tabs {
    top: calc(57px + env(safe-area-inset-top));
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 16px;
  }

  .env-label {
    display: none;
  }

  /* Five equal tabs that always fit: no sideways scrolling. */
  .tabs-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 0 6px;
  }

  .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 4px 2px;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .page-inner {
    padding: 16px 16px 32px;
  }

  .page-title {
    font-size: 24px;
  }
}
