/* Amida Admin System - screen styles */
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", Arial, sans-serif; color: #222; background: #f4f2ec; display: flex; min-height: 100vh; }
a { color: #8a6a1c; }
h1 { font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 17px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 10px; }
.side { width: 220px; flex: 0 0 220px; background: #1f1d18; color: #ddd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 16px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid #3a362c; }
.brand img { max-width: 170px; max-height: 60px; object-fit: contain; background: #fff; padding: 4px; border-radius: 4px; }
.brand span { font-weight: bold; color: #e5c46b; letter-spacing: .5px; }
.side nav { flex: 1; padding: 10px 0; }
.side nav a, .side nav span { display: block; padding: 9px 18px; color: #ddd; text-decoration: none; }
.side nav a:hover { background: #2c2920; }
.side nav a.on { background: #BB9532; color: #fff; font-weight: bold; }
.side nav .disabled { color: #777; cursor: default; }
.side .navhead { padding: 14px 18px 4px; font-size: 11px; text-transform: uppercase; color: #999; }
.side .me { padding: 14px 18px; border-top: 1px solid #3a362c; font-size: 13px; }
.side .me a, .side .me .linkbtn { color: #e5c46b; }
.main { flex: 1; padding: 22px 28px 60px; min-width: 0; }
.main.solo { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card { background: #fff; border: 1px solid #e3dfd3; border-radius: 6px; padding: 16px 18px; margin-bottom: 16px; }
.card.narrow { max-width: 480px; }
.login { width: 360px; text-align: center; }
.login form { text-align: left; }
.loginlogo { max-width: 220px; max-height: 90px; margin-bottom: 8px; }
.bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
label small { font-weight: normal; color: #777; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid #ccc5b3; border-radius: 4px; font: inherit; background: #fff; }
input:disabled, select:disabled { background: #f3f3f3; color: #444; }
input.short { width: 100px; }
input[hidden], [hidden] { display: none !important; }
label.check { display: flex; align-items: center; gap: 7px; font-weight: normal; }
label.check input { width: auto; margin: 0; display: inline; }
fieldset { border: 1px solid #e3dfd3; border-radius: 4px; margin: 6px 0 12px; padding: 8px 12px; }
legend { font-size: 13px; color: #666; }
.btn { display: inline-block; padding: 7px 14px; border: 1px solid #c9bd99; border-radius: 4px; background: #faf7ee; color: #333; text-decoration: none; cursor: pointer; font: inherit; }
.btn:hover { background: #f1ead6; }
.btn.primary { background: #BB9532; border-color: #a68228; color: #fff; font-weight: 600; }
.btn.primary:hover { background: #a68228; }
.btn.danger { border-color: #d49c9c; color: #a32121; background: #fff6f6; }
.linkbtn { background: none; border: 0; padding: 0; color: #8a6a1c; text-decoration: underline; cursor: pointer; font: inherit; }
form.inline { display: inline; }
form.inline input[type=month] { display: inline-block; width: auto; margin: 0 4px 0 0; }
.mt { margin-top: 14px; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; background: #eaf5e2; border: 1px solid #b9d9a5; }
.flash.err { background: #fdeaea; border-color: #e5a6a6; }
.flash.warn { background: #fff6df; border-color: #e8cf8a; }
.note { color: #6b6455; font-size: 13px; }
.muted { color: #999; }
.small { font-size: 12px; }
.mono { font-family: Consolas, monospace; font-size: 15px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.tag.ok { background: #e2efda; color: #3c6b23; }
.tag.off { background: #eee; color: #666; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { background: #ECDEBA; text-align: left; padding: 7px 8px; font-size: 13px; border: 1px solid #d8ccab; }
table.grid td { padding: 6px 8px; border: 1px solid #e6e1d4; vertical-align: top; }
table.grid tr.cash td { background: #E2EFDA; font-weight: 600; }
.r { text-align: right !important; }
.b { font-weight: bold; }
.neg { color: #e00000; }
.soon { color: #d07a00; font-weight: bold; }
.totals { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.totals div { background: #fff; border: 2px solid #BB9532; border-radius: 4px; padding: 6px 14px; }
.totals b { margin-left: 6px; font-size: 16px; }
.txform { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .txform { grid-template-columns: 1fr; } body { flex-direction: column; } .side { width: 100%; height: auto; position: static; } }
.radios { display: flex; gap: 18px; margin-bottom: 10px; }
.actions { margin-top: 14px; }
.att { display: inline-block; margin: 0 10px 10px 0; vertical-align: top; }
.att img { max-height: 260px; max-width: 220px; border: 1px solid #ddd; display: block; margin-bottom: 4px; }
.dropzone { border: 2px dashed #c9bd99; border-radius: 6px; padding: 16px; text-align: center; background: #fcfaf4; min-height: 160px; }
.dropzone.small { min-height: 90px; padding: 10px; }
.dropzone.hover { background: #f4ecd6; border-color: #BB9532; }
.previews { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.previews .pv { position: relative; }
.previews img { max-height: 240px; max-width: 200px; border: 1px solid #ddd; display: block; }
.previews .x { position: absolute; top: -8px; right: -8px; background: #a32121; color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.previews .busy { color: #8a6a1c; }
.pdfbox { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 150px; height: 190px; border: 1px solid #ddd; background: #fff4f0; color: #b3261e; font-weight: bold; font-size: 22px; text-decoration: none; text-align: center; padding: 8px; overflow: hidden; }
.pdfbox small { font-size: 11px; color: #555; font-weight: normal; word-break: break-all; margin-top: 6px; }
.tplrow { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 18px; }
.tplimg img { max-height: 180px; max-width: 220px; border: 1px solid #ddd; display: block; margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; margin-bottom: 0; align-items: flex-end; }
.tabs a { padding: 8px 14px; background: #ebe6d8; border-radius: 6px 6px 0 0; text-decoration: none; color: #555; }
.tabs a.on { background: #fff; color: #222; font-weight: bold; }
.tabs .search { margin-left: auto; margin-bottom: 6px; }
.tabs .search input { width: 240px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.formgrid.view > div { margin-bottom: 12px; }
.formgrid.view small, p small { color: #888; }
.rowform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee; }
.rowform label { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
hr { border: 0; border-top: 1px solid #eee; margin: 16px 0; }