/* KIVRA operating surfaces. Keep food photography and physical label stock distinct. */
.screen:not(.home-screen) :is(h1,h2,h3),
.screen:not(.home-screen) :is(.item-identity,.category-item-main,.product-heading,.user-identity) b {
  color:var(--fx-text)!important;
  letter-spacing:-.025em;
}
.screen:not(.home-screen) :is(.muted,.field-help,.bridge-help,.about-copy),
.screen:not(.home-screen) :is(.category-heading,.history-heading,.product-heading,.print-controls header) p {
  color:var(--fx-muted)!important;
  line-height:1.65;
}
.screen:not(.home-screen) :is(.settings-card,.settings-panel,.form-section,.user-create-panel,.user-directory,.category-list-shell,.history-ledger,.history-empty,.item-master,.print-controls,.date-summary,.batch-table,.storage-location-control) {
  background:linear-gradient(145deg,var(--fx-panel),#fcfcf8)!important;
  color:var(--fx-text)!important;
  border:1px solid var(--fx-line)!important;
  border-radius:var(--fx-radius)!important;
  box-shadow:var(--fx-shadow),inset 0 1px 0 #ffffffb3!important;
}
.screen:not(.home-screen) :is(.settings-page,.admin-page,.simple-page,.category-page,.history-page,.print-workspace,.batch-print-page) {
  min-width:0;
}
.screen:not(.home-screen) :is(.category-heading,.history-heading,.admin-toolbar,.batch-print-head) {
  margin-bottom:22px;
}
.screen:not(.home-screen) :is(.category-heading h1,.history-heading h1,.admin-toolbar h2,.batch-print-head h1) {
  font-size:clamp(24px,2.8vw,32px);
  font-weight:750;
  line-height:1.2;
}
.screen:not(.home-screen) :is(.panel-heading,.admin-toolbar) small,
.screen:not(.home-screen) .batch-print-head small {
  color:var(--fx-accent)!important;
  font-size:10px;
  letter-spacing:.12em;
  line-height:1.5;
}
.screen:not(.home-screen) :is(.panel-heading h2,.print-controls header h2) {
  font-size:21px;
}
.screen:not(.home-screen) :is(.category-list-head,.item-master-head,.history-table-head,.user-directory-head,.batch-table-head) {
  background:#f2f5f0!important;
  color:var(--fx-muted)!important;
  border-color:var(--fx-line)!important;
  letter-spacing:.09em;
  min-height:48px;
}
.screen:not(.home-screen) :is(.category-item-row,.item-master-row,.history-row,.settings-row,.printer-list-row,.user-management-row,.batch-row,.bridge-device) {
  background:transparent!important;
  color:var(--fx-text)!important;
  border-color:var(--fx-line)!important;
  transition:background .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.screen:not(.home-screen) :is(.category-item-row,.item-master-row,.history-row,.settings-row,.printer-list-row):hover,
.screen:not(.home-screen) .scan-results button:hover {
  background:#edf3ee!important;
}
.screen:not(.home-screen) :is(.category-item-row,.item-master-row,.history-row,.settings-row,.printer-list-row):focus-visible {
  outline:2px solid var(--fx-accent)!important;
  outline-offset:-3px;
  background:#e8f1e8!important;
}
.screen:not(.home-screen) :is(.category-item-detail small,.item-identity small,.rule-cell small,.user-identity small,.printer-list-row small,.settings-row b small,.history-row small,.batch-item small,.bridge-device small) {
  color:var(--fx-muted)!important;
  font-size:11px;
  line-height:1.5;
}
.screen:not(.home-screen) :is(.storage-cell,.role-label,.category-item-detail b,.rule-cell b) {
  color:#425d4e!important;
}
.screen:not(.home-screen) :is(.category-item-open,.row-chevron,.settings-row i,.printer-list-row i) {
  color:var(--fx-accent)!important;
}
.screen:not(.home-screen) :is(.class-badge,.user-status,.panel-status) {
  border-radius:8px;
  border:1px solid #dce5db;
  padding:6px 9px;
  line-height:1.2;
}
.screen:not(.home-screen) .class-badge.veg,
.screen:not(.home-screen) :is(.user-status.active,.panel-status.online) {
  background:#e6f1e7!important;
  border-color:#c6dfcc;
  color:#27634d!important;
}
.screen:not(.home-screen) .class-badge.non-veg {
  background:#faece8!important;
  border-color:#edd2cb;
  color:#9a3f43!important;
}
.screen:not(.home-screen) :is(.class-badge.other,.user-status.inactive) {
  background:#f0f3ed!important;
  color:var(--fx-muted)!important;
}
.screen:not(.home-screen) .panel-status.offline {
  background:#fbf0e2!important;
  color:#925d25!important;
}
.screen:not(.home-screen) :is(.admin-search,.category-search,.history-search,.batch-search) {
  min-height:52px;
  padding-inline:16px;
  background:#f5f7f3!important;
  border:1px solid var(--fx-line)!important;
  border-radius:13px!important;
  color:var(--fx-muted)!important;
  box-shadow:inset 0 1px 3px #18392f05!important;
}
.screen:not(.home-screen) :is(.admin-search,.category-search,.history-search,.batch-search) input {
  background:transparent!important;
  color:var(--fx-text)!important;
  font-size:14px;
}
.screen:not(.home-screen) :is(.admin-search,.category-search,.history-search,.batch-search):focus-within {
  border-color:#39775d80!important;
  box-shadow:0 0 0 3px #39775d10!important;
}
.screen:not(.home-screen) input::placeholder {
  color:var(--fx-muted);
  opacity:1;
}
.screen:not(.home-screen) :is(.field>span,fieldset legend) {
  color:#425d4e!important;
  font-size:11px;
  letter-spacing:.055em;
  margin-bottom:8px;
}
.screen:not(.home-screen) :is(.field input,.field select,.inline-create-row input,.batch-filterbar select,.batch-storage,.batch-qty) {
  min-width:0;
  height:50px;
  border:1px solid #dce5db!important;
  border-radius:12px!important;
  background:#f5f7f3!important;
  color:var(--fx-text)!important;
  color-scheme:light;
  padding-inline:14px;
  box-shadow:inset 0 1px 2px #18392f05;
}
.screen:not(.home-screen) :is(.field input,.field select,.inline-create-row input,.batch-filterbar select,.batch-storage,.batch-qty):hover {
  border-color:#bbcdbc!important;
}
.screen:not(.home-screen) :is(.field input,.field select,.inline-create-row input,.batch-filterbar select,.batch-storage,.batch-qty):focus {
  border-color:#39775d9c!important;
  background:#ffffff!important;
  box-shadow:0 0 0 3px #39775d12!important;
  outline:0;
}
.screen:not(.home-screen) .btn {
  border-radius:12px!important;
  min-height:48px;
}
.screen:not(.home-screen) .btn-primary,
.login-dialog .btn-primary {
  background:linear-gradient(120deg,#39775d,#27634d)!important;
  color:#ffffff!important;
  border:1px solid #245940!important;
  box-shadow:0 5px 20px #27634d18,inset 0 1px 0 #ffffff1a!important;
}
.screen:not(.home-screen) .btn-primary:hover,
.login-dialog .btn-primary:hover {
  background:linear-gradient(120deg,#438166,#2d6c53)!important;
  box-shadow:0 8px 24px #27634d24!important;
}
.screen:not(.home-screen) .btn-soft {
  background:#edf3ee!important;
  border:1px solid #dce5db!important;
  color:#425d4e!important;
  box-shadow:none!important;
}
.screen:not(.home-screen) .btn-soft:hover {
  background:#e4eee5!important;
  border-color:#bbcdbc!important;
}
.screen:not(.home-screen) .btn-outline {
  background:#f4f8f2!important;
  border:1px solid #c4d8c6!important;
  color:var(--fx-accent)!important;
  box-shadow:none!important;
}
.screen:not(.home-screen) .btn-outline:hover {
  background:#39775d12!important;
  border-color:#a9c7af!important;
}
.screen:not(.home-screen) .btn-danger {
  background:#faece8!important;
  border:1px solid #edccc8!important;
  color:#9a3f43!important;
}
.screen:not(.home-screen) .btn-danger:hover {
  background:#f6e0da!important;
}
.screen:not(.home-screen) button:disabled {
  opacity:.45;
  cursor:default;
  transform:none!important;
}
.screen:not(.home-screen) :is(.category-back,.print-back,.icon-close,.refresh-bridge) {
  border:1px solid var(--fx-line)!important;
  border-radius:12px!important;
  background:var(--fx-panel-raised)!important;
  color:#425d4e!important;
  box-shadow:none;
}
.screen:not(.home-screen) :is(.category-back,.print-back,.icon-close,.refresh-bridge):hover {
  background:#e8f1e8!important;
  border-color:#b4cdb9!important;
  color:var(--fx-accent)!important;
}
.screen:not(.home-screen) .empty {
  background:transparent!important;
  color:var(--fx-muted)!important;
  padding:30px 20px;
  line-height:1.6;
}
.screen:not(.home-screen) .empty b {
  color:#18392f!important;
  font-size:14px;
}
.screen:not(.home-screen) .empty small {
  font-size:12px;
}
.screen:not(.home-screen) .empty>span,
.screen:not(.home-screen) .history-empty>span {
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  margin-bottom:12px;
  border:1px solid #d2e2d3;
  border-radius:15px;
  background:#e8f1e8!important;
  color:var(--fx-accent)!important;
}
.screen:not(.home-screen) .history-empty>span {margin-bottom:0}
.screen:not(.home-screen) .history-empty :is(h2,p) {color:var(--fx-text)}
.screen:not(.home-screen) .history-empty p {color:var(--fx-muted)!important;line-height:1.6}

/* Catalog, order building and the operational ledger. */
.screen:not(.home-screen) .category-item-row,
.screen:not(.home-screen) .item-master-row {
  min-height:92px;
  padding-block:14px;
}
.screen:not(.home-screen) :is(.category-item-photo,.food-thumb) {
  border-radius:14px;
  border:1px solid #dce5db;
  box-shadow:none;
  background-color:#edf3ee;
}
.screen:not(.home-screen) :is(.category-item-main,.item-identity) b {
  font-size:14px;
}
.screen:not(.home-screen) .history-table {padding:0}
.screen.history-screen:has(.history-table) .history-row {
  background:transparent!important;
  min-height:82px;
}
.screen.history-screen:has(.history-table) .history-row:hover {background:#edf3ee!important}
.screen.history-screen:has(.history-table) .history-row>span:last-child b {
  color:#425d4e!important;
  font-size:11px;
}
.screen.history-screen:has(.history-table) .history-row>span:last-child small {color:#39775d!important}
.screen:not(.home-screen) .batch-row:has(.batch-check input:checked) {
  background:#edf3ee!important;
  box-shadow:inset 3px 0 0 #39775d;
}
.screen:not(.home-screen) .batch-check span {
  border:1px solid #b2c4b4;
  border-radius:7px;
  background:#ffffff;
}
.screen:not(.home-screen) .batch-check input:checked+span {
  background:var(--fx-accent);
  border-color:var(--fx-accent);
}
.screen:not(.home-screen) .batch-check input:checked+span:after {color:#ffffff}
.screen:not(.home-screen) .batch-check:has(input:focus-visible) span {
  outline:2px solid var(--fx-accent);
  outline-offset:4px;
}
.screen:not(.home-screen) .batch-order-bar {
  background:#fffffff0!important;
  border:1px solid #d5e2d4!important;
  border-radius:16px;
  box-shadow:0 12px 40px #18392f12!important;
  backdrop-filter:blur(18px);
}
.screen:not(.home-screen) .batch-order-bar small {color:var(--fx-muted)}

/* Expiry monitoring has muted semantic color, with selected cards clearly outlined. */
.screen:not(.home-screen) .metric-grid {gap:14px;margin-bottom:18px}
.screen:not(.home-screen) .metric {
  min-height:122px;
  padding:22px;
  background:var(--fx-panel)!important;
  border:1px solid var(--fx-line)!important;
  border-radius:18px!important;
  box-shadow:var(--fx-shadow)!important;
}
.screen:not(.home-screen) .metric b {font-size:34px;font-weight:750;letter-spacing:-.04em}
.screen:not(.home-screen) .metric span {color:var(--fx-muted);margin-top:8px;font-size:12px}
.screen:not(.home-screen) .metric.danger {color:#9a3f43!important;border-top-color:#eac9c3!important}
.screen:not(.home-screen) .metric.warning {color:#925d25!important;border-top-color:#eddac0!important}
.screen:not(.home-screen) .metric.info {color:#64518b!important;border-top-color:#dcd0eb!important}
.screen:not(.home-screen) .metric.safe {color:#27634d!important;border-top-color:#c7dccd!important}
.screen:not(.home-screen) .metric.selected {outline:1px solid currentColor!important;outline-offset:3px;background:#f6f8f3!important}
.screen:not(.home-screen) .expiry-list {padding:0;display:grid;gap:10px}
.screen:not(.home-screen) .expiry-row {
  border:1px solid var(--fx-line)!important;
  border-radius:15px;
  background:var(--fx-panel)!important;
  color:var(--fx-text);
  padding:18px 20px 18px 24px;
  margin:0;
  gap:16px;
}
.screen:not(.home-screen) .expiry-row small {color:var(--fx-muted)!important;line-height:1.5}
.screen:not(.home-screen) .expiry-row:before {left:8px;width:3px;top:18px;bottom:18px;background:#925d25!important}
.screen:not(.home-screen) .expiry-row.urgent:before {background:#9a3f43!important}
.screen:not(.home-screen) .expiry-row>span {background:#fbf0e2!important;color:#925d25!important;white-space:nowrap}
.screen:not(.home-screen) .expiry-row.urgent>span {background:#faece8!important;color:#9a3f43!important}
.screen:not(.home-screen) .expiry-row:hover {background:var(--fx-panel-raised)!important;border-color:#c6d7c8!important}

/* Print setup surrounds the stock preview with quiet sage controls. */
.screen:not(.home-screen) .print-workspace {gap:24px}
.screen:not(.home-screen) .product-summary .food-visual {border-color:#dce5db;border-radius:20px;box-shadow:0 16px 36px #18392f10}
.screen:not(.home-screen) .product-heading {padding-block:22px}
.screen:not(.home-screen) .date-block {padding:20px}
.screen:not(.home-screen) .date-block+.date-block {border-color:var(--fx-line)!important}
.screen:not(.home-screen) .date-block>span {color:var(--fx-muted)!important;letter-spacing:.08em}
.screen:not(.home-screen) .date-block>b {color:var(--fx-text)!important;font-size:15px}
.screen:not(.home-screen) .date-block>small {color:var(--fx-muted)!important}
.screen:not(.home-screen) .date-block>i {background:#edf3ee;color:var(--fx-accent);border:1px solid #d2e2d3;border-radius:7px}
.screen:not(.home-screen) .print-controls {padding:28px}
.screen:not(.home-screen) .print-controls header {padding-bottom:22px;border-color:var(--fx-line)}
.screen:not(.home-screen) .print-controls header>small {color:var(--fx-accent);letter-spacing:.11em}
.screen:not(.home-screen) .print-controls header p {font-size:12px}
.screen:not(.home-screen) .quantity-control {margin-top:24px;padding-block:20px;border-color:var(--fx-line)}
.screen:not(.home-screen) .quantity-control>span small {color:var(--fx-muted);font-size:11px;line-height:1.5}
.screen:not(.home-screen) .stepper :is(button,output) {border:1px solid var(--fx-line);border-radius:10px;background:#f5f7f3;color:var(--fx-text)}
.screen:not(.home-screen) .stepper button:hover {color:var(--fx-accent);background:#edf3ee;border-color:#b4cdb9}
.screen:not(.home-screen) .stepper output {font-variant-numeric:tabular-nums;color:var(--fx-accent)}
.screen:not(.home-screen) .print-actions {margin-top:22px}
.screen:not(.home-screen) :is(.preview-screen,.success) {color:var(--fx-text)}
.screen:not(.home-screen) :is(.preview-screen,.success)>p {color:var(--fx-muted)!important;line-height:1.65}
.screen:not(.home-screen) .success-check,
.screen:not(.home-screen) .success-check.queued {background:#39775d12!important;color:var(--fx-accent)!important;border:1px solid #b4cdb9;box-shadow:0 6px 20px #18392f08}
.screen:not(.home-screen) .label-paper {background:#fffefb!important;color:#111!important;border:1px solid #fff;border-radius:9px;box-shadow:0 14px 38px #00000040;isolation:isolate}
.screen:not(.home-screen) .label-paper :is(b,strong,span,footer) {color:#111!important}
.screen:not(.home-screen) .label-paper .label-classification.veg,
.screen:not(.home-screen) .label-paper .label-classification.veg b,
.screen:not(.home-screen) .label-paper .label-classification.veg .food-mark {color:#00843e!important}
.screen:not(.home-screen) .label-paper .label-classification.non-veg,
.screen:not(.home-screen) .label-paper .label-classification.non-veg b,
.screen:not(.home-screen) .label-paper .label-classification.non-veg .food-mark {color:#b61a30!important}

/* Administration and device settings use the same visual cadence as kitchen work. */
.screen:not(.home-screen) .settings-grid {gap:22px}
.screen:not(.home-screen) .panel-heading {padding:24px 24px 20px}
.screen:not(.home-screen) .settings-panel .printer-card {
  margin-inline:24px;
  padding:18px;
  border:1px solid var(--fx-line)!important;
  border-radius:14px;
  background:#f5f7f3!important;
  color:var(--fx-text)!important;
}
.screen:not(.home-screen) .settings-panel .printer-card small {color:var(--fx-muted)!important;line-height:1.6}
.screen:not(.home-screen) .settings-panel .printer-card:hover {border-color:#b4cdb9!important;background:#edf3ee!important}
.screen:not(.home-screen) .panel-actions {padding:18px 24px 24px;gap:12px}
.screen:not(.home-screen) .application-panel .panel-heading {border-color:var(--fx-line)}
.screen:not(.home-screen) .application-panel .settings-row {min-height:80px;padding:15px 24px;grid-template-columns:42px minmax(0,1fr) 20px;gap:13px}
.screen:not(.home-screen) .application-panel .settings-row>span {width:42px;height:42px;border:1px solid #d2e2d3;border-radius:12px;background:#edf3ee;color:var(--fx-accent)}
.screen:not(.home-screen) .application-panel .settings-row b {font-size:14px}
.screen:not(.home-screen) .application-panel .settings-row b small {margin-top:5px;font-size:11px}
.screen:not(.home-screen) .signout-link {color:#9a3f43!important;font-size:13px}
.screen:not(.home-screen) .signout-link:hover {background:#faece8}
.screen:not(.home-screen) .user-identity>i {background:linear-gradient(135deg,#edf3ee,#e2ede3);border:1px solid #d2e2d3;color:#27634d}
.screen:not(.home-screen) .user-management-row.disabled {background:#f8f9f6!important;color:var(--fx-muted)!important}
.screen:not(.home-screen) .user-management-row.disabled .user-identity>i {background:#f0f3ed;border-color:#dce5db;color:#748476}
.screen:not(.home-screen) .user-toggle:disabled {background:transparent!important;color:var(--fx-muted)!important;opacity:1}
.screen:not(.home-screen) .user-create-panel {padding-bottom:24px}
.screen:not(.home-screen) .user-form-grid {padding-inline:24px}
.screen:not(.home-screen) .admin-form {padding:26px;border:1px solid var(--fx-line);border-radius:20px;background:#fffffff0;box-shadow:var(--fx-shadow)}
.screen:not(.home-screen) .form-section {padding:12px 22px 22px;margin-bottom:18px;background:#fcfcf8!important}
.screen:not(.home-screen) .form-section h3 {margin-top:10px;font-size:15px}
.screen:not(.home-screen) .field {margin-block:20px}
.screen:not(.home-screen) .inline-create-row {background:#f2f7f0;border-color:#d2e2d3;border-radius:14px}
.screen:not(.home-screen) .choice-row label {background:#f2f5f0;border-color:var(--fx-line);border-radius:12px;color:#425d4e}
.screen:not(.home-screen) .choice-row label:hover {background:#e8f1e8;border-color:#b9cdbc}
.screen:not(.home-screen) .choice-row label:has(input:checked) {background:#edf3ee;color:var(--fx-accent);border-color:#86b18e;box-shadow:0 0 0 3px #edf3ee}
.screen:not(.home-screen) .choice-row label:has(input:focus-visible) {outline-color:var(--fx-accent)}
.screen:not(.home-screen) :is(.shelf-preview,.media-summary,.calibration-tip,.pairing-code) {background:#f2f7f0;border:1px solid #d2e2d3;border-radius:13px;color:#425d4e}
.screen:not(.home-screen) .shelf-preview>small {color:var(--fx-accent);font-size:10px;letter-spacing:.07em}
.screen:not(.home-screen) .shelf-preview p {color:var(--fx-muted);line-height:1.6}
.screen:not(.home-screen) .shelf-preview>div span {color:var(--fx-muted)}
.screen:not(.home-screen) .shelf-preview>div b {color:#18392f}
.screen:not(.home-screen) .photo-placeholder.food-photo {border-radius:15px;border:1px solid #dce5db}
.screen:not(.home-screen) .image-actions .btn {min-height:44px}
.screen:not(.home-screen) .advanced {border-color:var(--fx-line);padding-block:17px}
.screen:not(.home-screen) .advanced summary {color:#425d4e;font-size:12px}
.screen:not(.home-screen) .label-presets button {min-height:46px;background:#f5f7f3;color:#425d4e;border-color:var(--fx-line);border-radius:10px}
.screen:not(.home-screen) .label-presets button:focus {border-color:#86b18e;background:#edf3ee;color:var(--fx-accent)}
.screen:not(.home-screen) .scan-button {min-height:38px;background:#e8f1e8;border:1px solid #d2e2d3;border-radius:10px;color:var(--fx-accent)}
.screen:not(.home-screen) .scan-results {border-color:var(--fx-line);border-radius:12px}
.screen:not(.home-screen) .scan-results>small {background:#f2f5f0;color:var(--fx-muted)}
.screen:not(.home-screen) .scan-results button {background:#ffffff;color:var(--fx-text);border-color:var(--fx-line)}
.screen:not(.home-screen) .scan-results button small {color:var(--fx-muted)}
.screen:not(.home-screen) .scan-results button i {color:var(--fx-accent)}
.screen:not(.home-screen) .scan-empty {background:#fbf0e2;color:#925d25;border:1px solid #eddac0;border-radius:10px;line-height:1.65}
.screen:not(.home-screen) .toggle-row input {accent-color:var(--fx-accent)}
.screen:not(.home-screen) .toggle-row small {color:var(--fx-muted)}
.screen:not(.home-screen) .detail-grid {gap:16px;padding:6px 24px 24px}
.screen:not(.home-screen) .detail-grid span {color:var(--fx-muted)}
.screen:not(.home-screen) .detail-grid b {color:var(--fx-text);overflow-wrap:anywhere}
.screen:not(.home-screen) .settings-card h3 {margin:22px 24px;color:var(--fx-text)!important;font-size:16px}
.screen:not(.home-screen) .timeline>div {padding:18px 24px;border-color:var(--fx-line)}
.screen:not(.home-screen) .timeline i {width:32px;height:32px;background:#edf3ee;border:1px solid #d2e2d3;color:var(--fx-accent);border-radius:10px}
.screen:not(.home-screen) .timeline small {color:var(--fx-muted);line-height:1.6}
.screen:not(.home-screen) .segmented {background:#f2f5f0;border:1px solid var(--fx-line);border-radius:13px;padding:5px;gap:5px}
.screen:not(.home-screen) .segmented button {color:var(--fx-muted);border-radius:9px;min-height:42px}
.screen:not(.home-screen) .segmented button.active {background:#e2ede3;color:var(--fx-accent);box-shadow:inset 0 0 0 1px #c5d9c8}
.screen:not(.home-screen) .storage-list .settings-row.selected {background:#edf3ee!important;box-shadow:inset 3px 0 0 var(--fx-accent)}
.screen:not(.home-screen) .storage-list .settings-row.location-disabled {background:#f8f9f6!important;color:var(--fx-muted)!important}
.screen:not(.home-screen) .storage-list .settings-row b small {color:#9a3f43}
.screen:not(.home-screen) .storage-location-control {padding:20px 22px}
.screen:not(.home-screen) .storage-location-control small {color:var(--fx-muted);line-height:1.6}
.screen:not(.home-screen) .storage-contents {max-width:780px;margin:24px auto}
.screen:not(.home-screen) .storage-contents h3 {gap:15px;align-items:center;font-size:16px;line-height:1.5}
.screen:not(.home-screen) .storage-contents h3>span:last-child {display:grid;place-items:center;min-width:28px;height:28px;padding-inline:7px;background:#edf3ee;border:1px solid #d2e2d3;border-radius:9px;color:var(--fx-accent);font-size:12px}
.screen:not(.home-screen) .storage-item {padding:14px 0;gap:14px;border-color:var(--fx-line)}
.screen:not(.home-screen) .storage-item b {color:var(--fx-text);font-size:14px}
.screen:not(.home-screen) .storage-item small {color:var(--fx-muted);line-height:1.6;font-size:11px}
.screen:not(.home-screen) .pairing-code {padding:26px;margin-inline:24px}
.screen:not(.home-screen) .pairing-code b {color:var(--fx-accent);font-size:40px;margin-block:12px;text-shadow:none}
.screen:not(.home-screen) .pairing-code :is(small,span) {color:var(--fx-muted);line-height:1.7;text-align:center}
.screen:not(.home-screen) .bridge-help {padding-inline:24px;font-size:13px}
.screen:not(.home-screen) .bridge-steps {color:var(--fx-muted);padding:0 24px 24px 42px;font-size:12px;gap:12px}
.screen:not(.home-screen) .bridge-steps b {color:#425d4e}
.screen:not(.home-screen) .bridge-device {padding:18px 24px}
.screen:not(.home-screen) .about-logo {border:1px solid var(--fx-line);border-radius:14px;background:#edf3ee}
.screen:not(.home-screen) .report-actions {margin-top:22px}

/* Warm sign-in surfaces share the calm palette used throughout the workspace. */
.login-dialog {
  border:1px solid #dce5db!important;
  border-radius:24px!important;
  background:radial-gradient(ellipse at 85% 0,#e8f1e8,transparent 65%),#fffef9!important;
  color:var(--fx-text)!important;
  box-shadow:0 30px 100px #18392f35,inset 0 1px 0 #ffffffb3;
}
.login-dialog::backdrop {background:#18392fbf;backdrop-filter:blur(8px)}
.login-dialog form {padding:34px}
.login-dialog h1 {font-size:27px;font-weight:750;color:var(--fx-text)}
.login-dialog :is(p,label) {color:var(--fx-muted)}
.login-dialog p {font-size:13px;line-height:1.65}
.login-dialog label {font-size:12px;letter-spacing:.02em;margin-block:26px}
.login-dialog input {height:56px;background:#f5f7f3;color:var(--fx-text);border:1px solid #dce5db;border-radius:12px;letter-spacing:.35em}
.login-dialog input:focus {outline:0;border-color:#39775d80;box-shadow:0 0 0 3px #39775d12}
.login-dialog input::placeholder {color:var(--fx-muted)}
.login-dialog .login-logo {background:#f7faf3;border:1px solid #dce5db;border-radius:13px;padding:16px 20px;margin-bottom:28px}
.login-dialog .form-error {color:#9a3f43!important}

/* Smaller workspaces keep each rule, quantity and action visible. */
@media (min-width:760px) and (max-width:1250px) {
  .screen:not(.home-screen) .settings-grid {grid-template-columns:1fr}
  .screen:not(.home-screen) :is(.item-master-head,.item-master-row) {grid-template-columns:minmax(150px,1.4fr) 95px minmax(80px,.65fr) minmax(85px,.7fr) 18px;gap:12px;padding-inline:16px}
  .screen:not(.home-screen) :is(.category-list-head,.category-item-row) {grid-template-columns:minmax(170px,1.6fr) minmax(85px,.7fr) minmax(70px,.6fr) 18px;gap:14px;padding-inline:16px}
  .screen.history-screen:has(.history-table) :is(.history-table-head,.history-row) {grid-template-columns:70px minmax(150px,1fr) 150px;gap:16px;padding-inline:18px}
  .screen:not(.home-screen) :is(.user-directory-head,.user-management-row) {grid-template-columns:minmax(160px,1.5fr) minmax(95px,.8fr) 70px 95px;gap:12px}
  .screen:not(.home-screen) .user-form-grid {grid-template-columns:1fr 1fr}
  .screen:not(.home-screen) .batch-filterbar {grid-template-columns:minmax(0,1fr) minmax(140px,.7fr)}
  .screen:not(.home-screen) :is(.batch-table-head,.batch-row) {grid-template-columns:40px minmax(130px,1fr) minmax(110px,.8fr) 70px;gap:10px;padding-inline:12px}
  .screen:not(.home-screen) .batch-qty {width:100%}
}
@media (min-width:760px) and (max-width:1000px) {
  .screen:not(.home-screen) :is(.item-master-head,.category-list-head,.user-directory-head) {display:none}
  .screen:not(.home-screen) .item-master-row {grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:16px}
  .screen:not(.home-screen) .item-identity {grid-column:1;grid-row:1}
  .screen:not(.home-screen) .item-master-row>span:nth-child(2) {grid-column:2;grid-row:1}
  .screen:not(.home-screen) .rule-cell {grid-column:1;grid-row:2;margin-left:64px}
  .screen:not(.home-screen) .storage-cell {grid-column:1;grid-row:3;margin-left:64px}
  .screen:not(.home-screen) .row-chevron {grid-column:2;grid-row:2/4}
  .screen:not(.home-screen) .category-item-row {grid-template-columns:minmax(0,1fr) 22px;gap:7px 12px;padding:16px}
  .screen:not(.home-screen) .category-item-main {grid-column:1;grid-row:1}
  .screen:not(.home-screen) .category-item-detail {grid-column:1;margin-left:74px;display:flex;gap:8px;align-items:baseline}
  .screen:not(.home-screen) .category-item-detail small {display:block;margin:0}
  .screen:not(.home-screen) .category-item-open {grid-column:2;grid-row:1/4}
  .screen:not(.home-screen) .user-management-row {grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
  .screen:not(.home-screen) .user-identity {grid-column:1;grid-row:1}
  .screen:not(.home-screen) .role-label {grid-column:1;grid-row:2;margin-left:49px}
  .screen:not(.home-screen) .user-status {grid-column:2;grid-row:1}
  .screen:not(.home-screen) .user-toggle {grid-column:2;grid-row:2;width:92px}
  .screen:not(.home-screen) .metric {padding:17px}
}
@media (max-width:759px) {
  .screen:not(.home-screen) :is(.category-heading h1,.history-heading h1) {display:block;font-size:24px}
  .screen:not(.home-screen) :is(.category-heading,.history-heading,.admin-toolbar,.batch-print-head) {margin-bottom:18px}
  .screen:not(.home-screen) .admin-toolbar {flex-wrap:wrap;align-items:center;gap:16px}
  .screen:not(.home-screen) .admin-toolbar-actions {gap:8px}
  .screen:not(.home-screen) .admin-toolbar-actions .btn {min-width:0;padding-inline:12px}
  .screen:not(.home-screen) :is(.category-page,.history-page,.settings-page,.admin-page,.batch-print-page,.simple-page,.print-workspace) {width:100%;margin-inline:0}
  .screen:not(.home-screen) .batch-print-page {margin-top:0}
  .screen:not(.home-screen) :is(.admin-search,.category-search,.history-search,.batch-search) input {font-size:16px}
  .screen:not(.home-screen) .admin-form {padding:18px 16px}
  .screen:not(.home-screen) .form-section {padding:12px 16px 18px;margin-bottom:16px}
  .screen:not(.home-screen) .field {margin-block:18px}
  .screen:not(.home-screen) :is(.field input,.field select,.batch-storage,.batch-qty,.batch-filterbar select) {font-size:16px}
  .screen:not(.home-screen) .panel-heading {padding:20px 18px 18px}
  .screen:not(.home-screen) .panel-actions {padding:16px 18px 20px;grid-template-columns:1fr 1fr;gap:10px}
  .screen:not(.home-screen) .settings-panel .printer-card {margin-inline:18px}
  .screen:not(.home-screen) .application-panel .settings-row {padding:15px 18px;grid-template-columns:38px minmax(0,1fr) 16px;gap:12px}
  .screen:not(.home-screen) .application-panel .settings-row>span {width:38px;height:38px;border-radius:11px}
  .screen:not(.home-screen) .application-panel .settings-row b small {line-height:1.6}
  .screen:not(.home-screen) .user-form-grid {padding-inline:18px;gap:16px}
  .screen:not(.home-screen) .user-form-grid .field {margin:0}
  .screen:not(.home-screen) .category-item-row {padding:16px 13px;gap:7px 10px}
  .screen:not(.home-screen) .category-item-detail {margin-left:66px;font-size:11px;line-height:1.5}
  .screen:not(.home-screen) .category-item-detail small {font-size:10px}
  .screen:not(.home-screen) .item-master-row {padding:16px 13px;gap:7px 10px}
  .screen:not(.home-screen) .item-identity {gap:10px}
  .screen:not(.home-screen) .item-identity b {font-size:13px}
  .screen:not(.home-screen) .item-master-row .class-badge {padding:5px 7px;font-size:9px}
  .screen:not(.home-screen) .rule-cell,
  .screen:not(.home-screen) .storage-cell {margin-left:62px}
  .screen.history-screen:has(.history-table) .history-row {grid-template-columns:52px minmax(0,1fr);gap:5px 14px;padding:17px 14px}
  .screen.history-screen:has(.history-table) .history-row>span:first-child {grid-column:1;grid-row:1/3;align-self:start;padding-top:2px}
  .screen.history-screen:has(.history-table) .history-row>span:nth-child(2) {grid-column:2;grid-row:1}
  .screen.history-screen:has(.history-table) .history-row>span:last-child {grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;text-align:left;margin-top:5px}
  .screen:not(.home-screen) .history-empty {padding:20px 16px;grid-template-columns:44px minmax(0,1fr);gap:14px}
  .screen:not(.home-screen) .history-empty>span {width:44px;height:44px}
  .screen:not(.home-screen) .metric-grid {gap:12px}
  .screen:not(.home-screen) .metric {min-height:112px;padding:18px 16px}
  .screen:not(.home-screen) .metric b {font-size:30px}
  .screen:not(.home-screen) .metric span {font-size:11px}
  .screen:not(.home-screen) .expiry-row {padding:16px 12px 16px 20px;gap:10px}
  .screen:not(.home-screen) .expiry-row>span {font-size:10px;padding:7px 9px}
  .screen:not(.home-screen) .print-controls {padding:22px 18px}
  .screen:not(.home-screen) .date-summary {grid-template-columns:1fr 1fr}
  .screen:not(.home-screen) .date-block {padding:18px 14px}
  .screen:not(.home-screen) .date-block+.date-block {border-top:0;border-left:1px solid var(--fx-line)}
  .screen:not(.home-screen) .date-block>i {position:static;display:inline-block;margin-top:10px}
  .screen:not(.home-screen) .print-actions {grid-template-columns:1.25fr .75fr}
  .screen:not(.home-screen) .print-actions .btn {padding-inline:12px}
  .screen:not(.home-screen) .batch-order-bar {bottom:calc(84px + env(safe-area-inset-bottom));gap:12px;padding:14px 12px}
  .screen:not(.home-screen) .batch-order-bar .btn {min-width:120px;padding-inline:12px}
  .screen:not(.home-screen) .batch-order-bar b {font-size:12px}
  .screen:not(.home-screen) .batch-qty {width:70px;padding-inline:8px}
  .screen:not(.home-screen) .detail-grid {grid-template-columns:minmax(100px,.85fr) minmax(0,1.3fr);padding:0 6px 20px;gap:15px;font-size:11px}
  .screen:not(.home-screen) .settings-card h3 {margin:20px 6px;font-size:15px}
  .screen:not(.home-screen) .timeline>div {padding:16px 6px}
  .screen:not(.home-screen) .storage-list {padding-inline:0}
  .screen:not(.home-screen) .storage-list .settings-row {grid-template-columns:26px minmax(0,1fr) auto;gap:9px;padding:16px}
  .screen:not(.home-screen) .storage-list .settings-row i {font-size:10px}
  .screen:not(.home-screen) .storage-location-control {padding:18px}
  .screen:not(.home-screen) .bridge-pair,
  .screen:not(.home-screen) .bridge-devices {padding-inline:0}
  .screen:not(.home-screen) .bridge-help {padding-inline:18px;font-size:12px}
  .screen:not(.home-screen) .bridge-steps {padding:0 18px 22px 36px;line-height:1.65}
  .screen:not(.home-screen) .bridge-device {padding:18px;grid-template-columns:16px minmax(0,1fr);gap:12px}
  .screen:not(.home-screen) .bridge-device .btn {grid-column:2;justify-self:start}
  .screen:not(.home-screen) .pairing-code {margin-inline:18px;padding:20px}
  .screen:not(.home-screen) .pairing-code b {font-size:34px;letter-spacing:5px}
  .login-dialog form {padding:28px 24px}
}
@media (prefers-reduced-motion:reduce) {
  .screen:not(.home-screen) *,
  .login-dialog,
  .login-dialog * {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media print {
  .screen:not(.home-screen) .label-paper {background:#fff!important;color:#000!important;border-color:#000;box-shadow:none}
}
/* The brand artwork uses dark lettering, so keep its original colors on a light plate. */
.login-dialog .login-logo,
.screen:not(.home-screen) .about-logo{background:linear-gradient(140deg,#f7fffd,#d6efe8)!important;border-color:#d4e2d6!important;box-shadow:0 6px 18px #18392f06}
