.reimburse-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.reimbursement-date-editor{display:grid;grid-template-columns:minmax(160px,1fr) minmax(150px,210px) auto;gap:12px;align-items:end;margin-top:18px;padding:16px;border:1px solid #dbe6f5;border-radius:16px;background:#f7faff}.reimbursement-date-editor div{display:grid;gap:4px}.reimbursement-date-editor small{color:#718096}.reimbursement-date-editor input{width:100%;min-width:0}@media(max-width:620px){.reimbursement-date-editor{grid-template-columns:1fr}.reimbursement-date-editor .btn{width:100%}}
.reimburse-filters label { margin: 0; }
.reimburse-summary {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
}
.reimbursement-detail { padding: 20px; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.detail-grid p, .detail-note {
  background: #f6f8fb;
  border-radius: 12px;
  margin: 0;
  padding: 12px;
}
.detail-grid span, .detail-note span {
  color: #708097;
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
.detail-note { margin: 10px 0; }
.detail-note p { margin: 0; white-space: pre-wrap; }
.attachment-section { border-top: 1px solid #e9edf3; margin-top: 16px; padding-top: 16px; }
.attachment-section .view-title { margin-bottom: 4px; }
.attachment-section .view-title h2 { font-size: 16px; }
.upload-button { margin: 0; }
.upload-button input { display: none; }
.upload-button.uploading { opacity: .6; pointer-events: none; }
.attachment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.attachment-card { border: 1px solid #e4e9f1; border-radius: 12px; overflow: hidden; padding: 9px; }
.attachment-preview { background: #eef2f7; border-radius: 8px; display: grid; height: 110px; place-items: center; overflow: hidden; }
.attachment-preview img { height: 100%; object-fit: cover; width: 100%; }
.attachment-preview span { color: #c62828; font-weight: 800; }
.attachment-card > b, .attachment-card > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-card > b { font-size: 12px; margin-top: 8px; }
.attachment-card > small { color: #708097; margin: 3px 0 8px; }
.attachment-card > div:last-child { display: flex; gap: 6px; }
.attachment-card .btn { flex: 1; padding: 7px; }
.reimbursement-form-modal .card,
.reimbursement-edit-modal .card {
  max-height: 94vh;
  max-width: calc(100vw - 24px);
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px;
  width: min(760px, calc(100vw - 24px));
}
.reimbursement-form-modal,
.reimbursement-edit-modal {
  max-width: 100vw;
  overflow-x: hidden;
  width: 100vw;
}
.reimbursement-form-modal form > *,
.reimbursement-edit-modal form > *,
.reimbursement-form-modal label,
.reimbursement-edit-modal label {
  max-width: 100%;
  min-width: 0;
}
.reimburse-form-head {
  align-items: center;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  margin-bottom: 14px;
}
.reimburse-form-head h2 { grid-column: 2; margin: 0; text-align: center; }
.reimburse-form-head .reimburse-cancel { grid-column: 1; grid-row: 1; justify-self: start; }
.text-btn {
  background: transparent;
  border: 0;
  color: #1762d8;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 8px 0;
}
.reimburse-choices {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  margin-top: 7px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}
.reimburse-choices .category-choice {
  max-width: 100%;
  min-height: 46px;
  min-width: 0 !important;
  overflow-wrap: anywhere;
  padding: 7px 5px;
  width: 100%;
  white-space: normal;
}
.reimburse-choices .category-choice.on {
  background: #dce9ff !important;
  border-color: #2563eb !important;
  color: #12325f !important;
  box-shadow: inset 0 0 0 1px #2563eb;
}
.reimburse-date-tip { margin: -4px 0 10px; }
.reimbursement-form-modal input[type="date"],.reimbursement-edit-modal input[type="date"]{cursor:pointer;touch-action:manipulation}
.reimbursement-amount-row { align-items: stretch; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 6px; }
.reimbursement-amount-row input { margin: 0; min-width: 0; width: 100%; }
.refund-sign-toggle { font-size: 12px; padding: 8px 12px; white-space: nowrap; }
.refund-sign-toggle.on { background: #fff0f0; border-color: #dc2626; color: #b42318; }
.receipt-before-submit {
  background: #f6f9ff;
  border: 1px solid #d8e3f4;
  border-radius: 14px;
  margin: 12px 0;
  padding: 12px;
}
.receipt-before-submit > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.receipt-before-submit small { color: #708097; }
.receipt-picker { display: block; margin: 0 0 10px; text-align: center; }
.receipt-picker input { display: none; }
.new-receipt-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.new-receipt-item {
  background: #fff;
  border: 1px solid #dde5f1;
  border-radius: 10px;
  overflow: hidden;
  padding: 6px;
  position: relative;
}
.new-receipt-item img,
.new-receipt-item .pdf-preview { height: 82px; object-fit: cover; width: 100%; }
.new-receipt-item .pdf-preview { align-items: center; background: #eef2f7; color: #b42318; display: flex; font-weight: 800; justify-content: center; }
.new-receipt-item b { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-receipt-item button { background: #fff; border: 0; border-radius: 50%; color: #b42318; cursor: pointer; height: 28px; position: absolute; right: 7px; top: 7px; width: 28px; }
.reimbursement-submit { margin-top: 4px; width: 100%; }
.reimbursement-owner-actions { border-top: 1px solid #e9edf3; margin-top: 16px; padding-top: 16px; }
.reimbursement-title-actions { align-items: center; display: flex; gap: 8px; }
.reimbursement-history-toggle { font-size: 13px; padding: 8px 12px; }
.manager-approved-toggle { align-self: center; flex: 0 0 auto; font-size: 12px; padding: 8px 11px; }
@media (max-width: 700px) {
  .reimburse-filters { grid-template-columns: 1fr 1fr; }
  .reimburse-filters .btn { grid-column: 1 / -1; }
  .reimburse-summary { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .attachment-grid { grid-template-columns: 1fr 1fr; }
  .reimbursement-form-modal .card,
  .reimbursement-edit-modal .card { max-width: calc(100vw - 12px); padding: 14px 12px; width: calc(100vw - 12px); }
  .reimburse-form-head { grid-template-columns: 72px 1fr 72px; }
  .reimburse-choices { gap: 5px; }
  .reimburse-choices .category-choice { font-size: 11px; line-height: 1.25; min-height: 43px; padding: 5px 1px; }
  .receipt-before-submit > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .reimbursement-list-title { align-items: flex-start; }
  .reimbursement-title-actions { justify-content: flex-end; }
  .reimbursement-history-toggle { padding: 7px 9px; }
  .manager-reimburse-list .entry-list-title { align-items: center; gap: 8px; }
  .manager-approved-toggle { font-size: 11px; padding: 7px 9px; white-space: nowrap; }
  .reimbursement-amount-row { grid-template-columns: 1fr; }
  .refund-sign-toggle { width: 100%; }
}
