@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-muted: #f1f5f9;
  --sidebar-bg: rgba(15, 23, 42, 0.85);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  
  --danger: #ef4444;
  --success: #10b981;
  --gold: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px;
  color: var(--text-main); background: var(--bg-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  letter-spacing: -0.01em; line-height: 1.5; font-size: 13px;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; transition: all 0.15s ease; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* LAYOUT */
.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 20px 16px;
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--radius-sm); background: var(--primary);
  color: #fff; font-weight: 800; font-size: 14px;
}
.brand strong { display: block; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0; }
.brand span { display: block; margin-top: 2px; color: var(--sidebar-text); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; height: 36px; padding: 0 12px;
  border-radius: var(--radius-sm); color: var(--sidebar-text);
  text-decoration: none; font-weight: 500; font-size: 13px;
  transition: all 0.15s ease;
}
.nav a:hover { color: var(--sidebar-text-hover); background: rgba(255,255,255,0.05); }
.nav a.active { color: #fff; background: var(--primary); font-weight: 600; }

.sidebar-note {
  margin-top: auto; padding: 16px;
  border: 1px solid var(--sidebar-border); border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
}
.sidebar-note span { display: block; color: var(--sidebar-text); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-note strong { display: block; margin-top: 6px; color: #fff; font-size: 24px; font-weight: 700; }

/* MAIN WORKSPACE */
.workspace { padding: 0; }

/* TOPBAR */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 32px; border-bottom: 1px solid var(--line);
  background: #fff; position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
h1, h2, p { margin: 0; }
h1 { font-size: 20px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
h2 { font-size: 15px; font-weight: 600; color: var(--text-main); }
.lead { margin-top: 4px; color: var(--text-muted); font-size: 13px; }
.eyebrow {
  display: inline-block; margin-bottom: 4px;
  color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}

/* WORKSPACE CONTENT */
.page-content { padding: 24px 32px 32px; }
.page-view { display: none; }
.page-view.active { display: block; animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.workspace > section { padding: 24px 32px; }

/* BUTTONS & FORMS */
.top-actions, .inline-form { display: flex; align-items: center; gap: 8px; }
.primary-button, .ghost-button, form button {
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 13px; white-space: nowrap;
  box-shadow: var(--shadow-sm); border: 1px solid transparent;
}
.primary-button, form button {
  color: #fff; background: var(--primary-gradient);
  border: none;
}
.primary-button:hover, form button:hover {
  background: var(--primary-hover); box-shadow: var(--shadow-md); opacity: 0.95;
}
.ghost-button {
  color: var(--text-main); background: #fff; border-color: var(--line-strong);
}
.ghost-button:hover { background: var(--surface-muted); }

input, select, textarea {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text-main); background: #ffffff;
  outline: none; transition: all 0.15s ease; font-size: 13px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) inset;
}
input::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset;
}
input[type="date"] { color: var(--text-main); }

.inline-form { flex-wrap: wrap; justify-content: flex-end; }
.inline-form input { width: min(150px, 100%); }
.inline-form select { width: 130px; }
.stack-form { display: grid; gap: 10px; margin-bottom: 16px; }

/* METRICS */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.metrics article, .panel {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metrics article:hover, .panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.metrics article { padding: 16px 20px; display: flex; flex-direction: column; }
.metrics span { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.metrics strong { display: block; margin-top: 8px; font-size: 28px; font-weight: 700; line-height: 1; color: var(--text-main); }
.metrics small { display: block; margin-top: 6px; color: var(--text-muted); font-size: 12px; }

/* PANELS & GRID */
.content-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(360px, 1fr); gap: 20px; }
.panel { padding: 20px; }
.large-panel, .wide-panel { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.panel-head.compact { margin-bottom: 16px; padding-bottom: 8px; }

.command-panel { border-top: 3px solid var(--primary); }

/* CARDS & LISTS */
.today-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.today-card, .record, .list-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-solid); transition: all 0.15s ease;
}
.today-card { padding: 16px; }
.today-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.today-card strong { display: block; margin: 8px 0 6px; font-size: 20px; font-weight: 700; color: var(--text-main); }
.today-card span, .meta { color: var(--text-muted); font-size: 12px; }

.data-list, .list { display: grid; gap: -1px; }
.record {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: 0; margin-bottom: 0;
}
.record:first-child { border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); }
.record:last-child { border-bottom-left-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.record:hover { background: var(--surface-muted); z-index: 1; position: relative; }
.record strong { display: block; color: var(--text-main); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.record-actions { display: flex; gap: 6px; justify-content: flex-end; }
.asset-list-header,
.asset-row {
  grid-template-columns: 110px minmax(160px, 1.2fr) minmax(150px, 1fr) minmax(130px, .8fr) minmax(150px, .9fr) 90px 164px;
}
.asset-list-header {
  display: grid; align-items: center; gap: 12px; padding: 13px 16px;
  min-height: 44px;
  color: #334155; font-size: 13px; font-weight: 800; background: #eef4fb;
  border: 1px solid #cbd5e1; border-bottom: 1px solid #b6c4d4; border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}
.asset-list-header span { letter-spacing: 0; }
.asset-row { align-items: center; min-height: 58px; }
.asset-row:first-of-type { border-top-left-radius: 0; border-top-right-radius: 0; }
.asset-row > div:not(.record-actions) { min-width: 0; }
.asset-row > div:not(.record-actions) > span,
.asset-row > div:not(.record-actions) > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row .record-actions { align-self: center; justify-content: flex-end; min-width: 164px; }
.asset-basic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.list-item { padding: 12px 16px; border-radius: 0; }
.list-item:first-child { border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); }
.list-item:last-child { border-bottom-left-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.list-item:hover { background: var(--surface-muted); }
.list-item strong { display: block; margin-bottom: 4px; color: var(--text-main); font-size: 13px; }

/* PILLS & UTILS */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.pill-blue { color: #0369a1; background: #e0f2fe; }
.pill-green { color: #15803d; background: #dcfce7; }
.pill-gold { color: #b45309; background: #fef3c7; }
.pill-red { color: #b91c1c; background: #fee2e2; }
.pill-purple { color: #6d28d9; background: #ede9fe; }

.mini-button {
  height: 28px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--text-main); background: #fff; border: 1px solid var(--line-strong);
  font-weight: 500; font-size: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.mini-button:hover { background: var(--surface-muted); border-color: #94a3b8; }
.delete-button { color: var(--danger) !important; border-color: #fca5a5 !important; }
.delete-button:hover { background: #fef2f2 !important; border-color: #f87171 !important; }

.empty-state { padding: 32px 16px; color: var(--text-muted); text-align: center; font-size: 13px; background: var(--surface-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }

/* DETAILS */
.asset-detail, .contract-detail, .client-detail {
  margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-solid); box-shadow: var(--shadow-sm);
}
.asset-detail:empty, .contract-detail:empty, .client-detail:empty { display: none; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); background: var(--surface-muted); border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
.detail-title strong { display: block; font-size: 20px; font-weight: 700; color: var(--text-main); }
.detail-title span { color: var(--text-muted); font-size: 12px; margin-top: 4px; display: block; }

.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.detail-field { padding: 12px 16px; background: #fff; }
.detail-field span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.detail-field strong { display: block; margin-top: 4px; font-size: 13px; color: var(--text-main); }

.detail-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.detail-section { background: #fff; padding: 16px; }
.detail-section h3 { margin: 0 0 12px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.timeline { display: grid; gap: 8px; }
.timeline-item { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-muted); border-left: 2px solid var(--line-strong); }
.timeline-item strong { display: block; font-size: 13px; color: var(--text-main); }
.timeline-item span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; }

.detail-note { padding: 16px 20px; color: var(--text-muted); font-size: 13px; background: #fff; }
.record.is-selected { background: #eff6ff; border-color: #bfdbfe; z-index: 2; position: relative; }

.asset-edit-form, .contract-edit-form, .job-edit-form {
  display: grid; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #f8fafc;
}
.asset-edit-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contract-edit-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-edit-form { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 0; padding-top: 16px; }
.asset-edit-form button, .contract-edit-form button, .job-edit-form button { grid-column: auto / span 2; width: 100%; }

.asset-photo-wrap { padding: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.asset-photo { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.asset-photo-empty { display: grid; place-items: center; min-height: 160px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-muted); text-align: center; }
.asset-photo-empty strong { display: block; font-size: 14px; color: var(--text-muted); }

input[type="file"] { padding: 4px; background: #fff; font-size: 12px; }

/* Custom appended elements */
.inventory-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.inventory-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.inventory-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.inventory-head strong { font-size: 15px; font-weight: 700; }
.inventory-head span { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.inventory-master-card { padding: 0; overflow: hidden; }
.inventory-toggle { width: 100%; display: grid; grid-template-columns: minmax(120px,1fr) auto auto; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.inventory-toggle:hover { background: var(--surface-muted); }
.inventory-toggle strong { font-size: 15px; font-weight: 700; color: var(--text-main); }
.inventory-toggle span { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.inventory-toggle b { justify-self: end; color: var(--accent); font-size: 12px; font-weight: 700; }
.inventory-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 12px 16px 0; }
.inventory-stat { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-muted); border: 1px solid var(--line); }
.inventory-stat span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.inventory-stat strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 700; line-height: 1; }
.inventory-master-card > .meta { padding: 0 16px 14px; }
.inventory-item-table { border-top: 1px solid var(--line); background: #fff; }
.inventory-item-head { color: #334155; font-size: 12px; font-weight: 800; background: #eef4fb; border-bottom: 1px solid #cbd5e1; }
.inventory-item-row { width: 100%; display: grid; grid-template-columns: minmax(160px, 1.1fr) minmax(260px, 1.8fr) repeat(4, minmax(90px, .35fr)); align-items: center; gap: 10px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.inventory-item-row:hover { background: #f8fafc; }
.inventory-item-row strong { font-size: 14px; color: var(--text-main); font-weight: 700; }
.inventory-item-row span { color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.inventory-item-row em { font-style: normal; font-size: 14px; font-weight: 800; color: var(--text-main); text-align: right; }
.inventory-item-row em.current { color: #15803d; }
.inventory-item-head span { text-align: right; }
.inventory-item-head span:first-child, .inventory-item-head span:nth-child(2) { text-align: left; }

.panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.panel-actions .ghost-button { min-height: 32px; padding: 0 12px; font-size: 12px; }

.client-columns { grid-template-columns: repeat(4, minmax(0,1fr)); }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.detail-actions .ghost-button { min-height: 32px; padding: 0 12px; font-size: 12px; }

.operation-form { grid-template-columns: repeat(4, minmax(0,1fr)); }
.operation-form button { grid-column: auto / span 2; }
.operation-board { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.operation-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.operation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.operation-head strong { display: block; font-size: 14px; font-weight: 600; }
.operation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.operation-field { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-muted); border: 1px solid var(--line); }
.operation-field span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 600; }
.operation-field strong { display: block; margin-top: 4px; font-size: 13px; }
.operation-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.operation-history { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.search-panel { margin-bottom: 20px; }
.search-controls { display: grid; grid-template-columns: minmax(260px,1fr) 150px 150px; gap: 10px; min-width: min(680px,100%); }
.search-results { display: grid; gap: -1px; }
.search-result { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); background: #fff; margin-bottom: 0; }
.search-result:first-child { border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); }
.search-result:last-child { border-bottom-left-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.search-result:hover { background: var(--surface-muted); z-index: 1; position: relative; }
.search-result strong { display: block; font-size: 13px; font-weight: 600; }

.job-item { display: grid; gap: 8px; }

/* MODALS */
.erp-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  width: 100%;
  max-width: 440px;
  margin: auto;
}
.erp-modal::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-main); }
.close-modal { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 0; line-height: 1; }
.close-modal:hover { color: var(--danger); }
.erp-modal form { padding: 20px; }
#modal-asset, #modal-job { max-width: 760px; }
#modal-event-detail { width: min(720px, calc(100vw - 32px)); max-width: 720px; }
.event-detail-field { display: grid; gap: 6px; }
.event-detail-field > span { display: flex; align-items: center; gap: 5px; color: #64748b; font-size: 12px; font-weight: 800; padding-left: 2px; }
.event-detail-field > strong { display: block; padding: 14px 16px; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 14px; color: #0f172a; font-weight: 600; line-height: 1.45; box-shadow: 0 2px 4px rgba(15,23,42,0.02); }
#modal-asset #assetForm, #modal-job #jobForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#modal-asset #assetForm input[name="note"], #modal-asset #assetForm .modal-actions { grid-column: 1 / -1; }
.asset-register-form label {
  display: grid; gap: 6px;
  color: #334155; font-size: 12px; font-weight: 700;
}
.asset-register-form label input,
.asset-register-form label select { width: 100%; }
.asset-register-form .full-field { grid-column: 1 / -1; }
.asset-register-form .modal-actions { grid-column: 1 / -1; }
.operation-register-form label {
  display: grid; gap: 6px;
  color: #334155; font-size: 12px; font-weight: 700;
}
.operation-register-form label input,
.operation-register-form label select { width: 100%; }
.operation-register-form .full-field { grid-column: 1 / -1; }
.operation-register-form .modal-actions { grid-column: 1 / -1; }
.file-input { border: 1px dashed var(--line-strong); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-muted); background: #f8fafc; cursor: pointer; width: 100%; box-sizing: border-box; }
.file-input:hover { background: #f1f5f9; border-color: #94a3b8; }
.operation-asset-picker-wrap {
  display: grid; gap: 8px;
  color: #334155; font-size: 12px; font-weight: 700;
}
.operation-asset-picker {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.asset-pick {
  min-height: 34px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text-main); font-size: 12px; font-weight: 600; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset-pick:hover { background: #f8fafc; border-color: #94a3b8; }
.asset-pick.is-selected { background: #eff6ff; border-color: var(--primary); color: #1d4ed8; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
}
.modal-actions button { min-width: 80px; }

/* CALENDAR — full viewport height */
#page-calendar.page-view.active {
  display: flex; flex-direction: column;
  height: calc(100vh - 56px);
  overflow: hidden;
}
#page-calendar #calendar {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; overflow: hidden;
}
.calendar-header { display: flex; align-items: center; gap: 12px; }
.calendar-header h2 { font-size: 18px; min-width: 120px; text-align: center; margin: 0; color: var(--text-main); font-weight: 700; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden;
}
#calBody.calendar-grid {
  flex: 1; min-height: 0;
  grid-auto-rows: 1fr;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.cal-head {
  background: #f8fafc; padding: 10px; text-align: center; font-weight: 600; font-size: 12px;
  color: var(--text-muted);
}
.cal-cell {
  background: #fff; min-height: 0; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  overflow: hidden;
}
.cal-cell.other-month { background: #fcfcfc; }
.cal-cell.other-month .cal-date { color: #cbd5e1; }
.cal-date { font-size: 12px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; align-self: flex-start; }
.cal-date.today { display: inline-block; background: var(--primary); color: #fff; border-radius: 4px; padding: 0 6px; }

.cal-event {
  font-size: 11px; padding: 4px 6px; border-radius: 4px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid transparent; transition: all 0.15s ease;
}
.cal-event:hover { opacity: 0.9; transform: translateY(-1px); }
.cal-event.type-job { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.cal-event.type-service { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.cal-event.type-schedule { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.cal-event.type-기타 { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.cal-event.type-휴가 { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.cal-event.type-외근 { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
.cal-event.type-회의 { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }

/* RESPONSIVE */
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .metrics, .today-board, .client-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-form { grid-template-columns: 1fr 1fr; }
  .operation-form button { grid-column: 1 / -1; }
  .job-edit-form { grid-template-columns: 1fr 1fr; }
  .job-edit-form button { grid-column: 1 / -1; }
}
@media (max-width: 992px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--sidebar-border); border-right: none; }
  .nav { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); width: 100%; gap: 4px; }
  .nav a { justify-content: center; }
  .sidebar-note { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .topbar { padding: 16px 20px; }
  .workspace > section, .workspace > .metrics, .workspace > .content-grid { padding: 16px 20px; margin: 0; }
  .search-controls { grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 1fr; }
  .search-result .mini-button { width: 100%; }
}
@media (max-width: 768px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; position: static; }
  .top-actions, .inline-form, .panel-actions, .detail-actions { width: 100%; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .top-actions button, .inline-form input, .inline-form select, .inline-form button, .panel-actions button, .detail-actions button { width: 100%; }
  .metrics, .today-board, .inventory-grid, .client-columns { grid-template-columns: 1fr; gap: 12px; }
  .record { grid-template-columns: 1fr; gap: 8px; }
  .record-actions { justify-content: flex-start; }
  .detail-head { flex-direction: column; }
  .detail-columns, .detail-grid { grid-template-columns: 1fr; }
  .asset-edit-form, .contract-edit-form, .operation-form, .operation-grid, .job-edit-form { grid-template-columns: 1fr; }
  .asset-edit-form button, .contract-edit-form button, .operation-actions button { grid-column: 1 / -1; width: 100%; }
  .operation-board { grid-template-columns: 1fr; }
}
.alert-panel{margin-bottom:18px;border-color:rgba(180,83,9,.24);background:linear-gradient(135deg,#fff,#fffaf0)}.alert-list{display:grid;gap:8px}.alert-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:12px 13px;border:1px solid rgba(203,213,225,.9);border-radius:12px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04)}.alert-item strong{display:block;line-height:1.35}.alert-item .pill{white-space:nowrap}.job-edit-form select[name="conditionStatus"]{border-color:rgba(180,83,9,.28);background:#fffaf0}@media(max-width:900px){.alert-item{grid-template-columns:1fr}.alert-item .mini-button{width:100%}}
.quick-card{display:grid;gap:6px;align-content:start;min-height:128px;padding:15px;border:1px solid rgba(203,213,225,.9);border-radius:12px;background:#fff;text-align:left;box-shadow:0 6px 18px rgba(15,23,42,.04);transition:transform .16s ease,box-shadow .16s ease,border .16s ease}.quick-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,23,42,.08);border-color:rgba(15,107,120,.35)}.quick-card span{color:var(--muted);font-size:13px;font-weight:800}.quick-card strong{font-size:30px;line-height:1}.quick-card small{color:var(--muted);line-height:1.35}.quick-hot{border-color:rgba(180,35,24,.25);background:#fff8f7}.quick-warn{border-color:rgba(146,64,14,.25);background:#fffaf0}.quick-danger{border-color:rgba(180,35,24,.35);background:#fff1f0}.quick-danger strong,.quick-hot strong{color:#b42318}.quick-warn strong{color:#92400e}
.schedule-form .form-label{font-size:12px;color:var(--muted);font-weight:800;margin-top:2px}.schedule-period-row{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:8px}.form-textarea{width:100%;padding:10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);font-size:13px;font-family:inherit;outline:none;resize:vertical}.form-textarea:focus{border-color:var(--primary-2);box-shadow:0 0 0 4px rgba(15,107,120,.12);background:#fff}@media(max-width:560px){.schedule-period-row{grid-template-columns:1fr}}
/* Calendar polish */
#page-calendar.page-view.active{height:calc(100vh - 34px);padding:18px;background:linear-gradient(180deg,#f8fafc,#eef2f7)}
#page-calendar #calendar{background:#fff!important;border:1px solid rgba(203,213,225,.9)!important;box-shadow:0 18px 46px rgba(15,23,42,.08)!important;border-radius:18px;padding:18px!important;overflow:hidden}
#page-calendar .panel-head{align-items:center!important;margin-bottom:16px!important;padding-bottom:12px!important;border-bottom:1px solid var(--line)!important}
.calendar-header{gap:10px}.calendar-header h2{min-width:150px;font-size:24px;font-weight:800;color:#111827}.calendar-header .mini-button{width:36px;min-width:36px;height:36px;border-radius:999px;font-size:18px;background:#f8fafc;color:#64748b}.calendar-header .mini-button:hover{background:#e2e8f0;color:#0f172a}.calendar-header .ghost-button{height:36px;border-radius:10px}
#page-calendar .primary-button{height:42px;border-radius:12px;font-size:14px;padding:0 18px}.calendar-grid{border:0!important;gap:0;background:#fff}.cal-head{height:40px;display:grid;place-items:center;background:#fff!important;color:#334155;font-size:13px;font-weight:800;border-bottom:1px solid #e5e7eb}.cal-head:first-child{color:#e11d48}.cal-head:last-child{color:#2563eb}
#calBody.calendar-grid{border:1px solid #e5e7eb!important;border-top:0!important;border-radius:0 0 16px 16px;overflow:hidden;background:#e5e7eb;gap:1px}.cal-cell{position:relative;min-height:126px;padding:10px;background:#fff;border:0!important;transition:background .15s ease}.cal-cell:hover{background:#f8fafc}.cal-cell.other-month{background:#fbfdff}.cal-cell.other-month .cal-date{color:#cbd5e1}.cal-date{display:grid;place-items:center;width:30px;height:30px;border-radius:999px;margin-bottom:8px;font-size:13px;font-weight:800;color:#1f2937}.cal-date.today{background:#111827!important;color:#fff!important;padding:0;box-shadow:0 6px 16px rgba(17,24,39,.18)}.cal-cell:nth-child(7n+1) .cal-date{color:#e11d48}.cal-cell:nth-child(7n) .cal-date{color:#2563eb}.cal-cell:nth-child(7n+1) .cal-date.today,.cal-cell:nth-child(7n) .cal-date.today{color:#fff}
.cal-event{min-height:24px;padding:5px 7px;border-radius:8px;font-size:12px;font-weight:700;border:1px solid transparent;box-shadow:0 2px 8px rgba(15,23,42,.04)}.cal-event.type-업무{background:#e0f2fe;color:#075985;border-color:#bae6fd}.cal-event.type-휴가{background:#dcfce7;color:#166534;border-color:#bbf7d0}.cal-event.type-기타{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
#modal-schedule.erp-modal,.schedule-modal{width:min(560px,calc(100vw - 28px));border-radius:18px}.schedule-modal .modal-header{padding:22px 24px}.schedule-modal .modal-header h3{font-size:20px}.schedule-modal form{padding:24px}.schedule-form{gap:14px}.schedule-form input,.schedule-form select{min-height:48px;border-radius:12px;font-size:15px;padding:12px 14px}.schedule-form .form-label{font-size:13px;margin-top:4px}.schedule-period-row{grid-template-columns:minmax(0,1fr) 150px;gap:10px}.schedule-form .form-textarea{min-height:170px;font-size:15px;line-height:1.55;border-radius:12px;padding:14px}.schedule-form .modal-actions{margin-top:18px}.schedule-form .modal-actions button{min-height:44px;border-radius:12px;font-size:14px}
@media(max-width:760px){.cal-cell{min-height:98px;padding:8px}.calendar-header h2{font-size:20px;min-width:120px}.schedule-period-row{grid-template-columns:1fr}}
/* Schedule modal wide refinement */
#modal-schedule.erp-modal,
.schedule-modal{
  width:min(860px,calc(100vw - 32px));
  border-radius:16px;
}
.schedule-modal .modal-header{
  padding:18px 22px;
}
.schedule-modal .modal-header h3{
  font-size:17px;
  letter-spacing:0;
}
.schedule-modal form{
  padding:20px 22px 22px;
}
.schedule-form{
  display:grid;
  grid-template-columns:minmax(170px,.36fr) minmax(0,1fr);
  gap:11px 12px;
}
.schedule-form > input[type="hidden"]{
  display:none;
}
.schedule-form select[name="type"]{
  grid-column:1 / 2;
  max-width:190px;
}
.schedule-form input[name="title"],
.schedule-form .form-label,
.schedule-form .schedule-period-row,
.schedule-form input[name="place"],
.schedule-form textarea[name="memo"],
.schedule-form .modal-actions{
  grid-column:1 / -1;
}
.schedule-form input,
.schedule-form select,
.schedule-form textarea{
  font-size:14px;
}
.schedule-form input,
.schedule-form select{
  min-height:42px;
  border-radius:8px;
  padding:9px 12px;
}
.schedule-form .form-label{
  margin:2px 0 -3px;
  font-size:12px;
  font-weight:800;
  color:#64748b;
}
.schedule-period-row{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 160px;
  gap:8px;
}
.schedule-period-row input[type="date"],
.schedule-time-select{
  height:42px;
  background:#fff;
  border:1px solid #d8dee8;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.schedule-period-row input[type="date"]:focus,
.schedule-time-select:focus{
  border-color:#1677ff;
  box-shadow:0 0 0 3px rgba(22,119,255,.14);
}
.schedule-time-select{
  appearance:auto;
  cursor:pointer;
}
.schedule-form .form-textarea{
  min-height:210px;
  border-radius:9px;
  padding:12px 13px;
  line-height:1.5;
  resize:vertical;
}
.schedule-form .modal-actions{
  margin-top:8px;
}
.schedule-form .modal-actions button{
  min-height:40px;
  border-radius:9px;
  font-size:13px;
}
@media(max-width:720px){
  #modal-schedule.erp-modal,
  .schedule-modal{width:min(96vw,calc(100vw - 16px));}
  .schedule-form{grid-template-columns:1fr;}
  .schedule-form select[name="type"]{max-width:none;}
  .schedule-period-row{grid-template-columns:1fr;}
}

/* Schedule modal compact screenshot size */
#modal-schedule.erp-modal,
.schedule-modal{
  width:min(440px,calc(100vw - 32px));
  max-width:min(440px,calc(100vw - 32px));
  overflow-x:hidden;
}
.schedule-modal *{
  box-sizing:border-box;
}
.schedule-modal form{
  overflow-x:hidden;
  padding:20px 22px 22px;
}
.schedule-form{
  display:grid;
  grid-template-columns:1fr;
  gap:11px;
}
.schedule-form select[name="type"]{
  width:170px;
  max-width:100%;
}
.schedule-form input,
.schedule-form select{
  width:100%;
  min-width:0;
  min-height:42px;
  font-size:14px;
  border-radius:8px;
  padding:9px 12px;
}
.schedule-period-row{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 150px;
  gap:8px;
}
.schedule-time-select{
  min-width:0;
}
.schedule-form .form-textarea{
  width:100%;
  min-width:0;
  min-height:210px;
  font-size:14px;
  border-radius:9px;
}
.schedule-form .modal-actions{
  border-top:1px solid #e2e8f0;
  padding-top:16px;
  margin-top:8px;
}
@media(max-width:520px){
  #modal-schedule.erp-modal,
  .schedule-modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);}
  .schedule-period-row{grid-template-columns:1fr;}
}

/* Schedule modal large wide size */
#modal-schedule.erp-modal,
.schedule-modal{
  width:min(720px,calc(100vw - 48px));
  max-width:min(720px,calc(100vw - 48px));
  overflow-x:hidden;
}
.schedule-modal .modal-header{
  padding:22px 26px;
}
.schedule-modal form{
  padding:24px 26px 26px;
  overflow-x:hidden;
}
.schedule-form{
  display:grid;
  grid-template-columns:1fr;
  gap:13px;
}
.schedule-form select[name="type"]{
  width:190px;
  max-width:100%;
}
.schedule-form input,
.schedule-form select{
  width:100%;
  min-width:0;
  min-height:44px;
  font-size:14px;
  border-radius:9px;
  padding:10px 13px;
}
.schedule-period-row{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 180px;
  gap:10px;
}
.schedule-form .form-textarea{
  width:100%;
  min-width:0;
  min-height:260px;
  font-size:14px;
  border-radius:10px;
  padding:13px 14px;
}
.schedule-form .modal-actions{
  margin-top:10px;
  padding-top:16px;
  border-top:1px solid #e2e8f0;
}
@media(max-width:760px){
  #modal-schedule.erp-modal,
  .schedule-modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);}
  .schedule-period-row{grid-template-columns:1fr;}
}

/* Schedule start end calendar colors */
.cal-event.schedule-start{
  background:#dbeafe!important;
  color:#1d4ed8!important;
  border-color:#93c5fd!important;
}
.cal-event.schedule-end{
  background:#fee2e2!important;
  color:#b91c1c!important;
  border-color:#fecaca!important;
}
.cal-event.schedule-single{
  background:linear-gradient(90deg,#dbeafe 0%,#dbeafe 50%,#fee2e2 50%,#fee2e2 100%)!important;
  color:#1f2937!important;
  border-color:#cbd5e1!important;
}

/* Delete confirm modal */
.confirm-modal{
  width:min(420px,calc(100vw - 32px));
  border-radius:16px;
}
.confirm-body{
  padding:20px 24px 10px;
  display:grid;
  gap:8px;
}
.confirm-body p{
  margin:0;
  font-size:15px;
  font-weight:800;
  color:#111827;
  line-height:1.45;
  white-space:pre-line;
}
.confirm-actions{
  padding:16px 24px 22px;
  border-top:1px solid #e5e7eb;
}
.danger-action{
  background:#dc2626!important;
  border-color:#dc2626!important;
}
.danger-action:hover{
  background:#b91c1c!important;
}

/* Calendar today marker refinement */
.cal-date.today{
  width:26px!important;
  height:26px!important;
  border-radius:50%!important;
  background:#2563eb!important;
  color:#fff!important;
  display:inline-grid!important;
  place-items:center!important;
  padding:0!important;
  box-shadow:0 4px 10px rgba(37,99,235,.24)!important;
  font-size:12px!important;
  font-weight:800!important;
}
.cal-cell:nth-child(7n+1) .cal-date.today,
.cal-cell:nth-child(7n) .cal-date.today{
  color:#fff!important;
}
.cal-cell:has(.cal-date.today){
  background:#f8fbff!important;
}

/* Client intake professional form */
.intake-modal{width:min(860px,calc(100vw - 40px));max-width:min(860px,calc(100vw - 40px));}
.intake-modal .modal-header{padding:20px 24px;}
.modal-eyebrow{margin:0 0 4px;font-size:11px;font-weight:800;color:#2563eb;letter-spacing:.08em;}
.intake-form{padding:22px 24px 24px!important;gap:16px;}
.form-section{border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden;}
.form-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:14px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;}
.form-section-head strong{font-size:14px;color:#111827;}
.form-section-head span{font-size:12px;color:#64748b;}
.form-grid{display:grid;gap:12px;padding:16px;}
.form-grid.two-cols{grid-template-columns:repeat(2,minmax(0,1fr));}
.intake-form label{display:grid;gap:7px;font-size:12px;font-weight:800;color:#475569;}
.intake-form input,.intake-form textarea{width:100%;min-width:0;border:1px solid #cbd5e1;border-radius:9px;padding:11px 12px;font:inherit;font-size:14px;color:#0f172a;background:#fff;outline:none;}
.intake-form textarea{min-height:128px;resize:vertical;line-height:1.5;}
.intake-form input:focus,.intake-form textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12);}
.full-field{padding:16px;}
.client-intake-grid{border-top:0;}
.client-detail .detail-section:last-child{border-top:1px solid var(--line);}
@media(max-width:760px){.intake-modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);}.form-grid.two-cols{grid-template-columns:1fr;}.form-section-head{align-items:flex-start;flex-direction:column;}}

/* Client intake ERP flat form */
.intake-form{
  gap:0;
  background:#fff;
}
.intake-form .form-section{
  border:0;
  border-radius:0;
  background:transparent;
  overflow:visible;
  border-bottom:1px solid #d8dee8;
}
.intake-form .form-section:first-of-type{
  border-top:1px solid #d8dee8;
}
.intake-form .form-section-head{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  align-items:center;
  padding:12px 14px;
  background:#f3f6fa;
  border-bottom:1px solid #d8dee8;
}
.intake-form .form-section-head strong{
  font-size:13px;
  color:#111827;
}
.intake-form .form-section-head span{
  font-size:12px;
  color:#64748b;
}
.intake-form .form-grid,
.intake-form .full-field{
  padding:14px;
  background:#fff;
}
.intake-form label{
  gap:6px;
}
.intake-form input,
.intake-form textarea{
  border-radius:4px;
  background:#fff;
}

/* Client row toggle and edit */
.record.client-row{cursor:pointer;}
.record.client-row:hover{border-color:#93c5fd;background:#f8fbff;}
.record.client-row.is-selected{border-color:#60a5fa;background:#eff6ff;}
.record.client-row .record-actions{cursor:default;}

/* Client search and filters */
.client-filterbar{
  display:grid;
  grid-template-columns:minmax(280px,1fr) 150px 160px 130px auto;
  gap:8px;
  align-items:center;
  padding:12px;
  margin-bottom:10px;
  border:1px solid var(--line);
  background:#f8fafc;
}
.client-filterbar input,
.client-filterbar select{
  width:100%;
  min-height:36px;
  border:1px solid var(--line-strong);
  border-radius:4px;
  padding:8px 10px;
  font:inherit;
  font-size:13px;
  background:#fff;
  outline:none;
}
.client-filterbar input:focus,
.client-filterbar select:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.12);
}
.client-result-meta{
  margin:0 0 8px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  text-align:right;
}
@media(max-width:980px){
  .client-filterbar{grid-template-columns:1fr 1fr;}
  .client-filterbar input{grid-column:1 / -1;}
}
@media(max-width:560px){
  .client-filterbar{grid-template-columns:1fr;}
}

/* Client explicit search button */
.client-search-box{
  display:grid;
  grid-template-columns:minmax(0,1fr) 38px;
  min-width:0;
}
.client-search-box input{
  border-top-right-radius:0!important;
  border-bottom-right-radius:0!important;
}
.client-search-box .icon-button{
  min-height:36px;
  border:1px solid var(--line-strong);
  border-left:0;
  border-radius:0 4px 4px 0;
  background:#fff;
  color:#0f172a;
  font-size:18px;
  font-weight:800;
  cursor:pointer;
}
.client-search-box .icon-button:hover{
  background:#eff6ff;
  color:#2563eb;
}
@media(max-width:980px){.client-search-box{grid-column:1 / -1;}}

/* Client detail simplified rental items */
.client-main-grid{
  grid-template-columns:1.4fr repeat(4,minmax(0,1fr));
}
.client-detail .rental-items-section{
  border-top:1px solid var(--line);
}
.client-detail .rental-items-section .timeline-item{
  border-left:2px solid #93c5fd;
  background:#f8fafc;
}
@media(max-width:1080px){.client-main-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:640px){.client-main-grid{grid-template-columns:1fr;}}

















/* Operation multi-item registration */
#modal-job.operation-modal { width: min(980px, calc(100vw - 32px)); max-width: min(980px, calc(100vw - 32px)); }
#modal-job #jobForm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.operation-register-form input[type="hidden"] { display: none; }
.operation-register-form label { align-content: start; }
.operation-register-form label input,
.operation-register-form label select { min-height: 42px; border-radius: 6px; }
.operation-register-form .picker-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.operation-register-form .picker-head strong { font-size: 15px; color: var(--text-main); }
.operation-register-form .picker-head span { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.operation-selected-items { display: grid; gap: 8px; min-height: 86px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.operation-empty { min-height: 58px; display: grid; place-items: center; border-style: dashed; background: #fff; }
.selected-job-item { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.selected-job-info strong { display: block; font-size: 14px; font-weight: 800; color: var(--text-main); }
.selected-job-info span { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.selected-job-item input { width: 92px; min-height: 36px; text-align: right; font-weight: 800; }
.danger-mini { color: #dc2626; border-color: #fecaca; background: #fff; }
.operation-asset-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 320px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.asset-pick { display: grid; gap: 4px; min-height: 86px; padding: 12px; white-space: normal; }
.asset-pick strong { font-size: 14px; font-weight: 800; color: var(--text-main); }
.asset-pick span { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.asset-pick em { font-style: normal; font-size: 12px; font-weight: 800; color: #15803d; }
.operation-job-row { gap: 12px; }
.operation-job-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operation-job-head strong { font-size: 15px; font-weight: 800; }
.operation-job-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.operation-job-field { min-height: 68px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.operation-job-field:nth-child(4n) { border-right: 0; }
.operation-job-field:nth-last-child(-n+3) { border-bottom: 0; }
.operation-job-field:last-child { grid-column: span 2; }
.operation-job-field span { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 11px; font-weight: 800; }
.operation-job-field strong { display: block; color: var(--text-main); font-size: 13px; font-weight: 800; line-height: 1.45; word-break: keep-all; }
@media(max-width:900px){
  #modal-job #jobForm { grid-template-columns: 1fr; }
  .operation-asset-picker { grid-template-columns: 1fr; }
  .selected-job-item { grid-template-columns: 1fr 80px auto; }
  .operation-job-grid { grid-template-columns: 1fr 1fr; }
  .operation-job-field:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .operation-job-field:nth-child(2n) { border-right: 0; }
  .operation-job-field:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

/* Operation item blank table + search dialog */
.operation-item-label { height: 34px; display: grid; place-items: center; border: 1px solid #d7dde6; border-bottom: 0; background: #f8fafc; color: #111827; font-size: 13px; font-weight: 800; }
.operation-item-blank { width: 100%; min-height: 164px; padding: 0; border: 1px solid #d7dde6; background: #fff; text-align: left; cursor: pointer; }
.operation-item-blank:hover { outline: 2px solid rgba(37,99,235,.14); outline-offset: -2px; }
.operation-selected-items { display: grid; gap: 0; min-height: 164px; padding: 0; border: 0; border-radius: 0; background: #fff; }
.operation-blank-row { min-height: 40px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid #d7dde6; color: #94a3b8; font-size: 12px; font-weight: 700; }
.operation-blank-row:last-child { border-bottom: 0; }
.selected-job-item { min-height: 40px; display: grid; grid-template-columns: 92px minmax(0,1fr) 76px 58px; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-bottom: 1px solid #d7dde6; border-radius: 0; background: #fff; }
.selected-job-item:last-child { border-bottom: 0; }
.selected-job-item .item-code { color: #0b4db3; font-size: 13px; font-weight: 800; }
.selected-job-item strong { min-width: 0; color: #0b3b91; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-job-item input { width: 76px; min-height: 30px; text-align: right; font-weight: 800; }
.item-search-modal { width: min(760px, calc(100vw - 28px)); max-width: min(760px, calc(100vw - 28px)); }
.item-search-modal .modal-header h3 { font-size: 18px; font-weight: 900; }
.item-search-toolbar { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.item-search-toolbar input { width: 240px; min-height: 34px; border: 1px solid #cbd5e1; border-radius: 5px; padding: 0 10px; }
.item-search-toolbar .primary-button { min-height: 34px; padding: 0 16px; border-radius: 5px; }
.item-search-table { max-height: 440px; overflow: auto; border-top: 1px solid #d7dde6; border-bottom: 1px solid #d7dde6; background: #fff; }
.item-search-row { width: 100%; min-height: 31px; display: grid; grid-template-columns: 54px 88px minmax(0,1fr); align-items: center; border: 0; border-bottom: 1px solid #d7dde6; background: #fff; color: #003b91; text-align: left; }
.item-search-row span, .item-search-row strong { padding: 0 8px; min-height: 31px; display: flex; align-items: center; border-right: 1px solid #d7dde6; font-size: 13px; font-weight: 700; }
.item-search-row strong { border-right: 0; color: #003b91; font-weight: 700; }
.item-search-head { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #0f172a; font-weight: 900; }
.item-search-head span { color: #0f172a; font-weight: 900; }
.item-search-row:not(.item-search-head):hover { background: #eef6ff; }
.item-search-row.is-selected span, .item-search-row.is-selected strong { background: #1d4ed8; color: #fff; }
@media(max-width:760px){
  .selected-job-item { grid-template-columns: 76px minmax(0,1fr) 64px 50px; }
  .item-search-toolbar { justify-content: stretch; }
  .item-search-toolbar input { flex: 1; width: auto; }
}

/* Item search table polish */
.item-search-modal { width: min(780px, calc(100vw - 32px)); border-radius: 10px; overflow: hidden; }
.item-search-modal .modal-header { min-height: 58px; padding: 0 22px; border-bottom: 1px solid #dbe3ee; background: #f8fafc; }
.item-search-modal .modal-header h3 { font-size: 20px; font-weight: 900; color: #111827; }
.item-search-toolbar { height: 60px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 12px; border-bottom: 1px solid #d7dde6; background: #fff; }
.item-search-toolbar input { width: 240px; height: 36px; min-height: 36px; border: 1px solid #bfcbd9; border-radius: 6px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.item-search-toolbar .primary-button { height: 36px; min-height: 36px; padding: 0 16px; border-radius: 6px; font-size: 13px; font-weight: 800; }
.item-search-table { height: 210px; max-height: 48vh; overflow: auto; border: 0; background: #fff; }
.item-search-row { width: 100%; min-height: 34px; display: grid; grid-template-columns: 56px 92px minmax(0,1fr); align-items: stretch; border: 0; border-bottom: 1px solid #d7dde6; background: #fff; color: #06499f; text-align: left; padding: 0; box-sizing: border-box; }
button.item-search-row { cursor: pointer; }
.item-search-row span,
.item-search-row strong { min-width: 0; min-height: 34px; display: flex; align-items: center; padding: 0 10px; border-right: 1px solid #d7dde6; box-sizing: border-box; font-size: 13px; font-weight: 800; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-search-row strong { border-right: 0; color: #06499f; font-weight: 800; }
.item-search-head { position: sticky; top: 0; z-index: 2; min-height: 34px; background: #f1f5f9; border-top: 0; box-shadow: inset 0 -1px 0 #cbd5e1; }
.item-search-head span { color: #0f172a; font-size: 13px; font-weight: 900; }
.item-search-row:not(.item-search-head):hover span,
.item-search-row:not(.item-search-head):hover strong { background: #f0f7ff; }
.item-search-row.is-selected span,
.item-search-row.is-selected strong { background: #1d4ed8; color: #fff; }
.item-search-modal .modal-actions { height: 74px; align-items: center; margin-top: 0; padding: 0 14px; border-top: 1px solid #d7dde6; background: #fff; }
.item-search-modal .modal-actions button { height: 38px; min-width: 88px; border-radius: 6px; }
.operation-register-form { align-items: start; }
.operation-register-form label { min-height: 70px; }
.operation-register-form label.full-field { min-height: 70px; }
.operation-register-form label input { height: 42px; }
.operation-item-label { height: 36px; border-color: #d7dde6; background: #f6f8fb; font-size: 13px; }
.operation-item-blank { min-height: 176px; border-color: #d7dde6; }
.operation-blank-row { min-height: 42px; }
@media(max-width:760px){
  .item-search-modal { width: calc(100vw - 18px); }
  .item-search-toolbar { justify-content: stretch; }
  .item-search-toolbar input { flex: 1; width: auto; }
  .item-search-row { grid-template-columns: 48px 82px minmax(0,1fr); }
}

/* Modern item search refinement */
#modal-job #jobForm { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 10px; }
.operation-register-form label { min-height: 64px; }
.operation-register-form label input { height: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-register-form label input[name="clientAddress"] { text-overflow: ellipsis; }
.item-search-modal { width: min(760px, calc(100vw - 28px)); border: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.20); }
.item-search-modal::backdrop { background: rgba(15,23,42,.34); backdrop-filter: blur(2px); }
.item-search-modal .modal-header { min-height: 60px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid #e5e7eb; background: #fff; }
.item-search-modal .modal-header h3 { font-size: 20px; font-weight: 900; letter-spacing: 0; }
.item-search-toolbar { height: 62px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 14px; border-bottom: 1px solid #eef2f7; background: #fbfdff; }
.item-search-toolbar input { width: 250px; height: 38px; min-height: 38px; border: 1px solid #ccd6e4; border-radius: 8px; background: #fff; padding: 0 13px; font-size: 13px; font-weight: 700; color: #0f172a; box-shadow: inset 0 1px 2px rgba(15,23,42,.03); }
.item-search-toolbar input:focus { outline: 2px solid rgba(37,99,235,.16); border-color: #2563eb; }
.item-search-toolbar .primary-button { height: 38px; min-height: 38px; border-radius: 8px; padding: 0 18px; font-size: 13px; font-weight: 900; }
.item-search-table { height: 246px; max-height: 50vh; overflow: auto; padding: 8px 10px 10px; border: 0; background: #f8fafc; }
.item-search-row { width: 100%; min-height: 44px; display: grid; grid-template-columns: 48px 108px minmax(0,1fr); align-items: center; gap: 0; margin: 0 0 6px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: #fff; color: #0f172a; text-align: left; box-sizing: border-box; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.item-search-row span,
.item-search-row strong { min-width: 0; min-height: 42px; display: flex; align-items: center; padding: 0 12px; border: 0!important; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-search-row span { color: #475569; font-size: 13px; font-weight: 800; }
.item-search-row strong { color: #0f3f8c; font-size: 13px; font-weight: 900; }
.item-search-head { position: sticky; top: -8px; z-index: 3; min-height: 40px; margin-bottom: 8px; border: 0; border-radius: 10px; background: #eaf1f9; box-shadow: none; }
.item-search-head span { min-height: 40px; color: #334155; font-size: 12px; font-weight: 900; }
.item-search-head strong { color: #334155; font-size: 12px; font-weight: 900; }
.item-search-row .item-check { justify-content: center; padding: 0; }
.item-search-row .item-check::before { content: ""; width: 18px; height: 18px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-shadow: inset 0 1px 1px rgba(15,23,42,.04); }
.item-search-row.is-selected .item-check { color: transparent; }
.item-search-row.is-selected .item-check::before { content: "✓"; display: grid; place-items: center; border-color: #2563eb; background: #2563eb; color: #fff; font-size: 13px; font-weight: 900; }
.item-search-row:not(.item-search-head):hover { border-color: #bfdbfe; background: #f8fbff; transform: translateY(-1px); }
.item-search-row:not(.item-search-head):hover span,
.item-search-row:not(.item-search-head):hover strong { background: transparent; }
.item-search-row.is-selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 6px 18px rgba(37,99,235,.12); }
.item-search-row.is-selected span,
.item-search-row.is-selected strong { background: transparent; color: #0f3f8c; }
.item-search-modal .modal-actions { height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; padding: 0 14px; border-top: 1px solid #e5e7eb; background: #fff; }
.item-search-modal .modal-actions button { height: 40px; min-width: 88px; border-radius: 8px; font-weight: 800; }
@media(max-width:760px){
  .item-search-row { grid-template-columns: 42px 92px minmax(0,1fr); }
  .item-search-toolbar input { width: auto; flex: 1; }
}

/* Item search pagination */
.item-search-actions { justify-content: flex-end; }
.item-search-pager { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; }
.item-search-pager .ghost-button { height: 34px; min-width: 58px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.item-search-pager .ghost-button:disabled { opacity: .42; cursor: not-allowed; background: #f8fafc; }
#itemPageInfo { min-width: 54px; text-align: center; color: #475569; font-size: 12px; font-weight: 900; }
.item-search-empty { height: 164px; display: grid; place-items: center; color: #94a3b8; font-size: 13px; font-weight: 800; }

/* Schedule attachments */
#scheduleAttachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
#scheduleAttachments.is-empty {
  color: #94a3b8;
}
.attachment-chip {
  max-width: 210px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.attachment-chip:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #60a5fa;
}
.attachment-chip:disabled {
  cursor: default;
  opacity: .7;
}

/* Schedule attachment picker and preview */
.schedule-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.schedule-file-row .form-label {
  margin: 0;
}
.file-pick-button {
  position: relative;
  display: inline-grid!important;
  place-items: center;
  min-width: 92px;
  height: 34px;
  min-height: 34px!important;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155!important;
  font-size: 12px!important;
  font-weight: 900!important;
  cursor: pointer;
}
.file-pick-button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.file-pick-button .file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
}
.attachment-item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  overflow: hidden;
}
.attachment-item .attachment-chip {
  border: 0;
  border-radius: 0;
  background: transparent;
  max-width: 190px;
}
.attachment-download {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.attachment-download:hover:not(:disabled) {
  background: #bfdbfe;
}
.file-preview-modal {
  width: min(860px, calc(100vw - 28px));
  max-width: min(860px, calc(100vw - 28px));
  border-radius: 16px;
  overflow: hidden;
}
.file-preview-body {
  min-height: 360px;
  max-height: 70vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #f8fafc;
  overflow: auto;
}
.file-preview-body img {
  max-width: 100%;
  max-height: 66vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(15,23,42,.16);
  background: #fff;
}
.file-preview-body iframe {
  width: 100%;
  height: 66vh;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.file-preview-empty {
  display: grid;
  gap: 8px;
  text-align: center;
  color: #64748b;
}
.file-preview-empty strong {
  color: #0f172a;
  font-size: 16px;
}

/* File preview zoom and spacing refinement */
.file-preview-modal {
  width: min(900px, calc(100vw - 36px));
  max-width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}
.file-preview-modal .modal-header {
  padding: 18px 24px;
}
.file-preview-modal .modal-actions {
  min-height: 78px;
  margin: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  box-sizing: border-box;
}
.file-preview-modal .modal-actions button {
  min-width: 92px;
  min-height: 42px;
  border-radius: 9px;
}
.file-preview-body {
  min-height: 430px;
  max-height: calc(100vh - 190px);
  padding: 24px 28px 28px;
  overflow: hidden;
}
.zoom-stage {
  position: relative;
  width: 100%;
  height: min(68vh, 620px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #eef2f7;
  cursor: grab;
  touch-action: none;
}
.zoom-stage.is-dragging {
  cursor: grabbing;
}
.zoomable-image {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(15,23,42,.18);
  background: #fff;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}
.zoom-hint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}
.file-preview-body > img {
  max-width: 92%;
  max-height: 92%;
}
@media(max-width:760px){
  .file-preview-body { min-height: 340px; padding: 14px; }
  .zoom-stage { height: 58vh; }
  .zoom-hint { font-size: 11px; }
}

/* Job detail item lines */
.event-detail-items > .job-item-lines {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.job-item-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.job-item-line strong {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-item-line span {
  min-width: 52px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.job-item-line.is-empty {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

/* Compact job detail item lines */
.event-detail-items > .job-item-lines {
  display: grid;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.job-item-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
}
.job-item-line:last-child {
  border-bottom: 0;
}
.job-item-line strong {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}
.job-item-line span {
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.event-detail-items > span {
  margin-bottom: 2px;
}
/* Operation preview rows */
.operation-preview-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(210px, .9fr) minmax(260px, 1.35fr) minmax(110px, .55fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 16px 18px;
  border-bottom: 1px solid #d9e2ef;
  background: #fff;
  cursor: pointer;
  transition: background .14s ease, box-shadow .14s ease;
}
.operation-preview-row:hover,
.operation-preview-row:focus-visible {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #2563eb;
  outline: 0;
}
.operation-preview-main,
.operation-preview-dates,
.operation-preview-items,
.operation-preview-status {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.operation-preview-main strong,
.operation-preview-items strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operation-preview-main span,
.operation-preview-dates span,
.operation-preview-items span,
.operation-preview-status small {
  min-width: 0;
  color: #536579;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operation-preview-dates span {
  color: #1f3f68;
}
.operation-preview-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  min-width: 184px;
}
.primary-mini {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
}
.primary-mini:disabled {
  border-color: #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  cursor: default;
}
@media (max-width: 1180px) {
  .operation-preview-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr) minmax(220px, 1fr);
  }
  .operation-preview-status,
  .operation-preview-actions {
    grid-column: span 1;
  }
}
@media (max-width: 820px) {
  .operation-preview-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .operation-preview-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}
/* Operation status filters */
.operation-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.operation-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.operation-filter-btn {
  height: 34px;
  min-width: 92px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.operation-filter-btn span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 12px;
}
.operation-filter-btn.is-active {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 5px 12px rgba(37,99,235,.18);
}
.operation-filter-btn.is-active span {
  background: rgba(255,255,255,.2);
  color: #fff;
}
@media (max-width: 760px) {
  .operation-head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .operation-filter-tabs,
  .operation-head-actions > .primary-button {
    width: 100%;
  }
  .operation-filter-btn {
    flex: 1;
  }
}
/* Asset movement history */
.asset-movement-history {
  border-top: 1px solid var(--line);
  background: #fff;
}
.asset-movement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.asset-movement-stat {
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #fff;
}
.asset-movement-stat span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.asset-movement-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
}
.asset-movement-section {
  padding: 16px 20px 20px;
  border-bottom: 1px solid var(--line);
}
.asset-movement-section:last-child {
  border-bottom: 0;
}
.asset-movement-section h3 {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}
.asset-movement-table {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.asset-movement-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(220px, 1.55fr) minmax(100px, .65fr) minmax(100px, .65fr) minmax(70px, .45fr) minmax(90px, .55fr) 64px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.asset-movement-row:last-child {
  border-bottom: 0;
}
.asset-movement-head {
  min-height: 36px;
  background: #eef4fb;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.asset-movement-row > span,
.asset-movement-row > strong,
.asset-link-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-movement-row > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.asset-movement-row > strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}
.asset-link-button {
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.asset-link-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.asset-movement-empty {
  padding: 20px 12px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: #f8fafc;
}
@media (max-width: 980px) {
  .asset-movement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-movement-row { grid-template-columns: minmax(130px, 1fr) minmax(90px, .65fr) minmax(90px, .65fr) minmax(70px, .45fr); }
  .asset-movement-row > span:nth-child(2),
  .asset-movement-row > span:nth-child(6),
  .asset-movement-row > button:last-child,
  .asset-movement-head span:nth-child(2),
  .asset-movement-head span:nth-child(6),
  .asset-movement-head span:nth-child(7) { display: none; }
}
/* Compact client detail */
.compact-client-head {
  padding: 16px 20px;
}
.compact-client-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.client-delivery-section {
  padding: 16px 20px 20px;
  background: #fff;
}
.client-delivery-section h3 {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}
.client-delivery-box {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
}
@media (max-width: 980px) {
  .compact-client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .compact-client-grid { grid-template-columns: 1fr; }
}
/* Modal button alignment fix */
.modal-actions button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}
#btnEditJobDetail {
  min-width: 80px;
}
/* ERP visibility pass: operations table */
#operations.panel {
  padding: 16px;
}
#operations .panel-head.compact {
  align-items: center;
  margin: -16px -16px 0;
  padding: 14px 16px;
  border-bottom: 2px solid #b8c4d4;
  background: #f8fafc;
}
#operations .panel-head h2 {
  font-size: 17px;
  font-weight: 900;
}
#jobList.operation-table {
  display: block;
  border: 1px solid #b8c4d4;
  border-top: 0;
  background: #fff;
  overflow-x: auto;
}
.operation-table-head,
.operation-table-row {
  min-width: 1040px;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(150px, .75fr) minmax(300px, 1.55fr) minmax(120px, .55fr) 230px;
  align-items: center;
  gap: 0;
}
.operation-table-head {
  min-height: 42px;
  border-top: 1px solid #b8c4d4;
  border-bottom: 1px solid #94a3b8;
  background: #e8eef6;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 900;
}
.operation-table-head span {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid #c7d1df;
}
.operation-table-head span:last-child {
  border-right: 0;
  justify-content: center;
}
.operation-preview-row.operation-table-row {
  min-height: 58px;
  padding: 0;
  border-bottom: 1px solid #d8e0ea;
  background: #fff;
  box-shadow: none;
}
.operation-preview-row.operation-table-row:hover,
.operation-preview-row.operation-table-row:focus-visible {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
.operation-table-row > div {
  min-height: 58px;
  height: 100%;
  padding: 9px 14px;
  border-right: 1px solid #e2e8f0;
}
.operation-table-row > div:last-child {
  border-right: 0;
}
.operation-table-row .operation-preview-main,
.operation-table-row .operation-preview-dates,
.operation-table-row .operation-preview-items,
.operation-table-row .operation-preview-status {
  gap: 2px;
  align-content: center;
}
.operation-table-row .operation-preview-main strong,
.operation-table-row .operation-preview-items strong {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}
.operation-table-row .operation-preview-main span,
.operation-table-row .operation-preview-dates span,
.operation-table-row .operation-preview-items span,
.operation-table-row .operation-preview-status small {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.operation-table-row .operation-preview-dates span:first-child {
  color: #1d4ed8;
  font-weight: 900;
}
.operation-table-row .operation-preview-dates span:last-child {
  color: #b91c1c;
  font-weight: 900;
}
.operation-table-row .operation-preview-status {
  justify-items: center;
}
.operation-table-row .operation-preview-status .pill {
  min-width: 92px;
  justify-content: center;
  text-align: center;
  font-weight: 900;
}
.operation-table-row .operation-preview-actions {
  min-width: 0;
  justify-content: center;
  gap: 6px;
}
.operation-table-row .mini-button {
  height: 30px;
  min-width: 54px;
  padding: 0 10px;
  font-weight: 800;
}
.operation-table-row .delete-button {
  min-width: 48px;
}
@media (max-width: 820px) {
  #jobList.operation-table {
    border-top: 1px solid #b8c4d4;
  }
  .operation-table-head {
    display: none;
  }
  .operation-table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  .operation-table-row > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .operation-table-row > div:last-child {
    border-bottom: 0;
  }
  .operation-table-row .operation-preview-actions {
    justify-content: flex-start;
  }
}
/* ERP visibility pass: client table */
#clients.panel {
  padding: 16px;
}
#clients .panel-head {
  align-items: center;
  margin: -16px -16px 12px;
  padding: 14px 16px;
  border-bottom: 2px solid #b8c4d4;
  background: #f8fafc;
}
#clients .panel-head h2 {
  font-size: 17px;
  font-weight: 900;
}
.client-filterbar {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.client-result-meta {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
#clientList.client-table {
  display: block;
  border: 1px solid #b8c4d4;
  background: #fff;
  overflow-x: auto;
}
.client-table-head,
.record.client-table-row {
  min-width: 980px;
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(240px, 1.25fr) minmax(210px, 1.05fr) minmax(150px, .7fr) 132px;
  align-items: center;
  gap: 0;
}
.client-table-head {
  min-height: 42px;
  border-bottom: 1px solid #94a3b8;
  background: #e8eef6;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 900;
}
.client-table-head span {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid #c7d1df;
}
.client-table-head span:last-child {
  border-right: 0;
  justify-content: center;
}
.record.client-table-row {
  min-height: 54px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #d8e0ea;
  border-radius: 0;
  box-shadow: none;
}
.record.client-table-row:last-child {
  border-bottom: 0;
}
.record.client-table-row:hover {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
.record.client-table-row > div:not(.record-actions),
.record.client-table-row > span,
.record.client-table-row > strong {
  height: 100%;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
  border-right: 1px solid #e2e8f0;
}
.record.client-table-row > div:not(.record-actions) > strong {
  font-size: 14px;
  font-weight: 900;
}
.record.client-table-row > div:not(.record-actions) > span,
.record.client-table-row > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.record.client-table-row .record-actions {
  min-width: 0;
  height: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}
.record.client-table-row .mini-button {
  height: 30px;
  min-width: 48px;
  font-weight: 800;
}
@media (max-width: 820px) {
  #clientList.client-table {
    border-top: 1px solid #b8c4d4;
  }
  .client-table-head {
    display: none;
  }
  .record.client-table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  .record.client-table-row > div:not(.record-actions),
  .record.client-table-row > span,
  .record.client-table-row > strong {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .record.client-table-row .record-actions {
    justify-content: flex-start;
  }
}
/* ERP visibility pass: inventory table */
#inventory.panel {
  padding: 16px;
}
#inventory .panel-head {
  align-items: center;
  margin: -16px -16px 12px;
  padding: 14px 16px;
  border-bottom: 2px solid #b8c4d4;
  background: #f8fafc;
}
#inventory .panel-head h2 {
  font-size: 17px;
  font-weight: 900;
}
#inventoryList.inventory-grid {
  gap: 12px;
}
#inventory .inventory-master-card {
  border-color: #b8c4d4;
  border-radius: 0;
  box-shadow: none;
}
#inventory .inventory-toggle {
  min-height: 46px;
  grid-template-columns: minmax(160px, 1fr) auto 64px;
  padding: 0 14px;
  border-bottom: 1px solid #94a3b8;
  background: #e8eef6;
}
#inventory .inventory-toggle strong {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}
#inventory .inventory-toggle span {
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}
#inventory .inventory-toggle b {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c4d4;
  border-radius: 4px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
#inventory .inventory-stats {
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #d8e0ea;
}
#inventory .inventory-stat {
  min-height: 58px;
  padding: 9px 14px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fff;
}
#inventory .inventory-stat:last-child {
  border-right: 0;
}
#inventory .inventory-stat span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}
#inventory .inventory-stat strong {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 900;
}
#inventory .inventory-master-card > .meta {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid #d8e0ea;
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}
#inventory .inventory-item-table {
  border-top: 0;
}
#inventory .inventory-item-head {
  min-height: 40px;
  border-bottom: 1px solid #94a3b8;
  background: #eef4fb;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 900;
}
#inventory .inventory-item-row {
  min-height: 48px;
  grid-template-columns: minmax(180px, 1.05fr) minmax(300px, 1.8fr) repeat(4, minmax(96px, .42fr));
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #d8e0ea;
}
#inventory .inventory-item-row > * {
  height: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid #e2e8f0;
}
#inventory .inventory-item-row > *:last-child {
  border-right: 0;
}
#inventory .inventory-item-row strong {
  font-size: 14px;
  font-weight: 900;
}
#inventory .inventory-item-row span {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
#inventory .inventory-item-row em {
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}
#inventory .inventory-item-row em.current {
  color: #047857;
}
#inventory .inventory-item-row:hover {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
#inventory .inventory-item-head:hover {
  background: #eef4fb;
  box-shadow: none;
}
@media (max-width: 980px) {
  #inventory .inventory-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #inventory .inventory-item-table { overflow-x: auto; }
  #inventory .inventory-item-row { min-width: 980px; }
}
/* Inventory sheet renewal */
#inventoryList.inventory-sheet {
  display: block;
  border: 1px solid #aebccd;
  background: #fff;
  overflow-x: auto;
}
.inventory-sheet-table {
  min-width: 1040px;
  background: #fff;
}
.inventory-sheet-row {
  display: grid;
  grid-template-columns: 150px minmax(320px, 1.8fr) repeat(5, minmax(108px, .55fr));
  align-items: center;
  gap: 0;
}
.inventory-sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  border-bottom: 2px solid #8796aa;
  background: #dfe7f1;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
}
.inventory-sheet-head span {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #b8c4d4;
}
.inventory-sheet-head span:nth-child(n+3) {
  justify-content: flex-end;
}
.inventory-sheet-head span:last-child {
  border-right: 0;
}
.inventory-category-break {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #b8c4d4;
  background: #f1f5f9;
}
.inventory-category-break strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}
.inventory-category-break span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.inventory-sheet-item {
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #d8e0ea;
  background: #fff;
  text-align: left;
}
.inventory-sheet-item:hover,
.inventory-sheet-item:focus-visible {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 #2563eb;
  outline: 0;
}
.inventory-sheet-item > span,
.inventory-sheet-item > div,
.inventory-sheet-item > em {
  height: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid #e2e8f0;
}
.inventory-sheet-item > *:last-child {
  border-right: 0;
}
.inventory-category-cell {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  background: #fbfdff;
}
.inventory-product-cell {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
}
.inventory-product-cell strong {
  max-width: 100%;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-product-cell span {
  max-width: 100%;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-sheet-item em {
  justify-content: flex-end;
  color: #111827;
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}
.inventory-sheet-total {
  background: #fbfdff;
}
.inventory-sheet-current {
  color: #047857 !important;
  background: #f0fdf4;
}
@media (max-width: 980px) {
  .inventory-sheet-table {
    min-width: 980px;
  }
}
/* Inventory search and filters */
.inventory-filterbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 170px 170px 86px;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.inventory-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
}
.inventory-filterbar input,
.inventory-filterbar select {
  height: 36px;
  font-weight: 700;
}
.inventory-filterbar .ghost-button,
.inventory-filterbar .icon-button {
  height: 36px;
  font-weight: 900;
}
.inventory-result-meta {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 980px) {
  .inventory-filterbar {
    grid-template-columns: 1fr 1fr;
  }
  .inventory-search-box {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .inventory-filterbar {
    grid-template-columns: 1fr;
  }
  .inventory-search-box {
    grid-column: auto;
  }
}

/* Inventory Unified Table Styles */
.inventory-unified-wrapper { display: flex; flex-direction: column; gap: 12px; }
.inv-unified-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  max-height: calc(100vh - 200px);
}
.inv-grid-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(280px, 2.5fr) repeat(5, minmax(80px, 1fr));
  align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.inv-grid-row:last-child { border-bottom: none; }
.inv-grid-head {
  background: #f8fafc;
  font-size: 12px; font-weight: 800; color: var(--text-muted);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 2px solid var(--line-strong);
}
.inv-grid-head span { text-align: right; }
.inv-grid-head span:first-child, .inv-grid-head span:nth-child(2) { text-align: left; }

.inv-grid-item {
  background: #fff; text-align: right; border: none; width: 100%; cursor: pointer;
  transition: background 0.1s;
}
.inv-grid-item:nth-child(even) { background: #fafcff; }
.inv-grid-item:hover { background: #f1f5f9; }

.inv-category-cell { font-weight: 700; color: var(--text-main); font-size: 13px; text-align: left; transition: opacity 0.2s; }
.inv-grid-item > div:nth-child(2) { text-align: left; }
.inv-product-info { display: flex; flex-direction: column; gap: 4px; }
.inv-product-info strong { font-size: 14px; font-weight: 700; color: var(--text-main); }
.inv-product-info span { font-size: 11px; color: var(--text-muted); line-height: 1.3; }

.inv-val { font-style: normal; font-size: 14px; font-weight: 700; color: var(--text-main); }
.qty-bar-wrap { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 60px; height: 24px; padding: 0 4px; }
.qty-bar-bg { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #dcfce7; border-radius: 4px; opacity: 0.5; }
.qty-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #22c55e; border-radius: 4px; opacity: 0.2; }
.qty-bar-text { position: relative; z-index: 1; font-size: 14px; font-weight: 800; color: #166534; }


/* Recovery: force calendar cells visible */
#calBody.calendar-grid{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  grid-template-rows:repeat(6,minmax(118px,1fr))!important;
  min-height:708px!important;
  background:#e5e7eb!important;
  gap:1px!important;
}
#calBody .cal-cell{
  display:flex!important;
  min-height:118px!important;
  background:#fff!important;
  color:#111827!important;
}
#calBody .cal-date{
  visibility:visible!important;
  opacity:1!important;
  color:#111827!important;
}
/* Calendar spacious rows: use remaining space for actual day cells */
#page-calendar{
  min-height:calc(100vh - 32px)!important;
}
#page-calendar #calendar{
  min-height:calc(100vh - 48px)!important;
}
#calBody.calendar-grid{
  grid-template-rows:none!important;
  grid-auto-rows:minmax(148px,1fr)!important;
  align-content:stretch!important;
  min-height:calc(100vh - 150px)!important;
  background:#e5e7eb!important;
}
#calBody .cal-cell{
  min-height:148px!important;
  overflow:hidden!important;
}
#calBody .cal-event{
  min-height:26px!important;
}
@media(max-width:760px){
  #calBody.calendar-grid{
    grid-auto-rows:minmax(112px,1fr)!important;
    min-height:calc(100vh - 140px)!important;
  }
  #calBody .cal-cell{
    min-height:112px!important;
  }
}
/* Dashboard today agenda */
#todayBoard.today-board {
  grid-template-columns: 1fr;
  gap: 10px;
}
.agenda-card {
  width: 100%;
  display: grid;
  grid-template-columns: 118px minmax(180px, 1.2fr) minmax(260px, 2fr);
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
}
.agenda-card:hover {
  border-color: #93b4df;
  background: #f8fbff;
}
.agenda-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}
.agenda-card strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-card small {
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-job .agenda-kind { background: #e0f2fe; color: #0369a1; }
.agenda-service .agenda-kind { background: #fff7ed; color: #c2410c; }
.agenda-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}
.agenda-empty strong {
  color: #1f2937;
  font-size: 15px;
}
@media(max-width:900px){
  .agenda-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .agenda-kind {
    justify-content: flex-start;
    width: fit-content;
    padding: 0 10px;
  }
}


/* Dashboard two column work board */
.dashboard-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.dashboard-work-panel {
  min-height: calc(100vh - 170px);
  margin: 0;
}
.today-agenda-list {
  display: grid;
  gap: 10px;
}
.dashboard-work-grid .agenda-card {
  grid-template-columns: 96px minmax(130px, 1fr);
  grid-template-areas:
    "kind title"
    "kind meta";
  gap: 4px 12px;
}
.dashboard-work-grid .agenda-kind {
  grid-area: kind;
  align-self: center;
}
.dashboard-work-grid .agenda-card strong {
  grid-area: title;
}
.dashboard-work-grid .agenda-card small {
  grid-area: meta;
}
@media(max-width:980px){
  .dashboard-work-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-work-panel {
    min-height: auto;
  }
}


/* Dashboard support panels */
.dashboard-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.dashboard-support-panel {
  min-height: 260px;
  margin: 0;
}
.support-list {
  display: grid;
  gap: 8px;
}
.support-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas:
    "label title"
    "label meta";
  gap: 2px 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}
.support-item:hover {
  border-color: #93b4df;
  background: #f8fbff;
}
.support-label {
  grid-area: label;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.support-item strong {
  grid-area: title;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}
.support-item small {
  grid-area: meta;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 12px;
}
.support-empty {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}
@media(max-width:1180px){
  .dashboard-support-grid {
    grid-template-columns: 1fr;
  }
}


/* Schedule file feedback */
.schedule-file-status {
  min-width: 160px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-file-status.is-ready {
  color: #0f766e;
}
.schedule-file-status.is-uploading {
  color: #1d4ed8;
}


/* Schedule file UI simplification */
.schedule-file-row {
  justify-content: flex-start;
}
.schedule-file-row .form-label {
  flex: 1;
}
.schedule-file-status {
  display: block;
  min-height: 18px;
  margin-top: -4px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-file-status:empty {
  display: none;
}
#scheduleAttachments.is-empty {
  display: none;
}


/* Asset detail unified layout fix */
.asset-detail {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}
.asset-detail-header {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(420px, 1.75fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px 20px;
  border-bottom: 1px solid #dfe7f1;
  background: #f8fbff;
}
.asset-detail-info {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}
.asset-code-badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}
.asset-title {
  margin: 0;
  color: #0f172a;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
}
.asset-meta,
.asset-note {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.asset-stock-widget {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.stock-node {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}
.stock-node .label {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.stock-node .value {
  color: #0f172a;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}
.stock-avail .value { color: #15803d; }
.stock-rent .value { color: #1d4ed8; }
.stock-prep .value { color: #b45309; }
.stock-svc .value { color: #be123c; }
.asset-history-section {
  padding: 18px 20px 20px;
}
.asset-history-section h3 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 900;
}
.asset-unified-table {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.asset-unified-row {
  display: grid;
  grid-template-columns: 112px minmax(140px, 1.05fr) minmax(220px, 1.7fr) 82px 72px 92px 64px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5edf5;
}
.asset-unified-row:last-child {
  border-bottom: 0;
}
.asset-unified-head {
  min-height: 38px;
  background: #eef4fb;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.asset-unified-row > span,
.asset-unified-row > strong,
.asset-unified-row .text-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-unified-row .text-link {
  border: 0;
  background: transparent;
  color: #06499f;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}
.asset-unified-row .addr-cell {
  color: #475569;
}
.asset-unified-row .action-wrap {
  display: flex;
  justify-content: flex-end;
}
@media(max-width:1200px){
  .asset-detail-header {
    grid-template-columns: 1fr;
  }
  .asset-stock-widget {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .asset-unified-table {
    overflow-x: auto;
  }
  .asset-unified-row {
    min-width: 900px;
  }
}


/* Dashboard compact first viewport */
.dashboard-work-grid {
  gap: 14px;
}
.dashboard-work-panel {
  min-height: 300px;
  max-height: 330px;
  overflow: hidden;
}
.dashboard-work-panel .panel-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.dashboard-work-panel .today-agenda-list {
  max-height: 225px;
  overflow: auto;
  padding-right: 2px;
}
.dashboard-work-grid .agenda-card {
  min-height: 52px;
  padding: 10px 12px;
}
.dashboard-support-grid {
  margin-top: 14px;
}
.dashboard-support-panel {
  min-height: 220px;
}


/* Sidebar logo image */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 4px 18px;
}
.brand-logo {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
@media(max-width:900px){
  .brand-logo-wrap {
    padding: 0;
  }
  .brand-logo {
    width: 150px;
  }
}


/* White sidebar logo zone final */
.sidebar {
  padding-top: 0!important;
  gap: 18px!important;
  overflow: hidden;
}
.sidebar .brand-logo-wrap {
  width: calc(100% + 32px)!important;
  margin: 0 -16px!important;
  padding: 22px 20px 18px!important;
  background: #fff!important;
  border-bottom: 1px solid #e5e7eb!important;
  border-radius: 0!important;
}
.sidebar .brand-logo {
  width: 188px!important;
  max-width: 100%!important;
  height: auto!important;
  border-radius: 0!important;
  background: transparent!important;
}


/* Align sidebar logo block with topbar */
.sidebar .brand-logo-wrap {
  height: 118px!important;
  min-height: 118px!important;
  padding: 0 20px!important;
  display: flex!important;
  align-items: center!important;
  justify-content: center!important;
  border-bottom: 1px solid #e2e8f0!important;
}
.sidebar .brand-logo {
  width: 184px!important;
  max-height: 86px!important;
  object-fit: contain!important;
}


/* Tighten sidebar logo height to header line */
.sidebar .brand-logo-wrap {
  height: 110px!important;
  min-height: 110px!important;
  padding: 0 18px!important;
}
.sidebar .brand-logo {
  width: 178px!important;
  max-height: 78px!important;
}


/* Remove logo-zone separator lines */
.sidebar {
  border-right: 0!important;
}
.sidebar .brand-logo-wrap {
  border-bottom: 0!important;
}


/* Schedule detail readonly mode */
.schedule-form[data-mode="detail"] input,
.schedule-form[data-mode="detail"] select,
.schedule-form[data-mode="detail"] textarea {
  background: #f8fafc;
  color: #0f172a;
  border-color: #dbe4ef;
  cursor: default;
  opacity: 1;
}
.schedule-form[data-mode="detail"] textarea {
  resize: none;
}


/* Schedule attachment edit controls */
.attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.attachment-remove {
  height: 30px;
  padding: 0 9px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
}
.attachment-remove:hover {
  background: #fff1f2;
}
/* Mobile responsive layer 20260716 */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .app-shell {
    display: block !important;
    min-height: 100vh !important;
    background: #eef3f8;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
    background: #111827 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  }

  .sidebar .brand-logo-wrap {
    width: 100% !important;
    height: 72px !important;
    min-height: 72px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    justify-content: flex-start !important;
    background: #fff !important;
  }

  .sidebar .brand-logo {
    width: 152px !important;
    max-height: 54px !important;
  }

  .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 10px 12px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .nav::-webkit-scrollbar {
    height: 0;
  }

  .nav a {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1 !important;
  }

  .nav a.active {
    background: #2563eb !important;
    color: #fff !important;
  }

  .sidebar-note {
    display: none !important;
  }

  .workspace {
    min-width: 0 !important;
  }

  .topbar {
    position: static !important;
    min-height: 0 !important;
    padding: 16px !important;
    border-bottom: 1px solid #dbe4ef !important;
  }

  .topbar h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  .lead {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .page-content {
    padding: 14px !important;
  }

  .page-view.active {
    min-width: 0 !important;
  }

  .panel,
  .wide-panel {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .panel-head {
    align-items: flex-start !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  .panel-head .primary-button,
  .panel-head .ghost-button {
    min-height: 42px !important;
  }

  .metrics,
  .today-board,
  .client-columns,
  .asset-layout,
  .dashboard-work-grid,
  .dashboard-support-grid,
  .operation-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .dashboard-work-panel,
  .dashboard-support-panel {
    min-height: 0 !important;
    max-height: none !important;
  }

  .today-agenda-list,
  .support-list {
    max-height: none !important;
  }

  .agenda-card,
  .support-item,
  .record {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  .record-actions,
  .job-actions,
  .client-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  button,
  .primary-button,
  .ghost-button,
  .mini-button,
  .icon-button {
    min-height: 40px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  .client-filterbar,
  .inventory-filterbar,
  .operation-filterbar,
  .asset-filterbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .client-search-box,
  .inventory-search-box {
    width: 100% !important;
    min-width: 0 !important;
  }

  #inventory .inventory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #inventory .inventory-sheet-table,
  #inventory .inventory-item-table,
  .asset-list-table,
  .asset-unified-table,
  .client-list,
  .operation-list,
  .item-search-body,
  .inv-unified-table {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-x: hidden !important;
  }

  .asset-list-header,
  .client-table-head,
  .inventory-item-head,
  .asset-unified-head,
  .item-search-head,
  .operation-table-head,
  .inv-grid-head {
    display: none !important;
  }

  #inventory .inventory-sheet-row,
  #inventory .inventory-item-row,
  .asset-row,
  .asset-unified-row,
  .client-row,
  .operation-row,
  .operation-job-grid,
  .item-search-row,
  .operation-table-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 16px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
    text-align: left !important;
  }

  .data-list .record, .list .record, .data-list .list-item, .list .list-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 16px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
    height: auto !important;
  }

  .data-list, .list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    background: transparent !important;
    border: none !important;
  }

  .record-actions,
  .detail-actions,
  .panel-actions,
  .item-search-row .record-actions,
  .job-actions,
  .client-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--line) !important;
    justify-content: flex-end !important;
  }
  
  /* Mobile Data Row Pseudo Elements for Labels */
  .asset-row > div:nth-child(1)::before { content: "품목코드: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }
  .asset-row > div:nth-child(2)::before { content: "품목명: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }
  .asset-row > div:nth-child(3)::before { content: "모델: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }
  .asset-row > div:nth-child(4)::before { content: "규격: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }
  .asset-row > div:nth-child(5)::before { content: "옵션: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }
  .asset-row > div:nth-child(6)::before { content: "보유량: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 70px; }

  .client-row > div:nth-child(2)::before { content: "주소: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 60px; }
  .client-row > div:nth-child(3)::before { content: "장비: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 60px; }
  .client-row > div:nth-child(4)::before { content: "계약: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 60px; }

  .inv-grid-item {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 8px !important;
    align-items: center !important;
    padding: 16px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
    text-align: left !important;
  }
  .inv-grid-item > span.inv-category-cell,
  .inv-grid-item > div.inv-product-info {
    grid-column: 1 / -1 !important;
  }
  .inv-grid-item > em.inv-val {
    display: flex !important;
    align-items: center !important;
  }
  .inv-grid-item > div.qty-bar-wrap {
    justify-content: flex-start !important;
    min-width: 0 !important;
  }
  .inv-grid-item > div.qty-bar-wrap .qty-bar-text {
    display: flex;
    align-items: center;
  }
  .inv-grid-item > div.qty-bar-wrap .qty-bar-text::before {
    content: "현재고: ";
    font-weight: 600;
    color: var(--text-muted);
    display: inline-block;
    width: 65px;
    font-size: 14px;
    margin-right: 4px;
  }
  .inv-grid-item > em.inv-val:nth-of-type(1)::before { content: "총보유: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 65px; font-style: normal; }
  .inv-grid-item > em.inv-val:nth-of-type(2)::before { content: "렌탈중: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 65px; font-style: normal; }
  .inv-grid-item > em.inv-val:nth-of-type(3)::before { content: "출고준비: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 65px; font-style: normal; }
  .inv-grid-item > em.inv-val:nth-of-type(4)::before { content: "점검/수리: "; font-weight: 600; color: var(--text-muted); display: inline-block; width: 65px; font-style: normal; }

  .inventory-filterbar {
    align-items: stretch !important;
  }

  #page-calendar.page-view.active {
    height: auto !important;
    min-height: calc(100vh - 122px) !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #page-calendar #calendar {
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: visible !important;
  }

  #page-calendar .panel-head {
    padding: 10px 4px !important;
  }

  .calendar-header {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .calendar-header h2 {
    min-width: auto !important;
    font-size: 19px !important;
  }

  #calBody.calendar-grid {
    min-height: 0 !important;
    grid-auto-rows: minmax(106px, auto) !important;
    border-radius: 0 0 12px 12px !important;
  }

  #calBody .cal-cell {
    min-height: 106px !important;
    padding: 6px !important;
  }

  .cal-head {
    height: 34px !important;
    font-size: 12px !important;
  }

  .cal-date {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 5px !important;
    font-size: 11px !important;
  }

  .cal-event {
    min-height: 22px !important;
    padding: 3px 5px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .erp-modal,
  #modal-schedule.erp-modal,
  .schedule-modal,
  .item-search-modal,
  .file-preview-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    border-radius: 14px !important;
  }

  .erp-modal .modal-header,
  .schedule-modal .modal-header,
  .item-search-modal .modal-header {
    padding: 14px 16px !important;
  }

  .erp-modal form,
  .schedule-modal form,
  .stack-form,
  .schedule-form,
  .operation-register-form,
  .asset-register-form,
  .client-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 16px !important;
  }

  .schedule-period-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .schedule-form .form-textarea {
    min-height: 150px !important;
  }

  .file-picker-row,
  .attachment-picker-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .modal-actions,
  .schedule-form .modal-actions,
  .item-search-modal .modal-actions,
  .file-preview-modal .modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    width: 100% !important;
    height: auto !important;
    margin: 8px 0 0 !important;
    padding: 12px 16px !important;
    background: #fff !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  .modal-actions button,
  .schedule-form .modal-actions button,
  .item-search-modal .modal-actions button,
  .file-preview-modal .modal-actions button {
    flex: 1 1 110px !important;
    min-width: 0 !important;
    min-height: 44px !important;
  }

  .operation-register-form {
    grid-template-columns: 1fr !important;
  }

  .operation-item-blank,
  .selected-items-box {
    min-height: 140px !important;
  }

  .item-search-modal {
    height: calc(100vh - 16px) !important;
  }

  .item-search-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .item-search-table,
  .item-search-row {
    min-width: 560px !important;
  }

  .file-preview-body {
    min-height: 360px !important;
    padding: 12px !important;
  }
}

@media (max-width: 560px) {
  .sidebar .brand-logo-wrap {
    height: 64px !important;
    min-height: 64px !important;
  }

  .sidebar .brand-logo {
    width: 136px !important;
    max-height: 48px !important;
  }

  .nav {
    padding: 8px 10px 10px !important;
  }

  .nav a {
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .topbar {
    padding: 14px 12px !important;
  }

  .topbar h1 {
    font-size: 19px !important;
  }

  .eyebrow {
    font-size: 10px !important;
  }

  .lead {
    font-size: 12px !important;
  }

  .page-content {
    padding: 10px !important;
  }

  .panel,
  .wide-panel {
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .panel-head h2 {
    font-size: 16px !important;
  }

  .dashboard-work-grid,
  .dashboard-support-grid {
    gap: 10px !important;
  }

  #inventory .inventory-stats {
    grid-template-columns: 1fr 1fr !important;
    margin: 10px !important;
  }

  #inventory .inventory-stat {
    padding: 9px !important;
  }

  #inventory .inventory-stat strong {
    font-size: 16px !important;
  }

  #calBody.calendar-grid {
    grid-auto-rows: minmax(92px, auto) !important;
  }

  #calBody .cal-cell {
    min-height: 92px !important;
    padding: 5px !important;
  }

  .cal-event {
    font-size: 9px !important;
    min-height: 20px !important;
  }

  .erp-modal form,
  .schedule-modal form,
  .stack-form,
  .schedule-form {
    padding: 14px !important;
  }

  .modal-actions,
  .schedule-form .modal-actions {
    padding: 10px 14px !important;
  }

  .modal-actions button,
  .schedule-form .modal-actions button {
    flex-basis: calc(50% - 4px) !important;
  }
}

@media (max-width: 900px) {
  #eventDetailContent {
    grid-template-columns: 1fr !important;
  }
}
/* Auth gate 20260716 */
body.auth-locked { background: #eef3f8; }
body.auth-locked .app-shell { display: none !important; }
.auth-screen {
  position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(145deg, #eef3f8 0%, #f8fafc 54%, #e8eef7 100%);
}
.auth-screen.is-open, body.auth-locked .auth-screen { display: flex; }
body:not(.auth-locked) .auth-screen { pointer-events: none; opacity: 0; }
.auth-card {
  width: min(440px, 100%); padding: 28px; border: 1px solid #dbe4ef; border-radius: 18px;
  background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-brand img { width: 136px; height: auto; object-fit: contain; }
.auth-brand p { margin: 0 0 4px; color: #64748b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.auth-brand h1 { margin: 0; color: #0f172a; font-size: 22px; letter-spacing: 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 16px; border-radius: 12px; background: #eef3f8; }
.auth-tabs button { height: 40px; border: 0; border-radius: 10px; background: transparent; color: #64748b; font-weight: 900; }
.auth-tabs button.active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; color: #334155; font-size: 13px; font-weight: 900; }
.auth-form input { height: 46px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; }
.auth-form .primary-button { height: 46px; margin-top: 4px; }
.auth-help { margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.auth-message { min-height: 20px; margin-top: 14px; color: #475569; font-size: 13px; font-weight: 800; }
.auth-message[data-type="error"] { color: #dc2626; }
.auth-message[data-type="success"] { color: #15803d; }
.auth-userbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.auth-userbar span { color: #334155; font-size: 13px; font-weight: 900; }
.auth-admin-body { padding: 18px 20px 22px; }
.auth-admin-list { display: grid; gap: 8px; }
.auth-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #dbe4ef; border-radius: 10px; background: #f8fafc; }
.auth-admin-info { display: grid; gap: 3px; }
.auth-admin-info strong { color: #0f172a; font-size: 14px; }
.auth-admin-info span, .auth-admin-info small { color: #64748b; font-size: 12px; font-weight: 800; }
.auth-admin-actions { display: flex; gap: 6px; }
.danger-button { min-height: 38px; padding: 0 14px; border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #dc2626; font-weight: 900; }
@media (max-width: 700px) {
  .auth-screen { padding: 12px; }
  .auth-card { padding: 20px; border-radius: 14px; }
  .auth-brand { align-items: flex-start; flex-direction: column; }
  .auth-brand img { width: 150px; }
  .auth-userbar { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .auth-admin-row { grid-template-columns: 1fr; }
}

/* Auth form tab visibility fix 20260716 */
.auth-form[hidden] {
  display: none !important;
}
.auth-message:empty {
  display: none;
}


/* --- App-like Calendar Redesign --- */
#page-calendar { padding: 0 !important; margin: 0 !important; background: #fff !important; }
#page-calendar.page-view.active { display: flex !important; height: calc(100vh - 80px) !important; padding: 0 !important; margin: -24px -32px -32px !important; width: calc(100% + 64px) !important; overflow: hidden !important; border-radius: 0 !important; }
.calendar-app-layout { flex: 1; display: flex; flex-direction: column; background: #fff; width: 100%; height: 100%; border-radius: 0 !important; box-shadow: none !important; border: none !important; }
.calendar-app-header { padding: 20px 20px 10px; background: #fff; }
.calendar-title-wrap { display: flex; align-items: center; gap: 12px; }
.calendar-title-wrap h2 { font-size: 26px !important; font-weight: 900 !important; color: #0f172a !important; margin: 0 !important; letter-spacing: -0.5px !important; min-width: auto !important; }
.calendar-title-wrap .ghost-button { height: 32px !important; padding: 0 14px !important; border-radius: 999px !important; background: #f1f5f9 !important; color: #334155 !important; font-size: 14px !important; font-weight: 700 !important; margin: 0 !important; }
.calendar-scroll-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.calendar-days-head { border-bottom: 1px solid #e2e8f0; padding-bottom: 4px; }
.calendar-scroll-area #calBody { flex: 1; border: none !important; background: #f8fafc !important; border-radius: 0 !important; min-height: 0 !important; grid-auto-rows: 1fr !important; }
.calendar-scroll-area #calBody .cal-cell { min-height: 0 !important; border-radius: 0 !important; border-bottom: 1px solid #f1f5f9 !important; border-right: 1px solid #f1f5f9 !important; }
.fab-button { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 30px; background: #2563eb; color: #fff; border: none; box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3); display: grid; place-items: center; cursor: pointer; z-index: 1000; transition: transform 0.2s, background 0.2s; padding: 0; }
.fab-button:hover { background: #1d4ed8; transform: translateY(-2px); }
.fab-button:active { transform: scale(0.95); }
@media (max-width: 1024px) { 
  #page-calendar.page-view.active { height: calc(100vh - 120px) !important; margin: -14px !important; width: calc(100% + 28px) !important; } 
}
@media (max-width: 760px) { 
  #page-calendar.page-view.active { height: calc(100vh - 58px) !important; margin: -14px !important; width: calc(100% + 28px) !important; } 
  .fab-button { bottom: 84px; right: 20px; width: 56px; height: 56px; border-radius: 28px; } 
  .calendar-title-wrap h2 { font-size: 22px !important; } 
}

/* Style for PC nav buttons */
.calendar-title-wrap .cal-nav-btn { width: 36px; height: 36px; border-radius: 18px; font-size: 16px; background: #f8fafc; color: #64748b; padding: 0; border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background 0.2s, color 0.2s; }
.calendar-title-wrap .cal-nav-btn:hover { background: #e2e8f0; color: #0f172a; }
/* Hide PC nav buttons on mobile */
@media (max-width: 1024px) {
  .cal-nav-btn { display: none !important; }
}


/* Auth admin safety polish 20260716 */
.auth-admin-modal { width: min(720px, calc(100vw - 28px)); }
.auth-admin-row[data-status="pending"] { border-color: #bfdbfe; background: #eff6ff; }
.auth-admin-row[data-status="approved"] { border-color: #bbf7d0; background: #f0fdf4; }
.auth-admin-row[data-status="rejected"] { border-color: #fecaca; background: #fff1f2; }
.auth-admin-actions button { min-width: 72px; }


/* Audit history and return modal 20260716 */
.history-list { display: grid; gap: 0; border: 1px solid #dbe4ef; border-radius: 10px; overflow: hidden; background: #fff; }
.history-row { display: grid; grid-template-columns: 130px 110px minmax(220px, 1.2fr) 130px minmax(220px, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e5edf6; font-size: 13px; }
.history-row:last-child { border-bottom: 0; }
.history-head { background: #eef4fb; color: #334155; font-weight: 900; }
.history-row strong { color: #0f172a; }
.return-modal { width: min(560px, calc(100vw - 28px)); }
.return-complete-form { grid-template-columns: 1fr !important; }
.return-summary { display: grid; gap: 6px; padding: 14px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.return-summary strong { font-size: 16px; color: #0f172a; }
.return-summary span { color: #1e40af; font-weight: 900; }
.return-summary small { color: #475569; font-weight: 700; }
.stock-return-notice,
.inventory-return-note,
.stock-return-inline-note { padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; color: #166534; font-size: 12px; font-weight: 800; line-height: 1.45; }
.inventory-return-note { margin-bottom: 10px; }
.stock-return-inline-note { margin: 0 0 12px; }
@media (max-width: 900px) {
  .history-list { overflow-x: auto; }
  .history-row { min-width: 820px; }
}


/* Audit history and return modal safe overlay 20260716 */
.history-list { display: grid; gap: 0; border: 1px solid #dbe4ef; border-radius: 10px; overflow: hidden; background: #fff; }
.history-row { display: grid; grid-template-columns: 130px 110px minmax(220px, 1.2fr) 130px minmax(220px, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e5edf6; font-size: 13px; }
.history-row:last-child { border-bottom: 0; }
.history-head { background: #eef4fb; color: #334155; font-weight: 900; }
.history-row strong { color: #0f172a; }
.return-modal { width: min(560px, calc(100vw - 28px)); }
.return-complete-form { grid-template-columns: 1fr !important; }
.return-summary { display: grid; gap: 6px; padding: 14px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.return-summary strong { font-size: 16px; color: #0f172a; }
.return-summary span { color: #1e40af; font-weight: 900; }
.return-summary small { color: #475569; font-weight: 700; }
.stock-return-notice { padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; color: #166534; font-size: 12px; font-weight: 800; line-height: 1.45; }
@media (max-width: 900px) { .history-list { overflow-x: auto; } .history-row { min-width: 820px; } }


/* Production mobile optimization safe 20260716 */
@media (max-width: 900px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .app-shell { display: block; min-height: 100vh; }
  .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    padding: 10px 12px 12px !important;
    background: #fff !important;
    border-right: 0 !important;
    border-bottom: 1px solid #dbe4ef !important;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .08) !important;
  }
  .sidebar .brand-logo-wrap {
    width: 176px !important;
    height: 54px !important;
    margin: 0 auto 8px !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .sidebar .brand-logo { width: 100% !important; height: 100% !important; object-fit: contain !important; }
  .nav {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding: 2px 2px 4px !important;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  .nav a.active { color: #fff !important; background: #2563eb !important; border-color: #2563eb !important; }
  .sidebar-note { display: none !important; }
  .workspace { width: 100% !important; margin: 0 !important; }
  .topbar {
    position: static !important;
    min-height: auto !important;
    padding: 14px 14px 12px !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .topbar h1 { font-size: 22px !important; line-height: 1.2 !important; }
  .topbar .lead { font-size: 13px !important; line-height: 1.45 !important; }
  .auth-userbar { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .page-content { padding: 0 !important; }
  .workspace > section,
  .workspace > .metrics,
  .workspace > .content-grid,
  .page-view > section { padding: 12px !important; margin: 0 !important; }
  .panel { border-radius: 10px !important; }
  .panel-head { gap: 10px !important; align-items: flex-start !important; flex-direction: column !important; }
  .panel-head > div,
  .panel-head .actions,
  .action-row,
  .client-search-actions,
  .inventory-filterbar { width: 100% !important; }
  .dashboard-work-grid,
  .dashboard-support-grid,
  .metrics,
  .today-board,
  .content-grid,
  .client-columns,
  .client-main-grid,
  .asset-register-form,
  .operation-register-form,
  .form-grid.two-cols { grid-template-columns: 1fr !important; }
  .inventory-filterbar,
  .client-search-box { grid-template-columns: 1fr !important; }
  #inventory .inventory-sheet-table,
  #inventory .inventory-item-table,
  .asset-list-table,
  .asset-unified-table,
  .operation-table,
  .client-table,
  .inv-unified-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  #inventory .inventory-sheet-row,
  #inventory .inventory-item-row,
  .asset-unified-row,
  .operation-table-row,
  .record.client-table-row { min-width: 860px !important; }
  .client-table-head,
  .inventory-item-head,
  .operation-table-head { min-width: 860px !important; }
  .erp-modal,
  #modal-schedule.erp-modal,
  .schedule-modal,
  .item-search-modal,
  .file-preview-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    border-radius: 14px !important;
  }
  .erp-modal form,
  .schedule-modal form { padding: 14px !important; }
  .modal-actions,
  .schedule-form .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .sidebar .brand-logo-wrap { width: 150px !important; height: 46px !important; }
  .nav a { min-height: 36px !important; padding: 0 11px !important; font-size: 12px !important; }
  .topbar { padding: 12px !important; }
  .topbar h1 { font-size: 20px !important; }
  .panel-head h2 { font-size: 17px !important; }
  .primary-button,
  .ghost-button,
  .danger-button,
  .mini-button { min-height: 40px; }
  input, select, textarea { font-size: 16px !important; }
  #page-calendar.page-view.active {
    height: auto !important;
    min-height: calc(100vh - 118px) !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .calendar-app-header { padding: 12px 10px 8px !important; }
  .calendar-title-wrap { flex-wrap: wrap !important; gap: 8px !important; }
  .calendar-title-wrap h2 { width: 100%; font-size: 20px !important; }
  #calBody.calendar-grid { min-width: 760px !important; }
  .calendar-scroll-area { overflow-x: auto !important; }
  .calendar-scroll-area #calBody .cal-cell { min-height: 104px !important; }
  .auth-card { width: 100% !important; padding: 22px 16px !important; border-radius: 18px !important; }
  .auth-brand { align-items: center !important; }
  .auth-brand img { width: 132px !important; }
  .auth-brand h1 { font-size: 20px !important; }
  .modal-actions button,
  .schedule-form .modal-actions button { flex: 1 1 42%; min-width: 0 !important; }
}


/* Schedule creator label 20260716 */
.schedule-creator-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f8fafc;
}
.schedule-creator-info[hidden] { display: none !important; }
.schedule-creator-info span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.schedule-creator-info strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}


/* Cloud sync button 20260716 */
#cloudSyncButton[data-tone="success"] {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
#cloudSyncButton[data-tone="error"] {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}


/* Username login polish 20260716 */
.auth-form input[name="username"] {
  ime-mode: inactive;
}


/* Force hidden admin buttons 20260716 */
#cloudSyncButton[hidden],
#authAdminButton[hidden],
.auth-userbar button[hidden] {
  display: none !important;
  visibility: hidden !important;
}


/* Mobile core workflow polish 20260720 */
@media (max-width: 900px) {
  body { background: #f4f7fb; }
  .workspace { background: #f4f7fb !important; }
  .page-content { padding: 10px !important; }
  .page-view > section,
  .workspace > section { padding: 12px !important; }
  .panel-head h2 { line-height: 1.2; }
  .panel-head .primary-button,
  .panel-actions,
  .job-actions {
    width: 100%;
  }
  .panel-head .primary-button,
  .job-actions button,
  .panel-actions button {
    min-height: 42px;
  }

  /* Calendar: wide, readable monthly board on phones */
  #page-calendar,
  #page-calendar.page-view.active {
    display: block !important;
    height: auto !important;
    min-height: calc(100vh - 112px) !important;
    margin: 0 !important;
    width: 100% !important;
    overflow: visible !important;
    background: #f4f7fb !important;
  }
  #page-calendar #calendar {
    min-height: 0 !important;
    padding: 12px !important;
    background: #fff !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08) !important;
    overflow: hidden !important;
  }
  #page-calendar #calendar > .panel-head {
    position: sticky;
    top: 105px;
    z-index: 12;
    margin: 0 -12px 8px !important;
    padding: 10px 12px 12px !important;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e2e8f0 !important;
    backdrop-filter: blur(8px);
  }
  #page-calendar .calendar-header {
    width: 100%;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px auto;
    align-items: center;
    gap: 8px !important;
  }
  #page-calendar .calendar-header h2 {
    min-width: 0 !important;
    width: auto !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    text-align: center !important;
  }
  #page-calendar .calendar-header .mini-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 12px !important;
  }
  #page-calendar .calendar-header .ghost-button {
    height: 42px !important;
    margin-left: 0 !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
  }
  #page-calendar #calendar > .calendar-grid:not(#calBody),
  #calBody.calendar-grid {
    min-width: 760px !important;
  }
  #page-calendar #calendar > .calendar-grid:not(#calBody) {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }
  #page-calendar #calendar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #calBody.calendar-grid {
    grid-auto-rows: minmax(120px, 1fr) !important;
    min-height: 720px !important;
    border-radius: 0 0 12px 12px !important;
  }
  #calBody .cal-cell {
    min-height: 120px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
  #calBody .cal-date {
    width: 26px !important;
    height: 26px !important;
    margin: 0 0 2px !important;
    font-size: 12px !important;
  }
  #calBody .cal-event {
    width: 100%;
    min-height: 24px !important;
    padding: 4px 7px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Operations: replace cramped spreadsheet with mobile cards */
  #jobList.operation-table {
    display: grid !important;
    gap: 10px !important;
    overflow: visible !important;
  }
  #jobList .operation-table-head {
    display: none !important;
  }
  #jobList .operation-table-row {
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.06) !important;
  }
  #jobList .operation-table-row > div {
    min-width: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  #jobList .operation-preview-main strong,
  #jobList .operation-preview-items strong {
    display: block;
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    white-space: normal !important;
  }
  #jobList .operation-preview-main span,
  #jobList .operation-preview-items span {
    display: block;
    margin-top: 4px;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.45 !important;
    white-space: normal !important;
  }
  #jobList .operation-preview-dates {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  #jobList .operation-preview-dates span {
    display: block !important;
    padding: 9px 10px !important;
    border-radius: 9px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #334155 !important;
  }
  #jobList .operation-preview-status {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  #jobList .operation-preview-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }
  #jobList .operation-preview-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    border-radius: 9px !important;
  }

  /* Inventory: compact stock cards instead of horizontal squeeze */
  #inventory .inventory-filterbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  #inventory .inventory-search-box {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 44px !important;
    gap: 8px !important;
  }
  #inventory .inventory-search-box input,
  #inventory .inventory-filterbar select,
  #inventory .inventory-filterbar button {
    min-height: 42px !important;
    width: 100% !important;
  }
  .inv-unified-table {
    display: grid !important;
    gap: 10px !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .inv-grid-head {
    display: none !important;
  }
  .inv-grid-item {
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 14px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.06) !important;
    text-align: left !important;
  }
  .inv-grid-item > * {
    min-width: 0 !important;
  }
  .inv-category-cell {
    grid-column: 1 / -1;
    display: inline-flex !important;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8 !important;
    font-size: 12px !important;
    opacity: 1 !important;
  }
  .inv-product-info {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f7;
  }
  .inv-product-info strong {
    font-size: 16px !important;
    font-weight: 900 !important;
    white-space: normal !important;
  }
  .inv-product-info span {
    margin-top: 4px;
    font-size: 12px !important;
    white-space: normal !important;
  }
  .inv-grid-item > em,
  .inv-grid-item > .qty-bar-wrap {
    min-height: 58px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    padding: 8px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-align: left !important;
  }
  .inv-grid-item > em::before,
  .inv-grid-item > .qty-bar-wrap::before {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
  }
  .inv-grid-item > em:nth-of-type(1)::before { content: "총 개수"; }
  .inv-grid-item > .qty-bar-wrap::before { content: "현재고"; }
  .inv-grid-item > em:nth-of-type(2)::before { content: "렌탈중"; }
  .inv-grid-item > em:nth-of-type(3)::before { content: "출고준비"; }
  .inv-grid-item > em:nth-of-type(4)::before { content: "점검/수리"; }
  .qty-bar-bg,
  .qty-bar-fill {
    display: none !important;
  }
  .qty-bar-text {
    position: static !important;
    font-size: 15px !important;
  }
}

@media (max-width: 560px) {
  .page-content { padding: 8px !important; }
  #jobList .operation-preview-dates,
  #jobList .operation-preview-actions {
    grid-template-columns: 1fr !important;
  }
  .inv-grid-item {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 12px !important;
  }
  #page-calendar #calendar {
    padding: 10px !important;
  }
  #page-calendar #calendar > .panel-head {
    top: 92px;
    margin: 0 -10px 8px !important;
    padding: 10px !important;
  }
  #page-calendar .calendar-header {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }
  #page-calendar .calendar-header .ghost-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  #page-calendar #calendar > .calendar-grid:not(#calBody),
  #calBody.calendar-grid {
    min-width: 700px !important;
  }
  #calBody.calendar-grid {
    min-height: 660px !important;
    grid-auto-rows: minmax(110px, 1fr) !important;
  }
}


/* Mobile calendar month view 20260720 */
@media (max-width: 760px) {
  #page-calendar,
  #page-calendar.page-view.active {
    display: block !important;
    width: 100% !important;
    min-height: calc(100vh - 92px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #f4f7fb !important;
  }
  #page-calendar #calendar {
    width: 100% !important;
    min-height: calc(100vh - 110px) !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08) !important;
    touch-action: pan-y !important;
  }
  #page-calendar #calendar > .panel-head {
    position: sticky !important;
    top: 88px !important;
    z-index: 15 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px 12px 10px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(8px);
  }
  #page-calendar .calendar-header {
    width: 100%;
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 40px 54px !important;
    align-items: center !important;
    gap: 6px !important;
  }
  #page-calendar .calendar-header h2 {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: #0f172a !important;
  }
  #page-calendar .calendar-header .mini-button,
  #page-calendar .calendar-header .ghost-button {
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }
  #page-calendar #calendar > .panel-head > .primary-button {
    position: fixed !important;
    right: 18px !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 80 !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    color: transparent !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .34) !important;
  }
  #page-calendar #calendar > .panel-head > .primary-button::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    font-weight: 500;
  }
  #page-calendar #calendar > .calendar-grid:not(#calBody),
  #calBody.calendar-grid {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }
  #page-calendar #calendar > .calendar-grid:not(#calBody) {
    position: sticky;
    top: 151px;
    z-index: 14;
    border-bottom: 1px solid #dbe4ef !important;
    background: #fff !important;
  }
  #page-calendar .cal-head {
    height: 34px !important;
    min-width: 0 !important;
    border: 0 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    color: #475569 !important;
  }
  #page-calendar .cal-head:first-child { color: #e11d48 !important; }
  #page-calendar .cal-head:last-child { color: #2563eb !important; }
  #calBody.calendar-grid {
    min-height: calc(100vh - 196px) !important;
    grid-auto-rows: minmax(92px, 1fr) !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 0 16px 16px !important;
    background: #fff !important;
  }
  #calBody .cal-cell {
    min-width: 0 !important;
    min-height: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 7px 4px !important;
    border-right: 1px solid #eef2f7 !important;
    border-bottom: 1px solid #eef2f7 !important;
    background: #fff !important;
    overflow: hidden !important;
  }
  #calBody .cal-cell:nth-child(7n) {
    border-right: 0 !important;
  }
  #calBody .cal-cell.other-month {
    background: #fbfdff !important;
  }
  #calBody .cal-date {
    width: auto !important;
    height: 22px !important;
    min-width: 0 !important;
    margin: 0 !important;
    place-self: start !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    line-height: 22px !important;
    font-weight: 900 !important;
    color: #111827 !important;
  }
  #calBody .cal-cell:nth-child(7n+1) .cal-date {
    color: #e11d48 !important;
  }
  #calBody .cal-cell:nth-child(7n) .cal-date {
    color: #2563eb !important;
  }
  #calBody .cal-date.today {
    display: inline-grid !important;
    place-items: center !important;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(37,99,235,.25) !important;
  }
  #calBody .cal-cell.other-month .cal-date {
    color: #cbd5e1 !important;
  }
  #calBody .cal-event {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 19px !important;
    padding: 2px 4px !important;
    border-radius: 5px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: none !important;
  }
}

@media (max-width: 390px) {
  #calBody.calendar-grid {
    grid-auto-rows: minmax(84px, 1fr) !important;
  }
  #calBody .cal-cell {
    min-height: 84px !important;
    padding: 6px 3px !important;
  }
  #calBody .cal-date {
    font-size: 13px !important;
  }
  #calBody .cal-event {
    min-height: 18px !important;
    font-size: 9.5px !important;
    padding: 2px 3px !important;
  }
}


/* Mobile calendar visibility scope fix 20260720 */
@media (max-width: 760px) {
  #page-calendar.page-view:not(.active) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #page-calendar.page-view:not(.active) #calendar,
  #page-calendar.page-view:not(.active) #calendar > .panel-head > .primary-button {
    display: none !important;
  }
  #page-calendar.page-view.active {
    display: block !important;
    width: 100% !important;
    min-height: calc(100vh - 92px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #f4f7fb !important;
  }
  #page-calendar.page-view.active #calendar > .panel-head > .primary-button {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    right: 18px !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 80 !important;
    display: grid !important;
    place-items: center !important;
  }
}


/* Mobile calendar header final fix 20260720 */
@media (max-width: 760px) {
  #page-calendar.page-view:not(.active),
  #page-calendar.page-view:not(.active) #calendar {
    display: none !important;
  }

  #page-calendar.page-view.active #calendar > .panel-head {
    display: block !important;
    padding: 10px 10px 9px !important;
    margin: 0 !important;
  }

  #page-calendar.page-view.active .calendar-header {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px 58px !important;
    gap: 6px !important;
    align-items: center !important;
  }

  #page-calendar.page-view.active .calendar-header h2 {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  #page-calendar.page-view.active .calendar-header .mini-button,
  #page-calendar.page-view.active .calendar-header .ghost-button {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  #page-calendar.page-view.active #calendar > .panel-head > .primary-button {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 999 !important;
    display: grid !important;
    place-items: center !important;
    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;
    min-height: 62px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    color: transparent !important;
    transform: none !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .34) !important;
  }

  #page-calendar.page-view.active #calendar > .panel-head > .primary-button::after {
    content: "+";
    display: block !important;
    color: #fff !important;
    font-size: 34px !important;
    font-weight: 500 !important;
    line-height: 58px !important;
  }
}

@media (max-width: 380px) {
  #page-calendar.page-view.active .calendar-header {
    grid-template-columns: 38px minmax(0, 1fr) 38px 52px !important;
  }
  #page-calendar.page-view.active .calendar-header h2 {
    font-size: 18px !important;
  }
  #page-calendar.page-view.active .calendar-header .mini-button,
  #page-calendar.page-view.active .calendar-header .ghost-button {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12px !important;
  }
}


/* Body-level mobile schedule FAB 20260720 */
.mobile-schedule-fab {
  display: none;
}

@media (max-width: 760px) {
  #page-calendar.page-view.active #calendar > .panel-head > .primary-button {
    display: none !important;
  }

  .mobile-schedule-fab {
    position: fixed !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 2147483000 !important;
    display: grid !important;
    place-items: center !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #2563eb !important;
    color: #fff !important;
    font-size: 36px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .36) !important;
    cursor: pointer !important;
  }

  .mobile-schedule-fab[hidden] {
    display: none !important;
  }
}


/* HMPM final mobile app polish 20260720 */
@media (max-width: 900px) {
  :root {
    --mobile-card-shadow: 0 10px 26px rgba(15, 23, 42, .07);
  }

  body {
    background: #f3f6fa !important;
  }

  .workspace {
    background: #f3f6fa !important;
  }

  .page-content {
    padding: 12px !important;
  }

  .page-view:not(.active) {
    display: none !important;
  }

  .page-view.active:not(#page-calendar) {
    display: block !important;
  }

  .sidebar {
    background: #fff !important;
    border-bottom: 1px solid #dbe4ef !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.08) !important;
  }

  .sidebar .brand-logo-wrap {
    height: 58px !important;
    min-height: 58px !important;
    padding: 7px 12px !important;
    justify-content: center !important;
  }

  .sidebar .brand-logo {
    width: 156px !important;
    max-height: 46px !important;
    object-fit: contain !important;
  }

  .nav {
    gap: 7px !important;
    padding: 8px 10px 10px !important;
    background: #fff !important;
  }

  .nav a {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid #dbe4ef !important;
    background: #f8fafc !important;
    color: #334155 !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  .nav a.active {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #fff !important;
  }

  .topbar {
    padding: 14px 14px 12px !important;
    background: #fff !important;
    border-bottom: 1px solid #dbe4ef !important;
  }

  .topbar h1 {
    font-size: 21px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
  }

  .topbar .lead {
    margin-top: 4px !important;
    font-size: 12px !important;
    line-height: 1.42 !important;
  }

  .auth-userbar {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
    align-items: center !important;
    margin-top: 10px !important;
  }

  .auth-userbar span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .auth-userbar button {
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
  }

  .panel,
  .wide-panel {
    padding: 14px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: var(--mobile-card-shadow) !important;
  }

  .panel + .panel,
  .page-view > section + section {
    margin-top: 12px !important;
  }

  .panel-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e5edf6 !important;
  }

  .panel-head h2 {
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
  }

  .eyebrow,
  .modal-eyebrow {
    font-size: 10px !important;
    letter-spacing: .08em !important;
  }

  .primary-button,
  .ghost-button,
  .danger-button,
  .mini-button,
  .icon-button {
    min-height: 40px !important;
    border-radius: 10px !important;
    font-weight: 900 !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  .dashboard-work-grid,
  .dashboard-support-grid,
  .metrics,
  .content-grid,
  .client-columns,
  .client-main-grid,
  .asset-basic-grid,
  .operation-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .dashboard-work-panel,
  .dashboard-support-panel {
    padding: 13px !important;
  }

  .today-agenda-list,
  .support-list {
    display: grid !important;
    gap: 9px !important;
    max-height: none !important;
  }

  .agenda-card,
  .support-item {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    min-height: 0 !important;
    padding: 12px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(15,23,42,.04) !important;
    text-align: left !important;
  }

  .agenda-kind,
  .pill {
    width: fit-content !important;
    max-width: 100% !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .client-filterbar,
  .inventory-filterbar,
  .asset-filterbar,
  .operation-filterbar,
  .job-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .client-search-box,
  .inventory-search-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .client-result-meta,
  .inventory-result-meta {
    padding: 2px 2px 8px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #64748b !important;
  }

  .data-list,
  .list,
  #jobList.operation-table,
  #clientList.client-table,
  #assetList,
  .inv-unified-table {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
  }

  .asset-list-header,
  .client-table-head,
  .operation-table-head,
  .inv-grid-head,
  .inventory-item-head,
  .asset-unified-head {
    display: none !important;
  }

  .record,
  .record.client-table-row,
  .asset-row,
  .operation-preview-row.operation-table-row,
  .operation-table-row,
  .inv-grid-item,
  .list-item {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    padding: 14px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.055) !important;
    text-align: left !important;
  }

  .record > *,
  .asset-row > *,
  .operation-table-row > *,
  .inv-grid-item > * {
    min-width: 0 !important;
  }

  .asset-row > div:not(.record-actions),
  .record.client-table-row > div:not(.record-actions),
  .record.client-table-row > span,
  .operation-table-row > div {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    color: #334155 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .asset-row > div:not(.record-actions)::before,
  .record.client-table-row > div:not(.record-actions)::before,
  .record.client-table-row > span::before {
    display: block !important;
    width: auto !important;
    margin-bottom: 2px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  .asset-row > div:nth-child(1)::before { content: "품목코드" !important; }
  .asset-row > div:nth-child(2)::before { content: "품목명" !important; }
  .asset-row > div:nth-child(3)::before { content: "모델/기종" !important; }
  .asset-row > div:nth-child(4)::before { content: "규격" !important; }
  .asset-row > div:nth-child(5)::before { content: "옵션" !important; }
  .asset-row > div:nth-child(6)::before { content: "보유" !important; }

  .asset-row > div:nth-child(1),
  .asset-row > div:nth-child(2) {
    font-weight: 900 !important;
    color: #0f172a !important;
  }

  .record.client-table-row > div:nth-child(1)::before { content: "거래처" !important; }
  .record.client-table-row > div:nth-child(2)::before,
  .record.client-table-row > span:nth-child(2)::before { content: "주소" !important; }
  .record.client-table-row > div:nth-child(3)::before,
  .record.client-table-row > span:nth-child(3)::before { content: "장비정보" !important; }
  .record.client-table-row > div:nth-child(4)::before,
  .record.client-table-row > span:nth-child(4)::before { content: "계약매수" !important; }

  .record-actions,
  .operation-preview-actions,
  .detail-actions,
  .panel-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 4px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e5edf6 !important;
  }

  .record-actions button,
  .operation-preview-actions button,
  .detail-actions button,
  .panel-actions button {
    width: 100% !important;
    min-width: 0 !important;
  }

  #jobList .operation-preview-main strong,
  #jobList .operation-preview-items strong {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
  }

  #jobList .operation-preview-main span,
  #jobList .operation-preview-items span {
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  #jobList .operation-preview-dates {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #jobList .operation-preview-dates span {
    padding: 9px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  #jobList .operation-preview-status {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .inv-grid-item {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .inv-category-cell,
  .inv-product-info {
    grid-column: 1 / -1 !important;
  }

  .inv-category-cell {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 4px 9px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    opacity: 1 !important;
  }

  .inv-product-info {
    padding-bottom: 8px !important;
    border-bottom: 1px solid #eef2f7 !important;
  }

  .inv-product-info strong {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
  }

  .inv-product-info span {
    margin-top: 4px !important;
    font-size: 12px !important;
    color: #64748b !important;
    white-space: normal !important;
  }

  .inv-grid-item > em,
  .inv-grid-item > .qty-bar-wrap {
    min-height: 56px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 8px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    font-style: normal !important;
  }

  .inv-grid-item > em::before,
  .inv-grid-item > .qty-bar-wrap::before {
    display: block !important;
    width: auto !important;
    margin: 0 0 4px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  .inv-grid-item > em:nth-of-type(1)::before { content: "총 개수" !important; }
  .inv-grid-item > .qty-bar-wrap::before { content: "현재고" !important; }
  .inv-grid-item > em:nth-of-type(2)::before { content: "렌탈중" !important; }
  .inv-grid-item > em:nth-of-type(3)::before { content: "출고준비" !important; }
  .inv-grid-item > em:nth-of-type(4)::before { content: "점검/수리" !important; }

  .qty-bar-bg,
  .qty-bar-fill {
    display: none !important;
  }

  .qty-bar-text {
    position: static !important;
    color: #15803d !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  .asset-detail,
  .client-detail,
  .contract-detail {
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .asset-detail-header,
  .client-detail-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .asset-stock-widget {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .stock-node,
  .detail-field {
    border-radius: 10px !important;
  }

  .erp-modal,
  #modal-asset,
  #modal-job,
  #modal-client,
  #modal-event-detail,
  .item-search-modal,
  .file-preview-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    border-radius: 16px !important;
  }

  .erp-modal .modal-header {
    min-height: 54px !important;
    padding: 0 14px !important;
  }

  .erp-modal form,
  .asset-register-form,
  .operation-register-form,
  .schedule-form {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }

  .modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px 0 0 !important;
    background: #fff !important;
  }
}

@media (max-width: 520px) {
  .page-content {
    padding: 9px !important;
  }

  .panel,
  .wide-panel {
    padding: 12px !important;
    border-radius: 13px !important;
  }

  .auth-userbar {
    grid-template-columns: 1fr !important;
  }

  .auth-userbar button {
    width: 100% !important;
  }

  .record-actions,
  .operation-preview-actions,
  .detail-actions,
  .panel-actions,
  .modal-actions {
    grid-template-columns: 1fr !important;
  }

  #jobList .operation-preview-dates,
  .inv-grid-item,
  .asset-stock-widget {
    grid-template-columns: 1fr !important;
  }
}


/* Remember login ID 20260720 */
.auth-remember-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin: -4px 0 4px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer;
}
.auth-remember-row input {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  accent-color: #2563eb;
}
.auth-remember-row span {
  line-height: 1 !important;
}


/* HMPM mobile workflow final pass 20260721 */
@media (max-width: 900px) {
  /* Shared workflow pages */
  #page-operations .panel-head,
  #page-inventory .panel-head,
  #page-contracts .panel-head,
  #page-assets .panel-head {
    position: sticky !important;
    top: 105px !important;
    z-index: 12 !important;
    margin: -14px -14px 12px !important;
    padding: 13px 14px !important;
    border-bottom: 1px solid #dbe4ef !important;
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(8px);
  }

  #page-operations .panel-head h2,
  #page-inventory .panel-head h2,
  #page-contracts .panel-head h2,
  #page-assets .panel-head h2 {
    font-size: 19px !important;
    letter-spacing: 0 !important;
  }

  #page-operations .wide-panel,
  #page-inventory .wide-panel,
  #page-contracts .wide-panel,
  #page-assets .wide-panel {
    padding-top: 14px !important;
  }

  /* Operations: make filter tabs and job cards feel native on mobile */
  .operation-head-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    width: 100% !important;
  }

  .operation-filter-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 4px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 14px !important;
    background: #f1f5f9 !important;
  }

  .operation-filter-btn {
    width: 100% !important;
    min-height: 40px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: transparent !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  .operation-filter-btn.is-active {
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(37,99,235,.22) !important;
  }

  .operation-filter-btn span {
    display: inline-grid !important;
    place-items: center !important;
    min-width: 22px !important;
    height: 22px !important;
    margin-left: 5px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.72) !important;
    color: #1d4ed8 !important;
    font-size: 11px !important;
  }

  .operation-filter-btn.is-active span {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
  }

  #page-operations .operation-head-actions > .primary-button {
    min-height: 44px !important;
    border-radius: 13px !important;
  }

  #jobList.operation-table,
  #jobList.list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  #jobList .operation-preview-row.operation-table-row {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
    gap: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  #jobList .operation-preview-row.operation-table-row:active {
    transform: scale(0.98) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  }

  #jobList .operation-preview-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  #jobList .operation-preview-status {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 2px !important;
  }

  #jobList .operation-preview-status .pill {
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
  }

  #jobList .operation-preview-main strong {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.3px !important;
  }

  #jobList .operation-preview-dates {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 2px !important;
  }
  
  #jobList .operation-preview-dates span {
    padding: 6px 10px !important;
    border-radius: 8px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  #jobList .operation-preview-items {
    padding: 14px !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 4px !important;
  }
  
  #jobList .operation-preview-items span {
    font-size: 14px !important;
    color: #334155 !important;
    line-height: 1.4 !important;
  }

  #jobList .operation-preview-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding-top: 14px !important;
    border-top: 1px dashed #e2e8f0 !important;
    margin-top: 2px !important;
  }

  /* Inventory: less bulky, clearer stock figures */
  #inventory .inventory-filterbar {
    margin-bottom: 8px !important;
  }

  #inventory .inventory-search-box input {
    background: #fff !important;
  }

  .inv-unified-table {
    gap: 16px !important;
  }

  .inv-grid-item {
    padding: 20px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  .inv-category-cell {
    margin-bottom: -2px !important;
  }

  .inv-product-info {
    border-bottom: 0 !important;
    padding-bottom: 2px !important;
  }

  .inv-product-info strong {
    display: block !important;
    line-height: 1.32 !important;
  }

  .inv-grid-item > em,
  .inv-grid-item > .qty-bar-wrap {
    min-height: 50px !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
  }

  .inv-grid-item > .qty-bar-wrap {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
  }

  .inv-grid-item > .qty-bar-wrap::before {
    color: #15803d !important;
  }

  .inv-grid-item > em:nth-of-type(2) {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
  }

  .inv-grid-item > em:nth-of-type(3) {
    background: #fff7ed !important;
    border-color: #fed7aa !important;
  }

  .inv-grid-item > em:nth-of-type(4) {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
  }

  /* Contracts: turn generic rows into readable contract cards */
  #contractList.data-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  #contractList .record {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  #contractList .record > div:not(.record-actions),
  #contractList .record > span,
  #contractList .record > strong {
    display: flex !important;
    flex-direction: column !important;
    color: #334155 !important;
    font-size: 14px !important;
  }

  #contractList .record > div:first-child {
    padding-right: 0 !important;
  }

  #contractList .record > div:first-child strong,
  #contractList .record > div:first-child > :first-child,
  #contractList .record > strong:first-child {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: 2px !important;
  }

  #contractList .record > div:not(.record-actions)::before,
  #contractList .record > span::before {
    display: block !important;
    margin-bottom: 4px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  #contractList .record > div:nth-child(1)::before { content: "거래처 / 품목" !important; }
  #contractList .record > span:nth-child(2)::before,
  #contractList .record > div:nth-child(2)::before { content: "계약구분" !important; }
  #contractList .record > span:nth-child(3)::before,
  #contractList .record > div:nth-child(3)::before { content: "계약기간" !important; }
  #contractList .record > span:nth-child(4)::before,
  #contractList .record > div:nth-child(4)::before { content: "렌탈료" !important; }

  #contractList .record > div:nth-child(5) {
    flex-direction: row !important;
    align-items: center !important;
    margin-top: 4px !important;
  }

  #contractList .record .pill {
    position: static !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
  }

  #contractList .record-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding-top: 14px !important;
    border-top: 1px dashed #e2e8f0 !important;
    margin-top: 2px !important;
  }

  .contract-detail .detail-head,
  .asset-detail .asset-detail-header {
    padding: 15px !important;
  }

  .contract-edit-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
    border-top: 1px solid #e5edf6 !important;
    background: #fbfdff !important;
  }

  .contract-edit-form button {
    width: 100% !important;
  }

  /* Assets: compact but readable master list */
  #assetList.data-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .asset-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  .asset-row > div:nth-child(1) {
    align-self: flex-start !important;
  }

  .asset-row > div:nth-child(1) {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: 100% !important;
    padding: 4px 9px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 12px !important;
  }

  .asset-row > div:nth-child(1)::before {
    display: none !important;
  }

  .asset-row > div:nth-child(2) {
    font-size: 17px !important;
    line-height: 1.3 !important;
  }

  .asset-row > div:nth-child(6) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 12px !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
    font-weight: 900 !important;
  }

  .asset-row .record-actions {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .asset-detail {
    margin-top: 12px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.07) !important;
  }

  .asset-title {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  .asset-meta,
  .asset-note {
    font-size: 12px !important;
    line-height: 1.48 !important;
  }

  .asset-stock-widget {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  #page-operations .panel-head,
  #page-inventory .panel-head,
  #page-contracts .panel-head,
  #page-assets .panel-head {
    top: 95px !important;
  }

  #jobList .operation-preview-actions,
  #contractList .record-actions,
  .asset-row .record-actions {
    grid-template-columns: 1fr !important;
  }

  .asset-row {
    grid-template-columns: 1fr !important;
  }

  #contractList .record > div:first-child {
    padding-right: 0 !important;
  }

  #contractList .record .pill {
    position: static !important;
    justify-self: start !important;
  }
}


/* Client detail modal 20260721 */
.client-detail-modal {
  width: min(760px, calc(100vw - 28px));
  max-width: min(760px, calc(100vw - 28px));
  border-radius: 18px;
  overflow: hidden;
}
.client-detail-modal-body {
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 0;
  background: #fff;
}
.client-detail-modal-body .detail-head {
  border-radius: 0;
}
.client-detail-modal-actions {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid #e5edf6;
  background: #fff;
}
@media (max-width: 760px) {
  #clientDetail.client-detail {
    display: none !important;
  }
  .client-detail-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
  .client-detail-modal-body {
    max-height: calc(100vh - 138px) !important;
  }
  .client-detail-modal-body .detail-head {
    padding: 14px !important;
  }
  .client-detail-modal-body .detail-grid {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }
  .client-detail-modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
  }
  .client-detail-modal-actions button {
    width: 100% !important;
  }
}


/* ERP control polish and client modal fix 20260721 */
button,
.primary-button,
.ghost-button,
.mini-button,
.icon-button,
.delete-button,
.danger-button {
  letter-spacing: 0 !important;
  font-family: inherit !important;
}

.primary-button,
.ghost-button,
.mini-button,
.icon-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.primary-button {
  border: 1px solid #2563eb !important;
  background: linear-gradient(180deg, #3478f6, #2563eb) !important;
  color: #fff !important;
}

.primary-button:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
}

.ghost-button,
.mini-button,
.icon-button {
  border: 1px solid #cbd7e6 !important;
  background: linear-gradient(180deg, #fff, #f8fafc) !important;
  color: #0f172a !important;
}

.ghost-button:hover,
.mini-button:hover,
.icon-button:hover {
  border-color: #94a3b8 !important;
  background: #f1f5f9 !important;
}

.delete-button {
  border-color: #fecaca !important;
  color: #dc2626 !important;
  background: #fff !important;
}

.delete-button:hover {
  background: #fff1f2 !important;
}

.client-filterbar,
.inventory-filterbar {
  border: 1px solid #d8e3ef !important;
  background: #f8fbff !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

.client-search-box,
.inventory-search-box {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.client-search-box input,
.inventory-search-box input,
.client-filterbar select,
.inventory-filterbar select {
  height: 42px !important;
  min-height: 42px !important;
  border: 1px solid #cbd7e6 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.035) !important;
}

.client-search-box input::placeholder,
.inventory-search-box input::placeholder {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

.client-search-box .icon-button,
.inventory-search-box .icon-button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  font-size: 0 !important;
  position: relative;
}

.client-search-box .icon-button::before,
.inventory-search-box .icon-button::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: translate(-1px, -1px);
}

.client-search-box .icon-button::after,
.inventory-search-box .icon-button::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(9px, 9px) rotate(45deg);
}

@media (max-width: 900px) {
  .client-filterbar,
  .inventory-filterbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    background: #f7faff !important;
  }

  .client-search-box,
  .inventory-search-box {
    grid-template-columns: minmax(0, 1fr) 46px !important;
  }

  .client-search-box input,
  .inventory-search-box input,
  .client-filterbar select,
  .inventory-filterbar select,
  .client-filterbar .ghost-button,
  .inventory-filterbar .ghost-button {
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }

  .client-search-box .icon-button,
  .inventory-search-box .icon-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
  }

  .client-filterbar .ghost-button,
  .inventory-filterbar .ghost-button {
    width: 100% !important;
    background: #fff !important;
    color: #0f172a !important;
  }

  .record-actions,
  .operation-preview-actions,
  .detail-actions,
  .panel-actions,
  .modal-actions {
    gap: 7px !important;
  }

  .record-actions button,
  .operation-preview-actions button,
  .detail-actions button,
  .panel-actions button,
  .modal-actions button {
    min-height: 42px !important;
    border-radius: 11px !important;
    font-size: 13px !important;
  }

  .record.client-table-row {
    cursor: pointer !important;
  }

  .record.client-table-row:active {
    transform: translateY(1px);
    background: #f8fbff !important;
  }

  .client-detail-modal .modal-header h3 {
    font-size: 18px !important;
    font-weight: 900 !important;
  }

  .client-detail-modal-body .detail-head {
    background: #f8fbff !important;
  }
}


/* executive mobile ERP polish 20260721 */
.primary-button,
.ghost-button,
.mini-button,
.icon-button,
.delete-button,
.danger-button,
button {
  border-radius: 8px;
  letter-spacing: 0;
}

.client-filterbar,
.inventory-filterbar,
.contract-filterbar,
.operation-filterbar {
  border: 1px solid #d6e1ef !important;
  background: #f8fbff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 1px 2px rgba(15,23,42,.04) !important;
}

.client-search-box,
.inventory-search-box {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  align-items: center !important;
}

.client-search-box input,
.inventory-search-box input {
  min-width: 0 !important;
}

.client-search-box .icon-button,
.inventory-search-box .icon-button {
  display: inline-flex !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  align-self: stretch !important;
}

@media (max-width: 900px) {
  .client-filterbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    margin: 0 0 12px !important;
  }

  .client-search-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .client-search-box input {
    grid-column: auto !important;
    width: 100% !important;
    height: 48px !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .client-search-box .icon-button {
    grid-column: auto !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
    color: #0f172a !important;
  }

  .client-filterbar select,
  .client-filterbar .ghost-button {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border: 1px solid #cbd7e6 !important;
    background-color: #fff !important;
  }

  .client-filterbar .ghost-button {
    justify-content: center !important;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
  }

  .client-result-meta {
    margin: 2px 2px 8px !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .client-table-head {
    display: none !important;
  }

  .record.client-table-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    padding: 14px !important;
    margin: 0 0 10px !important;
    border: 1px solid #d9e4f2 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.06) !important;
  }

  .record.client-table-row:hover {
    border-color: #b8c8dc !important;
  }

  .record.client-table-row > div {
    min-width: 0 !important;
  }

  .record.client-table-row .record-main,
  .record.client-table-row > div:first-child {
    grid-column: 1 / 2 !important;
  }

  .record.client-table-row .record-actions {
    grid-column: 2 / 3 !important;
    grid-row: 1 / span 4 !important;
    align-self: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  .record.client-table-row .record-actions button {
    min-width: 58px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .client-detail-modal {
    width: min(94vw, 560px) !important;
    max-height: 88dvh !important;
    border-radius: 18px !important;
  }

  .client-detail-modal .modal-header,
  .client-detail-modal .modal-actions {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .client-detail-modal-body {
    padding: 14px 16px !important;
  }

  .client-detail-modal-body .detail-head {
    border-radius: 14px !important;
    border: 1px solid #d9e4f2 !important;
  }

  .client-detail-modal-body .detail-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    border: 1px solid #d9e4f2 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .client-detail-modal-body .detail-field {
    border: 0 !important;
    border-bottom: 1px solid #e4ebf5 !important;
    border-radius: 0 !important;
    padding: 12px 13px !important;
  }

  .client-detail-modal-body .detail-field:last-child {
    border-bottom: 0 !important;
  }
}


/* client delivery modal visibility fix 20260721 */
.client-detail-modal {
  display: none;
}

.client-detail-modal[open] {
  display: flex !important;
  flex-direction: column !important;
}

.client-detail-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.client-detail-modal-actions {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 2 !important;
}

.client-delivery-section {
  margin: 14px 0 4px !important;
}

.client-delivery-box {
  min-height: 86px !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 760px) {
  .client-detail-modal {
    height: min(88dvh, 720px) !important;
    max-height: calc(100dvh - 18px) !important;
  }

  .client-detail-modal-body {
    max-height: none !important;
    padding-bottom: 24px !important;
  }

  .client-detail-modal-body .client-delivery-section {
    padding-bottom: 10px !important;
  }

  .client-detail-modal-body .client-delivery-box {
    min-height: 104px !important;
    padding: 14px !important;
    line-height: 1.55 !important;
  }

  .client-detail-modal-actions {
    padding: 12px 14px 14px !important;
    border-top: 1px solid #dbe6f3 !important;
    box-shadow: 0 -8px 18px rgba(15,23,42,.06) !important;
  }
}


/* hide noisy result meta bars 20260721 */
.client-result-meta,
.inventory-result-meta {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}


/* mobile asset management executive polish 20260721 */
.asset-detail-modal {
  display: none;
  width: min(820px, calc(100vw - 28px));
  max-width: min(820px, calc(100vw - 28px));
  border-radius: 18px;
  overflow: hidden;
}

.asset-detail-modal[open] {
  display: flex !important;
  flex-direction: column !important;
}

.asset-detail-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: min(72vh, 760px);
  overflow-y: auto !important;
  background: #fff;
}

.asset-detail-modal-actions {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border-top: 1px solid #e1eaf5 !important;
  background: #fff !important;
}

@media (max-width: 900px) {
  #assetDetail.asset-detail {
    display: none !important;
  }

  #assetList.data-list {
    display: grid !important;
    gap: 10px !important;
  }

  .asset-list-header {
    display: none !important;
  }

  .asset-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
    padding: 14px !important;
    border: 1px solid #d7e2f0 !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.055) !important;
    overflow: hidden !important;
  }

  .asset-row > div:not(.record-actions) {
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .asset-row > div:not(.record-actions)::before {
    display: block !important;
    width: auto !important;
    margin-bottom: 3px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
  }

  .asset-row > div:nth-child(1) {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    display: block !important;
    color: #2563eb !important;
  }

  .asset-row > div:nth-child(1)::before { content: "품목코드" !important; }
  .asset-row > div:nth-child(2)::before { content: "품목명" !important; }
  .asset-row > div:nth-child(3)::before { content: "모델/기종" !important; }
  .asset-row > div:nth-child(4)::before { content: "규격" !important; }
  .asset-row > div:nth-child(5)::before { content: "옵션" !important; }
  .asset-row > div:nth-child(6)::before { content: "보유" !important; }

  .asset-row > div:nth-child(2) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .asset-row > div:nth-child(2) span,
  .asset-row > div:nth-child(2) strong {
    color: #0f172a !important;
    font-size: 17px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }

  .asset-row > div:nth-child(3),
  .asset-row > div:nth-child(4),
  .asset-row > div:nth-child(5) {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 750 !important;
  }

  .asset-row > div:nth-child(6) {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    align-self: start !important;
    min-width: 72px !important;
    padding: 8px 10px !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 999px !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
    text-align: center !important;
    font-weight: 950 !important;
  }

  .asset-row > div:nth-child(6)::before {
    display: none !important;
  }

  .asset-row .record-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin-top: 6px !important;
  }

  .asset-row .record-actions button {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 11px !important;
    font-size: 13px !important;
  }

  .asset-row > div:not(.record-actions) > span,
  .asset-row > div:not(.record-actions) > strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .asset-detail-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: min(90dvh, 760px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 18px !important;
  }

  .asset-detail-modal-body {
    max-height: none !important;
    padding: 0 !important;
  }

  .asset-detail-modal-body .asset-detail {
    display: block !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .asset-detail-modal-body .asset-detail-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  .asset-detail-modal-body .asset-title {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  .asset-detail-modal-body .asset-meta,
  .asset-detail-modal-body .asset-note {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .asset-detail-modal-body .asset-stock-widget {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .asset-detail-modal-body .stock-node {
    min-height: 72px !important;
    border-radius: 13px !important;
  }

  .asset-detail-modal-body .asset-history-section {
    padding: 0 16px 18px !important;
  }

  .asset-detail-modal-body .asset-unified-head {
    display: none !important;
  }

  .asset-detail-modal-body .asset-unified-table {
    display: grid !important;
    gap: 8px !important;
    border: 0 !important;
    background: transparent !important;
  }

  .asset-detail-modal-body .asset-unified-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 7px 10px !important;
    padding: 12px !important;
    border: 1px solid #d9e4f2 !important;
    border-radius: 13px !important;
    background: #fff !important;
  }

  .asset-detail-modal-body .asset-unified-row > * {
    min-width: 0 !important;
  }

  .asset-detail-modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px 14px 14px !important;
    box-shadow: 0 -8px 18px rgba(15,23,42,.06) !important;
  }
}


/* asset card rebuild final 20260721 */
.asset-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.055);
  cursor: pointer;
}

.asset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-card-code {
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.asset-card-qty {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 13px;
  font-weight: 950;
}

.asset-card-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.25;
  text-align: left;
}

.asset-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-card-field {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e3ebf5;
  border-radius: 11px;
  background: #f8fbff;
  text-align: left;
}

.asset-card-field span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.asset-card-field b {
  display: block;
  color: #172033;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.asset-card-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.asset-card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
}

@media (max-width: 900px) {
  #assetList.data-list {
    display: grid !important;
    gap: 11px !important;
  }

  #assetList .asset-list-header,
  #assetList .asset-row {
    display: none !important;
  }

  .asset-card {
    margin: 0 !important;
    text-align: left !important;
  }

  .asset-card-title,
  .asset-card * {
    letter-spacing: 0 !important;
  }
}

@media (max-width: 420px) {
  .asset-card {
    padding: 14px;
    border-radius: 14px;
  }

  .asset-card-meta {
    grid-template-columns: 1fr;
  }

  .asset-card-actions {
    grid-template-columns: 1fr !important;
  }
}


/* asset detail history card polish 20260721 */
.asset-history-date {
  color: #0f172a;
  font-weight: 900;
}

.asset-history-client {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.asset-history-client .text-link {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  color: #0f172a;
  font-weight: 900;
  text-align: left;
  white-space: normal;
}

.asset-history-address {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.asset-history-qty {
  color: #0f172a;
  font-weight: 950;
}

.asset-history-action {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .asset-detail-modal-body .asset-history-section h3 {
    margin: 0 0 10px !important;
    font-size: 15px !important;
    font-weight: 950 !important;
  }

  .asset-detail-modal-body .asset-unified-head {
    display: none !important;
  }

  .asset-detail-modal-body .asset-unified-row:not(.asset-unified-head) {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px 10px !important;
    padding: 13px !important;
    border: 1px solid #d9e4f2 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(15,23,42,.04) !important;
  }

  .asset-detail-modal-body .asset-history-date {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  .asset-detail-modal-body .asset-history-status {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: end !important;
  }

  .asset-detail-modal-body .asset-history-client {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .asset-detail-modal-body .asset-history-qty {
    grid-column: 1 / 2 !important;
    grid-row: 3 !important;
    align-self: center !important;
    padding: 7px 10px !important;
    width: fit-content !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
  }

  .asset-detail-modal-body .asset-history-action {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    align-self: center !important;
    justify-self: end !important;
  }

  .asset-detail-modal-body .asset-history-action .mini-button {
    min-width: 72px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 9px !important;
  }
}


/* desktop asset table polish 20260721 */
@media (min-width: 901px) {
  #page-assets #assetList.data-list {
    display: block !important;
    border: 1px solid #cfdbea !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  #page-assets .asset-list-header {
    display: grid !important;
    grid-template-columns: 128px minmax(220px, 1.6fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(140px, 1fr) 96px 244px !important;
    align-items: center !important;
    gap: 0 !important;
    min-height: 46px !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #b9c9dc !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #f2f7fd, #e7eff8) !important;
  }

  #page-assets .asset-list-header span {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 16px !important;
    color: #18304f !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    border-right: 1px solid #d4e0ee !important;
  }

  #page-assets .asset-list-header span:last-child {
    border-right: 0 !important;
  }

  #page-assets .asset-card {
    display: grid !important;
    grid-template-columns: 128px minmax(220px, 1.6fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(140px, 1fr) 96px 244px !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 0 !important;
    min-height: 70px !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e0e8f2 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  #page-assets .asset-card:last-child {
    border-bottom: 0 !important;
  }

  #page-assets .asset-card:hover {
    background: #f8fbff !important;
  }

  #page-assets .asset-card.is-selected {
    background: #eef6ff !important;
    box-shadow: inset 3px 0 0 #2563eb !important;
  }

  #page-assets .asset-card-top,
  #page-assets .asset-card-meta {
    display: contents !important;
  }

  #page-assets .asset-card-code {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    justify-self: start !important;
    margin-left: 16px !important;
    max-width: calc(100% - 28px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #page-assets .asset-card-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    padding: 15px 16px 2px !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #page-assets .asset-card-field {
    min-width: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  #page-assets .asset-card-field span {
    display: none !important;
  }

  #page-assets .asset-card-field b {
    display: block !important;
    color: #263c5a !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #page-assets .asset-card-field:nth-child(1) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    padding-top: 2px !important;
    padding-bottom: 14px !important;
  }

  #page-assets .asset-card-field:nth-child(1) span {
    display: inline !important;
    margin: 0 6px 0 0 !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  #page-assets .asset-card-field:nth-child(1) b {
    display: inline !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  #page-assets .asset-card-field:nth-child(2) {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
  }

  #page-assets .asset-card-field:nth-child(3) {
    grid-column: 4 !important;
    grid-row: 1 / span 2 !important;
  }

  #page-assets .asset-card-field:nth-child(4) {
    grid-column: 5 !important;
    grid-row: 1 / span 2 !important;
  }

  #page-assets .asset-card-qty {
    grid-column: 6 !important;
    grid-row: 1 / span 2 !important;
    justify-self: center !important;
    min-width: 58px !important;
    text-align: center !important;
  }

  #page-assets .asset-card-actions {
    grid-column: 7 !important;
    grid-row: 1 / span 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 0 14px !important;
    min-width: 0 !important;
  }

  #page-assets .asset-card-actions button {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }
}


/* inventory current stock alignment fix 20260721 */
@media (max-width: 900px) {
  .inv-grid-item > em,
  .inv-grid-item > .qty-bar-wrap {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .inv-grid-item > em::before,
  .inv-grid-item > .qty-bar-wrap::before {
    width: 100% !important;
    margin: 0 0 6px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .inv-grid-item > em:nth-of-type(1)::before { content: "총 개수" !important; }
  .inv-grid-item > .qty-bar-wrap::before { content: "현재고" !important; }
  .inv-grid-item > em:nth-of-type(2)::before { content: "렌탈중" !important; }
  .inv-grid-item > em:nth-of-type(3)::before { content: "출고준비" !important; }
  .inv-grid-item > em:nth-of-type(4)::before { content: "점검/수리" !important; }

  .inv-grid-item > .qty-bar-wrap .qty-bar-bg,
  .inv-grid-item > .qty-bar-wrap .qty-bar-fill {
    display: none !important;
  }

  .inv-grid-item > .qty-bar-wrap .qty-bar-text {
    position: static !important;
    display: block !important;
    width: 100% !important;
    color: #15803d !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    transform: none !important;
  }
}


/* asset history desktop column fix 20260721 */
.asset-unified-row {
  grid-template-columns: 116px minmax(130px, 1fr) minmax(220px, 1.5fr) 88px 82px 100px 76px !important;
}

.asset-unified-row .asset-history-client,
.asset-unified-row .asset-history-address,
.asset-unified-row .asset-history-kind,
.asset-unified-row .asset-history-qty,
.asset-unified-row .asset-history-status,
.asset-unified-row .asset-history-action {
  align-self: center !important;
}

.asset-unified-row .asset-history-address {
  display: block !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.asset-unified-row .asset-history-kind,
.asset-unified-row .asset-history-qty {
  text-align: center !important;
}

.asset-unified-row .asset-history-status,
.asset-unified-row .asset-history-action {
  justify-self: center !important;
}

@media (max-width: 900px) {
  .asset-detail-modal-body .asset-unified-row:not(.asset-unified-head) {
    grid-template-columns: 1fr auto !important;
  }

  .asset-detail-modal-body .asset-history-date {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
  }

  .asset-detail-modal-body .asset-history-status {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
  }

  .asset-detail-modal-body .asset-history-client {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .asset-detail-modal-body .asset-history-address {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .asset-detail-modal-body .asset-history-kind {
    grid-column: 1 / 2 !important;
    grid-row: 4 !important;
    justify-self: start !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  .asset-detail-modal-body .asset-history-kind::before {
    content: "종류 ";
    color: #94a3b8;
    font-weight: 900;
  }

  .asset-detail-modal-body .asset-history-qty {
    grid-column: 1 / 2 !important;
    grid-row: 5 !important;
  }

  .asset-detail-modal-body .asset-history-action {
    grid-column: 2 / 3 !important;
    grid-row: 5 !important;
  }
}


/* asset history table line comfort 20260721 */
@media (min-width: 901px) {
  .asset-history-section {
    padding: 18px 20px 22px !important;
  }

  .asset-unified-table {
    border: 1px solid #d8e3ef !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .asset-unified-row {
    min-height: 52px !important;
    padding: 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
  }

  .asset-unified-row:last-child {
    border-bottom: 0 !important;
  }

  .asset-unified-head {
    min-height: 42px !important;
    background: #edf4fb !important;
    border-bottom: 1px solid #d3dfed !important;
  }

  .asset-unified-head span {
    color: #263c5a !important;
    font-size: 12px !important;
    font-weight: 950 !important;
  }

  .asset-unified-row > span,
  .asset-unified-row > strong,
  .asset-unified-row .asset-history-client,
  .asset-unified-row .asset-history-action {
    padding: 0 14px !important;
  }

  .asset-unified-row .asset-history-date,
  .asset-unified-row .asset-history-kind,
  .asset-unified-row .asset-history-qty {
    display: flex !important;
    align-items: center !important;
  }

  .asset-unified-row .asset-history-kind,
  .asset-unified-row .asset-history-qty {
    justify-content: center !important;
  }

  .asset-unified-row .asset-history-status {
    justify-self: center !important;
    min-width: 72px !important;
    justify-content: center !important;
  }

  .asset-unified-row .asset-history-action {
    justify-content: center !important;
  }

  .asset-unified-row .asset-history-action .mini-button {
    height: 34px !important;
    min-height: 34px !important;
    min-width: 58px !important;
    border-radius: 8px !important;
  }
}


/* asset history exact column alignment 20260721 */
@media (min-width: 901px) {
  .asset-unified-row {
    grid-template-columns: 116px minmax(130px, 1fr) minmax(220px, 1.5fr) 88px 82px 100px 76px !important;
    column-gap: 0 !important;
  }

  .asset-unified-head span,
  .asset-unified-row > span,
  .asset-unified-row > strong,
  .asset-unified-row .asset-history-client,
  .asset-unified-row .asset-history-action {
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .asset-unified-head span {
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
  }

  .asset-unified-head span:nth-child(4),
  .asset-unified-head span:nth-child(5),
  .asset-unified-head span:nth-child(6),
  .asset-unified-row .asset-history-kind,
  .asset-unified-row .asset-history-qty,
  .asset-unified-row .asset-history-status {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
    justify-self: stretch !important;
    text-align: center !important;
  }

  .asset-unified-row .asset-history-status {
    display: inline-flex !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    justify-self: center !important;
  }

  .asset-unified-head span:nth-child(7),
  .asset-unified-row .asset-history-action {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
    justify-self: stretch !important;
  }
}


/* mobile bottom tabbar 20260721 */
.mobile-bottom-nav,
.mobile-more-backdrop,
.mobile-more-sheet { display: none; }

@media (max-width: 900px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
  .sidebar { display: none !important; }
  .workspace { width: 100% !important; }

  .mobile-bottom-nav {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px !important;
    border: 1px solid rgba(203, 213, 225, .92) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0 !important;
    height: 46px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 4px !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active {
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .28) !important;
  }

  .mobile-more-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1190 !important;
    display: block !important;
    background: rgba(15, 23, 42, .34) !important;
  }

  .mobile-more-backdrop[hidden],
  .mobile-more-sheet[hidden] { display: none !important; }

  .mobile-more-sheet {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1210 !important;
    display: grid !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid #d8e3ef !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .2) !important;
  }

  .mobile-more-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 2px 8px !important;
    border-bottom: 1px solid #edf2f7 !important;
  }

  .mobile-more-head strong { font-size: 15px !important; font-weight: 950 !important; }
  .mobile-more-head button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 20px !important;
  }

  .mobile-more-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .mobile-more-list a {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 12px !important;
    background: #f8fbff !important;
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  .mobile-more-list a.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }

  .mobile-schedule-fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
}


/* return complete blue action 20260721 */
.operation-preview-actions .primary-mini:not(:disabled),
#btnGoToEventDetail:not(:disabled),
#returnCompleteForm .primary-button {
  border: 1px solid #1d4ed8 !important;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
  font-weight: 950 !important;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .24) !important;
}

.operation-preview-actions .primary-mini:not(:disabled):hover,
#btnGoToEventDetail:not(:disabled):hover,
#returnCompleteForm .primary-button:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
}

.operation-preview-actions .primary-mini:disabled {
  border-color: #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  box-shadow: none !important;
}


/* mobile operation item summary polish 20260721 */
@media (max-width: 900px) {
  #jobList .operation-preview-items {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px 10px !important;
    padding: 11px 12px !important;
    border: 1px solid #e1eaf5 !important;
    border-radius: 13px !important;
    background: linear-gradient(180deg, #fbfdff, #f5f8fc) !important;
  }

  #jobList .operation-preview-items strong {
    grid-column: 1 / 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 58px !important;
    height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
  }

  #jobList .operation-preview-items span {
    grid-column: 2 / 3 !important;
    display: block !important;
    margin: 0 !important;
    min-width: 0 !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 420px) {
  #jobList .operation-preview-items {
    grid-template-columns: 1fr !important;
  }

  #jobList .operation-preview-items strong,
  #jobList .operation-preview-items span {
    grid-column: 1 / -1 !important;
  }

  #jobList .operation-preview-items strong {
    justify-self: start !important;
  }
}


/* mobile operation hide item count 20260721 */
@media (max-width: 900px) {
  #jobList .operation-preview-items {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #jobList .operation-preview-items strong {
    display: none !important;
  }

  #jobList .operation-preview-items span {
    grid-column: 1 / -1 !important;
  }
}


/* dashboard mobile visibility guard 20260721 */
@media (max-width: 900px) {
  #page-dashboard.page-view.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #page-dashboard.page-view.active .dashboard-work-grid,
  #page-dashboard.page-view.active .dashboard-support-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #page-dashboard.page-view.active .dashboard-work-panel,
  #page-dashboard.page-view.active .dashboard-support-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #todayBoard,
  #todayOpsBoard,
  #weekReturnBoard,
  #readyJobBoard,
  #recentJobBoard {
    min-height: 42px !important;
  }
}


.dashboard-empty-state {
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #cbd8ea;
  border-radius: 10px;
  background: #f8fbff;
  color: #50627c;
  text-align: center;
}
.dashboard-empty-state strong {
  color: #0f1b2d;
  font-size: 15px;
}
.dashboard-empty-state span {
  font-size: 13px;
  color: #64748b;
}


.support-label.is-done {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.support-label.is-rented {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.support-label.is-ready {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.support-label.is-return {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.support-label.is-outbound {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}
