:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d5dfeb;
  --text: #16324a;
  --muted: #667789;
  --accent: #003f7c;
  --accent-dark: #00325f;
  --accent-secondary: #0d5a9c;
  --accent-soft: #eaf2fb;
  --accent-line: rgba(0, 63, 124, 0.18);
  --danger: #9a3f3f;
  --warning: #8a5a00;
  --info: #0d5a9c;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(22, 50, 74, 0.08);
  --shadow-soft: 0 4px 14px rgba(22, 50, 74, 0.06);
}

.correction-form {
  display: grid;
  gap: 14px;
}

.correction-items {
  display: grid;
  gap: 12px;
}

.correction-item-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.correction-origin {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.correction-link-card .secondary-button,
.correction-link-card .primary-button {
  width: fit-content;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 220px);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.logout {
  padding: 9px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent-dark);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px 14px 92px;
}

.login-panel {
  width: min(100%, 420px);
  margin: 36px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.15;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
}

input {
  min-height: 46px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.primary-button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 63, 124, 0.16);
}

.primary-button:hover {
  background: var(--accent-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(13, 90, 156, 0.24);
  outline-offset: 2px;
}

.primary-button.is-loading,
.secondary-button.is-loading,
.danger-button.is-loading,
.small-button.is-loading,
.action-button.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric {
  min-width: 74px;
  padding: 10px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent-dark);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.menu-item {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.menu-item:hover,
.request-card:hover,
.list-card:hover,
.action-card:hover,
.control-card:hover {
  border-color: rgba(0, 63, 124, 0.24);
}

.menu-item span {
  font-size: 18px;
  font-weight: 700;
}

.menu-item strong {
  color: var(--muted);
  font-size: 14px;
}

.dashboard-layout {
  display: grid;
  gap: 16px;
}

.dashboard-hero {
  order: -10;
}

.manager-control-section {
  order: 2;
}

.manager-branch-section {
  order: 3;
}

.manager-work-section {
  order: 1;
}

.manager-history-section {
  order: 4;
}

.manager-logistics-section {
  order: 5;
}

.employee-primary-actions {
  order: -9;
}

.employee-work-section {
  order: -8;
}

.employee-attention-section {
  order: -7;
}

.employee-metrics-section {
  order: -6;
}

.dashboard-hero,
.dashboard-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-hero {
  display: grid;
  gap: 6px;
}

.dashboard-section {
  display: grid;
  gap: 14px;
}

.attention-section {
  border-color: rgba(0, 63, 124, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fd 100%);
}

.attention-section .attention-cta {
  min-height: 52px;
  font-size: 16px;
  box-shadow: 0 12px 24px rgba(0, 63, 124, 0.18);
}

.push-panel {
  border-color: rgba(25, 82, 122, 0.18);
  background: #f7fbff;
}

.push-status {
  padding: 10px 12px;
  border: 1px solid rgba(25, 82, 122, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--info);
  font-weight: 700;
}

.push-actions {
  display: grid;
  gap: 8px;
}

.push-actions .primary-button,
.push-actions .secondary-button {
  width: 100%;
}

.settings-layout {
  max-width: 760px;
  margin: 0 auto;
}

.settings-profile-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.settings-profile-list div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.settings-profile-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.settings-profile-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-metric {
  min-width: 52px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #fff3bf;
  color: var(--warning);
  text-align: center;
}

.metric-grid,
.action-grid,
.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric-card,
.action-card,
.control-card,
.branch-summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 15px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  color: var(--accent-dark);
  font-size: 20px;
}

.action-card,
.control-card {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 15px;
  color: var(--text);
}

.employee-primary-actions .action-card {
  min-height: 86px;
}

.action-card span,
.control-card {
  font-size: 17px;
  font-weight: 700;
}

.action-card strong {
  color: var(--muted);
  font-size: 14px;
}

.action-card-primary {
  border-color: rgba(0, 63, 124, 0.24);
  background: var(--accent-soft);
}

.action-card-wide {
  min-height: 84px;
}

.branch-summary-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.full-button {
  width: 100%;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 8px 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 -8px 22px rgba(22, 50, 74, 0.08);
}

.bottom-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bottom-nav-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.alert {
  padding: 12px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: var(--radius);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.success {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(0, 63, 124, 0.24);
  border-radius: var(--radius);
  background: rgba(0, 63, 124, 0.08);
  color: var(--accent-dark);
}

.table-card,
.movement-card,
.request-card,
.list-card,
.stat-card,
.detail-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-section {
  margin-bottom: 20px;
}

.page-section h2 {
  margin-bottom: 10px;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
  white-space: nowrap;
}

.movement-list {
  display: grid;
  gap: 12px;
}

.request-queue {
  display: grid;
  gap: 12px;
}

.movement-card {
  padding: 15px;
}

.request-card {
  padding: 15px;
  border-left: 4px solid var(--line);
}

.movement-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.request-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.movement-card header p,
.movement-card footer {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.request-card header p,
.request-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.status-review {
  background: #fff3bf;
  color: #765000;
}

.status-needs-fix {
  background: #ffe3bf;
  color: #834400;
}

.status-approved {
  background: #e8f5ef;
  color: #246b4f;
}

.status-rejected {
  background: #fde2df;
  color: var(--danger);
}

.status-in-transit {
  background: #e0edf8;
  color: var(--info);
}

.status-neutral {
  background: #ecefed;
  color: var(--muted);
}

.request-summary {
  display: grid;
  gap: 4px;
}

.request-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.request-facts span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
}

.request-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.items-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.items-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.items-list strong {
  white-space: nowrap;
}

.edit-items-panel {
  margin-bottom: 16px;
}

.inventory-edit-card {
  align-items: stretch;
}

.inventory-edit-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1 1 260px;
}

.inventory-edit-main > strong {
  overflow-wrap: anywhere;
}

.inventory-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.inventory-check-grid span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
}

