@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #242131;
  background: #f5f3ee;
  font-synthesis: none;
  --bg: #f5f3ee;
  --surface: #fffdf9;
  --text: #242131;
  --muted: #777380;
  --line: #eae6e1;
  --subtle: #f8f6f2;
  --purple: #6d4bea;
  --purple-soft: #eee8ff;
  --shadow: 0 3px 15px #28203504;
  line-height: 1.5;
  font-size: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #a78bfa;
  outline-offset: 4px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #9a80ed !important;
  box-shadow: 0 0 0 3px #8061f216;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Manrope", sans-serif;
}

h1 {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.1px;
}

h2 {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(120deg, #7957ed, #6d4bea);
  color: white;
  box-shadow: 0 4px 9px #6d4bea24;
}

.primary:hover {
  box-shadow: 0 5px 15px #6d4bea40;
}

.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.secondary:hover {
  background: var(--subtle);
}

.small {
  padding: 8px 14px;
}

.danger {
  background: #d94b64;
  color: white;
  box-shadow: 0 4px 9px #d94b6420;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  background: var(--purple-soft);
  color: var(--purple);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--muted);
}

.required {
  color: var(--purple);
}

.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #14141b;
  color: #a4a3b2;
  padding: 31px 20px 18px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  border-right: 1px solid #24242f;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #f3f1ec;
  padding-left: 9px;
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.brand-pro {
  color: #a78bfa;
}

.brand small {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  letter-spacing: 3.5px;
  font-weight: 500;
  color: #8d899f;
  margin-top: 5px;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 33px 1px 30px;
  border: 1px solid #2b2937;
  border-radius: 9px;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #e0dce9;
  background: #1b1a24;
}

.workspace-icon {
  width: 29px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #b19bf9;
  background: #2a233d;
  border-radius: 7px;
  font-weight: 700;
}

.workspace small {
  display: block;
  font-size: 10px;
  color: #807b92;
  margin-top: 2px;
}

.workspace-dot,
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #57dda7;
  border-radius: 50%;
  flex-shrink: 0;
}

.workspace-dot {
  margin-left: auto;
}

.nav-caption {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #6f6c80;
  margin: 0 14px 12px;
  font-weight: 600;
}

.nav-link,
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
}

.nav-link {
  margin-bottom: 7px;
}

.nav-link:hover,
.nav-group summary:hover {
  background: #201e2b;
  color: #eee8ff;
}

.nav-link.selected {
  background: #282038;
  color: #b9a4ff;
}

.nav-group {
  margin-bottom: 6px;
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary .nav-chevron {
  margin-left: auto;
  width: 13px;
  transition: transform 0.15s;
}

.nav-group:not([open]) .nav-chevron {
  transform: rotate(-90deg);
}

.subnav {
  margin: 3px 0 10px 22px;
  padding-left: 19px;
  border-left: 1px solid #302b3e;
}

.subnav a {
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 12px;
  margin: 3px 0;
  color: #9995a7;
}

.subnav a:hover {
  color: #f3f1ec;
  background: #1f1c2b;
}

.subnav a.selected {
  background: #2b223f;
  color: #c7b5ff;
  font-weight: 600;
}

.active-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a78bfa;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}

