/* Panel Ciuchatek 2.46 — lekki, czytelny interfejs roboczy */
:root {
  --panel-sidebar: #172033;
  --panel-sidebar-deep: #0b1930;
  --panel-sidebar-soft: #212d43;
  --panel-primary: #0758d3;
  --panel-primary-hover: #043a93;
  --panel-primary-soft: #eaf2ff;
  --panel-primary-line: #b9d2f8;
  --panel-accent: #38c8f2;
  --panel-accent-soft: #e4f8fe;
  --panel-page: #f4f6f9;
  --panel-surface: #fff;
  --panel-surface-soft: #f8fbff;
  --panel-line: #dfe5ee;
  --panel-line-strong: #cfd8e8;
  --panel-text: #172033;
  --panel-muted: #667085;
  --panel-danger: #b42318;
  --panel-warning: #95661d;
  --panel-success: #168a52;
  --panel-radius: 12px;
  --panel-shadow: 0 4px 18px rgba(25, 42, 75, .055);
}

html, body, #root { min-height: 100%; }
html { background: var(--panel-page); }
body { overflow-x: hidden; color: var(--panel-text); background: var(--panel-page); }
*, *::before, *::after { box-sizing: border-box; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

button {
  border: 1px solid transparent;
  background: var(--panel-primary);
  color: #fff;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
button:hover:not(:disabled) { background: var(--panel-primary-hover); filter: none; }
button:active:not(:disabled) { transform: translateY(1px); }
button.secondary, .button-link.secondary {
  border-color: var(--panel-line-strong) !important;
  background: #fff !important;
  color: #344054 !important;
}
button.secondary:hover:not(:disabled), .button-link.secondary:hover { border-color: #9dbce7 !important; background: #f7faff !important; }
button.danger { background: var(--panel-danger) !important; color: #fff !important; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border-radius: 9px; text-decoration: none; font-weight: 750; }

input, select, textarea {
  border-color: var(--panel-line-strong) !important;
  background: #fff;
  color: var(--panel-text);
  box-shadow: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--panel-primary) !important;
  box-shadow: 0 0 0 3px rgba(7, 88, 211, .13) !important;
}
input[type="checkbox"] { accent-color: var(--panel-primary); }

.app-shell {
  display: block;
  min-height: 100vh;
  background: var(--panel-page);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 242px;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 11px 12px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel-sidebar) 0%, var(--panel-sidebar-deep) 100%);
  border-right: 1px solid rgba(255,255,255,.06);
}

.brand-block {
  flex: 0 0 auto;
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 5px 11px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-block img { width: 44px; height: 44px; object-fit: contain; filter: saturate(.75) brightness(1.15); }
.brand-block > div { min-width: 0; display: grid; gap: 1px; }
.brand-block strong { color: #fff; font-size: .95rem; white-space: nowrap; }
.brand-block span { color: #9daac0; font-size: .69rem; font-weight: 650; }

.sidebar-nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.sidebar-nav-scroll:hover { scrollbar-color: rgba(255,255,255,.22) transparent; }
.sidebar-nav-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: transparent; }
.sidebar-nav-scroll:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); }

.sidebar-group { display: grid; gap: 3px; }
.sidebar-group-toggle {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8491a8;
  text-align: left;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.sidebar-group-toggle:hover:not(:disabled), .sidebar-group-toggle.active { background: rgba(255,255,255,.055); color: #edf5ff; }
.sidebar-chevron { font-size: 1rem; line-height: 1; transition: transform .18s ease; }
.sidebar-group.expanded .sidebar-chevron { transform: rotate(180deg); }
.sidebar-group-items { display: grid; gap: 3px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .18s ease, opacity .14s ease; }
.sidebar-group.expanded .sidebar-group-items { max-height: 320px; opacity: 1; }
.sidebar-group-empty {
  padding: 8px 12px 9px 45px;
  color: #7f8ca3;
  font-size: .72rem;
  line-height: 1.35;
}

.sidebar-nav-item {
  width: 100%;
  min-height: 39px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent !important;
  color: #d8e2f2 !important;
  font-size: .83rem;
  font-weight: 720;
  box-shadow: none !important;
}
.sidebar-nav-item:hover:not(:disabled) { background: rgba(255,255,255,.07) !important; color: #fff !important; }
.sidebar-nav-item.active {
  border-color: rgba(255,255,255,.85) !important;
  background: #f8fbff !important;
  color: var(--panel-sidebar-deep) !important;
  box-shadow: inset 3px 0 0 var(--panel-accent) !important;
}
.sidebar-nav-item.utility { background: rgba(255,255,255,.055) !important; border-color: rgba(255,255,255,.075) !important; }
.sidebar-nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,.075);
  color: #c7d4e8;
}
.sidebar-nav-item.active .sidebar-nav-icon { color: var(--panel-primary-hover); background: var(--panel-primary-soft); }
.panel-icon { width: 16px; height: 16px; display: block; }
.sidebar-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.1);
  background: transparent;
}
.profile-button {
  width: 100%;
  min-height: 47px;
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: transparent !important;
  color: #fff;
  text-align: left;
}
.profile-button:hover:not(:disabled) { background: rgba(255,255,255,.06) !important; }
.profile-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-accent); color: #fff; font-weight: 850; }
.profile-copy { min-width: 0; display: grid; gap: 1px; }
.profile-name, .profile-login { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name { color: #fff; font-size: .8rem; font-weight: 800; }
.profile-login { color: #9daac0; font-size: .64rem; }
.logout-button { min-height: 34px; border-color: rgba(255,255,255,.11) !important; background: rgba(255,255,255,.07) !important; color: #fff !important; }
.logout-button:hover:not(:disabled) { background: rgba(255,255,255,.13) !important; }

.panel-workspace { min-width: 0; min-height: 100vh; margin-left: 242px; display: flex; flex-direction: column; }
.panel-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--panel-line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.panel-topbar > div:first-of-type { display: grid; gap: 0; }
.panel-topbar > div:first-of-type span { color: #7c8798; font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.panel-topbar > div:first-of-type strong { color: var(--panel-text); font-size: .97rem; }
.panel-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.panel-topbar-actions a { color: var(--panel-primary-hover); text-decoration: none; font-size: .77rem; font-weight: 800; padding: 8px 9px; }
.panel-topbar-actions button { min-height: 34px; padding: 7px 10px; }
.mobile-menu-button { display: none; width: 38px; height: 38px; padding: 0; background: var(--panel-primary-soft); color: var(--panel-text); }
.sidebar-overlay { display: none; }

.content {
  width: 100%;
  min-width: 0;
  max-width: 1740px;
  margin: 0 auto;
  padding: 18px 20px 34px;
}
.content > *, .module-page, .dashboard-page, .clients-page { width: 100%; min-width: 0; }
.module-page { display: grid; gap: 13px; align-content: start; }
.page-header, .section-header-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-header > div, .section-header-row > div { min-width: 0; }
.page-header h1, .page-header h2, .page-header h3, .section-header-row h2 { margin: 0; color: var(--panel-text); overflow-wrap: anywhere; }
.page-header p, .section-header-row p { margin: 4px 0 0; }
.muted { color: var(--panel-muted) !important; }

.card, .summary-card, .table-card, .modal, .subcard {
  min-width: 0;
  border: 1px solid var(--panel-line);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}
.card, .summary-card, .subcard { background: var(--panel-surface); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.table-card { width: 100%; max-width: 100%; overflow: auto; background: #fff; }
.table-card table, .data-table { min-width: 680px; width: 100%; }
th, td { max-width: 520px; white-space: normal; overflow-wrap: anywhere; }
th { color: #475569 !important; background: #f8fbff; }
tbody tr:hover { background: #fbfdff; }
.actions, .header-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.form-grid, .client-form-grid, .definition-layout, .grid, .summary-grid { min-width: 0; }
.form-grid > *, .client-form-grid > *, .grid > *, .summary-grid > * { min-width: 0; }
.form-span-2 { grid-column: span 2; }
textarea { width: 100%; min-height: 76px; resize: vertical; }

.warning { border: 1px solid #fde68a !important; background: #fffbeb !important; color: #92400e !important; }
.success { border: 1px solid #8db9f6 !important; background: #eff6ff !important; color: #1d4ed8 !important; }
.error { border: 1px solid #f4b8b4 !important; background: #fff4f3 !important; color: #b42318 !important; }
.role-badge.superadmin { background: var(--panel-accent-soft) !important; color: #805622 !important; }
.role-badge.admin, .permission-chip { background: var(--panel-primary-soft) !important; color: var(--panel-primary-hover) !important; }
.status.active { background: #e0f2fe !important; color: #1e40af !important; }

.modal-backdrop { overflow-y: auto; padding: 12px; background: rgba(23, 35, 31, .58); }
.modal { width: min(980px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; margin: auto; background: #fff; }

/* Panel admina */
.admin-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.admin-section-nav { position: sticky; top: 76px; display: grid; gap: 13px; padding: 10px; box-shadow: none; background: #fff; }
.admin-section-group { display: grid; gap: 3px; }
.admin-section-group > span { padding: 2px 7px 5px; color: var(--panel-muted); font-size: .65rem; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.admin-section-group button {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  text-align: left;
  border: 1px solid transparent !important;
  border-radius: 8px;
  background: transparent !important;
  color: #334155 !important;
  font-size: .78rem;
  font-weight: 720;
  box-shadow: none !important;
}
.admin-section-group button:hover { background: #f3f6fb !important; color: var(--panel-text) !important; }
.admin-section-group button.active { color: var(--panel-primary-hover) !important; background: var(--panel-primary-soft) !important; border-color: var(--panel-primary-line) !important; box-shadow: inset 3px 0 0 var(--panel-primary) !important; }
.admin-section-content, .admin-section-content > * { min-width: 0; }

.permission-groups .permission-group.active, .permission-group.active { background: var(--panel-primary-soft) !important; color: var(--panel-primary-hover) !important; border-color: var(--panel-primary-line) !important; }
.permission-item:has(input:checked) { border-color: var(--panel-primary-line); background: #f4f7ff; }

/* Zarządzanie stroną osadzone w panelu */
.website-settings-page { display: grid; gap: 13px; min-width: 0; }
.settings-tab-strip { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 8px; }
.settings-tab-strip button {
  min-width: 0;
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px;
  background: #fff !important;
  color: var(--panel-text) !important;
  text-align: left;
}
.settings-tab-strip button span { color: var(--panel-muted); font-size: .69rem; font-weight: 600; }
.settings-tab-strip button:hover { border-color: #a9c1b8 !important; background: #fbfdff !important; }
.settings-tab-strip button.active { border-color: var(--panel-primary) !important; background: var(--panel-primary-soft) !important; box-shadow: inset 0 3px 0 var(--panel-primary) !important; }
.settings-form { display: grid; gap: 17px; padding: 17px; }
.settings-section-title { padding-bottom: 8px; border-bottom: 1px solid var(--panel-line); }
.settings-section-title h3 { margin: 0; color: var(--panel-text); font-size: 1rem; }
.settings-section-title p { margin: 3px 0 0; color: var(--panel-muted); font-size: .78rem; }
.website-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.website-image-field { display: grid; gap: 9px; }
.website-image-preview { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--panel-line); border-radius: 10px; background: #eef2f7; color: var(--panel-muted); }
.website-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-button { cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.website-values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subcard { padding: 12px; box-shadow: none; }
.opening-hours-editor { display: grid; gap: 6px; }
.opening-hours-row { display: grid; grid-template-columns: 120px 112px 120px 18px 120px; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--panel-line); border-radius: 9px; background: #f8fbff; }
.opening-hours-row input { margin-top: 0; }
.inline-check { display: flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 650; }
.inline-check input { width: auto; margin: 0; }
.sticky-form-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 10px 0 0; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 34%); }

/* Logowanie */
.login-page { background: var(--panel-page) !important; }
.login-layout { width: min(860px, 100%); grid-template-columns: 320px minmax(0, 1fr); border: 1px solid var(--panel-line); border-radius: 22px; box-shadow: 0 24px 70px rgba(25,42,75,.12); overflow: hidden; }
.login-brand-panel { min-height: 520px; padding: 150px 34px 38px; background: linear-gradient(155deg, var(--panel-sidebar) 0%, #043a93 100%) !important; }
.login-brand-panel::before, .login-brand-panel::after { display: none !important; }
.login-brand-panel img { top: 34px !important; left: 32px !important; width: 150px !important; filter: brightness(1.15) saturate(.75); }
.login-brand-panel > span { color: #c7d2fe !important; }
.login-brand-panel h1 { color: #fff; font-size: 2.35rem; letter-spacing: -.04em; }
.login-brand-panel p { color: #cbd5e1 !important; }
.login-card { padding: 42px; background: #fff; }
.login-card-heading > span { color: var(--panel-primary) !important; }
.login-card-heading h2 { color: var(--panel-text); font-size: 1.8rem; }
.login-submit { min-height: 46px; }
.remember-login-row { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--panel-line); border-radius: 10px; background: var(--panel-surface-soft); cursor: pointer; }
.remember-login-row input { appearance: none; -webkit-appearance: none; width: 18px !important; height: 18px !important; min-width: 18px; flex: 0 0 18px; margin: 0; border: 1.5px solid var(--panel-primary); border-radius: 5px; background: #fff; display: grid; place-items: center; }
.remember-login-row input::before { content: ""; width: 9px; height: 9px; border-radius: 2px; transform: scale(0); transition: transform .15s ease; background: var(--panel-primary); }
.remember-login-row input:checked::before { transform: scale(1); }
.remember-login-row span { display: grid; gap: 2px; }
.remember-login-row strong { color: var(--panel-text); font-size: .82rem; line-height: 1.2; }
.remember-login-row small { color: var(--panel-muted); font-size: .7rem; font-weight: 550; }

.panel-state-card { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 32px; text-align: center; border: 1px solid var(--panel-line); border-radius: 14px; background: #fff; }
.panel-state-card h2, .panel-state-card h3, .panel-state-card p { margin: 0; }
.panel-state-card p { max-width: 620px; color: var(--panel-muted); }
.panel-state-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--panel-primary-soft); color: var(--panel-primary); font-size: 1.15rem; font-weight: 900; }
.runtime-error-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #f4b8b4; border-radius: 10px; background: #fff4f3; color: #7a271a; }
.runtime-error-banner > div { min-width: 0; display: grid; gap: 2px; }
.runtime-error-banner span { overflow-wrap: anywhere; font-size: .78rem; }
.runtime-error-banner button { margin-left: auto; min-height: 31px; padding: 6px 9px; background: #fff; color: #7a271a; border-color: #f4b8b4; }
.data-update-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; color: #1e3a5f; }
.data-update-banner span { flex: 1; font-size: .85rem; }
.data-update-banner button { min-height: 32px; white-space: nowrap; }
.table-load-more { display: flex; justify-content: center; padding: 12px 0 2px; }

/* Ochrona układu starszych modułów */
.module-page, .admin-section, .form-section, .online-section-card, .goods-form-card, .dashboard-page, .clients-page, .employees-page { min-width: 0; max-width: 100%; }
.toolbar, .filters-row, .compact-filter-bar, .goods-filter-bar, .header-actions, .section-header-row, .modal-actions, .form-actions-right, .title-tools, .assignment-toolbar, .online-tabs-actions { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar > *, .filters-row > *, .compact-filter-bar > *, .goods-filter-bar > *, .header-actions > * { min-width: 0; }
.two-columns, .three-columns, .compact-grid, .location-details-grid, .online-action-grid, .invoice-preview-grid, .goods-history-summary-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 11px; }
.clients-workspace { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.65fr); align-items: stretch; }
.clients-list-panel, .client-detail-panel, .client-tab-content { min-width: 0; }
.client-tab-content { overflow-x: auto; }
.client-metrics-grid, .client-info-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.client-sales-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.client-inline-form { grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) auto; }
.coupon-issue-form { grid-template-columns: minmax(180px, 1fr) minmax(190px, .8fr) auto auto; }
.definition-layout { grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); }

:root[data-theme="dark"] {
  --panel-page: #0b1220;
  --panel-surface: #111827;
  --panel-surface-soft: #111827;
  --panel-line: #334155;
  --panel-line-strong: #33415b;
  --panel-text: #e6eef9;
  --panel-muted: #9aa8bc;
  --panel-primary-soft: #172a47;
  --panel-primary-line: #315fbd;
}
:root[data-theme="dark"] body, :root[data-theme="dark"] .panel-workspace { background: var(--panel-page); }
:root[data-theme="dark"] .panel-topbar { background: rgba(16,23,20,.95); border-color: var(--panel-line); }
:root[data-theme="dark"] .panel-topbar strong, :root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3 { color: var(--panel-text) !important; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .summary-card, :root[data-theme="dark"] .table-card, :root[data-theme="dark"] .modal, :root[data-theme="dark"] .admin-section-nav, :root[data-theme="dark"] .panel-state-card, :root[data-theme="dark"] .settings-tab-strip button { background: var(--panel-surface) !important; border-color: var(--panel-line) !important; }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { color: var(--panel-text); background: #0b1220; border-color: var(--panel-line-strong) !important; }
:root[data-theme="dark"] .admin-section-group button { color: #cbd7ea !important; }
:root[data-theme="dark"] .admin-section-group button:hover { background: #172033 !important; }
:root[data-theme="dark"] th { background: #111827; color: #aebdd3 !important; }

@media (max-width: 1180px) {
  .sidebar { width: 224px; }
  .panel-workspace { margin-left: 224px; }
  .content, .panel-topbar { padding-left: 14px; padding-right: 14px; }
  .admin-workspace { grid-template-columns: 200px minmax(0, 1fr); }
  .clients-workspace { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }
  .settings-tab-strip { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
}

@media (max-width: 900px) {
  .panel-workspace { margin-left: 0; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(292px, 88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar-is-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 70; inset: 0; width: 100%; height: 100%; display: block; border: 0; border-radius: 0; padding: 0; background: rgba(12,20,35,.48); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-is-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .mobile-menu-button { display: grid; place-items: center; }
  .panel-topbar-actions a { display: none; }
  .content { padding: 13px 10px 27px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .admin-workspace { grid-template-columns: 1fr; }
  .admin-section-nav { position: static; display: flex; gap: 8px; overflow-x: auto; }
  .admin-section-group { min-width: max-content; display: flex; align-items: center; gap: 3px; }
  .admin-section-group > span { display: none; }
  .clients-workspace, .website-editor-grid { grid-template-columns: 1fr; }
  .clients-list { max-height: 340px; }
  .definition-layout { grid-template-columns: 1fr; }
  .definition-list { max-height: 190px; }
  .website-image-field { max-width: 360px; }
  .website-values-grid { grid-template-columns: 1fr; }
  .opening-hours-row { grid-template-columns: 1fr 112px 1fr 14px 1fr; }
  table, .table-card table, .data-table { min-width: 580px; }
}

@media (max-width: 620px) {
  .panel-topbar { min-height: 56px; padding: 8px 9px; }
  .panel-topbar-actions button { padding: 7px 8px; }
  .content { padding-left: 7px; padding-right: 7px; }
  .card, .summary-card { border-radius: 10px; padding: 11px; }
  .form-grid, .client-form-grid, .client-form-two, .client-sales-grid { grid-template-columns: 1fr !important; }
  .form-span-2 { grid-column: auto; }
  .client-inline-form, .coupon-issue-form { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 10px); max-width: calc(100vw - 10px); max-height: calc(100vh - 10px); padding: 12px; }
  .runtime-error-banner { align-items: flex-start; }
  .settings-tab-strip { grid-template-columns: 1fr; }
  .opening-hours-row { grid-template-columns: 1fr 1fr; }
  .opening-hours-row > span { display: none; }
  .login-page { padding: 10px; }
  .login-brand-panel { display: none; }
  .login-layout { grid-template-columns: 1fr; border-radius: 18px; }
  .login-card { padding: 30px 21px; }
}

.panel-topbar-actions { display: none !important; }

/* Etykiety — zintegrowane FAWAG Label Studio */
.labels-studio-page { display: grid; gap: 14px; }
.labels-page-header { align-items: flex-end; }
.page-kicker { display: block; margin-bottom: 4px; color: var(--panel-primary); font-size: .67rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.labels-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.labels-summary-grid .summary-card { min-height: 105px; display: grid; align-content: center; gap: 3px; padding: 16px 18px; }
.labels-summary-grid .summary-card > span { color: var(--panel-muted); font-size: .69rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.labels-summary-grid .summary-card > strong { color: var(--panel-text); font-size: 1.65rem; line-height: 1; }
.labels-summary-grid .summary-card > small { color: var(--panel-muted); font-size: .7rem; }
.labels-tabbar { display: flex; align-items: center; gap: 5px; padding: 7px; overflow-x: auto; }
.labels-tabbar > button { min-height: 37px; padding: 8px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--panel-muted); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.labels-tabbar > button:hover { background: var(--panel-primary-soft); color: var(--panel-text); }
.labels-tabbar > button.active { background: var(--panel-primary); color: #fff; box-shadow: 0 6px 16px rgba(7,88,211,.18); }
.labels-guides-toggle { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--panel-muted); font-size: .72rem; white-space: nowrap; }
.labels-guides-toggle input { width: 16px; height: 16px; }
.labels-table-card { overflow: hidden; }
.table-toolbar { min-height: 62px; display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--panel-line); }
.search-field { width: min(420px, 100%); }
.search-field input { min-height: 38px; }
.table-toolbar > span { color: var(--panel-muted); font-size: .72rem; font-weight: 750; }
.labels-table code { font-size: .73rem; color: #25426e; background: #eef4fd; border-radius: 6px; padding: 4px 7px; }
.cell-note { display: block; margin-top: 3px; color: var(--panel-muted); font-size: .65rem; font-weight: 600; }
.row-muted { opacity: .58; }
.day-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.day-chips span { min-width: 25px; padding: 3px 5px; border-radius: 5px; background: var(--panel-primary-soft); color: var(--panel-primary-hover); font-size: .63rem; font-weight: 850; text-align: center; }
.day-chips em { color: var(--panel-muted); font-size: .7rem; }
.empty-table { padding: 38px !important; text-align: center; color: var(--panel-muted); }
.actions-column { width: 210px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
button.compact { min-height: 30px; padding: 5px 9px; border-radius: 7px; font-size: .68rem; }
.button-like { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 800; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.labels-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.template-list-card { padding: 14px; display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.template-mini-preview { position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; border: 1px solid #cdd8e8; border-radius: 8px; background: #fff; box-shadow: 0 7px 20px rgba(21,42,78,.08); }
.mini-element { position: absolute; display: flex; align-items: center; overflow: hidden; color: #111827; font-size: 7px; line-height: 1; white-space: nowrap; }
.mini-barcode { background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 2.2px); }
.template-card-copy { min-width: 0; }
.template-card-copy > div:first-child { display: flex; align-items: center; gap: 8px; }
.template-card-copy h3 { margin: 0; font-size: 1rem; }
.template-card-copy p { margin: 8px 0 13px; color: var(--panel-muted); font-size: .73rem; }
.status-badge { padding: 4px 7px; border-radius: 999px; background: #e9f2ff; color: var(--panel-primary-hover); font-size: .62rem; font-weight: 850; }

.labels-editor-modal { width: min(820px, calc(100vw - 28px)); }
.price-code-modal { width: min(860px, calc(100vw - 28px)); }
.price-code-info,
.price-code-warning { margin-bottom: 13px; padding: 12px 14px; border: 1px solid var(--panel-primary-line); border-radius: 10px; background: var(--panel-primary-soft); color: var(--panel-text); }
.price-code-info { display: grid; gap: 4px; }
.price-code-info p { margin: 0; color: var(--panel-muted); font-size: .75rem; line-height: 1.5; }
.price-code-warning { margin: 13px 0 0; border-color: #f4c46b; background: #fff8e8; font-size: .74rem; line-height: 1.5; }
.price-code-warning code { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.75); color: #6f4a00; font-weight: 850; }
.price-code-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.price-code-preview > div { min-width: 0; display: grid; gap: 5px; padding: 11px 12px; border: 1px solid var(--panel-line); border-radius: 9px; background: var(--panel-surface-soft); }
.price-code-preview > div.wide { grid-column: 1 / -1; }
.price-code-preview span { color: var(--panel-muted); font-size: .66rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.price-code-preview strong { color: var(--panel-text); font-size: 1.05rem; }
.price-code-preview code { overflow-wrap: anywhere; color: #12335f; font-size: .9rem; font-weight: 850; letter-spacing: .06em; }
:root[data-theme="dark"] .price-code-warning { border-color: #8a641e; background: #31250f; color: #f5e7bd; }
:root[data-theme="dark"] .price-code-warning code { background: #463615; color: #ffdf8d; }
:root[data-theme="dark"] .price-code-preview code { color: #c8dcff; }
.labels-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.labels-form-grid label > small { float: right; color: var(--panel-muted); font-weight: 600; }
.span-2 { grid-column: 1 / -1; }
.days-fieldset { margin: 0; padding: 12px; border: 1px solid var(--panel-line); border-radius: 9px; }
.days-fieldset legend { padding: 0 6px; color: var(--panel-text); font-size: .72rem; font-weight: 850; }
.days-checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.days-checkbox-grid label { min-height: 36px; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--panel-line); border-radius: 7px; background: var(--panel-surface-soft); font-size: .72rem; }
.days-checkbox-grid input, .inline-checkbox input { width: 16px; height: 16px; }
.inline-checkbox { display: flex !important; align-items: center; gap: 8px; }
.small-modal { width: min(460px, calc(100vw - 28px)); }

.template-editor-modal { width: min(1240px, calc(100vw - 26px)); max-height: calc(100vh - 26px); }
.template-editor-layout { min-height: 560px; display: grid; grid-template-columns: minmax(0, 1.35fr) 320px; gap: 14px; overflow: hidden; }
.template-editor-stage { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.template-editor-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.label-canvas-wrap { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; border: 1px solid var(--panel-line); border-radius: 12px; background: #edf2f9; overflow: auto; }
.label-canvas-wrap > p { margin: 0; color: var(--panel-muted); font-size: .68rem; }
.label-canvas { position: relative; width: min(760px, 100%); aspect-ratio: 2 / 1; flex: 0 0 auto; border: 1px solid #91a4bf; border-radius: 5px; background: #fff; box-shadow: 0 15px 40px rgba(18,38,72,.15); touch-action: none; }
.label-canvas-element { position: absolute; min-height: 0; display: flex; align-items: center; padding: 0 2px; overflow: hidden; border: 1px dashed transparent; border-radius: 2px; background: transparent; color: #111; line-height: 1; white-space: nowrap; cursor: move; user-select: none; touch-action: none; }
.label-canvas-element:hover { border-color: #77a9ee; background: rgba(7,88,211,.045); }
.label-canvas-element.selected { z-index: 5; border: 1.5px solid var(--panel-primary); background: rgba(7,88,211,.06); box-shadow: 0 0 0 2px rgba(7,88,211,.1); }
.barcode-simulation { width: 100%; height: 100%; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 7px); }
.resize-handle { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 2px 0 0 0; background: var(--panel-primary); cursor: nwse-resize; }
.template-controls { min-height: 0; padding: 12px; border: 1px solid var(--panel-line); border-radius: 12px; background: var(--panel-surface-soft); overflow-y: auto; }
.template-controls h3 { margin: 4px 0 8px; font-size: .77rem; }
.template-element-list { display: grid; gap: 4px; margin-bottom: 14px; }
.template-element-list > button { min-height: 35px; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--panel-text); text-align: left; font-size: .72rem; }
.template-element-list > button:hover { background: #fff; }
.template-element-list > button.active { border-color: var(--panel-primary-line); background: var(--panel-primary-soft); color: var(--panel-primary-hover); }
.template-element-list input { width: 15px; height: 15px; pointer-events: auto; }
.compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.compact-form-grid label { font-size: .66rem; }
.compact-form-grid input, .compact-form-grid select { min-height: 35px; padding: 7px 8px; }

.sheet-editor-modal { width: min(1420px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.sheet-editor-layout { min-height: 630px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; overflow: hidden; }
.sheet-controls { min-height: 0; padding: 12px; border: 1px solid var(--panel-line); border-radius: 12px; background: var(--panel-surface-soft); overflow-y: auto; }
.sheet-fill-panel { display: grid; gap: 7px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--panel-line); }
.sheet-fill-panel h3 { margin: 0; font-size: .78rem; }
.sheet-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 18px; border: 1px solid var(--panel-line); border-radius: 12px; background: #dfe6f0; overflow: auto; }
.sheet-stage > p { margin: 0; color: #58677d; font-size: .68rem; }
.a4-canvas { position: relative; width: min(780px, 95%); flex: 0 0 auto; background: #fff; box-shadow: 0 18px 45px rgba(15,34,66,.22); }
.a4-canvas.landscape { width: min(980px, 98%); }
.sheet-preview-title { position: absolute; left: 4%; right: 4%; z-index: 2; color: #111827; text-align: center; transform: translateY(-50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-slot { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; border: 1px dashed #a9b6c8; background: #fafbfd; color: #7a8798; line-height: 1; text-align: center; }
.sheet-slot:hover { z-index: 4; border-color: var(--panel-primary); background: #edf5ff; }
.sheet-slot.filled { border-style: solid; border-color: #8eaad2; background: #fff; color: #142033; }
.sheet-slot strong { max-width: 94%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(5px, .65vw, 9px); }
.sheet-slot span { font-size: clamp(4px, .52vw, 7px); font-weight: 750; }
.sheet-slot small { font-size: clamp(3px, .42vw, 6px); }
.empty-slot-index { color: #9aa6b6; font-size: 8px !important; }

:root[data-theme="dark"] .labels-table code { color: #bcd3f4; background: #172a47; }
:root[data-theme="dark"] .label-canvas-wrap, :root[data-theme="dark"] .sheet-stage { background: #0b1220; }
:root[data-theme="dark"] .template-mini-preview, :root[data-theme="dark"] .label-canvas, :root[data-theme="dark"] .a4-canvas { background: #fff !important; }

@media (max-width: 1180px) {
  .labels-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .labels-template-grid { grid-template-columns: 1fr; }
  .template-editor-layout { grid-template-columns: 1fr; overflow-y: auto; }
  .template-controls { max-height: none; }
  .sheet-editor-layout { grid-template-columns: 300px minmax(650px, 1fr); }
}
@media (max-width: 900px) {
  .labels-summary-grid { grid-template-columns: 1fr 1fr; }
  .labels-tabbar { align-items: stretch; }
  .labels-guides-toggle { margin-left: 4px; }
  .template-list-card { grid-template-columns: 1fr; }
  .sheet-editor-layout { grid-template-columns: 1fr; overflow-y: auto; }
  .sheet-controls { overflow: visible; }
  .sheet-stage { min-height: 520px; overflow: auto; }
  .a4-canvas { min-width: 620px; }
}
@media (max-width: 620px) {
  .labels-summary-grid { grid-template-columns: 1fr; }
  .labels-form-grid, .template-editor-toolbar, .compact-form-grid, .price-code-preview { grid-template-columns: 1fr; }
  .price-code-preview > div.wide { grid-column: auto; }
  .span-2 { grid-column: auto; }
  .days-checkbox-grid { grid-template-columns: 1fr 1fr; }
  .labels-tabbar { display: grid; grid-template-columns: 1fr 1fr; }
  .labels-guides-toggle { grid-column: 1 / -1; margin: 4px 5px; }
  .template-editor-modal, .sheet-editor-modal { max-height: calc(100vh - 8px); width: calc(100vw - 8px); }
}
.day-pdf-actions { display: inline-flex; align-items: center; gap: 6px; }
.day-pdf-actions select { min-height: 36px; min-width: 135px; padding: 7px 28px 7px 9px; }
.sheet-zoom-toolbar { position: sticky; top: -18px; z-index: 8; display: flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 9px; border: 1px solid #c8d4e4; border-radius: 9px; background: rgba(255,255,255,.95); box-shadow: 0 7px 18px rgba(20,40,72,.12); }
.sheet-zoom-toolbar input[type="range"] { width: 150px; min-height: 20px; padding: 0; }
.sheet-zoom-toolbar strong { min-width: 44px; color: #24354f; font-size: .72rem; text-align: center; }
@media (max-width: 620px) { .day-pdf-actions { width: 100%; } .day-pdf-actions select { flex: 1; } .sheet-zoom-toolbar input[type="range"] { width: 90px; } }


/* v2.47 — prosty ekran logowania */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: #f3f6fb;
}
.login-layout,
.login-layout.login-layout-single {
  width: min(500px, 100%);
  display: block;
  grid-template-columns: 1fr;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}
.login-brand-panel { display: none !important; }
.login-card {
  width: 100%;
  padding: 38px 40px;
  border: 1px solid #d7e0ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(25, 42, 75, .10);
}
.login-card-heading { margin-bottom: 22px; }
.login-card-heading h2 { margin-top: 6px; font-size: 1.95rem; }
.remember-login-row {
  min-height: 28px;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  width: fit-content;
  padding: 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer;
}
.remember-login-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  flex: 0 0 16px !important;
  margin: 0 !important;
  border: 1.5px solid #7894bc !important;
  border-radius: 4px !important;
  background: #fff !important;
  display: grid !important;
  place-items: center !important;
}
.remember-login-row input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--panel-primary);
  transform: scale(0);
  transition: transform .14s ease;
}
.remember-login-row input:checked { border-color: var(--panel-primary) !important; }
.remember-login-row input:checked::before { transform: scale(1); }
.remember-login-row > span {
  display: inline !important;
  color: #344258;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}
.login-submit { margin-top: 9px; }

/* v2.47 — lżejsze i czytelniejsze menu ustawień */
.admin-section-nav {
  gap: 15px;
  padding: 12px;
  border-color: #dbe4ef !important;
  border-radius: 12px;
  background: #f8fafc !important;
}
.admin-section-group { gap: 5px; }
.admin-section-group > span {
  padding: 2px 5px 4px;
  color: #748197;
  font-size: .62rem;
  letter-spacing: .08em;
}
.admin-section-group button {
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #dce5f0 !important;
  border-radius: 9px;
  background: #fff !important;
  color: #25344c !important;
  font-size: .78rem;
  font-weight: 740;
  box-shadow: 0 1px 2px rgba(22, 39, 69, .025) !important;
}
.admin-section-group button:hover {
  border-color: #abc2e3 !important;
  background: #f3f7fd !important;
  color: #0b4ead !important;
}
.admin-section-group button.active {
  border-color: #8db5ee !important;
  background: #eaf3ff !important;
  color: #064bac !important;
  box-shadow: inset 3px 0 0 var(--panel-primary), 0 2px 8px rgba(7,88,211,.08) !important;
}
.settings-tab-strip { gap: 10px; }
.settings-tab-strip button {
  min-height: 72px;
  padding: 12px 14px;
  border-color: #dbe4ef !important;
  border-radius: 12px;
  background: #fff !important;
  color: #22324a !important;
  box-shadow: 0 2px 8px rgba(25,42,75,.035) !important;
}
.settings-tab-strip button strong { font-size: .84rem; }
.settings-tab-strip button span { margin-top: 2px; color: #748197; line-height: 1.35; }
.settings-tab-strip button:hover {
  border-color: #a9c4e9 !important;
  background: #f7faff !important;
  transform: translateY(-1px);
}
.settings-tab-strip button.active {
  border-color: #76a8eb !important;
  background: #eaf3ff !important;
  color: #064bac !important;
  box-shadow: inset 0 3px 0 var(--panel-primary), 0 5px 14px rgba(7,88,211,.09) !important;
}
.labels-tabbar {
  gap: 7px;
  padding: 8px;
  border-color: #dbe4ef !important;
  background: #f8fafc !important;
}
.labels-tabbar > button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #dce5f0 !important;
  background: #fff !important;
  color: #344258 !important;
  box-shadow: none !important;
}
.labels-tabbar > button:hover {
  border-color: #a9c4e9 !important;
  background: #f2f7fd !important;
  color: #064bac !important;
}
.labels-tabbar > button.active {
  border-color: var(--panel-primary) !important;
  background: var(--panel-primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(7,88,211,.16) !important;
}

@media (max-width: 620px) {
  .login-page { padding: 16px 12px; }
  .login-card { padding: 28px 22px; border-radius: 15px; }
}


/* v248 checkbox fix */
label.remember-login-row input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #7894bc !important;
  border-radius: 3px !important;
  background: #fff !important;
  display: inline-grid !important;
  place-items: center !important;
  vertical-align: middle !important;
  box-shadow: none !important;
}
label.remember-login-row input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--panel-primary);
  transform: scale(0);
  transition: transform .14s ease;
}
label.remember-login-row input[type="checkbox"]:checked::before {
  transform: scale(1);
}


/* v2.49 — audyt kontrastu elementów wypełnionych kolorem marki */
:root { --panel-on-primary: #ffffff; }

/* Logo pozostaje tym samym plikiem SVG; biel jest nakładana wyłącznie w kodzie. */
.sidebar .brand-block img {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

/* Aktywna pozycja głównej nawigacji: niebieskie tło + biały tekst. */
.sidebar .sidebar-nav-item.active,
.sidebar .sidebar-nav-item.active:hover:not(:disabled),
.sidebar .sidebar-nav-item.utility.active,
.sidebar .sidebar-nav-item.utility.active:hover:not(:disabled) {
  border-color: #4f9cf7 !important;
  background: linear-gradient(135deg, #0758d3 0%, #0a66ea 100%) !important;
  color: var(--panel-on-primary) !important;
  box-shadow: inset 3px 0 0 #7de3ff, 0 7px 18px rgba(0, 50, 132, .24) !important;
}
.sidebar .sidebar-nav-item.active .sidebar-nav-label,
.sidebar .sidebar-nav-item.active .sidebar-nav-icon,
.sidebar .sidebar-nav-item.active span,
.sidebar .sidebar-nav-item.active strong,
.sidebar .sidebar-nav-item.active small,
.sidebar .sidebar-nav-item.active svg {
  color: var(--panel-on-primary) !important;
}
.sidebar .sidebar-nav-item.active .sidebar-nav-icon {
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}
.sidebar .sidebar-nav-item.active svg,
.sidebar .sidebar-nav-item.active svg * {
  stroke: currentColor !important;
}

/* Wspólny kontrast dla wszystkich pełnych niebieskich kontrolek. */
:is(
  button:not(.secondary):not(.danger):not(.icon-button):not(.link-button):not(.password-toggle),
  .login-submit,
  .dashboard-primary-link,
  .website-sidebar-button,
  .permission-group.active,
  .admin-tabs button.active,
  .module-tabs button.active,
  .tabs.online-tabs button.active,
  .online-status-tabs button.active,
  .packaging-tabs button.active,
  .labels-tabbar > button.active,
  .category-config-list button.active,
  .condition-choice-row button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .choice-chip-grid button.active,
  .dictionary-chip.active,
  .theme-toggle-row button.active,
  .row-expander-button,
  .file-drop.primary-drop
) {
  color: var(--panel-on-primary) !important;
}
:is(
  .permission-group.active,
  .admin-tabs button.active,
  .module-tabs button.active,
  .tabs.online-tabs button.active,
  .online-status-tabs button.active,
  .packaging-tabs button.active,
  .labels-tabbar > button.active,
  .category-config-list button.active,
  .condition-choice-row button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .choice-chip-grid button.active,
  .dictionary-chip.active,
  .theme-toggle-row button.active,
  .file-drop.primary-drop
) :is(span, strong, small, b, em, label, svg) {
  color: var(--panel-on-primary) !important;
}
:is(
  .condition-choice-row button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .choice-chip-grid button.active,
  .dictionary-chip.active
) svg,
:is(
  .condition-choice-row button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .choice-chip-grid button.active,
  .dictionary-chip.active
) svg * {
  stroke: currentColor !important;
}

/* Jasne aktywne zakładki zachowują ciemnoniebieski tekst, bo mają jasne tło. */
.admin-section-group button.active,
.settings-tab-strip button.active,
.permission-groups .permission-group.active,
.template-element-list > button.active {
  color: #064bac !important;
}
.admin-section-group button.active :is(span,strong,small),
.settings-tab-strip button.active :is(span,strong,small),
.permission-groups .permission-group.active :is(span,strong,small),
.template-element-list > button.active :is(span,strong,small) {
  color: inherit !important;
}


/* v250 final contrast audit */
.brand-block img {
  filter: brightness(0) invert(1) !important;
  opacity: .98;
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(7, 88, 211, .28) !important;
}
.sidebar-nav-item.active .sidebar-nav-icon {
  background: rgba(255,255,255,.18) !important;
  color: #ffffff !important;
}
.sidebar-nav-item.active :is(span,strong,small),
.sidebar-nav-item.active svg,
.sidebar-nav-item.active svg * {
  color: inherit !important;
  stroke: currentColor !important;
}

.permission-group {
  background: #f8fbff !important;
  border: 1px solid #cfe0ff !important;
  color: #12335f !important;
}
.permission-group small {
  color: #51719f !important;
}
.permission-group.active,
.permission-groups .permission-group.active {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(7, 88, 211, .18) !important;
}
.permission-group.active :is(strong,span,small),
.permission-groups .permission-group.active :is(strong,span,small) {
  color: #ffffff !important;
}
.permission-group.active small,
.permission-groups .permission-group.active small {
  color: rgba(255,255,255,.88) !important;
}

.definition-list button {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(7, 88, 211, .14) !important;
}
.definition-list button strong {
  color: #ffffff !important;
}
.definition-list button span,
.definition-list button small {
  color: rgba(255,255,255,.86) !important;
}
.definition-list button.active,
.definition-list button:hover {
  background: linear-gradient(135deg, #084fbe 0%, #043f9d 100%) !important;
  border-color: #93c5fd !important;
  color: #ffffff !important;
}
.definition-list button.active :is(strong,span,small),
.definition-list button:hover :is(strong,span,small) {
  color: inherit !important;
}

:is(
  .template-element-list > button.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .dictionary-chip.active
) {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
}
:is(
  .template-element-list > button.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .dictionary-chip.active
) :is(span,strong,small) {
  color: inherit !important;
}
:is(
  .template-element-list > button.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .dictionary-chip.active
) svg,
:is(
  .template-element-list > button.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active,
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .category-menu button.active:not(.dictionary-add-option),
  .dictionary-combo-menu button.active:not(.dictionary-add-option),
  .goods-lot-menu button.active,
  .dictionary-chip.active
) svg * {
  color: inherit !important;
  stroke: currentColor !important;
}

/* Stabilność szerokości i zawijania w kartach/listach */
.definition-list button,
.permission-group,
.admin-section-group button,
.settings-tab-strip button {
  min-width: 0;
  overflow: hidden;
}
.definition-list button strong,
.permission-group strong,
.admin-section-group button strong,
.settings-tab-strip button strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.definition-list button span,
.permission-group span,
.permission-group small,
.settings-tab-strip button span {
  overflow-wrap: anywhere;
}


/* v251 unified look layer */
:root {
  --ui-radius-sm: 8px;
  --ui-radius-md: 12px;
  --ui-radius-lg: 16px;
  --ui-border: #d9e4f2;
  --ui-border-strong: #c4d5ee;
  --ui-surface-soft: #f8fbff;
  --ui-surface-accent: #eef4ff;
  --ui-shadow-soft: 0 10px 24px rgba(15, 43, 92, .06);
}

/* Nagłówki i sekcje */
.module-page > .page-header,
.admin-panel-page > .page-header,
.labels-page > .page-header,
.clients-page > .page-header {
  margin-bottom: 14px;
}
.page-header h2, .module-page h2 {
  color: #102a4a;
  letter-spacing: -.02em;
}
.page-header .muted, .module-page .muted, .modal-header p.muted {
  color: #5e738f !important;
}

/* Karty i boksy */
.card, .subcard, .summary-card, .table-card, .toolbar, .panel-state-card, .client-detail-card, .client-summary-card {
  border-radius: var(--ui-radius-lg) !important;
  border-color: var(--ui-border) !important;
  box-shadow: var(--ui-shadow-soft) !important;
}
.card, .subcard, .toolbar, .panel-state-card {
  background: #fff !important;
}
.toolbar, .panel-state-card, .card, .subcard { overflow: hidden; }

/* Formularze */
label { color: #17345c; font-weight: 700; }
input, select, textarea {
  border-radius: var(--ui-radius-md) !important;
  border-color: var(--ui-border-strong) !important;
  background: #fff !important;
  color: #132b4c !important;
  box-shadow: none !important;
}
input::placeholder, textarea::placeholder { color: #8aa0bd !important; }
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #6aa8ff !important;
  box-shadow: 0 0 0 3px rgba(7,88,211,.12) !important;
}

/* Przyciski */
button, .secondary, .danger, .compact, .icon-button, .file-picker-button {
  border-radius: var(--ui-radius-md) !important;
  font-weight: 800;
}
button.secondary, .secondary, .compact.secondary, .file-picker-button {
  background: #f7faff !important;
  color: #17427a !important;
  border: 1px solid var(--ui-border-strong) !important;
  box-shadow: none !important;
}
button.secondary:hover, .secondary:hover, .compact.secondary:hover, .file-picker-button:hover {
  background: #eef4ff !important;
  border-color: #8bb8ff !important;
}
button.danger, .compact.danger {
  background: #fff5f5 !important;
  color: #b42318 !important;
  border: 1px solid #f3c5c2 !important;
}
button.danger:hover, .compact.danger:hover {
  background: #ffeceb !important;
}
button:not(.secondary):not(.danger):not(.sidebar-group-toggle):not(.sidebar-nav-item):not(.admin-section-group button):not(.settings-tab-strip button):not(.permission-group):not(.definition-list button):not(.icon-button) {
  box-shadow: 0 8px 18px rgba(7,88,211,.12);
}

/* Zakładki / listy podobnych elementów */
.definition-list button,
.permission-group,
.admin-section-group button,
.settings-tab-strip button,
.template-element-list > button,
.choice-chip-grid button,
.flaw-chip-grid button,
.condition-choice-visible button,
.visible-flaws .flaw-option-card,
.category-menu button:not(.dictionary-add-option),
.dictionary-combo-menu button:not(.dictionary-add-option),
.goods-lot-menu button,
.dictionary-chip {
  min-height: 44px;
  border-radius: var(--ui-radius-md) !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.definition-list,
.permission-groups,
.admin-section-group,
.settings-tab-strip,
.template-element-list,
.choice-chip-grid,
.flaw-chip-grid {
  gap: 8px !important;
}
.definition-list button,
.permission-group,
.template-element-list > button,
.choice-chip-grid button,
.flaw-chip-grid button,
.condition-choice-visible button,
.visible-flaws .flaw-option-card,
.category-menu button:not(.dictionary-add-option),
.dictionary-combo-menu button:not(.dictionary-add-option),
.goods-lot-menu button,
.dictionary-chip {
  background: #f7faff !important;
  border: 1px solid var(--ui-border) !important;
  color: #17345c !important;
  box-shadow: none !important;
}
.definition-list button:hover,
.permission-group:hover,
.template-element-list > button:hover,
.choice-chip-grid button:hover,
.flaw-chip-grid button:hover,
.condition-choice-visible button:hover,
.visible-flaws .flaw-option-card:hover,
.category-menu button.active:not(.dictionary-add-option),
.dictionary-combo-menu button.active:not(.dictionary-add-option),
.goods-lot-menu button:hover,
.dictionary-chip:hover {
  background: #eef4ff !important;
  border-color: #9abfff !important;
  color: #0c4ca9 !important;
}
.definition-list button.active,
.permission-group.active,
.permission-groups .permission-group.active,
.template-element-list > button.active,
.choice-chip-grid button.active,
.flaw-chip-grid button.active,
.condition-choice-visible button.active,
.visible-flaws .flaw-option-card.active,
.category-menu button.active:not(.dictionary-add-option),
.dictionary-combo-menu button.active:not(.dictionary-add-option),
.goods-lot-menu button.active,
.dictionary-chip.active,
.settings-tab-strip button.active,
.admin-section-group button.active {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(7,88,211,.18) !important;
}
.definition-list button :is(strong,span,small),
.permission-group :is(strong,span,small),
.settings-tab-strip button :is(strong,span,small),
.admin-section-group button :is(strong,span,small),
.template-element-list > button :is(strong,span,small),
.choice-chip-grid button :is(strong,span,small),
.flaw-chip-grid button :is(strong,span,small),
.dictionary-chip :is(strong,span,small) { color: inherit !important; }

/* Tabele */
.table-card table thead th, .data-table thead th {
  background: #f8fbff !important;
  color: #4e6380 !important;
  border-bottom: 1px solid var(--ui-border) !important;
}
.data-table thead th[data-column-key] {
  cursor: pointer;
  user-select: none;
}
.table-card table tbody td, .data-table tbody td {
  border-bottom: 1px solid #edf3fb;
  color: #18365e;
}
.table-card tbody tr:hover, .data-table tbody tr:hover {
  background: #fbfdff !important;
}
.cell-note, .muted-table-value, .two-line-cell small, small.muted {
  color: #667d99 !important;
}

/* Modale */
.modal {
  border-radius: 18px !important;
}
.modal-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf3fb;
}
.modal-actions {
  padding-top: 10px;
  border-top: 1px solid #edf3fb;
}

/* Checkboxy/przełączniki */
.checkbox-label, .client-consents label, .permission-item, .remember-login-row {
  border-radius: var(--ui-radius-md) !important;
}
.permission-item, .client-consents label {
  background: #f8fbff;
  border: 1px solid var(--ui-border);
}
.permission-item:has(input:checked), .client-consents label:has(input:checked) {
  background: #eef4ff;
  border-color: #9abfff;
}

/* Drobne rozjazdy */
.client-form-grid, .form-grid, .grid, .summary-grid, .definition-layout, .coupon-issue-form, .actions, .header-actions {
  align-items: start;
}
.row-actions { gap: 8px; flex-wrap: wrap; }
.page-header, .modal-header, .toolbar, .summary-card, .subcard { min-width: 0; }


/* v252: spójny i czytelny tryb ciemny po warstwie unified */
:root[data-theme="dark"] {
  --ui-border: #2b3a52;
  --ui-border-strong: #40516d;
  --ui-surface-soft: #111827;
  --ui-surface-accent: #17233a;
  --ui-shadow-soft: 0 10px 24px rgba(0,0,0,.22);
}
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .subcard,
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .panel-state-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .table-card,
:root[data-theme="dark"] .client-detail-card,
:root[data-theme="dark"] .client-summary-card { background: var(--panel-surface) !important; border-color: var(--panel-line) !important; }
:root[data-theme="dark"] label,
:root[data-theme="dark"] .table-card table tbody td,
:root[data-theme="dark"] .data-table tbody td { color: #dbe7f7 !important; }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: #0b1220 !important; color: #eef5ff !important; border-color: #40516d !important; }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #8192aa !important; }
:root[data-theme="dark"] button.secondary,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .compact.secondary,
:root[data-theme="dark"] .file-picker-button,
:root[data-theme="dark"] .definition-list button,
:root[data-theme="dark"] .permission-group,
:root[data-theme="dark"] .template-element-list > button,
:root[data-theme="dark"] .choice-chip-grid button,
:root[data-theme="dark"] .flaw-chip-grid button,
:root[data-theme="dark"] .condition-choice-visible button,
:root[data-theme="dark"] .visible-flaws .flaw-option-card,
:root[data-theme="dark"] .category-menu button:not(.dictionary-add-option),
:root[data-theme="dark"] .dictionary-combo-menu button:not(.dictionary-add-option),
:root[data-theme="dark"] .goods-lot-menu button,
:root[data-theme="dark"] .dictionary-chip { background: #172033 !important; color: #dbe7f7 !important; border-color: #354762 !important; }
:root[data-theme="dark"] .table-card table thead th,
:root[data-theme="dark"] .data-table thead th { background: #111827 !important; color: #b9c8dd !important; border-color: #2b3a52 !important; }
:root[data-theme="dark"] .table-card tbody tr:hover,
:root[data-theme="dark"] .data-table tbody tr:hover { background: #172033 !important; }
:root[data-theme="dark"] .cell-note,
:root[data-theme="dark"] .muted-table-value,
:root[data-theme="dark"] .two-line-cell small,
:root[data-theme="dark"] small.muted,
:root[data-theme="dark"] .page-header .muted,
:root[data-theme="dark"] .module-page .muted,
:root[data-theme="dark"] .modal-header p.muted { color: #9fb0c8 !important; }
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-actions { border-color: #2b3a52 !important; }
.toolbar, .panel-state-card, .card, .subcard { overflow: visible; }
.table-card { overflow: auto; }


/* v253: przycisk podglądu hasła zawsze pozostaje czytelny i nie dziedziczy stylu głównego przycisku. */
.password-input .password-toggle,
button.password-toggle {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: #0758d3 !important;
  border: 1px solid #8eb8f4 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}
.password-input .password-toggle svg,
.password-input .password-toggle svg * {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.password-input .password-toggle:hover:not(:disabled),
.password-input .password-toggle:focus-visible {
  background: #eaf2ff !important;
  color: #003f9e !important;
  border-color: #438be8 !important;
}
:root[data-theme="dark"] .password-input .password-toggle,
:root[data-theme="dark"] button.password-toggle {
  background: #142033 !important;
  color: #dbeafe !important;
  border-color: #55729a !important;
}

/* v254: przyciski sekcji panelu admina mają zawsze jawny, kontrastowy tekst. */
.admin-section-nav .admin-section-group > button.admin-nav-button {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 12px !important;
  border: 1px solid #c9d9ee !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
  text-align: left !important;
}
.admin-section-nav .admin-section-group > button.admin-nav-button .admin-nav-label {
  display: block !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow: visible !important;
}
.admin-section-nav .admin-section-group > button.admin-nav-button:hover:not(:disabled) {
  background: #eef5ff !important;
  border-color: #7faef0 !important;
  color: #0c4da2 !important;
  -webkit-text-fill-color: #0c4da2 !important;
}
.admin-section-nav .admin-section-group > button.admin-nav-button.active {
  background: linear-gradient(135deg, #0b68e8, #1d63d4) !important;
  border-color: #0b68e8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(11, 104, 232, .22) !important;
}
:root[data-theme="dark"] .admin-section-nav .admin-section-group > button.admin-nav-button {
  background: #111b2d !important;
  border-color: #354762 !important;
  color: #dbe7f7 !important;
  -webkit-text-fill-color: #dbe7f7 !important;
}
:root[data-theme="dark"] .admin-section-nav .admin-section-group > button.admin-nav-button:hover:not(:disabled) {
  background: #172a46 !important;
  border-color: #55729a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
:root[data-theme="dark"] .admin-section-nav .admin-section-group > button.admin-nav-button.active {
  background: linear-gradient(135deg, #146fe8, #255dc2) !important;
  border-color: #4b93f1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* v254: czytelniejszy edytor uprawnień i szybkie zaznaczanie całego modułu. */
.permission-panel-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  padding: 10px 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: #f6f9fe;
}
.permission-panel-header > div:first-child {
  display: grid;
  gap: 3px;
}
.permission-panel-header strong {
  color: #17345c;
}
.permission-panel-header small {
  color: #667d99;
  line-height: 1.35;
}
.permission-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.permission-panel-actions .small-button {
  min-height: 34px !important;
  padding: 6px 10px !important;
}
:root[data-theme="dark"] .permission-panel-header {
  background: #111827;
  border-color: #354762;
}
:root[data-theme="dark"] .permission-panel-header strong {
  color: #eef5ff;
}
:root[data-theme="dark"] .permission-panel-header small {
  color: #9fb0c8;
}
@media (max-width: 760px) {
  .permission-panel-header { align-items: stretch; flex-direction: column; }
  .permission-panel-actions { justify-content: flex-start; }
}

/* v255: oddzielny grafik, ewidencja czasu pracy i zegar pracy na pulpicie. */
.work-clock-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #b9d3f7;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf3ff 100%);
  box-shadow: 0 12px 28px rgba(31, 93, 173, .10);
}
.work-clock-private_exit {
  border-color: #f4c36d;
  background: linear-gradient(135deg, #fffdf6 0%, #fff3d7 100%);
}
.work-clock-copy {
  min-width: 0;
}
.work-clock-copy h3 {
  margin: 3px 0 4px;
  color: #17345c;
}
.work-clock-timer {
  margin: 4px 0 9px;
  color: #0758d3;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: .025em;
  font-variant-numeric: tabular-nums;
}
.work-clock-private_exit .work-clock-timer {
  color: #a75c00;
}
.work-clock-meta {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: #526985;
  font-size: .86rem;
}
.work-clock-meta strong {
  color: #17345c;
}
.work-clock-meta .missing-location {
  color: #a64600;
}
.work-clock-actions {
  display: flex;
  min-width: min(100%, 300px);
  flex-direction: column;
  gap: 9px;
}
.work-clock-actions button {
  width: 100%;
  min-height: 44px;
  white-space: normal;
}
.work-clock-main {
  border: 0 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: .9rem !important;
  font-weight: 950 !important;
  letter-spacing: .025em;
}
.work-clock-main.start { background: linear-gradient(135deg, #0d79e8, #0758d3) !important; }
.work-clock-main.end { background: linear-gradient(135deg, #df3d3d, #b91c1c) !important; }
.work-clock-main.return { background: linear-gradient(135deg, #15945c, #087443) !important; }
.work-clock-private {
  border-color: #e9ad45 !important;
  background: #fff7e5 !important;
  color: #8b4c00 !important;
  -webkit-text-fill-color: #8b4c00 !important;
  font-weight: 900 !important;
}
.compact-error { margin-top: 10px; }

.work-location-backdrop { z-index: 1200; }
.work-location-modal {
  width: min(620px, calc(100vw - 28px));
}
.work-location-modal > p {
  margin: 0 0 14px;
  color: #58708f;
  line-height: 1.55;
}
.work-location-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.work-location-buttons > button {
  display: grid;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #a9c9f4 !important;
  border-radius: 14px !important;
  background: #f7fbff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  text-align: left;
}
.work-location-buttons > button:hover:not(:disabled) {
  border-color: #438be8 !important;
  background: #eaf3ff !important;
  transform: translateY(-1px);
}
.work-location-buttons > button strong { font-size: .95rem; }
.work-location-buttons > button span { margin-top: 4px; color: #6a7e99; font-size: .78rem; }

.schedule-page .calendar-layout {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
}
.schedule-page .month-calendar-card {
  min-width: 0;
  overflow-x: auto;
}
.schedule-page .month-calendar-weekdays,
.schedule-page .month-calendar-grid {
  min-width: 840px;
}
.schedule-page .month-day {
  position: relative;
  min-height: 132px;
  padding: 8px;
}
.schedule-page .month-day-number {
  display: flex;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;
  background: transparent;
}
.schedule-page .month-day-number > strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5fb;
  color: #24446f;
}
.calendar-add-button {
  display: grid !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  place-items: center;
  border: 1px solid #a9c9f4 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #0758d3 !important;
  -webkit-text-fill-color: #0758d3 !important;
  font-size: 1rem !important;
  line-height: 1 !important;
}
.month-day-shifts {
  display: grid;
  gap: 5px;
  align-content: start;
}
.calendar-shift {
  display: grid !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 7px 8px !important;
  gap: 2px;
  border: 1px solid #bed5f4 !important;
  border-radius: 9px !important;
  background: #eef5ff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  box-shadow: none !important;
  text-align: left;
  white-space: normal;
}
.calendar-shift.editable { border-left: 4px solid #0b68e8 !important; }
.calendar-shift:hover { background: #e2efff !important; }
.calendar-shift strong,
.calendar-shift span,
.calendar-shift small { color: inherit !important; }
.calendar-shift strong { overflow: hidden; text-overflow: ellipsis; font-size: .76rem; }
.calendar-shift span { font-size: .72rem; }
.calendar-shift small { opacity: .72; font-size: .68rem; }
.schedule-page .month-day.sunday { background: #fff9f7; }
.schedule-page .employee-list-card { position: sticky; top: 14px; }

.work-time-summary-grid { margin-bottom: 14px; }
.warning-summary {
  border-color: #efbb61 !important;
  background: #fff9ed !important;
}
.work-summary-card { margin-bottom: 14px; }
.work-time-records-table { min-width: 1120px; }
.current-record-row td { background: #f5faff !important; }
.status-badge.work-status-working { background: #e5f8ee; color: #0b7243; }
.status-badge.work-status-private_exit { background: #fff2d8; color: #8a4d00; }
.status-badge.work-status-completed { background: #eaf1fc; color: #315b91; }
.status-badge.work-status-incomplete { background: #ffeded; color: #b42318; }
.record-source-label {
  display: block;
  margin-top: 5px;
  color: #71839c;
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}
.private-break-details summary {
  cursor: pointer;
  color: #8a4d00;
  font-weight: 850;
}
.private-break-details > div {
  margin-top: 4px;
  color: #667d99;
  font-size: .74rem;
  white-space: nowrap;
}
.work-time-modal { width: min(900px, calc(100vw - 28px)); }
.private-break-editor {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #d6e2f2;
  border-radius: 14px;
  background: #f8fbff;
}
.table-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.table-section-header > div { display: grid; gap: 2px; }
.private-break-row {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(120px, .8fr) minmax(180px, 1.4fr) auto;
  gap: 9px;
  align-items: end;
  padding: 9px 0;
  border-top: 1px solid #e2eaf5;
}
.private-break-row:first-of-type { border-top: 0; }
.private-break-row label { min-width: 0; }
.private-break-row input { width: 100%; }

:root[data-theme="dark"] .work-clock-card {
  border-color: #355277;
  background: linear-gradient(135deg, #111b2d 0%, #13233b 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
:root[data-theme="dark"] .work-clock-private_exit {
  border-color: #7c5a28;
  background: linear-gradient(135deg, #201b13 0%, #2b2112 100%);
}
:root[data-theme="dark"] .work-clock-copy h3,
:root[data-theme="dark"] .work-clock-meta strong { color: #eef5ff; }
:root[data-theme="dark"] .work-clock-meta { color: #a9bad1; }
:root[data-theme="dark"] .work-clock-timer { color: #7db6ff; }
:root[data-theme="dark"] .work-clock-private_exit .work-clock-timer { color: #ffc66d; }
:root[data-theme="dark"] .work-clock-private {
  border-color: #7c5a28 !important;
  background: #2b2112 !important;
  color: #ffd899 !important;
  -webkit-text-fill-color: #ffd899 !important;
}
:root[data-theme="dark"] .work-location-modal > p,
:root[data-theme="dark"] .work-location-buttons > button span { color: #a9bad1; }
:root[data-theme="dark"] .work-location-buttons > button {
  border-color: #405b7c !important;
  background: #101b2e !important;
  color: #eef5ff !important;
  -webkit-text-fill-color: #eef5ff !important;
}
:root[data-theme="dark"] .work-location-buttons > button:hover:not(:disabled) { background: #172b48 !important; }
:root[data-theme="dark"] .schedule-page .month-day,
:root[data-theme="dark"] .schedule-page .month-day.sunday { background: #101827; }
:root[data-theme="dark"] .schedule-page .month-day.empty { background: #0c1421; }
:root[data-theme="dark"] .schedule-page .month-day-number > strong { background: #1b2a40; color: #dbeafe; }
:root[data-theme="dark"] .calendar-add-button {
  border-color: #48698f !important;
  background: #111c2f !important;
  color: #9bc6ff !important;
  -webkit-text-fill-color: #9bc6ff !important;
}
:root[data-theme="dark"] .calendar-shift {
  border-color: #3b587b !important;
  background: #162841 !important;
  color: #e5effc !important;
  -webkit-text-fill-color: #e5effc !important;
}
:root[data-theme="dark"] .calendar-shift:hover { background: #1c3557 !important; }
:root[data-theme="dark"] .current-record-row td { background: #101f34 !important; }
:root[data-theme="dark"] .warning-summary { border-color: #7c5a28 !important; background: #241d12 !important; }
:root[data-theme="dark"] .private-break-editor { border-color: #354762; background: #0f1929; }
:root[data-theme="dark"] .private-break-row { border-color: #2f4058; }
:root[data-theme="dark"] .private-break-details > div,
:root[data-theme="dark"] .record-source-label { color: #9fb0c8; }

@media (max-width: 980px) {
  .work-clock-card { grid-template-columns: 1fr; }
  .work-clock-actions { width: 100%; min-width: 0; }
  .schedule-page .calendar-layout { grid-template-columns: 1fr; }
  .schedule-page .employee-list-card { position: static; order: 2; }
  .schedule-page .month-calendar-card { order: 1; }
}
@media (max-width: 720px) {
  .work-clock-card { padding: 15px; }
  .work-clock-meta { display: grid; gap: 5px; }
  .work-location-buttons { grid-template-columns: 1fr; }
  .private-break-row { grid-template-columns: 1fr 1fr; }
  .private-break-row label:nth-child(3) { grid-column: 1 / -1; }
  .private-break-row > button { grid-column: 1 / -1; }
  .table-section-header { align-items: stretch; flex-direction: column; }
}

/* v260: interaktywny grafik - PPM, schowek i przeciąganie zmian. */
.schedule-interaction-bar {
  display: flex;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 10px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible !important;
  color: #526985;
  font-size: .78rem;
}
.schedule-interaction-bar > span strong { color: #203c62; }
.schedule-clipboard-chip {
  display: flex;
  min-width: 0;
  padding: 6px 7px 6px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid #a9c9f4;
  border-radius: 10px;
  background: #edf5ff;
  color: #174579;
}
.schedule-clipboard-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-clipboard-chip .icon-button {
  width: 25px !important;
  min-width: 25px !important;
  height: 25px !important;
  min-height: 25px !important;
  padding: 0 !important;
}
.calendar-shift.draggable { cursor: grab; user-select: none; }
.calendar-shift.draggable:active { cursor: grabbing; }
.calendar-shift.dragging {
  opacity: .42;
  transform: scale(.97);
}
.schedule-page .month-day.drag-over {
  outline: 3px solid #2c7be5;
  outline-offset: -3px;
  background: #eaf4ff !important;
  box-shadow: inset 0 0 0 1px #fff;
}
.schedule-page .month-day.drag-over::after {
  content: "Upuść tutaj";
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #0b68e8;
  color: #fff;
  font-size: .63rem;
  font-weight: 850;
  pointer-events: none;
}
.schedule-context-menu {
  position: fixed;
  z-index: 5000;
  display: grid;
  width: 230px;
  padding: 7px;
  gap: 2px;
  border: 1px solid #b9cbe2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(31, 55, 88, .25);
}
.schedule-context-menu-title {
  display: grid;
  padding: 7px 9px 9px;
  gap: 2px;
  border-bottom: 1px solid #e3ebf5;
  margin-bottom: 3px;
}
.schedule-context-menu-title strong {
  overflow: hidden;
  color: #152d4c;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-context-menu-title span { color: #71829a; font-size: .68rem; }
.schedule-context-menu > button {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  padding: 7px 9px !important;
  align-items: center;
  justify-content: flex-start;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #233c5e !important;
  -webkit-text-fill-color: #233c5e !important;
  box-shadow: none !important;
  font-size: .76rem !important;
  text-align: left;
}
.schedule-context-menu > button:hover {
  background: #edf5ff !important;
  color: #0758d3 !important;
  -webkit-text-fill-color: #0758d3 !important;
}
.schedule-context-menu > button.primary-item {
  background: #eaf3ff !important;
  color: #0758d3 !important;
  -webkit-text-fill-color: #0758d3 !important;
  font-weight: 850;
}
.schedule-context-menu > button.danger-item {
  color: #bb2b2b !important;
  -webkit-text-fill-color: #bb2b2b !important;
}
.schedule-context-menu > button.danger-item:hover { background: #fff0f0 !important; }
.schedule-context-separator { height: 1px; margin: 4px 5px; background: #e3ebf5; }
.schedule-context-empty {
  padding: 8px 9px;
  color: #71829a;
  font-size: .68rem;
  line-height: 1.35;
}
:root[data-theme="dark"] .schedule-interaction-bar { color: #a8b8ce; }
:root[data-theme="dark"] .schedule-interaction-bar > span strong { color: #e4eefb; }
:root[data-theme="dark"] .schedule-clipboard-chip {
  border-color: #3d5d82;
  background: #142944;
  color: #d8e9ff;
}
:root[data-theme="dark"] .schedule-page .month-day.drag-over { background: #142b49 !important; }
:root[data-theme="dark"] .schedule-context-menu {
  border-color: #3c4f6a;
  background: #111b2b;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .48);
}
:root[data-theme="dark"] .schedule-context-menu-title { border-color: #2c3e56; }
:root[data-theme="dark"] .schedule-context-menu-title strong { color: #e8f1fc; }
:root[data-theme="dark"] .schedule-context-menu-title span,
:root[data-theme="dark"] .schedule-context-empty { color: #9eafc6; }
:root[data-theme="dark"] .schedule-context-menu > button {
  color: #dbe8f8 !important;
  -webkit-text-fill-color: #dbe8f8 !important;
}
:root[data-theme="dark"] .schedule-context-menu > button:hover { background: #1a2e49 !important; }
:root[data-theme="dark"] .schedule-context-menu > button.primary-item { background: #17385f !important; }
:root[data-theme="dark"] .schedule-context-separator { background: #2c3e56; }

@media (max-width: 720px) {
  .schedule-interaction-bar { align-items: stretch; flex-direction: column; }
  .schedule-clipboard-chip { width: 100%; }
}

.schedule-toolbar { align-items: flex-end; }
.schedule-toolbar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
@media (max-width: 1100px) {
  .schedule-toolbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .schedule-toolbar-actions { justify-content: stretch; }
  .schedule-toolbar-actions > * { flex: 1 1 160px; }
}

/* v2.63: tryb ciemny modułu SMS i SMS klienta */
:root[data-theme="dark"] .sms-tabs button,
:root[data-theme="dark"] .sms-template-list button { background: #111c2d; color: #e5edf8; border-color: #2c4160; }
:root[data-theme="dark"] .sms-tabs button.active,
:root[data-theme="dark"] .sms-template-list button.active { background: #1d5fbf; color: #fff; border-color: #4b91ed; }
:root[data-theme="dark"] .sms-phone-preview,
:root[data-theme="dark"] .sms-client-preview,
:root[data-theme="dark"] .client-sms-recipient,
:root[data-theme="dark"] .client-sms-preview { background: #0f1928; border-color: #2b4160; color: #e5edf8; }
:root[data-theme="dark"] .sms-preview-meta span,
:root[data-theme="dark"] .sms-placeholder-list code { background: #172842; color: #dbeafe; }
:root[data-theme="dark"] .sms-recipient-list > div,
:root[data-theme="dark"] .client-sms-message { border-color: #2a3e5a; background: #101a2a; }
:root[data-theme="dark"] .sms-settings-info .detail-list > div,
:root[data-theme="dark"] .sms-test-form { border-color: #293b55; }
:root[data-theme="dark"] .sms-template-list button span,
:root[data-theme="dark"] .client-sms-recipient span,
:root[data-theme="dark"] .client-sms-recipient small,
:root[data-theme="dark"] .client-sms-preview small,
:root[data-theme="dark"] .client-sms-message small { color: #9eb0c8; }

/* v2.65: wspólny kompaktowy układ i finalna warstwa kontrastu */
.module-toolbar,
.toolbar.card,
.filters-row.card,
.module-tabs.card,
.labels-tabbar.card,
.sms-control-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.module-toolbar > label,
.toolbar.card > label,
.filters-row.card > label {
  flex: 1 1 180px;
  min-width: 145px;
}
.module-toolbar .toolbar-actions,
.toolbar.card .toolbar-actions,
.filters-row.card .toolbar-actions,
.module-tabs.card .toolbar-actions,
.labels-tabbar.card .toolbar-actions {
  flex: 0 1 auto;
}
.schedule-clipboard-floating {
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.clients-module-toolbar .clients-scan-field {
  flex: 1 1 330px;
  max-width: 620px;
}
.clients-module-toolbar > button {
  align-self: flex-end;
}
.module-page > .success,
.module-page > .error,
.module-page > .warning {
  margin-bottom: 10px;
}

@media (max-width: 1050px) {
  .toolbar-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 700px) {
  .toolbar-actions > button { flex: 1 1 145px; }
  .clients-module-toolbar > button { flex: 1 1 120px; }
}

:root[data-theme="dark"] {
  --panel-page: #090f1b;
  --panel-surface: #121b2b;
  --panel-surface-soft: #182337;
  --panel-line: #3a4b67;
  --panel-line-strong: #526783;
  --panel-text: #f2f6fc;
  --panel-muted: #b4c1d3;
  --panel-primary: #246ac5;
  --panel-primary-hover: #2a73d2;
  --panel-primary-soft: #19345d;
  --panel-primary-line: #4d8ee7;
  --ui-border: #3a4b67;
  --ui-border-strong: #526783;
  --ui-surface-soft: #182337;
  --ui-surface-accent: #20304a;
  color: var(--panel-text);
  background: var(--panel-page);
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] .panel-workspace,
:root[data-theme="dark"] .content,
:root[data-theme="dark"] .module-page,
:root[data-theme="dark"] .nested-admin-page {
  color: var(--panel-text) !important;
  background: var(--panel-page) !important;
}
:root[data-theme="dark"] .panel-topbar {
  background: rgba(13, 20, 33, .97) !important;
  border-color: var(--panel-line) !important;
}
:root[data-theme="dark"] .panel-topbar span,
:root[data-theme="dark"] .sidebar-footer .profile-login,
:root[data-theme="dark"] .brand-block span {
  color: var(--panel-muted) !important;
}
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .subcard,
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .filters-row.card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .table-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .panel-state-card,
:root[data-theme="dark"] .client-detail-card,
:root[data-theme="dark"] .client-summary-card,
:root[data-theme="dark"] .client-scan-card,
:root[data-theme="dark"] .clients-list-panel,
:root[data-theme="dark"] .client-detail-panel,
:root[data-theme="dark"] .birthday-strip,
:root[data-theme="dark"] .sms-control-bar,
:root[data-theme="dark"] .sms-compose-card,
:root[data-theme="dark"] .sms-preview-card,
:root[data-theme="dark"] .sms-segment-card,
:root[data-theme="dark"] .sms-history-card,
:root[data-theme="dark"] .sms-settings-form,
:root[data-theme="dark"] .sms-settings-info,
:root[data-theme="dark"] .sms-template-form,
:root[data-theme="dark"] .sms-template-list,
:root[data-theme="dark"] .calendar-card,
:root[data-theme="dark"] .history-box,
:root[data-theme="dark"] .table-settings-panel,
:root[data-theme="dark"] .context-menu,
:root[data-theme="dark"] .column-picker,
:root[data-theme="dark"] .smart-autocomplete-menu,
:root[data-theme="dark"] .category-menu,
:root[data-theme="dark"] .dictionary-combo-menu {
  color: var(--panel-text) !important;
  background: var(--panel-surface) !important;
  border-color: var(--panel-line) !important;
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  color: #f7faff !important;
  background: #0d1626 !important;
  border-color: var(--panel-line-strong) !important;
  caret-color: #ffffff;
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #96a7bd !important;
  opacity: 1;
}
:root[data-theme="dark"] input:disabled,
:root[data-theme="dark"] select:disabled,
:root[data-theme="dark"] textarea:disabled,
:root[data-theme="dark"] [readonly] {
  color: #c4cfde !important;
  background: #121b2b !important;
  opacity: .86;
}
:root[data-theme="dark"] button:not(.danger):not(.secondary):not(.icon-button):not(.sidebar-nav-item):not(.sidebar-group-toggle):not(.profile-button) {
  background: var(--panel-primary) !important;
  color: #ffffff !important;
}
:root[data-theme="dark"] button:not(.danger):not(.secondary):not(.icon-button):not(.sidebar-nav-item):not(.sidebar-group-toggle):not(.profile-button):hover:not(:disabled) {
  background: var(--panel-primary-hover) !important;
}
:root[data-theme="dark"] button.secondary,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .file-picker-button,
:root[data-theme="dark"] .table-settings-header-button,
:root[data-theme="dark"] .filter-chip-remove {
  color: #eef5ff !important;
  background: #233149 !important;
  border-color: #526783 !important;
}
:root[data-theme="dark"] button.secondary:hover:not(:disabled),
:root[data-theme="dark"] .icon-button:hover:not(:disabled) {
  color: #ffffff !important;
  background: #2c3d58 !important;
  border-color: #6b82a1 !important;
}
:root[data-theme="dark"] button.danger,
:root[data-theme="dark"] .danger {
  color: #ffffff !important;
  background: #b4232f !important;
  border-color: #e35d69 !important;
}
:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] .data-table tbody td,
:root[data-theme="dark"] .table-card tbody td {
  color: #edf3fc !important;
  border-color: #33445f !important;
}
:root[data-theme="dark"] th,
:root[data-theme="dark"] .data-table thead th,
:root[data-theme="dark"] .table-card thead th {
  color: #dbe7f7 !important;
  background: #19243a !important;
  border-color: #40516c !important;
}
:root[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
:root[data-theme="dark"] .table-card tbody tr:nth-child(even) td {
  background: rgba(25, 36, 58, .42);
}
:root[data-theme="dark"] .data-table tbody tr:hover td,
:root[data-theme="dark"] .table-card tbody tr:hover td,
:root[data-theme="dark"] .selectable-row:hover td {
  background: #22314a !important;
}
:root[data-theme="dark"] .selected-row td,
:root[data-theme="dark"] .data-table .selected-row td {
  background: #183c69 !important;
  color: #ffffff !important;
}
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .subtext,
:root[data-theme="dark"] .small-note,
:root[data-theme="dark"] .cell-note,
:root[data-theme="dark"] .muted-table-value,
:root[data-theme="dark"] .modal-subtitle,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .summary-card small,
:root[data-theme="dark"] .client-list-item small,
:root[data-theme="dark"] .client-list-item span,
:root[data-theme="dark"] .sms-template-list button span,
:root[data-theme="dark"] .sms-preview-meta,
:root[data-theme="dark"] .toolbar-count {
  color: var(--panel-muted) !important;
}
:root[data-theme="dark"] .module-tabs,
:root[data-theme="dark"] .labels-tabbar,
:root[data-theme="dark"] .sms-tabs,
:root[data-theme="dark"] .client-tabs {
  background: var(--panel-surface) !important;
  border-color: var(--panel-line) !important;
}
:root[data-theme="dark"] .module-tabs button,
:root[data-theme="dark"] .labels-tabbar button,
:root[data-theme="dark"] .sms-tabs button,
:root[data-theme="dark"] .client-tabs button,
:root[data-theme="dark"] .sms-template-list button {
  color: #dbe7f7 !important;
  background: #182337 !important;
  border-color: #40516c !important;
}
:root[data-theme="dark"] .module-tabs button.active,
:root[data-theme="dark"] .labels-tabbar button.active,
:root[data-theme="dark"] .sms-tabs button.active,
:root[data-theme="dark"] .client-tabs button.active,
:root[data-theme="dark"] .sms-template-list button.active {
  color: #ffffff !important;
  background: #1f63c5 !important;
  border-color: #6aa5f3 !important;
}
:root[data-theme="dark"] .success {
  color: #c4f6d8 !important;
  background: #103224 !important;
  border-color: #3b9a6d !important;
}
:root[data-theme="dark"] .warning {
  color: #ffe8aa !important;
  background: #3a2b0b !important;
  border-color: #a97b1d !important;
}
:root[data-theme="dark"] .error,
:root[data-theme="dark"] .runtime-error-banner {
  color: #ffcaca !important;
  background: #3a171d !important;
  border-color: #b94b59 !important;
}
:root[data-theme="dark"] a,
:root[data-theme="dark"] .link-button {
  color: #8fc0ff !important;
}
:root[data-theme="dark"] .client-list-item,
:root[data-theme="dark"] .birthday-item,
:root[data-theme="dark"] .client-coupon-item,
:root[data-theme="dark"] .sms-recipient-list > div,
:root[data-theme="dark"] .client-sms-message,
:root[data-theme="dark"] .sms-phone-preview,
:root[data-theme="dark"] .sms-client-preview,
:root[data-theme="dark"] .client-sms-preview,
:root[data-theme="dark"] .client-info-grid > div,
:root[data-theme="dark"] .client-metrics-grid > div {
  color: var(--panel-text) !important;
  background: #101a2a !important;
  border-color: #354864 !important;
}
:root[data-theme="dark"] .client-list-item.active,
:root[data-theme="dark"] .client-list-item:hover,
:root[data-theme="dark"] .birthday-item:hover {
  background: #1d3556 !important;
  border-color: #5c8ed2 !important;
}
:root[data-theme="dark"] .modal-backdrop {
  background: rgba(1, 5, 13, .78) !important;
}
:root[data-theme="dark"] :focus-visible {
  outline: 3px solid #74adff !important;
  outline-offset: 2px;
}

/* v2.67: wspólne, pływające podsumowanie zaznaczonych rekordów. */
.floating-selection-summary {
  position: fixed;
  left: max(18px, calc((100vw - min(1500px, 100vw - 36px)) / 2));
  right: 18px;
  bottom: 18px;
  z-index: 1150;
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(17, 75, 166, .24);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 52px rgba(18, 38, 77, .22);
  backdrop-filter: blur(12px);
}
.floating-selection-summary.is-moved {
  right: auto;
  bottom: auto;
  width: min(1500px, calc(100vw - 16px));
  margin: 0;
}
.floating-selection-summary.is-dragging {
  user-select: none;
  box-shadow: 0 24px 64px rgba(18, 38, 77, .3);
}
.floating-selection-summary-spacer {
  width: 100%;
  min-height: 0;
  pointer-events: none;
}
.floating-selection-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.floating-selection-summary-drag-handle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.floating-selection-summary-drag-handle.is-draggable {
  flex: 1 1 auto;
  padding: 3px 6px 3px 2px;
  border-radius: 9px;
  cursor: grab;
  touch-action: none;
}
.floating-selection-summary-drag-handle.is-draggable:hover {
  background: rgba(11, 94, 215, .07);
}
.floating-selection-summary.is-dragging .floating-selection-summary-drag-handle { cursor: grabbing; }
.floating-selection-summary-drag-icon {
  color: var(--panel-muted);
  font-size: 1.15rem !important;
  line-height: 1;
  letter-spacing: -.16em !important;
}
.floating-selection-summary-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}
.floating-selection-summary-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.floating-selection-summary-header span,
.floating-selection-summary-item span {
  color: var(--panel-muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.floating-selection-summary-header strong { color: var(--panel-text); }
.floating-selection-summary-body {
  max-height: calc(100vh - 112px);
  overflow: auto;
  overscroll-behavior: contain;
}
.floating-selection-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: stretch;
  gap: 10px;
  overflow: visible;
  padding-bottom: 2px;
}
.floating-selection-summary-item {
  display: grid;
  min-width: 0;
  min-height: 60px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-surface-soft);
}
.floating-selection-summary-item span,
.floating-selection-summary-item strong { display: block; }
.floating-selection-summary-item span {
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.floating-selection-summary-item strong {
  margin-top: 3px;
  color: var(--panel-text);
  white-space: nowrap;
}
.floating-selection-summary-item.negative strong { color: var(--panel-danger, #b42318); }
.floating-selection-summary-item.positive strong { color: var(--panel-success, #087443); }
.floating-selection-summary-item.muted strong { color: var(--panel-muted); }
.floating-selection-summary-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
}
.floating-selection-summary.is-collapsed {
  padding-top: 10px;
  padding-bottom: 10px;
}
.floating-selection-summary.is-collapsed .floating-selection-summary-header { margin-bottom: 0; }
.order-total-distribution {
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  align-items: end;
  gap: 10px 16px;
}
.order-total-distribution > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: var(--panel-text);
  font-size: .78rem;
  font-weight: 800;
}
.order-total-gross-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel-surface);
}
.order-total-gross-control:focus-within {
  border-color: var(--panel-primary, #0b5ed7);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, .12);
}
.order-total-gross-control input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 10px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--panel-text);
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
}
.order-total-gross-control > strong {
  padding: 0 11px 0 6px;
  color: var(--panel-text);
  white-space: nowrap;
}
.order-total-distribution > small {
  align-self: center;
  color: var(--panel-muted);
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.35;
}
.floating-selection-summary.inline {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  max-width: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  box-shadow: none;
  backdrop-filter: none;
}
.floating-selection-summary.inline .floating-selection-summary-header { margin-bottom: 10px; }
.floating-selection-summary.inline .floating-selection-summary-body {
  max-height: none;
  overflow: visible;
}
:root[data-theme="dark"] .floating-selection-summary {
  border-color: rgba(111, 168, 255, .34);
  background: rgba(16, 25, 43, .97);
  box-shadow: 0 20px 58px rgba(0, 0, 0, .48);
}
:root[data-theme="dark"] .floating-selection-summary-item {
  border-color: rgba(147, 174, 215, .24);
  background: rgba(37, 51, 76, .92);
}
@media (max-width: 760px) {
  .floating-selection-summary { left: 8px; right: 8px; bottom: 8px; padding: 12px; border-radius: 14px; }
  .floating-selection-summary.is-moved { right: auto; width: calc(100vw - 16px); }
  .floating-selection-summary-header { align-items: flex-start; flex-wrap: wrap; }
  .floating-selection-summary-title { display: block; }
  .floating-selection-summary-actions { justify-content: flex-start; }
  .floating-selection-summary-header .compact { padding: 7px 9px; }
  .floating-selection-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floating-selection-summary-item { min-width: 0; padding: 8px 10px; }
  .floating-selection-summary.is-collapsed .floating-selection-summary-header { align-items: center; }
  .order-total-distribution { grid-template-columns: 1fr; align-items: stretch; }
}

/* v2.67: powiązania sprzedaży online z raportem fiskalnym. */
.online-preview-table-wrap {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-surface-soft);
}
.online-link-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.online-link-table { min-width: 820px; }
.online-link-table td:first-child,
.online-link-table th:first-child { width: 42px; text-align: center; }
.online-link-table tr.selected-row td { background: rgba(35, 105, 210, .1); }
:root[data-theme="dark"] .online-preview-table-wrap {
  border-color: #3d5272;
  background: #111d2f;
}
:root[data-theme="dark"] .online-link-table tr.selected-row td {
  color: #f5f9ff;
  background: #1e3b62 !important;
}
:root[data-theme="dark"] .online-link-table input[type="checkbox"] { accent-color: #78adff; }


/* v2.71: podsumowania w modalach nie mogą zasłaniać przycisków akcji. */
.modal .floating-selection-summary {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100%;
  max-width: none !important;
  margin: 14px 0 0 !important;
  padding: 12px 14px;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Przyciski zapisu pozostają widoczne podczas przewijania długiego formularza. */
.modal .modal-actions {
  position: sticky;
  bottom: -18px;
  z-index: 35;
  margin: 16px -18px -18px;
  padding: 13px 18px 18px;
  border-top: 1px solid var(--panel-border);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--panel-surface) 88%, transparent), var(--panel-surface) 20%);
  box-shadow: 0 -10px 20px color-mix(in srgb, var(--panel-text) 8%, transparent);
}

/* Wszystkie modale można przesuwać za nagłówek. */
.modal-header {
  cursor: grab;
  touch-action: none;
}
.modal-header :is(button, a, input, select, textarea, label) {
  cursor: auto;
}
.modal.is-dragging,
.modal.is-dragging .modal-header {
  cursor: grabbing !important;
  transition: none !important;
  will-change: transform;
}
html.modal-dragging,
html.modal-dragging * {
  user-select: none !important;
}
html.modal-scroll-locked,
html.modal-scroll-locked body {
  overflow: hidden !important;
}
:root[data-theme="dark"] .modal .modal-actions {
  border-top-color: rgba(147, 174, 215, .24);
  background: linear-gradient(to bottom, rgba(16, 25, 43, .86), rgba(16, 25, 43, 1) 22%);
  box-shadow: 0 -12px 24px rgba(0, 0, 0, .3);
}
@media (max-width: 760px) {
  .modal-header { cursor: default; touch-action: auto; }
  .modal .modal-actions {
    bottom: -12px;
    margin: 14px -12px -12px;
    padding: 12px;
  }
}

/* v2.76: panel mobile-first — telefon jest podstawowym narzędziem pracownika. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sidebar-mobile-close,
.mobile-table-controls,
.mobile-row-actions-column,
.mobile-row-actions-cell,
.month-day-mobile-label {
  display: none;
}

.schedule-page .calendar-layout {
  /* Kalendarz ma zajmować główną szerokość, a podsumowanie wąską kolumnę po prawej.
     Element kalendarza ma order: 1, podsumowanie order: 2. */
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
}

.month-day-heading,
.month-day-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.calendar-day-menu-button,
.calendar-shift-menu-button {
  display: grid !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  place-items: center;
  border-radius: 9px !important;
  font-size: 1rem;
  line-height: 1;
}

.calendar-shift-wrap {
  position: relative;
  min-width: 0;
}

.calendar-shift-wrap .calendar-shift {
  padding-right: 36px !important;
}

.calendar-shift-menu-button {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 5px;
}

.table-settings-sort {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: var(--panel-surface-soft);
}

.table-settings-sort-direction {
  display: flex;
  gap: 6px;
}

.table-settings-sort-direction button {
  min-height: 38px;
}

:root[data-theme="dark"] .table-settings-sort {
  background: #0f1928;
  border-color: #354762;
}

@media (max-width: 900px) {
  html.sidebar-scroll-locked,
  html.sidebar-scroll-locked body {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .sidebar {
    width: min(320px, 90vw);
    padding-top: max(13px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .sidebar-mobile-close {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 11px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 1.5rem;
  }

  .panel-topbar {
    min-height: 60px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .panel-topbar > div:first-of-type {
    min-width: 0;
  }

  .panel-topbar > div:first-of-type strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }

  .schedule-page .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--panel-line);
    background: var(--panel-surface-soft);
  }

  .mobile-table-controls span {
    color: var(--panel-muted);
    font-size: .76rem;
    line-height: 1.35;
  }

  .mobile-table-controls button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .table-card,
  .data-table-wrapper {
    max-width: 100%;
    overflow: hidden !important;
  }

  .table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
  }

  .table-scroll:focus-visible {
    outline: 3px solid rgba(7, 88, 211, .24);
    outline-offset: -3px;
  }

  .table-scroll > .data-table {
    width: 100%;
    min-width: max(100%, var(--mobile-table-min-width, 680px)) !important;
  }

  .data-table th {
    cursor: default;
  }

  .column-resize-handle,
  .row-resize-handle {
    display: none !important;
  }

  .mobile-row-actions-column {
    display: table-column;
    width: 54px !important;
  }

  .mobile-row-actions-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    display: table-cell;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    padding: 5px !important;
    background: var(--panel-surface) !important;
    text-align: center;
  }

  thead .mobile-row-actions-cell {
    z-index: 4;
    background: var(--panel-surface-soft) !important;
  }

  .mobile-row-actions-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    font-size: 1.3rem;
    line-height: 1;
  }

  .pagination-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
  }

  .pagination-controls {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .pagination-info {
    align-self: center;
  }

  .page-size-control {
    min-width: 116px !important;
    max-width: 145px !important;
  }

  .context-menu,
  .schedule-context-menu {
    position: fixed !important;
    z-index: 6000 !important;
    inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70dvh, 560px);
    overflow-y: auto;
    padding: 9px;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(8, 18, 38, .32);
  }

  .context-menu button,
  .schedule-context-menu > button {
    min-height: 48px !important;
    padding: 11px 12px !important;
    font-size: .88rem !important;
  }

  .table-settings-backdrop,
  .modal-backdrop {
    padding: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom));
  }

  .table-settings-panel {
    width: min(560px, 100%);
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .modal {
    width: min(980px, 100%) !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    overscroll-behavior: contain;
  }

  .modal .modal-header {
    position: sticky;
    top: -1px;
    z-index: 40;
    padding-top: 2px;
    background: var(--panel-surface);
  }

  .modal .modal-actions {
    bottom: -12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .admin-section-nav,
  .module-tabs,
  .admin-tabs,
  .online-status-tabs,
  .packaging-tabs,
  .labels-tabbar,
  .client-tabs,
  .sms-tabs {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .admin-section-group,
  .module-tabs > *,
  .admin-tabs > *,
  .online-status-tabs > *,
  .packaging-tabs > *,
  .labels-tabbar > *,
  .client-tabs > *,
  .sms-tabs > * {
    flex: 0 0 auto;
  }

  .schedule-page .month-calendar-card {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .schedule-page .month-calendar-card {
    padding: 10px;
    overflow: visible;
  }

  .schedule-page .month-calendar-weekdays {
    display: none;
  }

  .schedule-page .month-calendar-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 0;
  }

  .schedule-page .month-day.empty {
    display: none;
  }

  .schedule-page .month-day,
  .schedule-page .month-day.sunday {
    min-height: 0;
    padding: 10px;
    gap: 8px;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
  }

  .schedule-page .month-day-number {
    gap: 8px;
  }

  .month-day-heading {
    flex: 1;
  }

  .month-day-mobile-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--panel-text);
    font-size: .86rem;
    font-weight: 850;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
  }

  .calendar-add-button,
  .calendar-day-menu-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .calendar-shift-wrap .calendar-shift {
    min-height: 58px !important;
    padding: 10px 52px 10px 11px !important;
  }

  .calendar-shift-menu-button {
    top: 8px;
    right: 8px;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .calendar-shift strong {
    font-size: .88rem;
  }

  .calendar-shift span,
  .calendar-shift small {
    font-size: .8rem;
  }
}

@media (max-width: 620px) {
  .panel-topbar > div:first-of-type span {
    display: none;
  }

  .panel-topbar > div:first-of-type strong {
    font-size: .92rem;
  }

  .mobile-table-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-table-controls button {
    width: 100%;
  }

  .summary-grid,
  .client-summary-grid,
  .client-metrics-grid,
  .client-info-grid,
  .sms-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  }

  .toolbar,
  .filters-row,
  .compact-filter-bar,
  .goods-filter-bar {
    align-items: stretch;
  }

  .toolbar > label,
  .filters-row > label,
  .compact-filter-bar > label,
  .goods-filter-bar > label {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .page-header .actions,
  .page-header .header-actions,
  .section-header-row .actions,
  .modal-actions {
    width: 100%;
  }

  .page-header .actions > button,
  .page-header .header-actions > button,
  .section-header-row .actions > button {
    flex: 1 1 140px;
  }

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

  .modal-actions > button,
  .modal-actions > .button-link {
    width: 100%;
    min-width: 0;
  }

  .table-settings-sort {
    grid-template-columns: 1fr;
  }

  .table-settings-sort-direction > button {
    flex: 1;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    min-height: 46px;
    font-size: 16px !important;
  }

  textarea {
    min-height: 92px;
  }

  .quick-edit-confirm {
    grid-template-columns: minmax(150px, 1fr);
  }

  .quick-edit-actions {
    justify-content: flex-end;
  }

  .photo-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-actions button {
    width: 100% !important;
  }
}

@media (pointer: coarse) {
  button,
  .button-link,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select {
    min-height: 44px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
  }

  .sidebar-nav-item,
  .sidebar-group-toggle,
  .profile-button {
    min-height: 46px;
  }

  .icon-button,
  .password-toggle,
  .row-expander-button,
  .quick-edit-actions button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .calendar-add-button,
  .calendar-day-menu-button,
  .calendar-shift-menu-button,
  .mobile-row-actions-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .table-checkbox-cell,
  .selection-cell,
  .column-toggle {
    min-height: 44px;
  }
}

/* v302 — końcowy audyt kontrastu: tworzenie i edycja towaru */
.online-add-modal.goods-form-compact {
  color: #142033 !important;
}
.online-add-modal.goods-form-compact :is(
  legend,
  label,
  .field-label,
  h2,
  h3,
  h4,
  .description-meta-row strong,
  .pricing-cost-summary strong
) {
  color: #17345c !important;
}
.online-add-modal.goods-form-compact :is(.subtext, small, .description-meta-row small) {
  color: #667d99 !important;
}

/* Elementy menu muszą ustawiać kolor także na dzieciach. Wcześniej tekst
   <span> dziedziczył biały kolor zwykłego przycisku na jasnym tle. */
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option) {
  background: #f7faff !important;
  border-color: #d9e4f2 !important;
  color: #17345c !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option) :is(span, strong) {
  color: #17345c !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option) small {
  color: #58708f !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:hover:not(.dictionary-add-option) {
  background: #eaf1ff !important;
  border-color: #9abfff !important;
  color: #0c4ca9 !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:hover:not(.dictionary-add-option) :is(span, strong) {
  color: #0c4ca9 !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:hover:not(.dictionary-add-option) small {
  color: #315f9d !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button.active:not(.dictionary-add-option),
.online-add-modal.goods-form-compact :is(
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active
) {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
}
:is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button.active:not(.dictionary-add-option) :is(span, strong, small),
.online-add-modal.goods-form-compact :is(
  .condition-choice-visible button.active,
  .visible-flaws .flaw-option-card.active,
  .choice-chip-grid button.active,
  .flaw-chip-grid button.active
) :is(span, strong, small) {
  color: #ffffff !important;
}
.online-add-modal.goods-form-compact :is(
  .condition-choice-visible button:not(.active),
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) {
  background: #f7faff !important;
  border: 1px solid #c4d5ee !important;
  color: #17345c !important;
}
.online-add-modal.goods-form-compact :is(
  .condition-choice-visible button:not(.active),
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) :is(span, strong) {
  color: #17345c !important;
}
.online-add-modal.goods-form-compact :is(
  .condition-choice-visible button:not(.active),
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) small {
  color: #58708f !important;
}
.dictionary-combo-menu .dictionary-add-option {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}
.dictionary-combo-menu .dictionary-add-option :is(span, strong, small) {
  color: #047857 !important;
}
.online-add-modal.goods-form-compact select option {
  color: #132b4c;
  background: #ffffff;
}

/* Ustawienia SMSAPI — czytelne objaśnienia i ostrzeżenie trybu symulacji. */
.sms-setting-option {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px !important;
  align-items: start !important;
  padding: 9px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 11px;
  background: var(--panel-surface-soft);
}
.sms-setting-option input {
  grid-row: 1 / span 2;
  margin-top: 1px !important;
}
.sms-setting-option > span {
  color: var(--panel-text) !important;
  font-weight: 850;
}
.sms-setting-option > small {
  color: var(--panel-muted) !important;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.4;
}
.sms-test-mode-warning {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid #f1c66b;
  border-radius: 11px;
  background: #fff8e7;
  color: #754c00;
  font-weight: 750;
  line-height: 1.45;
}

:root[data-theme="dark"] .online-add-modal.goods-form-compact {
  color: #edf3fc !important;
}
:root[data-theme="dark"] .online-add-modal.goods-form-compact :is(
  legend,
  label,
  .field-label,
  h2,
  h3,
  h4,
  .description-meta-row strong,
  .pricing-cost-summary strong
) {
  color: #edf3fc !important;
}
:root[data-theme="dark"] .online-add-modal.goods-form-compact :is(.subtext, small, .description-meta-row small) {
  color: #a9bad1 !important;
}
:root[data-theme="dark"] :is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option),
:root[data-theme="dark"] .online-add-modal.goods-form-compact :is(
  .condition-choice-visible button:not(.active),
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) {
  background: #172033 !important;
  border-color: #354762 !important;
  color: #dbe7f7 !important;
}
:root[data-theme="dark"] :is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option) :is(span, strong),
:root[data-theme="dark"] .online-add-modal.goods-form-compact :is(
  .condition-choice-visible button:not(.active),
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) :is(span, strong) {
  color: #dbe7f7 !important;
}
:root[data-theme="dark"] :is(.category-menu, .smart-autocomplete-menu, .dictionary-combo-menu, .goods-lot-menu)
  button:not(.active):not(:hover):not(.dictionary-add-option) small,
:root[data-theme="dark"] .online-add-modal.goods-form-compact :is(
  .visible-flaws .flaw-option-card:not(.active),
  .choice-chip-grid button:not(.active),
  .flaw-chip-grid button:not(.active)
) small {
  color: #a9bad1 !important;
}
:root[data-theme="dark"] .dictionary-combo-menu .dictionary-add-option {
  background: #12372f !important;
  border-color: #257a62 !important;
  color: #a7f3d0 !important;
}
:root[data-theme="dark"] .dictionary-combo-menu .dictionary-add-option :is(span, strong, small) {
  color: #a7f3d0 !important;
}
:root[data-theme="dark"] .online-add-modal.goods-form-compact select option {
  color: #f7faff;
  background: #0d1626;
}
:root[data-theme="dark"] .sms-test-mode-warning {
  border-color: #8f6a21;
  background: #2d2412;
  color: #f8d58a;
}

/* v3.06 — ujednolicenie ustawień API, uprawnień, słowników, klientów i ewidencji */

/* Wspólne kontrasty przycisków i kontrolek. */
button,
.button-link,
.file-picker-button {
  -webkit-text-fill-color: currentColor;
}
button:not(:disabled) {
  opacity: 1;
}
button:disabled {
  opacity: .56;
}
button:not(.secondary):not(.danger):not(.icon-button):not(.sidebar-nav-item):not(.sidebar-group-toggle):not(.profile-button):not(.permission-group):not(.client-list-item):not(.birthday-item):not(.definition-list button):not(.admin-tabs button) {
  background: linear-gradient(135deg, #0b67e8 0%, #0757cf 100%) !important;
  border: 1px solid #0757cf !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
button:not(.secondary):not(.danger):not(.icon-button):not(.sidebar-nav-item):not(.sidebar-group-toggle):not(.profile-button):not(.permission-group):not(.client-list-item):not(.birthday-item):not(.definition-list button):not(.admin-tabs button):hover:not(:disabled) {
  background: linear-gradient(135deg, #075ad2 0%, #0648b5 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
button.secondary,
.secondary,
.file-picker-button {
  background: #f7faff !important;
  border: 1px solid #bfd2ec !important;
  color: #143e73 !important;
  -webkit-text-fill-color: #143e73 !important;
}
button.secondary:hover:not(:disabled),
.secondary:hover:not(:disabled),
.file-picker-button:hover:not(:disabled) {
  background: #eaf2ff !important;
  border-color: #83aff0 !important;
  color: #0a4da9 !important;
  -webkit-text-fill-color: #0a4da9 !important;
}
button.danger,
.danger {
  background: #fff3f2 !important;
  border: 1px solid #efb6b1 !important;
  color: #a51f17 !important;
  -webkit-text-fill-color: #a51f17 !important;
}

/* Stały, czytelny checkbox. */
input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px;
  accent-color: #0758d3;
}
.compact-checkbox:not(.sms-setting-option),
.checkbox-label,
.client-consents label,
.brand-replace-checkbox {
  display: flex !important;
  min-height: 44px;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid #d5e1f0 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  color: #17345c !important;
  line-height: 1.35;
}
.compact-checkbox:not(.sms-setting-option) > span,
.checkbox-label > span,
.client-consents label > span {
  color: inherit !important;
}
.compact-checkbox:not(.sms-setting-option):has(input:checked),
.checkbox-label:has(input:checked),
.client-consents label:has(input:checked) {
  border-color: #8ab7f4 !important;
  background: #edf5ff !important;
}
.danger-check {
  border-color: #efc1bd !important;
  background: #fff7f6 !important;
  color: #9b241b !important;
}

/* Ustawienia API — wspólny, stabilny układ. */
.admin-subpage,
.admin-section,
.admin-module-page {
  min-width: 0;
}
.compact-infakt-card,
.openai-settings-form,
.sms-settings-form,
.sms-settings-info {
  padding: 18px !important;
  gap: 14px !important;
  border-radius: 16px !important;
  overflow: visible !important;
}
.compact-infakt-card,
.openai-settings-form {
  width: min(100%, 1080px);
}
.api-status-lamp {
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center !important;
  gap: 3px 10px !important;
  min-height: 58px;
  padding: 12px 14px !important;
  border-radius: 13px !important;
}
.api-status-lamp .lamp-dot {
  width: 12px !important;
  height: 12px !important;
  margin: 0 !important;
}
.api-status-lamp > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.api-status-lamp > div > span {
  color: #5e718d !important;
  font-size: .68rem !important;
  font-weight: 900 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.api-status-lamp > div > strong {
  color: #132d4f !important;
  overflow-wrap: anywhere;
  font-size: .86rem;
  line-height: 1.35;
}
.api-status-lamp.ok {
  border: 1px solid #9fe7bd !important;
  background: #effcf4 !important;
}
.api-status-lamp.error {
  border: 1px solid #f0b8b4 !important;
  background: #fff4f3 !important;
}
.api-status-lamp.checking {
  border: 1px solid #bad7ff !important;
  background: #f0f6ff !important;
}
.infakt-grid,
.openai-settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.infakt-grid .wide-field,
.openai-settings-form .wide-field {
  grid-column: 1 / -1;
}
.settings-info-card,
.settings-status {
  min-width: 0;
  min-height: 64px;
  padding: 12px 14px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
}
.settings-info-card span,
.settings-status span {
  color: #647995 !important;
}
.settings-info-card strong,
.settings-status strong {
  color: #142f52 !important;
}
.settings-hint {
  padding: 12px 14px !important;
  border: 1px solid #cfe0f8 !important;
  border-radius: 12px !important;
  background: #edf4ff !important;
  color: #17477f !important;
  line-height: 1.45;
}
.compact-infakt-card .modal-actions,
.openai-settings-form .modal-actions {
  justify-content: flex-end;
  gap: 9px;
}

/* SMSAPI — mniej technicznych danych, czytelne opcje i test. */
.sms-two-column.settings-layout {
  display: grid !important;
  grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr) !important;
  align-items: start;
  gap: 16px !important;
}
.sms-settings-form,
.sms-settings-info {
  min-width: 0;
}
.sms-settings-form > label:not(.sms-setting-option) {
  display: grid;
  gap: 6px;
}
.sms-setting-option {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  align-items: start !important;
  gap: 3px 10px !important;
  min-height: 62px;
  padding: 11px 12px !important;
  border: 1px solid #d6e2f1 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  cursor: pointer;
}
.sms-setting-option input {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin-top: 2px !important;
}
.sms-setting-option > span,
.sms-setting-option > small {
  grid-column: 2;
  min-width: 0;
}
.sms-setting-option > span {
  color: #17345c !important;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.3;
}
.sms-setting-option > small {
  color: #637a98 !important;
  font-size: .69rem;
  font-weight: 650;
  line-height: 1.45;
}
.sms-setting-option:has(input:checked) {
  border-color: #8ab7f4 !important;
  background: #edf5ff !important;
}
.sms-settings-form .actions,
.sms-settings-info .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.sms-settings-info > h3 {
  margin: 0 0 2px;
}
.sms-settings-info .detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 0 !important;
}
.sms-settings-info .detail-list > div {
  min-width: 0;
  display: grid !important;
  gap: 4px;
  padding: 10px 11px !important;
  border: 1px solid #dce7f4 !important;
  border-radius: 10px;
  background: #fafcff;
}
.sms-settings-info .detail-list > div span {
  color: #6a7f99 !important;
  font-size: .67rem;
  font-weight: 800;
}
.sms-settings-info .detail-list > div strong {
  color: #18365e !important;
  overflow-wrap: anywhere;
  font-size: .78rem;
}
.sms-test-form {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr);
  gap: 10px 12px;
  padding: 14px !important;
  border: 1px solid #d7e3f2 !important;
  border-radius: 13px;
  background: #f8fbff;
}
.sms-test-form h4 {
  grid-column: 1 / -1;
  margin: 0;
  color: #17345c;
}
.sms-test-form > button {
  grid-column: 1 / -1;
  justify-self: end;
}

/* Użytkownicy i uprawnienia. */
.user-modal {
  width: min(1120px, calc(100vw - 28px)) !important;
  max-width: 1120px !important;
}
.permission-editor {
  display: grid !important;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 14px !important;
}
.permission-groups {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: start;
  gap: 7px !important;
}
.permission-group {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px !important;
  padding: 9px 11px !important;
  border: 1px solid #d6e2f0 !important;
  border-radius: 11px !important;
  background: #f8fbff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  box-shadow: none !important;
  text-align: left;
}
.permission-group > span,
.permission-group > small {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
.permission-group > span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 850;
}
.permission-group > small {
  min-width: 38px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #e6eef9;
  text-align: center;
}
.permission-group:hover:not(.active) {
  border-color: #8db8f3 !important;
  background: #edf5ff !important;
  color: #0b4fae !important;
  -webkit-text-fill-color: #0b4fae !important;
}
.permission-group.active,
.permission-groups .permission-group.active {
  border-color: #0758d3 !important;
  background: linear-gradient(135deg, #0b67e8 0%, #0757cf 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.permission-group.active > small {
  background: rgba(255,255,255,.2);
  color: #ffffff !important;
}
.permission-panel {
  min-width: 0;
  padding: 14px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 13px;
  background: #ffffff;
}
.permission-panel-header {
  min-width: 0;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #e4ecf6;
  margin-bottom: 10px;
}
.permission-panel-header strong {
  color: #17345c !important;
  font-size: .92rem;
}
.permission-panel-header small {
  color: #667d99 !important;
  line-height: 1.4;
}
.permission-panel-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px;
}
.permission-panel-actions .small-button {
  min-height: 36px !important;
  padding: 7px 10px !important;
  color: #143e73 !important;
  -webkit-text-fill-color: #143e73 !important;
}
.permission-item {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center !important;
  gap: 10px !important;
  min-height: 45px;
  padding: 9px 11px !important;
  border: 1px solid #dce6f2 !important;
  border-radius: 10px !important;
  background: #f9fbfe !important;
  color: #17345c !important;
}
.permission-item + .permission-item {
  margin-top: 7px;
}
.permission-item > span {
  color: inherit !important;
  font-weight: 720;
  line-height: 1.35;
}
.permission-item:has(input:checked) {
  border-color: #8ab7f4 !important;
  background: #edf5ff !important;
}

/* Słowniki — formularze i listy wyboru. */
.dictionary-form-modal {
  width: min(1100px, calc(100vw - 28px)) !important;
  max-width: 1100px !important;
}
.dictionary-form-modal > form.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 13px !important;
}
.dictionary-form-modal .wide-field {
  grid-column: 1 / -1;
}
.category-list-editor,
.category-choice-picker,
.measurement-template-editor {
  min-width: 0;
  padding: 13px !important;
  border: 1px solid #d7e3f2 !important;
  border-radius: 13px;
  background: #f9fbfe;
}
.choice-picker-header {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}
.choice-picker-header strong {
  color: #17345c !important;
  font-size: .82rem;
}
.choice-picker-header small {
  color: #667d99 !important;
  line-height: 1.45;
}
.checkbox-chip-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px !important;
}
.listing-channel-checkbox {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center !important;
  gap: 9px !important;
  min-height: 42px;
  padding: 9px 10px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #17345c !important;
}
.listing-channel-checkbox > span {
  color: inherit !important;
  font-weight: 720;
}
.listing-channel-checkbox:has(input:checked) {
  border-color: #80aff2 !important;
  background: #edf5ff !important;
}
.list-editor-presets,
.choice-add-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
}
.list-editor-presets button,
.choice-add-row button,
.dimension-editor-row button {
  color: #143e73 !important;
  -webkit-text-fill-color: #143e73 !important;
}
.dimension-editor-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px !important;
  padding: 9px 0;
  border-bottom: 1px solid #e5edf7;
}
.dimension-editor-row:last-child {
  border-bottom: 0;
}

/* Klienci — czytelniejsza hierarchia i ergonomia. */
.clients-page {
  display: grid;
  gap: 14px;
}
.clients-page-header {
  margin: 0 !important;
  padding: 2px 2px 0;
}
.clients-page-header h2 {
  margin: 0 0 4px;
}
.clients-page-header p {
  margin: 0;
}
.clients-module-toolbar {
  padding: 14px !important;
  align-items: end !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}
.clients-module-toolbar .clients-scan-field {
  flex: 1 1 360px !important;
  max-width: 680px !important;
}
.clients-module-toolbar .toolbar-actions {
  margin-left: auto;
}
.client-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(145px, 1fr)) !important;
  gap: 10px !important;
}
.client-summary-card {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 15px !important;
  border: 1px solid #d7e3f2 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(26,64,112,.055) !important;
}
.client-summary-card span,
.client-summary-card small {
  color: #657a96 !important;
}
.client-summary-card strong {
  color: #15345c !important;
  font-size: 1.35rem;
}
.birthday-strip {
  padding: 13px 14px !important;
}
.birthday-strip-header p {
  margin: 2px 0 0;
}
.birthday-list {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px !important;
}
.birthday-item {
  min-width: 0;
  display: grid !important;
  gap: 3px;
  padding: 10px 11px !important;
  border: 1px solid #d7e3f2 !important;
  border-radius: 11px !important;
  background: #f8fbff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  text-align: left;
}
.birthday-item strong,
.birthday-item span {
  color: inherit !important;
}
.clients-workspace {
  display: grid !important;
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.78fr) !important;
  align-items: start !important;
  gap: 14px !important;
}
.clients-list-panel,
.client-detail-panel {
  min-width: 0;
  padding: 0 !important;
  overflow: hidden !important;
}
.clients-filter-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  padding: 14px !important;
  border-bottom: 1px solid #e2eaf5;
  background: #f8fbff;
}
.clients-filter-row > input {
  grid-column: 1 / -1;
}
.clients-filter-row > select:last-of-type {
  grid-column: 1 / -1;
}
.clients-filter-row > button {
  grid-column: 1 / -1;
  justify-self: stretch;
}
.clients-list-count {
  padding: 9px 14px !important;
  border-bottom: 1px solid #e6edf6;
  background: #ffffff;
  color: #657a96 !important;
  font-size: .72rem;
  font-weight: 800;
}
.clients-list {
  min-height: 440px;
  max-height: calc(100vh - 410px) !important;
  overflow-y: auto;
  padding: 8px !important;
  background: #ffffff;
}
.client-list-item {
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 11px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: #17345c !important;
  -webkit-text-fill-color: #17345c !important;
  box-shadow: none !important;
  text-align: left;
}
.client-list-item + .client-list-item {
  margin-top: 4px;
}
.client-list-item:hover {
  border-color: #b8d1f2 !important;
  background: #f3f8ff !important;
}
.client-list-item.active {
  border-color: #70a8ef !important;
  background: #e9f3ff !important;
  color: #0c438e !important;
  -webkit-text-fill-color: #0c438e !important;
}
.client-list-item :is(strong,b,span,small) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
.client-list-main,
.client-list-stats {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.client-list-main small,
.client-list-stats small {
  color: #6b8099 !important;
}
.client-list-stats {
  text-align: right;
}
.client-detail-panel {
  min-height: 560px;
  background: #ffffff !important;
}
.client-empty-detail {
  min-height: 560px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: #677d98;
  text-align: center;
}
.client-detail-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px !important;
  border-bottom: 1px solid #dfe8f3;
  background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
}
.client-detail-header h3 {
  color: #15345c !important;
  font-size: 1.22rem;
}
.client-detail-header p {
  color: #647b98 !important;
}
.client-points-box {
  min-width: 130px;
  padding: 10px 13px !important;
  border: 1px solid #a9c9f4;
  border-radius: 12px;
  background: #ffffff;
  text-align: right;
}
.client-points-box span {
  color: #657a96 !important;
}
.client-points-box strong {
  color: #0a4ea9 !important;
}
.client-quick-actions {
  display: grid;
  gap: 10px;
  padding: 14px 18px 15px;
  border-bottom: 1px solid #dfe8f3;
  background: #ffffff;
}
.client-quick-actions-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.client-quick-actions-header > div {
  display: grid;
  gap: 2px;
}
.client-quick-actions-header strong {
  color: #15345c !important;
  font-size: .94rem;
}
.client-quick-actions-header span,
.client-quick-actions-header small {
  color: #687d97 !important;
  font-size: .74rem;
}
.client-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.client-quick-action {
  min-width: 0;
  min-height: 68px;
  display: grid !important;
  align-content: center;
  justify-items: start;
  gap: 4px;
  padding: 10px 12px !important;
  border: 1px solid #c8daf0 !important;
  border-radius: 11px !important;
  background: #f6faff !important;
  color: #15345c !important;
  -webkit-text-fill-color: #15345c !important;
  box-shadow: none !important;
  text-align: left;
}
.client-quick-action:hover:not(:disabled) {
  border-color: #76a8e8 !important;
  background: #eaf4ff !important;
  transform: translateY(-1px);
}
.client-quick-action.primary {
  border-color: #0758d3 !important;
  background: #0758d3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.client-quick-action.primary:hover:not(:disabled) {
  background: #064db8 !important;
}
.client-quick-action strong,
.client-quick-action span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
.client-quick-action strong {
  font-size: .84rem;
}
.client-quick-action span {
  font-size: .7rem;
  opacity: .82;
  line-height: 1.25;
}
.client-quick-action:disabled {
  opacity: .52;
  cursor: not-allowed;
}
.client-tabs {
  display: flex !important;
  gap: 6px !important;
  padding: 9px 12px !important;
  overflow-x: auto;
  border-bottom: 1px solid #dfe8f3 !important;
  background: #f8fbff !important;
}
.client-tabs button {
  flex: 0 0 auto;
  min-height: 38px !important;
  padding: 7px 11px !important;
  border: 1px solid #d2e0f0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #21466f !important;
  -webkit-text-fill-color: #21466f !important;
  box-shadow: none !important;
}
.client-tabs button.active {
  border-color: #0758d3 !important;
  background: #0758d3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.client-tab-content {
  padding: 16px 18px 19px !important;
  overflow-x: visible !important;
}
.client-metrics-grid,
.client-info-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 9px !important;
}
.client-metrics-grid > div,
.client-info-grid > div {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 11px 12px !important;
  border: 1px solid #dce6f2 !important;
  border-radius: 11px !important;
  background: #f9fbfe !important;
}
.client-metrics-grid > div span,
.client-info-grid > div span {
  color: #6a7f99 !important;
}
.client-metrics-grid > div strong,
.client-info-grid > div strong {
  color: #17345c !important;
  overflow-wrap: anywhere;
}
.client-inline-form,
.client-action-card,
.client-history-card,
.client-notes {
  border: 1px solid #dbe6f2 !important;
  border-radius: 12px !important;
  background: #f9fbfe !important;
}

/* Ewidencja — przycisk importu ma mieć pełny, czytelny opis. */
.time-records-page .toolbar-actions button {
  white-space: nowrap;
}

/* Tryb ciemny dla nowych reguł. */
:root[data-theme="dark"] button.secondary,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .file-picker-button {
  background: #233149 !important;
  border-color: #526783 !important;
  color: #eef5ff !important;
  -webkit-text-fill-color: #eef5ff !important;
}
:root[data-theme="dark"] :is(
  .compact-checkbox:not(.sms-setting-option),
  .checkbox-label,
  .client-consents label,
  .sms-setting-option,
  .permission-item,
  .listing-channel-checkbox,
  .category-list-editor,
  .category-choice-picker,
  .measurement-template-editor,
  .settings-info-card,
  .settings-status,
  .sms-test-form,
  .sms-settings-info .detail-list > div,
  .client-summary-card,
  .birthday-item,
  .clients-filter-row,
  .client-list-item,
  .client-metrics-grid > div,
  .client-info-grid > div,
  .client-inline-form,
  .client-action-card,
  .client-history-card,
  .client-notes
) {
  background: #121d2f !important;
  border-color: #3b4d69 !important;
  color: #e8f0fb !important;
}
:root[data-theme="dark"] :is(
  .compact-checkbox:not(.sms-setting-option),
  .checkbox-label,
  .client-consents label,
  .sms-setting-option,
  .permission-item,
  .listing-channel-checkbox
):has(input:checked) {
  background: #17345a !important;
  border-color: #4d8ee7 !important;
}
:root[data-theme="dark"] .permission-panel,
:root[data-theme="dark"] .clients-list-panel,
:root[data-theme="dark"] .client-detail-panel,
:root[data-theme="dark"] .clients-list,
:root[data-theme="dark"] .client-list-count {
  background: #111b2b !important;
  border-color: #3a4b67 !important;
  color: #e9f1fb !important;
}
:root[data-theme="dark"] .permission-group {
  background: #182337 !important;
  border-color: #3d506e !important;
  color: #dbe7f7 !important;
  -webkit-text-fill-color: #dbe7f7 !important;
}
:root[data-theme="dark"] .permission-group.active {
  background: #1f63c5 !important;
  border-color: #6aa5f3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
:root[data-theme="dark"] .permission-group > small {
  background: #24344d;
}
:root[data-theme="dark"] .api-status-lamp > div > span,
:root[data-theme="dark"] .settings-info-card span,
:root[data-theme="dark"] .settings-status span,
:root[data-theme="dark"] .sms-setting-option > small,
:root[data-theme="dark"] .choice-picker-header small,
:root[data-theme="dark"] .client-summary-card span,
:root[data-theme="dark"] .client-summary-card small,
:root[data-theme="dark"] .client-list-main small,
:root[data-theme="dark"] .client-list-stats small,
:root[data-theme="dark"] .client-detail-header p,
:root[data-theme="dark"] .client-points-box span,
:root[data-theme="dark"] .client-metrics-grid > div span,
:root[data-theme="dark"] .client-info-grid > div span {
  color: #a9bad1 !important;
}
:root[data-theme="dark"] .api-status-lamp > div > strong,
:root[data-theme="dark"] .settings-info-card strong,
:root[data-theme="dark"] .settings-status strong,
:root[data-theme="dark"] .sms-setting-option > span,
:root[data-theme="dark"] .choice-picker-header strong,
:root[data-theme="dark"] .client-summary-card strong,
:root[data-theme="dark"] .client-detail-header h3,
:root[data-theme="dark"] .client-metrics-grid > div strong,
:root[data-theme="dark"] .client-info-grid > div strong {
  color: #eef5ff !important;
}
:root[data-theme="dark"] .api-status-lamp.ok {
  background: #113425 !important;
  border-color: #3f9f70 !important;
}
:root[data-theme="dark"] .api-status-lamp.error {
  background: #39191e !important;
  border-color: #b6535f !important;
}
:root[data-theme="dark"] .api-status-lamp.checking,
:root[data-theme="dark"] .settings-hint {
  background: #162b49 !important;
  border-color: #3f669b !important;
  color: #d9e9ff !important;
}
:root[data-theme="dark"] .clients-filter-row,
:root[data-theme="dark"] .client-detail-header,
:root[data-theme="dark"] .client-tabs {
  background: #162236 !important;
  border-color: #3a4b67 !important;
}
:root[data-theme="dark"] .client-list-item:hover,
:root[data-theme="dark"] .client-list-item.active {
  background: #1b3558 !important;
  border-color: #5d8fd3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
:root[data-theme="dark"] .client-quick-actions {
  background: #111b2b !important;
  border-color: #3a4b67 !important;
}
:root[data-theme="dark"] .client-quick-actions-header strong {
  color: #eef5ff !important;
}
:root[data-theme="dark"] .client-quick-actions-header span,
:root[data-theme="dark"] .client-quick-actions-header small {
  color: #a9bad1 !important;
}
:root[data-theme="dark"] .client-quick-action {
  background: #18263b !important;
  border-color: #405574 !important;
  color: #e8f1ff !important;
  -webkit-text-fill-color: #e8f1ff !important;
}
:root[data-theme="dark"] .client-quick-action:hover:not(:disabled) {
  background: #203b60 !important;
  border-color: #6295d9 !important;
}
:root[data-theme="dark"] .client-quick-action.primary {
  background: #1f63c5 !important;
  border-color: #6aa5f3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
:root[data-theme="dark"] .client-tabs button {
  background: #1a263a !important;
  border-color: #40516c !important;
  color: #dbe7f7 !important;
  -webkit-text-fill-color: #dbe7f7 !important;
}
:root[data-theme="dark"] .client-tabs button.active {
  background: #1f63c5 !important;
  border-color: #6aa5f3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 1180px) {
  .client-quick-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sms-two-column.settings-layout {
    grid-template-columns: 1fr !important;
  }
  .birthday-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .clients-workspace {
    grid-template-columns: minmax(280px, .76fr) minmax(0, 1.24fr) !important;
  }
}

@media (max-width: 900px) {
  .permission-editor,
  .clients-workspace {
    grid-template-columns: 1fr !important;
  }
  .permission-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .clients-list {
    min-height: 280px;
    max-height: 360px !important;
  }
  .birthday-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .client-quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .birthday-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .client-quick-actions {
    padding: 12px;
  }
  .client-quick-actions-header {
    align-items: start;
    flex-direction: column;
  }
  .client-quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .infakt-grid,
  .openai-settings-form,
  .dictionary-form-modal > form.form-grid,
  .sms-test-form,
  .clients-filter-row {
    grid-template-columns: 1fr !important;
  }
  .infakt-grid .wide-field,
  .openai-settings-form .wide-field,
  .dictionary-form-modal .wide-field,
  .sms-test-form h4,
  .sms-test-form > button,
  .clients-filter-row > input,
  .clients-filter-row > select:last-of-type,
  .clients-filter-row > button {
    grid-column: 1 !important;
  }
  .permission-groups {
    grid-template-columns: 1fr !important;
  }
  .permission-panel-header,
  .client-detail-header {
    align-items: stretch !important;
    flex-direction: column;
  }
  .permission-panel-actions,
  .permission-panel-actions > button,
  .clients-module-toolbar .toolbar-actions,
  .clients-module-toolbar .toolbar-actions > button {
    width: 100%;
  }
  .client-summary-grid {
    grid-template-columns: 1fr !important;
  }
  .client-points-box {
    width: 100%;
    text-align: left;
  }
  .client-list-item {
    grid-template-columns: 1fr;
  }
  .client-list-stats {
    grid-template-columns: auto auto;
    justify-content: space-between;
    text-align: left;
  }
}

/* v3.06 — końcowe dopracowanie formularzy słowników i nawigacji klientów. */
.choice-chip-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
}
.choice-chip-grid button {
  min-height: 38px !important;
  padding: 7px 11px !important;
  border: 1px solid #cbdbee !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #193b66 !important;
  -webkit-text-fill-color: #193b66 !important;
  box-shadow: none !important;
}
.choice-chip-grid button:hover:not(:disabled):not(.active) {
  border-color: #8eb6ee !important;
  background: #edf5ff !important;
  color: #0b4fae !important;
  -webkit-text-fill-color: #0b4fae !important;
}
.choice-chip-grid button.active {
  border-color: #0758d3 !important;
  background: #0758d3 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.clients-quick-open-heading {
  flex: 0 0 190px;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}
.clients-quick-open-heading strong {
  color: #17345c !important;
  font-size: .86rem;
}
.clients-quick-open-heading small {
  color: #667d99 !important;
  font-size: .7rem;
  line-height: 1.35;
}
.clients-filter-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.clients-filter-field {
  min-width: 0;
  display: grid !important;
  gap: 5px !important;
  color: #5f7592 !important;
  font-size: .69rem !important;
  font-weight: 850 !important;
}
.clients-filter-field > span {
  color: inherit !important;
}
.clients-filter-field > input,
.clients-filter-field > select {
  width: 100%;
}
.clients-filter-search,
.clients-filter-sort,
.clients-filter-actions {
  grid-column: 1 / -1;
}
.clients-filter-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.clients-filter-actions > button {
  width: 100%;
}
.clients-list-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.clients-list-count strong {
  color: #17345c !important;
  font-size: .78rem;
}
.clients-list-count span {
  color: #657a96 !important;
}
:root[data-theme="dark"] .choice-chip-grid button {
  border-color: #40516c !important;
  background: #182438 !important;
  color: #dbe7f7 !important;
  -webkit-text-fill-color: #dbe7f7 !important;
}
:root[data-theme="dark"] .choice-chip-grid button.active {
  border-color: #6aa5f3 !important;
  background: #1f63c5 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
:root[data-theme="dark"] .clients-quick-open-heading strong,
:root[data-theme="dark"] .clients-list-count strong {
  color: #eef5ff !important;
}
:root[data-theme="dark"] .clients-quick-open-heading small,
:root[data-theme="dark"] .clients-filter-field,
:root[data-theme="dark"] .clients-list-count span {
  color: #a9bad1 !important;
}
@media (max-width: 850px) {
  .clients-quick-open-heading {
    flex: 1 1 100%;
  }
}
@media (max-width: 680px) {
  .clients-filter-row,
  .clients-filter-actions {
    grid-template-columns: 1fr !important;
  }
  .clients-filter-search,
  .clients-filter-sort,
  .clients-filter-actions {
    grid-column: 1 !important;
  }
}
/* Najwęższe telefony — ostatnia reguła celowo nadpisuje układ 2-kolumnowy. */
@media (max-width: 560px) {
  .client-quick-actions-grid,
  .birthday-list {
    grid-template-columns: 1fr !important;
  }
}


/* === FIX 3.32: kupony / progi punktowe - czytelność i układ modala === */
.definition-modal {
  width: min(1040px, calc(100vw - 32px)) !important;
}
.definition-layout {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
}
.definition-list {
  gap: 10px !important;
  padding-right: 8px !important;
}
.definition-list button {
  display: grid !important;
  justify-items: start !important;
  align-content: center !important;
  text-align: left !important;
  padding: 12px 14px !important;
  background: #f7faff !important;
  border: 1px solid #cfe0f5 !important;
  color: #17345c !important;
  box-shadow: none !important;
}
.definition-list button strong {
  color: #17345c !important;
}
.definition-list button span,
.definition-list button small {
  color: #4d6484 !important;
}
.definition-list button:hover {
  background: #eef5ff !important;
  border-color: #9ec4f4 !important;
}
.definition-list button.active {
  background: linear-gradient(135deg, #0a66ea 0%, #0758d3 100%) !important;
  border-color: #6fb4ff !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(7, 88, 211, .16) !important;
}
.definition-list button.active strong,
.definition-list button.active span,
.definition-list button.active small,
.definition-list button:hover.active strong,
.definition-list button:hover.active span,
.definition-list button:hover.active small {
  color: #ffffff !important;
}
.definition-form {
  padding: 16px !important;
  gap: 14px !important;
  background: #ffffff !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 14px !important;
}
.definition-form > label,
.definition-form .client-form-two > label {
  display: grid !important;
  gap: 6px !important;
  align-content: start !important;
  color: #17345c !important;
  font-weight: 700 !important;
}
.definition-form input,
.definition-form select,
.definition-form textarea {
  width: 100% !important;
}
.definition-form .client-consents {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
.definition-form .client-consents label {
  flex: 0 1 auto !important;
  min-width: 180px !important;
}
@media (max-width: 900px) {
  .definition-layout {
    grid-template-columns: 1fr !important;
  }
  .definition-list {
    max-height: 220px !important;
  }
}


/* 3.34: dzień i miesiąc urodzin oraz automatyczny reset PIN */
.client-birthday-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.client-birthday-field legend { margin-bottom: 6px; font-weight: 700; color: var(--panel-text); }
.client-birthday-field > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.client-birthday-field select { width: 100%; }
.client-pin-reset-form { grid-template-columns: minmax(0, 1fr) auto !important; }
@media (max-width: 700px) { .client-pin-reset-form { grid-template-columns: 1fr !important; } .client-pin-reset-form button { width: 100%; } }
