:root{--bg:#0f172a;--panel:#111827;--muted:#94a3b8;--text:#e5e7eb;--line:#243041;--accent:#22c55e;--danger:#ef4444;--warning:#f59e0b}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#0b1220;color:var(--text)}a{color:#93c5fd;text-decoration:none}a:hover{text-decoration:underline}.layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.sidebar{background:var(--bg);border-right:1px solid var(--line);padding:24px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:14px;align-items:center;margin-bottom:28px}.brand-mark{width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#22c55e,#16a34a);display:flex;align-items:center;justify-content:center;font-weight:800;color:#052e16}.brand-title{font-weight:700}.brand-subtitle{font-size:13px;color:var(--muted)}.nav{display:flex;flex-direction:column;gap:8px}.nav a{padding:12px 14px;border-radius:12px;color:var(--text)}.nav a.active,.nav a:hover{background:#162133;text-decoration:none}.content{padding:28px}.muted{color:var(--muted)}h1{margin:0 0 8px;font-size:32px}h2{margin:0 0 16px;font-size:20px}code{background:#0b1220;border:1px solid var(--line);padding:2px 6px;border-radius:8px}.cards-grid{display:grid;gap:18px;margin:20px 0}.cards-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.cards-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.cards-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.cards-grid.two-40{grid-template-columns:minmax(320px,40%) 1fr}.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:0 10px 25px rgba(0,0,0,.15)}.stat-value{font-size:34px;font-weight:800;margin-top:8px}.compact{padding:16px 20px}.notice{padding:14px 16px;border-radius:12px;margin-bottom:16px;border:1px solid var(--line)}.notice.success{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.35)}.notice.error{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.35)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid.single{grid-template-columns:1fr}.form-grid label{display:flex;flex-direction:column;gap:8px;font-size:14px}.form-grid .full{grid-column:1/-1}.inline-check{align-self:end;display:flex!important;flex-direction:row!important;align-items:center;gap:10px}.preview-link{display:flex;align-items:end}.form-actions{display:flex;gap:10px;flex-wrap:wrap}input,select,textarea,button,.button{width:100%;background:#0b1220;color:var(--text);border:1px solid #334155;border-radius:12px;padding:12px 14px;font:inherit}.button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:120px}.secondary{background:#162133}.danger{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.45);color:#fecaca}.small{padding:8px 10px;font-size:13px;min-width:auto}button{cursor:pointer;background:linear-gradient(135deg,#22c55e,#16a34a);color:#04130a;font-weight:700;border:none}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top}th{color:#cbd5e1;font-weight:700}.actions-cell{display:flex;gap:8px;flex-wrap:wrap}.actions-cell form{margin:0}.summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:8px}.summary-grid div{padding:16px;border:1px solid var(--line);border-radius:14px;background:#0f172a}.summary-grid strong{display:block;font-size:28px;margin-bottom:6px}.low-row{background:rgba(245,158,11,.08)}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#123624;color:#86efac;font-size:12px;font-weight:600}.badge.warning{background:#3b2a07;color:#fcd34d}.badge.secondary{background:#1f2937;color:#cbd5e1}.stat.warn .stat-value{color:#fbbf24}.hint-list{display:grid;gap:8px}.location-builder{display:grid;gap:10px}.builder-toolbar{display:flex;gap:10px;flex-wrap:wrap}.builder-status{padding:10px 12px;border:1px dashed #334155;border-radius:12px;background:#0f172a}.builder-label{font-size:14px}.suggestions{display:flex;flex-wrap:wrap;gap:8px}.chip{width:auto;background:#162133;border:1px solid #334155;color:var(--text);padding:8px 10px;border-radius:999px}.narrow{max-width:860px}.empty{padding:18px;border:1px dashed #334155;border-radius:12px;color:var(--muted)}@media (max-width:1100px){.layout{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.cards-grid.four,.cards-grid.three,.cards-grid.two,.cards-grid.two-40,.form-grid{grid-template-columns:1fr}}

.nav a{display:flex;align-items:center;gap:10px}.nav-icon{width:22px;display:inline-flex;justify-content:center;font-size:16px}.quick-links .link-list{display:flex;flex-direction:column;gap:10px}.suggestion-panel{display:none;gap:8px;margin-top:10px;border:1px solid var(--line);border-radius:14px;background:#0f172a;padding:8px}.suggestion-panel.open{display:grid}.suggestion-item{width:100%;text-align:left;background:#162133;color:var(--text);border:1px solid #334155;border-radius:12px;padding:12px 14px;display:grid;gap:4px;cursor:pointer}.suggestion-item span{font-size:13px;color:var(--muted)}.field-hint{margin-top:8px;font-size:13px}@media (max-width:1100px){.nav a span:last-child{display:none}.nav a{justify-content:center}.nav-icon{font-size:18px}}


.stack-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.stack-actions form { margin: 0; }
.stack-actions .button, .stack-actions button { width: 100%; }
.order-form .field-hint { margin-top: 6px; }


.compact-builder{margin-top:4px}.compact-help-grid{margin-top:10px;grid-template-columns:1fr 1fr}.compact-builder input[type="text"]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em}
.mt-16 { margin-top: 16px; }
.compact-grid { gap: 12px; }
.search-summary-box { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.search-summary-box > div, .location-result-box { background:#f8fafc; border:1px solid #e8edf5; border-radius:16px; padding:14px 16px; }
.location-result-box h3 { margin:0 0 10px; }
.compact-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.compact-list li { display:flex; flex-direction:column; gap:2px; padding:10px 0; border-bottom:1px solid #eef2f7; }
.compact-list li:last-child { border-bottom:none; padding-bottom:0; }
.suggest-wrap { position:relative; }
.suggestions { position:absolute; left:0; right:0; top:100%; z-index:30; display:none; background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow:0 14px 34px rgba(15,23,42,.12); padding:6px; margin-top:8px; }
.suggestions.open { display:block; }
.suggestion-item { width:100%; border:none; background:transparent; text-align:left; padding:10px 12px; border-radius:10px; cursor:pointer; display:flex; flex-direction:column; gap:2px; }
.suggestion-item:hover { background:#f4f7fb; }
.suggestion-item span { font-size:12px; color:#667085; }
@media (max-width: 900px) {
  .search-summary-box { grid-template-columns: 1fr; }
}

.header-actions,.quick-links,.inline-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.quick-link{display:inline-flex;padding:12px 14px;border:1px solid var(--line,#e5e7eb);border-radius:14px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 1px 2px rgba(15,23,42,.04)}.new-product-panel{padding:14px;border:1px dashed rgba(15,23,42,.15);border-radius:16px;background:rgba(255,255,255,.75)}.mt-8{margin-top:8px}.span-2{grid-column:1 / -1}@media (max-width:900px){.span-2{grid-column:auto}}


.magazyn-page-grid{margin-top:16px}
.magazyn-stock-card{padding:18px 18px 16px;display:flex;flex-direction:column;gap:14px}
.magazyn-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.magazyn-toolbar h2{margin:0}
.magazyn-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.magazyn-filter-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.compact-inline-check{margin:0;padding:0;font-size:13px}
.magazyn-list-shell{border:1px solid #e6ebf2;border-radius:18px;background:#fff;overflow:hidden;display:flex;flex-direction:column;min-height:420px;max-height:calc(100vh - 250px)}
.magazyn-list-head,.magazyn-row{display:grid;grid-template-columns:minmax(260px,2.3fr) minmax(120px,.9fr) minmax(120px,.9fr) minmax(220px,1.5fr) minmax(170px,1fr);gap:14px;align-items:start}
.magazyn-list-head{position:sticky;top:0;z-index:5;background:#f8fafc;border-bottom:1px solid #e6ebf2;padding:14px 16px;font-size:13px;font-weight:700;color:#64748b}
.magazyn-list-body{overflow:auto;background:#fff}
.magazyn-row{padding:16px;border-bottom:1px solid #eef2f7}
.magazyn-row:last-child{border-bottom:none}
.magazyn-cell{min-width:0;display:flex;flex-direction:column;gap:6px;line-height:1.35}
.magazyn-article-cell{justify-content:space-between;min-height:92px}
.magazyn-article-top,.magazyn-article-bottom{display:flex;flex-direction:column;gap:4px}
.magazyn-article-name{font-size:15px;line-height:1.25}
.magazyn-article-brand{font-size:13px;color:#64748b}
.magazyn-article-bottom{font-size:13px;color:#475569;word-break:break-word}
.magazyn-stock-main{line-height:1.2}
.magazyn-stock-sub,.magazyn-location-label{font-size:13px;color:#64748b}
.mt-8-inline{margin-top:2px;align-self:flex-start}
.magazyn-actions-cell{display:flex;flex-direction:column;gap:8px;align-items:stretch}
.magazyn-actions-cell form{margin:0}
.magazyn-actions-cell .button,.magazyn-actions-cell button{width:100%}
.magazyn-empty{padding:20px 16px;color:#64748b}
@media (max-width: 1100px){.magazyn-list-shell{max-height:none}.magazyn-list-head,.magazyn-row{grid-template-columns:1.8fr .9fr .9fr 1.2fr .9fr}}
@media (max-width: 860px){.magazyn-toolbar,.magazyn-toolbar-actions{align-items:stretch}.magazyn-toolbar-actions{width:100%;justify-content:flex-start}.magazyn-filter-form{width:100%}.magazyn-list-shell{border:none;background:transparent;max-height:none;overflow:visible}.magazyn-list-head{display:none}.magazyn-list-body{overflow:visible;background:transparent;display:grid;gap:12px}.magazyn-row{grid-template-columns:1fr;border:1px solid #e6ebf2;border-radius:16px;background:#fff;padding:14px}.magazyn-cell{gap:4px}.magazyn-article-cell{min-height:0}.magazyn-actions-cell{flex-direction:row;flex-wrap:wrap}.magazyn-actions-cell .button,.magazyn-actions-cell button{width:auto}}

/* ServiceAnt Magazyn — jasny motyw / poprawki czytelności
   Wklej na koniec app/public/styles.css
*/

/* Tło całej aplikacji */
html, body {
  background: #f5f6f8 !important;
  color: #1f2937 !important;
}

/* Główne powierzchnie */
.app-shell,
.page-shell,
.layout,
.main,
.main-content,
.content,
.content-wrap,
.panel,
.card,
.section,
.topbar,
.sidebar,
.table-wrap,
.magazyn-table-wrap,
.magazyn-table-head,
.magazyn-table-body {
  background: #ffffff !important;
  color: #1f2937 !important;
}

/* Ciemniejsze "szare" napisy */
.muted,
.text-muted,
.small,
.meta,
.subtle,
.secondary,
.description,
.brand,
label,
th,
td {
  color: #374151 !important;
}

/* Nagłówki */
h1, h2, h3, h4, h5, h6,
.page-title,
.section-title {
  color: #111827 !important;
}

/* Przyciski */
button,
.btn,
a.btn {
  color: #1f2937;
}

/* Usuń = czerwony z białym napisem */
.btn-danger,
button.btn-danger,
a.btn-danger,
button.delete,
a.delete,
form .btn-delete {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover,
button.delete:hover,
a.delete:hover,
form .btn-delete:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Delikatnie jaśniejsze obramowania */
.card,
.section,
.panel,
input,
select,
textarea,
.magazyn-row,
.mag-row,
.product-row {
  border-color: #e5e7eb !important;
}

/* Magazyn — co drugi wiersz delikatnie szary */
.magazyn-table-body .magazyn-row:nth-child(even),
.magazyn-table-body .mag-row:nth-child(even),
.magazyn-table-body .product-row:nth-child(even),
.products-list .product-item:nth-child(even),
.inventory-list .product-item:nth-child(even),
.inventory-list .inventory-item:nth-child(even) {
  background: #f8fafc !important;
}

/* Delikatny hover */
.magazyn-table-body .magazyn-row:hover,
.magazyn-table-body .mag-row:hover,
.magazyn-table-body .product-row:hover,
.products-list .product-item:hover,
.inventory-list .product-item:hover,
.inventory-list .inventory-item:hover {
  background: #f1f5f9 !important;
}

/* Sticky header tabeli magazynu */
.magazyn-table-head {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Sidebar i topbar w jasnym stylu */
.sidebar,
.topbar {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

/* Linki w menu */
.sidebar a,
.nav a,
.menu a {
  color: #1f2937 !important;
}

.sidebar a.active,
.nav a.active,
.menu a.active {
  background: #eef2ff !important;
  color: #111827 !important;
}

/* Inputy */
input,
select,
textarea {
  background: #ffffff !important;
  color: #111827 !important;
}

input::placeholder,
textarea::placeholder {
  color: #6b7280 !important;
}

/* ServiceAnt — poprawka przycisków v2
   Wklej NA SAM KONIEC app/public/styles.css
*/

/* Wspólna baza przycisków */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
  border-radius: 10px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

/* Edytuj — jasny, czytelny */
.btn-edit,
a.btn-edit,
button.btn-edit,
.btn-secondary,
a.btn-secondary,
button.btn-secondary,
a[href*="/edit"].btn,
a[href*="/edit"],
button[data-action="edit"] {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

.btn-edit:hover,
a.btn-edit:hover,
button.btn-edit:hover,
.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover,
a[href*="/edit"].btn:hover,
a[href*="/edit"]:hover,
button[data-action="edit"]:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

/* Usuń — czerwony z białym napisem */
.btn-danger,
a.btn-danger,
button.btn-danger,
.delete,
a.delete,
button.delete,
.btn-delete,
a.btn-delete,
button.btn-delete,
form[action*="delete"] button,
form[action*="delete"] .btn,
a[href*="delete"],
button[data-action="delete"] {
  background: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
}

.btn-danger:hover,
a.btn-danger:hover,
button.btn-danger:hover,
.delete:hover,
a.delete:hover,
button.delete:hover,
.btn-delete:hover,
a.btn-delete:hover,
button.btn-delete:hover,
form[action*="delete"] button:hover,
form[action*="delete"] .btn:hover,
a[href*="delete"]:hover,
button[data-action="delete"]:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Wymuszenie koloru tekstu wewnątrz przycisków */
.btn-danger *,
a.btn-danger *,
button.btn-danger *,
.delete *,
a.delete *,
button.delete *,
.btn-delete *,
a.btn-delete *,
button.btn-delete *,
form[action*="delete"] button *,
form[action*="delete"] .btn * {
  color: #ffffff !important;
}

.btn-edit *,
a.btn-edit *,
button.btn-edit *,
.btn-secondary *,
a.btn-secondary *,
button.btn-secondary *,
a[href*="/edit"].btn *,
a[href*="/edit"] * {
  color: #111827 !important;
}

/* Jeśli przyciski są w tabeli/listach */
.actions .btn,
.row-actions .btn,
.product-actions .btn,
.magazyn-actions .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
}
/* Delikatny cień dla przycisków */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.04) !important;
  transition: box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease !important;
}

/* Lekki efekt przy hover */
button:hover,
.btn:hover,
a.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 8px 18px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-1px);
}

/* Delikatne wciśnięcie */
button:active,
.btn:active,
a.btn:active,
input[type="submit"]:active,
input[type="button"]:active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(0);
}
/* Górne akcje w Magazynie — jak Edytuj */
.magazyn-toolbar,
.inventory-toolbar,
.section-toolbar,
.header-actions,
.products-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

/* Linki/przyciski u góry */
.magazyn-toolbar .btn,
.inventory-toolbar .btn,
.section-toolbar .btn,
.header-actions .btn,
.products-toolbar .btn,
.magazyn-toolbar a,
.inventory-toolbar a,
.section-toolbar a,
.header-actions a,
.products-toolbar a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

.magazyn-toolbar .btn:hover,
.inventory-toolbar .btn:hover,
.section-toolbar .btn:hover,
.header-actions .btn:hover,
.products-toolbar .btn:hover,
.magazyn-toolbar a:hover,
.inventory-toolbar a:hover,
.section-toolbar a:hover,
.header-actions a:hover,
.products-toolbar a:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.08), 0 8px 18px rgba(0,0,0,.06) !important;
  transform: translateY(-1px);
}

/* Formularz filtra w tej samej linii */
.magazyn-toolbar form,
.inventory-toolbar form,
.section-toolbar form,
.header-actions form,
.products-toolbar form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}

/* Sam przycisk filtruj też jak Edytuj */
.magazyn-toolbar form button,
.inventory-toolbar form button,
.section-toolbar form button,
.header-actions form button,
.products-toolbar form button {
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

.magazyn-toolbar form button:hover,
.inventory-toolbar form button:hover,
.section-toolbar form button:hover,
.header-actions form button:hover,
.products-toolbar form button:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}
/* Twarde wyrównanie górnych akcji w Magazynie */
.magazyn-toolbar,
.inventory-toolbar,
.section-toolbar,
.header-actions,
.products-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.magazyn-toolbar > *,
.inventory-toolbar > *,
.section-toolbar > *,
.header-actions > *,
.products-toolbar > * {
  margin: 0 !important;
  align-self: center !important;
}

/* Linki i przyciski */
.magazyn-toolbar a,
.magazyn-toolbar .btn,
.magazyn-toolbar button,
.inventory-toolbar a,
.inventory-toolbar .btn,
.inventory-toolbar button,
.section-toolbar a,
.section-toolbar .btn,
.section-toolbar button,
.header-actions a,
.header-actions .btn,
.header-actions button,
.products-toolbar a,
.products-toolbar .btn,
.products-toolbar button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-height: 38px !important;
  line-height: 1 !important;
  padding: 0 12px !important;
  margin: 0 !important;
  vertical-align: middle !important;
}

/* Formularz filtra */
.magazyn-toolbar form,
.inventory-toolbar form,
.section-toolbar form,
.header-actions form,
.products-toolbar form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.magazyn-toolbar form button,
.inventory-toolbar form button,
.section-toolbar form button,
.header-actions form button,
.products-toolbar form button {
  height: 38px !important;
  min-height: 38px !important;
  line-height: 1 !important;
  margin: 0 !important;
}
/* Pulpit — wyszukiwarka lokalizacji / artykułu */

/* Kontener akcji i pól na pulpicie */
.dashboard-search,
.dashboard-search-box,
.dashboard-tools,
.dashboard-panel,
.search-panel,
.lookup-panel {
  color: #111827 !important;
}

/* Same pola i podglądy */
.dashboard-search input,
.dashboard-search select,
.dashboard-search textarea,
.dashboard-search-box input,
.dashboard-search-box select,
.dashboard-search-box textarea,
.dashboard-tools input,
.dashboard-tools select,
.dashboard-tools textarea,
.search-panel input,
.search-panel select,
.search-panel textarea,
.lookup-panel input,
.lookup-panel select,
.lookup-panel textarea {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 10px rgba(0,0,0,.04) !important;
}

.dashboard-search input::placeholder,
.dashboard-search-box input::placeholder,
.dashboard-tools input::placeholder,
.search-panel input::placeholder,
.lookup-panel input::placeholder {
  color: #6b7280 !important;
}

/* Okienka typu: Wpisany kod / Interpretacja */
.code-preview,
.code-output,
.lookup-output,
.lookup-preview,
.result-chip,
.result-box,
.info-chip,
.info-box,
.dashboard-stat,
.inline-preview {
  background: #f9fafb !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 10px rgba(0,0,0,.04) !important;
}

/* Etykiety w tych okienkach */
.code-preview .label,
.code-output .label,
.lookup-output .label,
.lookup-preview .label,
.result-box .label,
.info-box .label,
.dashboard-stat .label,
.inline-preview .label,
.code-preview small,
.code-output small,
.lookup-output small,
.lookup-preview small {
  color: #374151 !important;
}

/* Przycisk Wyczyść — taki sam styl jak Edytuj */
button.clear-btn,
a.clear-btn,
.btn-clear,
button[data-action="clear"],
a[data-action="clear"],
form[action*="clear"] button,
.lookup-panel .btn,
.search-panel .btn {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

button.clear-btn:hover,
a.clear-btn:hover,
.btn-clear:hover,
button[data-action="clear"]:hover,
a[data-action="clear"]:hover,
form[action*="clear"] button:hover,
.lookup-panel .btn:hover,
.search-panel .btn:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.08), 0 8px 18px rgba(0,0,0,.06) !important;
}
/* Pulpit — jasny styl dla pól pod wyszukiwarką */
.dashboard-card .lookup-preview,
.dashboard-card .lookup-box,
.dashboard-card .code-box,
.dashboard-card .preview-box,
.dashboard-card .result-box,
.dashboard-card .status-box,
.dashboard-card .mini-box,
.dashboard-card .builder-preview,
.dashboard-card .builder-box,
.dashboard-card .location-preview,
.dashboard-card .location-box {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 10px rgba(0,0,0,.04) !important;
}

/* Teksty w środku tych pól */
.dashboard-card .lookup-preview *,
.dashboard-card .lookup-box *,
.dashboard-card .code-box *,
.dashboard-card .preview-box *,
.dashboard-card .result-box *,
.dashboard-card .status-box *,
.dashboard-card .mini-box *,
.dashboard-card .builder-preview *,
.dashboard-card .builder-box *,
.dashboard-card .location-preview *,
.dashboard-card .location-box * {
  color: #111827 !important;
}

/* Podpisy typu: Wpisany kod / Interpretacja */
.dashboard-card .lookup-preview small,
.dashboard-card .lookup-box small,
.dashboard-card .code-box small,
.dashboard-card .preview-box small,
.dashboard-card .result-box small,
.dashboard-card .status-box small,
.dashboard-card .mini-box small,
.dashboard-card .builder-preview small,
.dashboard-card .builder-box small,
.dashboard-card .location-preview small,
.dashboard-card .location-box small,
.dashboard-card .lookup-preview .label,
.dashboard-card .lookup-box .label,
.dashboard-card .code-box .label,
.dashboard-card .preview-box .label,
.dashboard-card .result-box .label,
.dashboard-card .status-box .label,
.dashboard-card .mini-box .label,
.dashboard-card .builder-preview .label,
.dashboard-card .builder-box .label,
.dashboard-card .location-preview .label,
.dashboard-card .location-box .label {
  color: #4b5563 !important;
}

/* Przycisk Wyczyść — jasny jak Edytuj */
.dashboard-card .btn-clear,
.dashboard-card button.btn-clear,
.dashboard-card .clear-btn,
.dashboard-card button.clear-btn,
.dashboard-card button[type="reset"],
.dashboard-card button[name="clear"] {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

.dashboard-card .btn-clear:hover,
.dashboard-card button.btn-clear:hover,
.dashboard-card .clear-btn:hover,
.dashboard-card button.clear-btn:hover,
.dashboard-card button[type="reset"]:hover,
.dashboard-card button[name="clear"]:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

/* Jeśli przycisk Wyczyść jest zwykłym buttonem w formularzu */
.dashboard-card .search-actions button:not(.btn-danger):not(.btn-delete),
.dashboard-card .lookup-actions button:not(.btn-danger):not(.btn-delete) {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}
/* Pulpit — wymuszenie jasnych boksów i przycisku Wyczyść */
.dashboard-card div,
.dashboard-card span,
.dashboard-card button {
  color: #111827;
}

/* Czarne boksy: Wpisany kod / Interpretacja */
.dashboard-card div[style*="background"],
.dashboard-card .preview,
.dashboard-card .preview-grid > div,
.dashboard-card .code-preview,
.dashboard-card .interpretation,
.dashboard-card .lookup-preview,
.dashboard-card .info-box {
  background: #f9fafb !important;
  background-color: #f9fafb !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 10px rgba(0,0,0,.04) !important;
}

.dashboard-card div[style*="background"] *,
.dashboard-card .preview *,
.dashboard-card .preview-grid > div *,
.dashboard-card .code-preview *,
.dashboard-card .interpretation *,
.dashboard-card .lookup-preview *,
.dashboard-card .info-box * {
  color: #111827 !important;
}

/* Podpisy w tych boksach */
.dashboard-card small,
.dashboard-card .muted,
.dashboard-card .label {
  color: #4b5563 !important;
}

/* Wyczyść */
.dashboard-card button,
.dashboard-card .btn-clear,
.dashboard-card .clear-btn {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

/* Ale Szukaj zostaw zielony */
.dashboard-card button[type="submit"],
.dashboard-card .btn-search {
  background: #22c55e !important;
  background-color: #22c55e !important;
  color: #111827 !important;
  border-color: #16a34a !important;
}

/* Usuń bez zmian */
.dashboard-card .btn-danger,
.dashboard-card .btn-delete,
.dashboard-card .delete {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
}
/* Pulpit — jasne boksy "Wpisany kod" i "Interpretacja" */
.card .summary-grid div {
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 12px rgba(15,23,42,.04) !important;
}

.card .summary-grid div strong {
  color: #111827 !important;
}

.card .summary-grid div .muted,
.card .summary-grid div span {
  color: #4b5563 !important;
}

/* Pulpit — przycisk Wyczyść */
a.button.secondary,
.button.secondary {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

a.button.secondary:hover,
.button.secondary:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

/* Żeby zielony Szukaj został zielony */
.form-actions button[type="submit"] {
  background: linear-gradient(135deg,#22c55e,#16a34a) !important;
  color: #04130a !important;
}
/* =========================
   ZAMÓWIENIA / HISTORIA
   ========================= */

/* Jasne boxy podsumowania na stronie zamówień */
.orders-page .summary-grid div,
.orders-page .stats-grid div,
.orders-page .status-box,
.orders-page .status-card,
.orders-page .summary-card,
.card .orders-summary-grid div {
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 12px rgba(15,23,42,.04) !important;
}

.orders-page .summary-grid div *,
.orders-page .stats-grid div *,
.orders-page .status-box *,
.orders-page .status-card *,
.orders-page .summary-card *,
.card .orders-summary-grid div * {
  color: #111827 !important;
}

/* =========================
   HISTORIA ZAMÓWIEŃ — stały nagłówek + scroll tylko listy
   ========================= */

.orders-history-wrap,
.orders-table-wrap,
.orders-list-wrap {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  max-height: calc(100vh - 270px) !important;
  overflow: hidden !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

/* Stały nagłówek */
.orders-history-head,
.orders-table-head,
.orders-list-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Scroll tylko dla pozycji */
.orders-history-body,
.orders-table-body,
.orders-list-body {
  overflow-y: auto !important;
  min-height: 0 !important;
  background: #ffffff !important;
}

/* Układ kolumn — podobny do magazynu */
.orders-history-head,
.orders-history-row,
.orders-table-head,
.orders-table-row,
.orders-list-head,
.orders-list-row {
  display: grid !important;
  grid-template-columns: 2.1fr 1.2fr 0.8fr 1fr 1.1fr 1fr !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 14px !important;
}

/* Nagłówki */
.orders-history-head,
.orders-table-head,
.orders-list-head {
  font-weight: 700 !important;
  color: #111827 !important;
}

/* Wiersze */
.orders-history-row,
.orders-table-row,
.orders-list-row {
  border-bottom: 1px solid #eef2f7 !important;
  color: #1f2937 !important;
}

/* Co drugi wiersz delikatnie szary */
.orders-history-body .orders-history-row:nth-child(even),
.orders-table-body .orders-table-row:nth-child(even),
.orders-list-body .orders-list-row:nth-child(even) {
  background: #f8fafc !important;
}

/* Hover */
.orders-history-body .orders-history-row:hover,
.orders-table-body .orders-table-row:hover,
.orders-list-body .orders-list-row:hover {
  background: #f1f5f9 !important;
}

/* Opisy i mniejsze teksty */
.orders-history-row .muted,
.orders-table-row .muted,
.orders-list-row .muted,
.orders-history-row small,
.orders-table-row small,
.orders-list-row small {
  color: #4b5563 !important;
}

/* Przycisk statusu / badge */
.status-badge,
.order-status,
.badge-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
}

/* Dostarczone — jasne zielone, nie czarne */
.status-dostarczone,
.status-delivered,
.badge-delivered,
.order-status-delivered {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
}

/* W drodze */
.status-w-drodze,
.status-in-transit,
.badge-transit {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd !important;
}

/* Nowe */
.status-nowe,
.status-new,
.badge-new {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
}

/* Mobilnie — przejście w karty */
@media (max-width: 900px) {
  .orders-history-wrap,
  .orders-table-wrap,
  .orders-list-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  .orders-history-head,
  .orders-table-head,
  .orders-list-head {
    display: none !important;
  }

  .orders-history-body,
  .orders-table-body,
  .orders-list-body {
    overflow: visible !important;
  }

  .orders-history-row,
  .orders-table-row,
  .orders-list-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    padding: 14px !important;
  }
}
/* Zamówienia — badge statusów */
.status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: 1px solid #d1d5db !important;
  background: #f3f4f6 !important;
  color: #111827 !important;
  box-shadow: none !important;
}

.status-DOSTARCZONE {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}

.status-W_DRODZE {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

.status-NOWE {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fcd34d !important;
}

.status-ZAMÓWIONE {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border-color: #c4b5fd !important;
}

.status-ANULOWANE {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}
/* Zamówienia — jasny przycisk "Przyjmij na stan" */
a[href*="/orders?receive="],
.button.receive-btn,
a.button.receive-btn {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
  text-decoration: none !important;
}

a[href*="/orders?receive="]:hover,
.button.receive-btn:hover,
a.button.receive-btn:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}
/* Historia zamówień — ujednolicone akcje */
.orders-history-row .actions-cell,
.orders-table-row .actions-cell,
.orders-list-row .actions-cell,
.stack-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

/* Wszystkie przyciski akcji w zamówieniach */
.orders-history-row .actions-cell a,
.orders-history-row .actions-cell button,
.orders-table-row .actions-cell a,
.orders-table-row .actions-cell button,
.orders-list-row .actions-cell a,
.orders-list-row .actions-cell button,
.stack-actions a,
.stack-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.04) !important;
}

/* Przyjmij na stan i Edytuj — jasne */
.orders-history-row .actions-cell a,
.orders-table-row .actions-cell a,
.orders-list-row .actions-cell a,
.stack-actions a,
.orders-history-row .actions-cell .button.small,
.orders-table-row .actions-cell .button.small,
.orders-list-row .actions-cell .button.small,
.stack-actions .button.small {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

.orders-history-row .actions-cell a:hover,
.orders-table-row .actions-cell a:hover,
.orders-list-row .actions-cell a:hover,
.stack-actions a:hover,
.orders-history-row .actions-cell .button.small:hover,
.orders-table-row .actions-cell .button.small:hover,
.orders-list-row .actions-cell .button.small:hover,
.stack-actions .button.small:hover {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

/* Usuń — czerwony */
.orders-history-row .actions-cell button,
.orders-table-row .actions-cell button,
.orders-list-row .actions-cell button,
.stack-actions button,
.orders-history-row .actions-cell .danger,
.orders-table-row .actions-cell .danger,
.orders-list-row .actions-cell .danger,
.stack-actions .danger {
  background: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
}

.orders-history-row .actions-cell button:hover,
.orders-table-row .actions-cell button:hover,
.orders-list-row .actions-cell button:hover,
.stack-actions button:hover,
.orders-history-row .actions-cell .danger:hover,
.orders-table-row .actions-cell .danger:hover,
.orders-list-row .actions-cell .danger:hover,
.stack-actions .danger:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Formularz usuń bez rozwalania wysokości */
.orders-history-row .actions-cell form,
.orders-table-row .actions-cell form,
.orders-list-row .actions-cell form,
.stack-actions form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}
/* =========================
   RUCHY MAGAZYNOWE — stały nagłówek + scroll tylko listy
   ========================= */

.movements-history-wrap,
.movements-table-wrap,
.movements-list-wrap,
.movements-scroll-wrap {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  max-height: calc(100vh - 270px) !important;
  overflow: hidden !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

/* Stały nagłówek */
.movements-history-head,
.movements-table-head,
.movements-list-head,
.movements-scroll-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Scroll tylko dla pozycji */
.movements-history-body,
.movements-table-body,
.movements-list-body,
.movements-scroll-body {
  overflow-y: auto !important;
  min-height: 0 !important;
  background: #ffffff !important;
}

/* Układ kolumn */
.movements-history-head,
.movements-history-row,
.movements-table-head,
.movements-table-row,
.movements-list-head,
.movements-list-row,
.movements-scroll-head,
.movements-scroll-row {
  display: grid !important;
  grid-template-columns: 1.2fr 2fr 1fr 1.4fr 1.4fr 1fr !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 14px !important;
}

.movements-history-head,
.movements-table-head,
.movements-list-head,
.movements-scroll-head {
  font-weight: 700 !important;
  color: #111827 !important;
}

.movements-history-row,
.movements-table-row,
.movements-list-row,
.movements-scroll-row {
  border-bottom: 1px solid #eef2f7 !important;
  color: #1f2937 !important;
}

/* Co drugi wiersz delikatnie szary */
.movements-history-body .movements-history-row:nth-child(even),
.movements-table-body .movements-table-row:nth-child(even),
.movements-list-body .movements-list-row:nth-child(even),
.movements-scroll-body .movements-scroll-row:nth-child(even) {
  background: #f8fafc !important;
}

/* Hover */
.movements-history-body .movements-history-row:hover,
.movements-table-body .movements-table-row:hover,
.movements-list-body .movements-list-row:hover,
.movements-scroll-body .movements-scroll-row:hover {
  background: #f1f5f9 !important;
}

.movements-history-row .muted,
.movements-table-row .muted,
.movements-list-row .muted,
.movements-scroll-row .muted,
.movements-history-row small,
.movements-table-row small,
.movements-list-row small,
.movements-scroll-row small {
  color: #4b5563 !important;
}

/* Mobilnie */
@media (max-width: 900px) {
  .movements-history-wrap,
  .movements-table-wrap,
  .movements-list-wrap,
  .movements-scroll-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  .movements-history-head,
  .movements-table-head,
  .movements-list-head,
  .movements-scroll-head {
    display: none !important;
  }

  .movements-history-body,
  .movements-table-body,
  .movements-list-body,
  .movements-scroll-body {
    overflow: visible !important;
  }

  .movements-history-row,
  .movements-table-row,
  .movements-list-row,
  .movements-scroll-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    padding: 14px !important;
  }
}
:root {
  --ios-bg-soft: #f4f1e8;
  --ios-card: rgba(255, 255, 255, 0.72);
  --ios-line: rgba(98, 118, 94, 0.14);
  --ios-text: #2d392f;
  --ios-muted: #6b786d;
  --ios-accent: #62765e;
  --ios-accent-soft: rgba(98, 118, 94, 0.12);
}

.mobile-main-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ios-menu-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 16px 12px;
  border-radius: 24px;
  text-decoration: none;
  color: var(--ios-text);
  background: var(--ios-card);
  border: 1px solid var(--ios-line);
  box-shadow:
    0 10px 28px rgba(46, 58, 44, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ios-menu-tile:active {
  transform: scale(0.98);
}

.ios-menu-tile:hover {
  border-color: rgba(98, 118, 94, 0.22);
  box-shadow:
    0 14px 32px rgba(46, 58, 44, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.ios-menu-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(234,239,231,0.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 8px 18px rgba(98, 118, 94, 0.14);
}

.ios-menu-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--ios-accent);
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios-menu-label {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  color: var(--ios-text);
}

@media (max-width: 768px) {
  .mobile-main-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ios-menu-tile {
    min-height: 102px;
    padding: 14px 10px;
    border-radius: 22px;
  }

  .ios-menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    margin-bottom: 8px;
  }

  .ios-menu-icon svg {
    width: 24px;
    height: 24px;
  }

  .ios-menu-label {
    display: block;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .mobile-main-menu {
    gap: 8px;
  }

  .ios-menu-tile {
    min-height: 96px;
    padding: 12px 8px;
  }

  .ios-menu-label {
    font-size: 11.5px;
  }
}
:root {
  --ios-bg-soft: #f4f1e8;
  --ios-card: rgba(255, 255, 255, 0.78);
  --ios-line: rgba(98, 118, 94, 0.14);
  --ios-text: #2d392f;
  --ios-muted: #6b786d;
  --ios-accent: #62765e;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  body {
    background: var(--ios-bg-soft);
  }

  .layout,
  .app-layout,
  .page-layout {
    display: block !important;
  }

  .sidebar,
  .side-menu,
  .nav-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    margin: 0 0 12px 0;
    background: rgba(244, 241, 232, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ios-line);
    box-sizing: border-box;
  }

  .sidebar a,
  .side-menu a,
  .nav-sidebar a,
  .menu-card,
  .main-menu a {
    min-height: 96px;
    padding: 12px 10px !important;
    border-radius: 22px;
    background: var(--ios-card);
    border: 1px solid var(--ios-line);
    box-shadow:
      0 10px 28px rgba(46, 58, 44, 0.08),
      inset 0 1px 0 rgba(255,255,255,0.45);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--ios-text) !important;
    box-sizing: border-box;
  }

  .sidebar a span,
  .side-menu a span,
  .nav-sidebar a span,
  .menu-card span,
  .main-menu a span,
  .menu-label,
  .nav-label {
    display: block !important;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    white-space: normal;
  }

  .sidebar svg,
  .side-menu svg,
  .nav-sidebar svg,
  .menu-card svg,
  .main-menu svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.9;
  }

  main,
  .content,
  .page-content,
  .main-content,
  .container {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box;
  }

  .dashboard-grid,
  .cards-grid,
  .tiles-grid,
  .main-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card,
  .tile,
  .panel,
  .box {
    border-radius: 22px;
    overflow: hidden;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 640px;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .sidebar,
  .side-menu,
  .nav-sidebar,
  .dashboard-grid,
  .cards-grid,
  .tiles-grid,
  .main-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sidebar a,
  .side-menu a,
  .nav-sidebar a,
  .menu-card,
  .main-menu a {
    min-height: 88px;
    padding: 10px 8px !important;
    border-radius: 20px;
  }

  .sidebar a span,
  .side-menu a span,
  .nav-sidebar a span,
  .menu-card span,
  .main-menu a span,
  .menu-label,
  .nav-label {
    font-size: 11px;
  }
}
.mobile-dashboard-menu {
  display: none;
}

@media (max-width: 768px) {
  h1 + .muted {
    display: none;
  }

  .mobile-dashboard-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
  }

  .mobile-dashboard-tile {
    min-height: 108px;
    padding: 14px 10px;
    border-radius: 24px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(98,118,94,0.14);
    box-shadow: 0 10px 24px rgba(46,58,44,0.08);
    color: #2d392f;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-dashboard-tile:active {
    transform: scale(0.98);
  }

  .mobile-dashboard-tile.is-active {
    border-color: rgba(98,118,94,0.25);
    background: rgba(244,241,232,0.95);
  }

  .mobile-dashboard-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(236,240,233,0.95));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 16px rgba(98,118,94,0.12);
  }

  .mobile-dashboard-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #62765e;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-dashboard-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
  }

  .desktop-dashboard-content {
    display: none !important;
  }
}