:root {
  --ink: #15231f;
  --muted: #71807a;
  --faint: #9ba7a2;
  --line: #e5ebe7;
  --canvas: #f4f6f4;
  --card: #ffffff;
  --sidebar: #10251f;
  --sidebar-muted: #94a69f;
  --green: #42ad71;
  --green-dark: #278557;
  --green-soft: #eaf7ef;
  --orange: #e69c42;
  --orange-soft: #fff4e7;
  --red: #d8645f;
  --red-soft: #fceceb;
  --blue: #4d7fd4;
  --blue-soft: #edf3ff;
  --violet: #7669cc;
  --violet-soft: #f1effc;
  --shadow: 0 10px 32px rgba(31, 55, 46, 0.07);
}

* { box-sizing: border-box; }
html { font-family: "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; padding: 28px 18px 18px;
  background: var(--sidebar); color: white; display: flex; flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 10px 31px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--green); font: 800 22px/1 "Manrope"; }
.brand-name { font: 800 17px/1.1 "Manrope"; letter-spacing: .14em; }
.brand-subtitle { margin-top: 4px; color: var(--sidebar-muted); font-size: 9px; letter-spacing: .23em; }
.main-nav { display: grid; gap: 4px; }
.nav-item { position: relative; border: 0; background: transparent; color: #bac8c3; border-radius: 9px; height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font-weight: 500; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: rgba(90, 190, 131, .16); }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 23px; border-radius: 0 5px 5px 0; background: var(--green); }
.nav-icon { width: 19px; height: 19px; display: grid; place-items: center; }
.nav-icon svg, [data-icon] svg { width: 100%; height: 100%; }
.nav-count { margin-left: auto; min-width: 23px; padding: 2px 6px; border-radius: 20px; color: #d8e2de; background: rgba(255,255,255,.08); font-size: 11px; text-align: center; }
.nav-count.warning { color: #ffd8a6; background: rgba(230,156,66,.16); }
.nav-dot { margin-left: auto; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; }
.nav-section-label { margin: 29px 12px 10px; color: #627871; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.08); padding: 18px 7px 2px; gap: 11px; }
.profile-avatar { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #183127; background: #bce2cb; font-size: 12px; font-weight: 800; }
.profile-copy { min-width: 0; display: grid; gap: 2px; }
.profile-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { color: var(--sidebar-muted); font-size: 10px; }
.profile-copy select { width: 125px; padding: 0 14px 0 0; border: 0; outline: 0; color: white; background: transparent; appearance: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.profile-copy select option { color: var(--ink); background: white; }
.profile-chevron { width: 14px; height: 14px; margin-left: auto; color: #789087; transform: rotate(90deg); pointer-events: none; }
.icon-button { position: relative; width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; background: white; display: grid; place-items: center; cursor: pointer; }
.icon-button > svg { width: 18px; height: 18px; }
.icon-button.quiet { margin-left: auto; border: 0; color: #789087; background: transparent; width: 25px; }

.main-content { width: calc(100% - 248px); margin-left: 248px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 76px; padding: 0 36px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.menu-toggle { display: none; }
.global-search-wrap { position: relative; width: min(490px, 48vw); }
.global-search-wrap input { width: 100%; height: 43px; padding: 0 49px 0 43px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #f7f9f7; transition: .2s; }
.global-search-wrap input:focus { border-color: #acd8bd; background: white; box-shadow: 0 0 0 3px rgba(66,173,113,.1); }
.search-icon { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; color: #85928d; z-index: 1; }
kbd { position: absolute; right: 11px; top: 10px; padding: 4px 7px; color: #89948f; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: white; font: 10px "DM Sans"; }
.search-results { display: none; position: absolute; top: 51px; left: 0; right: 0; max-height: 370px; overflow: auto; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); padding: 7px; }
.search-results.show { display: block; }
.search-result { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 9px; border-radius: 9px; cursor: pointer; }
.search-result:hover { background: var(--canvas); }
.search-result .product-glyph { width: 38px; height: 38px; }
.search-result strong, .search-result span { display: block; }
.search-result strong { font-size: 13px; }
.search-result span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.search-result .result-stock { color: var(--green-dark); font-weight: 700; font-size: 12px; }
.notification-button { margin-left: auto; color: #52605b; }
.notification-pip { position: absolute; right: 8px; top: 7px; width: 7px; height: 7px; background: var(--red); border: 2px solid white; border-radius: 50%; }
.topbar-date { display: grid; gap: 1px; padding-left: 4px; }
.topbar-date span { color: var(--muted); font-size: 10px; }
.topbar-date strong { font-size: 12px; }
.logout-button { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: #52605b; background: white; font-size: 10px; font-weight: 700; cursor: pointer; }
.logout-button:hover { color: var(--ink); background: var(--canvas); }
.profile-copy select:disabled { opacity: 1; cursor: default; }

.page { padding: 31px 36px 50px; max-width: 1500px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--green-dark); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 4px; font: 800 clamp(25px, 2.3vw, 34px)/1.2 "Manrope"; letter-spacing: -.035em; }
h2 { font: 750 21px/1.25 "Manrope"; letter-spacing: -.02em; }
h3 { font: 700 14px/1.25 "Manrope"; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; }
.button { height: 42px; padding: 0 17px; border-radius: 10px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: white; font-weight: 700; font-size: 12px; cursor: pointer; transition: .18s; }
.button svg { width: 16px; height: 16px; }
.button.primary { color: white; border-color: var(--green-dark); background: var(--green-dark); box-shadow: 0 7px 16px rgba(39,133,87,.18); }
.button:hover { transform: translateY(-1px); }
.button.primary:hover { background: #217a4e; }
.button.secondary:hover { background: var(--canvas); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 121px; padding: 19px; display: flex; flex-direction: column; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.green { color: var(--green-dark); background: var(--green-soft); }
.stat-icon.orange { color: #c97922; background: var(--orange-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.red { color: var(--red); background: var(--red-soft); }
.stat-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.stat-value { font: 800 25px/1 "Manrope"; letter-spacing: -.04em; }
.stat-suffix { font-size: 14px; color: var(--muted); font-weight: 600; }
.trend { padding: 4px 7px; border-radius: 12px; font-size: 10px; font-weight: 700; color: var(--green-dark); background: var(--green-soft); }
.trend.alert { color: #bd741d; background: var(--orange-soft); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-header { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.card-header p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.text-button { border: 0; background: none; color: var(--green-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.location-grid { display: grid; grid-template-columns: repeat(5, 1fr); padding: 17px; gap: 10px; }
.location-card { min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; cursor: pointer; transition: .18s; }
.location-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cddbd3; }
.location-card .location-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--green-dark); background: var(--green-soft); margin-bottom: 16px; }
.location-card.vehicle .location-icon { color: var(--blue); background: var(--blue-soft); }
.location-card .location-icon svg { width: 17px; height: 17px; }
.location-card strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.location-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.location-card .location-value { margin-top: 13px; font: 800 17px "Manrope"; }
.location-card .location-unit { margin-left: 3px; color: var(--muted); font-size: 9px; }

.activity-list { padding: 4px 18px 8px; }
.activity-item { display: grid; grid-template-columns: 35px 1fr auto; gap: 11px; align-items: center; min-height: 61px; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border: 0; }
.activity-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; font-size: 9px; font-weight: 800; color: #215c40; background: #d7efe0; }
.activity-avatar.orange { color: #995918; background: #fae4c8; }
.activity-avatar.blue { color: #315d9d; background: #dce7f8; }
.activity-copy { min-width: 0; }
.activity-copy strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.activity-amount { text-align: right; }
.activity-amount strong { display: block; font-size: 11px; }
.activity-amount time { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; }
.positive { color: var(--green-dark); }
.negative { color: var(--red); }

.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; margin-top: 18px; }
.stock-list { padding: 3px 18px 7px; }
.stock-row { display: grid; grid-template-columns: 38px minmax(140px,1fr) 105px 72px; gap: 11px; align-items: center; min-height: 62px; border-bottom: 1px solid var(--line); }
.stock-row:last-child { border: 0; }
.product-glyph { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #64756e; background: #f0f4f1; }
.product-glyph svg { width: 17px; height: 17px; }
.product-name strong { display: block; font-size: 11px; }
.product-name span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress { height: 5px; flex: 1; background: #f0f1ef; border-radius: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.progress.red > span { background: var(--red); }
.progress-wrap small { width: 29px; color: var(--muted); font-size: 9px; }
.stock-status { justify-self: end; padding: 4px 8px; border-radius: 20px; color: #b06c1c; background: var(--orange-soft); font-size: 9px; font-weight: 700; }
.stock-status.out { color: var(--red); background: var(--red-soft); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 17px; }
.quick-action { min-height: 78px; padding: 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; text-align: left; cursor: pointer; transition: .18s; }
.quick-action:hover { background: white; border-color: #bad7c5; transform: translateY(-1px); }
.quick-action-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--green-dark); background: var(--green-soft); }
.quick-action-icon svg { width: 17px; height: 17px; }
.quick-action:nth-child(2) .quick-action-icon { color: #c97720; background: var(--orange-soft); }
.quick-action:nth-child(3) .quick-action-icon { color: var(--blue); background: var(--blue-soft); }
.quick-action:nth-child(4) .quick-action-icon { color: var(--violet); background: var(--violet-soft); }
.quick-action strong { display: block; font-size: 11px; }
.quick-action span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

/* Secondary views */
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.category-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.category-panel { position: relative; min-height: 116px; padding: 19px; display: flex; align-items: center; gap: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: left; cursor: pointer; transition: .18s ease; }
.category-panel::after { content: ""; position: absolute; right: -31px; bottom: -42px; width: 120px; height: 120px; border-radius: 50%; background: var(--green-soft); opacity: .65; }
.category-panel.hydraulic::after { background: var(--blue-soft); }
.category-panel:hover, .category-panel.active { transform: translateY(-1px); border-color: #abd2bb; box-shadow: var(--shadow); }
.category-panel.hydraulic:hover, .category-panel.hydraulic.active { border-color: #b6caec; }
.category-panel-icon { position: relative; z-index: 1; width: 48px; height: 48px; flex: 0 0 auto; padding: 13px; border-radius: 13px; color: var(--green-dark); background: var(--green-soft); }
.category-panel.hydraulic .category-panel-icon { color: var(--blue); background: var(--blue-soft); }
.category-panel-copy { position: relative; z-index: 1; }
.category-panel-copy strong, .category-panel-copy span { display: block; }
.category-panel-copy strong { font: 750 15px "Manrope"; }
.category-panel-copy span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.category-panel-count { position: relative; z-index: 1; margin-left: auto; padding-right: 6px; font: 800 24px "Manrope"; }
.category-panel-count small { display: block; margin-top: 1px; color: var(--muted); font: 500 8px "DM Sans"; text-align: right; text-transform: uppercase; letter-spacing: .07em; }
.access-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; color: #66736e; background: #edf1ef; font-size: 9px; font-weight: 600; }
.access-note svg { width: 12px; height: 12px; }
.filter-tabs { display: flex; gap: 4px; padding: 4px; background: #e9eeeb; border-radius: 10px; }
.filter-tab { height: 33px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.filter-tab.active { color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(20,40,32,.08); }
.table-card { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { padding: 12px 17px; text-align: left; color: var(--muted); background: #fafbfa; font-size: 9px; letter-spacing: .06em; }
.data-table td { height: 61px; padding: 8px 17px; border-top: 1px solid var(--line); font-size: 11px; }
.data-table .table-product { display: flex; align-items: center; gap: 11px; }
.data-table .table-product strong { display: block; }
.data-table .table-product small { display: block; margin-top: 2px; color: var(--muted); }
.status-pill { padding: 4px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; color: var(--green-dark); background: var(--green-soft); white-space: nowrap; }
.status-pill.low { color: #aa6717; background: var(--orange-soft); }
.status-pill.out { color: var(--red); background: var(--red-soft); }
.location-view-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.location-large { padding: 21px; min-height: 175px; }
.location-large .location-head { display: flex; align-items: flex-start; justify-content: space-between; }
.location-large .location-icon { width: 41px; height: 41px; margin: 0; }
.location-large .location-icon svg { width: 20px; height: 20px; }
.location-large .location-metric { margin-top: 27px; font: 800 25px "Manrope"; }
.location-large .location-details { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }
.employee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.employee-card { padding: 19px; display: flex; align-items: center; gap: 14px; }
.employee-card .profile-avatar { width: 45px; height: 45px; }
.employee-card strong, .employee-card span { display: block; }
.employee-card strong { font-size: 13px; }
.employee-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.employee-card .employee-state { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.empty-view { min-height: 420px; padding: 60px 25px; display: grid; place-items: center; text-align: center; }
.empty-view .empty-icon { width: 58px; height: 58px; padding: 16px; border-radius: 16px; color: var(--green-dark); background: var(--green-soft); margin: 0 auto 16px; }
.empty-view p { max-width: 380px; margin: 8px auto 19px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(10,29,22,.58); backdrop-filter: blur(3px); }
.modal-backdrop.show { display: grid; }
.modal { width: min(570px,100%); max-height: calc(100vh - 40px); overflow: auto; padding: 25px; border-radius: 17px; background: white; box-shadow: 0 30px 80px rgba(9,33,24,.24); animation: modalIn .2s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
.modal-header h2 { margin-top: 4px; }
.movement-type-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 20px; }
.movement-type { padding: 12px 6px; display: grid; justify-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.movement-type.active { border-color: #94cbaa; box-shadow: 0 0 0 2px var(--green-soft); }
.movement-type strong { margin-top: 7px; font-size: 10px; }
.movement-type small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.type-icon { width: 30px; height: 30px; padding: 7px; border-radius: 8px; }
.type-icon.green { color: var(--green-dark); background: var(--green-soft); }
.type-icon.orange { color: #bd711c; background: var(--orange-soft); }
.type-icon.blue { color: var(--blue); background: var(--blue-soft); }
.type-icon.violet { color: var(--violet); background: var(--violet-soft); }
form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amount-row { grid-template-columns: 2fr 1fr; }
.field { display: grid; gap: 6px; }
.field > span { color: #52605b; font-size: 10px; font-weight: 700; }
.field em { color: var(--faint); font-style: normal; font-weight: 400; }
.field input, .field select, .select-like { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfa; outline: none; padding: 0 12px; font-size: 11px; }
.field input:focus, .field select:focus { border-color: #9bcdb0; background: white; }
.select-like { display: flex; align-items: center; gap: 9px; padding: 0 12px; }
.select-like svg { width: 16px; color: var(--muted); }
.select-like input { border: 0; background: transparent; padding: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 6px; padding-top: 17px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 120; right: 26px; bottom: 26px; min-width: 300px; padding: 14px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid #cde2d4; border-radius: 12px; background: white; box-shadow: var(--shadow); transform: translateY(100px); opacity: 0; transition: .3s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { width: 30px; height: 30px; padding: 7px; border-radius: 50%; color: white; background: var(--green); }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 11px; }
.toast span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.mobile-nav { display: none; }

.login-screen { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 10%, rgba(66,173,113,.19), transparent 34%), #0e211b; }
.login-screen.show { display: grid; }
.login-card { width: min(420px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: white; box-shadow: 0 32px 90px rgba(0,0,0,.3); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-card h1 { margin: 7px 0 8px; font-size: 27px; }
.login-card > p { margin-bottom: 24px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-card form { gap: 15px; }
.login-card .field input, .login-card .field select { height: 48px; font-size: 13px; }
.login-card #loginPin { font-size: 20px; letter-spacing: .32em; }
.login-submit { width: 100%; height: 48px; margin-top: 2px; }
.login-submit:disabled { opacity: .68; cursor: wait; transform: none; }
.login-error { min-height: 18px; color: var(--red); font-size: 11px; font-weight: 600; }
.login-footnote { display: block; margin-top: 20px; color: var(--faint); font-size: 9px; text-align: center; }

@media (max-width: 1120px) {
  .location-grid { grid-template-columns: repeat(3,1fr); }
  .location-card:nth-child(n+4) { display: none; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-action { min-height: 60px; }
  .location-view-grid, .employee-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.22); }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { height: 67px; padding: 0 18px; }
  .menu-toggle { display: grid; }
  .topbar-date { display: none; }
  .global-search-wrap { width: auto; flex: 1; }
  .page { padding: 24px 18px 90px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .bottom-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
  .quick-action { display: grid; justify-items: center; text-align: center; }
  .quick-action span { display: none; }
  .mobile-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; height: 70px; padding: 8px 18px 7px; display: grid; grid-template-columns: repeat(5,1fr); align-items: end; background: white; border-top: 1px solid var(--line); }
  .mobile-nav-item { height: 50px; border: 0; background: transparent; color: #89958f; display: grid; justify-items: center; gap: 3px; cursor: pointer; }
  .mobile-nav-item > span { width: 20px; height: 20px; }
  .mobile-nav-item small { font-size: 8px; }
  .mobile-nav-item.active { color: var(--green-dark); }
  .mobile-action { align-self: start; justify-self: center; width: 48px; height: 48px; margin-top: -23px; border: 5px solid var(--canvas); border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green-dark); box-shadow: 0 7px 18px rgba(39,133,87,.26); }
  .mobile-action span { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 13px; gap: 9px; }
  .menu-toggle, .notification-button { width: 37px; flex: 0 0 auto; }
  .global-search-wrap input { padding-right: 13px; }
  kbd { display: none; }
  .page { padding: 21px 14px 92px; }
  .page-heading { align-items: center; margin-bottom: 20px; }
  .page-heading p { display: none; }
  .heading-actions .button.secondary { display: none; }
  .heading-actions .button.primary span:not([data-icon]) { display: none; }
  h1 { font-size: 24px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 108px; padding: 14px; }
  .stat-value { font-size: 21px; }
  .trend { display: none; }
  .location-grid { grid-template-columns: 1fr 1fr; padding: 12px; }
  .location-card:nth-child(3) { display: none; }
  .quick-actions { padding: 12px; gap: 7px; }
  .quick-action { min-height: 72px; padding: 8px 4px; }
  .quick-action strong { font-size: 9px; }
  .stock-row { grid-template-columns: 35px 1fr 60px; }
  .stock-row .progress-wrap { display: none; }
  .card-header { padding: 14px; }
  .activity-list, .stock-list { padding-left: 13px; padding-right: 13px; }
  .location-view-grid, .employee-grid { grid-template-columns: 1fr; }
  .category-overview { grid-template-columns: 1fr; gap: 9px; }
  .category-panel { min-height: 94px; padding: 14px; }
  .movement-type-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .amount-row { grid-template-columns: 2fr 1fr; }
  .modal { padding: 19px; }
  .toast { left: 14px; right: 14px; bottom: 82px; min-width: auto; }
  .filter-tabs { overflow-x: auto; }
  .logout-button { width: 36px; padding: 0; overflow: hidden; color: transparent; }
  .logout-button::after { content: "Wyjdź"; color: #52605b; font-size: 8px; }
  .login-card { padding: 27px 22px; }
}
