:root {
  --bg: #f7f9fd;
  --panel: #ffffff;
  --line: #e6ebf3;
  --line-strong: #d9e1ee;
  --text: #0f172a;
  --muted: #475569;
  --soft: #f8fbff;
  --blue: #075be8;
  --blue-600: #0f5be8;
  --blue-700: #064ed2;
  --green: #13b77a;
  --red: #e51c2e;
  --orange: #fb7a00;
  --yellow: #f5a410;
  --purple: #6f4ee7;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 65% 8%, rgba(43, 113, 255, 0.08), transparent 25rem),
    var(--bg);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 241px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.03);
}

.brand-row {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 1.58rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.logo-check {
  position: relative;
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-left: -0.1rem;
  transform: rotate(-35deg);
}

.logo-check::before,
.logo-check::after {
  position: absolute;
  content: "";
  border-radius: 999px;
}

.logo-check::before {
  inset: 0.29rem auto auto 0;
  width: 0.75rem;
  height: 0.18rem;
  background: #1a8cff;
}

.logo-check::after {
  inset: -0.08rem auto auto 0.54rem;
  width: 0.18rem;
  height: 0.95rem;
  background: #ef233c;
}

.icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: #17233d;
  background: transparent;
}

.icon-button:hover {
  background: #eef4ff;
  color: var(--blue);
}

.desktop-menu svg {
  width: 22px;
  height: 22px;
}

.sidebar-close {
  display: none;
}

.nav-list {
  display: grid;
  gap: 8px;
  padding: 22px 16px;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 14px;
  border-radius: 8px;
  color: #111827;
  font-weight: 500;
  text-decoration: none;
  padding: 0 12px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  color: #334155;
}

.nav-item:hover,
.nav-item.active {
  color: var(--blue);
  background: #edf4ff;
}

.nav-item:hover svg,
.nav-item.active svg {
  color: var(--blue);
}

.nav-item.active::before {
  position: absolute;
  left: -6px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 8px;
  background: var(--blue);
  content: "";
}

.sidebar-footer {
  display: grid;
  gap: 50px;
  margin-top: auto;
  padding: 18px 16px 31px;
}

.mini-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--soft-shadow);
}

.help-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  padding: 16px 14px;
}

.mini-card strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.3;
}

.mini-card p {
  margin: 5px 0 0;
  color: #26364f;
  font-size: 0.74rem;
  line-height: 1.55;
}

.company-card {
  overflow: hidden;
}

.company-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 17px 15px 14px;
}

.soft-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.soft-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.35;
}

.soft-icon.small {
  width: 34px;
  height: 34px;
}

.soft-icon.small svg {
  width: 19px;
  height: 19px;
}

.soft-icon.square {
  border-radius: 8px;
}

.soft-icon.blue {
  color: var(--blue);
  background: #e9f2ff;
}

.soft-icon.red {
  color: var(--red);
  background: #ffecef;
}

.soft-icon.orange {
  color: var(--orange);
  background: #fff2e4;
}

.soft-icon.purple {
  color: #6842df;
  background: #f1ebff;
}

.soft-icon.green {
  color: var(--green);
  background: #e9fbf4;
}

.soft-icon.yellow {
  color: var(--yellow);
  background: #fff4dc;
}

.main-area {
  min-height: 100vh;
  margin-left: 241px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.topbar-spacer {
  flex: 1;
}

.mobile-menu {
  display: none;
}

.notification {
  position: relative;
}

.notification span {
  position: absolute;
  right: 5px;
  top: 3px;
  display: grid;
  min-width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0b1220;
  font-weight: 600;
  padding: 6px 0 6px 10px;
}

.profile-button:hover {
  background: #eef4ff;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0750ca;
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-button svg {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  top: 33px;
  left: calc(50% + 225px);
  z-index: 40;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  min-height: 82px;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 15px 14px 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

.toast.hidden {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -10px);
}

.toast-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: 0 0 0 8px #e8fbf4;
}

.toast-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 3;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 0.96rem;
}

