@font-face {
  font-family: GalanoGrotesque;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/media/fonts/galano-grotesque-alt-regular.woff2") format("woff2"),
       url("/media/fonts/galano-grotesque-alt-regular.woff") format("woff");
}

@font-face {
  font-family: GalanoGrotesque;
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("/media/fonts/galano-grotesque-alt-bold.woff2") format("woff2"),
       url("/media/fonts/galano-grotesque-alt-bold.woff") format("woff");
}

:root {
  color-scheme: light;
  font-family: GalanoGrotesque, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #1a1816;
  background: #f2f0ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f2f0ef;
}

button,
a {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: #1a1816;
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.dashboard-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

.dashboard-brand {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  margin-left: 16px;
  align-items: center;
  border-radius: 4px;
}

.dashboard-brand img {
  display: block;
  width: 154px;
  height: auto;
}

.dashboard-main {
  width: 100%;
}

.dashboard-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dashboard-heading h1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  color: #1a1816;
  font-size: clamp(1.5rem, 6.4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  column-gap: 0.5em;
  row-gap: 0.15em;
}

/* "drozq" sits flush left; "Operating Dashboard" is centered on the SAME
   line, measured against the full row (a 1fr / auto / 1fr grid, so the title
   lands at the true middle regardless of the brand's width). On a phone the
   row cannot hold both, so the title drops to its own centered line. */
.dashboard-heading__brand {
  grid-column: 1;
  justify-self: start;
}

.dashboard-heading__title {
  grid-column: 1;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .dashboard-heading h1 {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .dashboard-heading__title {
    grid-column: 2;
  }
}

.dashboard-splash {
  min-width: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.metrics-grid--seller,
.metrics-grid--focus,
.metrics-grid--continuation {
  margin-top: 12px;
}

.metric-card {
  container-type: inline-size;
  min-width: 0;
  min-height: 158px;
  padding: 20px;
  overflow: hidden;
  color: #fff;
  background: #1a1816;
  border: 1px solid #2b2b2b;
  border-top: 3px solid #d92228;
  border-radius: 8px;
}

.metric-card__head {
  display: flex;
  min-width: 0;
  min-height: 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric-card h2,
.metric-card h3,
.metric-card h4 {
  margin: 0;
  color: #f2f0ef;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.metric-card--secondary {
  color: #1a1816;
  background: #fff;
  border-color: #dedad5;
  border-top-color: #1a1816;
}

.metric-card--secondary h3,
.metric-card--secondary h4 {
  color: #3f3a35;
}

.metric-card--secondary .metric-value {
  color: #1a1816;
}

.metric-card--secondary .metric-context,
.metric-card--secondary .metric-source {
  color: #6f6962;
}

.metric-card--secondary .metric-skeleton {
  background: #dedad5;
}

.metric-value {
  min-width: 0;
  min-height: 53px;
  margin: 18px 0 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(2.6rem, 17cqi, 5rem);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  white-space: nowrap;
  text-overflow: clip;
}

.metric-value--long {
  font-size: clamp(2rem, 10cqi, 3.6rem);
}

.metric-value--very-long {
  font-size: clamp(1.25rem, 6.5cqi, 2.5rem);
  letter-spacing: -0.035em;
}

.metric-context,
.metric-source {
  margin: 0;
  color: #beb8b0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.metric-context {
  min-height: 16px;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-source {
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-skeleton {
  display: block;
  width: min(72%, 210px);
  height: 0.76em;
  margin-top: 3px;
  background: #3f4650;
  border-radius: 4px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.metrics-grid--top .metric-card {
  color: #fff;
  background: #2a2a2a;
  border-color: #494949;
  border-top-color: #000;
}

.metrics-grid--top .metric-card h2 {
  color: #f2f0ef;
}

.metrics-grid--top .metric-value {
  color: #fff;
}

.metrics-grid--top .metric-context,
.metrics-grid--top .metric-source {
  color: #c9c5c0;
}

.metrics-grid--top .metric-skeleton {
  background: #575757;
}

.sync-row {
  display: flex;
  min-height: 48px;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-lower {
  margin-top: 44px;
  border-top: 1px solid #d8d4cf;
}

.dashboard-section {
  padding-top: 44px;
}

.dashboard-section + .dashboard-section {
  margin-top: 44px;
  border-top: 1px solid #d8d4cf;
}

.dashboard-section__heading {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-section__heading h2 {
  margin: 0;
  color: #1a1816;
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.dashboard-section__heading p {
  margin: 0;
  color: #6f6962;
  font-size: 0.7rem;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-row + .metric-row {
  margin-top: 28px;
}

.metric-row__title {
  margin: 0 0 10px;
  color: #3f3a35;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.section-footnote {
  margin: 14px 0 0;
  color: #6f6962;
  font-size: 0.7rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metrics-grid--compact .metric-card {
  min-height: 150px;
}

.metrics-grid--compact .metric-value {
  min-height: 47px;
  margin-top: 16px;
}

.sync-status,
.noscript-message {
  margin: 0;
  color: #3f4650;
  font-size: 0.78rem;
  line-height: 1.5;
}

.network-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #3f4650;
  font-size: 0.76rem;
}

.network-error[hidden] {
  display: none;
}

.network-error button {
  min-width: 88px;
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  background: #d92228;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 700;
}

.network-error button:hover {
  background: #a92e2a;
}

.noscript-message {
  padding: 12px 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #d92228;
  outline-offset: 3px;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (min-width: 720px) {
  .dashboard-header {
    min-height: 64px;
  }

  .dashboard-brand {
    margin-left: 32px;
  }

  .dashboard-brand img {
    width: 170px;
  }

  .dashboard-shell {
    padding: 56px 32px 56px;
  }

  .dashboard-heading {
    margin-bottom: 32px;
  }

  .dashboard-heading h1 {
    font-size: clamp(2.75rem, 6vw, 4.5rem);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .metrics-grid--seller,
  .metrics-grid--focus,
  .metrics-grid--continuation {
    margin-top: 16px;
  }

  .metric-card {
    min-height: 196px;
    padding: 24px;
  }

  /* Odd card count on the two-column tablet grid: CALLS MADE spans the first
     row so the money pair (income earned, deals closed) and the activity pair
     (appointments, dials) each sit side by side instead of leaving a hole. */
  .metrics-grid--focus .metric-card:first-child:nth-last-child(odd) {
    grid-column: span 2;
  }

  .metric-value {
    min-height: 68px;
    margin-top: 24px;
  }

  .sync-row {
    margin-top: 22px;
  }

  .dashboard-lower {
    margin-top: 64px;
  }

  .dashboard-section {
    padding-top: 56px;
  }

  .dashboard-section + .dashboard-section {
    margin-top: 56px;
  }

  .dashboard-section__heading {
    margin-bottom: 24px;
  }

  .metric-row + .metric-row {
    margin-top: 36px;
  }

  .metrics-grid--compact .metric-card {
    min-height: 178px;
  }

  .metrics-grid--compact .metric-value {
    min-height: 58px;
    margin-top: 20px;
  }
}

@media (min-width: 1180px) {
  .dashboard-shell {
    padding-top: 72px;
  }

  .dashboard-splash {
    min-height: calc(100vh - 136px);
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Five personal cards (calls, then income earned + deals closed on the
     left, appointments + dials on the right) sit on one row. */
  .metrics-grid--focus {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .metrics-grid--focus .metric-card:first-child:nth-last-child(odd) {
    grid-column: auto;
  }

  .metrics-grid.metrics-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
