@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --ink: #161219;
  --muted: #655b70;
  --purple: #2c007e;
  --line: #e7dfef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f8f5fc;
  color: var(--ink);
  font:
    14px "DM Sans",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
aside {
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  font: 800 23px Manrope;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  background: var(--purple);
  color: white;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 21px;
}
.workspace {
  margin: 34px 0 26px;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
}
.workspace strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 4px;
}
.label {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #766a82;
  margin: 0 12px 12px;
}
nav button {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  color: #655b70;
  padding: 13px 14px;
  border-radius: 7px;
  margin-bottom: 5px;
  display: flex;
  gap: 12px;
  align-items: center;
}
nav button.active {
  background: #eee5fa;
  color: var(--purple);
  font-weight: 700;
}
nav button span {
  font-size: 18px;
  width: 20px;
}
.count {
  color: #fff;
  margin-left: auto;
  background: #2c007e;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.aside-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 10px 0;
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #eee5fa;
  border-radius: 50%;
  font-weight: 700;
  margin-right: 9px;
  color: #2c007e;
}
main {
  margin-left: 236px;
}
header {
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  color: var(--muted);
  font-size: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.pill {
  background: #eee5fa;
  color: var(--purple);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
}
.content {
  max-width: 1500px;
  margin: auto;
  padding: 36px 42px;
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
h1 {
  font: 800 28px Manrope;
  letter-spacing: -1px;
  margin: 0 0 9px;
}
p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.primary {
  background: var(--purple);
  color: white;
  border: 0;
  padding: 12px 18px;
  border-radius: 7px;
  font-weight: 600;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 13px;
  border-radius: 7px;
  color: #655b70;
}
.intro {
  border: 1px solid #ddccef;
  background: #eee5fa;
  border-radius: 10px;
  padding: 22px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.intro h3 {
  margin: 0 0 7px;
  font-size: 15px;
}
.intro p {
  font-size: 12px;
}
.intro-icon {
  font-size: 36px;
  color: var(--purple);
  margin-right: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat {
  padding: 20px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  color: #655b70;
  font-size: 12px;
}
.stat-icon {
  background: #f2eafb;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--purple);
}
.number {
  font: 800 30px Manrope;
  margin: 8px 0;
}
.foot {
  font-size: 11px;
  color: var(--muted);
}
.up {
  color: var(--purple);
}
.grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font: 700 15px Manrope;
  margin: 0;
}
.small-link {
  color: var(--purple);
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 700;
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 19px;
  height: 178px;
  padding: 25px 28px 0;
  border-bottom: 1px solid var(--line);
  margin: 0 24px;
}
.bar-group {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  position: relative;
}
.bar {
  width: 48%;
  background: #2c007e;
  border-radius: 4px 4px 0 0;
}
.bar.light {
  background: #c6a0ed;
}
.months {
  display: flex;
  justify-content: space-around;
  margin: 11px 30px 20px;
  font-size: 10px;
  color: var(--muted);
}
.legend {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: var(--muted);
  padding: 0 24px 19px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.renewal {
  padding: 15px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1eaf7;
}
.app-icon {
  background: #eee5fa;
  color: var(--purple);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.renewal strong {
  font-size: 12px;
}
.renewal p {
  font-size: 10px;
}
.due {
  margin-left: auto;
  font-size: 10px;
  background: #eee5fa;
  color: #2c007e;
  padding: 5px 7px;
  border-radius: 4px;
}
.table-tools {
  display: flex;
  gap: 10px;
  padding: 17px 23px;
}
input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
}
.search {
  width: 280px;
  font-size: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  background: #faf7fd;
  color: #766a82;
  font-size: 10px;
  font-weight: 600;
  padding: 13px 23px;
}
td {
  padding: 15px 23px;
  border-bottom: 1px solid #eee7f4;
  font-size: 12px;
}
td:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 10px;
  background: #eee5fa;
  color: #2c007e;
}
.badge.Pending {
  background: #f1e8fb;
  color: #683da0;
}
.badge.Denied {
  background: #eeeaf1;
  color: #332b3b;
}
.table-footer {
  padding: 15px 23px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.actions button {
  border: 0;
  border-radius: 5px;
  padding: 6px 8px;
  margin-right: 4px;
  background: #eee5fa;
  color: var(--purple);
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 28px;
  width: 460px;
  box-shadow: 0 20px 100px #160b2540;
}
dialog::backdrop {
  background: #160b2560;
}
dialog h2 {
  font-size: 21px;
  margin-bottom: 10px;
}
form label {
  display: block;
  font-size: 12px;
  margin: 17px 0 7px;
}
form input,
form select {
  width: 100%;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.notice {
  font-size: 11px;
  color: #2c007e;
  margin-top: 21px;
}
.hidden {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #2c007e;
  color: white;
  padding: 15px 22px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #0002;
  display: none;
}
@media (max-width: 1050px) {
  aside {
    width: 190px;
  }
  main {
    margin-left: 190px;
  }
  .content {
    padding: 25px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  td,
  th {
    padding: 13px;
  }
  .header-right .pill {
    display: none;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: 100%;
    padding: 15px;
  }
  .workspace,
  .label,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 15px;
  }
  nav button {
    width: auto;
    white-space: nowrap;
  }
  nav button span,
  .count {
    display: none;
  }
  main {
    margin: 0;
  }
  header {
    height: 50px;
    padding: 0 20px;
  }
  .content {
    padding: 20px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .topline {
    align-items: flex-start;
    gap: 15px;
  }
  h1 {
    font-size: 23px;
  }
  .intro {
    padding: 16px;
  }
  .intro-icon {
    display: none;
  }
  .table-wrap {
    overflow: auto;
  }
  .search {
    width: 60%;
  }
  .primary {
    font-size: 12px;
  }
  .grid {
    gap: 16px;
  }
}

/* Interactive states use the same palette throughout the workspace. */
nav button:hover,
.secondary:hover,
.actions button:hover {
  background: #e3d3f5;
}

.primary:hover {
  background: #420e98;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b28bdd;
  outline-offset: 3px;
}

.actions button[data-action="approve"] {
  background: #15803d;
  color: #fff;
}

.actions button[data-action="approve"]:hover {
  background: #166534;
}

.actions button[data-action="deny"] {
  background: #b91c1c;
  color: #fff;
}

.actions button[data-action="deny"]:hover {
  background: #991b1b;
}

/* Software record form and details */
#modal,
#detail {
  width: min(740px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
}
.record-grid,
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.full-width {
  grid-column: 1 / -1;
}
textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
}
textarea:focus-visible {
  outline: 3px solid #b28bdd;
  outline-offset: 3px;
}
.field-help {
  font-size: 11px;
  margin-top: 5px;
}
.privacy-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 24px 0 0;
  padding: 0 16px 16px;
}
.privacy-fields legend {
  font-weight: 700;
  padding: 0 6px;
}
.checkbox-grid {
  margin-top: 12px;
}
.checkbox-grid[hidden] {
  display: none;
}
form .checkbox-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
}
form .checkbox-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
}
.record-details {
  margin: 20px 0;
}
.record-details > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.record-details dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.record-details dd {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-history {
  font-size: 12px;
}
@media (max-width: 600px) {
  .record-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* Staff authentication */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-screen[hidden] {
  display: none;
}
.auth-card {
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 70px #2c007e0c;
}
.auth-card .brand {
  margin-bottom: 30px;
}
.auth-card h1 {
  font-size: 24px;
}
.auth-card .primary {
  width: 100%;
  margin-top: 24px;
}
.auth-card #authMessage {
  margin: 20px 0 12px;
  font-size: 13px;
}
.signed-out #workspaceApp {
  display: none;
}
.record-history {
  white-space: pre-line;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
[hidden] {
  display: none !important;
}

/* Intake duplicate suggestions */
.duplicate-notice {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #ddccef;
  background: #f7f1ff;
  border-radius: 8px;
}
.duplicate-notice h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.duplicate-notice p {
  font-size: 12px;
}
.duplicate-blocked {
  border-color: #a67bd0;
}
.duplicate-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #e4d7f1;
}
.duplicate-match strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.duplicate-match small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.duplicate-match button {
  flex-shrink: 0;
  font-size: 11px;
}

/* Microsoft work-account sign-in */
.microsoft-sign-in {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-weight: 600;
}
.microsoft-sign-in:hover:not(:disabled) {
  background: #f7f1ff;
  border-color: #b596d5;
}
.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 2px;
}
.microsoft-mark i {
  width: 8px;
  height: 8px;
  background: #f25022;
}
.microsoft-mark i:nth-child(2) {
  background: #7fba00;
}
.microsoft-mark i:nth-child(3) {
  background: #00a4ef;
}
.microsoft-mark i:nth-child(4) {
  background: #ffb900;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
