.rmt-frontend{max-width:1600px;margin:0 auto;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.rmt-label{font-size:12px;color:#555;margin-right:6px;white-space:nowrap}

/* v1.0.3 – frontend layout (match requested UI) */
.rmt-page-title{font-size:26px;font-weight:700;text-align:center;margin:18px 0 14px;color:#111827}

.rmt-topbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:10px 0 12px;flex-wrap:wrap}
.rmt-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rmt-print-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.rmt-print-controls .rmt-field{display:flex;flex-direction:column;gap:6px}
.rmt-print-controls label{font-size:13px;color:#444}
.rmt-print-controls input[type="date"]{height:42px;min-width:260px;border:1px solid #d6d6d6;border-radius:10px;padding:0 12px;font-size:14px;background:#fff}

/* Buttons like screenshot */
.rmt-btn{border:1px solid #cfcfcf;border-radius:14px;padding:12px 18px;background:#fff;cursor:pointer;font-size:15px;line-height:1}
.rmt-btn:hover{background:#f7f7f7}
.rmt-btn:disabled{opacity:.5;cursor:not-allowed}
.rmt-btn-print{padding:12px 22px;border-radius:16px}

/* Ensure the paper header grid NEVER shows on frontend */
.rmt-frontend .rmt-header-grid{display:none !important}

.rmt-toolbar{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;margin:18px 0 12px}
.rmt-left,.rmt-right{display:flex;align-items:center;gap:10px}
.rmt-right{justify-content:flex-end;flex-wrap:wrap}

.rmt-form-select{min-width:260px;padding:10px 12px;border:1px solid #d0d0d0;border-radius:10px;background:#fff}

.rmt-titlebar{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 16px;border:1px solid #e2e2e2;border-radius:12px;background:#fff;min-width:320px}
.rmt-title-icon{width:65px;height:65px;object-fit:contain}
.rmt-title-text{font-size:22px;font-weight:650;color:#1f2937;white-space:nowrap}

.rmt-status{font-size:12px;color:#2b6c2f}
.rmt-readonly{font-size:12px;color:#a33}


/* Sheet header (screen) — match print grid layout */
.rmt-sheet{background:#fff;border:1px solid #e3e3e3;border-radius:12px;padding:14px;}
.rmt-header-grid{display:grid;grid-template-columns: 1.1fr 1fr 1fr 1fr 0.9fr;border:1px solid #000;margin:8px 0 12px}
.rmt-hcell{border-right:1px solid #000;min-height:60px;display:flex;align-items:center;justify-content:center;padding:6px;overflow:hidden}
.rmt-hcell:last-child{border-right:0}
.rmt-h-title-inner{display:flex;align-items:center;justify-content:center;gap:10px}
.rmt-h-title-text{font-size:20px;font-weight:700;text-align:center}
.rmt-h-company-text{font-size:14px;font-weight:700;line-height:1.15;text-align:center}
.rmt-h-logo{display:flex;align-items:center;justify-content:center;padding:2px 4px}
img.rmt-logo{height:34px;max-height:34px;width:auto;max-width:100%;object-fit:contain;display:block}

/* Table */
.rmt-table-wrap{border:1px solid #e3e3e3;border-radius:12px;overflow:hidden;background:#fff}
.rmt-table{width:100%;border-collapse:collapse;table-layout:fixed}
.rmt-table th,.rmt-table td{border:1px solid #d9d9d9;vertical-align:middle}
.rmt-table th{background:#f2f2f2;padding:8px 6px;text-align:center;position:relative}
/* Center-middle header content like the paper form */
.rmt-th-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1.15;font-size:12px;word-break:normal;white-space:normal;min-height:72px}
.rmt-th-line{width:100%;text-align:center}
.rmt-qcp{color:#666;font-weight:700}
.rmt-ccp{color:#444;font-weight:700}

.rmt-table td{padding:6px;background:#fff}
.rmt-cell{width:100%;box-sizing:border-box;border:1px solid #d6d6d6;border-radius:8px;padding:8px 8px;font-size:13px}
.rmt-cell:disabled{background:#fafafa}

.rmt-row-handle{cursor:grab;font-size:16px;user-select:none}
.rmt-del{border:none;background:transparent;font-size:18px;cursor:pointer}

/* Desktop: no horizontal scroll, always fit columns */
@media (min-width: 901px){
  .rmt-table-wrap{overflow:visible}
}

/* Mobile/tablet: touch drag scroll */
@media (max-width: 900px){
  .rmt-toolbar{grid-template-columns:1fr;}
  .rmt-titlebar{min-width:0}
  .rmt-right{justify-content:flex-start}
  /* Keep column widths readable (do NOT shrink to fit); allow horizontal scroll */
  .rmt-table-wrap{overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
  .rmt-table{table-layout:auto;width:max-content;min-width:1200px}
  .rmt-table th{min-width:110px}
  .rmt-th-inner{min-height:60px}
}

.rmt-help{font-size:12px;color:#555;margin:8px 0 22px}
.rmt-help ul{margin:10px 0 0 18px}

/* Column resizer */
.rmt-resizer{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize}


/*
  Blocksy (and some themes) apply flex rules to header cells on desktop.
  Using flex-direction alone may be overridden. Force a true vertical "table" layout
  so Doc details ALWAYS stack vertically on desktop + mobile + print.
*/
.rmt-h-doc{display:table !important;width:100% !important;border-collapse:collapse !important;padding:0 !important}
.rmt-h-doc .rmt-docrow{display:table-row !important;border-bottom:1px solid #000 !important;font-size:11px !important}
.rmt-h-doc .rmt-docrow:last-child{border-bottom:0 !important}
.rmt-h-doc .rmt-doclabel{display:table-cell !important;width:45% !important;padding:3px 6px !important;border-right:1px solid #000 !important;vertical-align:top !important;white-space:nowrap !important}
.rmt-h-doc .rmt-docvalue{display:table-cell !important;width:55% !important;padding:3px 6px !important;text-align:right !important;vertical-align:top !important}



/* v1.2.6: prevent form selector truncation */
.rmt-toolbar{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;}
.rmt-toolbar .rmt-left{justify-self:start;min-width:280px;}
.rmt-toolbar .rmt-center{justify-self:center;}
.rmt-toolbar .rmt-right{justify-self:end;min-width:280px;}
.rmt-left select.rmt-form-select{width:100%;max-width:520px;min-width:280px;}
@media (max-width: 900px){.rmt-toolbar{display:flex;flex-direction:column;align-items:stretch;}.rmt-toolbar .rmt-left,.rmt-toolbar .rmt-right{min-width:unset;}}


/* v1.2.7: fix form selector text clipping */
.rmt-toolbar{overflow:visible;}
.rmt-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:320px;}
.rmt-left label{white-space:nowrap;}
select.rmt-form-select{flex:1 1 360px;min-width:360px;max-width:520px;width:auto;padding-right:42px;}
@media (max-width: 520px){select.rmt-form-select{min-width:240px;flex-basis:240px;}}


/* v1.2.8: constrain header logos to their cells */
.rmt-h-logo{display:flex;align-items:center;justify-content:center;}
.rmt-h-logo img.rmt-logo{max-width:100%;max-height:56px;width:auto;height:auto;object-fit:contain;display:block;margin:0 auto;}


/* v1.2.9: fix select text clipping (Blocksy/mobile) */
.rmt-wrap select.rmt-form-select{box-sizing:border-box !important;height:auto !important;min-height:44px !important;line-height:1.25 !important;padding:10px 44px 10px 14px !important;display:block !important;}
.rmt-wrap select.rmt-form-select:focus{outline:none;}
.rmt-wrap .rmt-left{align-items:flex-start;}


/* v1.3.0: hard-fix native select text clipping on some browsers/themes */
.rmt-wrap select.rmt-form-select{
  font-size:16px !important;
  height:48px !important;
  min-height:48px !important;
  line-height:48px !important;
  padding:0 44px 0 14px !important;
  vertical-align:middle !important;
  -webkit-appearance: menulist !important;
  appearance: menulist !important;
}
.rmt-wrap select.rmt-form-select option{font-size:16px !important;line-height:1.2 !important;}


/* v1.3.1: custom dropdown to avoid native select baseline clipping */
.rmt-form-dd{position:relative;max-width:520px;min-width:240px;}
.rmt-dd-btn{width:100%;min-height:48px;border:1px solid #cfd3d8;border-radius:10px;background:#fff;padding:10px 44px 10px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.rmt-dd-label{font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rmt-dd-caret{width:10px;height:10px;border-right:2px solid #555;border-bottom:2px solid #555;transform:rotate(45deg);margin-left:auto;}
.rmt-form-dd.is-open .rmt-dd-caret{transform:rotate(-135deg);}
.rmt-dd-list{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #cfd3d8;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.12);padding:6px 0;margin:0;list-style:none;max-height:260px;overflow:auto;display:none;z-index:9999;}
.rmt-form-dd.is-open .rmt-dd-list{display:block;}
.rmt-dd-opt{padding:10px 14px;font-size:15px;line-height:1.2;cursor:pointer;}
.rmt-dd-opt:hover,.rmt-dd-opt.is-active{background:#f3f5f7;}
.rmt-form-dd input.rmt-form-select{position:absolute;left:-9999px;width:1px;height:1px;opacity:0;}


/* v1.3.5: ensure form dropdown clickable above table */
.rmt-form-dd{z-index:10000;}
.rmt-dd-btn{cursor:pointer;pointer-events:auto;}
.rmt-dd-list{pointer-events:auto;}


/* v1.4.0 – force header logos to fit inside column */
.rmt-header-logo img,
.rmt-print-header img {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media print {
    .rmt-header-logo img,
    .rmt-print-header img {
        max-height: 40px;
    }
}


/* v1.4.1 – screen: header logo cells fixed height to avoid overflow */
.rmt-header .rmt-hcell.logo,
.rmt-header .rmt-hcell.logo2{
  height: 54px;
  overflow: hidden;
  vertical-align: middle;
  text-align: center;
  padding: 2px 4px;
}
.rmt-header .rmt-hcell.logo img,
.rmt-header .rmt-hcell.logo2 img{
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: inline-block;
}


/* v1.4.2 – screen header logos slightly smaller */
.rmt-header img.rmt-logo{
  height: 34px;
  max-height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}


/* v1.4.3 – screen: keep header logos inside their columns */
.rmt-frontend .rmt-header-grid .rmt-h-logo{
  height: 54px;
  overflow: hidden;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rmt-frontend .rmt-header-grid .rmt-h-logo img.rmt-logo{
  height: 34px;
  max-height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.rmt-frontend .rmt-header-grid .rmt-h-logo-nougatlimar img.rmt-logo{
  height: 32px;
  max-height: 32px;
}


/* v1.4.4 – screen: ensure header logo cells stretch so grid borders stay continuous */
.rmt-frontend .rmt-header-grid .rmt-h-logo{
  height: auto;
  min-height: 60px;
  align-self: stretch;
  overflow: hidden;
}


/* checknote cell */
.rmt-cn{display:flex;align-items:center;gap:6px}
.rmt-cn select{font-size:12px;padding:2px 4px}
.rmt-cn input.rmt-cn-note{width:100%}
.rmt-cn .rmt-cn-check{width:18px;height:18px}


/* Screen header */
.rmt-header-grid-screen{margin:12px 0 10px 0}
