:root {
  --ttg-blue: #17359d;
  --ttg-azure: #16beed;
  --ttg-orange: #ff8f62;
  --ttg-lilac: #ddcdf2;
  --ttg-black: #0f1217;
  --white: #ffffff;
  --paper: #f8f7fb;
  --paper-warm: #fff8f3;
  --ink-soft: #5e6470;
  --line: rgba(15, 18, 23, 0.09);
  --shadow-soft: 0 12px 30px rgba(15, 18, 23, 0.07);
  --shadow-lift: 0 18px 42px rgba(23, 53, 157, 0.13);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-readable: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ttg-black);
  background:
    linear-gradient(90deg, rgba(221, 205, 242, 0.48) 0 9rem, transparent 9rem),
    linear-gradient(180deg, rgba(22, 190, 237, 0.12) 0 18rem, transparent 18rem),
    radial-gradient(circle at 94% 4%, rgba(255, 143, 98, 0.24), transparent 24rem),
    var(--paper);
  font-family:
    "Program OT", "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.dashboard-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px clamp(18px, 3vw, 32px) 36px;
}

.logo-header {
  display: flex;
  align-items: center;
  min-height: 82px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-width: 178px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 178px;
  height: auto;
}

.updated-stamp {
  display: grid;
  gap: 4px;
  margin: 0;
  text-align: right;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.updated-stamp time {
  position: relative;
  justify-self: end;
  color: var(--ttg-black);
  font-size: 0.98rem;
  cursor: help;
  text-transform: none;
}

.updated-stamp time::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: max-content;
  max-width: min(280px, 80vw);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ttg-black);
  box-shadow: var(--shadow-soft);
  color: var(--white);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  white-space: normal;
}

.updated-stamp time:hover::after,
.updated-stamp time:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--ttg-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.panel h2 {
  font-size: clamp(1.65rem, 2.35vw, 2.2rem);
  line-height: 1.05;
}

.score-panel h2 {
  font-size: clamp(1.45rem, 1.9vw, 1.85rem);
  line-height: 1.08;
}

.birthdays-panel h2,
.anniversaries-panel h2,
.holidays-panel h2 {
  font-size: clamp(1.55rem, 2vw, 1.95rem);
  line-height: 1.08;
}

.dashboard-section,
.people-grid,
.widget-grid {
  margin-top: 22px;
}

.first-section {
  margin-top: 10px;
}

.section-heading {
  display: block;
  margin-bottom: 12px;
}

.section-heading.has-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading.compact {
  display: block;
  margin-bottom: 14px;
}

.secondary-heading {
  margin-top: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trips-grid .compact-kpi-grid {
  display: contents;
}

.people-summary-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(260px, 0.34fr);
  gap: 14px;
  margin-bottom: 14px;
}

.single-kpi-grid {
  grid-template-columns: 1fr;
}

.stat-card,
.panel,
.value-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.stat-card:hover,
.panel:hover,
.value-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 190, 237, 0.5);
  box-shadow: var(--shadow-lift);
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 18px;
}

.stat-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--accent) 0 9px, transparent 9px),
    linear-gradient(150deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%);
  content: "";
}

.stat-card::after {
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  border: 18px solid color-mix(in srgb, var(--accent) 24%, transparent);
  content: "";
}

.stat-label,
.stat-value,
.stat-meta {
  position: relative;
  z-index: 1;
}

.stat-label {
  max-width: 13rem;
  margin-bottom: 26px;
  color: var(--ttg-blue);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-value {
  font-size: clamp(2.8rem, 4.4vw, 3.8rem);
  font-weight: 800;
  line-height: 0.92;
}

.stat-meta {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.widget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
}

.people-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
}

.panel {
  padding: 22px;
}

.birthday-list,
.anniversary-list,
.event-list,
.holiday-list {
  display: grid;
  gap: 9px;
}

.birthday-item,
.anniversary-item,
.event-item,
.holiday-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(221, 205, 242, 0.5), rgba(255, 255, 255, 0.95)),
    var(--white);
}

