:root{
  --ink:#19352f;
  --muted:#72827c;
  --green:#136c55;
  --line:#e0e7e2;
  --bg:#f5f7f4
}
*{
  box-sizing:border-box
}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:14px/1.55 'Segoe UI',Arial,sans-serif
}
a{
  color:var(--green);
  text-decoration:none
}
a:hover{
  text-decoration:underline
}
h1{
  font-size:30px;
  font-weight:650;
  letter-spacing:-1px;
  margin:5px 0 8px
}
h2{
  font-size:20px;
  margin-top:30px
}
h3{
  font-size:16px;
  margin:0 0 14px
}
.sidebar{
  width:226px;
  position:fixed;
  inset:0 auto 0 0;
  background:#153f34;
  color:#b9cec5;
  padding:30px 22px;
  display:flex;
  flex-direction:column
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:30px;
  font-weight:750;
  color:white;
  letter-spacing:1px
}
.brand small{
  display:block;
  font-weight:400;
  font-size:11px;
  letter-spacing:0;
  color:#b9cec5
}
.nav-caption{
  font-size:10px;
  letter-spacing:1.5px;
  margin:55px 0 15px
}
nav a{
  display:block;
  color:#d8e7df;
  padding:13px 12px;
  margin:3px -5px;
  border-radius:8px
}
nav a:hover{
  background:#255244;
  text-decoration:none
}
.sidebar-foot{
  margin-top:auto;
  font-size:12px;
  color:#a3beb0
}
main{
  margin-left:226px
}
.topbar{
  height:70px;
  border-bottom:1px solid var(--line);
  padding:0 38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  color:var(--muted)
}
.topbar form{
  display:flex;
  gap:15px;
  align-items:center
}
.content{
  padding:34px 38px 70px;
  max-width:1600px;
  margin:auto
}
.heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:26px
}
.eyebrow{
  font-size:10px;
  letter-spacing:1.7px;
  color:var(--green);
  font-weight:700
}
.muted{
  color:var(--muted)
}
.small{
  font-size:12px
}
.panel{
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:18px;
  box-shadow:0 2px 5px #122f2403
}
.table-wrap{
  overflow:auto
}
table{
  border-collapse:collapse;
  width:100%;
  text-align:left
}
th{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--muted);
  background:#fbfcfa
}
th,td{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  vertical-align:middle
}
tbody tr:last-child td{
  border-bottom:0
}
tbody tr:hover{
  background:#fafcf9
}
.item-name{
  font-weight:650;
  color:var(--ink);
  display:block
}
.toolbar,.actions{
  display:flex;
  align-items:center;
  gap:12px
}
.toolbar{
  justify-content:space-between;
  margin-bottom:20px
}
.search{
  display:flex;
  gap:8px;
  width:min(540px,80%)
}
input,select,textarea,button,.button{
  font:inherit;
  border:1px solid #cedbd2;
  border-radius:7px;
  padding:9px 12px;
  background:#fff;
  color:var(--ink)
}
input,select,textarea{
  max-width:100%
}
select{
  min-width:150px
}
input:focus,select:focus,textarea:focus{
  outline:2px solid #85c2ad;
  outline-offset:1px
}
input[type=checkbox]{
  accent-color:var(--green);
  width:17px;
  height:17px
}
button,.button{
  cursor:pointer;
  white-space:nowrap
}
.button{
  display:inline-block
}
.primary{
  background:var(--green);
  border-color:var(--green);
  color:#fff;
  font-weight:600
}
.primary:hover{
  background:#0d5441;
  text-decoration:none
}
.text-button{
  border:0;
  background:transparent;
  color:var(--green);
  padding:0
}
.search input{
  flex:1;
  min-width:0
}
.compact{
  width:100px
}
.selection-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  background:#e6efe9;
  border-radius:10px;
  margin:18px 0
}
.warning,.errorlist{
  color:#b45035
}
.positive{
  color:#13825e
}
.notice{
  padding:13px 18px;
  border-radius:8px;
  background:#e2efe6;
  margin-bottom:20px
}
.notice.error{
  background:#f9e9e4
}
.empty{
  text-align:center;
  padding:65px 25px;
  color:var(--muted)
}
.empty h2{
  margin:0 0 10px;
  color:var(--ink)
}
.standard-form{
  padding:26px;
  max-width:850px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 24px
}
.standard-form label,.header-form label,.line-grid label,.login-card label{
  display:block;
  font-size:12px;
  font-weight:600;
  margin-bottom:6px
}
.standard-form input:not([type=checkbox]),.standard-form textarea,.standard-form select,.line-grid input:not([type=checkbox]),.line-grid select,.line-grid textarea,.header-form input:not([type=checkbox]),.header-form select,.header-form textarea{
  width:100%
}
.standard-form .actions{
  grid-column:1/-1
}
.header-form{
  padding:20px 26px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:0 22px
}
.header-form .errorlist{
  grid-column:1/-1
}
.line-form{
  padding:22px 26px
}
.line-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:0 20px
}
.line-grid p:first-child{
  grid-column:span 2
}
.line-grid .errorlist{
  grid-column:1/-1
}
.line-grid p{
  margin:8px 0
}
.sticky-actions{
  position:sticky;
  bottom:10px;
  background:#e6efe9;
  padding:15px;
  border-radius:10px
}
.info{
  padding:20px 26px
}
.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}
.stats .panel{
  padding:22px
}
.stats span{
  display:block;
  color:var(--muted);
  font-size:12px
}
.stats strong{
  display:block;
  font-size:20px;
  margin-top:8px
}
.total{
  text-align:right;
  font-size:24px;
  font-weight:700;
  margin:25px 0
}
.pagination{
  display:flex;
  gap:25px;
  justify-content:center;
  margin-top:25px
}
.quote-image{
  max-width:100%;
  max-height:70vh;
  object-fit:contain;
  margin-top:16px
}
.login-body{
  display:grid;
  place-items:center;
  min-height:100vh;
  background:#e9f0e9
}
.login-card{
  background:white;
  padding:45px;
  border-radius:18px;
  width:min(450px,94vw);
  box-shadow:0 20px 70px #12322412
}
.login-card input{
  width:100%
}
.login-card button{
  width:100%;
  margin-top:12px
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0)
}
.helptext{
  display:block;
  font-size:11px;
  color:var(--muted)
}
.errorlist{
  padding-left:20px
}
.line-form:has(input[name$="-DELETE"]:checked){
  opacity:.45
}
button:disabled{
  opacity:.6
}
@media(max-width:1000px){
  .sidebar{
  width:180px;
  padding:25px 16px
}
main{
  margin-left:180px
}
.content{
  padding:25px 20px
}
.heading{
  align-items:flex-start;
  flex-direction:column
}
.line-grid{
  grid-template-columns:repeat(2,1fr)
}
.stats{
  grid-template-columns:1fr
}

}
@media(max-width:650px){
  .sidebar{
  position:static;
  width:auto;
  padding:15px
}
.brand{
  font-size:24px
}
.brand small,.nav-caption,.sidebar-foot{
  display:none
}
nav{
  display:flex;
  flex-wrap:wrap;
  margin-top:8px;
  gap:5px
}
nav a{
  padding:6px;
  font-size:12px
}
main{
  margin:0
}
.topbar{
  padding:0 18px;
  height:48px;
  font-size:12px
}
.content{
  padding:22px 12px
}
.header-form,.standard-form{
  grid-template-columns:1fr
}
.selection-bar{
  align-items:flex-start;
  gap:10px;
  flex-direction:column
}
h1{
  font-size:26px
}

}


