:root {
  --v2-topbar-bg: #fcfaf7;
  --v2-sidebar-bg: #f6f2eb;
  --v2-main-bg: #ffffff;
  --v2-selected-bg: #ecded6;
  --v2-border: #e5d6ce;
  --v2-border-strong: #dec3b3;
  --v2-text: #4b4a48;
  --v2-muted: #8a705d;
  --v2-alert: #ffaebc;
  --v2-topbar-height: 54px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--v2-main-bg);
  color: var(--v2-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.v2-shell {
  min-height: 100vh;
  background: var(--v2-main-bg);
}

.v2-shell svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v2-sidebar {
  position: fixed;
  top: var(--v2-topbar-height);
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 22px 9px 16px 8px;
  overflow: hidden;
  border-right: 1px solid var(--v2-border);
  background: var(--v2-sidebar-bg);
  color: var(--v2-muted);
  transition: width 180ms ease, padding 180ms ease;
}

.v2-sidebar-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.v2-sidebar-brand-copy {
  display: grid;
  gap: 0;
  line-height: 1.02;
  color: var(--v2-muted);
}

.v2-sidebar-brand-copy strong {
  font-size: 18.6px;
  font-weight: 500;
}

.v2-sidebar-brand-copy span {
  font-size: 11.6px;
  font-weight: 500;
}

.v2-sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 112, 93, 0.28) transparent;
}

.v2-sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.v2-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.v2-sidebar-nav::-webkit-scrollbar-thumb {
  border: 2px solid var(--v2-sidebar-bg);
  border-radius: 999px;
  background: rgba(138, 112, 93, 0.26);
}

.v2-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 112, 93, 0.4);
}

.v2-nav-group {
  display: grid;
  gap: 8px;
}

.v2-nav-children {
  display: none;
}

.v2-nav-group.is-expanded .v2-nav-children {
  display: grid;
  gap: 8px;
}

.v2-nav-item,
.v2-nav-child {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--v2-muted);
  text-decoration: none;
}

.v2-nav-item {
  width: 213px;
  height: 38px;
  gap: 12px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 0;
  appearance: none;
}

.v2-nav-item.is-active,
.v2-nav-child.is-active {
  background: var(--v2-selected-bg);
}

.v2-nav-icon {
  display: grid;
  width: 20px;
  place-items: center;
}

.v2-nav-icon svg {
  width: 20px;
  height: 20px;
}

.v2-nav-label {
  flex: 1;
}

.v2-nav-chevron {
  display: grid;
  place-items: center;
  transition: transform 180ms ease;
}

.v2-nav-group.is-expanded .v2-nav-chevron {
  transform: rotate(180deg);
}

.v2-nav-child {
  width: 213px;
  height: 33px;
  padding-left: 50px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 400;
}

.v2-sidebar-collapse {
  position: fixed;
  top: calc(var(--v2-topbar-height) + ((100vh - var(--v2-topbar-height)) / 2));
  left: 236px;
  z-index: 50;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--v2-muted);
  box-shadow: 0 2px 8px rgba(138, 112, 93, 0.12);
  transform: translateY(-50%);
  transition: left 180ms ease;
}

.v2-sidebar-collapse svg {
  width: 18px;
  height: 18px;
}

.v2-sidebar-club-card {
  display: grid;
  flex: 0 0 auto;
  min-height: 252px;
  margin-top: 16px;
  padding: 12px 18px 14px;
  border: 1px solid var(--v2-border-strong);
  border-radius: 14px;
  background: #f6f2eb;
  color: var(--v2-text);
  text-align: center;
}

.v2-sidebar-club-compact {
  display: none;
  text-decoration: none;
}