.toast small {
  color: #334155;
  font-size: 0.94rem;
}

.content {
  width: 100%;
  max-width: 1282px;
  margin: 0 auto;
  padding: 10px 30px 31px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.page-heading h1 {
  margin: 0 0 5px;
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tax-year {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: -4px;
  font-weight: 500;
}

.select-wrap {
  position: relative;
}

.select-button {
  display: inline-flex;
  min-width: 92px;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0 14px;
  font-weight: 600;
}

.select-button svg {
  width: 17px;
  height: 17px;
}

.year-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: none;
  min-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.year-menu.open {
  display: grid;
}

.year-menu button {
  border: 0;
  background: #fff;
  padding: 10px 14px;
  text-align: left;
}

.year-menu button:hover,
.year-menu button[aria-selected="true"] {
  color: var(--blue);
  background: #edf4ff;
}

.alert-banner {
  position: relative;
  display: grid;
  min-height: 82px;
  grid-template-columns: auto 1fr auto auto;
  gap: 17px;
  align-items: center;
  margin-bottom: 19px;
  border: 1px solid #ffb7bd;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff6f7, #fff8f9);
  padding: 16px 16px 16px 18px;
}

.alert-banner.dismissed {
  display: none;
}

.danger-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--red);
  clip-path: polygon(50% 8%, 94% 86%, 6% 86%);
}

.danger-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
}

.alert-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.alert-banner strong span {
  color: var(--red);
}

.alert-banner p {
  margin: 0;
  color: #293346;
  font-size: 0.92rem;
}

.alert-close {
  color: var(--red);
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  padding: 0 16px;
  text-decoration: none;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 91, 232, 0.14);
}

.button.primary {
  width: 100%;
  height: 40px;
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #064bdc, #0869f1);
}

.button.danger {
  min-width: 159px;
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(180deg, #ee2333, #d91425);
}

.button.outline {
  background: #fff;
}

.button.full {
  width: 100%;
  grid-column: 1 / -1;
}

.button.strong {
  min-width: 180px;
  height: 38px;
}

.danger-text {
  border-color: #ff7181;
  color: var(--red);
}

.orange-text {
  border-color: #ffb06c;
  color: var(--orange);
}

.purple-text {
  border-color: #a992f8;
  color: #4e2bd4;
}

.green-text {
  border-color: #70d7ad;
  color: #159565;
}

.link-button,
.text-link,
.panel-link,
.metric-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 600;
}