.edition {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 12px;
  border: 1px solid #30283f;
  border-radius: 9px;
  background: linear-gradient(110deg, #211a30, #1a1923);
  font-size: 12px;
  color: #cdc1e7;
}

.edition small {
  display: block;
  color: #80788f;
  font-size: 10px;
  margin-top: 3px;
}

.edition-mark {
  color: #a78bfa;
}

.edition-orb {
  position: absolute;
  width: 80px;
  height: 80px;
  background: #8061f212;
  filter: blur(15px);
  right: -20px;
  top: -30px;
  border-radius: 50%;
}

.sidebar-version {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #777286;
  margin-top: 20px;
  padding: 0 7px;
}

.sidebar-version > span:last-child {
  margin-left: auto;
}

.sidebar-version .live-dot {
  width: 4px;
  height: 4px;
}

.app-body {
  margin-left: 246px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
}

.topbar-label {
  font-size: 12px;
  color: var(--muted);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.preview-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #7b6e98;
  background: var(--purple-soft);
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}

.preview-badge > span {
  width: 5px;
  height: 5px;
  background: #987ae8;
  border-radius: 50%;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
}

.profile small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  margin-top: 3px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: #ece5fc;
  color: #7956cf;
  border: 3px solid var(--surface);
  outline: 1px solid #eae3f3;
  border-radius: 50%;
}

main {
  padding: 20px 15px 15px;
  width: 100%;
  max-width: none;
  margin: auto auto 0;
  flex: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #96909f;
  margin-bottom: 10px;
}

.breadcrumb > .icon {
  width: 14px;
  height: 14px;
}

.breadcrumb > .icon:not(:first-child) {
  width: 11px;
  height: 11px;
  color: #b7b0bf;
}

.breadcrumb strong {
  font-weight: 500;
  color: var(--text);
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 0 38px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: #99929d;
  font-size: 10px;
}

.mobile-menu {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.skip-link {
  position: fixed;
  left: 270px;
  top: -80px;
  z-index: 50;
  background: var(--purple);
  color: white;
  padding: 12px;
  border-radius: 5px;
}

.skip-link:focus {
  top: 10px;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.page-heading {
  padding: 20px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.page-heading:before {
  content: "";
  position: absolute;
  left: 0;
  top: 27px;
  bottom: 27px;
  width: 3px;
  background: #8061f2;
  border-radius: 0 4px 4px 0;
}

.page-heading .eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #9385ab;
  margin-bottom: 4px;
}

.page-heading h1 {
  margin-bottom: 5px;
}

.title-dot {
  color: #8061f2;
}

.page-heading p {
  color: var(--muted);
  font-size: 12px;
}

.page-heading .button {
  font-size: 12px;
}

.filter-card {
  padding: 16px 20px 18px;
  margin-bottom: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2 {
  font-size: 13px;
}

.section-icon {
  display: flex;
  color: #9486ae;
}

.section-icon .icon {
  width: 17px;
  height: 17px;
}

.quiet-label {
  color: #aaa3af;
  font-size: 10px;
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 11px;
  font-weight: 600;
}

.field small {
  font-size: 11px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12px;
  min-height: 36px;
}

select {
  cursor: pointer;
  padding-right: 30px;
}

input::placeholder {
  color: #aaa3af;
}

.filter-form > .field {
  width: 33%;
  min-width: 220px;
  max-width: 360px;
}

.filter-buttons {
  display: flex;
  gap: 9px;
}

.filter-buttons .button {
  min-height: 36px;
  font-size: 11px;
}

.filter-buttons .icon {
  width: 15px;
  height: 15px;
}

.filter-note {
  font-size: 10px;
  color: #aaa3af;
  margin: 0 0 12px auto;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-soft);
  color: #8568c8;
  font-size: 10px;
  font-weight: 600;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 5px;
}

.sample-tag {
  font-size: 9px;
  color: #a199a7;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 20px 14px;
}

.entries-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}

.entries-label select {
  width: 65px;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11px;
}

.search-field {
  position: relative;
  width: 235px;
}

.search-field > .icon {
  position: absolute;
  width: 15px;
  height: 15px;
  left: 12px;
  top: 11px;
  color: #a298b0;
}

.search-field input {
  padding: 9px 12px 9px 36px;
  min-height: 35px;
  font-size: 11px;
  background: var(--subtle);
}

.table-scroll {
  overflow-x: auto;
}

.department-table,
.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

.department-table th,
.history-table th {
  background: var(--subtle);
  font-size: 10px;
  font-weight: 600;
  color: #93899e;
  letter-spacing: 0.2px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.department-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 20px;
  font-size: 12px;
  height: 52px;
}

.department-table tbody tr:last-child td {
  border-bottom: 0;
}

.department-table tbody tr:hover {
  background: var(--subtle);
}

.department-table .serial {
  width: 77px;
  color: #a39baa;
  font-size: 11px;
}

.department-name {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 500;
}

.department-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--purple-soft);
  color: #9679ce;
}

