/* COD dashboard controls and tables; summary cards use shared CSS. */
#codDashboard {
      margin-top:20px;
      background:white;
      padding:20px;
      border-radius:12px;
      box-shadow:0 2px 8px rgba(0,0,0,.1);
    }

#codDashboard .cod-control {margin-top:8px;padding:8px;width:100%;}

#codDashboard .cod-column-heading {border:1px solid #ddd;padding:6px;}

#codSummary {
          display:grid;
          grid-template-columns:
            repeat(
              auto-fit,
              minmax(220px,1fr)
            );
          gap:15px;
          margin-top:20px;
        }

#codToast {
            position:fixed;
            top:20px;
            right:20px;
            background:#16a34a;
            color:white;
            padding:12px 18px;
            border-radius:8px;
            z-index:9999;
            font-weight:bold;
          }

/* Stage39 scoped static COD layouts. */
.menu-card[data-menu-key]{position:relative}.cod-menu-notifications{position:absolute;top:8px;right:8px;display:flex;flex-direction:column;align-items:flex-end;gap:4px;pointer-events:none;max-width:calc(100% - 16px)}.cod-menu-notification{padding:4px 7px;border-radius:99px;background:#dc2626;color:#fff;font:700 11px Arial,sans-serif;box-shadow:0 0 0 2px #fff;white-space:nowrap}
#codDashboard.cod-layout-1, #codDashboard .cod-layout-1 { display:grid;
              grid-template-columns:1fr 1fr;
              gap:20px;
              width:100%; }
#codDashboard.cod-layout-2, #codDashboard .cod-layout-2 { margin-top:25px;
        margin-bottom:25px; }
#codDashboard.cod-layout-3, #codDashboard .cod-layout-3 { margin-top:20px; }
#codDashboard.cod-layout-4, #codDashboard .cod-layout-4 { margin-bottom:10px;
          display:flex;
          gap:10px; }
#codDashboard.cod-layout-5, #codDashboard .cod-layout-5 { width:100%;
            border-collapse:collapse;
            font-size:13px; }
#codDashboard.cod-layout-6, #codDashboard .cod-layout-6 { background:#f3f4f6; }
#codDashboard.cod-layout-7, #codDashboard .cod-layout-7 { text-align:center;
                  padding:20px; }
#codDashboard.cod-layout-8, #codDashboard .cod-layout-8 { margin-top:20px;
              display:flex;
              justify-content:space-between;
              align-items:center;
              flex-wrap:wrap;
              gap:10px; }
#codDashboard.cod-layout-9, #codDashboard .cod-layout-9 { text-align:right; }
#codDashboard.cod-layout-10, #codDashboard .cod-layout-10 { text-align:right;
              font-weight:bold; }
/* Compact the payment-entry table without shrinking its text. */
#codDashboard .cod-table-scroll > table { min-width:0; }
#codDashboard .cod-table-scroll th { min-width:0; }
#codDashboard .cod-table-scroll th,
#codDashboard .cod-table-scroll td { padding-left:3px; padding-right:3px; }
#codDashboard .cod-table-scroll .shared-table-number { min-width:44px; }
#codDashboard .cod-table-scroll td:nth-child(2),
#codDashboard .cod-table-scroll td:nth-child(4),
#codDashboard .cod-table-scroll td:nth-child(7),
#codDashboard .total-cell,
#codDashboard .selisih-cell { white-space:nowrap; }

#codDashboard .cod-table-scroll .transfer-input,
#codDashboard .cod-table-scroll .qris-input,
#codDashboard .cod-table-scroll .cash-input {
  width:80px;
  max-width:100%;
  min-height:30px;
  padding:4px;
  font:inherit;
  text-align:right;
}
#codDashboard .cod-table-scroll .cod-qris-select small { white-space:normal; }

/* Keep payment rows compact, with one line per date/time and editor label. */
#codDashboard .cod-table-scroll th:nth-child(2),
#codDashboard .cod-table-scroll th:nth-child(4),
#codDashboard .cod-table-scroll th:nth-child(5),
#codDashboard .cod-table-scroll th:nth-child(13) { width:1%; }
#codDashboard .cod-table-scroll td:nth-child(5) { white-space:nowrap; }
#codDashboard .cod-table-scroll td:nth-child(3) .shared-date-stack,
#codDashboard .cod-table-scroll .input-by .shared-date-stack { display:inline-flex; align-items:baseline; gap:4px; white-space:nowrap; }
#codDashboard .cod-table-scroll .shared-date-stack > small { display:inline; margin-top:0; }
#codDashboard .cod-table-scroll .input-by { white-space:nowrap; }
#codDashboard .cod-table-scroll .cod-edited { display:inline; margin-right:3px; }
#codDashboard .cod-table-scroll .cod-qris-select { white-space:nowrap; padding:4px 0; }
#codDashboard .cod-table-scroll .cod-status { max-width:125px; padding:3px 5px; line-height:1.35; }


