:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #183b35;
  background: #f3f7f5;
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  --green: #147d64;
  --dark: #183b35;
  --line: #e0e9e4;
  --muted: #6b8078;
  --amber: #b56c16;
  --blue: #3b6dc5;
  --radius: 14px;
  --safe: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #80b8e8;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  font-weight: 700;
}
h2 {
  font-size: 20px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}
small {
  font-size: 12px;
  font-weight: 400;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #ccd9d1;
  border-radius: 9px;
  background: #fff;
  color: var(--dark);
  padding: 11px 12px;
  min-height: 46px;
}
input[type="number"] {
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input::placeholder {
  color: #899b92;
}
input[type="file"] {
  font-size: 13px;
  padding: 10px;
}
input[type="checkbox"] {
  min-height: auto;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  stroke-width: 1.7;
  vertical-align: middle;
}
.button {
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid #ceddd5;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.button:hover {
  background: #f1f7f3;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #106a55;
}
.quiet {
  background: transparent;
}
.full {
  width: 100%;
}
.icon-button {
  border: 0;
  background: transparent;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
}
.icon-button:hover {
  background: #eef5f0;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--green);
  padding: 8px 3px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}
.text-button .icon {
  width: 16px;
}
.muted,
.meta {
  color: var(--muted);
}
.meta {
  font-size: 12px;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 5px;
  color: #718078;
  background: #f0f3f1;
}
.pill.soft,
.soft {
  background: #eaf5ef;
  color: #236b53;
}
.pill.warning,
.warning {
  background: #fff3df;
  color: #a96517;
}
.pill.light {
  background: #ffffff1a;
  color: #d8f0e6;
}
.text-amber,
.danger {
  color: var(--amber);
}
.text-green {
  color: var(--green);
}
.text-button.danger {
  color: #af4541;
}
.notice {
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 20px;
}
.note {
  padding: 12px 15px;
  background: #f5f8f6;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}
.school-mark {
  height: 43px;
  width: 43px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 11px;
}
.loading-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  color: var(--muted);
}
.loading-screen img {
  width: 62px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}
.auth-story {
  background: #155c4c;
  color: #fff;
  padding: 48px max(40px, 8vw);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  color: white;
  white-space: nowrap;
}
.wordmark .school-mark {
  background: #eaf5ef;
  padding: 3px;
}
.auth-copy {
  margin: auto 0;
  padding: 55px 0;
}
.auth-copy h1 {
  font-size: clamp(34px, 3.7vw, 56px);
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 24px 0 22px;
}
.auth-copy > p {
  color: #c3dbcf;
  line-height: 1.9;
  font-size: 15px;
}
.story-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1e7db;
  font-size: 13px;
}
.cabinet-illustration {
  margin-top: 50px;
  max-width: 345px;
  transform: rotate(-2deg);
}
.cabinet-top {
  border: 2px solid #73a18b;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  display: inline-block;
  font-size: 12px;
  color: #d2e7d7;
  background: #2a6d5a;
  margin-left: 15px;
}
.cabinet-doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 4px solid #bed0b1;
  background: #e5ecdc;
  border-radius: 5px;
  box-shadow: 12px 12px 0 #114f40;
  overflow: hidden;
}
.cabinet-doors > div:not(.cabinet-shelf) {
  height: 125px;
  border-right: 3px solid #bed0b1;
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  color: #326650;
  position: relative;
}
.cabinet-doors > div:nth-child(3) {
  border: 0;
}
.cabinet-doors .icon {
  width: 45px;
  height: 45px;
  stroke-width: 1.2;
}
.cabinet-doors span {
  font-size: 12px;
  letter-spacing: 5px;
}
.cabinet-shelf {
  height: 27px;
  background: #bacfa9;
  grid-column: 1/4;
  margin: 15px 10px 8px;
  border-radius: 2px;
  box-shadow: inset 0 4px #a0bb8e;
}
.cabinet-feet {
  height: 20px;
  border-left: 8px solid #bed0b1;
  border-right: 8px solid #bed0b1;
  margin: 0 22px;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  background: #fcfefd;
}
.auth-box {
  width: 100%;
  max-width: 380px;
  padding: 20px 0;
}
.auth-box h2 {
  font-size: 27px;
  margin-bottom: 6px;
}
.auth-box > .muted {
  font-size: 14px;
}
.demo-entry {
  background: #f1f6f2;
  border: 1px solid #dde9e0;
  border-radius: 12px;
  padding: 17px;
  margin: 25px 0;
}
.demo-entry strong {
  font-size: 14px;
  display: block;
}
.demo-entry span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.demo-buttons {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}
.demo-buttons .button {
  flex: 1;
  font-size: 12px;
  padding: 9px 8px;
  min-height: 42px;
  background: #fff;
}
.demo-buttons .icon {
  width: 17px;
}
.auth-box form > .field {
  margin: 14px 0;
}
.auth-box .form-footer {
  padding: 5px 0 0;
  border: 0;
}
.auth-box .form-footer .button {
  width: 100%;
  min-height: 48px;
}
.auth-switch {
  text-align: center;
  font-size: 13px;
  margin: 13px 0 8px;
  color: var(--muted);
}
.help-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.help-link .icon {
  width: 15px;
}
.auth-footnote {
  font-size: 11px;
  color: #8da197;
  margin-top: 25px;
}
.auth-mobile-brand {
  display: none;
}
.sidebar {
  width: 232px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px;
  color: var(--dark);
}
.brand strong {
  font-size: 14px;
  display: block;
  line-height: 1.4;
  max-width: 140px;
  overflow-wrap: anywhere;
}
.brand span {
  font-size: 11px;
  color: var(--muted);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 42px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #6b8078;
  padding: 13px 17px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 550;
  min-height: 48px;
}
.nav-item.active {
  background: #eaf4ee;
  color: var(--green);
}
.nav-item.active .icon {
  stroke-width: 2;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
  font-size: 12px;
}
.sidebar-bottom > a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  margin-bottom: 25px;
}
.sidebar-bottom p {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 14px;
}
.sidebar-bottom p span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.workspace {
  margin-left: 232px;
}
.mobile-header,
.bottom-nav {
  display: none;
}
.demo-banner {
  background: #eef4e7;
  border-bottom: 1px solid #e0e9d9;
  color: #62764e;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 35px;
  font-size: 11px;
  line-height: 1.6;
}
.demo-banner button {
  background: transparent;
  border: 0;
  font-size: 11px;
  color: #62764e;
  text-decoration: underline;
  margin-left: auto;
  white-space: nowrap;
  min-height: 24px;
}
.status-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #89a768;
  flex-shrink: 0;
}
main {
  padding: 34px 36px 60px;
  max-width: 1400px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 28px;
}
.page-heading > div:first-child {
  min-width: 0;
}
.page-heading h1 {
  font-size: 29px;
}
.page-heading p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.section {
  margin-top: 30px;
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.section-heading h2 {
  font-size: 17px;
}
.section-heading > a,
.section-heading > .muted {
  font-size: 12px;
}
.section-heading a .icon {
  width: 16px;
}
.small-count {
  color: var(--muted);
  font-size: 12px;
}
.overview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 0;
  margin-bottom: 22px;
}
.overview-strip > div {
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-right: 1px solid var(--line);
}
.overview-strip > div:last-child {
  border: 0;
}
.overview-strip span {
  font-size: 12px;
  color: var(--muted);
}
.overview-strip strong {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.overview-strip small {
  font-size: 11px;
  margin-left: 5px;
  letter-spacing: 0;
  color: var(--muted);
}
.quick-actions {
  display: flex;
  gap: 14px;
}
.quick-action {
  border: 1px solid #cbded2;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.quick-action > .icon:first-child {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}
.quick-action > .icon:last-child {
  margin-left: auto;
  width: 19px;
}
.quick-action strong {
  font-size: 19px;
  display: block;
  font-weight: 650;
}
.quick-action span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.quick-action:hover {
  border-color: var(--green);
}
.primary-action {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary-action span {
  color: #c6e4d8;
}
.quick-action.compact {
  flex: 0.78;
}
.quick-action.compact strong {
  font-size: 16px;
}
.quick-action.compact > .icon {
  width: 25px;
}
.warehouses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.warehouse-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  text-align: left;
  display: flex;
  gap: 13px;
  padding: 20px;
  align-items: center;
  min-width: 0;
}
.warehouse-card:hover {
  border-color: #a0c2b2;
}
.warehouse-drawing {
  width: 55px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3fb;
  border-radius: 7px;
  color: #3b6dc5;
  flex-shrink: 0;
  border-bottom: 4px solid #ccd8ee;
}
.warehouse-drawing .icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.25;
}
.warehouse-card.chemistry .warehouse-drawing {
  background: #f9f0e7;
  color: #b47d45;
  border-bottom-color: #ecdcc5;
}
.warehouse-card.biology .warehouse-drawing {
  background: #edf4e8;
  color: #669344;
  border-bottom-color: #d6e3c9;
}
.warehouse-card > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.warehouse-card h3 {
  font-size: 15px;
}
.warehouse-card p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.warehouse-card > .icon {
  width: 16px;
  color: #94a69c;
}
.warehouse-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}
.warehouse-meta strong {
  font-size: 17px;
  color: var(--dark);
  font-weight: 600;
}
.warn {
  color: var(--amber);
}
.warehouse-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.warehouse-list .warehouse-card {
  padding: 14px 18px;
}
.warehouse-list .warehouse-drawing {
  width: 42px;
  height: 52px;
}
.warehouse-list .warehouse-drawing .icon {
  width: 28px;
  height: 28px;
}
.warehouse-list .warehouse-meta {
  margin-top: 7px;
}
.home-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 25px;
  align-items: start;
}
.panel,
.inventory-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kit-card {
  background: white;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}
.kit-card:hover {
  border-color: var(--green);
}
.kit-card h3 {
  margin: 13px 0 6px;
  font-size: 16px;
}
.kit-card > .muted {
  font-size: 12px;
}
.kit-arrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green);
  font-size: 12px;
  margin-top: 23px;
}
.kit-arrow .icon {
  width: 17px;
}
.subject-tag {
  display: inline-block;
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 7px;
}
.physics,
.blue {
  color: var(--blue);
}
.subject-tag.physics,
.row-icon.physics,
.row-icon.blue {
  background: #edf2fb;
}
.chemistry {
  color: #a86f31;
}
.subject-tag.chemistry,
.row-icon.chemistry {
  background: #faf1e5;
}
.biology {
  color: #609040;
}
.subject-tag.biology,
.row-icon.biology {
  background: #edf5e7;
}
.subject-tag.general {
  background: #edf3f0;
  color: #527366;
}
.order-row,
.supply-row,
.movement-row {
  width: 100%;
  padding: 19px 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: white;
  border: 0;
  border-bottom: 1px solid #eaf0ec;
  text-align: left;
}
.order-row:last-child,
.supply-row:last-child,
.movement-row:last-child {
  border-bottom: 0;
}
.order-row:hover,
.supply-row:hover {
  background: #fbfdfa;
}
.row-icon {
  width: 39px;
  height: 39px;
  border-radius: 9px;
  background: #f0f5f2;
  color: #698276;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.row-icon.amber {
  background: #fcf3e5;
  color: var(--amber);
}
.row-icon.green {
  background: #eaf5ef;
  color: var(--green);
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-main h3 {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.row-main p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.row-main .meta {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.row-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.row-end > span:last-child {
  font-size: 10px;
  color: var(--muted);
}
.row-end strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
  width: 100%;
}
.empty > .icon {
  width: 37px;
  height: 37px;
  color: #b2c7ba;
  margin-bottom: 12px;
  stroke-width: 1.2;
}
.empty h3 {
  font-size: 14px;
  color: #5b7567;
  font-weight: 500;
}
.empty p {
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.8;
}
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  white-space: nowrap;
  margin-bottom: 20px;
  padding-bottom: 3px;
  scrollbar-width: thin;
}
.filter-tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 8px;
  min-height: 40px;
  font-size: 13px;
  padding: 8px 16px;
}
.filter-tabs button.selected {
  background: #e2eee5;
  color: #2e6e50;
  font-weight: 600;
  border-color: #d3e5d8;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 17px;
}
.search-box {
  position: relative;
  flex: 1;
  max-width: 500px;
}
.search-box > .icon {
  position: absolute;
  left: 14px;
  top: 13px;
  color: #92a59a;
  width: 19px;
}
.search-box input {
  width: 100%;
  padding-left: 42px;
}
.toolbar > select {
  max-width: 150px;
  font-size: 13px;
}
.inventory-topline {
  padding: 14px 20px;
  background: #fafcfb;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.inventory-topline > div {
  display: flex;
  gap: 17px;
  align-items: center;
}
.inventory-topline .text-button {
  font-size: 12px;
  min-height: 28px;
  padding: 0;
}
.inventory-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 2.2fr) minmax(
      110px,
      1.2fr
    ) 85px 70px 18px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border: 0;
  border-bottom: 1px solid #eaf0ec;
  text-align: left;
}
.inventory-row:last-child {
  border-bottom: 0;
}
.inventory-row:hover {
  background: #fbfdfa;
}
.item-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.item-identity h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.item-identity p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.type-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  color: #85988e;
  margin-left: 7px;
}
.item-position {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #527264;
}
.item-position small {
  font-size: 11px;
  color: var(--muted);
}
.stock-number,
.loan-number {
  text-align: right;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.stock-number strong {
  font-size: 23px;
  font-weight: 650;
}
.stock-number small,
.loan-number small {
  font-size: 10px;
  color: var(--muted);
}
.loan-number strong {
  font-size: 16px;
  font-weight: 500;
}
.inventory-row > .icon {
  width: 15px;
  color: #adc0b3;
}
.load-more {
  text-align: center;
  margin-top: 22px;
}
.load-more p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.profile-card .school-mark {
  width: 66px;
  height: 66px;
}
.profile-card h2 {
  font-size: 20px;
}
.profile-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 8px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.settings-list > h2 {
  font-size: 14px;
  padding: 18px 20px;
  background: #fafcfb;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid #eaf0ec;
  background: #fff;
  text-align: left;
  width: 100%;
  color: var(--dark);
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-row > div {
  flex: 1;
  min-width: 0;
}
.setting-row strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.setting-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.setting-row > .icon:first-child {
  color: #5d8876;
  width: 20px;
}
.setting-row > .icon:last-child {
  width: 16px;
  color: #a1b5a9;
}
.setting-row .button {
  font-size: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 17px 0;
  min-width: 0;
}
.field > span,
.compact-field > span {
  font-size: 12px;
  color: #5c7568;
  font-weight: 550;
}
.field > small {
  font-size: 11px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 14px;
}
.field-hint:has(+ .field) {
  margin-top: -6px;
}
.form-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f3f7f4;
  color: var(--muted);
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  margin: 20px 0;
}
.form-note .icon {
  width: 15px;
  height: 17px;
}
.form-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.form-footer > .primary {
  flex: 1;
  min-height: 47px;
}
.form-error {
  color: #b6463f;
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.7;
}
.form-error:empty {
  display: none;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  margin: 15px 0;
}
.form-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 23px 0 10px;
}
.form-section-label > span {
  font-size: 11px;
  color: var(--muted);
}
.form-section-label h3 {
  font-size: 14px;
}
.subheading {
  margin: 27px 0 10px;
  font-size: 14px;
}
.quantity-list {
  border-top: 1px solid var(--line);
}
.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid #e7eee9;
}
.quantity-row > div:first-child {
  min-width: 0;
}
.quantity-row strong {
  font-size: 13px;
  display: block;
  overflow-wrap: anywhere;
}
.quantity-row span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.stepper {
  display: flex;
  border: 1px solid #d2ded7;
  border-radius: 8px;
  overflow: hidden;
  align-items: center;
  flex-shrink: 0;
}
.stepper button {
  background: #f6f9f7;
  border: 0;
  font-size: 19px;
  width: 32px;
  height: 39px;
  color: #6e8e7c;
}
.stepper input {
  width: 48px;
  padding: 5px 0;
  min-height: 39px;
  border: 0;
  text-align: center;
  border-radius: 0;
  font-size: 15px;
}
.qty-input {
  width: 85px;
  text-align: center;
  flex-shrink: 0;
}
.template-calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #edf5ef;
  border-radius: 10px;
  padding: 0 15px;
  gap: 0 15px;
  margin-bottom: 4px;
}
.template-calculator p {
  grid-column: 1/3;
  font-size: 11px;
  color: #6d8b78;
  margin: -3px 0 13px;
}
.return-line {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.return-line .field {
  margin: 4px 0 9px;
}
.return-line .field-hint {
  padding-top: 25px;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #f5f8f6;
  border-radius: 10px;
  padding: 17px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.detail-meta strong {
  font-size: 12px;
  color: var(--dark);
  font-weight: 500;
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.detail-lines > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.detail-lines strong {
  font-size: 14px;
}
.detail-lines p,
.detail-lines span {
  font-size: 12px;
  margin-top: 5px;
}
.detail-lines p {
  color: var(--muted);
}
.item-totals {
  display: flex;
  gap: 12px;
  justify-content: space-around;
  text-align: center;
  margin: 25px 0;
}
.item-totals strong {
  font-size: 27px;
  display: block;
  font-weight: 650;
}
.item-totals span {
  font-size: 11px;
  color: var(--muted);
}
.button-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.template-list {
  margin-top: 15px;
}
.template-list-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.template-list-row strong {
  display: block;
  font-size: 14px;
}
.template-list-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.template-list-row .button {
  font-size: 12px;
  min-height: 39px;
}
.template-edit-row {
  display: grid;
  grid-template-columns: 1fr 72px 90px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.template-edit-row strong {
  font-size: 13px;
}
.template-edit-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 10px;
}
.template-edit-row input {
  text-align: center;
  padding: 9px 4px;
}
.template-edit-row select {
  font-size: 12px;
  padding: 8px;
}
.count-row {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}
.count-row > div:first-child {
  flex: 1;
  min-width: 0;
}
.count-row strong {
  font-size: 14px;
  display: block;
}
.count-row span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.compact-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100px;
}
.compact-field input {
  text-align: center;
}
.count-result {
  text-align: right;
}
.count-result strong {
  font-size: 19px;
}
.count-result span.text-amber {
  color: var(--amber);
}
.count-result span.text-green {
  color: var(--green);
}
.count-row > .field {
  width: 100%;
  margin: 0;
}
.cancel-count {
  margin-top: 18px;
}
.import-table {
  max-height: 45vh;
  overflow: auto;
}
.import-table > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.import-table span {
  font-size: 11px;
  color: var(--muted);
}
.import-table b {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
}
.users-list {
  margin-top: 15px;
}
dialog {
  border: 1px solid #d7e2da;
  border-radius: 18px;
  padding: 25px 28px;
  width: min(540px, calc(100vw - 32px));
  max-height: 90dvh;
  color: var(--dark);
  box-shadow: 0 22px 75px #183b352b;
  background: #fff;
  overscroll-behavior: contain;
}
dialog.wide {
  width: min(640px, calc(100vw - 32px));
}
dialog::backdrop {
  background: #102e2866;
  backdrop-filter: blur(3px);
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.modal-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 5px;
}
.modal-heading h2 {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.modal-heading .icon-button {
  margin: -8px -10px 0 0;
}
.modal-heading + .intro {
  margin-top: -5px;
}
#toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 13px 22px;
  color: #fff;
  background: #244d40;
  box-shadow: 0 5px 20px #183b3520;
  border-radius: 10px;
  max-width: min(90vw, 520px);
  font-size: 13px;
  line-height: 1.7;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.16s,
    transform 0.16s;
  z-index: 200;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.guide-topbar {
  padding: 20px 6%;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.guide-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  font-size: 15px;
  font-weight: 600;
}
.guide-content {
  max-width: 950px;
  margin: 0 auto;
  padding: 55px 30px 90px;
}
.guide-intro h1 {
  font-size: 37px;
}
.guide-intro > p {
  margin: 15px 0 25px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.guide-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-section {
  padding-top: 46px;
  scroll-margin-top: 20px;
}
.guide-section > h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.guide-section > p {
  color: var(--muted);
  line-height: 1.9;
}
.guide-steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.guide-step {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  counter-increment: step;
}
.guide-step:before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  background: #e8f3eb;
  color: var(--green);
  border-radius: 50%;
  font-weight: 600;
  margin-bottom: 16px;
}
.guide-step h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.guide-step p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 20px;
  font-size: 13px;
}
.guide-table th,
.guide-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.guide-table th {
  background: #eaf3ed;
  color: #3f6c51;
  font-weight: 600;
}
.guide-section details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 16px 18px;
}
.guide-section summary {
  font-size: 14px;
  cursor: pointer;
  font-weight: 550;
}
.guide-section details p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  padding-top: 12px;
}
.guide-callout {
  padding: 20px;
  background: #e8f2eb;
  border-left: 3px solid var(--green);
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.9;
}
.guide-foot {
  font-size: 12px;
  color: var(--muted);
  margin-top: 40px;
}
@media (min-width: 1500px) {
  main {
    padding-top: 45px;
  }
  .home-columns {
    grid-template-columns: 1.4fr 1fr;
  }
  .quick-action {
    padding: 26px;
  }
  .warehouse-card {
    padding: 24px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .workspace {
    margin-left: 205px;
  }
  main {
    padding: 28px 25px 45px;
  }
  .warehouses {
    gap: 10px;
  }
  .warehouse-card {
    padding: 15px 12px;
    gap: 10px;
  }
  .warehouse-drawing {
    width: 39px;
    height: 61px;
  }
  .warehouse-card > .icon {
    display: none;
  }
  .warehouse-meta {
    gap: 7px;
  }
  .quick-action {
    padding: 18px 15px;
    gap: 10px;
  }
  .quick-action.compact {
    flex: 0.85;
  }
  .quick-action > .icon:last-child {
    display: none;
  }
  .quick-action strong {
    font-size: 17px;
  }
  .overview-strip > div {
    padding: 0 20px;
  }
  .inventory-row {
    grid-template-columns: minmax(160px, 1.7fr) minmax(100px, 1fr) 70px 55px;
    gap: 10px;
  }
  .inventory-row > .icon {
    display: none;
  }
  .home-columns {
    gap: 17px;
  }
  .order-row,
  .supply-row {
    padding: 17px 15px;
  }
  .row-main p {
    font-size: 10px;
  }
  .row-end > span:last-child {
    font-size: 9px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 175px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .sidebar .brand {
    gap: 8px;
  }
  .sidebar .brand .school-mark {
    width: 34px;
    height: 34px;
  }
  .sidebar .brand strong {
    font-size: 12px;
  }
  .workspace {
    margin-left: 175px;
  }
  main {
    padding: 25px 20px 40px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .eyebrow {
    font-size: 11px;
  }
  .warehouses {
    grid-template-columns: 1fr;
  }
  .warehouse-card {
    padding: 15px;
    gap: 15px;
  }
  .warehouse-drawing {
    width: 45px;
    height: 55px;
  }
  .warehouse-meta {
    margin-top: 6px;
  }
  .warehouse-card > .icon {
    display: block;
  }
  .warehouse-card p {
    display: none;
  }
  .warehouse-meta {
    gap: 15px;
  }
  .home-columns {
    grid-template-columns: 1fr;
  }
  .home-columns > .section:last-child {
    margin-top: 5px;
  }
  .kit-grid {
    gap: 10px;
  }
  .kit-card {
    padding: 15px 12px;
  }
  .kit-card h3 {
    font-size: 14px;
  }
  .kit-card > .muted {
    font-size: 10px;
  }
  .quick-action.compact {
    display: none;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .overview-strip > div {
    display: block;
    padding: 0 18px;
  }
  .overview-strip span {
    display: block;
    margin-bottom: 4px;
  }
  .overview-strip strong {
    font-size: 29px;
  }
  .auth-story {
    padding: 40px 30px;
  }
  .auth-copy h1 {
    font-size: 38px;
  }
  .auth-copy > p {
    font-size: 13px;
  }
  .auth-panel {
    padding: 30px;
  }
  .demo-buttons .icon {
    display: none;
  }
  .inventory-row {
    grid-template-columns: 1fr 85px 65px;
  }
  .item-position {
    grid-column: 1;
    grid-row: 2;
    margin-left: 52px;
    flex-direction: row;
    font-size: 10px;
  }
  .stock-number {
    grid-column: 2;
    grid-row: 1/3;
  }
  .loan-number {
    grid-column: 3;
    grid-row: 1/3;
  }
  .inventory-row {
    gap: 3px 10px;
  }
  .item-identity p {
    font-size: 10px;
  }
  .movement-row {
    padding: 16px;
  }
  .guide-steps {
    gap: 10px;
  }
  .guide-step {
    padding: 18px;
  }
}
@media (max-width: 680px) {
  body {
    font-size: 14px;
  }
  .auth-layout {
    display: block;
  }
  .auth-story {
    display: none;
  }
  .auth-panel {
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 26px 25px;
    background: #f8fbf9;
  }
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 17px;
  }
  .auth-mobile-brand .school-mark {
    width: 38px;
    height: 38px;
  }
  .auth-mobile-brand strong {
    font-size: 16px;
  }
  .auth-box {
    padding: 14px 0;
    max-width: 380px;
  }
  .auth-box h2 {
    font-size: 25px;
  }
  .auth-box > .muted {
    font-size: 12px;
  }
  .auth-footnote {
    margin-top: auto;
    padding-top: 24px;
  }
  .demo-entry {
    margin: 21px 0;
    padding: 15px;
  }
  .demo-buttons .icon {
    display: block;
    width: 16px;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-header {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .mobile-header .school-mark {
    width: 37px;
    height: 37px;
  }
  .mobile-header > div {
    flex: 1;
    min-width: 0;
  }
  .mobile-header strong {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .mobile-header span {
    font-size: 10px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
  }
  .demo-banner {
    padding: 7px 18px;
    gap: 7px;
    font-size: 10px;
  }
  .demo-banner button {
    font-size: 10px;
  }
  .demo-banner > span:nth-child(2) {
    max-width: 260px;
  }
  .bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    z-index: 4;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fffffff5;
    backdrop-filter: blur(10px);
    border-top: 1px solid #dce7df;
    padding: 7px 8px calc(7px + var(--safe));
  }
  .bottom-nav .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 9px;
    font-size: 10px;
    min-height: 46px;
    max-width: 95px;
  }
  .bottom-nav .nav-item .icon {
    width: 22px;
    height: 22px;
  }
  .bottom-nav .nav-item.active {
    background: transparent;
    color: var(--green);
  }
  main {
    padding: 25px 18px calc(100px + var(--safe));
    max-width: 580px;
  }
  .page-heading {
    margin-bottom: 22px;
    gap: 10px;
  }
  .page-heading .eyebrow {
    font-size: 10px;
    margin-bottom: 7px;
  }
  .page-heading h1 {
    font-size: 25px;
    letter-spacing: -0.5px;
  }
  .page-heading p:not(.eyebrow) {
    font-size: 11px;
    margin-top: 8px;
    line-height: 1.7;
  }
  .heading-actions .button {
    font-size: 11px;
    padding: 8px 10px;
    min-height: 37px;
  }
  .heading-actions .button .icon {
    width: 15px;
  }
  .page-heading:has(.heading-actions:not(:empty)) h1 {
    font-size: 24px;
  }
  .page-heading:has(.heading-actions:not(:empty)) > div:first-child {
    flex: 1;
  }
  .quick-actions {
    gap: 10px;
  }
  .quick-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    padding: 19px 16px;
    border-radius: 12px;
    min-height: 145px;
  }
  .quick-action > .icon:first-child {
    width: 28px;
    height: 28px;
  }
  .quick-action strong {
    font-size: 19px;
  }
  .quick-action span {
    font-size: 10px;
    line-height: 1.6;
    margin-top: 4px;
  }
  .quick-action.compact {
    display: none;
  }
  .section {
    margin-top: 27px;
  }
  .section-heading {
    margin-bottom: 12px;
  }
  .section-heading h2 {
    font-size: 16px;
  }
  .section-heading > .muted {
    font-size: 10px;
  }
  .kit-grid {
    display: flex;
    gap: 10px;
    overflow: auto;
    scroll-snap-type: x proximity;
    margin: 0 -18px;
    padding: 0 18px 7px;
    scrollbar-width: none;
  }
  .kit-card {
    min-width: 175px;
    flex: 0 0 47%;
    padding: 16px;
    scroll-snap-align: start;
  }
  .kit-card h3 {
    font-size: 14px;
    margin-top: 11px;
  }
  .kit-card > .muted {
    font-size: 10px;
  }
  .kit-arrow {
    margin-top: 21px;
    font-size: 11px;
  }
  .subject-tag {
    font-size: 9px;
  }
  .home-columns {
    gap: 0;
  }
  .home-columns > .section:last-child {
    margin-top: 27px;
  }
  .warehouse-list {
    gap: 9px;
  }
  .warehouse-list .warehouse-card {
    padding: 14px;
  }
  .warehouse-card h3 {
    font-size: 14px;
  }
  .warehouse-card p {
    display: block;
    font-size: 10px;
    margin-top: 2px;
  }
  .warehouse-meta {
    gap: 16px;
    font-size: 10px;
  }
  .warehouse-meta strong {
    font-size: 16px;
  }
  .warehouse-list .warehouse-meta {
    margin-top: 4px;
  }
  .row-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
  }
  .row-icon .icon {
    width: 18px;
    height: 18px;
  }
  .order-row,
  .supply-row,
  .movement-row {
    padding: 17px 13px;
    gap: 10px;
  }
  .row-main h3 {
    font-size: 12px;
  }
  .row-main p {
    font-size: 10px;
    line-height: 1.7;
  }
  .row-main .meta {
    font-size: 9px;
  }
  .row-end {
    gap: 6px;
  }
  .row-end strong {
    font-size: 13px;
  }
  .row-end > span:last-child {
    font-size: 9px;
  }
  .row-end .pill {
    font-size: 9px;
    padding: 3px 6px;
  }
  .overview-strip {
    padding: 16px 0;
    margin-bottom: 18px;
  }
  .overview-strip > div {
    padding: 0 19px;
  }
  .overview-strip span {
    font-size: 10px;
  }
  .overview-strip strong {
    font-size: 28px;
  }
  .overview-strip small {
    font-size: 10px;
    margin-left: 4px;
  }
  .warehouses {
    gap: 10px;
  }
  .warehouses .warehouse-card {
    padding: 14px 17px;
  }
  .warehouses .warehouse-drawing {
    width: 47px;
    height: 57px;
  }
  .warehouses .warehouse-drawing .icon {
    width: 30px;
  }
  .filter-tabs {
    margin-bottom: 15px;
    gap: 3px;
    margin-right: -18px;
    padding-right: 18px;
  }
  .filter-tabs button {
    padding: 8px 11px;
    font-size: 12px;
    min-height: 37px;
  }
  .toolbar {
    gap: 7px;
    margin-bottom: 13px;
    flex-wrap: wrap;
  }
  .search-box {
    flex: 1;
    min-width: 175px;
  }
  .search-box input {
    font-size: 12px;
    min-height: 43px;
    padding-left: 36px;
  }
  .search-box > .icon {
    left: 11px;
    top: 13px;
    width: 16px;
    height: 16px;
  }
  .toolbar select {
    padding: 9px 8px;
    font-size: 11px;
    min-height: 43px;
    max-width: 100px;
  }
  .toolbar > .button {
    font-size: 11px;
    min-height: 43px;
    padding: 7px 11px;
  }
  .toolbar > .button .icon {
    width: 15px;
  }
  .inventory-topline {
    padding: 12px 14px;
    font-size: 10px;
    gap: 5px;
  }
  .inventory-topline > div {
    gap: 14px;
  }
  .inventory-topline .text-button {
    font-size: 10px;
  }
  .inventory-row {
    grid-template-columns: 1fr 64px 46px;
    padding: 16px 13px;
    gap: 3px 8px;
  }
  .item-identity {
    gap: 10px;
  }
  .item-identity h3 {
    font-size: 12px;
  }
  .item-identity .row-icon {
    width: 32px;
    height: 36px;
  }
  .item-identity .row-icon .icon {
    width: 18px;
  }
  .item-identity p {
    font-size: 9px;
    margin-top: 3px;
  }
  .type-label {
    font-size: 9px;
    margin-left: 5px;
  }
  .item-position {
    margin-left: 42px;
    font-size: 9px;
    gap: 8px;
  }
  .item-position small {
    font-size: 9px;
  }
  .stock-number strong {
    font-size: 23px;
  }
  .stock-number small,
  .loan-number small {
    font-size: 9px;
    white-space: nowrap;
  }
  .loan-number strong {
    font-size: 14px;
  }
  .profile-card {
    padding: 20px;
    gap: 15px;
    margin-bottom: 20px;
  }
  .profile-card .school-mark {
    width: 52px;
    height: 52px;
  }
  .profile-card h2 {
    font-size: 17px;
  }
  .profile-card p {
    font-size: 11px;
  }
  .profile-card .meta {
    font-size: 10px;
    line-height: 1.9;
  }
  .settings-grid {
    gap: 20px;
  }
  .settings-list > h2 {
    font-size: 12px;
    padding: 14px 17px;
  }
  .setting-row {
    padding: 17px;
    gap: 13px;
  }
  .setting-row strong {
    font-size: 13px;
  }
  .setting-row span {
    font-size: 10px;
  }
  .setting-row > .icon:first-child {
    width: 19px;
  }
  .setting-row .button {
    font-size: 11px;
    padding: 7px 10px;
    min-height: 36px;
  }
  .empty {
    padding: 34px 18px;
  }
  .empty h3 {
    font-size: 13px;
  }
  .empty p {
    font-size: 11px;
  }
  .empty > .icon {
    width: 32px;
    height: 32px;
  }
  dialog,
  dialog.wide {
    width: calc(100vw - 16px);
    max-height: 94dvh;
    border-radius: 18px 18px 12px 12px;
    padding: 24px 20px calc(20px + var(--safe));
    margin: auto auto 8px;
    border: 1px solid #e0e9e3;
  }
  .modal-heading {
    margin-bottom: 22px;
  }
  .modal-heading h2 {
    font-size: 22px;
  }
  .modal-heading .eyebrow {
    font-size: 10px;
  }
  .field {
    margin: 14px 0;
    gap: 7px;
  }
  .field > span {
    font-size: 12px;
  }
  input,
  select {
    font-size: 16px;
    min-height: 46px;
    padding: 10px;
  }
  .form-grid {
    gap: 0 12px;
  }
  .form-footer {
    gap: 9px;
    position: sticky;
    bottom: calc(-20px - var(--safe));
    background: white;
    padding: 14px 0 calc(5px + var(--safe));
    z-index: 2;
    margin-top: 15px;
  }
  .form-footer .button {
    font-size: 13px;
    min-height: 46px;
    padding: 10px 13px;
  }
  .form-note {
    font-size: 10px;
  }
  .form-section-label h3 {
    font-size: 13px;
  }
  .form-section-label > span {
    font-size: 10px;
  }
  .quantity-row {
    gap: 10px;
    padding: 15px 0;
  }
  .quantity-row strong {
    font-size: 13px;
  }
  .quantity-row span {
    font-size: 10px;
    max-width: 185px;
    line-height: 1.7;
  }
  .stepper button {
    width: 31px;
    height: 41px;
  }
  .stepper input {
    width: 45px;
    min-height: 41px;
  }
  .qty-input {
    width: 77px;
  }
  .template-calculator {
    padding: 0 12px;
    gap: 0 12px;
  }
  .template-calculator p {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .intro {
    font-size: 12px;
    line-height: 1.8;
  }
  .notice {
    font-size: 12px;
    padding: 13px;
  }
  .return-line {
    padding-bottom: 13px;
  }
  .return-line .form-section-label {
    margin-top: 18px;
  }
  .return-line .field > span {
    font-size: 11px;
  }
  .template-edit-row {
    grid-template-columns: 1fr 60px 80px;
    gap: 9px;
  }
  .template-edit-row strong {
    font-size: 12px;
  }
  .template-edit-row select {
    font-size: 12px;
  }
  .count-row {
    gap: 13px;
  }
  .count-row strong {
    font-size: 13px;
  }
  .count-row span {
    font-size: 10px;
  }
  .count-result strong {
    font-size: 19px;
  }
  .compact-field {
    width: 85px;
  }
  .detail-meta {
    gap: 13px;
    padding: 14px;
  }
  .detail-meta strong {
    font-size: 12px;
  }
  .detail-lines strong {
    font-size: 13px;
  }
  .detail-lines p,
  .detail-lines span {
    font-size: 11px;
  }
  .button-stack .button {
    font-size: 12px;
  }
  .import-table > div {
    font-size: 12px;
  }
  .auth-box .form-footer {
    position: static;
    padding-bottom: 0;
    background: transparent;
  }
  #toast {
    bottom: calc(88px + var(--safe));
    font-size: 12px;
    padding: 12px 18px;
  }
  .guide-topbar {
    padding: 16px 20px;
  }
  .guide-brand {
    font-size: 13px;
    gap: 8px;
  }
  .guide-brand .school-mark {
    width: 33px;
    height: 33px;
  }
  .guide-topbar > .button {
    font-size: 12px;
    min-height: 38px;
    padding: 8px 11px;
  }
  .guide-content {
    padding: 36px 20px 70px;
  }
  .guide-intro h1 {
    font-size: 29px;
  }
  .guide-intro > p {
    font-size: 13px;
  }
  .guide-links .button {
    font-size: 12px;
    padding: 8px 14px;
    min-height: 39px;
  }
  .guide-section {
    padding-top: 35px;
  }
  .guide-section > h2 {
    font-size: 21px;
  }
  .guide-section > p {
    font-size: 13px;
  }
  .guide-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .guide-step {
    position: relative;
    padding: 18px 18px 18px 65px;
  }
  .guide-step:before {
    position: absolute;
    left: 18px;
    top: 20px;
    width: 27px;
    height: 27px;
    font-size: 12px;
  }
  .guide-step h3 {
    font-size: 15px;
    margin-bottom: 5px;
  }
  .guide-step p {
    font-size: 12px;
  }
  .guide-table {
    font-size: 11px;
  }
  .guide-table th,
  .guide-table td {
    padding: 12px 10px;
  }
  .guide-section details {
    padding: 14px;
  }
  .guide-section summary {
    font-size: 13px;
  }
  .guide-section details p {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .mobile-header {
    padding-left: 14px;
    padding-right: 14px;
  }
  .demo-banner {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 9px;
  }
  .page-heading h1,
  .page-heading:has(.heading-actions:not(:empty)) h1 {
    font-size: 22px;
  }
  .page-heading .heading-actions .button {
    padding: 7px 8px;
    font-size: 10px;
  }
  .page-heading .heading-actions .button .icon {
    display: none;
  }
  .quick-action {
    padding: 17px 13px;
  }
  .quick-action strong {
    font-size: 17px;
  }
  .quick-action span {
    font-size: 9px;
  }
  .overview-strip > div {
    padding: 0 14px;
  }
  .inventory-row {
    grid-template-columns: 1fr 55px 40px;
    gap: 3px 5px;
    padding: 15px 11px;
  }
  .item-identity {
    gap: 8px;
  }
  .item-identity .row-icon {
    display: none;
  }
  .item-position {
    margin-left: 0;
  }
  .loan-number small {
    font-size: 8px;
  }
  .toolbar select {
    max-width: 87px;
  }
  .search-box {
    min-width: 150px;
  }
  .toolbar > .button {
    padding: 7px 8px;
  }
  .toolbar > .button .icon {
    display: none;
  }
  .demo-buttons .button {
    font-size: 11px;
  }
  .demo-buttons .icon {
    display: none;
  }
  dialog,
  dialog.wide {
    padding-left: 16px;
    padding-right: 16px;
  }
  .quantity-row span {
    max-width: 155px;
  }
  .stepper button {
    width: 28px;
  }
  .stepper input {
    width: 39px;
  }
  .row-end > span:last-child {
    max-width: 60px;
  }
  .order-row > .row-icon {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .sidebar,
  .mobile-header,
  .bottom-nav,
  .demo-banner,
  .heading-actions,
  .toolbar,
  .filter-tabs,
  .inventory-topline > div,
  .quick-actions,
  .form-footer,
  #toast {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .page-heading {
    display: block;
    margin-bottom: 20px;
  }
  .page-heading .eyebrow {
    display: none;
  }
  .inventory-panel,
  .panel {
    border: 1px solid #ccc;
    border-radius: 0;
  }
  .inventory-row {
    break-inside: avoid;
    grid-template-columns: 2fr 1fr 70px 70px;
    padding: 12px;
  }
  .inventory-row .icon {
    display: none;
  }
  .item-position {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }
  .stock-number,
  .loan-number {
    grid-column: auto;
    grid-row: auto;
  }
  .inventory-row > .item-identity {
    display: block;
  }
  .stock-number strong {
    font-size: 17px;
  }
  .order-row,
  .movement-row {
    break-inside: avoid;
  }
  .load-more {
    display: none;
  }
  .guide-topbar {
    display: none;
  }
  .guide-content {
    padding: 0;
  }
  .guide-section {
    break-inside: avoid;
  }
  a {
    color: inherit;
  }
}

@media (max-width: 680px) {
  .row-main h3,
  .item-identity h3 {
    font-size: 13px;
  }
  .row-main p {
    font-size: 11px;
  }
  .row-main .meta {
    font-size: 10px;
  }
  .row-end > span:last-child {
    font-size: 10px;
  }
}
@media (max-width: 370px) {
  .filter-tabs {
    margin-right: -14px;
    padding-right: 14px;
  }
  .kit-grid {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}