.department-icon .icon {
  width: 16px;
  height: 16px;
}

.department-icon.muted-icon {
  background: #eeeae5;
  color: #aaa1ad;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  border-radius: 5px;
  padding: 4px 9px;
  line-height: 1.5;
  font-weight: 500;
}

.status > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status.active {
  background: #e8f5ed;
  color: #399265;
}

.status.inactive {
  background: #f2ede7;
  color: #9c886a;
}

.action-column {
  width: 260px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.action {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 9px;
  box-shadow: 0 2px 4px #33204006;
  transition: transform 0.15s;
}

.action:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

.action .icon {
  width: 13px;
  height: 13px;
}

.history {
  background: #eee8fc;
  color: #8762c8;
  border-color: #e5dbf5;
}

.edit {
  background: #e3f3f7;
  color: #3e91a5;
  border-color: #d3eaf0;
}

.delete {
  background: #fcebef;
  color: #d07788;
  border-color: #f7dfe5;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 10px;
  color: #a098a7;
}

.table-footer strong {
  font-weight: 500;
  color: #72667f;
}

.pagination {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 65%;
  justify-content: flex-end;
}

.page-button {
  min-width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
}

.page-button.current {
  background: #8061f2;
  color: white;
  border-color: #8061f2;
  box-shadow: 0 3px 6px #8061f224;
}

.page-button:disabled {
  opacity: 0.35;
}

.page-button:not(:disabled):hover {
  border-color: #a78bfa;
}

.page-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 23px 3px 5px;
  font-size: 10px;
  color: #a298ad;
}

.page-tip > .icon {
  width: 14px;
  height: 14px;
  color: #b1a3c6;
}

.page-tip > span:last-child {
  font-size: 8px;
  letter-spacing: 1px;
  color: #b4aabf;
}

.tip-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 8px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.empty-state h3 {
  margin: 10px 0 5px;
  font-size: 15px;
}

.empty-state p {
  font-size: 12px;
}

.modal {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  width: min(490px, calc(100% - 32px));
  max-height: 90dvh;
  box-shadow: 0 25px 100px #09090d40;
  overscroll-behavior: contain;
}

.modal::backdrop {
  background: #10101880;
  backdrop-filter: blur(4px);
}

.modal-wide {
  width: min(940px, calc(100% - 32px));
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 22px;
  margin-top: 7px;
}

.modal-header p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.modal-header .eyebrow {
  font-size: 8px;
  color: #9b84bd;
  letter-spacing: 1.2px;
}

.modal-body {
  padding: 26px;
}

.modal-body > .field + .field {
  margin-top: 22px;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--subtle);
}

.modal-footer .button {
  font-size: 12px;
  padding: 8px 13px;
}

.form-error {
  font-size: 12px;
  color: #cf536b;
  margin-top: 14px;
}

.form-error:empty {
  display: none;
}

.delete-notice {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: #fcebef;
  border-radius: 8px;
  color: #a65365;
  font-size: 12px;
}

.delete-notice > .icon {
  margin-top: 3px;
}

.delete-notice strong {
  font-weight: 600;
}

.history-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 26px;
  font-size: 12px;
  color: var(--muted);
}

.history-summary > .icon {
  color: #a78bfa;
}

.history-summary .count-pill {
  margin-left: auto;
}

.history-table th,
.history-table td {
  padding: 16px 20px;
  font-size: 11px;
}

.history-table td {
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--muted);
}

