:root {
  --mint-100: #f3f6fa;
  --mint-300: #dbe4f2;
  --mint-500: #2b7a78;
  --teal-600: #1c2e4a;
  --teal-700: #18263e;
  --accent: #f7c548;
  --text: #1c2e4a;
  --muted: #6c7a89;
  --chip-bg: #eef2f8;
  --chip-disabled: #e2e8f0;
  --chip-border: #d4deea;
  --border: #d7dfe8;
  --bg-card: #ffffff;
  --flash-success: #0f6d50;
  --flash-error: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--mint-100);
  min-height: 100vh;
}

a { color: var(--teal-700); }
a:hover { text-decoration: none; }

.hero {
  padding: 28px 20px 20px;
  background: linear-gradient(135deg, rgba(28, 46, 74, 0.92), rgba(43, 122, 120, 0.92)),
    url('data:image/svg+xml,%3Csvg width="1440" height="960" viewBox="0 0 1440 960" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3CradialGradient id="g" cx="50%" cy="50%" r="75%"%3E%3Cstop stop-color="%231c2e4a" offset="0"/%3E%3Cstop stop-color="%230e1a2b" offset="1"/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill="url(%23g)" width="1440" height="960"/%3E%3Cpath d="M0 720c240-96 480 96 720 0s480-96 720 0v240H0z" fill="%232b7a78" opacity="0.35"/%3E%3Cpath d="M0 540c240 108 480-108 720 0s480 108 720 0V960H0z" fill="%23f7c548" opacity="0.15"/%3E%3C/svg%3E');
  background-size: cover;
  background-position: center;
  color: #fff;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

.hero__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.title {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.08;
}

.brand {
  opacity: .9;
}

.subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  margin-top: 16px;
}

.pill {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: saturate(140%) blur(4px);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: saturate(140%) blur(4px);
  transition: transform .15s ease, background .15s ease;
}

.header-nav__link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .16);
}

main {
  padding: 32px 20px 60px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
}

.admin-card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}


.card {
  position: relative;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(243, 246, 250, 0.9));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(12, 23, 41, .08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 85% 12%, rgba(247, 197, 72, 0.22), transparent 60%);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--teal-600);
}

.card__meta {
  color: var(--muted);
  font-size: 14px;
}

.client-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px;
  margin: 0 auto 28px;
  max-width: 960px;
}

.client-switcher__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(28, 46, 74, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(243, 246, 250, 0.88));
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(12, 23, 41, .06);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.client-switcher__link:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.94), rgba(237, 241, 247, 0.92));
  border-color: rgba(28, 46, 74, 0.16);
  box-shadow: 0 12px 28px rgba(12, 23, 41, .1);
}

.client-switcher__link--active {
  background: linear-gradient(150deg, rgba(28, 46, 74, 0.95), rgba(43, 122, 120, 0.92));
  color: #fff;
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, rgba(28, 46, 74, 0.96), rgba(43, 122, 120, 0.9));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(12, 23, 41, .18), 0 2px 8px rgba(247, 197, 72, .18);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  filter: saturate(110%);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(12, 23, 41, .22), 0 4px 12px rgba(247, 197, 72, .22);
}

.flash-container {
  max-width: 960px;
  margin: 0 auto 24px;
}

.flash {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #fff;
}

.flash--success { background: var(--flash-success); }
.flash--error { background: var(--flash-error); }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 26px rgba(12, 23, 41, .08);
  margin-bottom: 24px;
}

.form-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  font-size: 14px;
}

.checkbox-pill input[type="checkbox"] {
  accent-color: var(--teal-600);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  background: var(--chip-bg);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 13px;
}

.badge--admin {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}

.report-grid {
  display: grid;
  gap: 16px;
  padding: 20px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.report-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(15, 91, 73, .06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-card__head {
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, #ffffff, var(--mint-100));
  border-bottom: 1px solid var(--border);
}

.report-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--teal-600);
}

.report-card__section {
  padding: 18px 16px 14px;
}

.report-card__cta {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.report-card__cta .btn {
  margin-top: 2px;
}

.report-card__cta-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.report-card__divider {
  height: 1px;
  background: var(--border);
  margin: 0 12px;
}

.report-card__months {
  padding: 14px 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.m-chip {
  --pad-x: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--pad-x);
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  color: #0d3e34;
  font-weight: 600;
  transition: all .15s ease;
  cursor: pointer;
}

.m-chip__ym {
  font-variant-numeric: tabular-nums;
  opacity: .8;
  font-weight: 700;
}

.m-chip__label {
  text-transform: capitalize;
}

.m-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(8, 60, 47, .08);
}

.m-chip--active {
  background: linear-gradient(150deg, var(--mint-500), var(--accent));
  color: #fff;
  border-color: transparent;
}

.m-chip--active:hover {
  filter: saturate(110%);
}

.m-chip--disabled {
  background: var(--chip-disabled);
  color: var(--muted);
  border-style: dashed;
  cursor: not-allowed;
}

.page-note {
  max-width: 960px;
  margin: 0 auto 26px;
  padding: 0 20px;
}

.info-tip {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, var(--mint-100));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(12, 23, 41, .06);
  color: var(--text);
}

.info-tip__icon {
  font-size: 18px;
  line-height: 1.1;
  margin-top: 2px;
}

.info-tip__text {
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.info-tip__tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  padding: 10px 12px;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(12, 23, 41, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  min-width: 260px;
  z-index: 2;
}

.info-tip__tooltip::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 14px;
  width: 12px;
  height: 12px;
  background: #0f172a;
  transform: rotate(45deg);
}

.info-tip__text:hover .info-tip__tooltip,
.info-tip__text:focus-within .info-tip__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.info-tip__text:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.footer {
  padding: 22px 20px;
  color: #50726a;
  text-align: center;
}

@media (max-width: 720px) {
  .hero__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    justify-content: flex-start;
  }
}