.inventory-check-grid strong {
  color: var(--text);
  white-space: nowrap;
}

.inventory-edit-focus {
  margin-bottom: 16px;
}

.item-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.item-actions .small-button {
  white-space: normal;
}

#inventory-item-form {
  scroll-margin-top: 84px;
}

.totals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.totals-row span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.requests-filter-panel {
  margin-bottom: 14px;
}

.requests-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.requests-filter-summary::after {
  content: "Открыть";
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.requests-filter-panel[open] .requests-filter-summary {
  margin-bottom: 10px;
}

.requests-filter-panel[open] .requests-filter-summary::after {
  content: "Скрыть";
}

.requests-filters {
  margin-bottom: 0;
}

.requests-filters-desktop {
  display: none;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent-line);
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.secondary-button,
.back-link,
.danger-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

.secondary-button,
.back-link {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.secondary-button:hover,
.back-link:hover,
.ghost-button:hover {
  border-color: var(--accent-line);
  color: var(--accent-dark);
}

.danger-button {
  border-color: rgba(180, 35, 24, 0.28);
  color: var(--danger);
}

.small-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

.inline-form {
  margin: 0;
}

.back-link {
  width: fit-content;
  margin-bottom: 16px;
}

.action-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.impact-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: #f3f8fe;
}

.impact-panel h2 {
  margin-bottom: 8px;
}

.impact-panel p {
  color: var(--muted);
}

.request-state-card {
  display: grid;
  gap: 6px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.request-state-card strong {
  font-size: 16px;
}

.request-state-card p {
  margin: 0;
  color: var(--muted);
}

.request-state-approved {
  border-color: rgba(36, 107, 79, 0.22);
  background: #eef8f3;
}

.request-state-pending {
  border-color: rgba(191, 141, 0, 0.28);
  background: #fff8d7;
}

.request-state-needs-fix {
  border-color: rgba(190, 99, 0, 0.26);
  background: #fff1df;
}

.request-state-rejected {
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff0ee;
}

.request-state-muted {
  background: var(--panel-soft);
}

.request-detail-nav {
  align-items: center;
}

.request-detail-nav .back-link {
  margin-bottom: 0;
}

.request-hero {
  align-items: flex-start;
}

.request-hero h1 {
  max-width: 720px;
  line-height: 1.12;
}

.request-idline {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.request-state-xl {
  gap: 10px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.request-state-xl > strong {
  font-size: 20px;
  line-height: 1.2;
}

.request-metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.request-metric-row div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.request-metric-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.request-metric-row strong {
  font-size: 16px;
}

.request-impact-soft {
  background: var(--panel-soft);
  border-color: var(--line);
}

.request-info-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.request-section {
  margin-bottom: 18px;
}

.request-section h2 {
  margin-bottom: 12px;
}

.request-items-list {
  display: grid;
  gap: 10px;
}

.request-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.request-item-main {
  min-width: 0;
}

.request-item-main > strong {
  display: block;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.request-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.request-item-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.request-item-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.request-item-value {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 88px;
  text-align: right;
}

.request-item-value strong {
  font-size: 16px;
}

.request-item-value span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.request-section-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.request-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.request-timeline li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.request-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 63, 124, 0.12);
}

.request-timeline strong {
  display: block;
}

.request-timeline p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 12px 16px;
}

.warning-panel {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #d9c46a;
  border-radius: var(--radius);
  background: #fff8d7;
  color: #594a00;
}

.movement-form {
  grid-template-columns: 1fr;
}

.compact-grid {
  margin-top: 12px;
}

.stats-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-card,
.detail-grid div {
  display: grid;
  gap: 5px;
  padding: 15px;
}

.stat-card span,
.detail-grid span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong,
.detail-grid strong {
  font-size: 18px;
}

.note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

.metric-stack {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.metric-stack span {
  color: var(--muted);
  font-size: 13px;
}

.inventory-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-filter {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.quick-filter-active {
  border-color: rgba(0, 63, 124, 0.28);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.inventory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.inventory-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.inventory-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inventory-card header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inventory-card header span {
  flex: 0 0 auto;
  font-weight: 700;
}

.inventory-facts,
.stock-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-facts span,
.stock-locations div {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
}

.stock-locations div {
  display: flex;
  gap: 8px;
}

.stock-ok {
  color: var(--accent-dark);
}

.stock-low {
  color: var(--warning);
}

.stock-zero {
  color: var(--danger);
}

.diff-positive {
  color: var(--accent-dark);
}

.diff-negative {
  color: var(--danger);
}

.diff-zero {
  color: var(--muted);
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.photo-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 719px) {
  .topbar {
    gap: 8px;
    min-height: 54px;
    padding: 9px 12px;
  }

  .brand {
    font-size: 16px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .logout {
    padding: 8px 9px;
    font-size: 13px;
  }

  .dashboard-layout {
    gap: 12px;
  }

  .dashboard-hero,
  .dashboard-section {
    padding: 14px;
  }

  .employee-primary-actions .action-grid {
    gap: 8px;
  }

  .employee-primary-actions .action-card,
  .employee-work-section .control-card {
    min-height: 58px;
    padding: 12px;
  }

  .employee-primary-actions .action-card strong {
    font-size: 13px;
  }

  .requests-filter-panel:not([open]) > .requests-filters {
    display: none;
  }

  .requests-filters {
    padding: 10px;
  }

  .request-queue {
    display: grid;
    gap: 10px;
  }

  .request-card {
    padding: 13px;
  }

  .request-card header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .request-card header .status {
    width: fit-content;
  }

  .request-card h2 {
    font-size: 18px;
  }

  .request-card header p,
  .request-summary p {
    font-size: 13px;
  }

  .request-facts {
    gap: 6px;
  }

  .request-facts span {
    font-size: 13px;
  }

  .request-hero h1 {
    font-size: 26px;
  }

  .request-state-xl {
    padding: 16px;
  }

  .request-metric-row {
    grid-template-columns: 1fr;
  }

  .request-item-card {
    grid-template-columns: 1fr;
  }

  .request-item-value {
    justify-items: start;
    text-align: left;
  }

  .inventory-table-view {
    display: none;
  }

  .inventory-edit-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .item-actions .inline-form,
  .item-actions .small-button {
    width: 100%;
  }

  .review-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
  }

  .review-actions .inline-form,
  .review-actions textarea,
  .review-actions .action-button {
    width: 100%;
  }

  .review-actions .action-button {
    min-width: 0;
  }
}

@media (min-width: 720px) {
  .shell {
    padding: 28px 22px 48px;
  }

  .bottom-nav {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .dashboard-layout {
    gap: 20px;
  }

  .dashboard-hero,
  .dashboard-section {
    padding: 20px;
  }

  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-grid,
  .control-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-card-wide {
    grid-column: 1 / -1;
  }

  .branch-summary-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .requests-filter-panel {
    display: none;
  }

  .requests-filters-desktop {
    display: grid;
    margin-bottom: 16px;
  }

  .movement-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-actions {
    grid-template-columns: 1fr 1fr;
  }

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

  .inventory-check-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid,
  .detail-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
