:root {
  color: #151515;
  background: #f4f1e8;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgb(255 196 40 / 18%), transparent 34rem), #f4f1e8;
}

.environment-banner {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 0.55rem 1rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  background: #9f1d20;
  box-shadow: 0 0.2rem 0.75rem rgb(21 21 21 / 24%);
}

.environment-banner-healthy {
  background: #24733f;
}

.environment-banner-stale {
  background: #9f1d20;
}

.shell {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.shell-wide {
  width: min(76rem, calc(100% - 2rem));
}

.shell-wide .workspace-nav {
  width: min(42rem, 100%);
  margin-right: auto;
  margin-left: auto;
}

.brand {
  display: block;
  width: min(24rem, 82vw);
  height: auto;
  margin: 0 auto 2.5rem;
}

.card {
  padding: clamp(1.5rem, 5vw, 3rem);
  background: rgb(255 255 255 / 92%);
  border: 1px solid rgb(21 21 21 / 12%);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 4rem rgb(66 49 0 / 10%);
}

.workspace-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgb(255 255 255 / 84%);
  border: 1px solid rgb(21 21 21 / 12%);
  border-radius: 0.75rem;
}

.workspace-nav strong {
  margin-right: auto;
}

.workspace-nav a {
  color: #604700;
  font-weight: 800;
}

.settings-nav {
  display: flex;
  width: min(42rem, 100%);
  margin-right: auto;
  margin-left: auto;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: #f2f3f5;
  border: 1px solid #d9dde2;
  border-radius: 0.8rem;
  overflow-x: auto;
}

.settings-nav a {
  padding: 0.65rem 0.9rem;
  color: #46515e;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.settings-nav a:hover {
  background: #e5e8ec;
}

.settings-nav a[aria-current="page"] {
  background: #fff;
  color: #151515;
  border-color: #d9dde2;
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.settings-nav a:focus-visible {
  outline: 2px solid #8b6800;
  outline-offset: 2px;
}

.settings-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}
.company-logo-preview {
  margin: 1rem 0;
}
.company-settings-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.info-tooltip {
  display: inline-flex;
  position: relative;
  vertical-align: middle;
}
.info-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  margin: 0;
  border: 1px solid #66717c;
  border-radius: 50%;
  background: transparent;
  color: #46515e;
  font:
    700 0.85rem Georgia,
    serif;
  cursor: help;
}
.info-tooltip-content {
  position: absolute;
  z-index: 30;
  top: 100%;
  right: 0;
  width: min(22rem, 65vw);
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: #243746;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 0.3rem 1rem rgb(0 0 0 / 18%);
}
.company-logo-preview img {
  display: block;
  max-width: min(100%, 20rem);
  max-height: 10rem;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid #d9dde2;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #fff;
}
.card textarea[name="address"] {
  display: block;
  width: 100%;
  min-height: 8rem;
  padding: 0.75rem;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.settings-list a {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.75rem;
}

.settings-list a:hover,
.settings-list a:focus-visible {
  background: #f4f1e8;
}

.settings-list span {
  color: #666;
}

.payroll-account-components {
  display: grid;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.payroll-account-components label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid rgb(21 21 21 / 12%);
}

.payroll-account-components label > span:not(.status) {
  display: grid;
  gap: 0.15rem;
}

.payroll-account-components small {
  color: #666;
}

.integration-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.25rem;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.75rem;
}

.integration-card h2 {
  margin: 0;
}

.integration-card p {
  margin-bottom: 0;
}

.status {
  color: #6b520d;
  font-size: 0.9rem;
  font-weight: 800;
}

.action-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-list li {
  padding: 1.25rem;
  background: #fffdf6;
  border: 1px solid rgb(21 21 21 / 14%);
  border-left: 0.35rem solid #8a6400;
  border-radius: 0.75rem;
}

.action-list li.action-blocking,
.action-list li.action-overdue {
  border-left-color: #9b1c1c;
}

.action-list li.action-urgent {
  border-left-color: #d36b00;
}

.action-list h3 {
  margin: 0;
  font-size: 1.35rem;
}

.action-priority {
  margin: 0 0 0.35rem;
  color: #6b520d;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.action-list p:not(.action-priority) {
  margin: 0.5rem 0 1rem;
}