.history-table td.history-details {
  min-width: 250px;
  white-space: normal;
  max-width: 360px;
  line-height: 1.9;
}

.history-details strong {
  font-weight: 700;
  color: var(--text);
}

.change-arrow {
  color: #a78bfa;
  padding: 0 4px;
}

.event-type {
  border-radius: 5px;
  padding: 4px 7px;
  background: var(--purple-soft);
  color: #8762c8;
  font-size: 10px;
}

.event-type.created {
  background: #e8f5ed;
  color: #399265;
}

.history-date {
  white-space: normal;
  min-width: 140px;
}

.history-scroll {
  max-height: 52vh;
}

.history-table thead {
  position: sticky;
  top: 0;
}

.history-user {
  white-space: nowrap;
}

#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #242131;
  color: #fff;
  padding: 13px 21px;
  border: 1px solid #81738e;
  border-radius: 9px;
  box-shadow: 0 10px 30px #24213130;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 100;
  max-width: calc(100% - 32px);
  width: max-content;
}

#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.welcome-card {
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 85% 5%, #8061f214, transparent 55%),
    var(--surface);
  border-radius: 13px;
  min-height: 470px;
  padding: 70px 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.welcome-icon {
  width: 67px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
  color: #8061f2;
  border-radius: 20px;
  margin: 25px 0;
}

.welcome-icon .icon {
  width: 34px;
  height: 34px;
}

.welcome-card h1 {
  font-size: 36px;
}

.welcome-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 16px 0 26px;
}

.welcome-note {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: 10px;
}

.login-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.login-story {
  background: #14141b;
  color: #f3f1ec;
  padding: 40px 55px 25px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-story:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 90% 60%, #8061f214, transparent 65%);
}

.login-story .brand {
  padding: 0;
}

.login-story-content {
  max-width: 560px;
  margin: 65px auto 35px;
  width: 100%;
  position: relative;
}

.login-story .eyebrow {
  color: #9f90bf;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.login-story h1 {
  font-size: clamp(32px, 3vw, 49px);
  line-height: 1.3;
  letter-spacing: -1.8px;
  margin: 20px 0;
}

.login-story h1 > span {
  color: #a78bfa;
}

.login-story p {
  font-size: 13px;
  color: #9993a7;
  line-height: 1.9;
}

.login-story-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #6d667b;
  font-size: 10px;
  margin-top: auto;
}

.login-story-footer > span {
  letter-spacing: 1.8px;
  font-size: 8px;
}

.print-art {
  height: 295px;
  position: relative;
  margin: 35px auto 12px;
  max-width: 350px;
}

.art-sheet {
  width: 195px;
  height: 240px;
  position: absolute;
  left: calc(50% - 97px);
  top: 15px;
  border-radius: 3px;
}

.sheet-back {
  background: #3f2968;
  transform: rotate(-19deg) translate(-25px, 5px);
  border: 1px solid #6746a2;
}

.sheet-middle {
  background: #b7a1f2;
  transform: rotate(13deg) translate(20px, 0);
}

.sheet-front {
  background: #f3efe5;
  transform: rotate(-4deg);
  color: #2d2342;
  padding: 21px 23px;
  box-shadow: 0 18px 60px #0005;
}

.art-word {
  font-family: "Manrope", sans-serif;
  font-size: 41px;
  font-weight: 800;
  letter-spacing: -2.4px;
  line-height: 1;
}

.art-word > span {
  color: #8061f2;
}

.art-rule {
  height: 1px;
  background: #cbc0d1;
  margin: 16px 0 8px;
}

.sheet-front > small {
  font-size: 5px;
  letter-spacing: 1.3px;
  color: #7a708a;
}

.color-dots {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.color-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8061f2;
}

.color-dots i:nth-child(2) {
  background: #29d3dc;
}

.color-dots i:nth-child(3) {
  background: #57dda7;
}

