/* ── Brand tokens, values from the website's design system (tokens.css) ── */
:root {
  --navy:       #171726;
  --navy-light: #272741;
  --cyan:       #4af7e9;
  --cyan-dark:  #6ffaee;
  --teal:       #009099;
  --teal-text:  #00787f;
  --teal-deep:  #013d47;
  --light:      #eef1fa;
  --light-mid:  #d5d5e8;
  --white:      #ffffff;
  --text-body:  #3a3a59;
  --text-muted: rgba(58, 58, 89, 0.65);
  --radius-pill: 100px;
  --radius-card: 15px;
  --container:  1180px;
  --font: "Rubik", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* The website's focus ring (base.css :focus-visible), on every focusable element. */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ── Card pages (login, error): one card centred in the main area ── */

/* The website's page hero (tokens.css --gradient-page-hero) behind the card. */
.portal-main.portal-main--card {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 140% at 82% -10%, #15384a 0%, #171726 46%, #06262b 100%);
}
.portal-card {
  width: 100%;
  max-width: 420px; /* room for the login page's "No Google account?" line on one line */
  padding: 32px 28px 28px;
  background: var(--white);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.portal-card__title {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.25;
}
.portal-card__note {
  margin: 18px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.portal-card__note + .portal-card__note { margin-top: 6px; }
@media (min-width: 481px) { .portal-card__note--one-line { white-space: nowrap; } }
.portal-card__note a { color: var(--teal-text); text-decoration: none; }
.portal-card__note a:hover { text-decoration: underline; }

/* login.html */
.portal-card__subtitle {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0 0 28px;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 12px 16px;
  background: var(--cyan);
  color: var(--teal-deep);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, box-shadow 0.14s;
}
.btn-google:hover { background: var(--cyan-dark); transform: translateY(-1px); }
.btn-google__icon { width: 17px; height: 17px; flex-shrink: 0; }

/* error.html */
.portal-card__message {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0 0 28px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s;
}
.btn-back:hover { background: var(--navy-light); }

/* ── Authenticated shell (base.html) ── */

body {
  margin: 0;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased; /* as the website's base.css: thinner light-on-dark text on macOS */
  background: var(--light);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar: the website header (components.css .header). Solid rather than the website's translucent
   black, which only reads as black over the website's dark hero; over the portal's light page it turns grey. */
.portal-nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.portal-nav__inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 68px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.nav-brand { flex-shrink: 0; border-radius: 3px; }
/* Lifted 3px as the website's .brand img: the logo's box includes the bars above the "i", so without it
   the letters sit below the breadcrumb text. transform, so the bar's layout is untouched. */
.nav-logo { height: 26px; width: auto; display: block; transform: translateY(-3px); }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-right form { margin: 0; }
.nav-user { font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); }
.btn-signout {
  padding: 0.55rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-signout:hover { color: var(--white); border-color: var(--white); transform: translateY(-1px); }

.page-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 5px 0 5px 30px; /* vertical room for the breadcrumb focus ring inside overflow:hidden */
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-main {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 32px 4rem;
  flex: 1;
}

.portal-footer {
  background: var(--navy);
  padding: 24px 0;
  flex-shrink: 0;
}
.portal-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-logo { height: 20px; width: auto; opacity: 0.7; }
.footer-copy { font-size: 0.8rem; color: rgba(238, 241, 250, 0.55); }

/* ── index.html ── */

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin: 0 0 12px;
}
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.account-card {
  background: var(--white);
  border: 1px solid var(--light-mid);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.account-card:hover {
  box-shadow: 0 4px 16px rgba(23, 23, 38, 0.08);
  transform: translateY(-1px);
}
.card-favicon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
}
.card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  flex: 1;
  line-height: 1.3;
}
.btn-view {
  padding: 6px 14px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.12s;
}
.btn-view:hover { background: var(--navy-light); }
.accounts-empty {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.accounts-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}
.btn-toggle {
  padding: 6px 14px;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--light-mid);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.btn-toggle:hover { background: var(--light-mid); }

/* ── client.html ── */

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.month-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--light-mid);
  background: var(--white);
  color: var(--text-body);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.month-nav-btn:hover:not(:disabled) {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.month-nav-btn:disabled { opacity: 0.35; cursor: default; }
.month-nav-btn svg { width: 16px; height: 16px; }
.month-heading {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-align: center;
  flex: 1;
}

.day-group { margin-bottom: 1.25rem; }
.day-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--light-mid);
}

.report-list { list-style: none; margin: 0; padding: 0; }
.report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--white);
  border: 1px solid var(--light-mid);
  border-radius: 10px;
  margin-top: 6px;
}
.report-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
}
.report-icon svg { width: 16px; height: 16px; }
.report-info { flex: 1; min-width: 0; }
.report-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-decoration: none;
}
.report-name:hover { text-decoration: underline; }
.report-name:focus-visible { border-radius: 3px; }
/* Staff-only rows for reports not yet published to the client. */
.report-row--hidden { background: var(--light); border-style: dashed; }
.report-row--hidden .report-icon { color: var(--text-muted); }
.report-row--hidden .report-name { color: var(--text-muted); font-weight: 500; }

.report-visibility-form { margin: 0; }
.report-visibility {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--light-mid);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-body);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.report-visibility:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
/* Teal border and text on the Publish button, but not while hovered — this rule ties on specificity
   with :hover and would otherwise win on source order, leaving teal text on a teal background. */
.report-row--hidden .report-visibility:not(:hover) { border-color: var(--teal); color: var(--teal); }

/* One report, framed under the header (report.html). The title is a breadcrumb:
   the client name links back to the month the report belongs to. */
.breadcrumb-link { color: rgba(255, 255, 255, 0.62); text-decoration: none; }
.breadcrumb-link:hover { color: var(--white); text-decoration: underline; }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.45); font-weight: 400; margin: 0 10px; }
.portal-main.portal-main--frame {
  max-width: none;
  padding: 0;
  display: flex;
}
.report-frame {
  flex: 1;
  border: 0;
  background: var(--white);
}

.report-delete-form { margin: 0; }
.report-delete {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid #d94f4f;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  color: #d94f4f;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.report-delete:hover {
  background: #d94f4f;
  color: var(--white);
}

.reports-empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
}
.reports-empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--light-mid);
}
.reports-empty-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-body);
  margin: 0 0 6px;
}
.reports-empty-sub { font-size: 0.8125rem; margin: 0; }

/* Below 900px (the website's own header breakpoint) the breadcrumb drops to its own row under the
   logo: sharing the row with the email and Sign out, a long client name hides the report name. */
@media (max-width: 900px) {
  .portal-nav__inner { flex-wrap: wrap; height: auto; min-height: 60px; gap: 0 16px; }
  .page-title {
    order: 1;
    flex-basis: 100%;
    padding: 10px 0 12px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  .nav-brand, .nav-right { padding: 14px 0; }
}

@media (max-width: 600px) {
  .portal-nav__inner { padding: 0 16px; }
  .nav-user { display: none; }
  .nav-logo { height: 20px; }
  .portal-main { padding: 1.25rem 1rem 3rem; }
  .portal-footer__inner { padding: 0 16px; }
}