/* The menu is portalled so it never adds width to the COD table. */
#codDashboard .cod-actions-cell{white-space:nowrap}
#codDashboard .cod-row-actions{display:grid;grid-template-columns:24px 24px;align-items:center;gap:4px;width:52px;max-width:100%;margin:auto}
#codDashboard .cod-row-actions .save-btn{box-sizing:border-box;width:24px;min-width:0;padding:3px 0;font-size:13px}
#codDashboard .cod-more-actions{box-sizing:border-box;height:28px;width:24px;min-width:0;padding:3px 0;border:1px solid #9ca3af;border-radius:5px;background:#f9fafb;color:#374151;font-size:20px;line-height:1;cursor:pointer}
#codDashboard .cod-more-actions:hover{background:#e5e7eb}
.cod-actions-menu{position:fixed;z-index:100010;display:grid;max-width:calc(100vw - 16px);padding:5px;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 18px #0002}
.cod-actions-menu button{border:0;background:transparent;padding:9px 12px;text-align:left;cursor:pointer;font:inherit}
.cod-actions-menu button:hover,.cod-actions-menu button:focus{background:#f3f4f6}
.cod-loss-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cod-loss-form label,.cod-loss-report-card label{display:flex;flex-direction:column;gap:6px;min-width:0;text-align:left}
.cod-loss-form textarea,.cod-loss-report-card textarea{min-height:85px;width:100%;box-sizing:border-box}
.cod-loss-full{grid-column:1/-1;margin:0}
.cod-loss-form input[type=file]{width:100%;min-width:0;font:inherit}
.cod-loss-report-card{border:1px solid #d1d5db;border-radius:8px;padding:12px;margin-bottom:14px;overflow-wrap:anywhere}
.cod-loss-evidence,.cod-loss-review-actions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.cod-loss-evidence button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.cod-loss-history{padding-left:20px;font-size:12px;color:#6b7280}
.cod-loss-message{margin-bottom:10px}.cod-loss-error{color:#dc2626}
button.cod-loss-status{cursor:pointer;font:inherit;border:1px solid #d1d5db}
@media(max-width:600px){.cod-loss-form{grid-template-columns:minmax(0,1fr)}}

/* Three drawn dots stay legible inside the existing narrow action slot. */
#codDashboard .cod-more-actions::before{content:"";display:block;width:2px;height:2px;margin:auto;border-radius:50%;background:currentColor;box-shadow:0 -4px 0 currentColor,0 4px 0 currentColor}


.cod-loss-date{position:relative;display:block;min-height:36px;box-sizing:border-box}.cod-loss-date input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.cod-loss-date:focus-within{outline:2px solid #2563eb}.cod-loss-inbox{display:grid;gap:8px;margin-top:12px}.cod-loss-inbox button{text-align:left;font:inherit;background:white;width:100%;margin:0}.cod-layout-4{flex-wrap:wrap}


@media(min-width:1100px){.portal-app #content-area #codDashboard .cod-main-filters{grid-template-columns:repeat(8,minmax(0,1fr))}}
#codDashboard .cod-table-scroll .cod-status{max-width:100px}
#codDashboard .cod-loss-status{display:inline-flex;flex-direction:column;align-items:center;gap:2px;white-space:nowrap;padding:4px 5px;font-size:11px;color:#991b1b;background:#fef2f2;border:1px solid #fecaca;border-radius:6px}
#codDashboard .cod-loss-status small{font-size:10px;color:#6b7280;line-height:1.2}
.cod-loss-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.cod-loss-overview div{padding:10px;background:#f8fafc;border-radius:6px;min-width:0}
.cod-loss-overview dt{font-size:12px;color:#64748b}.cod-loss-overview dd{margin:4px 0 0;font-weight:600;overflow-wrap:anywhere}
.cod-loss-report-card h3{margin:0;font-size:15px}.cod-loss-meta{color:#64748b;font-size:12px;margin:6px 0 12px}.cod-loss-report-card details{margin-top:12px}.cod-loss-report-card summary{cursor:pointer;color:#475569;font-size:12px}.cod-loss-review-actions button{min-height:36px}
@media(max-width:480px){.cod-loss-overview{grid-template-columns:minmax(0,1fr)}.cod-loss-overview div{display:flex;justify-content:space-between;gap:8px}.cod-loss-overview dd{margin:0}}

/* Keep COD payment rows on one line; compact columns use intrinsic width. */
#codDashboard .cod-table-scroll th,
#codDashboard .cod-table-scroll td {white-space:nowrap;overflow-wrap:normal;}
#codDashboard .cod-table-scroll th:nth-child(1),
#codDashboard .cod-table-scroll td:nth-child(1) {width:1%;min-width:30px;padding-left:3px;padding-right:3px;}
#codDashboard .cod-table-scroll th:nth-child(4),
#codDashboard .cod-table-scroll th:nth-child(6),
#codDashboard .cod-table-scroll th:nth-child(15) {width:1%;}
#codDashboard .cod-table-scroll .cash-input,
#codDashboard .cod-table-scroll .transfer-input,
#codDashboard .cod-table-scroll .qris-input {width:72px;box-sizing:border-box;}
#codDashboard .cod-table-scroll .cod-status {max-width:none;white-space:nowrap;}
#codDashboard .cod-table-scroll .cod-loss-status {display:inline-flex;flex-direction:row;gap:4px;align-items:center;}
#codDashboard .cod-table-scroll .cod-loss-status small {margin:0;white-space:nowrap;}
#codDashboard .cod-table-scroll .cod-input-by-inline {display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap;}
#codDashboard .cod-table-scroll .cod-input-by-inline small {display:inline;margin:0;}

#codDashboard .cod-table-scroll .input-by {font-size:12px;}
#codDashboard .cod-table-scroll .cod-input-by-inline>span:first-of-type {max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}


