/* Adapter only: original PHP form compatibility and real images/stock.
   The approved design itself is in prototype.css, translated from the Site. */
body{--text:var(--ink);--brand:var(--module-strong);--brand-light:var(--module-accent);--panel:#fff;--panel2:#F7F5F0;--radius:12px;--shadow:0 3px 16px #183b2c03;background:var(--bg)!important;font-family:Montserrat,system-ui,sans-serif!important}
body #app{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;overflow:visible!important;min-height:100vh!important}
body #app .main-panel{display:block!important;width:auto!important;max-width:none!important;min-width:0!important;min-height:100vh!important;padding-top:0!important;padding-bottom:0!important;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;margin-top:0!important;margin-right:0!important;margin-bottom:0!important;overflow:visible!important}
body #app .topbar{position:static!important;min-height:0!important;top:auto!important;z-index:auto!important}
body #app aside.sidebar{height:auto!important;min-height:0!important}
body #app .side-nav{position:static!important;top:auto!important;max-width:100%!important;min-height:0!important;background:transparent!important;border:0!important;margin:0!important}
body #app .side-nav .tab{width:100%!important;text-align:left!important;background:transparent;color:inherit;white-space:normal!important;flex:none!important}
body #app .side-nav .tab .nav-symbol{background:transparent!important;border:0!important;padding:0!important;width:auto!important;height:auto!important;color:inherit!important}
body #app .hidden,body #app.hidden,body #app [hidden],body #app .side-nav .tab.hidden,body #app .client-side-action.hidden{display:none!important}
body #app .church-logo-frame .church-logo-image{width:100%!important;height:100%!important;object-fit:contain!important;border:0!important;padding:0!important;background:transparent!important}
body #app .church-logo-frame .church-initials{width:100%!important;height:100%!important;margin:0!important;background:transparent!important;color:var(--module-strong)!important;place-items:center!important;font-size:22px!important;border:0!important}
body #app .product{display:block!important;min-height:0!important;height:auto!important;max-width:100%!important}
body #app .product-art{position:relative!important}
body #app .product-art>img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;z-index:1!important}
body #app .product[aria-disabled="true"]{opacity:.5!important;cursor:pointer!important}
body #app .product-body strong{overflow-wrap:anywhere!important}
body #app .cart{align-self:start!important}
body #app .cartitem .qty button{min-width:28px!important;min-height:28px!important}
body #app .client-side-action{display:flex!important;align-items:center!important;gap:11px!important;width:100%!important;padding:10px 0!important;background:transparent!important;color:var(--sidebar-muted)!important;font:11px Montserrat!important;text-align:left!important;border:0!important}
body.sidebar-collapsed #app .client-side-action>span:last-child{display:none!important}
body #app .user>div{min-width:0!important}
body #app .user strong{overflow-wrap:anywhere!important}
body #app .ui-sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
body #app .stock-alert{max-width:420px!important;width:calc(100vw - 32px)!important}
body #app .stock-alert-symbol{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;background:var(--module-soft)!important;color:var(--module-strong)!important;font-size:24px!important}
body #app #payment #payerror{color:#A23F35!important;line-height:1.6!important}
body #app #payment .payment-total{color:var(--module-strong)!important}
body #app #payment button:disabled{opacity:.5!important;cursor:wait!important}
/* Existing Inventory/Expenses/Reports/Settings forms retain their IDs and actions. */
body #app .heading{grid-column:1 / -1!important}
body #app .product-photo-editor .photo-editor-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
body #app .photo-editor-preview{width:120px;height:100px;display:grid;place-items:center;flex:none;background:var(--module-faint);border:1px solid var(--line);border-radius:10px;overflow:hidden}
body #app .photo-editor-preview img{width:100%;height:100%;object-fit:contain}
body #app #pPhotoFile{max-width:100%}
body #app .ui-report-charts .dashboard-grid{grid-template-columns:1fr 1fr!important}
body #app .ui-report-charts{margin:24px 0}
body #app .ui-report-charts .weekday-chart{overflow:auto}
body #app .ui-report-charts .donut{margin:20px auto}
@media(max-width:900px){body #app aside.sidebar{overflow-y:auto!important}body #app .client-side-action>span:last-child{display:inline!important}}
@media(max-width:650px){body #app .ui-report-charts .dashboard-grid{grid-template-columns:1fr!important}body #app .topbar .header-right .role-select{display:none!important}}
.toast{font-family:Montserrat,system-ui,sans-serif!important;font-weight:500!important}

@media(min-width:901px){body #app .main-panel{padding-left:0!important}}

/* v124: logo and rail control no longer inherit the legacy POS classes. */
body #app .church-logo-frame{position:relative!important;flex:none!important}
body #app .church-logo-frame .church-logo-image{position:static!important;flex:0 0 auto!important;max-width:100%!important;max-height:100%!important;border-radius:0!important;margin:0!important;transform:none!important}
body #app .church-logo-frame .church-initials{position:static!important;flex:none!important;align-items:center!important;justify-content:center!important;border-radius:0!important;transform:none!important}
body #app .church-logo-frame [hidden]{display:none!important}
body #app .rail-toggle{min-width:27px!important;min-height:27px!important;max-width:27px!important;max-height:27px!important;margin:0!important;flex:none!important;overflow:visible!important;line-height:1!important;transform:none!important}
body #app .rail-toggle .collapse-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:14px!important;height:14px!important;font-size:0!important;line-height:1!important}
@media(min-width:901px){body #app aside.sidebar{overflow:visible!important}body #app .side-nav{overflow-y:auto!important;overflow-x:hidden!important;flex:1 1 auto!important}}

/* v125: explicit payment choices and a touch-friendly cash amount. */
body #app #payment .payment-method-buttons{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;margin:16px 0 22px!important}
body #app #payment .payment-method-buttons button{display:flex!important;flex-direction:column!important;align-items:center!important;gap:6px!important;min-height:112px!important;padding:16px 10px!important;border:2px solid var(--line)!important;border-radius:12px!important;background:#fff!important;color:var(--ink)!important;font-family:Montserrat,sans-serif!important}
body #app #payment .payment-method-buttons button[aria-pressed="true"]{background:var(--module-soft)!important;border-color:var(--module-strong)!important;color:var(--module-strong)!important;box-shadow:0 0 0 1px var(--module-strong)!important}
body #app #payment .payment-method-buttons button>span,body #app #payment .payment-method-buttons svg{width:28px!important;height:28px!important;font-size:26px!important;line-height:28px!important}
body #app #payment .payment-method-buttons strong{font-size:15px!important;font-weight:600!important}body #app #payment .payment-method-buttons small{font-size:10px!important}
body #app #payment .received-wrap{position:relative!important}
body #app #payment #received{width:100%!important;height:66px!important;font-size:30px!important;font-weight:600!important;letter-spacing:.02em!important;padding:12px 48px 12px 16px!important;border:2px solid var(--line)!important;border-radius:10px!important;margin-top:0!important}
body #app #payment .received-wrap>span{position:absolute;right:18px;top:17px;font-size:25px;color:var(--muted)}
body #app #payment #receivedHelp{display:block!important;font-size:10px!important;color:var(--muted)!important;margin:8px 0 12px!important}
body #app #payment .cash-shortcuts{display:flex!important;gap:7px!important;flex-wrap:wrap!important}
body #app #payment .cash-shortcuts button{min-height:40px!important;flex:1!important;padding:8px!important;background:var(--module-faint)!important;color:var(--module-strong)!important;border:1px solid var(--line)!important;border-radius:8px!important;font:600 12px Montserrat!important;white-space:nowrap!important}
body #app #payment .cash-shortcuts button:disabled{opacity:.35!important;cursor:default!important}
body #app #payment #change{font-size:19px!important;font-weight:600!important;background:var(--module-faint)!important;padding:14px!important;border-radius:10px!important;color:var(--module-strong)!important;margin:18px 0!important}
body #app #payment #change.cash-short{background:#FFF1EA!important;color:#A23F35!important}
body #app #payment #confirm{min-height:48px!important}

/* v128: compact stock alert, scoped above generic prototype dialog rules. */
body #app dialog#stockAlert.stock-alert{
 box-sizing:border-box!important;position:fixed!important;inset:0!important;
 margin:auto!important;width:calc(100vw - 32px)!important;max-width:400px!important;
 max-height:calc(100dvh - 32px)!important;overflow:auto!important;
 padding:24px!important;border:1px solid var(--line,#e6e5e1)!important;
 border-radius:18px!important;background:var(--surface,#fff)!important;
 color:var(--text,#263238)!important;box-shadow:0 20px 70px #0003!important;
 font-family:Montserrat,system-ui,sans-serif!important;
}
body #app dialog#stockAlert[open]{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;column-gap:12px!important;row-gap:0!important}
body #app dialog#stockAlert:not([open]){display:none!important}
body #app dialog#stockAlert::backdrop{background:rgba(20,25,24,.42)!important;backdrop-filter:blur(3px)}
body #app dialog#stockAlert .stock-alert-symbol{
 grid-column:1!important;grid-row:1!important;display:grid!important;place-items:center!important;
 width:36px!important;height:36px!important;border-radius:10px!important;
 background:var(--module-soft,#fff3dc)!important;color:var(--module-strong,#946000)!important;
 font-size:21px!important;font-weight:700!important;line-height:1!important;
}
body #app dialog#stockAlert h2{
 grid-column:2!important;align-self:center!important;margin:0!important;padding:0!important;
 font-family:inherit!important;font-size:17px!important;line-height:1.4!important;
 font-weight:700!important;letter-spacing:-.3px!important;color:inherit!important;
}
body #app dialog#stockAlert p{
 grid-column:2!important;margin:10px 0 0!important;padding:0!important;
 font-family:inherit!important;font-size:13px!important;line-height:1.7!important;
 color:var(--muted,#6b7280)!important;overflow-wrap:anywhere!important;
}
body #app dialog#stockAlert form{
 grid-column:1 / -1!important;display:flex!important;justify-content:flex-end!important;
 margin:22px 0 0!important;padding:16px 0 0!important;border-top:1px solid var(--line,#e6e5e1)!important;
}
body #app dialog#stockAlert button{
 width:auto!important;min-height:42px!important;margin:0!important;padding:10px 20px!important;
 border:0!important;border-radius:10px!important;background:var(--module-strong,#946000)!important;
 color:#fff!important;font-family:inherit!important;font-size:13px!important;line-height:1.4!important;font-weight:600!important;
}
body #app dialog#stockAlert button:focus-visible{outline:3px solid var(--module-soft,#f4d599)!important;outline-offset:3px!important}
@media(max-width:380px){
 body #app dialog#stockAlert.stock-alert{padding:20px!important}
 body #app dialog#stockAlert h2{font-size:16px!important}
 body #app dialog#stockAlert p{grid-column:1 / -1!important;margin-top:14px!important}
}
