:root {
  color-scheme: light;
  --ink: #17332d;
  --muted: #667a74;
  --green: #153c34;
  --green-bright: #24745e;
  --lime: #ddf36a;
  --line: #dce7e3;
  --surface: #fff;
  --soft: #f1f6f4;
  --danger: #a83238;
  --shadow: 0 20px 55px rgba(20, 59, 50, .1);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #edf4f1; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 0, rgba(221,243,106,.2), transparent 28rem), linear-gradient(180deg,#f9fbfa,#edf4f1); }
button, input { font: inherit; }
button { touch-action: manipulation; }

.app-shell { width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.topbar { min-height: 82px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; border-bottom: 1px solid rgba(36,116,94,.15); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: var(--green); background: var(--lime); font-size: 20px; font-weight: 900; box-shadow: 0 10px 24px rgba(105,128,26,.18); }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.logout { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.8); font-weight: 750; cursor: pointer; }
.logout:hover, .logout:focus-visible { border-color: var(--green-bright); outline: none; }
.main-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.7); }
.main-nav a { min-height: 38px; padding: 0 14px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink); outline: none; }
.main-nav a.active { color: #fff; background: var(--green); }
.topbar-user { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.topbar-user form { margin: 0; }
.user-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 12px; color: var(--green); background: var(--lime); font-size: 13px; font-weight: 900; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; }

main { flex: 1; padding: 48px 0 64px; }
.eyebrow { margin: 0 0 10px; color: var(--green-bright); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 36px; border-radius: 30px; color: #fff; background: linear-gradient(120deg,#153c34,#225e4e); box-shadow: var(--shadow); }
.welcome .eyebrow { color: var(--lime); }
.welcome h1 { margin: 0; max-width: 760px; font-size: clamp(34px,6vw,62px); line-height: 1.02; letter-spacing: -.05em; }
.role-badge { padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: var(--lime); background: rgba(255,255,255,.08); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 40px 3px 18px; }
.section-heading h2 { margin: 0; font-size: clamp(25px,4vw,36px); letter-spacing: -.035em; }
.section-heading > p { max-width: 440px; margin: 0; color: var(--muted); line-height: 1.5; }
.action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.action-card { min-height: 210px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: 0 12px 32px rgba(20,59,50,.06); opacity: 1; }
.action-card.primary { color: #fff; background: var(--green); border-color: var(--green); }
.action-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 17px; color: var(--green); background: var(--lime); font-size: 24px; font-weight: 900; }
.action-card strong, .action-card small { display: block; }
.action-card strong { margin-bottom: 7px; font-size: 21px; }
.action-card small { color: var(--muted); line-height: 1.45; }
.action-card.primary small { color: #c9ddd6; }
.soon { margin-top: auto; padding-top: 18px; color: #78908a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.action-card.primary .soon { color: var(--lime); }
.admin-section { margin-top: 42px; }
.admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.admin-grid button { min-height: 72px; padding: 16px 18px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.7); font-weight: 750; opacity: 1; }
.admin-grid span { font-size: 20px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0 28px; border-top: 1px solid rgba(36,116,94,.15); color: var(--muted); font-size: 12px; }

.admin-link { min-height: 92px; padding: 17px 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; border: 1px solid var(--green); border-radius: 18px; color: #fff; background: var(--green); text-decoration: none; box-shadow: 0 12px 28px rgba(21,60,52,.14); transition: transform 160ms ease, background 160ms ease; }
.admin-link:hover, .admin-link:focus-visible { transform: translateY(-2px); background: var(--green-bright); outline: none; }
.admin-link > span { grid-row: 1 / 3; color: var(--lime); font-size: 24px; }
.admin-link strong, .admin-link small { display: block; }
.admin-link strong { align-self: end; font-size: 14px; }
.admin-link small { align-self: start; color: #c9ddd6; font-size: 11px; }

.breadcrumbs { display: flex; align-items: center; gap: 9px; margin: 0 0 28px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--green-bright); font-weight: 750; text-decoration: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.page-heading h1, .item-hero h1 { margin: 0 0 10px; font-size: clamp(34px,5vw,56px); line-height: 1.03; letter-spacing: -.05em; }
.page-heading p:last-child, .item-hero p { margin: 0; color: var(--muted); line-height: 1.55; }
.compact-heading { max-width: 850px; }
.primary-link, .secondary-link { min-height: 48px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; font-size: 13px; font-weight: 850; text-decoration: none; }
.primary-link { color: #fff; background: var(--green); box-shadow: 0 10px 22px rgba(21,60,52,.16); }
.primary-link:hover, .primary-link:focus-visible { background: var(--green-bright); outline: none; }
.secondary-link { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.secondary-link:hover, .secondary-link:focus-visible { border-color: var(--green-bright); outline: none; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 18px; }
.stats-grid > div { min-height: 124px; padding: 20px; display: grid; grid-template-columns: 1fr auto; align-items: start; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.86); }
.stats-grid small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.stats-grid strong { grid-row: 1 / 3; grid-column: 2; font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.stats-grid span { align-self: end; color: var(--muted); font-size: 12px; }
.stats-grid .warning-stat { border-color: #edc982; background: #fff9ec; }
.stats-grid .warning-stat strong { color: #a66016; }

.search-bar { margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.86); }
.search-bar > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.search-bar > div { display: flex; gap: 9px; }
.search-bar input { min-width: 0; min-height: 48px; flex: 1; padding: 10px 14px; border: 1px solid #cbdad5; border-radius: 13px; color: var(--ink); background: #fff; outline: none; font-size: 15px; }
.search-bar input:focus { border-color: var(--green-bright); box-shadow: 0 0 0 4px rgba(36,116,94,.1); }
.search-bar button { min-width: 92px; border: 0; border-radius: 13px; color: #fff; background: var(--green); font-weight: 800; cursor: pointer; }
.search-bar a { min-height: 48px; padding: 0 12px; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: none; }

.items-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.item-card { min-height: 210px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: #fff; text-decoration: none; box-shadow: 0 10px 28px rgba(20,59,50,.05); transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.item-card:hover, .item-card:focus-visible { transform: translateY(-3px); border-color: rgba(36,116,94,.38); box-shadow: 0 18px 38px rgba(20,59,50,.11); outline: none; }
.item-card.inactive { opacity: .65; }
.item-card-top, .item-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-card code, .item-hero code, .qr-card code { color: var(--green-bright); font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.item-card h2 { margin: 23px 0 8px; padding-right:94px; font-size: 21px; letter-spacing: -.025em; }
.item-card > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.status-pill { padding: 6px 9px; border-radius: 999px; font-size: 9px; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.ok-status { color: #1f765b; background: #e6f6ef; }
.warning-status { color: #9c5a15; background: #fff0cf; }
.muted-status { color: #6f7e79; background: #edf1ef; }
.stock-line { margin-top: auto; padding-top: 16px; display: flex; align-items: end; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
.stock-line span { color: var(--muted); font-size: 11px; }
.stock-line strong { font-size: 20px; }
.catalog-empty { padding: 64px 28px; display: grid; justify-items: center; border: 1px dashed #c9d9d4; border-radius: 26px; text-align: center; background: rgba(255,255,255,.6); }
.catalog-empty > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 20px; color: var(--green); background: var(--lime); font-size: 28px; }
.catalog-empty h2 { margin: 20px 0 9px; font-size: 27px; }
.catalog-empty p { max-width: 520px; margin: 0 0 22px; color: var(--muted); line-height: 1.55; }

.form-errors, .success-message { margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; font-size: 13px; }
.form-errors { border: 1px solid #edb3b6; color: var(--danger); background: #fff1f1; }
.form-errors ul { margin: 8px 0 0; padding-left: 18px; }
.success-message { border: 1px solid #a9ddc7; color: #1b6b52; background: #ebfaf4; font-weight: 750; }
.item-form { display: grid; gap: 18px; }
.form-card { padding: 28px; display: grid; grid-template-columns: minmax(220px,.55fr) minmax(0,1.45fr); gap: 32px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 10px 28px rgba(20,59,50,.05); }
.form-section-heading { display: flex; align-items: flex-start; gap: 13px; }
.form-section-heading > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--lime); font-size: 10px; font-weight: 900; }
.form-section-heading h2 { margin: 1px 0 6px; font-size: 20px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label { display: grid; align-content: start; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 800; }
.form-grid label > small, .readonly-stock small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.full-field { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid #cbdad5; border-radius: 13px; color: var(--ink); background: #fbfdfc; outline: none; font: inherit; font-size: 15px; }
.form-grid textarea { min-height: 112px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--green-bright); background: #fff; box-shadow: 0 0 0 4px rgba(36,116,94,.1); }
.readonly-stock { min-height: 94px; padding: 16px; display: grid; align-content: center; border: 1px solid var(--line); border-radius: 15px; background: var(--soft); }
.readonly-stock > span { color: var(--muted); font-size: 11px; }
.readonly-stock strong { margin: 5px 0; font-size: 22px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.form-actions button { min-height: 50px; padding: 0 19px; display: inline-flex; align-items: center; gap: 18px; border: 0; border-radius: 14px; color: #fff; background: var(--green); font-weight: 850; cursor: pointer; }
.form-actions button:hover, .form-actions button:focus-visible { background: var(--green-bright); outline: none; }

.item-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.item-hero-copy { min-width: 0; }
.item-hero .item-code-row { justify-content: flex-start; margin-bottom: 17px; }
.item-hero h1 { overflow-wrap: anywhere; }
.low-stock-alert { margin-top: 16px; padding: 17px 19px; display: flex; align-items: center; gap: 14px; border: 1px solid #edc982; border-radius: 17px; color: #75400b; background: #fff8e9; }
.low-stock-alert > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: #c87923; font-weight: 900; }
.low-stock-alert strong { display: block; margin-bottom: 3px; }
.low-stock-alert p { margin: 0; font-size: 12px; }
.item-detail-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr); align-items: start; gap: 18px; margin-top: 18px; }
.item-info-card, .qr-card { padding: 27px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 10px 28px rgba(20,59,50,.05); }
.large-stock { display: flex; align-items: baseline; gap: 9px; margin: 18px 0 28px; }
.large-stock > span { width: 100%; color: var(--muted); font-size: 12px; }
.large-stock strong { font-size: clamp(48px,8vw,76px); line-height: 1; letter-spacing: -.06em; }
.large-stock small { color: var(--green-bright); font-size: 16px; font-weight: 850; }
.item-info-card dl { margin: 0; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.item-info-card dl div { padding: 18px 14px; }
.item-info-card dl div + div { border-left: 1px solid var(--line); }
.item-info-card dt { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.item-info-card dd { margin: 0; font-size: 13px; font-weight: 800; }
.item-description { margin-top: 24px; }
.item-description h2 { margin: 0 0 9px; font-size: 19px; }
.item-description p { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.item-photo { width: 100%; max-height: 360px; margin-top: 22px; display: block; border-radius: 18px; object-fit: cover; }
.qr-card { text-align: center; }
.qr-card .eyebrow { text-align: left; }
.qr-card h2 { margin: 0 0 18px; text-align: left; font-size: 24px; }
.qr-frame { aspect-ratio: 1; padding: 16px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.qr-frame img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-card > code { display: inline-block; margin: 16px 0 8px; }
.qr-card > p { margin: 0 0 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.download-link { width: 100%; }
.danger-zone { margin-top: 18px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #efc6c7; border-radius: 20px; background: #fff8f8; }
.danger-zone h2 { margin: 0 0 5px; color: #8c3034; font-size: 17px; }
.danger-zone p { margin: 0; color: #8f6869; font-size: 12px; line-height: 1.45; }
.danger-zone button { min-height: 42px; padding: 0 14px; border: 1px solid #d58d90; border-radius: 12px; color: #8c3034; background: #fff; font-weight: 800; cursor: pointer; }

.login-page { display: grid; place-items: center; padding: 24px; background: #eaf2ef; }
.login-shell { width: min(100%, 1080px); min-height: min(720px, calc(100vh - 48px)); display: grid; grid-template-columns: minmax(360px,.9fr) minmax(430px,1.1fr); overflow: hidden; border: 1px solid rgba(21,60,52,.1); border-radius: 34px; background: #fff; box-shadow: 0 32px 80px rgba(16,50,42,.16); }
.login-aside { position: relative; isolation: isolate; overflow: hidden; padding: 40px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(145deg,#143c33 0%,#1e6652 100%); }
.login-aside::after { content:""; position:absolute; z-index:-1; right:-145px; bottom:-175px; width:420px; height:420px; border:76px solid rgba(221,243,106,.12); border-radius:50%; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 16px; }
.login-brand > div > span { margin-top: 3px; color: #bcd4cc; font-size: 12px; }
.login-aside-copy { margin: auto 0; max-width: 440px; padding: 54px 0; }
.aside-kicker { margin: 0 0 18px; color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.login-aside h1 { margin: 0 0 22px; font-size: clamp(40px,5vw,62px); line-height: .98; letter-spacing: -.055em; }
.login-aside-copy > p:last-child { max-width: 380px; margin: 0; color: #c9ddd6; font-size: 16px; line-height: 1.65; }
.login-benefits { display: grid; gap: 13px; max-width: 400px; }
.login-benefits span { display: flex; align-items: center; gap: 12px; color: #d9e8e3; font-size: 12px; line-height: 1.45; }
.login-benefits b { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 1px solid rgba(221,243,106,.28); border-radius: 10px; color: var(--lime); font-size: 10px; }
.login-card { position: relative; padding: 68px clamp(38px,6vw,72px); display: flex; flex-direction: column; justify-content: center; background: #fff; }
.secure-status { position: absolute; top: 34px; right: 38px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 750; }
.secure-status span { width: 7px; height: 7px; border-radius: 50%; background: #44a876; box-shadow: 0 0 0 4px rgba(68,168,118,.12); }
.login-card h2 { margin: 0 0 10px; font-size: clamp(34px,5vw,48px); line-height: 1; letter-spacing: -.05em; }
.lead { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.auth-switcher > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; padding: 4px; border-radius: 14px; background: var(--soft); }
.auth-tabs label { min-height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer; transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
#auth-password:focus-visible ~ .auth-tabs label[for="auth-password"], #auth-pin:focus-visible ~ .auth-tabs label[for="auth-pin"] { outline: 3px solid rgba(36,116,94,.18); }
#auth-password:checked ~ .auth-tabs label[for="auth-password"], #auth-pin:checked ~ .auth-tabs label[for="auth-pin"] { color: var(--ink); background: #fff; box-shadow: 0 5px 14px rgba(20,59,50,.09); }
.auth-form { display: none; gap: 17px; }
#auth-password:checked ~ .auth-panels .password-panel, #auth-pin:checked ~ .auth-panels .pin-panel { display: grid; }
.auth-form label { display: grid; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 800; }
.auth-form input { width: 100%; min-height: 54px; padding: 12px 15px; border: 1px solid #cbdad5; border-radius: 14px; color: var(--ink); background: #fbfdfc; outline: none; font-size: 16px; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.auth-form input::placeholder { color: #9aaba6; }
.auth-form input:focus { border-color: var(--green-bright); background: #fff; box-shadow: 0 0 0 4px rgba(36,116,94,.1); }
.auth-form button { min-height: 54px; margin-top: 5px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 14px; color: #fff; background: var(--green); font-weight: 850; cursor: pointer; box-shadow: 0 12px 24px rgba(21,60,52,.2); transition: transform 160ms ease, background 160ms ease; }
.auth-form button:hover, .auth-form button:focus-visible { transform: translateY(-2px); background: var(--green-bright); outline: none; }
.auth-form button span { font-size: 21px; font-weight: 400; }
.form-error { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #efb4b7; border-radius: 12px; color: var(--danger); background: #fff2f2; font-size: 13px; }
.login-note { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }

@media (max-width: 760px) {
  .app-shell { width: min(100% - 22px,1180px); }
  main { padding: 28px 0 48px; }
  .welcome { min-height: 220px; padding: 26px; align-items: flex-start; flex-direction: column-reverse; }
  .welcome h1 { font-size: 39px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .action-grid, .admin-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 176px; }
  .login-page { display: block; padding: 0; background: #fff; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .login-aside { min-height: 220px; padding: 26px 22px; }
  .login-aside-copy { margin: 38px 0 8px; padding: 0; }
  .login-aside h1 { margin-bottom: 12px; font-size: 36px; }
  .login-aside-copy > p:last-child { font-size: 14px; line-height: 1.5; }
  .login-benefits { display: none; }
  .login-card { min-height: calc(100vh - 220px); padding: 46px 22px 30px; justify-content: flex-start; border-radius: 24px 24px 0 0; margin-top: -20px; }
  .secure-status { top: 18px; right: 22px; }
  .login-card h2 { font-size: 36px; }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; margin-bottom: 12px; }
  .main-nav a { flex: 1; }
  .items-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-card { grid-template-columns: 1fr; }
  .item-detail-grid { grid-template-columns: 1fr; }
  .qr-card { max-width: 460px; width: 100%; }
}

@media (max-width: 620px) {
  .topbar { min-height: 74px; gap: 10px; }
  .user-copy, .topbar-user .logout { display: none; }
  .main-nav { margin-bottom: 8px; }
  .dashboard-main { padding-top: 28px; }
  .page-heading, .item-hero, .danger-zone { align-items: stretch; flex-direction: column; }
  .page-heading .primary-link { width: 100%; }
  .stats-grid, .items-grid { grid-template-columns: 1fr; }
  .stats-grid > div { min-height: 104px; }
  .search-bar > div { flex-wrap: wrap; }
  .search-bar input { flex-basis: 100%; }
  .search-bar button { min-height: 46px; flex: 1; }
  .form-card { padding: 21px; gap: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions a, .form-actions button { width: 100%; justify-content: center; }
  .item-hero { padding: 23px; }
  .item-hero .secondary-link { width: 100%; }
  .item-info-card, .qr-card { padding: 22px; }
  .item-info-card dl { grid-template-columns: 1fr; }
  .item-info-card dl div + div { border-top: 1px solid var(--line); border-left: 0; }
  .large-stock { flex-wrap: wrap; }
  .large-stock > span { flex-basis: 100%; }
  .danger-zone button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }

/* Built-in working guide */
.guide-hero { min-height:330px; padding:clamp(30px,5vw,54px); display:flex; align-items:flex-end; justify-content:space-between; gap:36px; overflow:hidden; position:relative; isolation:isolate; border-radius:30px; color:#fff; background:radial-gradient(circle at 88% 16%,rgba(218,250,85,.2),transparent 18rem),linear-gradient(130deg,#0d382f,#1b614f); box-shadow:var(--shadow); }
.guide-hero::after { content:"?"; position:absolute; z-index:-1; right:36px; top:-86px; color:rgba(218,250,85,.07); font-size:390px; font-weight:950; line-height:1; }
.guide-hero > div:first-child { max-width:730px; }
.guide-hero .eyebrow { color:var(--lime); }
.guide-hero h1 { margin:0; font-size:clamp(40px,6vw,68px); line-height:.98; letter-spacing:-.055em; }
.guide-hero p:last-child { max-width:650px; margin:22px 0 0; color:#c8ddd5; font-size:15px; line-height:1.65; }
.guide-hero-actions { min-width:190px; display:grid; gap:10px; position:relative; z-index:1; }
.guide-hero-actions .secondary-link { border-color:rgba(255,255,255,.22); color:#fff; background:rgba(255,255,255,.08); cursor:pointer; }
.guide-hero-actions .primary-link { color:#123f35; background:var(--lime); box-shadow:none; }

.guide-block { margin-top:48px; }
.guide-heading { margin-bottom:20px; display:flex; align-items:flex-end; justify-content:space-between; gap:26px; }
.guide-heading h2 { margin:0; font-size:clamp(27px,4vw,40px); letter-spacing:-.04em; }
.guide-heading > p { max-width:390px; margin:0; color:var(--muted); line-height:1.55; }
.guide-flow { margin:0; padding:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; list-style:none; counter-reset:none; }
.guide-flow li { min-height:245px; padding:23px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 10px 28px rgba(20,59,50,.05); }
.guide-flow li > span { width:42px; height:42px; display:grid; place-items:center; margin-bottom:40px; border-radius:13px; color:var(--green); background:var(--lime); font-size:11px; font-weight:900; }
.guide-flow strong, .guide-flow small { display:block; }
.guide-flow strong { margin-bottom:9px; color:var(--ink); font-size:18px; }
.guide-flow small { color:var(--muted); font-size:12px; line-height:1.55; }

.guide-columns { margin-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.guide-card { padding:28px; border:1px solid var(--line); border-radius:24px; background:var(--surface); box-shadow:0 10px 28px rgba(20,59,50,.05); }
.guide-card-icon { width:50px; height:50px; display:grid; place-items:center; margin-bottom:26px; border-radius:16px; color:var(--green); background:var(--lime); font-size:22px; font-weight:900; }
.guide-card h2 { margin:0 0 18px; font-size:26px; letter-spacing:-.035em; }
.guide-card ol { margin:0; padding-left:21px; color:var(--muted); }
.guide-card li { padding:5px 0 5px 5px; line-height:1.5; }
.guide-card code { padding:3px 6px; border-radius:6px; color:var(--green-bright); background:var(--soft); font-size:11px; font-weight:850; }
.guide-note { margin:22px 0 0; padding:14px 15px; border-left:4px solid var(--green-bright); border-radius:0 12px 12px 0; color:var(--muted); background:var(--soft); font-size:12px; line-height:1.55; }

.guide-admin { padding:clamp(25px,4vw,38px); border:1px solid var(--line); border-radius:28px; background:color-mix(in srgb,var(--surface) 90%,var(--lime)); }
.guide-admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.guide-admin-grid article { min-height:190px; padding:21px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.guide-admin-grid article > span { color:var(--green-bright); font-size:10px; font-weight:900; letter-spacing:.12em; }
.guide-admin-grid h3 { margin:25px 0 8px; color:var(--ink); font-size:18px; }
.guide-admin-grid p { margin:0; color:var(--muted); font-size:12px; line-height:1.55; }

.guide-rules { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.guide-rules article { padding:20px; display:grid; grid-template-columns:auto 1fr; gap:15px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.guide-rules b { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; color:var(--green); background:var(--lime); font-size:11px; }
.guide-rules strong { color:var(--ink); font-size:14px; }
.guide-rules p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }

.guide-bottom { margin-top:48px; padding:30px; display:flex; align-items:center; justify-content:space-between; gap:28px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.guide-bottom > div:first-child { max-width:720px; }
.guide-bottom h2 { margin:0 0 8px; font-size:27px; letter-spacing:-.035em; }
.guide-bottom p:last-child { margin:0; color:var(--muted); line-height:1.55; }
.guide-bottom-actions { display:flex; gap:9px; }

@media (max-width:980px) {
  .guide-flow { grid-template-columns:1fr 1fr; }
  .guide-admin-grid { grid-template-columns:1fr 1fr; }
  .guide-hero { align-items:flex-start; flex-direction:column; }
  .guide-hero-actions { width:100%; grid-template-columns:1fr 1fr; }
}

@media (max-width:620px) {
  .guide-hero { min-height:0; margin-inline:-4px; padding:28px 23px; border-radius:24px; }
  .guide-hero h1 { font-size:40px; }
  .guide-hero-actions { grid-template-columns:1fr; }
  .guide-heading, .guide-bottom { align-items:stretch; flex-direction:column; }
  .guide-flow, .guide-columns, .guide-admin-grid, .guide-rules { grid-template-columns:1fr; }
  .guide-flow li { min-height:0; }
  .guide-flow li > span { margin-bottom:25px; }
  .guide-admin { margin-inline:-4px; }
  .guide-bottom-actions { flex-direction:column; }
  .guide-bottom-actions > * { width:100%; }
}

@media print {
  html, body { color:#102f28!important; background:#fff!important; }
  .guide-hero { min-height:0; padding:12mm; color:#102f28; border:1px solid #aebdb8; background:#fff!important; box-shadow:none; }
  .guide-hero::after, .guide-hero-actions, .guide-bottom-actions { display:none!important; }
  .guide-hero .eyebrow, .guide-hero p:last-child { color:#334f47; }
  .guide-hero h1 { font-size:30pt; }
  .guide-block { margin-top:8mm; break-inside:avoid; }
  .guide-heading { margin-bottom:4mm; }
  .guide-heading h2 { font-size:19pt; }
  .guide-flow { grid-template-columns:1fr 1fr; gap:3mm; }
  .guide-flow li, .guide-card, .guide-admin-grid article, .guide-rules article, .guide-bottom { min-height:0; padding:5mm; color:#102f28; border-color:#b9c6c2; background:#fff!important; box-shadow:none; break-inside:avoid; }
  .guide-flow li > span { margin-bottom:5mm; }
  .guide-columns, .guide-admin-grid, .guide-rules { gap:3mm; }
  .guide-admin { padding:5mm; border-color:#b9c6c2; background:#fff!important; }
  .guide-note { border-color:#334f47; background:#f2f5f4; }
}

/* User and reference-data administration */
.people-summary { margin-bottom:18px; padding:20px 22px; display:flex; align-items:center; justify-content:space-between; gap:28px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.people-summary > div { min-width:170px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.people-summary small { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; }
.people-summary strong { font-size:34px; }
.people-summary p { max-width:630px; margin:0; color:var(--muted); font-size:12px; line-height:1.55; }
.people-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.person-card { min-height:245px; padding:21px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 10px 28px rgba(20,59,50,.05); }
.person-disabled { opacity:.68; }
.person-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; }
.person-avatar { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; color:var(--green); background:var(--lime); font-size:17px; font-weight:900; }
.person-head h2 { margin:0 0 4px; overflow:hidden; color:var(--ink); font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.person-head p { margin:0; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.person-card dl { margin:30px 0 0; padding:17px 0; display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.person-card dl div + div { padding-left:15px; border-left:1px solid var(--line); }
.person-card dt { margin-bottom:6px; color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; }
.person-card dd { margin:0; color:var(--ink); font-size:12px; font-weight:800; }
.person-actions { margin-top:auto; padding-top:16px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.person-actions > span { color:var(--muted); font-size:10px; }
.person-actions a { color:var(--green-bright); font-size:11px; font-weight:850; text-decoration:none; }
.person-actions b { margin-left:5px; font-size:17px; }
.toggle-field { min-height:70px; padding:13px 15px; display:flex!important; align-items:center!important; grid-template-columns:none!important; gap:12px!important; border:1px solid var(--line); border-radius:14px; background:var(--soft); cursor:pointer; }
.toggle-field input { width:20px!important; min-height:20px!important; flex:0 0 20px; padding:0!important; accent-color:var(--green-bright); box-shadow:none!important; }
.toggle-field strong, .toggle-field small { display:block; }
.toggle-field strong { margin-bottom:4px; color:var(--ink); font-size:12px; }

.settings-grid { display:grid; grid-template-columns:1fr 1fr; align-items:start; gap:16px; }
.settings-card { overflow:hidden; border:1px solid var(--line); border-radius:24px; background:var(--surface); box-shadow:0 10px 28px rgba(20,59,50,.05); }
.settings-card > header { padding:25px; display:flex; align-items:flex-start; gap:15px; border-bottom:1px solid var(--line); }
.settings-icon { width:48px; height:48px; flex:0 0 48px; display:grid; place-items:center; border-radius:15px; color:var(--green); background:var(--lime); font-size:21px; font-weight:900; }
.settings-card h2 { margin:0 0 6px; color:var(--ink); font-size:25px; letter-spacing:-.035em; }
.settings-card header p:last-child { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.setting-add { padding:18px 20px; border-bottom:1px solid var(--line); background:var(--soft); }
.setting-add label > span { display:block; margin-bottom:7px; color:var(--muted); font-size:10px; font-weight:850; text-transform:uppercase; }
.setting-add label > div { display:flex; gap:7px; }
.setting-add input, .setting-list input { min-width:0; min-height:44px; flex:1; padding:0 12px; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:var(--input); outline:none; }
.setting-add input:focus, .setting-list input:focus { border-color:var(--green-bright); box-shadow:0 0 0 3px rgba(36,116,94,.1); }
.setting-add button, .setting-list form > button { min-height:44px; padding:0 12px; border:0; border-radius:11px; color:#fff; background:var(--green); font-size:10px; font-weight:850; cursor:pointer; }
.setting-list { padding:8px 20px 18px; }
.setting-list article { padding:12px 0; display:grid; gap:9px; border-bottom:1px solid var(--line); }
.setting-list article > form { display:flex; gap:7px; }
.setting-list article > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.setting-list article > div > span { color:var(--muted); font-size:10px; }
.setting-list article > div form { margin:0; }
.setting-list .setting-delete { min-height:28px; padding:0 8px; color:var(--danger); background:transparent; }
.setting-list .setting-delete:disabled { color:var(--muted); cursor:not-allowed; opacity:.55; }
.setting-empty { margin:15px 0 0; color:var(--muted); font-size:12px; }
.settings-hint { margin-top:18px; padding:18px 20px; display:flex; align-items:center; gap:18px; border:1px solid var(--line); border-radius:18px; background:var(--soft); }
.settings-hint strong { min-width:max-content; color:var(--ink); font-size:12px; }
.settings-hint p { margin:0; color:var(--muted); font-size:11px; line-height:1.5; }

@media (max-width:980px) {
  .people-grid { grid-template-columns:1fr 1fr; }
  .settings-grid { grid-template-columns:1fr; }
}

@media (max-width:620px) {
  .people-summary, .settings-hint { align-items:flex-start; flex-direction:column; }
  .people-grid { grid-template-columns:1fr; }
  .person-card { min-height:220px; }
  .setting-add label > div, .setting-list article > form { flex-direction:column; }
  .setting-add button, .setting-list form > button { width:100%; }
}

/* Stage 4: imports, classification, security, label printing and installation. */
.heading-actions, .print-toolbar, .print-toolbar > div, .batch-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.heading-actions { justify-content:flex-end; }
.install-app { min-height:38px; padding:0 13px; border:1px solid var(--line); border-radius:12px; color:var(--green); background:var(--surface); font-weight:800; cursor:pointer; }
.user-copy { color:var(--ink); text-decoration:none; }
.catalog-filters select { min-height:48px; max-width:210px; padding:0 12px; border:1px solid #cbdad5; border-radius:13px; color:var(--ink); background:#fff; }
.batch-toolbar { justify-content:flex-start; margin:0 0 14px; padding:12px 16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.batch-toolbar label { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:800; }
.batch-toolbar button { min-height:38px; padding:0 14px; border:0; border-radius:11px; color:#fff; background:var(--green); font-weight:800; cursor:pointer; }
.batch-toolbar button:disabled { opacity:.4; cursor:not-allowed; }
.batch-toolbar form { margin:0; display:flex; }
.batch-toolbar .batch-delete-button { background:var(--danger); }
.batch-toolbar > span { color:var(--muted); font-size:12px; }
.item-card-wrap { position:relative; min-width:0; }
.item-card-wrap.inactive { opacity:.65; }
.item-card-wrap .item-card { height:100%; }
.item-select { position:absolute; z-index:2; top:58px; right:18px; padding:4px 6px; display:flex; align-items:center; gap:6px; border-radius:9px; color:var(--muted); background:var(--surface); font-size:10px; font-weight:800; text-transform:uppercase; cursor:pointer; }
.item-select input { width:17px; height:17px; accent-color:var(--green); }
.item-meta { display:flex; gap:7px; flex-wrap:wrap; margin:-8px 0 16px; }
.item-meta span { padding:5px 8px; border-radius:8px; color:var(--green); background:var(--lime-soft); font-size:10px; font-weight:800; }
.security-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.security-form { display:flex; flex-direction:column; gap:16px; }
.security-form label { display:grid; gap:7px; }
.security-form label span { color:var(--muted); font-size:12px; font-weight:800; }
.security-form input { min-height:48px; padding:10px 13px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:var(--surface); }
.security-form > button, .import-form button { min-height:48px; padding:0 18px; border:0; border-radius:13px; color:#fff; background:var(--green); font-weight:850; cursor:pointer; }
.import-form { display:block; }
.upload-zone { padding:42px 24px; border:2px dashed var(--line); border-radius:20px; text-align:center; background:var(--soft); }
.upload-zone > span { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 14px; border-radius:18px; color:var(--green); background:var(--lime); font-size:30px; }
.upload-zone h2 { margin:0 0 8px; }
.upload-zone p { margin:0 0 22px; color:var(--muted); }
.print-toolbar { justify-content:space-between; margin-bottom:24px; }
.print-toolbar h1 { margin:4px 0 0; }
.qr-label-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10mm; }
.qr-label { min-height:58mm; padding:7mm; display:grid; grid-template-columns:32mm 1fr; align-items:center; gap:5mm; border:1px dashed #91a69f; border-radius:4mm; background:#fff; color:#102f28; break-inside:avoid; }
.qr-label img { width:32mm; height:32mm; }
.qr-label strong, .qr-label code, .qr-label span { display:block; }
.qr-label strong { margin-bottom:3mm; font-size:14px; line-height:1.25; }
.qr-label code { margin-bottom:2mm; color:#24745e; font-size:11px; font-weight:850; }
.qr-label span { color:#5f7770; font-size:10px; }
html[data-theme="dark"] .catalog-filters select { border-color:var(--line); color:var(--ink); background:var(--surface); }
html[data-theme="dark"] .item-meta span { color:var(--lime); background:rgba(218,250,85,.1); }
@media (max-width:900px) { .security-grid{grid-template-columns:1fr}.qr-label-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:620px) { .heading-actions{width:100%;justify-content:stretch}.heading-actions a{flex:1}.catalog-filters select{max-width:none;flex:1}.qr-label-grid{grid-template-columns:1fr}.install-app{display:none}.batch-toolbar{align-items:flex-start}.item-card h2{padding-right:38px}.item-select span{display:none} }
@media print {
  @page { size:A4; margin:10mm; }
  .topbar, footer, .print-toolbar { display:none!important; }
  body, .app-shell, .dashboard-main { margin:0!important; padding:0!important; max-width:none!important; background:#fff!important; }
  .qr-label-grid { grid-template-columns:repeat(3,1fr); gap:5mm; }
  .qr-label { min-height:50mm; padding:4mm; grid-template-columns:27mm 1fr; gap:3mm; border-color:#aaa; }
  .qr-label img { width:27mm; height:27mm; }
}

/* 2026 visual refresh and color themes */
:root {
  --page: #eef5f2;
  --page-top: #fbfdfc;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f1f6f4;
  --soft: var(--surface-soft);
  --input: #fbfdfc;
  --ink: #102f28;
  --muted: #687d77;
  --line: #d9e6e1;
  --green: #123f35;
  --green-bright: #1d755d;
  --lime: #dafa55;
  --shadow: 0 22px 60px rgba(20,59,50,.11);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #08140f;
  --page-top: #0e1c17;
  --surface: #10231d;
  --surface-raised: #132a23;
  --surface-soft: #182f28;
  --soft: var(--surface-soft);
  --input: #0c1d18;
  --ink: #ecf7f2;
  --muted: #9bb4ab;
  --line: #29473d;
  --green: #163f34;
  --green-bright: #3da784;
  --lime: #dafa55;
  --shadow: 0 24px 70px rgba(0,0,0,.32);
}

body {
  background: radial-gradient(circle at 8% 0, rgba(218,250,85,.14), transparent 30rem), linear-gradient(180deg,var(--page-top),var(--page));
  transition: color 180ms ease, background-color 180ms ease;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20,59,50,.08);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible { transform: translateY(-2px); border-color: var(--green-bright); outline: none; }
.theme-icon { grid-area: 1 / 1; font-size: 20px; line-height: 1; transition: transform 180ms ease, opacity 180ms ease; }
.theme-moon { transform: translateY(24px) rotate(45deg); opacity: 0; }
html[data-theme="dark"] .theme-sun { transform: translateY(-24px) rotate(-45deg); opacity: 0; }
html[data-theme="dark"] .theme-moon { transform: translateY(0) rotate(0); opacity: 1; }
.theme-toggle-login { position: fixed; z-index: 20; top: 28px; right: 28px; }

.topbar { min-height: 92px; position: relative; border-color: var(--line); }
.topbar::after { content:""; position:absolute; right:0; bottom:-1px; left:0; height:1px; background:linear-gradient(90deg,transparent,rgba(36,116,94,.25),transparent); }
.brand-mark { border-radius: 14px 14px 14px 5px; box-shadow: 0 12px 28px rgba(105,128,26,.2); }
.main-nav { border: 1px solid rgba(36,116,94,.08); background: color-mix(in srgb,var(--surface) 82%,transparent); box-shadow: 0 8px 24px rgba(20,59,50,.05); backdrop-filter: blur(14px); }
.main-nav a { transition: color 150ms ease, background 150ms ease; }
.main-nav a.active { box-shadow: 0 7px 17px rgba(21,60,52,.2); }
.logout { border-color: var(--line); color: var(--ink); background: var(--surface); }
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.footer-status i, .live-chip i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #45bd85; box-shadow: 0 0 0 4px rgba(69,189,133,.13); }

.welcome-dashboard { min-height: 340px; padding: clamp(30px,5vw,56px); display: grid; grid-template-columns: minmax(0,1.5fr) minmax(250px,.5fr); align-items: stretch; gap: clamp(28px,5vw,68px); overflow: hidden; position: relative; isolation: isolate; background: radial-gradient(circle at 92% 18%,rgba(218,250,85,.18),transparent 19rem),linear-gradient(130deg,#0d382f,#1b614f); }
.welcome-dashboard::after { content:""; position:absolute; z-index:-1; right:-115px; bottom:-210px; width:390px; height:390px; border:62px solid rgba(218,250,85,.08); border-radius:50%; }
.welcome-copy { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; }
.live-chip { margin-bottom: 34px; padding: 8px 12px; display:inline-flex; align-items:center; gap:9px; border:1px solid rgba(255,255,255,.14); border-radius:999px; color:#d9e9e3; background:rgba(255,255,255,.06); font-size:10px; font-weight:850; letter-spacing:.05em; text-transform:uppercase; }
.welcome-copy .eyebrow { margin-bottom: 12px; color: var(--lime); }
.welcome-dashboard h1 { max-width:780px; font-size:clamp(38px,5.5vw,70px); }
.welcome-dashboard h1 span { color: var(--lime); }
.welcome-copy > p:last-child { max-width:690px; margin:22px 0 0; color:#c8ddd5; font-size:15px; line-height:1.65; }
.welcome-summary { padding:24px; display:grid; align-content:end; gap:10px; border:1px solid rgba(255,255,255,.14); border-radius:22px; background:rgba(5,27,22,.22); backdrop-filter:blur(10px); }
.welcome-summary > div { padding:15px 0; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid rgba(255,255,255,.1); }
.welcome-summary small { color:#abc8be; font-size:10px; font-weight:800; text-transform:uppercase; }
.welcome-summary strong { color:#fff; font-size:13px; text-transform:uppercase; }
.welcome-summary > span { margin-top:7px; color:#abc8be; font-size:10px; line-height:1.5; }

.section-heading { margin-top:48px; }
.action-card { min-height:250px; padding:25px; position:relative; overflow:hidden; border-color:var(--line); background:var(--surface); }
.action-card::after { content:""; position:absolute; right:-75px; bottom:-105px; width:175px; height:175px; border:28px solid rgba(36,116,94,.045); border-radius:50%; }
.action-card.primary::after { border-color:rgba(218,250,85,.08); }
.card-index { position:absolute; top:26px; right:26px; color:#a1b4ae; font-size:10px; font-weight:900; letter-spacing:.12em; }
.action-card.primary .card-index { color:#86ac9f; }
.action-card .action-icon { margin-bottom:34px; }
.action-card strong { font-size:23px; letter-spacing:-.025em; }
.action-card small { max-width:250px; }
.action-arrow { width:100%; display:flex; align-items:center; justify-content:space-between; color:var(--green-bright); font-size:10px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.action-arrow b { font-size:21px; font-weight:500; }
.action-card.primary .action-arrow { color:var(--lime); }
.admin-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.admin-link, .admin-grid button { min-height:104px; }
.admin-link { background:linear-gradient(135deg,#123f35,#1a5949); }
.admin-grid button { color:var(--muted); background:var(--surface); }

/* Shared surfaces in both color schemes */
.action-card:not(.primary), .admin-grid button, .stats-grid > div, .search-bar, .item-card,
.catalog-empty, .form-card, .item-hero, .item-info-card, .qr-card, .danger-zone,
.camera-card, .manual-code, .mobile-operation, .inventory-card, .result-card,
.history-filters, .history-card, .discrepancy-card, .login-shell, .login-card {
  border-color: var(--line);
  background-color: var(--surface);
}
.form-grid input, .form-grid select, .form-grid textarea, .auth-form input,
.search-bar input, .manual-code input, .big-field input, .big-field textarea,
.history-filters input, .history-filters select {
  border-color: var(--line);
  color: var(--ink);
  background: var(--input);
}
.readonly-stock, .auth-tabs, .history-top span, .filter-actions a, .difference-preview,
.receipt-grid { border-color:var(--line); background:var(--surface-soft); }

html[data-theme="dark"] .brand-mark, html[data-theme="dark"] .user-avatar { color:#102f28; }
html[data-theme="dark"] .main-nav a.active { color:#102f28; background:var(--lime); box-shadow:0 8px 22px rgba(218,250,85,.12); }
html[data-theme="dark"] .main-nav a:hover { color:#fff; }
html[data-theme="dark"] .main-nav a.active:hover { color:#102f28; }
html[data-theme="dark"] .action-card.primary { background:linear-gradient(145deg,#174b3e,#11382f); }
html[data-theme="dark"] .action-card:not(.primary), html[data-theme="dark"] .item-card,
html[data-theme="dark"] .history-card { box-shadow:0 12px 34px rgba(0,0,0,.16); }
html[data-theme="dark"] .admin-link { border-color:#2b6e5a; background:linear-gradient(135deg,#173f35,#205d4c); }
html[data-theme="dark"] .stats-grid .warning-stat { border-color:#70552c; background:#2a2418; }
html[data-theme="dark"] .low-stock-alert, html[data-theme="dark"] .inventory-warning,
html[data-theme="dark"] .difference-preview.discrepancy, html[data-theme="dark"] .discrepancy-card { border-color:#70552c; color:#f3c57e; background:#2a2418; }
html[data-theme="dark"] .success-message, html[data-theme="dark"] .difference-preview.matched { border-color:#2d6e59; color:#8fddb9; background:#132d25; }
html[data-theme="dark"] .form-errors, html[data-theme="dark"] .form-error,
html[data-theme="dark"] .danger-zone { border-color:#704347; color:#f1a5aa; background:#2b1b1d; }
html[data-theme="dark"] .qr-frame { border-color:var(--line); background:#fff; }
html[data-theme="dark"] .status-pill.ok-status { color:#9ce0c2; background:#17372d; }
html[data-theme="dark"] .status-pill.warning-status { color:#f0c27b; background:#332918; }
html[data-theme="dark"] .status-pill.muted-status { color:#a8bbb4; background:#23352f; }
html[data-theme="dark"] .login-page { background:var(--page); }
html[data-theme="dark"] .login-shell { box-shadow:0 34px 90px rgba(0,0,0,.42); }
html[data-theme="dark"] .login-aside { background:radial-gradient(circle at 90% 10%,rgba(218,250,85,.12),transparent 18rem),linear-gradient(145deg,#0d2b24,#17493c); }
html[data-theme="dark"] .auth-tabs label { color:var(--muted); }
html[data-theme="dark"] #auth-password:checked ~ .auth-tabs label[for="auth-password"],
html[data-theme="dark"] #auth-pin:checked ~ .auth-tabs label[for="auth-pin"] { color:var(--ink); background:var(--surface-raised); box-shadow:0 6px 18px rgba(0,0,0,.2); }
html[data-theme="dark"] .file-scan { border-color:var(--line); color:#89d7ba; background:var(--surface-soft); }
html[data-theme="dark"] .manual-code button, html[data-theme="dark"] .search-bar button,
html[data-theme="dark"] .filter-actions button { background:#266f5b; }
html[data-theme="dark"] .item-info-card dl, html[data-theme="dark"] .item-info-card dl div + div,
html[data-theme="dark"] .receipt-grid > div + div { border-color:var(--line); }
html[data-theme="dark"] .item-card code, html[data-theme="dark"] .item-hero code,
html[data-theme="dark"] .qr-card code, html[data-theme="dark"] .inventory-card code,
html[data-theme="dark"] .discrepancy-card code { color:#75c9aa; }
html[data-theme="dark"] .primary-link { color:#102f28; background:var(--lime); box-shadow:0 10px 24px rgba(218,250,85,.1); }
html[data-theme="dark"] .primary-link:hover { background:#e4ff78; }
html[data-theme="dark"] .secondary-link { border-color:var(--line); color:var(--ink); background:var(--surface); }
html[data-theme="dark"] .item-description p, html[data-theme="dark"] .qr-card > p,
html[data-theme="dark"] .page-heading p:last-child { color:var(--muted); }

@media (max-width: 980px) {
  .admin-grid { grid-template-columns:repeat(2,1fr); }
  .welcome-dashboard { grid-template-columns:1fr; }
  .welcome-summary { grid-template-columns:1fr 1fr; align-content:stretch; }
  .welcome-summary > span { grid-column:1 / -1; }
}

@media (max-width: 620px) {
  .theme-toggle-login { top:16px; right:16px; }
  .welcome-dashboard { min-height:0; padding:28px 24px; gap:28px; }
  .live-chip { margin-bottom:26px; }
  .welcome-dashboard h1 { font-size:38px; }
  .welcome-copy > p:last-child { margin-top:16px; font-size:13px; }
  .welcome-summary { padding:17px; }
  .action-card { min-height:210px; }
  .admin-grid { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }

/* Stage 3: scanning, stock movement, history and inventory */
textarea, select { font: inherit; }
.action-card { text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.action-card:hover, .action-card:focus-visible { transform: translateY(-3px); border-color: rgba(36,116,94,.42); box-shadow: 0 18px 42px rgba(20,59,50,.12); outline: none; }
.action-card.primary:hover, .action-card.primary:focus-visible { border-color: var(--green-bright); background: var(--green-bright); }
.action-arrow { margin-top: auto; padding-top: 16px; color: var(--green-bright); font-size: 23px; }
.action-card.primary .action-arrow { color: var(--lime); }
.item-hero-actions { display: flex; align-items: center; gap: 9px; }

.scanner-shell { max-width: 760px; margin: 0 auto; }
.scanner-heading { margin-bottom: 23px; text-align: center; }
.scanner-heading h1 { margin: 0 0 10px; font-size: clamp(36px,6vw,56px); letter-spacing: -.05em; }
.scanner-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.camera-card { padding: 20px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.qr-reader { min-height: 390px; overflow: hidden; display: grid; place-items: center; border-radius: 20px; color: #fff; background: linear-gradient(145deg,#102d27,#1d5446); }
.qr-reader video { border-radius: 18px; object-fit: cover; }
.qr-reader > div { border: 0 !important; }
.camera-placeholder { max-width: 310px; padding: 30px; display: grid; justify-items: center; text-align: center; }
.camera-placeholder > span { width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(221,243,106,.34); border-radius: 25px; color: var(--lime); background: rgba(255,255,255,.06); font-size: 34px; }
.camera-placeholder strong { font-size: 18px; }
.camera-placeholder small { margin-top: 8px; color: #bcd4cc; line-height: 1.5; }
.scanner-status { min-height: 42px; padding: 14px 5px 8px; color: var(--muted); text-align: center; font-size: 12px; }
.camera-start, .confirm-operation { width: 100%; min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 16px; color: #fff; background: var(--green); box-shadow: 0 12px 25px rgba(21,60,52,.18); font-weight: 850; cursor: pointer; }
.camera-start:hover, .camera-start:focus-visible, .confirm-operation:hover, .confirm-operation:focus-visible { background: var(--green-bright); outline: none; }
.camera-start:disabled, .confirm-operation:disabled { cursor: wait; opacity: .68; }
.camera-start span, .confirm-operation span { font-size: 22px; }
.file-scan { min-height: 47px; margin-top: 9px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--green-bright); background: var(--soft); font-size: 12px; font-weight: 800; cursor: pointer; }
.file-scan input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.manual-code { margin-top: 15px; padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb,var(--surface) 86%,transparent); }
.manual-code > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.manual-code > div { display: flex; gap: 8px; }
.manual-code input { min-width: 0; min-height: 50px; flex: 1; padding: 0 14px; border: 1px solid #cbdad5; border-radius: 13px; text-transform: uppercase; outline: none; }
.manual-code input:focus { border-color: var(--green-bright); box-shadow: 0 0 0 4px rgba(36,116,94,.1); }
.manual-code button { padding: 0 18px; border: 0; border-radius: 13px; color: #fff; background: var(--green); font-weight: 800; cursor: pointer; }

.mobile-operation, .inventory-card { max-width: 760px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.operation-item { padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.operation-item code, .inventory-card code { color: var(--green-bright); font-size: 11px; font-weight: 850; }
.operation-item h1, .inventory-card h1 { margin: 11px 0 7px; font-size: clamp(29px,5vw,43px); line-height: 1.06; letter-spacing: -.045em; }
.operation-item p, .inventory-card header > p:last-child { margin: 0; color: var(--muted); }
.operation-item img { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 20px; object-fit: cover; }
.operation-stock, .database-stock { padding: 24px 28px; display: flex; align-items: baseline; gap: 10px; color: #fff; background: linear-gradient(120deg,#153c34,#225e4e); }
.operation-stock > span, .database-stock > span { margin-right: auto; color: #c9ddd6; font-size: 12px; font-weight: 800; }
.operation-stock strong, .database-stock strong { font-size: clamp(42px,8vw,68px); line-height: 1; letter-spacing: -.06em; }
.operation-stock small, .database-stock small { color: var(--lime); font-weight: 850; }
.operation-stock b { margin-left: 12px; padding: 7px 9px; border-radius: 999px; color: #7b490c; background: #ffdfa2; font-size: 9px; text-transform: uppercase; }
.operation-form, .inventory-card form { padding: 28px; display: grid; gap: 22px; }
.operation-toggle { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; }
.operation-toggle legend { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 850; }
.operation-toggle label { position: relative; cursor: pointer; }
.operation-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.operation-toggle label > span { min-height: 112px; padding: 17px; display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-content: center; border: 2px solid var(--line); border-radius: 18px; background: var(--input); transition: border-color 150ms ease, background 150ms ease; }
.operation-toggle label b { width: 34px; height: 34px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 11px; color: #fff; background: #8fa39d; font-size: 20px; }
.operation-toggle label strong { align-self: end; font-size: 17px; }
.operation-toggle label small { align-self: start; color: var(--muted); font-size: 10px; }
.operation-toggle input:checked + span { border-color: var(--green-bright); background: color-mix(in srgb,var(--green-bright) 14%,var(--surface)); box-shadow: 0 0 0 4px rgba(36,116,94,.08); }
.operation-toggle input:checked + span b { background: var(--green-bright); }
.operation-toggle input:focus-visible + span { outline: 3px solid rgba(36,116,94,.18); }
.big-field { display: grid; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 850; }
.big-field em { margin-left: 5px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
.big-field input, .big-field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--input); outline: none; }
.big-field input { min-height: 62px; font-size: 24px; font-weight: 850; }
.big-field textarea { min-height: 96px; resize: vertical; }
.big-field input:focus, .big-field textarea:focus { border-color: var(--green-bright); background: var(--surface); box-shadow: 0 0 0 4px rgba(36,116,94,.1); }
.big-field small { color: var(--muted); font-size: 10px; font-weight: 500; }

.result-card { max-width: 780px; margin: 20px auto; padding: 42px; border: 1px solid var(--line); border-radius: 30px; text-align: center; background: var(--surface); box-shadow: var(--shadow); }
.result-icon { width: 82px; height: 82px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 27px; color: #fff; background: var(--green-bright); box-shadow: 0 15px 30px rgba(36,116,94,.2); font-size: 38px; font-weight: 900; }
.error-result .result-icon, .status-rejected .result-icon { background: var(--danger); }
.status-discrepancy .result-icon { background: #c87923; }
.result-card h1 { margin: 0 0 8px; font-size: clamp(34px,6vw,52px); line-height: 1; letter-spacing: -.05em; }
.result-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); font-size: 17px; }
.receipt-grid { margin: 28px 0; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 19px; background: var(--soft); }
.receipt-grid > div { min-width: 0; padding: 20px 12px; }
.receipt-grid > div + div { border-left: 1px solid var(--line); }
.receipt-grid small, .receipt-grid strong { display: block; }
.receipt-grid small { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.receipt-grid strong { overflow-wrap: anywhere; font-size: 21px; }
.result-card blockquote { margin: 22px 0; padding: 17px; border-left: 4px solid var(--lime); border-radius: 0 14px 14px 0; color: var(--muted); background: var(--surface-soft); text-align: left; }
.result-actions { margin-top: 28px; display: flex; justify-content: center; gap: 9px; }
.text-link { margin-top: 15px; display: block; color: var(--muted); font-size: 12px; font-weight: 750; }

.history-filters { margin-bottom: 18px; padding: 18px; display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)) auto; align-items: end; gap: 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.history-filters label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.history-filters input, .history-filters select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--input); outline: none; font-size: 12px; text-transform: none; }
.history-filters input:focus, .history-filters select:focus { border-color: var(--green-bright); }
.filter-actions { display: flex; gap: 6px; }
.filter-actions button, .filter-actions a { min-height: 44px; padding: 0 13px; display: grid; place-items: center; border: 0; border-radius: 11px; font-size: 11px; font-weight: 850; text-decoration: none; }
.filter-actions button { color: #fff; background: var(--green); cursor: pointer; }
.filter-actions a { color: var(--muted); background: var(--soft); }
.history-list, .discrepancy-list { display: grid; gap: 10px; }
.history-card { padding: 17px 20px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.history-type { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: #778b85; font-size: 23px; font-weight: 900; }
.history-type.type-take { background: #a94c51; }
.history-type.type-return { background: #277b60; }
.history-main { min-width: 0; }
.history-top { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.history-top span { padding: 4px 7px; border-radius: 999px; background: var(--soft); }
.history-main h2 { margin: 7px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.history-main p { margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-quantity { text-align: right; }
.history-quantity strong, .history-quantity small { display: block; }
.history-quantity strong { font-size: 18px; }
.history-quantity small { margin-top: 5px; color: var(--muted); font-size: 10px; }

.inventory-card header { padding: 28px; }
.database-stock { margin: 0; }
.difference-preview { min-height: 78px; padding: 16px; display: grid; align-content: center; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: var(--soft); }
.difference-preview strong, .difference-preview span { display: block; }
.difference-preview strong { margin-bottom: 5px; }
.difference-preview span { font-size: 12px; }
.difference-preview.matched { border-color: #9fd7c1; color: #1f765b; background: #eaf8f2; }
.difference-preview.discrepancy { border-color: #edc982; color: #94510f; background: #fff8e9; }
.inventory-warning { margin: 22px 0; padding: 17px; border: 1px solid #edc982; border-radius: 16px; color: #7d470e; background: #fff8e9; text-align: left; }
.inventory-warning strong { display: block; margin-bottom: 5px; }
.inventory-warning p { margin: 0; font-size: 12px; line-height: 1.5; }
.approval-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.approval-actions button { width: 100%; min-height: 50px; padding: 0 17px; border-radius: 14px; font-weight: 850; cursor: pointer; }
.approve-button { border: 0; color: #fff; background: var(--green); }
.reject-button { border: 1px solid #d58d90; color: var(--danger); background: #fff; }
.discrepancy-card { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #edc982; border-radius: 19px; color: var(--ink); background: #fffbf1; text-decoration: none; }
.discrepancy-card code { color: var(--green-bright); font-size: 10px; font-weight: 850; }
.discrepancy-card h2 { margin: 7px 0 5px; font-size: 19px; }
.discrepancy-card p { margin: 0; color: var(--muted); font-size: 11px; }
.discrepancy-card > div:last-child { text-align: right; }
.discrepancy-card small, .discrepancy-card strong, .discrepancy-card span { display: block; }
.discrepancy-card small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.discrepancy-card strong { margin: 5px 0 8px; color: #9a5914; font-size: 20px; }
.discrepancy-card span { color: var(--green-bright); font-size: 11px; font-weight: 850; }

html[data-theme="dark"] .install-app { border-color:var(--line); color:var(--lime); background:var(--surface); }
html[data-theme="dark"] .history-main h2,
html[data-theme="dark"] .history-quantity strong { color:var(--ink); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color:#78958b; opacity:1; }
html[data-theme="dark"] .auth-form input:focus,
html[data-theme="dark"] .form-grid input:focus,
html[data-theme="dark"] .form-grid select:focus,
html[data-theme="dark"] .form-grid textarea:focus { color:var(--ink); background:var(--input); }
html[data-theme="dark"] select option { color:var(--ink); background:var(--input); }
html[data-theme="dark"] .filter-actions button { color:#102f28; background:var(--lime); }
html[data-theme="dark"] .reject-button { color:#f1a5aa; background:var(--surface); }
.delete-zone { border-color:#e6b8bb; background:#fff6f6; }
.delete-zone button { color:#fff; background:#a83238; }
.trash-list { display:grid; gap:12px; }
.trash-card { padding:20px 22px; display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid var(--line); border-radius:19px; color:var(--ink); background:var(--surface); }
.trash-card code { color:var(--green-bright); font-size:10px; font-weight:850; }
.trash-card h2 { margin:7px 0 5px; font-size:19px; }
.trash-card p { margin:0; color:var(--muted); font-size:11px; }
.trash-card .trash-audit { margin-top:12px; padding-top:11px; border-top:1px solid var(--line); color:var(--muted); }
.trash-audit span { font-weight:750; }
.trash-audit strong { color:var(--ink); }
.trash-audit time { color:var(--muted); }
.trash-card button { min-height:44px; padding:0 15px; border:0; border-radius:12px; color:#fff; background:var(--green-bright); font-weight:850; cursor:pointer; }
html[data-theme="dark"] .delete-zone { border-color:#704347; color:#f1a5aa; background:#2b1b1d; }
@media (max-width:620px) { .trash-card{align-items:flex-start;flex-direction:column}.trash-card form,.trash-card button{width:100%} }

@media (max-width: 1060px) {
  .history-filters { grid-template-columns: repeat(3,1fr); }
  .filter-actions { align-self: end; }
}

@media (max-width: 760px) {
  .main-nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { min-width: max-content; flex: 0 0 auto; }
  .item-hero-actions { align-items: stretch; flex-direction: column; }
  .qr-reader { min-height: 330px; }
  .history-filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions > * { flex: 1; }
}

@media (max-width: 560px) {
  .scanner-shell { margin-top: -6px; }
  .scanner-heading { text-align: left; }
  .camera-card { margin-inline: -4px; padding: 12px; border-radius: 22px; }
  .qr-reader { min-height: 290px; border-radius: 17px; }
  .manual-code { padding: 15px; }
  .manual-code > div { flex-direction: column; }
  .manual-code button { min-height: 48px; }
  .mobile-operation, .inventory-card { margin-inline: -4px; border-radius: 22px; }
  .operation-item, .inventory-card header { padding: 22px; }
  .operation-item img { width: 78px; height: 78px; flex-basis: 78px; }
  .operation-stock, .database-stock { padding: 21px 22px; flex-wrap: wrap; }
  .operation-stock > span, .database-stock > span { width: 100%; flex-basis: 100%; }
  .operation-stock b { margin-left: auto; }
  .operation-form, .inventory-card form { padding: 22px; }
  .operation-toggle { grid-template-columns: 1fr; }
  .operation-toggle label > span { min-height: 86px; }
  .result-card { margin: 0 -4px; padding: 30px 20px; border-radius: 24px; }
  .receipt-grid { grid-template-columns: 1fr; }
  .receipt-grid > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .result-actions, .approval-actions { grid-template-columns: 1fr; flex-direction: column; }
  .result-actions > *, .approval-actions form, .approval-actions button { width: 100%; }
  .history-filters { grid-template-columns: 1fr; }
  .filter-actions { grid-column: auto; }
  .history-card { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .history-quantity { grid-column: 2; text-align: left; }
  .discrepancy-card { align-items: flex-start; flex-direction: column; }
  .discrepancy-card > div:last-child { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: end; text-align: left; }
  .discrepancy-card > div:last-child span { grid-column: 2; grid-row: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }
