:root {
  --green: #176b4d;
  --green-dark: #0d4936;
  --green-soft: #e8f4ed;
  --orange: #ee7b32;
  --orange-soft: #fff0e5;
  --ink: #18352c;
  --muted: #71827d;
  --line: #e6ece8;
  --bg: #f5f8f6;
  --white: #fff;
  --red: #c9534d;
  --blue: #3d78a8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
strong {
  font-family: "Manrope", sans-serif;
}
a {
  text-decoration: none;
  color: inherit;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background: var(--green-dark);
  color: #d9ebe2;
  width: 258px;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 10px 38px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.brand strong {
  font: 800 17px "Manrope";
  color: white;
  display: block;
}
.brand strong span {
  color: #f99b57;
}
.brand small {
  display: block;
  color: #8fb6a6;
  font-size: 10px;
  margin-top: 2px;
}
.nav-label,
.eyebrow,
.topbar-kicker {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: #91aa9f;
}
.nav-label {
  margin: 0 10px 10px;
}
.nav-label:not(:first-child) {
  margin-top: 30px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border-radius: 8px;
  color: #a9c8ba;
  margin: 3px 0;
  transition: 0.2s;
}
.nav-link lord-icon {
  width: 18px !important;
  height: 18px !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-link span {
  width: 19px;
  text-align: center;
  font-size: 19px;
}
.nav-link:hover,
.nav-link.active {
  background: #25805e;
  color: #fff;
}
.sidebar-bottom {
  margin-top: auto;
}
.method-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 12px;
  margin-bottom: 18px;
  border: 1px solid #326e59;
  border-radius: 8px;
  color: #e2f3e9;
}
.method-note > span {
  color: #f49a55;
  font-size: 19px;
}
.method-note b,
.method-note small {
  display: block;
}
.method-note b {
  font-size: 11px;
}
.method-note small {
  color: #91b8a8;
  font-size: 10px;
  margin-top: 3px;
}
.logout {
  border-top: 1px solid #32634f;
  padding-top: 18px;
  border-radius: 0;
}
.main-area {
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 98px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 48px;
  justify-content: space-between;
}
.topbar h2 {
  font-size: 22px;
  margin-top: 3px;
}
.topbar-kicker {
  color: var(--orange);
  font-size: 9px;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-menu b,
.user-menu small {
  display: block;
}
.user-menu b {
  font-size: 12px;
}
.user-menu small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.avatar {
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.menu-toggle {
  display: none;
}
.content {
  max-width: 1440px;
  padding: 38px 48px 30px;
  margin: auto;
}
.welcome-row,
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.welcome-row h1 {
  font-size: 29px;
  margin: 7px 0 5px;
}
.wave {
  color: var(--orange);
  font-size: 25px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.btn {
  border: 0;
  border-radius: 6px;
  padding: 11px 17px;
  font: 600 12px "DM Sans";
  cursor: pointer;
  display: inline-block;
}
.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 10px #ee7b3230;
}
.btn-light {
  background: #eef3f0;
  color: var(--ink);
}
.btn-block {
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 19px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.stat-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 20px;
}
.stat-green .stat-icon {
  background: var(--green-soft);
  color: var(--green);
}
.stat-orange .stat-icon {
  background: var(--orange-soft);
  color: var(--orange);
}
.stat-red .stat-icon {
  background: #fcebea;
  color: var(--red);
}
.stat-blue .stat-icon {
  background: #eaf2f9;
  color: var(--blue);
}
.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.stat-card strong {
  display: block;
  font-size: 24px;
  margin: 4px 0;
}
.stat-card small {
  font-size: 10px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
.panel,
.form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h3 {
  font-size: 16px;
  margin-top: 5px;
}
.text-link {
  color: var(--orange);
  font-weight: 600;
  font-size: 12px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}
th {
  color: #9aa7a2;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.7px;
  font-weight: 700;
  background: #fbfcfb;
}
th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f3f1;
  font-size: 12px;
  white-space: nowrap;
}
td b,
td small {
  display: block;
}
td small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
}
.badge-success {
  background: var(--green-soft);
  color: var(--green);
}
.badge-orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.badge-danger {
  background: #fcebea;
  color: var(--red);
}
.attention-list {
  padding: 8px 23px;
}
.attention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f3f1;
}
.attention-item:last-child {
  border: 0;
}
.medicine-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  display: grid;
  place-items: center;
}
.attention-item div:nth-child(2) {
  flex: 1;
}
.attention-item b,
.attention-item small {
  display: block;
}
.attention-item b {
  font-size: 12px;
}
.attention-item small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.attention-item > strong {
  font-size: 13px;
  color: var(--red);
}
.attention-item > strong small {
  display: inline;
  font-weight: 400;
}
.empty {
  text-align: center !important;
  color: var(--muted);
  padding: 28px;
}
.page-toolbar {
  margin-bottom: 18px;
}
.search-form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.search-form input {
  border: 0;
  padding: 9px 12px;
  width: 190px;
  outline: 0;
  font: 12px "DM Sans";
}
.search-form button {
  border: 0;
  background: #f5f8f6;
  color: var(--green);
  padding: 0 13px;
  font-size: 17px;
}
.medicine-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.medicine-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.batch-manager {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.panel-subheading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.panel-subheading h4 {
  margin-top: 6px;
  font-size: 20px;
}
.batch-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.batch-list {
  display: grid;
  gap: 12px;
}
.batch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}
.batch-item b,
.batch-item small {
  display: block;
}
.batch-item small {
  color: var(--muted);
  margin-top: 4px;
}
.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-btn {
  border: 0;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 6px;
  padding: 8px 10px;
  font: 600 11px "DM Sans";
  cursor: pointer;
}
.mini-btn.danger {
  background: #fde9e7;
  color: var(--red);
}
.form-panel {
  padding-bottom: 22px;
}
.form-panel .panel-heading {
  margin-bottom: 20px;
}
.close-link {
  font-size: 24px;
  color: var(--muted);
}
.form-grid {
  padding: 0 23px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.form-grid label,
.login-card label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
input,
select,
textarea {
  font: 13px "DM Sans";
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dfe8e3;
  border-radius: 5px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  outline-color: var(--green);
}
textarea {
  resize: vertical;
}
.full {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.actions a,
.actions button {
  color: var(--green);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 16px;
}
.actions form {
  display: inline;
}
.role-admin {
  color: var(--orange);
  font-weight: 700;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.report-summary-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 18px;
}
.report-summary-item .label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.report-summary-item strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
}
.report-summary-item small {
  color: var(--muted);
  font-size: 11px;
}
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 23px;
  border-bottom: 1px solid var(--line);
}
.report-header h3 {
  font-size: 18px;
  margin-top: 7px;
}
.report-meta {
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.report-table {
  min-width: 100%;
}
.report-table td,
.report-table th {
  white-space: normal;
}
.report-status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
}
.report-status.safe {
  background: var(--green-soft);
  color: var(--green);
}
.report-status.warning {
  background: var(--orange-soft);
  color: var(--orange);
}
.report-status.danger {
  background: #fcebea;
  color: var(--red);
}
.report-status.neutral {
  background: #eef3f0;
  color: var(--ink);
}
.print-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer {
  color: #9aa7a2;
  text-align: center;
  font-size: 11px;
  padding: 8px 0 22px;
}
.footer span {
  color: var(--orange);
  padding: 0 5px;
}
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 12px;
  transition: 0.3s;
}
.alert-success {
  background: var(--green-soft);
  color: var(--green);
}
.alert-danger {
  background: #fcebea;
  color: var(--red);
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #edf7f1 0%, #f8fbf9 55%, #fff0e5 100%);
}
.login-card {
  width: 430px;
  background: #fff;
  padding: 38px 42px;
  border-radius: 12px;
  box-shadow: 0 18px 50px #174c3815;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 42px;
}
.login-brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}
.login-brand strong {
  font: 800 19px "Manrope";
  display: block;
}
.login-brand strong span {
  color: var(--orange);
}
.login-brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.login-heading {
  margin-bottom: 25px;
}
.login-heading .eyebrow {
  color: var(--orange);
}
.login-heading h1 {
  font-size: 25px;
  margin: 9px 0 7px;
}
.login-heading > p:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.login-card form label {
  display: block;
  margin-bottom: 15px;
}
.login-hint {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 20px;
}
.login-hint b {
  color: var(--green);
}
@media (max-width: 1000px) {
  .sidebar {
    width: 220px;
  }
  .content {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    z-index: 5;
    left: -258px;
    height: 100vh;
    transition: 0.25s;
  }
  .sidebar-open .sidebar {
    left: 0;
  }
  .menu-toggle {
    display: block;
    border: 0;
    background: none;
    font-size: 20px;
    color: var(--green);
    margin-right: 12px;
  }
  .topbar {
    height: 78px;
    padding: 0 17px;
  }
  .topbar > div:first-of-type {
    flex: 1;
  }
  .topbar h2 {
    font-size: 18px;
  }
  .user-menu > div:last-child {
    display: none;
  }
  .content {
    padding: 24px 16px;
  }
  .welcome-row,
  .page-toolbar {
    align-items: flex-start;
    gap: 15px;
  }
  .welcome-row h1 {
    font-size: 23px;
  }
  .welcome-row .btn {
    white-space: nowrap;
  }
  .stat-grid,
  .report-summary {
    gap: 9px;
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    padding: 13px;
    gap: 9px;
  }
  .stat-icon {
    width: 31px;
    height: 31px;
    font-size: 16px;
  }
  .stat-card strong {
    font-size: 20px;
  }
  .dashboard-grid {
    gap: 0;
  }
  .panel-heading,
  .report-header {
    padding: 17px;
    flex-direction: column;
    align-items: flex-start;
  }
  .form-grid {
    grid-template-columns: 1fr;
    padding: 0 17px;
  }
  .login-card {
    width: calc(100% - 30px);
    padding: 30px 25px;
  }
  .login-brand {
    margin-bottom: 32px;
  }
  .page-toolbar {
    flex-direction: column;
  }
  .page-toolbar .btn {
    width: 100%;
    text-align: center;
  }
  .search-form input {
    width: 145px;
  }
  .report-meta {
    text-align: left;
  }
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .menu-toggle,
  .print-hidden,
  .btn,
  .nav-link,
  .logout {
    display: none !important;
  }
  .content {
    max-width: 100%;
    padding: 0;
  }
  .panel,
  .form-panel {
    border: 1px solid #1d1d1d;
    box-shadow: none;
  }
  .report-table th,
  .report-table td {
    font-size: 10px;
    padding: 8px 6px;
  }
  .report-header {
    padding: 0 0 12px;
    border-bottom: 1px solid #333;
  }
}
