
.rmsm-front-wrap{max-width:760px;margin:0 auto}
.rmsm-front-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:14px 0}
.rmsm-front-card{background:#fff;border:1px solid #e3e3e3;border-radius:16px;padding:16px;box-shadow:0 2px 8px rgba(0,0,0,.05);margin:14px 0}
.rmsm-front-card h3{margin-top:0}
.rmsm-front-card label{display:block;font-weight:600;margin:10px 0 6px}
.rmsm-front-card input,.rmsm-front-card select,.rmsm-front-card textarea{width:100%;padding:12px;border:1px solid #ccc;border-radius:10px;box-sizing:border-box}
.rmsm-btn{display:inline-block;padding:12px 16px;border-radius:10px;background:#2271b1;color:#fff;text-decoration:none;border:none;cursor:pointer;margin-top:12px;margin-right:8px}
.rmsm-k{font-size:13px;color:#666}
.rmsm-v{font-size:24px;font-weight:700}
.rmsm-small{color:#666;font-size:13px}

body{background:#f8fafc}.rmsm-front-wrap{padding:18px 14px 36px}.rmsm-front-card{border-radius:20px;box-shadow:0 12px 30px rgba(15,23,42,.06);border:1px solid #e2e8f0}.rmsm-btn{background:linear-gradient(135deg,#2563eb,#1d4ed8);box-shadow:0 10px 20px rgba(37,99,235,.18);font-weight:700}.rmsm-btn-secondary{background:linear-gradient(135deg,#0f172a,#334155)}.rmsm-top-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.rmsm-install-app{display:none;align-items:center;justify-content:center}.rmsm-pwa-slot{display:flex;justify-content:flex-end}.rmsm-front-card h3{font-size:24px}.rmsm-k{text-transform:uppercase;letter-spacing:.08em}.rmsm-v{font-size:28px}.rmsm-front-card input:focus,.rmsm-front-card select:focus,.rmsm-front-card textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12)}


.rmsm-table{width:100%;border-collapse:collapse;background:#fff;margin-top:16px}
.rmsm-table th,.rmsm-table td{padding:10px;border:1px solid #e5e7eb;text-align:left;font-size:14px}
.rmsm-top-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}


.rmsm-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:16px 0}
.rmsm-col-span{grid-column:1/-1}
.rmsm-front-subcard{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:16px}
.rmsm-split-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin:16px 0}
.rmsm-front-card h3,.rmsm-front-subcard h4{margin-top:0}
.rmsm-front-card label,.rmsm-front-subcard label{display:block;font-weight:600;margin-bottom:6px}
.rmsm-front-card input,.rmsm-front-card select,.rmsm-front-card textarea,.rmsm-front-subcard input,.rmsm-front-subcard select,.rmsm-front-subcard textarea{width:100%}
.rmsm-small{color:#64748b;font-size:13px}
.rmsm-top-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
.rmsm-table{width:100%;border-collapse:collapse;background:#fff;margin-top:16px}
.rmsm-table th,.rmsm-table td{padding:10px;border:1px solid #e5e7eb;text-align:left;font-size:14px;vertical-align:top}


.rmsm-filter-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:0 0 16px}
.rmsm-filter-bar input,.rmsm-filter-bar select{min-height:42px}
.rmsm-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:16px 0}
.rmsm-col-span{grid-column:1/-1}
.rmsm-front-subcard{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:16px}
.rmsm-split-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin:16px 0}
.rmsm-front-card h3,.rmsm-front-subcard h4{margin-top:0}
.rmsm-front-card label,.rmsm-front-subcard label{display:block;font-weight:600;margin-bottom:6px}
.rmsm-front-card input,.rmsm-front-card select,.rmsm-front-card textarea,.rmsm-front-subcard input,.rmsm-front-subcard select,.rmsm-front-subcard textarea{width:100%}
.rmsm-small{color:#64748b;font-size:13px}
.rmsm-top-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
.rmsm-table{width:100%;border-collapse:collapse;background:#fff;margin-top:16px}
.rmsm-table th,.rmsm-table td{padding:10px;border:1px solid #e5e7eb;text-align:left;font-size:14px;vertical-align:top}
.rmsm-btn-danger{background:#ef4444 !important;color:#fff !important;border-color:#ef4444 !important}
.rmsm-label-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.rmsm-label-card{border:2px dashed #1f2937;background:#fff;padding:16px;border-radius:16px;text-align:center}
.rmsm-label-title{font-weight:800;margin-bottom:12px;font-size:18px}
.rmsm-qr-img{width:130px;height:130px;object-fit:contain;margin:0 auto 12px;display:block}
.rmsm-scanner-box{border:1px dashed #cbd5e1;border-radius:16px;padding:14px;margin:8px 0 16px;background:#fff}
.rmsm-qr-video{width:100%;max-width:420px;border-radius:12px;background:#000;display:block}
@media print{
  .rmsm-top-actions,.rmsm-filter-bar,.rmsm-scanner-box,.rmsm-nav,.rmsm-footer,.rmsm-topbar{display:none !important}
  .rmsm-front-wrap,.rmsm-front-card{padding:0;border:none;box-shadow:none}
  .rmsm-label-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.rmsm-upload-scan-label{cursor:pointer}


.rmsm-label-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.rmsm-label-card{border:1px solid #111;padding:12px;border-radius:10px;background:#fff;min-height:190px}
.rmsm-label-card.thermal{width:378px;max-width:100%;min-height:189px}
.rmsm-thermal-note{font-size:12px;color:#475569;margin-bottom:10px}
@media print{
  .rmsm-label-card{width:378px !important;height:189px !important;page-break-inside:avoid;border:1px solid #000;border-radius:0}
}


.rmsm-alert-badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#fef2f2;color:#991b1b;font-size:12px;font-weight:700}
.rmsm-label-card.thermal{width:378px;max-width:100%;min-height:189px;display:flex;flex-direction:column;justify-content:flex-start}
.rmsm-label-card.thermal .rmsm-qr-img{width:108px;height:108px}
@media print{
  .rmsm-label-card.thermal{width:378px !important;height:189px !important;padding:10px}
}


/* v4.2.3 mobile bottom navigation */
.rmsm-front-wrap{padding-bottom:110px}
.rmsm-top-actions .rmsm-btn.is-active{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-color:rgba(59,130,246,.55);box-shadow:0 10px 22px rgba(37,99,235,.28)}
.rmsm-mobile-bottom-nav{position:fixed;left:14px;right:14px;bottom:14px;z-index:9998;display:none;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:10px 12px;border-radius:24px;background:rgba(15,23,42,.94);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(148,163,184,.24);box-shadow:0 18px 44px rgba(2,6,23,.36), inset 0 1px 0 rgba(255,255,255,.08)}
.rmsm-mobile-bottom-link{text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:58px;padding:6px;border-radius:18px;color:#cbd5e1;background:transparent;transition:all .18s ease;font-weight:700}
.rmsm-mobile-bottom-link:hover,.rmsm-mobile-bottom-link:focus{color:#fff;background:rgba(59,130,246,.14)}
.rmsm-mobile-bottom-link.is-active{background:linear-gradient(135deg,rgba(96,165,250,.28),rgba(37,99,235,.34));color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
.rmsm-mobile-bottom-icon{font-size:18px;line-height:1}
.rmsm-mobile-bottom-label{font-size:11px;line-height:1.1;letter-spacing:.01em}
@media (max-width: 900px){
  .rmsm-mobile-bottom-nav{display:grid}
  .rmsm-top-actions{display:none}
}
@media (max-width: 520px){
  .rmsm-front-wrap{padding-left:12px;padding-right:12px;padding-bottom:118px}
  .rmsm-mobile-bottom-nav{left:10px;right:10px;bottom:max(10px, env(safe-area-inset-bottom));padding:8px;gap:6px;border-radius:22px}
  .rmsm-mobile-bottom-link{min-height:54px;padding:6px 4px;border-radius:16px}
  .rmsm-mobile-bottom-icon{font-size:17px}
  .rmsm-mobile-bottom-label{font-size:10px}
}


/* v4.2.4 mobile app layout cleanup */
.rmsm-front-wrap{max-width:860px;width:100%;margin:0 auto;padding:16px 14px 126px;box-sizing:border-box;overflow-x:hidden}
.rmsm-app-shell{position:relative;overflow:hidden;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.rmsm-section-head{margin-bottom:14px}
.rmsm-section-head h3{margin:0 0 6px;font-size:clamp(24px,5vw,32px);line-height:1.1;color:#0f172a}
.rmsm-section-head .rmsm-small{margin:0;color:#475569;font-size:14px;line-height:1.5}
.rmsm-mobile-section-switcher{display:none}
.rmsm-mobile-section-link{text-decoration:none}
.rmsm-filter-bar,.rmsm-form-grid,.rmsm-split-grid,.rmsm-front-card,.rmsm-front-subcard,.rmsm-table{max-width:100%;box-sizing:border-box}
.rmsm-filter-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}
.rmsm-filter-bar > *{min-width:0}
.rmsm-filter-bar .rmsm-btn{margin-top:0;margin-right:0;min-height:48px;width:100%}
.rmsm-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.rmsm-split-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.rmsm-front-card,.rmsm-front-subcard{padding:18px;border-radius:24px}
.rmsm-front-card input,.rmsm-front-card select,.rmsm-front-card textarea,.rmsm-front-subcard input,.rmsm-front-subcard select,.rmsm-front-subcard textarea{min-height:52px;font-size:16px;padding:14px 16px;border-radius:16px}
.rmsm-front-card textarea,.rmsm-front-subcard textarea{min-height:120px}
.rmsm-front-card label,.rmsm-front-subcard label{font-size:14px;font-weight:700;color:#334155;margin-bottom:8px}
.rmsm-btn{min-height:52px;padding:14px 18px;border-radius:16px;font-size:16px;text-align:center}
.rmsm-scanner-box{padding:16px;border-radius:20px;background:#f8fafc}
.rmsm-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:18px;white-space:nowrap}
.rmsm-table thead th{position:sticky;top:0;background:#fff;z-index:1}
.rmsm-table th,.rmsm-table td{white-space:nowrap}
.rmsm-table code{white-space:nowrap}

@media (max-width: 900px){
  .rmsm-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rmsm-split-grid{grid-template-columns:1fr}
}

@media (max-width: 640px){
  .rmsm-front-wrap{padding:12px 12px calc(126px + env(safe-area-inset-bottom));}
  .rmsm-mobile-section-switcher{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px}
  .rmsm-mobile-section-link{display:flex;align-items:center;justify-content:center;min-height:54px;padding:12px 10px;border-radius:18px;background:rgba(15,23,42,.78);color:#e2e8f0;border:1px solid rgba(148,163,184,.18);box-shadow:0 10px 24px rgba(2,6,23,.18);font-weight:800;text-align:center}
  .rmsm-mobile-section-link.is-active{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-color:transparent}
  .rmsm-mobile-section-label{font-size:14px;line-height:1.15}
  .rmsm-front-card,.rmsm-front-subcard{padding:16px;border-radius:22px;margin:12px 0}
  .rmsm-form-grid,.rmsm-filter-bar{grid-template-columns:1fr}
  .rmsm-col-span{grid-column:auto}
  .rmsm-top-actions{display:none !important}
  .rmsm-front-card input,.rmsm-front-card select,.rmsm-front-card textarea,.rmsm-front-subcard input,.rmsm-front-subcard select,.rmsm-front-subcard textarea{min-height:54px;font-size:16px}
  .rmsm-btn{display:block;width:100%;margin-right:0}
  .rmsm-table{font-size:14px;border-radius:16px}
  .rmsm-table th,.rmsm-table td{padding:12px 10px}
  .rmsm-front-grid{grid-template-columns:1fr 1fr;gap:12px}
  .rmsm-v{font-size:22px}
  .rmsm-mobile-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));}
}

@media (max-width: 420px){
  .rmsm-front-grid{grid-template-columns:1fr}
  .rmsm-mobile-bottom-nav{left:8px;right:8px;padding:8px 6px;gap:4px;border-radius:20px}
  .rmsm-mobile-bottom-link{min-height:52px;padding:6px 2px}
  .rmsm-mobile-bottom-icon{font-size:16px}
  .rmsm-mobile-bottom-label{font-size:9px}
}
