:root {
  --ink: #162e2c;
  --muted: #778480;
  --brand: #116b56;
  --soft: #e6f1eb;
  --line: #e9eeea;
  --bg: #f5f6f8;
  --danger: #b94f42;
  --shadow: 0 6px 28px #193d2e08;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px -apple-system,
    BlinkMacSystemFont,
    "Noto Sans",
    Arial,
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: var(--brand);
}
#app {
  max-width: 760px;
  margin: auto;
  min-height: 100vh;
  padding-bottom: 104px;
}
.top {
  padding: 24px 23px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.5px;
}
.logo {
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  background: var(--brand);
  border-radius: 11px;
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  transform: rotate(-3deg);
}
.company {
  font-size: 11px;
  color: var(--muted);
  font-weight: 450;
  letter-spacing: 0;
  margin-top: 4px;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dfebe2;
  color: #3c6d55;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
}
.mode {
  margin: 0 22px 14px;
  background: #fff6df;
  border: 1px solid #f1e8ca;
  color: #887143;
  font-size: 11px;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mode.server {
  background: #eaf4ef;
  border-color: #daebe0;
  color: #43705a;
}
.content {
  padding: 0 22px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #7f9186;
  font-weight: 700;
  text-transform: uppercase;
}
.greeting {
  margin: 18px 0 7px;
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.3;
}
.sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.hero {
  margin-top: 23px;
  border-radius: 22px;
  background: #154d40;
  color: #fff;
  padding: 24px;
  position: relative;
  overflow: hidden;
  min-height: 166px;
  box-shadow: 0 10px 25px #164d4015;
}
.hero:after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 30px solid #ffffff08;
  border-radius: 50%;
  right: -52px;
  top: 15px;
  pointer-events: none;
}
.hero .eyebrow {
  color: #a9ccbc;
}
.hero h2 {
  font-size: 22px;
  margin: 12px 0 6px;
  line-height: 1.5;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.hero p {
  color: #abcbbd;
  font-size: 12px;
  margin: 0 0 20px;
}
.hero button {
  background: #e6f0c6;
  color: #264b35;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 26px;
}
.stat {
  background: white;
  border-radius: 15px;
  padding: 16px 12px;
  box-shadow: var(--shadow);
}
.stat .value {
  font-size: 25px;
  font-weight: 650;
  margin: 6px 0;
}
.stat .label {
  font-size: 11px;
  color: var(--muted);
}
.stat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: #72a692;
  margin-right: 5px;
}
.section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 13px;
}
.section h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 650;
}
.section button {
  font-size: 11px;
  color: var(--muted);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.quick {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  background: white;
  border-radius: 15px;
}
.quick .ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #edf2ec;
  color: #4d765a;
}
.quick:nth-child(2) .ic {
  background: #edf0f8;
  color: #6a7da4;
}
.quick:nth-child(3) .ic {
  background: #f8f0e2;
  color: #ac8b47;
}
.quick:nth-child(4) .ic {
  background: #f0ebf6;
  color: #9981b2;
}
.card {
  background: #fff;
  border: 1px solid #edf0ec;
  border-radius: 17px;
  padding: 17px;
  margin: 11px 0;
  box-shadow: var(--shadow);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.row.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 5px;
}
.meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.tile-icon {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: #edf3ef;
  color: #5b876e;
  display: grid;
  place-items: center;
  flex: none;
}
.tile-icon.space {
  background: #e8eee3;
  color: #6a8357;
}
.tile-icon.equipment {
  background: #e8edf6;
  color: #6c82a5;
}
.tile-icon.service {
  background: #f4eddf;
  color: #ac8e56;
}
.badge {
  font-size: 10px;
  white-space: nowrap;
  padding: 4px 7px;
  border-radius: 6px;
  background: #ecf4ef;
  color: #4a8262;
  display: inline-block;
  line-height: 1.4;
}
.badge.pending,
.badge.review,
.badge.return_pending {
  background: #fbf1db;
  color: #a48539;
}
.badge.rejected,
.badge.overdue,
.badge.maintenance,
.badge.missing {
  background: #faeae6;
  color: #b36355;
}
.badge.cancelled,
.badge.retired {
  background: #f1f1f1;
  color: #888;
}
.badge.active,
.badge.borrowed {
  background: #eaf0fa;
  color: #547ba1;
}
.card-footer {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.small-action {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}
.nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 100%);
  background: #fffffff5;
  backdrop-filter: blur(18px);
  border-top: 1px solid #e9ede7;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px 5px max(14px, env(safe-area-inset-bottom));
}
.nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #9aa49f;
  font-size: 10px;
}
.nav button.active {
  color: var(--brand);
  font-weight: 650;
}
.nav button.active .nav-icon {
  background: #e9f2ea;
  border-radius: 10px;
}
.nav-icon {
  padding: 4px 16px;
  display: flex;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 22px;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.7px;
  flex: 1;
}
.back {
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow: auto;
  scrollbar-width: none;
}
.chip {
  white-space: nowrap;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 12px;
  background: #fff;
  color: #7c8a80;
  border: 1px solid #e7ece6;
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: #9da9a1;
  border: 1px solid var(--line);
}
.search input {
  border: 0;
  outline: 0;
  background: none;
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 13px;
}
.btn {
  background: var(--brand);
  color: white;
  border-radius: 11px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.secondary {
  background: #eaf1eb;
  color: #346f52;
}
.btn.danger {
  background: #faede8;
  color: var(--danger);
}
.btn.block {
  display: flex;
  width: 100%;
  margin-top: 14px;
}
.btn.small {
  padding: 9px 12px;
  font-size: 11px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.field {
  display: block;
  margin: 16px 0;
}
.field > span {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
  color: #526a5b;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid #dfe6df;
  background: #fff;
  padding: 13px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #14724e0c;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin: 12px 0;
  line-height: 1.6;
}
.check input {
  accent-color: var(--brand);
  width: 19px;
  height: 19px;
  flex: none;
}
.info {
  font-size: 12px;
  line-height: 1.8;
  color: #6d8073;
  background: #edf3ee;
  border-radius: 12px;
  padding: 13px 14px;
  margin: 14px 0;
}
.info.warn {
  background: #fbf3e0;
  color: #93783c;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.empty svg {
  margin-bottom: 12px;
  color: #b3c5b7;
}
.detail-hero {
  background: #e6eee2;
  border-radius: 19px;
  min-height: 160px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.detail-hero.equipment {
  background: #e7edf4;
}
.detail-hero.service {
  background: #f1ebdf;
}
.detail-hero .big-icon {
  position: absolute;
  right: 22px;
  top: 24px;
  opacity: 0.2;
  transform: rotate(-10deg);
}
.detail-hero h1 {
  font-size: 25px;
  margin: 28px 0 8px;
  max-width: 80%;
}
.kv {
  padding: 12px 0;
  border-bottom: 1px solid #f0f3ef;
  display: flex;
  gap: 15px;
  font-size: 12px;
  line-height: 1.7;
}
.kv:last-child {
  border: 0;
}
.kv .k {
  color: #8b978e;
  min-width: 90px;
}
.kv .v {
  flex: 1;
  text-align: right;
  overflow-wrap: anywhere;
}
.progress {
  height: 5px;
  background: #edf0eb;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 14px;
}
.progress i {
  display: block;
  background: #7d9d74;
  height: 100%;
  border-radius: 4px;
}
.timeline {
  padding-left: 15px;
  border-left: 2px solid #e5ede4;
  margin: 16px 0;
  font-size: 12px;
  color: #617c69;
}
.timeline p {
  margin: 0 0 7px;
}
.sheet {
  position: fixed;
  inset: 0;
  background: #122d254d;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-body {
  background: var(--bg);
  padding: 24px;
  max-height: 88vh;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  width: min(760px, 100%);
}
.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.sheet-title h2 {
  font-size: 19px;
  margin: 0;
}
.login {
  padding: 65px 28px 30px;
  max-width: 440px;
  margin: auto;
}
.login .logo {
  width: 57px;
  height: 57px;
  font-size: 38px;
  border-radius: 18px;
}
.login h1 {
  font-size: 37px;
  letter-spacing: -1.6px;
  margin: 24px 0 10px;
}
.login .lead {
  font-size: 15px;
  line-height: 1.8;
  color: #7c8d81;
  margin-bottom: 30px;
}
.login .card {
  padding: 23px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #eef1ed;
  cursor: pointer;
}
.settings-row:last-child {
  border: 0;
}
.settings-row .grow .title {
  font-size: 14px;
}
.count {
  font-size: 11px;
  color: #8c9b90;
}
.photo {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 12px;
}
#toast {
  display: none;
  position: fixed;
  z-index: 150;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: #19392ff2;
  color: white;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 12px;
  max-width: 88vw;
  line-height: 1.6;
  box-shadow: 0 4px 22px #0002;
}
.error {
  color: #b85e4b;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.skeleton {
  padding: 80px 24px;
  text-align: center;
  color: var(--muted);
}
.dot-unread {
  width: 7px;
  height: 7px;
  background: #c3a15a;
  border-radius: 50%;
  flex: none;
}
.inline-amount {
  font-size: 12px;
  color: #6d8c77;
}
.code {
  font-family: monospace;
  letter-spacing: 1px;
  color: #7e8d82;
  font-size: 11px;
}
.pill {
  display: inline-block;
  border: 1px solid #dce5dc;
  padding: 6px 9px;
  border-radius: 7px;
  color: #64806b;
  font-size: 10px;
  margin: 3px;
}
.footer-note {
  font-size: 10px;
  text-align: center;
  color: #a6b0a8;
  margin: 32px 0 10px;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
}
.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
svg {
  display: block;
  flex-shrink: 0;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
}
.offline-banner {
  padding: 12px 22px;
  background: #faece4;
  font-size: 12px;
  color: #a66742;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
@media (min-width: 600px) {
  .content {
    padding: 0 32px;
  }
  .top {
    padding: 24px 32px 14px;
  }
  .resource-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .resource-grid .card {
    margin: 0;
  }
  .hero {
    min-height: 185px;
  }
  .quick {
    padding: 18px;
  }
  .stats .stat {
    padding: 20px;
  }
  .sheet {
    align-items: center;
  }
  .sheet-body {
    border-radius: 24px;
    width: 560px;
  }
}