.transaction-workspace:has(.photo-preview:not([hidden])){
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,42%);
  gap:18px;
  align-items:start
}
.photo-preview{
  position:sticky;
  top:12px;
  padding:10px;
  max-height:85vh;
  overflow:auto
}
.photo-preview img{
  width:100%;
  height:auto
}
.transaction-workspace:has(.photo-preview:not([hidden])) .line-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))
}
@media(max-width:1100px){
  .transaction-workspace:has(.photo-preview:not([hidden])){
  display:block
}
.photo-preview{
  position:static;
  max-height:50vh
}

}

.medicine-cell{display:flex;align-items:center;gap:12px;min-width:220px}.medicine-thumbnail{width:58px;height:58px;object-fit:contain;background:#f5f7f4;border:1px solid #e0e7e2;border-radius:8px;flex-shrink:0}.photo-placeholder{display:grid;place-items:center;color:#91a49a;font-size:24px}.medicine-photo-large{display:block;max-width:min(100%,360px);max-height:360px;object-fit:contain;margin:12px 0;border-radius:10px;background:#f5f7f4}.medicine-photo-large[hidden]{display:none}

.password-form{display:block;max-width:620px}.password-form .helptext ul{padding-left:20px}.password-form .actions{margin-top:22px}.password-form p{margin:0 0 20px}@media(max-width:650px){.topbar{height:auto;min-height:48px;flex-wrap:wrap;gap:6px;padding-top:10px;padding-bottom:10px}.topbar form{flex-wrap:wrap;gap:10px}}