.link-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.link-button.split {
  justify-content: space-around;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.metric-card {
  display: grid;
  min-height: 145px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 20px 20px 0;
}

.round-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.round-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.round-icon.blue {
  background: linear-gradient(145deg, #467bff, #075bea);
}

.round-icon.green {
  background: linear-gradient(145deg, #28c98d, #0da46c);
}

.round-icon.yellow {
  background: linear-gradient(145deg, #ffb52f, #ee9708);
}

.round-icon.red {
  background: linear-gradient(145deg, #fb2d3f, #dd1327);
}

.round-icon.purple {
  background: linear-gradient(145deg, #8d6bf2, #6644d8);
}

.metric-card p {
  margin: 0 0 4px;
  color: #2b364a;
  font-size: 0.92rem;
}

.metric-card strong {
  font-size: 1.72rem;
  line-height: 1;
}

.metric-link {
  display: flex;
  min-height: 52px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 0;
}

.metric-link svg,
.panel-link svg {
  width: 20px;
  height: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1.23fr) minmax(280px, 0.8fr) minmax(360px, 1.02fr);
  gap: 20px;
  margin-bottom: 30px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.panel-heading {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.panel-heading.with-link {
  padding-right: 19px;
}

.reminder-list {
  display: grid;
}

.reminder-item {
  display: grid;
  min-height: 64px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 18px 10px 20px;
}

.reminder-item strong,
.activity-item strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.35;
}

.reminder-item p,
.activity-item p {
  margin: 3px 0 0;
  color: #26364f;
  font-size: 0.8rem;
  line-height: 1.35;
}

.reminder-item .button {
  min-width: 80px;
  height: 34px;
  min-height: 34px;
  padding: 0 13px;
  font-size: 0.84rem;
}

.panel-link {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 31px;
  text-align: left;
}

.next-step {
  display: flex;
  flex-direction: column;
}

.next-card {
  display: flex;
  min-height: 289px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px 18px 0;
  border: 1px solid #c6dcff;
  border-radius: 8px;
  background: linear-gradient(180deg, #edf5ff, #f7fbff);
  padding: 20px 18px 18px;
  text-align: center;
}

.large-soft-icon {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #d9e9ff;
  margin-bottom: 20px;
}

.large-soft-icon svg {
  width: 45px;
  height: 45px;
  stroke-width: 2.2;
}

.next-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.next-card p {
  max-width: 250px;
  margin: 0 0 22px;
  color: #1f2937;
  font-size: 0.92rem;
  line-height: 1.55;
}

.activity-list {
  display: grid;
  padding: 0 18px;
}

.activity-item {
  display: grid;
  min-height: 68px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item time {
  color: #26364f;
  font-size: 0.78rem;
  white-space: nowrap;
}

.deadline-banner {
  display: grid;
  min-height: 116px;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid #9dc3ff;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef6ff, #f8fbff);
  padding: 17px 42px 17px 18px;
}

.deadline-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #dfeeff;
}

.deadline-icon svg {
  width: 53px;
  height: 53px;
  color: var(--blue);
  stroke-width: 1.9;
}

.deadline-banner h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.deadline-banner p {
  margin: 2px 0;
  color: #1f2937;
  font-size: 0.9rem;
}

.sidebar-backdrop {
  display: none;
}

.is-pressed {
  transform: translateY(1px);
}

@media (max-width: 1250px) {
  .content {
    max-width: none;
  }

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

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  }

  .activity {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
  }

  .desktop-menu {
    display: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    pointer-events: none;
    background: rgba(15, 23, 42, 0);
    transition: background 180ms ease;
  }

  .sidebar.open + .sidebar-backdrop {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.32);
  }

  .main-area {
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .toast {
    top: 76px;
    left: 50%;
  }

  .content {
    padding: 18px 16px 24px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tax-year {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 0;
  }

  .select-wrap,
  .select-button {
    min-width: 130px;
  }

  .alert-banner {
    grid-template-columns: auto 1fr auto;
  }

  .alert-banner .button {
    grid-column: 2 / -1;
    width: 100%;
  }

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

  .next-step,
  .activity {
    grid-column: auto;
  }

  .deadline-banner {
    grid-template-columns: auto 1fr;
    padding: 18px;
  }

  .deadline-banner .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .profile-button span:not(.avatar) {
    display: none;
  }

  .profile-button {
    gap: 6px;
    padding-left: 0;
  }

  .page-heading h1 {
    font-size: 1.55rem;
  }

  .alert-banner {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .alert-close {
    position: absolute;
    right: 12px;
    top: 12px;
  }

  .alert-banner .button {
    grid-column: 1 / -1;
  }

  .metrics-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .reminder-item {
    grid-template-columns: auto 1fr;
  }

  .reminder-item .button {
    grid-column: 2;
    width: max-content;
  }

  .activity-item {
    grid-template-columns: auto 1fr;
  }

  .activity-item time {
    grid-column: 2;
    white-space: normal;
  }

  .deadline-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .deadline-icon {
    justify-self: center;
  }
}

@media (max-width: 460px) {
  .topbar {
    gap: 4px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
  }

  .content {
    padding-inline: 12px;
  }

  .toast {
    grid-template-columns: auto 1fr;
    padding-right: 10px;
  }

  .toast > .icon-button {
    position: absolute;
    right: 8px;
    top: 8px;
  }

  .metric-card {
    min-height: 132px;
  }

  .panel-heading {
    padding-inline: 16px;
  }

  .reminder-item,
  .activity-list {
    padding-inline: 14px;
  }
}