.v2-sidebar-club-card h2 {
  margin: 0 0 5px;
  color: var(--v2-muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.v2-sidebar-club-card p {
  margin: 0;
  color: var(--v2-text);
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}

.v2-sidebar-club-image {
  display: block;
  width: calc(100% + 56px);
  max-width: none;
  height: 156px;
  justify-self: center;
  margin: 4px -28px 7px;
  object-fit: contain;
}

.v2-sidebar-club-button {
  display: flex;
  width: 148px;
  height: 32px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  border: 0;
  border-radius: 7px;
  background: var(--v2-selected-bg);
  color: var(--v2-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.v2-sidebar-club-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.v2-shell-main {
  min-height: 100vh;
  margin-left: 250px;
  padding-top: var(--v2-topbar-height);
  background: var(--v2-main-bg);
  transition: margin-left 180ms ease;
}

.v2-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  height: var(--v2-topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 14px;
  border-bottom: 1px solid var(--v2-border);
  background: var(--v2-topbar-bg);
  color: var(--v2-muted);
}

/* The legacy theme applies min-height: 40px to every button. Keep the V2
   toolbar on its intended compact alignment rail. */
.v2-topbar button {
  min-height: 0;
}

.v2-topbar a {
  color: inherit;
  text-decoration: none;
}

.v2-topbar-left {
  display: flex;
  height: 32px;
  min-width: 0;
  align-items: center;
  gap: 0;
}

.v2-topbar-logo-lockup {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.v2-topbar-logo-lockup .v2-sidebar-logo {
  /* The PNG includes transparent breathing room, so the element needs a little
     extra size for the visible cashew to align with the two-line wordmark. */
  width: 50px;
  height: 50px;
}

.v2-topbar-logo-lockup .v2-sidebar-brand-copy strong {
  font-size: 16px;
  line-height: 1;
}

.v2-topbar-logo-lockup .v2-sidebar-brand-copy span {
  font-size: 12px;
  line-height: 1;
}

.v2-topbar-logo-lockup + .v2-topbar-search {
  margin-left: 120px;
}

.v2-topbar-search {
  display: flex;
  width: 286px;
  height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--v2-border-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--v2-muted);
}

.v2-topbar-search svg {
  color: #8a705d;
}

.v2-topbar-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--v2-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
}

.v2-topbar-search input::placeholder {
  color: var(--v2-muted);
  font-weight: 400;
  opacity: 0.9;
}

.v2-topbar-actions {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 10px;
}

.v2-learn-support-button {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  max-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--v2-border-strong);
  border-radius: 12px;
  background: var(--v2-selected-bg);
  color: var(--v2-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.v2-learn-support-button svg {
  width: 16px;
  height: 16px;
}

.v2-topbar-plain-icon {
  position: relative;
  display: grid;
  width: 24px;
  height: 32px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  padding: 0;
}

.v2-topbar-plain-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.v2-notification-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  display: grid;
  width: 18px;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #ffaebc;
  border-radius: 999px;
  background: #fce4e4;
  color: #c81627;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transform: none;
}

.v2-profile-button {
  display: grid;
  grid-template-columns: 32px auto 16px;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  padding: 0;
  text-align: left;
  height: 32px;
}

.v2-profile-menu-wrap {
  position: relative;
  height: 32px;
}

.v2-profile-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #f7d9cc;
  border-radius: 999px;
  background: #f7d9cc;
}

.v2-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-profile-copy {
  display: grid;
  min-width: 76px;
  gap: 2px;
  line-height: 1.05;
}

.v2-profile-copy strong {
  color: var(--v2-muted);
  font-size: 14px;
  font-weight: 700;
}

.v2-profile-copy span {
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 500;
}

.v2-profile-button > svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.v2-profile-button.is-open > svg {
  transform: rotate(180deg);
}

.v2-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  width: 250px;
  padding: 10px;
  border: 1px solid var(--v2-border);
  border-radius: 14px;
  background: #fcfaf7;
  box-shadow: 0 12px 30px rgba(138, 112, 93, 0.16);
  color: #8a705d;
}

.v2-profile-menu[hidden] {
  display: none;
}

.v2-profile-menu-heading {
  padding: 5px 8px 8px;
  color: #8a705d;
  font-size: 12px;
  font-weight: 600;
}

.v2-profile-company-list {
  display: grid;
  max-height: 220px;
  gap: 3px;
  overflow-y: auto;
}

.v2-profile-company-option,
.v2-profile-menu-action {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8a705d;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.v2-profile-company-option:hover,
.v2-profile-company-option:focus-visible,
.v2-profile-menu-action:hover,
.v2-profile-menu-action:focus-visible {
  outline: 0;
  background: var(--v2-selected-bg);
}

.v2-profile-company-option svg,
.v2-profile-menu-action svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

.v2-profile-menu-empty {
  display: block;
  padding: 8px;
  color: var(--v2-muted);
  font-size: 13px;
}

.v2-profile-menu-divider {
  height: 1px;
  margin: 8px 2px;
  background: var(--v2-border);
}

@media (max-width: 760px) {
  .v2-topbar {
    gap: 8px;
    padding: 0 10px;
  }

  .v2-topbar-left {
    flex: 1 1 auto;
  }

  .v2-topbar-logo-lockup {
    display: flex;
    gap: 0;
  }

  .v2-topbar-logo-lockup .v2-sidebar-logo {
    width: 32px;
    height: 32px;
  }

  .v2-topbar-logo-lockup .v2-sidebar-brand-copy {
    display: none;
  }

  .v2-topbar-logo-lockup + .v2-topbar-search {
    margin-left: 8px;
  }

  .v2-topbar-search {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .v2-topbar-search input {
    min-width: 0;
  }

  .v2-topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .v2-learn-support-button {
    display: grid;
    width: 32px;
    padding: 0;
    place-items: center;
    gap: 0;
  }

  .v2-learn-support-button span {
    display: none;
  }

  .v2-profile-copy,
  .v2-profile-button > svg {
    display: none;
  }

  .v2-profile-button {
    display: grid;
    grid-template-columns: 32px;
    gap: 0;
  }

  /* Small screens use the same calm, icon-first sidebar mode as the manual
     collapse action, without needing the user to make room first. */
  .v2-sidebar {
    width: 72px;
    padding: 14px 6px 16px;
    overflow: hidden;
  }

  .v2-shell-main {
    margin-left: 72px;
  }

  .v2-sidebar-nav {
    align-content: start;
    gap: 2px;
    overflow: hidden;
    padding-right: 0;
    scrollbar-width: none;
  }

  .v2-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .v2-nav-group {
    justify-items: center;
    gap: 0;
  }

  .v2-nav-item {
    width: 60px;
    height: 46px;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    padding: 2px 0;
    border-radius: 12px;
  }

  .v2-nav-icon {
    width: 22px;
    height: 22px;
    place-items: center;
  }

  .v2-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.2;
  }

  .v2-nav-label {
    display: block;
    flex: 0 0 auto;
    max-width: 60px;
    height: 14px;
    overflow: visible;
    color: var(--v2-muted);
    font-size: 11px;
    line-height: 14px;
    text-align: center;
    white-space: nowrap;
  }

  .v2-nav-chevron,
  .v2-nav-children {
    display: none;
  }

  .v2-sidebar-club-card {
    width: 60px;
    min-height: 48px;
    justify-items: center;
    align-content: center;
    margin: 8px auto 2px;
    padding: 2px 0;
    border: 0;
    background: transparent;
  }

  .v2-sidebar-club-card h2,
  .v2-sidebar-club-card p,
  .v2-sidebar-club-image,
  .v2-sidebar-club-button {
    display: none;
  }

.v2-sidebar-club-compact {
    display: grid;
    justify-items: center;
    gap: 1px;
    color: var(--v2-muted);
    font-size: 11px;
    line-height: 14px;
  }

  .v2-sidebar-club-compact svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.2;
  }

  .v2-sidebar-collapse {
    left: 58px;
  }

  .v2-sidebar-collapse svg {
    transform: rotate(180deg);
  }
}

@media (max-width: 420px) {
  .v2-topbar {
    gap: 5px;
    padding: 0 7px;
  }

  .v2-topbar-actions {
    gap: 3px;
  }

  .v2-add-new-button,
  .v2-checklist-link {
    display: none;
  }
}

.v2-content {
  min-height: calc(100vh - var(--v2-topbar-height));
  background: var(--v2-main-bg);
}

.v2-empty-workspace {
  min-height: calc(100vh - var(--v2-topbar-height));
  background: var(--v2-main-bg);
}

.v2-shell.is-sidebar-collapsed .v2-sidebar {
  width: 72px;
  padding: 14px 6px 16px;
  overflow: hidden;
}

.v2-shell.is-sidebar-collapsed .v2-shell-main {
  margin-left: 72px;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-nav {
  align-content: start;
  gap: 2px;
  overflow: hidden;
  padding-right: 0;
  scrollbar-width: none;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-nav::-webkit-scrollbar {
  display: none;
}

.v2-shell.is-sidebar-collapsed .v2-nav-group {
  justify-items: center;
  gap: 0;
}

.v2-shell.is-sidebar-collapsed .v2-nav-item {
  width: 60px;
  height: 46px;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 2px 0;
  border-radius: 12px;
}

.v2-shell.is-sidebar-collapsed .v2-nav-icon {
  width: 22px;
  height: 22px;
  place-items: center;
}

.v2-shell.is-sidebar-collapsed .v2-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.2;
}

.v2-shell.is-sidebar-collapsed .v2-nav-label {
  display: block;
  flex: 0 0 auto;
  max-width: 60px;
  height: 14px;
  overflow: visible;
  color: var(--v2-muted);
  font-size: 11px !important;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

.v2-shell.is-sidebar-collapsed .v2-nav-chevron,
.v2-shell.is-sidebar-collapsed .v2-nav-children {
  display: none;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-club-card {
  width: 60px;
  min-height: 48px;
  justify-items: center;
  align-content: center;
  margin: 8px auto 2px;
  padding: 2px 0;
  border: 0;
  background: transparent;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-club-card h2,
.v2-shell.is-sidebar-collapsed .v2-sidebar-club-card p,
.v2-shell.is-sidebar-collapsed .v2-sidebar-club-image,
.v2-shell.is-sidebar-collapsed .v2-sidebar-club-button {
  display: none;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-club-compact {
  display: grid;
  justify-items: center;
  gap: 1px;
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 14px;
  text-decoration: none;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-club-compact svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.2;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-collapse {
  left: 58px;
}

.v2-shell.is-sidebar-collapsed .v2-sidebar-collapse svg {
  transform: rotate(180deg);
}

.v2-section-card,
.v2-action-button,
.v2-page-back-button {
  border: 1px solid var(--v2-border);
}

.v2-section-card {
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
}

.v2-action-button {
  height: 40px;
  border-radius: 10px;
  background: var(--v2-selected-bg);
  color: var(--v2-muted);
  font: inherit;
}

.v2-page-back-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #ffffff;
  color: var(--v2-muted);
  text-decoration: none;
}

@media (max-height: 760px) {
  .v2-sidebar-club-card {
    min-height: 216px;
    padding: 10px 16px 12px;
  }

  .v2-sidebar-club-image {
    width: calc(100% + 44px);
    height: 130px;
    margin: 4px -22px 5px;
  }
}
