:root {
  color-scheme: light;
  --admin-red: #e72e29;
  --admin-red-dark: #bd211e;
  --admin-navy: #142039;
  --admin-ink: #1a2943;
  --admin-muted: #63718a;
  --admin-line: #e1e7f0;
  --admin-bg: #f3f6fb;
  --admin-shadow: 0 8px 28px rgba(27,47,83,.045);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--admin-ink); font: 14px/1.65 "Segoe UI",Arial,sans-serif; -webkit-text-size-adjust: 100%; }
button,input,select,textarea { font: inherit; }
button,a,input,select,summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: #b32624; text-underline-offset: .2em; }
a:hover { color: var(--admin-red); }
img { max-width: 100%; height: auto; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { line-height: 1.25; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid #1e72c4; outline-offset: 4px; }
[hidden] { display: none !important; }
.admin-skip-link { position: fixed; z-index: 250; top: -100px; left: 17px; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 2px solid var(--admin-red); border-radius: 8px; color: var(--admin-navy); background: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 5px 20px #1420391a; }
.admin-skip-link:focus { top: 12px; }
.admin-body { background: var(--admin-bg); }
.admin-layout { display: grid; grid-template-columns: 246px minmax(0,1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; height: 100vh; min-width: 0; padding: 28px 18px 22px; overflow-y: auto; color: #b7c6de; background: linear-gradient(155deg,#1b2b48,#111d33 80%); }
.admin-brand { display: block; margin-bottom: 32px; color: #fff; text-decoration: none; }
.admin-brand img { display: block; width: 210px; max-height: 65px; padding: 8px; border-radius: 9px; background: #fff; object-fit: contain; }
.admin-brand > span,.admin-brand > strong,.admin-brand > p { display: block; margin: 12px 8px 0; color: #b4c3dc; font-size: .71rem; font-weight: 700; letter-spacing: .085em; text-transform: uppercase; }
.admin-nav { display: flex; flex-direction: column; gap: 5px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 11px 14px; border: 1px solid transparent; border-radius: 8px; color: #bbc9df; font-size: .85rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background .18s,color .18s,border-color .18s; }
.admin-nav a:hover { color: #fff; background: #ffffff0b; }
.admin-nav a.is-active { color: #fff; border-color: #f3494033; background: linear-gradient(100deg,#e72e29,#d52523); box-shadow: 0 5px 16px #030d201a; }
.admin-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { margin-top: auto; padding: 28px 10px 0; color: #91a5c5; font-size: .75rem; line-height: 1.8; }
.sidebar-footer a { display: inline-flex; min-height: 40px; align-items: center; color: #c5d2e8; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }
.admin-main { min-width: 0; }
.admin-topbar { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 16px 36px; border-bottom: 1px solid var(--admin-line); background: #fff; }
.admin-topbar-title { margin: 0; color: #263b59; font-size: .85rem; font-weight: 700; }
.admin-topbar-title small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: .71rem; font-weight: 400; }
.admin-user { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; color: var(--admin-muted); font-size: .78rem; overflow-wrap: anywhere; }
.admin-user strong { color: var(--admin-ink); }
.logout-form { margin: 0; }
.admin-menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 8px; border: 1px solid var(--admin-line); border-radius: 8px; color: var(--admin-navy); background: #f7f9fd; font-size: 1.4rem; line-height: 1; }
.admin-sidebar-backdrop { display: none; }
.admin-content { width: 100%; max-width: 1500px; margin-inline: auto; padding: 34px 36px 50px; }
.admin-page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 15px 25px; margin-bottom: 27px; }
.admin-page-heading > div { min-width: 0; }
.admin-page-heading h1 { margin-bottom: 7px; color: var(--admin-navy); font-size: clamp(1.55rem,2vw,1.95rem); font-weight: 750; letter-spacing: -.04em; }
.admin-page-heading p { max-width: 800px; margin-bottom: 0; color: var(--admin-muted); font-size: .86rem; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 23px; }
.admin-toolbar > form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0; }
form.admin-toolbar { justify-content: flex-start; align-items: flex-end; gap: 12px; }
.admin-toolbar input,.admin-toolbar select { min-height: 42px; max-width: 100%; padding: 9px 12px; border: 1px solid #ccd7e7; border-radius: 7px; background: #fff; color: var(--admin-ink); }
.admin-toolbar input[type=search] { width: 260px; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 24px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card { position: relative; overflow: hidden; min-width: 0; padding: 23px; border: 1px solid var(--admin-line); border-radius: 13px; background: #fff; box-shadow: var(--admin-shadow); }
.stat-card::before { position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #e72e29; content: ""; }
.stat-card:nth-child(2)::before { background: #467bc2; }.stat-card:nth-child(3)::before { background: #36856f; }.stat-card:nth-child(4)::before { background: #ae7a31; }
.stat-value { display: block; margin-bottom: 6px; color: var(--admin-navy); font-size: 2rem; font-weight: 800; letter-spacing: -.055em; line-height: 1.1; overflow-wrap: anywhere; }
.stat-label { display: block; margin-bottom: 4px; color: #354967; font-size: .78rem; font-weight: 700; }
.stat-note { display: block; margin: 0; color: #7c89a0; font-size: .7rem; }
.stat-card:last-child .stat-value { font-size: 1.65rem; letter-spacing: -.035em; }
.admin-card { min-width: 0; margin-bottom: 24px; padding: 27px; border: 1px solid var(--admin-line); border-radius: 13px; background: #fff; box-shadow: var(--admin-shadow); }
.admin-grid > .admin-card { margin-bottom: 0; }
.admin-card h2 { margin-bottom: 11px; color: var(--admin-navy); font-size: 1.1rem; font-weight: 750; letter-spacing: -.025em; }
.admin-card h3 { margin: 24px 0 13px; color: var(--admin-navy); font-size: .96rem; }
.admin-card > p { color: var(--admin-muted); font-size: .83rem; }
.admin-card > .form-note + .button,.admin-card > .form-note + .admin-table-wrap,.admin-card > .form-note + .admin-form { margin-top: 18px; }
.admin-card ul { padding-left: 20px; color: var(--admin-muted); font-size: .84rem; }
.admin-form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px; }
.form-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.form-field label,.admin-form > label,.auth-card label { color: #304562; font-size: .8rem; font-weight: 700; }
.form-field input,.form-field select,.form-field textarea,.admin-form > input,.admin-form > select,.admin-form > textarea,.auth-card input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #ccd7e7; border-radius: 7px; color: var(--admin-ink); background: #fbfcff; line-height: 1.5; transition: border-color .18s,box-shadow .18s,background .18s; }
.form-field textarea { min-height: 112px; resize: vertical; }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus,.auth-card input:focus { border-color: #6488b9; background: #fff; box-shadow: 0 0 0 3px #e7effa; }
.form-field input[type=file] { padding: 8px; background: #f4f7fc; font-size: .8rem; }
input[type=file]::file-selector-button { min-height: 29px; margin-right: 10px; padding: 4px 10px; border: 1px solid #ccd7e7; border-radius: 5px; color: #304562; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.form-field input[readonly] { color: #6b7b94; background: #f0f3f8; }
.form-field input[type=checkbox],.form-field input[type=radio],.check-row input { width: 17px; min-width: 17px; height: 17px; min-height: 17px; margin: 3px 0; accent-color: var(--admin-red); }
.form-field small,.form-field .help,.help,.password-hint { margin: 0; color: #728099; font-size: .72rem; font-weight: 400; line-height: 1.7; }
.form-note { margin: 0; color: #728099; font-size: .72rem; line-height: 1.75; }
.admin-body .admin-form > .form-field + .form-field { margin-top: 18px; }
.auth-card > .form-note { margin-top: 19px; }
.field-wide { grid-column: 1 / -1; }
.admin-form > .button,.admin-form > .check-row { margin-top: 19px; }
.admin-form > .field-wide { margin-top: 19px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: #42556f; font-size: .82rem; font-weight: 500; line-height: 1.65; }
.check-row label { cursor: pointer; }
.check-row input { flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; color: #344966; background: #eef2f8; font-size: .8rem; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; transition: background .18s,border-color .18s; }
.button:hover { color: #20334e; background: #e3eaf5; }
.button-primary { color: #fff; background: var(--admin-red); border-color: var(--admin-red); box-shadow: 0 4px 10px #e72e2912; }
.button-primary:hover { color: #fff; background: var(--admin-red-dark); border-color: var(--admin-red-dark); }
.button-secondary { color: #354b6b; background: #fff; border-color: #cdd8e8; }
.button-secondary:hover { color: #223b61; background: #f1f5fc; border-color: #a9bdd8; }
.button-danger { color: #b12725; background: #fff2f0; border-color: #f3cbc5; }
.button-danger:hover { color: #a11f1d; background: #ffe6e1; border-color: #e8a69c; }
.button-small { min-height: 35px; padding: 7px 11px; font-size: .74rem; }
.alert { margin-bottom: 22px; padding: 14px 17px; border: 1px solid; border-radius: 9px; font-size: .82rem; line-height: 1.75; overflow-wrap: anywhere; }
.alert-success { color: #236444; border-color: #bcdfcd; background: #eef9f3; }.alert-error { color: #9c2925; border-color: #efc1b9; background: #fff2ef; }.alert-warning { color: #785016; border-color: #e9d8b4; background: #fff9ed; }.alert-info { color: #345d91; border-color: #c3d7f1; background: #f0f6ff; }
.alert a { color: inherit; font-weight: 700; }
.admin-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--admin-line); border-radius: 10px; overscroll-behavior-x: contain; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .8rem; line-height: 1.6; text-align: left; }
.admin-table th { padding: 13px 15px; border-bottom: 1px solid var(--admin-line); color: #60718b; background: #f5f8fc; font-size: .68rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.admin-table td { max-width: 320px; padding: 15px; border-bottom: 1px solid #eaf0f7; color: #40536e; vertical-align: top; overflow-wrap: anywhere; }
.admin-table tr:last-child td { border-bottom: 0; }.admin-table tbody tr:hover { background: #fbfcff; }
.admin-table td strong { color: #213957; font-weight: 650; }.admin-table td small { display: block; margin-top: 3px; color: #7c89a0; font-size: .69rem; }
.admin-table td form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.admin-table td input,.admin-table td select { max-width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #ccd7e7; border-radius: 6px; background: #fff; color: var(--admin-ink); font-size: .75rem; }
.admin-table td textarea { min-width: 160px; max-width: 100%; padding: 8px; border: 1px solid #ccd7e7; border-radius: 6px; font-size: .75rem; resize: vertical; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid #d5deea; border-radius: 5px; color: #586e8d; background: #f2f5f9; font-size: .66rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.badge-new { color: #b42c26; background: #fff0ed; border-color: #f7d1c8; }.badge-contacted { color: #2c659d; background: #edf5ff; border-color: #cce0f8; }.badge-visit_planned { color: #86621b; background: #fff7e7; border-color: #edddb5; }.badge-closed { color: #347557; background: #edf8f2; border-color: #c7e4d4; }.badge-archived { color: #758093; background: #f1f3f6; border-color: #dde2ea; }
.empty-state { padding: 38px 25px; border: 1px dashed #cbd8e9; border-radius: 10px; background: #fafcff; color: #6e7e97; text-align: center; font-size: .85rem; }
.empty-state h2,.empty-state h3 { margin-bottom: 9px; color: #334e74; font-size: 1.05rem; }
.record-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 20px; }
.record-preview img { display: block; width: 150px; max-height: 140px; object-fit: contain; border: 1px solid var(--admin-line); border-radius: 9px; background: #f5f8fd; }
img.record-preview { display: block; width: 100px; min-width: 70px; height: 80px; margin: 0; border: 1px solid var(--admin-line); border-radius: 7px; background: #f5f8fd; object-fit: cover; }
.field-wide > img.record-preview { width: 180px; height: 130px; max-width: 100%; margin-bottom: 12px; object-fit: contain; }
.record-preview p { color: var(--admin-muted); font-size: .8rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; color: #75839b; font-size: .77rem; }
.pagination a { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 13px; border: 1px solid #d7e0ec; border-radius: 7px; background: #fff; color: #3b587e; font-weight: 650; text-decoration: none; }
.quick-links { display: grid; gap: 11px; margin-top: 20px; }
.quick-links a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 42px; padding: 13px 15px; border: 1px solid #d9e3f0; border-radius: 7px; color: #36577f; background: #f7faff; font-size: .79rem; font-weight: 650; text-decoration: none; }
.quick-links a strong { color: #2d4b73; font-size: .81rem; }
.quick-links a span { color: #7788a1; font-size: .71rem; font-weight: 400; line-height: 1.65; }
.quick-links a:hover { border-color: #a7c0e1; background: #eef5ff; }
.activity-list { list-style: none; margin: 20px 0 0; padding: 0; }
.activity-list li { display: flex; flex-direction: column; gap: 4px; padding: 13px 0 13px 17px; border-left: 2px solid #e3eaf5; border-bottom: 1px solid #edf1f8; }
.activity-list li:first-child { padding-top: 0; }
.activity-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-list strong { color: #405a7c; font-size: .79rem; font-weight: 650; text-transform: capitalize; overflow-wrap: anywhere; }
.activity-list span { color: #8794a9; font-size: .69rem; line-height: 1.6; overflow-wrap: anywhere; }
.content-group { margin-bottom: 17px; overflow: hidden; padding: 0; border: 1px solid var(--admin-line); border-radius: 11px; background: #fff; box-shadow: var(--admin-shadow); }
.content-group > summary { position: relative; min-height: 58px; padding: 18px 50px 18px 23px; list-style: none; color: #2e486b; font-size: .9rem; font-weight: 750; line-height: 1.5; cursor: pointer; }
.content-group > summary::-webkit-details-marker { display: none; }
.content-group > summary::after { position: absolute; right: 22px; top: 16px; color: #7c8fa9; content: "+"; font-size: 1.2rem; }
.content-group[open] > summary { border-bottom: 1px solid var(--admin-line); background: #fafcff; }
.content-group[open] > summary::after { content: "−"; }
.content-group > form,.content-group > .admin-form,.content-group > div { padding: 23px; }
.content-group fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.content-group legend { margin-bottom: 16px; color: #344d70; font-size: .85rem; font-weight: 700; }
.auth-body { min-height: 100vh; background: radial-gradient(ellipse at top left,#ffeae6 0,transparent 45%),radial-gradient(ellipse at bottom right,#e5edfd 0,transparent 50%),#f6f8fc; }
.auth-shell { width: min(460px,calc(100% - 36px)); margin: 0 auto; padding: 40px 0 28px; }
.auth-brand { display: block; width: fit-content; max-width: 100%; margin: 0 auto 32px; color: var(--admin-navy); text-decoration: none; }
.auth-brand img { display: block; width: 290px; max-height: 78px; object-fit: contain; }
.auth-kicker { margin-bottom: 10px; color: var(--admin-red-dark); font-size: .65rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-shell h1 { margin-bottom: 13px; color: var(--admin-navy); font-size: 1.9rem; font-weight: 750; letter-spacing: -.045em; }
.auth-description { margin-bottom: 25px; color: #687992; font-size: .86rem; line-height: 1.8; }
.auth-card { padding: 30px; border: 1px solid #e1e7f1; border-radius: 15px; background: #fff; box-shadow: 0 18px 45px #1c345810; }
.auth-card h2 { margin-bottom: 20px; color: #304767; font-size: 1.1rem; }
.auth-card .form-grid { grid-template-columns: 1fr; gap: 20px; }
.auth-card .form-field { margin-bottom: 18px; }.auth-card .form-grid .form-field { margin-bottom: 0; }
.auth-card .button-primary { width: 100%; min-height: 46px; margin-top: 8px; }
.auth-card > .alert { margin-bottom: 22px; }
.auth-card .password-hint { margin-top: 7px; }
.auth-footer { margin: 23px 0 0; color: #8793a7; font-size: .73rem; line-height: 1.8; text-align: center; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 36px; color: #5a7496; text-decoration: none; }
.setup-key-status { margin-bottom: 19px; padding: 11px 13px; border: 1px solid #c9e4d7; border-radius: 8px; background: #f0faf5; color: #36775a; font-size: .78rem; }
.password-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 10px; border: 1px solid var(--admin-line); border-radius: 6px; color: #486386; background: #f8fbff; font-size: .75rem; }
@media (min-width:901px) and (max-width:1150px) {
  .admin-layout { grid-template-columns: 220px minmax(0,1fr); }.admin-sidebar { padding-inline: 14px; }.admin-topbar { padding-inline: 25px; }.admin-content { padding-inline: 25px; }.dashboard-stats { gap: 13px; }.stat-card { padding: 20px 17px; }.admin-card { padding: 23px; }
}
@media (max-width:1100px) {
  .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }.admin-grid { grid-template-columns: 1fr; }
}
@media (max-width:900px) {
  .admin-layout { display: block; }.admin-sidebar { position: relative; height: auto; padding: 22px; }.admin-brand { max-width: 250px; margin-bottom: 20px; }.admin-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }.sidebar-footer { margin-top: 20px; padding-top: 8px; }
  .admin-js .admin-sidebar { position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: min(290px,calc(100% - 50px)); height: 100dvh; padding: 26px 19px; transform: translateX(-101%); visibility: hidden; transition: transform .2s ease,visibility .2s; }
  .admin-js .admin-sidebar.is-open { transform: translateX(0); visibility: visible; }.admin-js .admin-nav { display: flex; }.admin-js .sidebar-footer { margin-top: auto; padding-top: 28px; }
  .admin-js .admin-menu-toggle { display: inline-flex; }.admin-nav-open .admin-sidebar-backdrop { position: fixed; z-index: 90; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #101b34a8; }.admin-nav-open,.admin-nav-open body { overflow: hidden; }
  .admin-topbar { gap: 13px; min-height: 76px; padding: 14px 24px; }.admin-topbar-title { margin-right: auto; }.admin-content { padding: 28px 24px 40px; }
}
@media (max-width:600px) {
  .admin-topbar { flex-wrap: wrap; gap: 9px 12px; padding: 12px 17px; }.admin-topbar-title { font-size: .78rem; }.admin-user { gap: 8px; font-size: .72rem; }.admin-user .button { min-height: 38px; padding: 8px 11px; font-size: .72rem; }
  .admin-content { padding: 25px 17px 35px; }.admin-page-heading { margin-bottom: 23px; }.admin-page-heading h1 { font-size: 1.6rem; }.admin-page-heading p { font-size: .81rem; }
  .dashboard-stats { gap: 12px; margin-bottom: 22px; }.stat-card { padding: 20px 16px; border-radius: 10px; }.stat-value { font-size: 1.7rem; }.stat-label { font-size: .72rem; }.stat-note { font-size: .65rem; }
  .admin-grid { gap: 19px; }.admin-card { padding: 21px 18px; border-radius: 11px; }.admin-card h2 { font-size: 1.03rem; }.form-grid { grid-template-columns: 1fr; gap: 18px; }.admin-toolbar { align-items: stretch; }.admin-toolbar > form { width: 100%; gap: 10px; }.admin-toolbar input[type=search] { width: 100%; }.admin-toolbar > form > .form-field { flex: 1 1 100%; }
  .button { min-height: 44px; }.button-small { min-height: 40px; }.alert { padding: 13px 14px; font-size: .79rem; }.admin-table { min-width: 560px; }.admin-table th { padding: 12px; }.admin-table td { padding: 13px 12px; }.admin-table-wrap { margin-inline: -2px; }
  .record-preview img { width: 125px; max-height: 120px; }.pagination { align-items: flex-start; font-size: .72rem; }.content-group > summary { padding: 17px 45px 17px 18px; font-size: .85rem; }.content-group > form,.content-group > .admin-form,.content-group > div { padding: 20px 18px; }
  .auth-shell { padding-top: 28px; }.auth-brand { margin-bottom: 27px; }.auth-brand img { width: 260px; }.auth-shell h1 { font-size: 1.7rem; }.auth-card { padding: 25px 22px; border-radius: 13px; }
  .admin-js .admin-topbar { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 5px 12px; }
  .admin-js .admin-menu-toggle { grid-column: 1; grid-row: 1 / 3; }
  .admin-js .admin-topbar-title { grid-column: 2 / -1; min-width: 0; margin: 0; line-height: 1.5; }
  .admin-js .admin-user { grid-column: 2; min-width: 0; width: auto; margin: 0; padding: 0; justify-content: flex-start; }
  .admin-js .logout-form { grid-column: 3; grid-row: 2; }
  form.admin-toolbar > .form-field { flex: 1 1 100%; }
}
@media (max-width:359px) {
  .admin-topbar { padding-inline: 14px; }.admin-content { padding-inline: 14px; }.admin-user { width: 100%; justify-content: space-between; padding-left: 56px; }.stat-card { padding: 17px 13px; }.stat-label { font-size: .68rem; }.admin-card { padding: 19px 15px; }.auth-shell { width: calc(100% - 28px); }.auth-card { padding: 23px 18px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition: none !important; animation: none !important; }
}
@media print {
  .admin-layout { display: block; }.admin-sidebar,.admin-topbar,.admin-toolbar,.admin-sidebar-backdrop { display: none !important; }.admin-content { padding: 0; }.admin-card,.stat-card { box-shadow: none; }.admin-table-wrap { overflow: visible; }.admin-table { min-width: 0; }
}
.inventory-shell { min-width: 0; }
.inventory-shell .inventory-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.inventory-shell .inventory-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 0 0 24px; }
.inventory-shell .inventory-stat { min-width: 0; padding: 19px 20px; border: 1px solid var(--admin-line); border-radius: 11px; background: #fff; box-shadow: var(--admin-shadow); }
.inventory-shell .inventory-stat span { display: block; color: var(--admin-muted); font-size: .73rem; }
.inventory-shell .inventory-stat strong { display: block; margin: 7px 0 3px; color: var(--admin-navy); font-size: 1.8rem; line-height: 1.15; letter-spacing: -.04em; }
.inventory-shell .inventory-stat small { color: #8090a5; font-size: .68rem; }
.inventory-shell .inventory-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 22px; padding: 6px; border: 1px solid var(--admin-line); border-radius: 11px; background: #eaf0f8; }
.inventory-shell .inventory-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 7px; color: #526a8a; font-size: .8rem; font-weight: 700; text-decoration: none; }
.inventory-shell .inventory-tabs a:hover { color: var(--admin-navy); background: #ffffff7a; }
.inventory-shell .inventory-tabs a[aria-current=page] { color: var(--admin-navy); border-color: #d5deea; background: #fff; box-shadow: 0 2px 5px #1a294307; }
.inventory-shell .inventory-tabs a span { display: inline-flex; min-width: 23px; min-height: 23px; align-items: center; justify-content: center; padding: 2px 6px; border-radius: 5px; color: #647895; background: #edf2f8; font-size: .66rem; }
.inventory-shell .inventory-filters { display: grid; grid-template-columns: minmax(180px,1.5fr) repeat(4,minmax(115px,1fr)); gap: 13px; align-items: end; padding: 20px; margin-bottom: 22px; border: 1px solid var(--admin-line); border-radius: 11px; background: #fff; }
.inventory-shell .inventory-filters-labs { grid-template-columns: minmax(200px,2fr) minmax(140px,1fr); }
.inventory-shell .inventory-filters-locations { grid-template-columns: minmax(200px,1.6fr) repeat(3,minmax(120px,1fr)); }
.inventory-shell .inventory-filters .inventory-filter-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.inventory-shell .inventory-filters input,.inventory-shell .inventory-filters select { min-height: 44px; }
.inventory-shell .inventory-card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.inventory-shell .inventory-card-heading h2 { margin-bottom: 5px; }
.inventory-shell .inventory-card-heading p { margin: 0; color: var(--admin-muted); font-size: .75rem; }
.inventory-shell .inventory-code { display: inline-block; max-width: 100%; margin-bottom: 5px; padding: 3px 7px; border: 1px solid #d9e3f0; border-radius: 5px; color: #355578; background: #f0f5fc; font-family: Consolas,"Courier New",monospace; font-size: .75rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.inventory-shell .inventory-path { color: #6b7f99; font-size: .72rem; line-height: 1.65; }
.inventory-shell .inventory-path span { display: block; }
.inventory-shell .inventory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.inventory-shell .inventory-actions form { margin: 0; }
.inventory-shell .inventory-actions .button { min-height: 38px; padding: 8px 11px; font-size: .71rem; }
.inventory-shell .inventory-low { color: #8b5917; background: #fff7e6; border-color: #efd8a6; }
.inventory-shell .inventory-status-active { color: #2e7351; background: #edf8f1; border-color: #c9e5d4; }
.inventory-shell .inventory-editor { border-top: 3px solid #e72e29; scroll-margin-top: 25px; }
.inventory-shell .inventory-editor .form-grid { gap: 18px; }
.inventory-shell .inventory-editor input[name=code] { font-family: Consolas,"Courier New",monospace; letter-spacing: .025em; }
.inventory-shell .inventory-editor .inventory-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 7px; }
.inventory-shell .inventory-warning { margin: 0; padding: 11px 13px; border-left: 3px solid #c68c31; color: #795f34; background: #fff9ef; font-size: .76rem; }
.inventory-shell .inventory-empty { padding: 32px; text-align: left; }
.inventory-shell .inventory-empty h2 { font-size: 1.2rem; }
.inventory-shell .inventory-setup-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin: 25px 0 0; padding: 0; list-style: none; }
.inventory-shell .inventory-setup-steps li { padding: 18px; border: 1px solid #d9e3f0; border-radius: 8px; background: #fff; }
.inventory-shell .inventory-setup-steps strong { display: block; margin-bottom: 8px; color: var(--admin-navy); font-size: .82rem; }
.inventory-shell .inventory-setup-steps p { margin-bottom: 13px; color: #7c8da4; font-size: .74rem; }
.inventory-shell .inventory-history { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--admin-line); }
.inventory-shell .inventory-history > summary { min-height: 44px; color: #3e5b7d; font-size: .8rem; font-weight: 700; cursor: pointer; }
.inventory-shell .inventory-history ol { margin: 9px 0 0; padding: 0; list-style: none; }
.inventory-shell .inventory-history li { margin-left: 4px; padding: 12px 0 12px 17px; border-left: 2px solid #dfe8f5; border-bottom: 1px solid #edf2f8; }
.inventory-shell .inventory-history strong { display: block; color: #405a7c; font-size: .76rem; }
.inventory-shell .inventory-history time,.inventory-shell .inventory-history small { display: block; color: #8594aa; font-size: .69rem; }
.inventory-shell .inventory-history p { margin: 5px 0 0; color: #6c809a; font-size: .73rem; white-space: pre-line; }
.inventory-shell .inventory-table td { max-width: 290px; }
.inventory-shell .inventory-table .inventory-number { color: var(--admin-navy); font-size: .9rem; font-weight: 750; }
@media(max-width:1200px) { .inventory-shell .inventory-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }.inventory-shell .inventory-filters > .form-field:first-of-type { grid-column: span 2; } }
@media(max-width:700px) {
  .inventory-shell .inventory-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }.inventory-shell .inventory-stat { padding: 17px 15px; }.inventory-shell .inventory-stat strong { font-size: 1.6rem; }
  .inventory-shell .inventory-tabs { gap: 4px; padding: 5px; }.inventory-shell .inventory-tabs a { flex: 1 1 auto; gap: 6px; padding: 9px 10px; font-size: .73rem; }
  .inventory-shell .inventory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 17px; gap: 12px; }.inventory-shell .inventory-filters > .form-field:first-of-type { grid-column: 1 / -1; }
  .inventory-shell .inventory-setup-steps { grid-template-columns: 1fr; gap: 11px; }.inventory-shell .inventory-empty { padding: 23px 20px; }
  .inventory-shell .inventory-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .inventory-shell .inventory-table { display: block; min-width: 0; font-size: .78rem; }.inventory-shell .inventory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .inventory-shell .inventory-table tbody { display: grid; gap: 14px; }.inventory-shell .inventory-table tr { display: block; padding: 7px 14px; border: 1px solid var(--admin-line); border-radius: 9px; background: #fff; }
  .inventory-shell .inventory-table td { display: grid; grid-template-columns: 93px minmax(0,1fr); gap: 10px; max-width: none; padding: 11px 0; border-bottom: 1px solid #edf2f8; }.inventory-shell .inventory-table td:last-child { border-bottom: 0; }
  .inventory-shell .inventory-table td::before { content: attr(data-label); color: #7e8fa6; font-size: .67rem; font-weight: 700; line-height: 1.7; }
  .inventory-shell .inventory-table td > * { min-width: 0; }.inventory-shell .inventory-actions { gap: 6px; }.inventory-shell .inventory-actions .button { min-height: 42px; }
}
@media(max-width:390px) { .inventory-shell .inventory-filters { grid-template-columns: 1fr; }.inventory-shell .inventory-filters > .form-field:first-of-type { grid-column: auto; }.inventory-shell .inventory-table td { grid-template-columns: 78px minmax(0,1fr); gap: 8px; }.inventory-shell .inventory-head-actions { width: 100%; } }