.color-dots i:nth-child(4) {
  background: #242131;
}

.art-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  font-size: 7px;
  letter-spacing: 2.8px;
  color: #7c708d;
}

.login-panel {
  background: var(--surface);
  padding: 43px 55px 25px;
  display: flex;
  flex-direction: column;
}

.login-panel-top {
  font-size: 8px;
  letter-spacing: 2px;
  color: #a59aae;
  text-align: right;
}

.login-form-wrap {
  max-width: 360px;
  width: 100%;
  margin: auto;
  padding: 50px 0;
}

.login-symbol {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 13px;
  background: var(--purple-soft);
  color: #8061f2;
  margin-bottom: 27px;
}

.login-symbol .icon {
  width: 25px;
  height: 25px;
}

.login-form-wrap > .eyebrow {
  font-size: 9px;
  color: #9f8abf;
}

.login-form-wrap h2 {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 8px 0;
}

.login-form-wrap > p {
  font-size: 13px;
  color: var(--muted);
}

#login-form {
  margin-top: 30px;
}

#login-form > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 19px 0 8px;
}

#login-form input {
  height: 41px;
  background: var(--subtle);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 46px;
}

.password-wrap button {
  position: absolute;
  right: 6px;
  top: 5px;
}

.password-wrap .icon {
  width: 17px;
  height: 17px;
}

.login-submit {
  width: 100%;
  margin-top: 26px;
  justify-content: space-between;
  height: 42px;
}

.login-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  background: var(--subtle);
  border: 1px dashed var(--line);
  padding: 13px;
  border-radius: 8px;
  color: #a193b1;
}

.login-preview .icon {
  width: 17px;
  height: 17px;
}

.login-preview p {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}

.login-preview strong {
  font-weight: 500;
  color: #847292;
}

.login-panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: #a398ae;
}

:root[data-theme="dark"] {
  --bg: #0f0f15;
  --surface: #18171f;
  --text: #f3f1ec;
  --muted: #a19aa9;
  --line: #2c2837;
  --subtle: #1e1c27;
  --purple: #a78bfa;
  --purple-soft: #2c2341;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

:root[data-theme="dark"] .status.active {
  background: #18372b;
  color: #57dda7;
}

:root[data-theme="dark"] .status.inactive {
  background: #352e24;
  color: #c7ac83;
}

:root[data-theme="dark"] .history {
  background: #302344;
  color: #bea2ee;
  border-color: #46325f;
}

:root[data-theme="dark"] .edit {
  background: #1b343c;
  color: #6fc7d6;
  border-color: #284853;
}

:root[data-theme="dark"] .delete {
  background: #3a242c;
  color: #ef9aaf;
  border-color: #56333e;
}

:root[data-theme="dark"] .table-footer strong {
  color: #b4a7c7;
}

:root[data-theme="dark"] .avatar {
  background: #302344;
}

:root[data-theme="dark"] .delete-notice {
  background: #3a242c;
  color: #ef9aaf;
}

@media (min-width: 1500px) {
  main {
    padding-top: 15px;
  }
  .page-heading {
    padding: 23px 25px;
  }
  .department-table td {
    height: 56px;
  }
}

@media (max-width: 1200px) {
  .sidebar {
    width: 222px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .app-body {
    margin-left: 222px;
  }
  .topbar {
    padding: 0 25px;
  }
  main {
    padding: 24px;
  }
  .app-footer {
    margin: 0 24px;
  }
  .filter-note {
    display: none;
  }
  .department-table th,
  .department-table td {
    padding-left: 18px;
    padding-right: 18px;
  }
  .action-column {
    width: 235px;
  }
  .action {
    padding: 6px 7px;
  }
  .login-story,
  .login-panel {
    padding-left: 35px;
    padding-right: 35px;
  }
  .sample-tag {
    font-size: 8px;
  }
}

@media (max-width: 960px) {
  .sidebar {
    width: 210px;
  }
  .app-body {
    margin-left: 210px;
  }
  .topbar-label {
    display: none;
  }
  .topbar-right {
    gap: 12px;
  }
  .topbar {
    padding: 0 22px;
  }
  .page-heading {
    padding: 19px 21px;
  }
  .page-heading .button {
    padding: 11px 13px;
    font-size: 11px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    max-width: 250px;
    font-size: 11px;
  }
  .sample-tag {
    display: none;
  }
  .action-column {
    width: 210px;
  }
  .action {
    padding: 6px;
  }
  .row-actions {
    gap: 5px;
  }
  .filter-form > .field {
    min-width: 190px;
    flex: 1;
  }
  .page-tip > span:last-child {
    display: none;
  }
  .login-story h1 {
    font-size: 33px;
  }
  .login-story-content {
    margin-top: 55px;
  }
  .login-story p {
    font-size: 11px;
  }
  .login-story {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 246px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .nav-open .sidebar {
    transform: translateX(0);
  }
  .nav-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: #09090d80;
    z-index: 29;
    backdrop-filter: blur(2px);
  }
  .app-body {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 60px;
    padding: 0 20px;
  }
  .topbar-label {
    display: inline;
    font-size: 10px;
  }
  .topbar-left {
    gap: 9px;
  }
  .topbar-right {
    gap: 10px;
  }
  .profile > div,
  .topbar-divider {
    display: none;
  }
  main {
    padding: 20px;
  }
  .breadcrumb {
    margin-bottom: 18px;
  }
  .page-heading {
    padding: 19px 21px;
  }
  .filter-card {
    padding: 18px 20px;
  }
  .app-footer {
    margin: 0 20px;
  }
  .app-footer > span:last-child {
    display: none;
  }
  .login-layout {
    grid-template-columns: 0.9fr 1fr;
  }
  .login-story {
    padding: 28px 22px;
  }
  .login-story h1 {
    font-size: 28px;
    letter-spacing: -1px;
  }
  .login-story p br {
    display: none;
  }
  .login-panel {
    padding: 30px 26px 22px;
  }
  .login-story-footer > span {
    display: none;
  }
  .login-form-wrap h2 {
    font-size: 30px;
  }
  .print-art {
    transform: scale(0.88);
    margin-left: -15px;
    margin-right: -15px;
  }
  .login-panel-top {
    font-size: 6px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 25px;
  }
  .topbar {
    padding: 0 13px;
  }
  .topbar-label {
    display: none;
  }
  .preview-badge {
    font-size: 9px;
    padding: 4px 7px;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar-right .icon-button {
    width: 30px;
  }
  .profile .avatar {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }
  main {
    padding: 18px 14px;
  }
  .breadcrumb {
    font-size: 9px;
    gap: 8px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 20px;
    flex-direction: column;
    padding: 18px;
    margin-bottom: 12px;
  }
  .page-heading p {
    max-width: none;
  }
  .page-heading .button {
    font-size: 11px;
    padding: 10px 14px;
    align-self: flex-start;
  }
  .filter-card {
    padding: 15px 17px;
    margin-bottom: 12px;
  }
  .filter-form {
    gap: 13px;
    flex-wrap: wrap;
    margin-top: 15px;
  }
  .filter-form > .field {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }
  .filter-buttons {
    width: 100%;
  }
  .filter-buttons .primary {
    flex: 1;
  }
  .filter-buttons .secondary {
    min-width: 80px;
  }
  .quiet-label {
    font-size: 9px;
  }
  .table-heading {
    padding: 19px 17px 16px;
  }
  .section-title h2 {
    font-size: 12px;
  }
  .table-tools {
    padding: 0 17px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .search-field {
    width: 100%;
    order: -1;
  }
  .entries-label {
    font-size: 10px;
  }
  .department-table {
    min-width: 620px;
  }
  .department-table th,
  .department-table td {
    padding-left: 17px;
    padding-right: 17px;
  }
  .department-table .serial {
    width: 54px;
  }
  .department-table td {
    font-size: 11px;
    height: 51px;
  }
  .department-icon {
    width: 27px;
    height: 27px;
  }
  .department-name {
    gap: 9px;
  }
  .table-footer {
    padding: 15px 17px;
    font-size: 9px;
    flex-wrap: wrap;
  }
  .pagination {
    max-width: 100%;
  }
  .page-tip {
    padding-top: 18px;
    font-size: 9px;
  }
  .app-footer {
    margin: 0 14px;
    font-size: 9px;
  }
  .welcome-card {
    padding: 45px 22px;
    min-height: 430px;
  }
  .welcome-card h1 {
    font-size: 28px;
  }
  .welcome-card p {
    font-size: 12px;
  }
  .welcome-card .eyebrow {
    font-size: 8px;
  }
  .login-layout {
    display: block;
  }
  .login-story {
    padding: 25px 25px 0;
    min-height: 0;
  }
  .login-story .brand {
    font-size: 22px;
  }
  .login-story .brand img {
    width: 34px;
    height: 34px;
  }
  .login-story-content {
    margin: 26px 0;
  }
  .login-story-content > .eyebrow {
    font-size: 7px;
  }
  .login-story h1 {
    font-size: 28px;
    margin: 12px 0 0;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story h1 > span {
    display: block;
  }
  .login-story-content > p,
  .print-art,
  .login-story-footer {
    display: none;
  }
  .login-panel {
    padding: 25px;
    min-height: calc(100dvh - 205px);
  }
  .login-panel-top {
    display: none;
  }
  .login-form-wrap {
    padding: 10px 0 35px;
    max-width: 400px;
  }
  .login-symbol {
    display: none;
  }
  .login-form-wrap h2 {
    font-size: 29px;
  }
  .login-form-wrap > .eyebrow {
    font-size: 8px;
  }
  .login-preview {
    margin-top: 20px;
  }
  .modal-header {
    padding: 22px;
  }
  .modal-header h2 {
    font-size: 20px;
  }
  .modal-body {
    padding: 22px;
  }
  .modal-footer {
    padding: 16px;
    gap: 8px;
  }
  .modal-footer .button {
    font-size: 11px;
    padding: 9px 11px;
  }
  .modal-footer .icon {
    width: 15px;
    height: 15px;
  }
  .history-summary {
    margin: 18px;
    font-size: 10px;
  }
  .history-summary .icon {
    display: none;
  }
}

.sidebar {
  overflow-y: auto;
}

.sidebar > nav,
.sidebar > .brand,
.sidebar > .workspace {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Compact workspace spacing for the Department screen. */
main.department-content {
  padding: 20px 30px 24px;
}

.department-content .breadcrumb {
  margin-bottom: 10px;
}

@media (max-width: 1200px) {
  main.department-content {
    padding: 20px;
  }
}

@media (max-width: 760px) {
  main.department-content {
    padding: 17px;
  }
}

@media (max-width: 560px) {
  main.department-content {
    padding: 14px 12px;
  }
  .department-content .breadcrumb {
    margin-bottom: 14px;
  }
}

/* Sort controls inherit the existing list heading appearance. */
.resource-table th .table-sort-button{display:inline-flex;align-items:center;gap:7px;border:0;padding:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:inherit;cursor:pointer}
.resource-table th .table-sort-button::after{content:'\2195';font-size:11px;opacity:.45;flex-shrink:0}
.resource-table th[aria-sort=ascending] .table-sort-button::after{content:'\2191';opacity:1}
.resource-table th[aria-sort=descending] .table-sort-button::after{content:'\2193';opacity:1}
.resource-table th .table-sort-button:focus-visible{outline:2px solid var(--purple,#7851ed);outline-offset:4px;border-radius:2px}