.anniversary-item {
  background:
    linear-gradient(135deg, rgba(22, 190, 237, 0.14), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.event-item {
  grid-template-columns: auto 1fr;
  background:
    linear-gradient(135deg, rgba(22, 190, 237, 0.13), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.holiday-item {
  grid-template-columns: auto 1fr;
  background:
    linear-gradient(135deg, rgba(255, 143, 98, 0.16), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.date-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(23, 53, 157, 0.16);
  line-height: 1;
}

.date-badge span:first-child {
  color: var(--ttg-blue);
  font-size: 1.3rem;
  font-weight: 800;
}

.date-badge span:last-child {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.birthday-name {
  margin: 0 0 5px;
  font-family: var(--font-readable);
  font-size: 1.04rem;
  font-weight: 800;
}

.birthday-date,
.anniversary-date {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.anniversary-name {
  margin: 0 0 5px;
  font-family: var(--font-readable);
  font-size: 1.04rem;
  font-weight: 800;
}

.holiday-name {
  margin: 0 0 5px;
  font-family: var(--font-readable);
  font-size: 1rem;
  font-weight: 800;
}

.event-name {
  margin: 0 0 5px;
  font-family: var(--font-readable);
  font-size: 1rem;
  font-weight: 800;
}

.event-name a {
  color: inherit;
  text-decoration: none;
}

.event-name a:hover {
  color: var(--ttg-blue);
}

.event-date,
.holiday-date {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.years-badge,
.office-pill {
  justify-self: end;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.office-pill {
  background: rgba(22, 190, 237, 0.14);
  color: var(--ttg-blue);
}

.years-badge {
  background: rgba(255, 143, 98, 0.16);
  color: var(--ttg-black);
}

.calendar-panel {
  background:
    linear-gradient(180deg, rgba(22, 190, 237, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.9);
}

.holidays-panel {
  background:
    linear-gradient(180deg, rgba(255, 143, 98, 0.14), transparent 54%),
    rgba(255, 255, 255, 0.9);
}

.score-panel {
  background:
    linear-gradient(180deg, rgba(22, 190, 237, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.9);
}

.feedback-panel {
  background:
    linear-gradient(180deg, rgba(221, 205, 242, 0.42), transparent 58%),
    rgba(255, 255, 255, 0.9);
}

.score-widget {
  display: grid;
  gap: 14px;
  min-height: 160px;
  align-content: space-between;
}

.score-ring {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--white) 0 56%, transparent 57%),
    conic-gradient(var(--ttg-blue) calc(var(--score) * 1%), rgba(23, 53, 157, 0.1) 0);
  box-shadow: 0 18px 38px rgba(23, 53, 157, 0.13);
}

.score-ring span {
  color: var(--ttg-black);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.score-ring small {
  margin-left: 2px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.score-label {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(221, 205, 242, 0.36), rgba(255, 255, 255, 0.94)),
    var(--white);
  color: var(--ttg-black);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.tool-link:hover,
.tool-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(22, 190, 237, 0.5);
  box-shadow: var(--shadow-lift);
  outline: none;
}

.tool-link.is-disabled {
  cursor: default;
  opacity: 0.72;
}

.tool-link.is-disabled:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.tool-initials {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--ttg-blue);
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 800;
}

.tool-link strong,
.tool-link span span {
  display: block;
}

.tool-link strong {
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.tool-link span span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.value-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(22, 190, 237, 0.12) 0 38%, transparent 38%),
    linear-gradient(145deg, rgba(221, 205, 242, 0.74), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.value-card::after {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 7rem;
  height: 7rem;
  background: rgba(255, 143, 98, 0.24);
  content: "";
}

.value-icon {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(23, 53, 157, 0.08),
    0 18px 36px rgba(23, 53, 157, 0.12);
}

.value-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.value-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.value-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

.clocks-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.clock-card {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(22, 190, 237, 0.12), rgba(255, 255, 255, 0.94)),
    var(--white);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.clock-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 190, 237, 0.5);
  box-shadow: var(--shadow-lift);
}

.clock-city {
  min-height: 2.2em;
  margin-bottom: 12px;
  color: var(--ttg-blue);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.clock-time {
  margin-bottom: 6px;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.clock-date {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-footer {
  margin-top: 26px;
  padding: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.dashboard-footer p {
  margin: 0;
}

.dashboard-footer span {
  color: var(--ttg-black);
}

@media (max-width: 1020px) {
  .people-summary-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

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

  .kpi-grid,
  .values-grid,
  .links-grid,
  .clocks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dashboard-shell {
    width: min(calc(100% - 24px), 1180px);
    padding-top: 12px;
  }

  .logo-header {
    min-height: 98px;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-link {
    min-width: 0;
    width: min(100%, 260px);
  }

  .brand-logo {
    width: 100%;
  }

  .updated-stamp {
    text-align: left;
  }

  .dashboard-footer {
    text-align: left;
  }

  .section-heading {
    display: block;
  }

  .updated-stamp {
    margin-top: 18px;
  }

  .kpi-grid,
  .values-grid,
  .links-grid,
  .trips-grid,
  .widget-grid,
  .clocks-grid {
    grid-template-columns: 1fr;
  }

  .birthday-item,
  .anniversary-item,
  .event-item,
  .holiday-item {
    grid-template-columns: auto 1fr;
  }

  .office-pill,
  .years-badge {
    grid-column: 2;
    justify-self: start;
  }
}
