
:root{
  --bg:#f5f6f7;--card:#fff;--line:#d9dee3;--text:#343a40;--muted:#6c757d;
  --blue:#0877d8;--blue2:#0667ba;--green:#198754;--red:#b42318;--yellow:#fff3cd;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}
button,input,select,textarea{font:inherit}
a{text-decoration:none;color:inherit}
.hidden{display:none!important}
.container{max-width:1180px;margin:0 auto;padding:0 16px}
.auth-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:8px;padding:30px;box-shadow:0 12px 34px rgba(0,0,0,.06)}
.brand{font-size:20px;font-weight:700;color:var(--blue)}
.brand.big{font-size:30px;margin-bottom:4px}
.auth-tabs{display:flex;border-bottom:1px solid var(--line);margin:22px 0}
.tab,.subtab{border:0;background:transparent;cursor:pointer}
.tab{padding:10px 14px;color:var(--blue)}
.tab.active{color:#333;border:1px solid var(--line);border-bottom-color:#fff;border-radius:4px 4px 0 0;margin-bottom:-1px}
label{display:block;font-weight:600;margin:12px 0 6px}
input,select,textarea{width:100%;padding:9px 10px;border:1px solid #cbd2d8;border-radius:4px;background:#fff;color:var(--text)}
textarea{min-height:115px;resize:vertical}
.btn{border:1px solid #aeb7bf;background:#fff;color:#333;border-radius:4px;padding:8px 12px;cursor:pointer}
.btn:hover{background:#f7f8f9}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.btn.primary:hover{background:var(--blue2)}
.btn.danger{color:var(--red);border-color:#e1aaaa}
.btn.success{background:var(--green);border-color:var(--green);color:#fff}
.btn.full{width:100%;margin-top:14px}
.smallbtn{padding:6px 9px;font-size:12px}
.small{font-size:12px}
.muted{color:var(--muted)}
.notice{margin-top:14px;background:#f7fafc;border-left:3px solid #95b6ce;padding:10px 12px;line-height:1.5}
.topbar{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar-inner{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.nav{display:flex;align-items:center;gap:2px}
.nav a{padding:18px 10px;color:#31506a;font-weight:600;border-bottom:3px solid transparent}
.nav a.active{color:var(--blue);border-bottom-color:var(--blue)}
.account{display:flex;align-items:center;gap:8px}
.badge{display:inline-block;background:#edf2f7;padding:4px 7px;border-radius:99px;font-size:11px;font-weight:700}
main.container{padding-top:22px;padding-bottom:50px}
.page-head{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:14px}
.page-head h1{margin:0 0 4px;font-size:24px}
.tabs-row{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:12px}
.subtab{padding:10px 14px;color:var(--blue)}
.subtab.active{color:#333;border:1px solid var(--line);border-bottom-color:#fff;border-radius:4px 4px 0 0;margin-bottom:-1px}
.toolbar{display:flex;gap:8px;align-items:center;margin:12px 0}
.toolbar input{max-width:280px}
.table-card{background:#fff;border:1px solid var(--line);border-radius:5px;overflow:auto}
table{border-collapse:collapse;width:100%;min-width:820px}
th,td{padding:11px 10px;border-bottom:1px solid #e6e8ea;text-align:left;vertical-align:top}
th{background:#fafbfc;font-weight:600;white-space:nowrap}
.num{text-align:right}
.status{display:inline-block;padding:3px 7px;border-radius:3px;font-size:11px;font-weight:700}
.status.pending,.status.to_confirm,.status.reserved{background:#fff3cd;color:#856404}
.status.reported,.status.waiting{background:#d9ecff;color:#0b5d9d}
.status.received,.status.active,.status.paid,.status.claimed,.status.ordered{background:#dff3e8;color:#136d3e}
.status.canceled,.status.cancelled,.status.closed,.status.disabled{background:#eceff1;color:#59636b}
.status.expired{background:#f8d7da;color:#842029}
.row-actions{display:flex;gap:5px;flex-wrap:wrap}
.balance-line{font-size:15px;line-height:1.8;margin:10px 0 14px}
.money-hi{background:#fff3bd;padding:1px 4px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}
.stat{background:#fff;border:1px solid var(--line);padding:12px;border-radius:4px}
.stat span{display:block;color:var(--muted);font-size:12px}.stat strong{font-size:20px;display:block;margin-top:3px}
.loading{position:fixed;left:50%;top:74px;transform:translateX(-50%);background:#111827;color:#fff;padding:8px 13px;border-radius:99px;z-index:100}
.toast{position:fixed;right:18px;top:76px;z-index:200;background:#111827;color:#fff;padding:10px 13px;border-radius:5px;max-width:360px;box-shadow:0 6px 20px rgba(0,0,0,.18)}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.38);z-index:100;display:flex;align-items:center;justify-content:center;padding:18px}
.modal{width:min(680px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:6px;box-shadow:0 18px 60px rgba(0,0,0,.22)}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:18px;margin:0}.icon-btn{border:0;background:transparent;font-size:24px;color:#68717a;cursor:pointer}
.modal-body,.modal form{padding:16px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.modal-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:16px}
.empty{padding:34px;text-align:center;color:var(--muted)}
.payment-method{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;background:#f7f8f9;padding:8px;border-radius:4px;max-width:360px}
@media(max-width:800px){
  .topbar-inner{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.account-email{display:none}
  .nav{order:3;width:100%;overflow:auto}.nav a{padding:8px 9px}
  .page-head{align-items:flex-start;flex-direction:column}.toolbar{align-items:stretch;flex-direction:column}.toolbar input{max-width:none}
  .form-grid,.stat-grid{grid-template-columns:1fr}
}


/* V1.1 mobile cards */
@media(max-width:700px){
  html,body{font-size:15px}
  .container{padding-left:14px;padding-right:14px}
  main.container{padding-top:18px}
  .topbar-inner{gap:8px}
  .brand{font-size:20px}
  .nav{gap:8px}
  .nav a{font-size:15px;padding:8px 4px}
  .account{margin-left:auto}
  .badge{font-size:10px}
  .page-head h1{font-size:25px}
  .tabs-row{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .subtab{min-width:max-content;font-size:15px}
  .balance-line{font-size:16px;line-height:1.75;background:#fff;border:1px solid var(--line);border-radius:5px;padding:10px 12px}
  .panel-head{flex-direction:column;align-items:stretch}
  .panel-head input{max-width:none!important}
  .panel-head .btn{width:100%;min-height:46px}
  .modal-backdrop{align-items:flex-end;padding:0}
  .modal{width:100%;max-height:92vh;border-radius:14px 14px 0 0}
  .modal-head{position:sticky;top:0;background:#fff;z-index:2}
  .modal-actions{position:sticky;bottom:0;background:#fff;padding-top:10px;padding-bottom:4px}
  .modal-actions .btn{min-height:44px}
  .payment-method{max-width:none;word-break:break-word}

  .table-card{overflow:visible;background:transparent;border:0}
  table.mobile-cards{min-width:0;width:100%;border-collapse:separate;border-spacing:0}
  table.mobile-cards thead{display:none}
  table.mobile-cards tbody{display:block}
  table.mobile-cards tr{
    display:block;background:#fff;border:1px solid var(--line);border-radius:7px;
    margin-bottom:12px;overflow:hidden;box-shadow:0 1px 1px rgba(0,0,0,.02)
  }
  table.mobile-cards td{
    display:grid;grid-template-columns:112px minmax(0,1fr);gap:10px;align-items:start;
    width:100%;padding:9px 11px;border-bottom:1px solid #edf0f2;text-align:left!important;
    overflow-wrap:anywhere
  }
  table.mobile-cards td:last-child{border-bottom:0}
  table.mobile-cards td::before{font-weight:600;color:var(--muted);font-size:12px;line-height:1.55}
  table.mobile-cards .row-actions{justify-content:flex-start}
  table.mobile-cards .btn{min-height:38px}
  table.mobile-cards .num{text-align:left!important}

  .t-offers td:nth-child(1)::before{content:"Offer #"}
  .t-offers td:nth-child(2)::before{content:"Offer"}
  .t-offers td:nth-child(3)::before{content:"Retailer"}
  .t-offers td:nth-child(4)::before{content:"Buy price"}
  .t-offers td:nth-child(5)::before{content:"Payout"}
  .t-offers td:nth-child(6)::before{content:"Available"}
  .t-offers td:nth-child(7)::before{content:"Action"}

  .t-inbound td:nth-child(1)::before{content:"Inbound #"}
  .t-inbound td:nth-child(2)::before{content:"Product"}
  .t-inbound td:nth-child(3)::before{content:"Price"}
  .t-inbound td:nth-child(4)::before{content:"Qty"}
  .t-inbound td:nth-child(5)::before{content:"Warehouse"}
  .t-inbound td:nth-child(6)::before{content:"Status / TN"}
  .t-inbound td:nth-child(7)::before{content:"Action"}

  .t-payrequests td:nth-child(1)::before{content:"Status"}
  .t-payrequests td:nth-child(2)::before{content:"Request #"}
  .t-payrequests td:nth-child(3)::before{content:"Date"}
  .t-payrequests td:nth-child(4)::before{content:"Payment info"}
  .t-payrequests td:nth-child(5)::before{content:"Amount"}
  .t-payrequests td:nth-child(6)::before{content:"Action"}

  .t-pending td:nth-child(1)::before{content:"Claim #"}
  .t-pending td:nth-child(2)::before{content:"Product"}
  .t-pending td:nth-child(3)::before{content:"Price"}
  .t-pending td:nth-child(4)::before{content:"Qty"}
  .t-pending td:nth-child(5)::before{content:"Claimed"}
  .t-pending td:nth-child(6)::before{content:"Release"}

  .t-history td:nth-child(1)::before{content:"Date"}
  .t-history td:nth-child(2)::before{content:"Transaction"}
  .t-history td:nth-child(3)::before{content:"Amount"}
  .t-history td:nth-child(4)::before{content:"Balance"}

  .t-admin-offers td:nth-child(1)::before{content:"Offer #"}
  .t-admin-offers td:nth-child(2)::before{content:"Offer"}
  .t-admin-offers td:nth-child(3)::before{content:"Retailer"}
  .t-admin-offers td:nth-child(4)::before{content:"Payout"}
  .t-admin-offers td:nth-child(5)::before{content:"Available"}
  .t-admin-offers td:nth-child(6)::before{content:"Order deadline"}
  .t-admin-offers td:nth-child(7)::before{content:"Status"}
  .t-admin-offers td:nth-child(8)::before{content:"Action"}

  .t-admin-inbound-v21 td:nth-child(1)::before{content:"Offer / Inbound"}
  .t-admin-inbound-v21 td:nth-child(2)::before{content:"Buyer"}
  .t-admin-inbound-v21 td:nth-child(3)::before{content:"Product"}
  .t-admin-inbound-v21 td:nth-child(4)::before{content:"Qty"}
  .t-admin-inbound-v21 td:nth-child(5)::before{content:"Order No."}
  .t-admin-inbound-v21 td:nth-child(6)::before{content:"Tracking / Receipt"}
  .t-admin-inbound-v21 td:nth-child(7)::before{content:"Payout"}
  .t-admin-inbound-v21 td:nth-child(8)::before{content:"Status"}
  .t-admin-inbound-v21 td:nth-child(9)::before{content:"Action"}

  .t-admin-payments td:nth-child(1)::before{content:"Request #"}
  .t-admin-payments td:nth-child(2)::before{content:"Buyer"}
  .t-admin-payments td:nth-child(3)::before{content:"Payment info"}
  .t-admin-payments td:nth-child(4)::before{content:"Amount"}
  .t-admin-payments td:nth-child(5)::before{content:"Status"}
  .t-admin-payments td:nth-child(6)::before{content:"Action"}

  .t-buyers td:nth-child(1)::before{content:"Buyer"}
  .t-buyers td:nth-child(2)::before{content:"Name"}
  .t-buyers td:nth-child(3)::before{content:"Joined"}
  .t-buyers td:nth-child(4)::before{content:"Role"}
  .t-buyers td:nth-child(5)::before{content:"Status"}
  .t-buyers td:nth-child(6)::before{content:"Email alerts"}
  .t-buyers td:nth-child(7)::before{content:"Action"}
}

.reservation-rule{margin-top:14px;padding:11px 12px;background:#fff8df;border:1px solid #ead58f;border-radius:5px;line-height:1.5}
.order-block{margin-top:7px;padding:7px 9px;background:#f8fafb;border-left:3px solid #b8c5cf;border-radius:2px}
.reservation-countdown{font-weight:750;color:#9a6700;margin-top:2px;font-variant-numeric:tabular-nums}
.reservation-countdown.urgent{color:#b42318}


/* V1.4 Order No. + Qty */
.status.partially_ordered{background:#e8f0fe;color:#2457a6}
.order-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid #e8ecef}
.order-entry:last-of-type{border-bottom:0}
.order-qty{font-weight:700;white-space:nowrap}
.reservation-remaining{margin-top:8px}
.order-progress-box{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0 14px}
.order-progress-box>div{padding:8px 9px;border:1px solid var(--line);border-radius:5px;background:#f8fafb}
.order-progress-box span{display:block;font-size:11px;color:var(--muted);margin-bottom:2px}
.order-progress-box b{font-size:17px}
@media(max-width:700px){
  .order-progress-box{grid-template-columns:1fr}
  .order-progress-box>div{display:flex;justify-content:space-between;align-items:center}
  .order-progress-box span{margin:0}
}


/* V1.8 password recovery */
.link-btn{
  border:0;
  background:transparent;
  color:var(--blue);
  padding:12px 4px 4px;
  cursor:pointer;
  font:inherit;
  text-align:center;
}
.link-btn:hover{text-decoration:underline}

.t-admin-offers th.leftcol,.t-admin-offers td.leftcol{text-align:left}
.t-admin-offers th.centercol,.t-admin-offers td.centercol{text-align:center}
.offer-product-cell{display:flex;align-items:center;gap:10px;min-width:220px}
.offer-thumb{width:42px;height:42px;min-width:42px;border-radius:4px;object-fit:contain;background:#fff;border:1px solid var(--line)}
.offer-thumb.placeholder{display:flex;align-items:center;justify-content:center;background:#f4f6f8;font-size:20px}
.retailer-link{color:var(--blue);text-decoration:none;font-weight:600}
.retailer-link:hover{text-decoration:underline}
@media(max-width:700px){.offer-product-cell{min-width:0}.offer-thumb{width:46px;height:46px;min-width:46px}.t-admin-offers td.centercol{text-align:right}}


/* V2.0.2 Offer readability */
.t-admin-offers .retailer-link,
.t-admin-offers td:nth-child(3),
.t-offers .retailer-link,
.t-offers td:nth-child(3){
  white-space:nowrap;
}
.offer-title-clamp{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;max-width:340px}
.t-admin-offers .offer-product-cell{max-width:380px}
@media(max-width:700px){
  .offer-title-clamp{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;max-width:340px}
}


/* V2.0.3 tighter offer list */
.t-admin-offers th:nth-child(3),
.t-admin-offers td:nth-child(3),
.t-offers th:nth-child(3),
.t-offers td:nth-child(3){
  white-space:nowrap !important;
  min-width:92px;
}
.t-admin-offers .offer-product-cell,
.t-offers .offer-product-cell{
  min-width:260px;
  max-width:380px;
}
.offer-title-clamp{
  display:block !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:330px;
}
.offer-thumb{
  object-fit:contain !important;
  background:#fff;
}
@media(max-width:700px){
  .offer-title-clamp{max-width:220px}
  .t-admin-offers .offer-product-cell,
  .t-offers .offer-product-cell{min-width:0;max-width:none}
}

.inline-image-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
.image-preview-wrap{margin-top:8px}
.image-preview{width:96px;height:96px;object-fit:contain;border:1px solid var(--line);border-radius:6px;background:#fff}


/* V2.0.4 desktop width utilization */
@media(min-width:801px){
  .container{
    width:calc(100% - 32px);
    max-width:none;
    box-sizing:border-box;
    padding-left:0;
    padding-right:0;
  }

  .t-admin-offers{
    width:100%;
    min-width:1180px;
    table-layout:auto;
    font-size:13px;
  }

  .t-admin-offers th,
  .t-admin-offers td{
    padding:10px 8px;
  }

  .t-admin-offers .offer-product-cell{
    min-width:250px;
    max-width:340px;
  }

  .t-admin-offers .offer-title-clamp{
    max-width:285px;
  }

  .t-admin-offers .row-actions{
    flex-wrap:nowrap;
    white-space:nowrap;
  }

  .t-admin-offers th:last-child,
  .t-admin-offers td:last-child{
    min-width:195px;
  }

  .t-admin-offers th:nth-child(1),
  .t-admin-offers td:nth-child(1){width:70px}

  .t-admin-offers th:nth-child(3),
  .t-admin-offers td:nth-child(3){min-width:90px}

  .t-admin-offers th:nth-child(9),
  .t-admin-offers td:nth-child(9){min-width:105px}

  .t-admin-offers th:nth-child(10),
  .t-admin-offers td:nth-child(10){min-width:92px}

  .table-card{
    overflow-x:auto;
  }
}


/* V2.0.5 manual image input */
.offer-image-tools{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.image-tool-buttons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.sub-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:5px;
}
.image-paste-zone{
  margin-top:10px;
  min-height:78px;
  border:2px dashed #b9c7d6;
  border-radius:8px;
  background:#f8fafc;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:12px;
  text-align:center;
  cursor:text;
  outline:none;
  color:#34495e;
}
.image-paste-zone:focus{
  border-color:var(--blue);
  background:#f3f8ff;
}
.image-paste-zone span{
  font-size:12px;
  color:var(--muted);
}
.image-preview-wrap{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:10px;
}
.image-preview-wrap.hidden{display:none}
.image-preview{
  width:112px;
  height:112px;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:7px;
  background:#fff;
}
@media(max-width:700px){
  .offer-image-tools{grid-template-columns:1fr}
  .image-tool-buttons .btn{flex:1}
  .image-paste-zone{min-height:92px}
}


/* V2.1 Admin Inbound */
.admin-inbound-toolbar input{max-width:540px}
.admin-inbound-stats{grid-template-columns:repeat(3,minmax(0,1fr));max-width:760px}
.t-admin-inbound-v21{min-width:1380px;font-size:13px}
.t-admin-inbound-v21 th,.t-admin-inbound-v21 td{padding:10px 8px}
.t-admin-inbound-v21 th:nth-child(1){min-width:92px}
.t-admin-inbound-v21 th:nth-child(2){min-width:205px}
.t-admin-inbound-v21 th:nth-child(3){min-width:220px}
.t-admin-inbound-v21 th:nth-child(4){min-width:120px}
.t-admin-inbound-v21 th:nth-child(5){min-width:190px}
.t-admin-inbound-v21 th:nth-child(6){min-width:225px}
.t-admin-inbound-v21 th:nth-child(7){min-width:95px}
.t-admin-inbound-v21 th:nth-child(8){min-width:150px}
.t-admin-inbound-v21 th:nth-child(9){min-width:175px}
.admin-product-title{display:block;max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.buyer-email{max-width:210px;overflow-wrap:anywhere}
.qty-stack{display:grid;grid-template-columns:1fr;gap:2px;font-size:12px;white-space:nowrap}
.qty-stack span{display:flex;justify-content:space-between;gap:10px}
.admin-detail-line{padding:4px 0;border-bottom:1px solid #edf0f2;display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.admin-detail-line:last-child{border-bottom:0}
.admin-detail-line b{overflow-wrap:anywhere}
.tracking-line{display:block}
.received-qty{font-weight:700;margin-left:4px}
.admin-inbound-actions{flex-direction:column;align-items:stretch;flex-wrap:nowrap}
.admin-inbound-actions .btn{white-space:nowrap}
.confirm-context{display:grid;gap:4px;background:#f7f9fb;border:1px solid var(--line);border-radius:5px;padding:10px 12px;margin-bottom:10px}
.confirm-context span{font-size:12px;color:var(--muted)}
.status.completed{background:#dff3e8;color:#136d3e}
@media(max-width:700px){
  .admin-inbound-stats{grid-template-columns:1fr;max-width:none}
  .t-admin-inbound-v21{min-width:0;font-size:14px}
  .admin-product-title{max-width:none;white-space:normal}
  .buyer-email{max-width:none}
  .qty-stack{max-width:180px}
  .admin-inbound-actions .btn{width:100%}
}


/* V2.1.1 buyer settings */
.settings-card{
  max-width:980px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:24px 28px;
}
.settings-row{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:22px;
  align-items:start;
  margin-bottom:22px;
}
.settings-row>label{
  margin:10px 0 0;
  font-size:15px;
  font-weight:600;
}
.settings-control input{
  width:100%;
}
.settings-control input[readonly]{
  background:#f1f3f5;
  color:#4f5963;
  cursor:not-allowed;
}
.settings-control .small{
  margin-top:6px;
}
.settings-actions{
  display:flex;
  gap:10px;
  margin-left:242px;
  padding-top:2px;
}
.field-help{
  margin-top:-5px;
  margin-bottom:12px;
}
@media(max-width:700px){
  .settings-card{padding:18px 16px}
  .settings-row{
    grid-template-columns:1fr;
    gap:6px;
    margin-bottom:18px;
  }
  .settings-row>label{margin:0}
  .settings-actions{
    margin-left:0;
    flex-wrap:wrap;
  }
  .settings-actions .btn{flex:1}
}


/* V2.2.0 Payments */
.payment-balance-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}
.payment-balance-grid .stat-card,.admin-payment-stats .stat-card{min-height:104px}
.stat-label{font-size:13px;color:var(--muted);margin-bottom:7px}
.stat-value{font-size:24px;font-weight:750;line-height:1.15;color:#1d2733}
.preline{white-space:pre-line;overflow-wrap:anywhere}
.money-positive{color:#198754}.money-negative{color:#b42318}
.admin-payment-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}
.admin-payment-toolbar{display:flex;gap:10px;margin:12px 0}
.admin-payment-toolbar input{max-width:520px}
.due-overdue{color:#b42318;font-weight:700}
.due-today{color:#9a6700;font-weight:700}
.tiny-alert{font-size:10px;margin-top:2px;letter-spacing:.02em}
.attention-text{color:#b42318}
.payment-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#f8fafc}
.review-value{font-weight:650;margin-top:4px;overflow-wrap:anywhere}
.review-amount{font-size:25px;font-weight:800;margin-top:2px}
.payment-detail-box{border:1px solid var(--line);border-radius:7px;background:#f8fafc;padding:12px 14px;min-height:46px;margin-bottom:14px}
.payment-status-line{margin-top:4px}
.t-admin-payments th:last-child,.t-admin-payments td:last-child{white-space:nowrap}
@media(max-width:900px){
  .payment-balance-grid,.admin-payment-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .payment-balance-grid,.admin-payment-stats{grid-template-columns:1fr 1fr;gap:8px}
  .payment-balance-grid .stat-card,.admin-payment-stats .stat-card{min-height:90px;padding:12px}
  .stat-value{font-size:20px}
  .admin-payment-toolbar{flex-direction:column}
  .admin-payment-toolbar input{max-width:none}
  .payment-review-grid{grid-template-columns:1fr}
}
