html {
  font-size: 15px;
}

body {
  margin: 0;
  background: #f6f7f9;
  color: #20252d;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.app-sidebar {
  background: #17202b;
  color: #fff;
  padding: 22px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 28px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4fb286;
  color: #102019;
  border-radius: 8px;
  font-weight: 800;
}

.brand-mark .bi {
  font-size: 1.15rem;
}

.app-nav {
  gap: 4px;
}

.app-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cdd5df;
  border-radius: 8px;
  padding: 10px 12px;
}

.app-nav .nav-link .bi {
  width: 20px;
  text-align: center;
  font-size: 1.02rem;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
  background: #253241;
  color: #fff;
}

.app-nav .nav-link.active {
  background: #4fb286;
  color: #102019;
  font-weight: 750;
}

.app-main {
  min-width: 0;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e2e7ee;
  padding: 0 28px;
}

.topbar-title {
  font-size: 1.08rem;
  font-weight: 700;
}

.topbar-subtitle {
  color: #6b7480;
  font-size: .84rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn .bi {
  line-height: 1;
}

.content-wrap {
  padding: 26px 28px 48px;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(145deg, #17202b 0%, #243447 55%, #4fb286 120%);
}

.auth-panel {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(20, 30, 42, .28);
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.metric {
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.metric-icon,
.module-card-icon,
.panel-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eaf7f1;
  color: #20724d;
}

.metric-icon {
  margin-bottom: 2px;
}

.metric-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.metric-label {
  color: #6b7480;
  font-size: .9rem;
  margin-top: 6px;
}

.panel {
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  margin-bottom: 14px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.module-tabs .btn.active {
  background: #17202b;
  color: #fff;
  border-color: #17202b;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.module-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 18px;
  color: #20252d;
  text-decoration: none;
}

.module-card:hover,
.module-card:focus {
  border-color: #4fb286;
  box-shadow: 0 10px 28px rgba(23, 32, 43, .08);
}

.module-card-title {
  display: block;
  font-weight: 750;
  margin-bottom: 6px;
}

.module-card-text {
  display: block;
  color: #6b7480;
  margin: 0;
}

.table-tools {
  position: relative;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-tools .form-control {
  max-width: 320px;
  padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7480' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
}

.table-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 12px;
}

.table {
  vertical-align: middle;
}

.form-label {
  font-weight: 650;
  font-size: .88rem;
}

.badge-soft {
  background: #eaf7f1;
  color: #20724d;
  border: 1px solid #cfeade;
}

.money {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.inventory-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.inventory-day {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-height: 96px;
}

.inventory-day-date {
  font-weight: 750;
  margin-bottom: 8px;
}

.inventory-day-stat {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #59626f;
  font-size: .86rem;
}

.note-item {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbfc;
}

.note-meta {
  color: #6b7480;
  font-size: .82rem;
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .topbar {
    height: auto;
    padding: 18px;
    gap: 12px;
  }

  .content-wrap {
    padding: 18px;
  }
}