.action-list .action-command code {
  padding: 0.2rem 0.4rem;
  background: rgb(21 21 21 / 8%);
  border-radius: 0.25rem;
  font-weight: 700;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-header p {
  margin: 0;
  font-weight: 800;
}

.calendar-embed {
  width: 100%;
  min-height: 42rem;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.75rem;
}

.calendar-setup {
  padding: 1.25rem;
  background: #fffdf6;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.75rem;
}

.calendar-setup p {
  margin-top: 0;
}

@media (max-width: 36rem) {
  .workspace-nav,
  .integration-card,
  .calendar-header {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-embed {
    min-height: 36rem;
  }

  .workspace-nav strong {
    margin-right: 0;
  }

  .payroll-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #8a6400;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
}

p {
  line-height: 1.6;
}

form {
  display: grid;
  gap: 0.75rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #aaa;
  border-radius: 0.4rem;
  font: inherit;
}

.payroll-card {
  display: grid;
  gap: 1rem;
}

.payroll-card > p,
.payroll-card > h1 {
  margin-bottom: 0;
}

.pay-period-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pay-period-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: inherit;
  background: #fffdf6;
  border: 1px solid rgb(21 21 21 / 18%);
  text-align: left;
}

.pay-period-list button:hover {
  border-color: #8a6400;
  box-shadow: 0 0.25rem 0.75rem rgb(66 49 0 / 10%);
}

.status-badge {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.draft {
  color: #694b00;
  background: #ffe7a6;
}

.status-badge.submitted {
  color: #1d5d33;
  background: #d9f2e1;
}

.payroll-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.payroll-summary div {
  padding: 1rem;
  background: #fffdf6;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.6rem;
}

.payroll-summary dt {
  color: #6b520d;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payroll-summary dd {
  margin: 0.35rem 0 0;
  font-weight: 800;
}

.payroll-table-wrap {
  overflow-x: auto;
}

.payroll-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.payroll-table th,
.payroll-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgb(21 21 21 / 14%);
  text-align: left;
}

.payroll-table th {
  background: #fff6d8;
}

.payroll-table td:nth-last-child(-n + 3),
.payroll-table th:nth-last-child(-n + 3) {
  text-align: right;
}

.payroll-accounting {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.payroll-accounting h2,
.payroll-accounting p {
  margin: 0;
}

.payroll-preview-pane {
  display: grid;
  grid-template-columns: minmax(13rem, 0.3fr) minmax(0, 1fr);
  min-height: 28rem;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.6rem;
  overflow: hidden;
}

.payroll-transaction-list {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 0.75rem;
  background: #fff6d8;
  border-right: 1px solid rgb(21 21 21 / 14%);
}

.payroll-transaction-list button {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  background: #fffdf6;
  border: 1px solid transparent;
  text-align: left;
}

.payroll-transaction-list button.selected {
  border-color: #8a6400;
  box-shadow: inset 0.25rem 0 #ffc328;
}

.payroll-transaction-list span {
  overflow: hidden;
  color: #5f5740;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-transaction-detail {
  min-width: 0;
}

.payroll-transaction-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #fffdf6;
  border-bottom: 1px solid rgb(21 21 21 / 14%);
}

.payroll-transaction-detail h3,
.payroll-transaction-detail header p {
  margin: 0;
}

.payroll-transaction-detail header p {
  margin-top: 0.25rem;
  color: #5f5740;
}

.payroll-accounting .payroll-table th:nth-child(2),
.payroll-accounting .payroll-table th:nth-child(3),
.payroll-accounting .payroll-table td:nth-child(2),
.payroll-accounting .payroll-table td:nth-child(3) {
  text-align: right;
}

.payroll-accounting .payroll-table th:nth-child(4),
.payroll-accounting .payroll-table th:nth-child(5),
.payroll-accounting .payroll-table td:nth-child(4),
.payroll-accounting .payroll-table td:nth-child(5) {
  text-align: left;
}

.payroll-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.payroll-heading h1,
.payroll-heading .eyebrow {
  margin: 0;
}

.payroll-heading h1 {
  margin-top: 0.25rem;
}

.payroll-download-button {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  padding: 0.55rem;
  background: #fffdf6;
  border-width: 1px;
}

.payroll-download-button:hover:not(:disabled),
.payroll-download-button:focus-visible {
  background: #ffc328;
}

.payroll-download-button svg {
  width: 100%;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 54rem) {
  .payroll-preview-pane {
    grid-template-columns: 1fr;
  }

  .payroll-transaction-list {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    border-right: 0;
    border-bottom: 1px solid rgb(21 21 21 / 14%);
  }
}

button,
.button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  color: #111;
  background: #ffc328;
  border: 2px solid #111;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.error {
  color: #9b1c1c;
  font-weight: 700;
}

.user-menu {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
}

.user-menu summary {
  list-style: none;
  cursor: pointer;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: #111;
  background: #ffc328;
  border: 2px solid #111;
  border-radius: 50%;
  box-shadow: 0 0 0 0.25rem rgb(255 195 40 / 25%);
  font-size: 1rem;
  font-weight: 900;
}

.user-menu[open] .avatar {
  box-shadow: 0 0 0 0.25rem rgb(255 195 40 / 45%);
}

.user-menu-panel {
  position: absolute;
  top: 3.75rem;
  right: 0;
  width: min(20rem, calc(100vw - 2rem));
  overflow: hidden;
  background: white;
  border: 1px solid rgb(21 21 21 / 14%);
  border-radius: 0.8rem;
  box-shadow: 0 1.25rem 3rem rgb(21 21 21 / 18%);
}

.user-identity {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgb(21 21 21 / 12%);
}

.user-identity span {
  overflow: hidden;
  color: #666;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 0;
  border-radius: 0;
  color: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: #f4f1e8;
  outline: none;
}

.menu-item svg {
  width: 1.4rem;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
