/* The saved color mode is applied synchronously by theme-preload.js before CSS.
   Keep first-paint protection scoped to the root canvas; never toggle a selector
   matching the whole DOM during navigation, because it triggers a global repaint. */

:root {
    color-scheme: light;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --page-bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #f1f5f9;
    --text: #172033;
    --text-secondary: #64748b;
    --text-faint: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --sidebar-bg: #0b1426;
    --sidebar-surface: #121e34;
    --sidebar-text: #d9e3f2;
    --sidebar-muted: #7f91ac;
    --sidebar-border: #1c2b45;
    --success: #16a34a;
    --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px rgb(15 23 42 / 0.04);
    --sidebar-width: 268px;
    --topbar-height: 72px;
}

html.dark {
    color-scheme: dark;
    --page-bg: #09101e;
    --surface: #111b2e;
    --surface-soft: #0d1729;
    --surface-hover: #17243a;
    --text: #eef4ff;
    --text-secondary: #9babbe;
    --text-faint: #708199;
    --border: #21304a;
    --border-strong: #30415e;
    --sidebar-bg: #070d19;
    --sidebar-surface: #101a2d;
    --sidebar-text: #dce7f7;
    --sidebar-muted: #708199;
    --sidebar-border: #17243a;
    --success: #4ade80;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 12px 28px rgb(0 0 0 / 0.16);
}

:root {
    --scrollbar-size: 10px;
    --scrollbar-track: color-mix(in srgb, var(--surface-soft) 74%, var(--page-bg));
    --scrollbar-thumb: color-mix(in srgb, var(--blue-500) 42%, var(--border-strong));
    --scrollbar-thumb-hover: color-mix(in srgb, var(--blue-500) 60%, var(--border-strong));
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 2px solid var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-bg);
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body.sidebar-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
}

.hidden,
.search-hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--sidebar-width);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-header {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--blue-600);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 8px 20px rgb(var(--brand-accent-rgb) / 0.28);
}

.brand-copy {
    min-width: 0;
}

.brand-copy strong,
.brand-copy small {
    display: block;
}

.brand-copy strong {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.25;
}

.brand-copy small {
    margin-top: 2px;
    color: var(--sidebar-muted);
    font-size: 11px;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.icon-button:hover {
    background: var(--surface-hover);
}

.sidebar-close {
    display: none;
    color: var(--sidebar-muted);
}

.sidebar-close:hover {
    color: #ffffff;
    background: var(--sidebar-surface);
}

.sidebar-search-wrap {
    padding: 14px 16px 8px;
}

.sidebar-search {
    position: relative;
    display: block;
}

.sidebar-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: var(--sidebar-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 39px;
    border: 1px solid var(--sidebar-border);
    border-radius: 10px;
    outline: none;
    background: var(--sidebar-surface);
    color: #ffffff;
}

.sidebar-search input::placeholder {
    color: var(--sidebar-muted);
}

.sidebar-search input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / 0.16);
}

.sidebar-scroll {
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 20px;
    scrollbar-gutter: stable;
}

.sidebar-navigation {
    display: grid;
    gap: 5px;
}

.navigation-label {
    padding: 8px 10px 6px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-link,
.sidebar-group-toggle {
    width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 5px 7px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--sidebar-text);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.sidebar-link:hover,
.sidebar-group-toggle:hover {
    background: var(--sidebar-surface);
    color: #ffffff;
}

.sidebar-link.active {
    background: rgb(var(--brand-accent-rgb) / 0.18);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--blue-500);
}

.navigation-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--brand-accent-muted);
}

.sidebar-link.active .navigation-icon,
.sidebar-link:hover .navigation-icon,
.sidebar-group-toggle:hover .navigation-icon,
.sidebar-group.open .sidebar-group-toggle .navigation-icon {
    color: var(--brand-accent-200);
}

.navigation-icon .icon {
    width: 18px;
    height: 18px;
}

.group-chevron {
    width: 15px;
    height: 15px;
    color: var(--sidebar-muted);
    transition: transform 0.18s ease;
}

.sidebar-group.open .group-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    padding: 3px 0 7px 48px;
}

.sidebar-group.open .sidebar-submenu {
    display: grid;
    gap: 2px;
}

.sidebar-submenu-link {
    position: relative;
    min-height: 35px;
    display: flex;
    align-items: center;
    padding: 6px 10px 6px 13px;
    border-radius: 8px;
    color: var(--brand-accent-muted-alt);
    font-size: 12px;
    font-weight: 500;
}

.sidebar-submenu-link::before {
    content: "";
    position: absolute;
    left: -12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6f5a3c;
}

.sidebar-submenu-link:hover {
    background: var(--sidebar-surface);
    color: #ffffff;
}

.sidebar-submenu-link.active {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: #ffffff;
}

.sidebar-submenu-link.active::before {
    background: var(--blue-500);
    box-shadow: 0 0 0 4px rgb(var(--brand-accent-rgb) / 0.15);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
}

.restaurant-status {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.restaurant-status strong,
.restaurant-status small {
    display: block;
}

.restaurant-status strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restaurant-status small {
    color: var(--sidebar-muted);
    font-size: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgb(34 197 94 / 0.12);
}

.version-label {
    color: var(--sidebar-muted);
    font-size: 10px;
}

.sidebar-backdrop {
    position: fixed;
    z-index: 40;
    inset: 0;
    background: rgb(3 8 18 / 0.62);
    backdrop-filter: blur(3px);
}

.app-main {
    min-height: 100vh;
    padding-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--page-bg) 88%, transparent);
    backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions,
.user-profile,
.theme-button {
    display: flex;
    align-items: center;
}

.topbar-left {
    min-width: 0;
    gap: 12px;
}

.page-context {
    min-width: 0;
}

.page-context small,
.page-context strong {
    display: block;
}

.page-context small {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-context strong {
    margin-top: 1px;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    gap: 10px;
}

.mobile-menu-button {
    display: none;
    border-color: var(--border);
    background: var(--surface);
}

.theme-button {
    min-height: 40px;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.theme-button:hover {
    border-color: var(--border-strong);
    color: var(--text);
    background: var(--surface-hover);
}

.theme-button .icon {
    width: 17px;
    height: 17px;
    color: var(--blue-600);
}

.user-profile {
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 800;
}

.dark .avatar {
    background: rgb(var(--brand-accent-rgb) / 0.22);
    color: var(--brand-accent-100);
}

.user-copy strong,
.user-copy small {
    display: block;
}

.user-copy strong {
    font-size: 12px;
}

.user-copy small {
    color: var(--text-secondary);
    font-size: 10px;
}

.main-content {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 28px;
}

.welcome-panel {
    min-height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid #d8bd84;
    border-radius: 16px;
    background:
        radial-gradient(circle at 88% 20%, rgb(255 255 255 / 0.9) 0, transparent 25%),
        linear-gradient(135deg, var(--blue-50) 0%, #f7ecd2 55%, #fffdf8 100%);
}

.dark .welcome-panel {
    border-color: #5a4324;
    background:
        radial-gradient(circle at 88% 20%, rgb(var(--brand-accent-rgb) / 0.14) 0, transparent 30%),
        linear-gradient(135deg, #17130e 0%, #1d170f 55%, #120f0b 100%);
}

.eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--blue-600);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dark .eyebrow {
    color: var(--brand-accent-500);
}

.welcome-panel h1,
.module-heading h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.welcome-panel p,
.module-heading p {
    margin: 7px 0 0;
    color: var(--text-secondary);
}

.date-pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgb(var(--brand-accent-rgb) / 0.18);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.72);
    color: #8a6528;
    font-size: 11px;
    font-weight: 700;
}

.dark .date-pill {
    border-color: rgb(var(--brand-accent-light-rgb) / 0.2);
    background: rgb(7 13 25 / 0.28);
    color: var(--brand-accent-muted-light);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card,
.panel {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 126px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
}

.metric-card:hover {
    border-color: var(--blue-200);
}

.dark .metric-card:hover {
    border-color: var(--brand-accent-border);
}

.metric-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--blue-50);
    color: var(--blue-600);
}

.dark .metric-icon {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-200);
}

.metric-icon .icon {
    width: 20px;
    height: 20px;
}

.metric-copy {
    min-width: 0;
}

.metric-copy small,
.metric-copy strong,
.metric-copy span {
    display: block;
}

.metric-copy small {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.metric-copy strong {
    margin-top: 4px;
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.metric-copy span {
    margin-top: 7px;
    color: var(--text-faint);
    font-size: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
    gap: 14px;
    margin-bottom: 14px;
}

.panel {
    border-radius: 14px;
}

.activity-panel,
.quick-panel,
.categories-panel {
    padding: 20px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.demo-badge,
.construction-badge {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 10px;
    font-weight: 700;
}

.dark .demo-badge,
.dark .construction-badge {
    background: rgb(var(--brand-accent-rgb) / 0.17);
    color: var(--brand-accent-100);
}

.activity-list {
    border-top: 1px solid var(--border);
}

.activity-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-icon,
.quick-icon,
.category-icon {
    display: grid;
    place-items: center;
    color: var(--blue-600);
    background: var(--blue-50);
}

.dark .activity-icon,
.dark .quick-icon,
.dark .category-icon {
    color: var(--brand-accent-200);
    background: rgb(var(--brand-accent-rgb) / 0.15);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.activity-icon .icon {
    width: 17px;
    height: 17px;
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item strong {
    font-size: 12px;
}

.activity-item small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 10px;
}

.activity-item time {
    color: var(--text-faint);
    font-size: 10px;
}

.quick-links {
    display: grid;
    gap: 8px;
}

.quick-links a {
    min-height: 59px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.quick-links a:hover {
    border-color: var(--blue-200);
    background: var(--blue-50);
}

.dark .quick-links a:hover {
    border-color: var(--brand-accent-border);
    background: rgb(var(--brand-accent-rgb) / 0.09);
}

.quick-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.quick-icon .icon {
    width: 17px;
    height: 17px;
}

.quick-links strong,
.quick-links small {
    display: block;
}

.quick-links strong {
    font-size: 11px;
}

.quick-links small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 9px;
}

.quick-arrow {
    width: 15px;
    height: 15px;
    color: var(--text-faint);
}

.categories-panel {
    margin-bottom: 14px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.category-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.category-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
}

.category-icon .icon {
    width: 18px;
    height: 18px;
}

.category-card strong,
.category-card small {
    display: block;
}

.category-card strong {
    font-size: 12px;
}

.category-card small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 10px;
}

.breadcrumb {
    min-height: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 11px;
}

.breadcrumb a:hover {
    color: var(--blue-600);
}

.breadcrumb strong {
    color: var(--text);
}

.breadcrumb-separator {
    width: 12px;
    height: 12px;
    color: var(--text-faint);
}

.module-heading {
    margin-bottom: 18px;
}

.construction-panel {
    max-width: 780px;
    padding: 40px;
    margin: 32px auto 0;
    text-align: center;
}

.construction-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 17px;
    background: var(--blue-50);
    color: var(--blue-600);
}

.dark .construction-icon {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-200);
}

.construction-icon .icon {
    width: 29px;
    height: 29px;
}

.construction-panel h1,
.construction-panel h2 {
    margin: 12px 0 8px;
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.construction-panel > p {
    max-width: 570px;
    margin: 0 auto 24px;
    color: var(--text-secondary);
}

.module-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    text-align: left;
}

.module-summary div {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.module-summary small,
.module-summary strong {
    display: block;
}

.module-summary small {
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 10px;
}

.module-summary strong {
    font-size: 12px;
}

.primary-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--blue-600);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.primary-button:hover {
    background: var(--blue-700);
}

.primary-button .icon {
    width: 16px;
    height: 16px;
}

.error-panel {
    margin-top: 70px;
}

.error-code {
    display: block;
    color: var(--blue-600);
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
}

.sidebar-link:focus-visible,
.sidebar-group-toggle:focus-visible,
.sidebar-submenu-link:focus-visible,
.sidebar-search input:focus-visible,
.icon-button:focus-visible,
.theme-button:focus-visible,
.quick-links a:focus-visible,
.primary-button:focus-visible {
    outline: 3px solid rgb(var(--brand-accent-rgb) / 0.35);
    outline-offset: 2px;
}

@media (max-width: 1260px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 1023px) {
    .sidebar {
        width: min(86vw, 288px);
        transform: translateX(-102%);
        transition: transform 0.2s ease;
        box-shadow: 18px 0 50px rgb(0 0 0 / 0.25);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-close,
    .mobile-menu-button {
        display: grid;
    }

    .app-main {
        padding-left: 0;
    }

    .topbar {
        padding: 0 18px;
    }

    .topbar-balance-reminder-copy small {
        display: none;
    }

    .main-content {
        padding: 22px 18px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar {
        gap: 10px;
        padding: 0 14px;
    }

    .topbar-balance-reminder {
        min-width: 40px;
        padding: 0 10px;
    }

    .topbar-balance-reminder-copy {
        display: none;
    }

    .theme-button {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .theme-button span:last-child {
        display: none;
    }

    .user-copy {
        display: none;
    }

    .user-profile {
        padding-left: 8px;
    }

    .main-content {
        padding: 16px 12px 24px;
    }

    .welcome-panel {
        min-height: 150px;
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
        border-radius: 14px;
    }

    .date-pill {
        align-self: flex-start;
    }

    .metric-grid,
    .category-grid,
    .module-summary {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 106px;
    }

    .activity-panel,
    .quick-panel,
    .categories-panel {
        padding: 16px;
    }

    .activity-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .activity-item time {
        grid-column: 2;
    }

    .construction-panel {
        padding: 28px 18px;
        margin-top: 16px;
    }
}

@media (max-width: 430px) {
    .page-context small {
        display: none;
    }

    .page-context strong {
        max-width: 140px;
    }

    .welcome-panel h1,
    .module-heading h1 {
        font-size: 28px;
    }

    .metric-copy strong {
        font-size: 21px;
    }
}

/* System logowania */
.logout-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.logout-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    color: var(--text);
}

.logout-button .icon {
    width: 17px;
    height: 17px;
}

.panel-notice {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--blue-200);
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 600;
}

.dark .panel-notice {
    border-color: rgb(var(--brand-accent-rgb) / 0.35);
    background: rgb(var(--brand-accent-rgb) / 0.14);
    color: #eed79f;
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 15%, rgb(var(--brand-accent-rgb) / 0.08), transparent 28%),
        var(--page-bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.auth-topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid var(--border);
    background: rgb(255 255 255 / 0.82);
    backdrop-filter: blur(14px);
}

.dark .auth-topbar {
    background: rgb(17 27 46 / 0.82);
}

.auth-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.auth-brand .brand-copy strong {
    color: var(--text);
}

.auth-brand .brand-copy small {
    color: var(--text-secondary);
}

.auth-theme-button {
    flex: 0 0 auto;
}

.auth-main {
    display: grid;
    place-items: center;
    padding: 42px 18px;
}

.auth-card {
    width: min(100%, 470px);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card-wide {
    width: min(100%, 680px);
}

.auth-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 13px;
    background: var(--blue-50);
    color: var(--blue-600);
}

.dark .auth-card-icon {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-300);
}

.auth-card-icon-warning {
    background: #fff7ed;
    color: #c2410c;
}

.dark .auth-card-icon-warning {
    background: rgb(194 65 12 / 0.16);
    color: #fdba74;
}

.auth-card-icon .icon {
    width: 23px;
    height: 23px;
}

.auth-card-heading {
    margin-bottom: 22px;
}

.auth-card-heading h1 {
    margin: 6px 0 8px;
    font-size: 28px;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.auth-card-heading p {
    margin: 0;
    color: var(--text-secondary);
}

.form-alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13px;
}

.form-alert strong {
    display: block;
    margin-bottom: 5px;
}

.form-alert ul {
    padding-left: 19px;
    margin: 5px 0 0;
}

.form-alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.dark .form-alert-error {
    border-color: rgb(248 113 113 / 0.32);
    background: rgb(127 29 29 / 0.18);
    color: #fca5a5;
}

.form-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.dark .form-alert-success {
    border-color: rgb(74 222 128 / 0.28);
    background: rgb(20 83 45 / 0.2);
    color: #86efac;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.form-field {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.form-field input[type="date"] {
    min-height: 44px;
    padding: 0 40px 0 12px;
    appearance: none;
    -webkit-appearance: none;
}

.form-field input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: .88;
    cursor: pointer;
}

.form-field input:hover {
    border-color: #94a3b8;
}

.form-field input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / 0.15);
}

.form-field textarea {
    width: 100%;
    min-height: 112px;
    padding: 12px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.form-field textarea::placeholder {
    color: var(--text-faint);
    opacity: 1;
}

.form-field textarea:hover {
    border-color: #94a3b8;
}

.form-field textarea:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / 0.15);
}

.form-field small {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}

.auth-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    cursor: pointer;
}

.auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 0;
    color: var(--text-secondary);
    font-size: 11px;
}

.auth-security-note .icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 4vw, 48px);
    color: var(--text-secondary);
    font-size: 11px;
}

.database-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 4px 0 18px;
}

.database-summary div {
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.database-summary span,
.database-summary strong {
    display: block;
}

.database-summary span {
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 10px;
}

.database-summary strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-instructions {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: 12px;
}

.auth-instructions > strong {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
}

.auth-instructions ol {
    padding-left: 20px;
    margin: 0;
}

.auth-instructions code {
    color: var(--text);
    font-weight: 700;
}

.logout-button:focus-visible,
.form-field input:focus-visible,
.auth-submit:focus-visible {
    outline: 3px solid rgb(var(--brand-accent-rgb) / 0.35);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .logout-button {
        width: 40px;
        padding: 0;
    }

    .logout-button span {
        display: none;
    }

    .auth-topbar {
        min-height: 64px;
        padding: 12px 14px;
    }

    .auth-main {
        padding: 24px 12px;
    }

    .auth-card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .auth-card-heading h1 {
        font-size: 25px;
    }

    .form-grid,
    .database-summary {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 14px;
    }
}

/* Resto Panel 2.4.0: konta, uprawnienia i synchronizacja */
.topbar-link,
.secondary-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    color: var(--text);
    background: var(--surface);
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
.topbar-link { min-height: 2.5rem; padding: 0 .8rem; font-size: .82rem; }
.topbar-link .icon, .secondary-button .icon, .small-button .icon { width: 1rem; height: 1rem; }
.topbar-link:hover, .secondary-button:hover, .small-button:hover { border-color: var(--blue-500); color: var(--blue-600); }
.secondary-button { padding: .7rem 1rem; }
.small-button { min-height: 2rem; padding: .38rem .62rem; font-size: .76rem; }
.small-button.danger { color: #dc2626; }
.dark .small-button.danger { color: #fca5a5; }

.live-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.access-revoked-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(2,6,23,.72); backdrop-filter: blur(4px); }
.access-revoked-overlay > div { width: min(420px,100%); padding: 2rem; border-radius: 1rem; background: var(--surface); color: var(--text); text-align: center; display: grid; gap: .7rem; }
.access-revoked-overlay .icon { width: 2.5rem; height: 2.5rem; margin: auto; color: var(--blue-600); }

.accounts-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.accounts-hero {
    padding: 30px 32px 24px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 94% 4%, rgb(var(--brand-accent-rgb) / 0.09), transparent 28%),
        var(--surface);
}

.dark .accounts-hero {
    background:
        radial-gradient(circle at 94% 4%, rgb(var(--brand-accent-rgb) / 0.12), transparent 30%),
        var(--surface);
}

.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
}

.accounts-heading {
    min-width: 0;
}

.page-toolbar h1 {
    margin: 3px 0 8px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.page-toolbar p {
    max-width: 650px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.accounts-primary-action {
    min-height: 48px;
    flex: 0 0 auto;
    padding: 0 19px;
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgb(var(--brand-accent-rgb) / 0.2);
    font-size: 13px;
}

.accounts-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgb(var(--brand-accent-rgb) / 0.25);
}

.accounts-tabs {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 30px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.accounts-tabs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border-radius: 9px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.accounts-tabs a:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.accounts-tabs a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    box-shadow: 0 7px 18px rgb(var(--brand-accent-rgb) / 0.22);
}

.accounts-tabs .icon {
    width: 18px;
    height: 18px;
}

.account-list-panel {
    padding: 22px;
    overflow: hidden;
    border-radius: 18px;
}

.account-list-header {
    align-items: center;
    margin-bottom: 18px;
}

.account-list-title h2 {
    font-size: 20px;
}

.account-list-title p {
    margin-top: 5px;
    font-size: 12px;
}

.account-search {
    width: min(390px, 100%);
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.account-search:focus-within {
    border-color: var(--blue-500);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / 0.14);
}

.account-search .icon {
    width: 18px;
    height: 18px;
    color: var(--text-faint);
}

.account-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.account-search input::placeholder {
    color: var(--text-faint);
}

.accounts-table-area {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.table-wrap {
    overflow-x: auto;
}

.accounts-table {
    width: 100%;
    min-width: 900px;
    border-spacing: 0;
    border-collapse: separate;
    table-layout: fixed;
}

.account-column-person { width: 29%; }
.account-column-status { width: 16%; }
.account-column-permissions { width: 15%; }
.account-column-login { width: 22%; }
.account-column-actions { width: 18%; }

.accounts-table th,
.accounts-table td {
    padding: 17px 20px;
    text-align: left;
    vertical-align: middle;
}

.accounts-table th {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 80%, var(--surface));
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.accounts-table tbody td {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.accounts-table tbody tr:last-child td {
    border-bottom: 0;
}

.accounts-table tbody tr:hover td {
    background: color-mix(in srgb, var(--surface) 84%, var(--blue-50));
}

.dark .accounts-table tbody tr:hover td {
    background: color-mix(in srgb, var(--surface) 88%, var(--blue-700));
}

.account-person {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.account-person-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.account-person strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-person small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-active-leave {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.account-active-leave .status-badge {
    min-height: 24px;
    padding: 0 9px;
}

.account-active-leave small {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
}

.avatar.small {
    width: 42px;
    height: 42px;
    border: 1px solid rgb(var(--brand-accent-rgb) / 0.16);
    font-size: 12px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.status-badge {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.status-badge::before {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    content: "";
    box-shadow: 0 0 0 3px rgb(255 255 255 / 0.35);
}

.status-badge.success { background: #dcfce7; color: #15803d; }
.status-badge.warning { background: #fef3c7; color: #a16207; }
.status-badge.info { background: var(--blue-100); color: var(--blue-700); }
.status-badge.muted { background: #e5e7eb; color: #64748b; }
.dark .status-badge.success { background: rgb(22 101 52 / 0.28); color: #4ade80; }
.dark .status-badge.warning { background: rgb(146 64 14 / 0.28); color: #fcd34d; }
.dark .status-badge.info { background: rgb(var(--brand-accent-dark-rgb) / 0.32); color: var(--brand-accent-100); }
.dark .status-badge.muted { background: #2a2116; color: #cbd5e1; }

.permission-count {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgb(var(--brand-accent-rgb) / 0.14);
    border-radius: 9px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.permission-count span {
    margin-left: 4px;
    color: #b88b42;
    font-weight: 700;
}

.dark .permission-count {
    border-color: rgb(var(--brand-accent-light-rgb) / 0.16);
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-200);
}

.dark .permission-count span {
    color: #ccb483;
}

.account-last-login {
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.table-actions form {
    margin: 0;
}

.accounts-page .small-button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    background: var(--surface-soft);
    font-size: 11px;
}

.accounts-page .small-button:hover {
    background: var(--blue-50);
}

.dark .accounts-page .small-button:hover {
    background: rgb(var(--brand-accent-rgb) / 0.13);
}

.empty-state {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 40px 18px;
    color: var(--text-secondary);
    text-align: center;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border-radius: 15px;
    background: var(--blue-50);
    color: var(--blue-600);
}

.dark .empty-state-icon {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-200);
}

.empty-state-icon .icon {
    width: 24px;
    height: 24px;
}

.empty-state strong {
    color: var(--text);
    font-size: 15px;
}

.account-editor, .temporary-password-panel { padding: 0; overflow: hidden; margin-bottom: 1.25rem; }
.editor-section { padding: 1.35rem; border-bottom: 1px solid var(--border); }
.section-heading { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0 0 .2rem; font-size: 1rem; }
.section-heading p { margin: 0; color: var(--text-secondary); font-size: .86rem; }
.section-icon { width: 2.25rem; height: 2.25rem; border-radius: .65rem; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-50); flex: 0 0 auto; }
.section-icon .icon { width: 1.15rem; height: 1.15rem; }
.dark .section-icon { background: rgba(37,99,235,.18); color: var(--brand-accent-100); }
.account-form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.account-form-grid.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; padding: 1rem 1.35rem; }
.temporary-password-panel { padding: 1.35rem; }
.temporary-password-panel .editor-actions { padding: 1rem 0 0; }
.permissions-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.permission-group { margin: 0; padding: 0; border: 1px solid var(--border); border-radius: .75rem; overflow: hidden; }
.permission-group legend { display: contents; }
.permission-category { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border-bottom: 1px solid var(--border); background: var(--surface-soft); font-weight: 750; }
.permission-category small { margin-left: auto; color: var(--text-secondary); font-weight: 600; }
.permission-items { display: grid; gap: .15rem; padding: .55rem; }
.permission-items label { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: .45rem; cursor: pointer; }
.permission-items label:hover { background: var(--surface-soft); }
.permission-category input, .permission-items input { width: 1rem; height: 1rem; accent-color: var(--blue-600); }
.form-alert-warning { border: 1px solid #f59e0b; background: #fffbeb; color: #92400e; }
.dark .form-alert-warning { background: rgba(146,64,14,.2); color: #fde68a; }
.auth-back-link { display: block; margin-top: 1rem; color: var(--blue-600); text-align: center; text-decoration: none; font-weight: 650; }

@media (max-width: 900px) {
    .topbar-link span { display: none; }
    .account-form-grid, .account-form-grid.two-columns, .permissions-grid { grid-template-columns: 1fr; }
    .account-list-header, .page-toolbar { align-items: stretch; flex-direction: column; }
    .account-search { width: 100%; }
}
.auth-topbar-actions { display: flex; align-items: center; gap: .6rem; }

/* Resto Panel 2.4.1: responsywny widok kont pracowników */
@media (max-width: 900px) {
    .accounts-hero {
        padding: 24px;
    }

    .account-list-panel {
        padding: 18px;
    }

    .account-list-header,
    .page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .accounts-primary-action {
        align-self: flex-start;
    }

    .account-search {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .accounts-page {
        gap: 14px;
    }

    .accounts-hero,
    .account-list-panel {
        padding: 18px;
        border-radius: 14px;
    }

    .page-toolbar h1 {
        font-size: 29px;
    }

    .accounts-tabs {
        width: 100%;
        margin-top: 22px;
    }

    .accounts-tabs a {
        flex: 1 1 0;
        padding: 0 10px;
    }

    .accounts-table-area {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .table-wrap {
        overflow: visible;
    }

    .accounts-table,
    .accounts-table tbody {
        min-width: 0;
        display: block;
    }

    .accounts-table colgroup,
    .accounts-table thead {
        display: none;
    }

    .accounts-table tbody {
        display: grid;
        gap: 12px;
    }

    .accounts-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: var(--surface);
    }

    .accounts-table tbody td,
    .accounts-table tbody tr:last-child td {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 13px 15px;
        border: 0;
        border-bottom: 1px solid var(--border);
        background: transparent;
    }

    .accounts-table tbody tr:hover td {
        background: transparent;
    }

    .accounts-table tbody td::before {
        flex: 0 0 auto;
        color: var(--text-secondary);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .055em;
        text-transform: uppercase;
        content: attr(data-label);
    }

    .accounts-table tbody td:first-child {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding: 16px;
    }

    .accounts-table tbody td:first-child::before {
        display: none;
    }

    .accounts-table tbody td:nth-child(2),
    .accounts-table tbody td:nth-child(3) {
        border-bottom: 1px solid var(--border);
    }

    .accounts-table tbody td:nth-child(4) {
        grid-column: 1 / -1;
    }

    .accounts-table tbody td:last-child {
        grid-column: 1 / -1;
        border-bottom: 0;
    }

    .table-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 520px) {
    .accounts-hero,
    .account-list-panel {
        padding: 15px;
    }

    .accounts-primary-action {
        width: 100%;
    }

    .accounts-tabs a {
        font-size: 12px;
    }

    .accounts-table tbody tr {
        grid-template-columns: 1fr;
    }

    .accounts-table tbody td,
    .accounts-table tbody td:nth-child(4),
    .accounts-table tbody td:last-child {
        grid-column: 1;
    }

    .accounts-table tbody td:nth-child(2),
    .accounts-table tbody td:nth-child(3),
    .accounts-table tbody td:nth-child(4) {
        border-bottom: 1px solid var(--border);
    }

    .account-list-title h2 {
        font-size: 18px;
    }

    .account-search input {
        font-size: 12px;
    }

    .table-actions,
    .table-actions form,
    .accounts-page .small-button {
        width: 100%;
    }
}

/* Resto Panel 2.4.2: formularz tworzenia i edycji konta */
.account-form-page {
    width: min(100%, 1320px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.account-form-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    padding: 30px 32px 26px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 94% 5%, rgb(var(--brand-accent-rgb) / 0.1), transparent 32%),
        var(--surface);
}

.dark .account-form-hero {
    background:
        radial-gradient(circle at 94% 5%, rgb(var(--brand-accent-rgb) / 0.14), transparent 34%),
        var(--surface);
}

.account-form-hero-copy {
    min-width: 0;
}

.account-form-hero h1 {
    margin: 4px 0 9px;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.account-form-hero-copy > p {
    max-width: 720px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.account-form-back {
    min-height: 44px;
    align-self: start;
    padding-inline: 15px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.account-form-back-icon {
    transform: rotate(180deg);
}

.account-form-profile {
    grid-column: 1 / -1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 5px;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
}

.account-form-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--blue-600), var(--blue-700));
    color: #fff;
    box-shadow: 0 9px 20px rgb(var(--brand-accent-rgb) / 0.23);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.account-form-profile-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.account-form-profile-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-form-profile-copy span {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-form-profile-stats {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-left: auto;
}

.account-form-stat {
    min-width: 118px;
    display: grid;
    gap: 2px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.account-form-stat small {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.account-form-stat strong {
    color: var(--text);
    font-size: 13px;
}

.account-editor,
.temporary-password-panel {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}

.editor-section {
    padding: 28px 30px;
}

.editor-section + .editor-section {
    border-top: 1px solid var(--border);
}

.account-section-heading {
    margin-bottom: 20px;
}

.account-section-heading > div {
    min-width: 0;
}

.section-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--blue-600);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .075em;
}

.dark .section-kicker {
    color: #dbb765;
}

.account-section-heading h2 {
    margin: 0 0 3px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.account-section-heading p {
    max-width: 760px;
    font-size: 13px;
}

.account-section-heading .section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.account-section-heading .section-icon .icon {
    width: 20px;
    height: 20px;
}

.editor-section-account {
    background:
        linear-gradient(180deg, rgb(var(--brand-accent-rgb) / 0.025), transparent 48%),
        var(--surface);
}

.account-form-grid {
    gap: 18px;
}

.account-form-grid .form-field {
    align-content: start;
}

.account-form-grid .form-field > span {
    font-size: 12px;
}

.account-form-grid .form-field input {
    min-height: 48px;
    padding-inline: 14px;
    border-radius: 11px;
    background: var(--surface-soft);
}

.account-form-grid .form-field input::placeholder {
    color: var(--text-faint);
    font-weight: 450;
}

.account-form-grid .form-field small {
    line-height: 1.4;
}

.permissions-section-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.permission-bulk-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.permission-bulk-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.permission-bulk-button .icon {
    width: 14px;
    height: 14px;
}

.permission-bulk-button:hover {
    border-color: var(--blue-500);
    background: var(--blue-50);
    color: var(--blue-700);
}

.dark .permission-bulk-button:hover {
    background: rgb(var(--brand-accent-rgb) / .14);
    color: #ead397;
}

.permissions-grid {
    gap: 14px;
}

.permission-group {
    min-width: 0;
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.permission-group:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / .1);
}

.permission-category {
    min-height: 52px;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
    cursor: pointer;
}

.permission-category-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 780;
}

.permission-category small {
    min-width: 48px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 10px;
    text-align: center;
}

.permission-items {
    gap: 4px;
    padding: 9px;
}

.permission-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text);
    font-size: 12px;
    font-weight: 560;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.permission-item:hover {
    border-color: var(--border);
    background: var(--surface-soft);
}

.permission-category-check,
.permission-item-check {
    position: relative;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.permission-category-check input,
.permission-item-check input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.permission-category-check > span,
.permission-item-check > span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--surface);
    pointer-events: none;
    transition: .16s ease;
}

.permission-category-check input:checked + span,
.permission-item-check input:checked + span,
.permission-category-check input:indeterminate + span {
    border-color: var(--blue-600);
    background: var(--blue-600);
    box-shadow: 0 4px 10px rgb(var(--brand-accent-rgb) / .22);
}

.permission-category-check input:checked + span::after,
.permission-item-check input:checked + span::after {
    width: 8px;
    height: 4px;
    content: '';
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-1px) rotate(-45deg);
}

.permission-category-check input:indeterminate + span::after {
    width: 8px;
    height: 2px;
    content: '';
    border-radius: 999px;
    background: #fff;
}

.permission-category-check input:focus-visible + span,
.permission-item-check input:focus-visible + span {
    outline: 3px solid rgb(var(--brand-accent-rgb) / .28);
    outline-offset: 2px;
}

.editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    min-height: 76px;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
}

.editor-actions-note {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}

.editor-actions-note .icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--blue-600);
}

.editor-actions-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.editor-actions .primary-button,
.editor-actions .secondary-button {
    min-height: 42px;
}

.temporary-password-panel {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr) auto;
    align-items: end;
    gap: 22px;
    padding: 24px 26px;
}

.temporary-password-panel .account-section-heading {
    margin: 0;
}

.section-icon-warning {
    background: #fff7ed;
    color: #ea580c;
}

.dark .section-icon-warning {
    background: rgb(234 88 12 / .15);
    color: #fdba74;
}

.temporary-password-fields {
    min-width: 0;
}

.temporary-password-action {
    align-self: end;
    padding-bottom: 1px;
}

.temporary-password-action .secondary-button {
    min-height: 48px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .temporary-password-panel {
        grid-template-columns: 1fr 1.4fr;
    }

    .temporary-password-action {
        grid-column: 2;
        justify-self: end;
    }
}

@media (max-width: 900px) {
    .account-form-hero {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .account-form-back {
        position: absolute;
        top: 22px;
        right: 22px;
    }

    .account-form-profile {
        grid-column: auto;
        margin-top: 16px;
    }

    .permissions-section-top {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-bulk-actions {
        margin-top: -8px;
    }

    .temporary-password-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .temporary-password-action {
        grid-column: auto;
        justify-self: stretch;
    }

    .temporary-password-action .secondary-button {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .account-form-page {
        gap: 13px;
    }

    .account-form-hero {
        padding: 22px 18px 18px;
        border-radius: 14px;
    }

    .account-form-hero h1 {
        padding-right: 0;
        font-size: 29px;
    }

    .account-form-hero-copy > p {
        font-size: 13px;
    }

    .account-form-back {
        position: static;
        width: fit-content;
        grid-row: 2;
    }

    .account-form-profile {
        grid-row: 3;
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 13px;
    }

    .account-form-profile-copy {
        max-width: calc(100% - 62px);
    }

    .account-form-profile-stats {
        width: 100%;
        margin-left: 0;
    }

    .account-form-stat {
        min-width: 0;
        flex: 1;
    }

    .account-editor,
    .temporary-password-panel {
        border-radius: 14px;
    }

    .editor-section {
        padding: 22px 17px;
    }

    .account-section-heading {
        gap: 11px;
        margin-bottom: 17px;
    }

    .account-section-heading h2 {
        font-size: 16px;
    }

    .permission-bulk-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .permission-bulk-button {
        width: 100%;
    }

    .permission-category {
        min-height: 50px;
        padding-inline: 12px;
    }

    .permission-items {
        padding: 7px;
    }

    .permission-item {
        min-height: 43px;
        padding-inline: 8px;
    }

    .editor-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
        padding: 14px 16px 16px;
    }

    .editor-actions-note {
        align-items: flex-start;
    }

    .editor-actions-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .editor-actions-buttons > * {
        width: 100%;
    }

    .temporary-password-panel {
        gap: 18px;
        padding: 22px 17px;
    }
}

@media (max-width: 430px) {
    .account-form-profile-stats,
    .editor-actions-buttons,
    .permission-bulk-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .account-form-profile-stats {
        display: grid;
    }
}

.account-editor .editor-section {
    border-bottom: 0;
}

/* Resto Panel 2.5.1: stanowiska, Discord i waluta USD */
.form-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    outline: none;
    background-color: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.form-field select:hover { border-color: #94a3b8; }
.form-field select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgb(var(--brand-accent-rgb) / .15); }
.form-field > span em { color: var(--text-secondary); font-size: 10px; font-style: normal; font-weight: 600; }

.account-position-label,
.account-discord-label {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-position-label { margin-top: 3px; color: var(--blue-600); }
.dark .account-position-label { color: var(--brand-accent-200); }

.positions-page,
.position-form-page {
    width: min(100%, 1420px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.positions-hero {
    padding: 30px 32px 24px;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 94% 4%, rgb(var(--brand-accent-rgb) / .09), transparent 28%), var(--surface);
}
.dark .positions-hero { background: radial-gradient(circle at 94% 4%, rgb(var(--brand-accent-rgb) / .13), transparent 30%), var(--surface); }

.position-list-panel {
    padding: 22px;
    overflow: hidden;
    border-radius: 18px;
}

.position-list {
    display: grid;
    gap: 9px;
}

.position-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 82px minmax(250px, 1fr) 130px minmax(250px, auto);
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    transition: border-color .16s ease, background-color .16s ease;
}
.position-row:hover { border-color: color-mix(in srgb, var(--blue-500) 45%, var(--border)); background: color-mix(in srgb, var(--surface) 94%, var(--blue-50)); }
.dark .position-row:hover { background: color-mix(in srgb, var(--surface) 94%, var(--blue-700)); }

.position-rank {
    width: 62px;
    min-height: 58px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    border: 1px solid rgb(var(--brand-accent-rgb) / .16);
    border-radius: 12px;
    background: var(--blue-50);
    color: var(--blue-700);
}
.dark .position-rank { border-color: rgb(var(--brand-accent-light-rgb) / .16); background: rgb(var(--brand-accent-rgb) / .15); color: var(--brand-accent-200); }
.position-rank strong { font-size: 20px; line-height: 1; }
.position-rank small { color: currentColor; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.position-rank .icon { width: 21px; height: 21px; }

.position-main { min-width: 0; display: grid; gap: 6px; }
.position-main > strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.position-meta { min-width: 0; display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--text-secondary); font-size: 11px; }
.position-meta span { min-width: 0; display: inline-flex; align-items: center; gap: 5px; }
.position-meta .icon { width: 14px; height: 14px; color: var(--blue-600); }
.scheduled-rate { width: fit-content; padding: 4px 8px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); font-size: 10px; font-weight: 750; }
.dark .scheduled-rate { background: rgb(var(--brand-accent-rgb) / .17); color: var(--brand-accent-100); }

.position-assignment { display: grid; gap: 2px; text-align: center; }
.position-assignment strong { font-size: 18px; }
.position-assignment span { color: var(--text-secondary); font-size: 10px; }

.position-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.position-actions form { margin: 0; }
.order-buttons { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.order-buttons form { display: flex; }
.icon-action {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.icon-action:hover:not(:disabled) { background: var(--blue-50); color: var(--blue-700); }
.dark .icon-action:hover:not(:disabled) { background: rgb(var(--brand-accent-rgb) / .16); color: var(--brand-accent-100); }
.icon-action:disabled { opacity: .3; cursor: not-allowed; }
.icon-action .icon { width: 15px; height: 15px; }

.position-form-hero { width: 100%; }
.position-profile-summary .account-form-avatar { font-size: 19px; }
.position-editor { overflow: hidden; padding: 0; border-radius: 18px; }
.position-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.position-rate-section { background: linear-gradient(180deg, rgb(var(--brand-accent-rgb) / .025), transparent 70%), var(--surface); }
.account-editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
}
.account-editor-actions > div:first-child { min-width: 0; display: grid; gap: 2px; }
.account-editor-actions > div:first-child strong { font-size: 12px; }
.account-editor-actions > div:first-child span { color: var(--text-secondary); font-size: 10px; }
.editor-action-buttons { display: flex; gap: 8px; }

.rate-history-panel { padding: 25px 28px; border-radius: 18px; }
.rate-history-list { display: grid; gap: 8px; }
.rate-history-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.rate-history-item strong { font-size: 13px; }
.rate-history-item span { color: var(--text-secondary); font-size: 11px; }

@media (max-width: 1120px) {
    .position-row { grid-template-columns: 72px minmax(220px, 1fr) 110px; }
    .position-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 760px) {
    .positions-page, .position-form-page { gap: 13px; }
    .positions-hero, .position-list-panel { padding: 18px; border-radius: 14px; }
    .position-row { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 13px; }
    .position-rank { width: 54px; min-height: 54px; }
    .position-assignment { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 5px; padding-top: 10px; border-top: 1px solid var(--border); text-align: left; }
    .position-actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .position-actions .small-button, .position-actions > form:not(.order-buttons form) { flex: 1 1 auto; }
    .position-form-grid { grid-template-columns: 1fr; }
    .account-editor-actions { position: static; align-items: stretch; flex-direction: column; }
    .editor-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .editor-action-buttons > * { width: 100%; }
    .rate-history-panel { padding: 20px 17px; }
}

@media (max-width: 480px) {
    .position-actions, .position-actions form, .position-actions .small-button { width: 100%; }
    .order-buttons { width: auto; }
    .order-buttons form { width: auto; }
    .editor-action-buttons { grid-template-columns: 1fr; }
    .rate-history-item { align-items: flex-start; flex-direction: column; gap: 3px; }
}


/* Resto Panel 2.5.2: regresja formularza konta — zachowanie układu 2.4.2 */
.account-details-grid {
    grid-template-columns:
        minmax(220px, 1.15fr)
        minmax(160px, .8fr)
        minmax(180px, .9fr)
        minmax(220px, 1fr)
        minmax(220px, 1fr);
    align-items: start;
}

.account-details-grid .form-field {
    min-width: 0;
}

.account-details-grid .form-field input,
.account-details-grid .form-field select {
    width: 100%;
}

@media (max-width: 1500px) {
    .account-details-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .account-position-field,
    .account-discord-field {
        grid-column: span 1;
    }
}

@media (max-width: 1050px) {
    .account-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .account-details-grid {
        grid-template-columns: 1fr;
    }
}


/* Resto Panel 2.5.3: bezpieczne rozszerzenie formularza bez regresji gotowych sekcji */
.account-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-section-employment {
    background: linear-gradient(180deg, rgb(var(--brand-accent-rgb) / .018), transparent 58%), var(--surface);
}

.account-employment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 920px;
}

.account-employment-grid .form-field {
    min-width: 0;
}

.account-employment-grid .form-field select,
.account-employment-grid .form-field input {
    width: 100%;
}

.build-mismatch-banner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(2 6 23 / .94);
    color: #fff;
}

.build-mismatch-banner > div {
    width: min(100%, 620px);
    padding: 26px;
    border: 1px solid #ef4444;
    border-radius: 16px;
    background: #111827;
}

.build-mismatch-banner strong { display: block; margin-bottom: 8px; font-size: 20px; }
.build-mismatch-banner p { margin: 0; color: #cbd5e1; line-height: 1.55; }

@media (max-width: 900px) {
    .account-employment-grid { grid-template-columns: 1fr; max-width: none; }
}

@media (max-width: 680px) {
    .account-details-grid { grid-template-columns: 1fr; }
}

/* Resto Panel 4.54.3: powiadomienia nad modalami i błędy pracowników firm */
.app-notification {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 2600;
    width: min(430px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 15px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 18px 46px rgb(15 23 42 / 0.22);
    animation: app-notification-in 180ms ease-out both;
}

.dark .app-notification {
    box-shadow: 0 20px 48px rgb(0 0 0 / 0.38);
}

.app-notification.is-hiding {
    animation: app-notification-out 160ms ease-in both;
}

.app-notification-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-600);
}

.dark .app-notification-icon {
    background: rgb(var(--brand-accent-rgb) / 0.16);
    color: var(--brand-accent-300);
}

.app-notification-success {
    border-color: #86efac;
}

.app-notification-success .app-notification-icon {
    background: #dcfce7;
    color: #15803d;
}

.dark .app-notification-success {
    border-color: rgb(74 222 128 / 0.38);
}

.dark .app-notification-success .app-notification-icon {
    background: rgb(22 101 52 / 0.3);
    color: #86efac;
}

.app-notification-error {
    border-color: #fca5a5;
}

.app-notification-error .app-notification-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.dark .app-notification-error {
    border-color: rgb(248 113 113 / 0.42);
}

.dark .app-notification-error .app-notification-icon {
    background: rgb(127 29 29 / 0.3);
    color: #fca5a5;
}

.app-notification-warning {
    border-color: #fcd34d;
}

.app-notification-warning .app-notification-icon {
    background: #fef3c7;
    color: #b45309;
}

.dark .app-notification-warning {
    border-color: rgb(245 158 11 / 0.4);
}

.dark .app-notification-warning .app-notification-icon {
    background: rgb(146 64 14 / 0.28);
    color: #fde68a;
}

.app-notification-icon .icon {
    width: 19px;
    height: 19px;
}

.app-notification-content {
    min-width: 0;
}

.app-notification-content strong {
    display: block;
    margin: 0 0 3px;
    font-size: 14px;
    line-height: 1.35;
}

.app-notification-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.app-notification-content ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.app-notification-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.app-notification-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.app-notification-close .icon {
    width: 17px;
    height: 17px;
}

@keyframes app-notification-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes app-notification-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-6px) scale(.98); }
}

@media (max-width: 720px) {
    .app-notification {
        top: 74px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}


/* Resto Panel 2.5.6: potwierdzenia dopasowane do interfejsu, bez okien przeglądarki */
body.modal-open {
    overflow: hidden;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(2 8 23 / 0.72);
    backdrop-filter: blur(5px);
    animation: app-modal-backdrop-in 150ms ease-out both;
}

/* Potwierdzenie globalne musi być nad modalem szczegółów opinii i innymi warstwami roboczymi. */
.app-modal-backdrop[data-confirm-dialog] {
    z-index: 11000;
}

.app-modal {
    width: min(100%, 540px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 28px 80px rgb(2 8 23 / 0.38);
    animation: app-modal-in 170ms ease-out both;
}

.dark .app-modal {
    box-shadow: 0 30px 90px rgb(0 0 0 / 0.58);
}

.app-modal-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #fff7ed;
    color: #c2410c;
}

.dark .app-modal-icon {
    background: rgb(154 52 18 / 0.24);
    color: #fdba74;
}

.app-modal-danger .app-modal-icon {
    background: #fef2f2;
    color: #dc2626;
}

.dark .app-modal-danger .app-modal-icon {
    background: rgb(127 29 29 / 0.28);
    color: #fca5a5;
}

.app-modal-icon .icon {
    width: 23px;
    height: 23px;
}

.app-modal-content {
    min-width: 0;
}

.app-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.app-modal-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-600);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-modal h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.app-modal p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.app-modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.app-modal-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.app-modal-close .icon {
    width: 18px;
    height: 18px;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.danger-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    border: 1px solid #dc2626;
    border-radius: 10px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 18px rgb(220 38 38 / 0.22);
}

.danger-button:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}

.app-modal-warning .danger-button {
    border-color: #d97706;
    background: #d97706;
    box-shadow: 0 8px 18px rgb(217 119 6 / 0.2);
}

.app-modal-warning .danger-button:hover {
    border-color: #b45309;
    background: #b45309;
}

.app-modal button:focus-visible {
    outline: 3px solid rgb(var(--brand-accent-rgb) / 0.35);
    outline-offset: 2px;
}

@keyframes app-modal-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes app-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
    .app-modal-backdrop {
        align-items: end;
        padding: 12px;
    }

    .app-modal {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px;
        border-radius: 18px;
    }

    .app-modal-icon {
        width: 42px;
        height: 42px;
    }

    .app-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .app-modal-actions .secondary-button,
    .app-modal-actions .danger-button {
        width: 100%;
    }
}

/* 2.6.0 — Menu restauracji */
.restaurant-menu-page,
.menu-form-page {
    display: grid;
    gap: 18px;
}

.menu-hero,
.menu-list-panel {
    border-radius: 20px;
}

.menu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.menu-tabs {
    margin-top: 22px;
}

.menu-list-panel {
    padding: 0;
    overflow: hidden;
}

.menu-list-panel > .panel-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

#restaurantMenuLiveContainer {
    padding: 18px 24px 24px;
}

.menu-category-list,
.menu-products-groups,
.menu-archive-list {
    display: grid;
    gap: 10px;
}

.menu-category-row,
.menu-product-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.menu-category-row {
    grid-template-columns: 34px 62px minmax(220px, 1fr) auto;
    min-height: 76px;
    padding: 11px 13px;
    border-radius: 15px;
}

.menu-product-row {
    grid-template-columns: 30px 42px minmax(210px, 1fr) 118px auto;
    min-height: 70px;
    padding: 10px 12px;
    border-radius: 13px;
}

.menu-category-row:hover,
.menu-product-row:hover {
    border-color: color-mix(in srgb, var(--blue-500) 40%, var(--border));
    background: color-mix(in srgb, var(--surface) 96%, var(--blue-50));
}

.dark .menu-category-row:hover,
.dark .menu-product-row:hover {
    background: color-mix(in srgb, var(--surface) 95%, var(--blue-700));
}

.menu-category-row.is-dragging,
.menu-product-row.is-dragging {
    opacity: .48;
    border-style: dashed;
}

.drag-handle {
    width: 30px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary);
    cursor: grab;
}

.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { background: var(--surface-muted); color: var(--blue-600); }
.drag-handle .icon { width: 20px; height: 20px; }

.menu-rank {
    min-width: 54px;
    min-height: 50px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 18%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--blue-50) 75%, var(--surface));
    color: var(--blue-700);
}

.dark .menu-rank {
    background: rgb(var(--brand-accent-rgb) / .13);
    color: #e3c47d;
}

.menu-rank strong { font-size: 17px; line-height: 1; }
.menu-rank small { font-size: 9px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.menu-rank.compact { min-width: 38px; min-height: 38px; border-radius: 10px; }
.menu-rank.compact strong { font-size: 13px; }

.menu-category-copy,
.menu-product-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.menu-category-copy strong,
.menu-product-copy > strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-category-copy span,
.menu-product-copy small {
    color: var(--text-secondary);
    font-size: 11px;
}

.menu-product-price {
    color: var(--blue-700);
    font-size: 15px;
    font-weight: 800;
}

.dark .menu-product-price { color: var(--brand-accent-200); }

.menu-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.menu-row-actions form { margin: 0; }

.menu-product-status {
    display: flex;
    justify-content: flex-start;
}

.status-badge.status-inactive {
    border-color: color-mix(in srgb, #f59e0b 28%, var(--border));
    background: rgb(245 158 11 / .10);
    color: #b45309;
}

.dark .status-badge.status-inactive { color: #fbbf24; }
.status-badge.status-inactive > span { background: #f59e0b; }

.menu-product-group {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-muted);
}

.menu-product-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.menu-product-group-header > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.menu-product-group-header > div > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.menu-product-group-header strong { font-size: 14px; }
.menu-product-group-header small { color: var(--text-secondary); font-size: 10px; }

.menu-category-number {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: var(--blue-600);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.menu-product-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.menu-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.menu-archive-section {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-muted);
}

.menu-archive-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.menu-archive-heading > span {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    background: color-mix(in srgb, var(--blue-50) 80%, var(--surface));
    color: var(--blue-700);
}

.dark .menu-archive-heading > span { background: rgb(var(--brand-accent-rgb) / .14); color: var(--brand-accent-200); }
.menu-archive-heading .icon { width: 19px; height: 19px; }
.menu-archive-heading h3 { margin: 0; font-size: 14px; }
.menu-archive-heading p { margin: 2px 0 0; color: var(--text-secondary); font-size: 10px; }
.menu-archive-list { padding: 10px; }

.menu-archive-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.menu-archive-row > div { min-width: 0; display: grid; gap: 3px; }
.menu-archive-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.menu-archive-row small { color: var(--text-secondary); font-size: 10px; }
.menu-archive-empty { padding: 26px 15px; color: var(--text-secondary); font-size: 12px; text-align: center; }

.menu-form-hero { width: 100%; }
.menu-editor { padding: 0; overflow: hidden; border-radius: 18px; }
.menu-category-form-grid { grid-template-columns: minmax(0, 680px); }
.menu-item-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu-item-form-grid .menu-availability-field { grid-column: 1 / -1; }
.menu-price-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.menu-price-editor { background: linear-gradient(180deg, rgb(var(--brand-accent-rgb) / .025), transparent 72%), var(--surface); }

.form-switch-line {
    min-height: 58px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
}

.form-switch-line input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--blue-600);
}

.form-switch-line > span { display: grid; gap: 3px; }
.form-switch-line strong { font-size: 12px; }
.form-switch-line small { color: var(--text-secondary); font-size: 10px; line-height: 1.45; }

.menu-current-price {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 13px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 18%, var(--border));
    border-radius: 11px;
    background: color-mix(in srgb, var(--blue-50) 75%, var(--surface));
}

.dark .menu-current-price { background: rgb(var(--brand-accent-rgb) / .13); }
.menu-current-price span { color: var(--text-secondary); font-size: 10px; }
.menu-current-price strong { color: var(--blue-700); font-size: 17px; }
.dark .menu-current-price strong { color: var(--brand-accent-200); }

.menu-price-history-panel {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}

.menu-price-history-panel > .section-heading { padding: 22px 24px 16px; }
.menu-price-history-panel .rate-history-list { padding: 0 24px 24px; }

@media (max-width: 1180px) {
    .menu-product-row {
        grid-template-columns: 30px 42px minmax(200px, 1fr) 110px;
    }
    .menu-product-row .menu-row-actions { grid-column: 3 / -1; justify-content: flex-start; }
    .menu-category-row { grid-template-columns: 34px 58px minmax(190px, 1fr); }
    .menu-category-row .menu-row-actions { grid-column: 3 / -1; justify-content: flex-start; }
}

@media (max-width: 820px) {
    .menu-hero-actions { width: 100%; justify-content: stretch; }
    .menu-hero-actions .primary-button,
    .menu-hero-actions .secondary-button { flex: 1 1 180px; justify-content: center; }
    .menu-archive-grid { grid-template-columns: 1fr; }
    .menu-item-form-grid,
    .menu-price-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .menu-hero,
    .menu-list-panel { border-radius: 14px; }
    .menu-list-panel > .panel-header { padding: 17px; }
    #restaurantMenuLiveContainer { padding: 12px; }
    .menu-tabs { overflow-x: auto; }
    .menu-category-row,
    .menu-product-row { grid-template-columns: 28px 42px minmax(0, 1fr); padding: 10px; }
    .menu-category-row .menu-row-actions,
    .menu-product-row .menu-row-actions { grid-column: 1 / -1; justify-content: stretch; }
    .menu-product-status { grid-column: 2 / -1; }
    .menu-row-actions .small-button,
    .menu-row-actions > form { flex: 1 1 auto; }
    .menu-row-actions > form .small-button { width: 100%; justify-content: center; }
    .menu-product-group-header { align-items: stretch; flex-direction: column; }
    .menu-product-group-header .small-button { justify-content: center; }
    .menu-archive-row { align-items: stretch; flex-direction: column; }
    .menu-archive-row .small-button { width: 100%; justify-content: center; }
}

.menu-group-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.menu-group-empty > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--blue-500);
    border-radius: 12px;
    background: var(--accent-soft);
}

.menu-group-empty svg {
    width: 18px;
    height: 18px;
}

.menu-group-empty strong,
.menu-group-empty small {
    display: block;
}

.menu-group-empty strong {
    color: var(--text);
    margin-bottom: 3px;
}

/* 2.6.1 — dopracowany nagłówek Menu restauracji */
.restaurant-menu-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    gap: 20px;
}

.menu-hero {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% -20%, rgb(var(--brand-accent-rgb) / 0.16), transparent 34%),
        var(--surface);
}

.dark .menu-hero {
    background:
        radial-gradient(circle at 92% -20%, rgb(var(--brand-accent-rgb) / 0.17), transparent 36%),
        var(--surface);
}

.menu-hero-main {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 30px 26px;
}

.menu-hero-title {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.menu-hero-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin-top: 2px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 26%, var(--border));
    border-radius: 14px;
    color: var(--blue-600);
    background: color-mix(in srgb, var(--blue-50) 82%, var(--surface));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45);
}

.dark .menu-hero-icon {
    color: var(--brand-accent-200);
    background: rgb(var(--brand-accent-rgb) / 0.14);
    box-shadow: none;
}

.menu-hero-icon .icon {
    width: 23px;
    height: 23px;
}

.menu-hero .accounts-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(30px, 3vw, 40px);
}

.menu-hero .accounts-heading p {
    max-width: 620px;
    line-height: 1.55;
}

.menu-hero-actions {
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.menu-action-button {
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 11px;
    white-space: nowrap;
}

.menu-hero-footer {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 30px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.menu-tabs {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 4px;
    flex: 0 1 auto;
}

.menu-tabs a {
    min-height: 40px;
    padding: 0 15px;
}

.menu-live-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 650;
}

.menu-live-note .icon {
    width: 15px;
    height: 15px;
    color: var(--blue-500);
}

.menu-list-panel {
    border-radius: 18px;
}

.menu-list-panel > .panel-header {
    align-items: center;
    gap: 24px;
    padding: 22px 24px 20px;
    margin: 0;
    background: color-mix(in srgb, var(--surface-soft) 36%, transparent);
}

.menu-list-panel .account-list-title h2 {
    font-size: 19px;
}

.menu-search {
    width: min(390px, 100%);
    flex: 0 1 390px;
}

@media (max-width: 980px) {
    .menu-hero-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .menu-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .menu-live-note {
        display: none;
    }
}

@media (max-width: 760px) {
    .menu-hero-main {
        min-height: auto;
        padding: 22px 20px 20px;
    }

    .menu-hero-title {
        gap: 13px;
    }

    .menu-hero-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .menu-hero .accounts-heading h1 {
        font-size: 29px;
    }

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

    .menu-action-button {
        width: 100%;
        justify-content: center;
    }

    .menu-hero-footer {
        padding: 10px 20px;
        overflow: hidden;
    }

    .menu-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .menu-tabs a {
        flex: 1 0 auto;
    }

    .menu-list-panel > .panel-header {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .menu-search {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 480px) {
    .menu-hero-title {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .menu-hero-actions {
        grid-template-columns: 1fr;
    }

    .menu-hero-footer {
        padding-inline: 14px;
    }

    .menu-tabs a {
        padding-inline: 13px;
    }
}

/* 2.7.0 — Rachunki */
.invoice-page,
.invoice-editor-page,
.invoice-detail-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.invoice-hero {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
    background:
        radial-gradient(circle at 94% -20%, rgb(var(--brand-accent-rgb) / 0.17), transparent 34%),
        var(--surface);
}

.dark .invoice-hero {
    background:
        radial-gradient(circle at 94% -20%, rgb(var(--brand-accent-rgb) / 0.18), transparent 36%),
        var(--surface);
}

.invoice-hero-main {
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 30px 24px;
}

.invoice-hero-title {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.invoice-hero-icon,
.invoice-row-icon,
.invoice-product-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--blue-600);
    background: color-mix(in srgb, var(--blue-50) 82%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--blue-500) 25%, var(--border));
}

.dark .invoice-hero-icon,
.dark .invoice-row-icon,
.dark .invoice-product-icon {
    color: var(--brand-accent-200);
    background: rgb(var(--brand-accent-rgb) / 0.14);
}

.invoice-hero-icon {
    width: 48px;
    height: 48px;
    margin-top: 2px;
    border-radius: 14px;
}

.invoice-hero-icon .icon {
    width: 23px;
    height: 23px;
}

.invoice-hero .accounts-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(30px, 3vw, 40px);
}

.invoice-hero .accounts-heading p {
    max-width: 680px;
    line-height: 1.55;
}

.invoice-new-button {
    flex: 0 0 auto;
    min-height: 46px;
    padding-inline: 18px;
    white-space: nowrap;
}

.invoice-status-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.invoice-status-tabs a {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    transition: color 150ms ease, background 150ms ease;
}

.invoice-status-tabs a:last-child {
    border-right: 0;
}

.invoice-status-tabs a:hover,
.invoice-status-tabs a.active {
    color: var(--blue-600);
    background: color-mix(in srgb, var(--blue-50) 62%, transparent);
}

.dark .invoice-status-tabs a:hover,
.dark .invoice-status-tabs a.active {
    color: var(--brand-accent-200);
    background: rgb(var(--brand-accent-rgb) / 0.11);
}

.invoice-status-tabs strong {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding-inline: 6px;
    border-radius: 999px;
    color: inherit;
    background: color-mix(in srgb, currentColor 10%, transparent);
    font-size: 11px;
}

.invoice-list-panel {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.invoice-list-header {
    margin: 0;
    padding: 22px 24px 20px;
    background: color-mix(in srgb, var(--surface-soft) 38%, transparent);
}

.invoice-list-header h2,
.invoice-editor-section-header h2 {
    margin: 3px 0 4px;
    color: var(--text);
    font-size: 19px;
}

.invoice-list-header p,
.invoice-editor-section-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.invoice-list {
    display: grid;
}

.invoice-list-row {
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(230px, 1.25fr) minmax(190px, .9fr) minmax(120px, .6fr) minmax(130px, .6fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.invoice-list-row:hover {
    background: color-mix(in srgb, var(--surface-soft) 52%, var(--surface));
}

.invoice-number-cell,
.invoice-employee-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.invoice-row-icon .icon {
    width: 19px;
    height: 19px;
}

.invoice-number-cell strong,
.invoice-employee-cell strong,
.invoice-money-cell span {
    display: block;
    color: var(--text);
    font-size: 13px;
}

.invoice-number-cell small,
.invoice-employee-cell small,
.invoice-money-cell small,
.invoice-total-cell small,
.invoice-status-cell small {
    display: block;
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 10px;
    line-height: 1.4;
}

.invoice-status-cell {
    min-width: 0;
}

.status-badge.status-warning {
    color: #b45309;
    background: rgb(245 158 11 / 0.13);
}

.status-badge.status-warning > span {
    background: #f59e0b;
}

.status-badge.status-danger {
    color: #dc2626;
    background: rgb(239 68 68 / 0.13);
}

.status-badge.status-danger > span {
    background: #ef4444;
}

.dark .status-badge.status-warning {
    color: #fbbf24;
}

.dark .status-badge.status-danger {
    color: #fda4af;
}

.invoice-total-cell strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 16px;
}

.invoice-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.invoice-row-actions form {
    margin: 0;
}

.small-button.primary-small {
    color: #fff;
    border-color: var(--blue-600);
    background: var(--blue-600);
}

.invoice-filter-panel {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.15fr) minmax(180px, .9fr) minmax(145px, .65fr) minmax(145px, .65fr) auto;
    align-items: end;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
}

.invoice-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 1px;
}

.management-invoice-row {
    grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(185px, .8fr) minmax(120px, .55fr) auto;
}

.account-avatar.small {
    width: 38px;
    height: 38px;
    font-size: 11px;
}

.invoice-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .72fr);
    align-items: start;
    gap: 20px;
}

.invoice-catalog-panel,
.invoice-cart-panel,
.invoice-detail-items-panel,
.invoice-detail-side,
.invoice-history-panel {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.invoice-editor-section-header {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 38%, transparent);
}

.invoice-catalog-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .36fr);
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.invoice-product-search {
    width: 100%;
}

.invoice-category-filter select {
    min-height: 44px;
}

.invoice-catalog-groups {
    display: grid;
}

.invoice-catalog-group {
    padding: 19px 20px 22px;
    border-bottom: 1px solid var(--border);
}

.invoice-catalog-group:last-child {
    border-bottom: 0;
}

.invoice-catalog-group > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.invoice-catalog-group > header strong {
    color: var(--text);
    font-size: 14px;
}

.invoice-catalog-group > header small {
    color: var(--text-faint);
    font-size: 10px;
}

.invoice-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.invoice-product-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    text-align: left;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.invoice-product-card:hover {
    border-color: color-mix(in srgb, var(--blue-500) 45%, var(--border));
    background: color-mix(in srgb, var(--blue-50) 50%, var(--surface));
    transform: translateY(-1px);
}

.dark .invoice-product-card:hover {
    background: rgb(var(--brand-accent-rgb) / .09);
}

.invoice-product-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.invoice-product-icon .icon {
    width: 17px;
    height: 17px;
}

.invoice-product-copy {
    min-width: 0;
}

.invoice-product-copy strong,
.invoice-product-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-product-copy strong {
    font-size: 12px;
}

.invoice-product-copy small {
    margin-top: 3px;
    color: var(--text-faint);
    font-size: 9px;
}

.invoice-product-price {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.invoice-product-add {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    color: var(--blue-600);
    border-radius: 8px;
    background: var(--accent-soft);
}

.invoice-product-add .icon {
    width: 14px;
    height: 14px;
}

.invoice-cart-panel {
    position: sticky;
    top: 88px;
}

.invoice-cart-items {
    max-height: 420px;
    overflow-y: auto;
    display: grid;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.invoice-cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto 28px;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.invoice-cart-row.is-unavailable {
    background: rgb(239 68 68 / .06);
}

.invoice-cart-copy {
    min-width: 0;
}

.invoice-cart-copy strong,
.invoice-cart-copy small,
.invoice-item-warning {
    display: block;
}

.invoice-cart-copy strong {
    color: var(--text);
    font-size: 12px;
}

.invoice-cart-copy small {
    margin-top: 3px;
    color: var(--text-faint);
    font-size: 9px;
}

.invoice-item-warning {
    margin-top: 5px;
    color: #dc2626;
    font-size: 9px;
}

.invoice-quantity-control {
    display: grid;
    grid-template-columns: 28px 48px 28px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-soft);
}

.invoice-quantity-control button,
.invoice-quantity-control .invoice-quantity-input {
    height: 29px;
    color: var(--text);
    background: var(--surface-soft);
    font-size: 12px;
}

.invoice-quantity-control button {
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
}

.invoice-quantity-control .invoice-quantity-input {
    width: 100%;
    min-width: 0;
    padding: 0 4px;
    border: 0;
    border-inline: 1px solid var(--border);
    border-radius: 0;
    outline: 0;
    text-align: center;
    font: inherit;
    font-weight: 800;
    appearance: none;
}

.invoice-quantity-control .invoice-quantity-input:focus {
    background: var(--surface);
    box-shadow: inset 0 0 0 2px var(--accent-soft);
}

.invoice-quantity-control .invoice-quantity-input[aria-invalid="true"] {
    background: color-mix(in srgb, var(--danger, #dc5252) 8%, var(--surface-soft));
}

.invoice-quantity-control button:hover {
    color: var(--blue-600);
    background: var(--accent-soft);
}

.invoice-cart-line-total {
    min-width: 64px;
    color: var(--text);
    text-align: right;
    font-size: 12px;
}

.invoice-cart-remove {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    color: var(--text-faint);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.invoice-cart-remove:hover {
    color: #dc2626;
    border-color: rgb(239 68 68 / .25);
    background: rgb(239 68 68 / .08);
}

.invoice-cart-empty {
    min-height: 190px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 30px;
    color: var(--text-faint);
    text-align: center;
}

.invoice-cart-empty > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 5px;
    color: var(--blue-600);
    border-radius: 12px;
    background: var(--accent-soft);
}

.invoice-cart-empty strong {
    color: var(--text);
    font-size: 13px;
}

.invoice-cart-empty small {
    font-size: 10px;
}

.invoice-discount-note {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 36%, transparent);
}

.invoice-discount-note .form-field {
    min-width: 0;
}

.invoice-discount-note .form-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.invoice-note-field textarea {
    min-height: 122px;
    background: var(--surface);
}

.invoice-note-field small {
    display: block;
    margin-top: 1px;
    text-align: right;
}

.invoice-discount-field input {
    background: var(--surface);
}

.invoice-totals {
    margin: 0;
    padding: 3px 18px 8px;
}

.invoice-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
}

.invoice-totals dd {
    margin: 0;
    color: var(--text);
    font-weight: 750;
}

.invoice-totals .invoice-total-final {
    padding: 15px 0 12px;
    border-bottom: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
}

.invoice-total-final dd {
    color: var(--blue-600);
    font-size: 21px;
}

.dark .invoice-total-final dd {
    color: var(--brand-accent-200);
}

.invoice-total-with-copy {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.invoice-copy-total-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.invoice-copy-total-button:hover,
.invoice-copy-total-button:focus-visible {
    border-color: color-mix(in srgb, var(--blue-500) 48%, var(--border));
    background: color-mix(in srgb, var(--blue-500) 10%, var(--surface-soft));
    color: var(--blue-600);
    outline: none;
}

.invoice-copy-total-button:active {
    transform: translateY(1px);
}

.invoice-copy-total-button.is-copied {
    border-color: color-mix(in srgb, var(--success) 48%, var(--border));
    background: color-mix(in srgb, var(--success) 12%, var(--surface-soft));
    color: var(--success);
}

.invoice-copy-icon {
    position: relative;
    display: block;
    width: 13px;
    height: 13px;
}

.invoice-copy-icon::before,
.invoice-copy-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 9px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

.invoice-copy-icon::before {
    left: 1px;
    top: 3px;
    opacity: .72;
}

.invoice-copy-icon::after {
    right: 1px;
    top: 0;
    background: var(--surface-soft);
}

.invoice-copy-total-button:hover .invoice-copy-icon::after,
.invoice-copy-total-button:focus-visible .invoice-copy-icon::after,
.invoice-copy-total-button.is-copied .invoice-copy-icon::after {
    background: transparent;
}

.invoice-editor-actions {
    display: grid;
    grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
    gap: 9px;
    padding: 14px 18px 18px;
}

.invoice-editor-actions button {
    width: 100%;
    justify-content: center;
}

.invoice-form-summary .account-form-avatar .icon {
    width: 22px;
    height: 22px;
}

.invoice-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
    align-items: start;
    gap: 20px;
}

.invoice-detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.invoice-detail-summary > strong {
    color: var(--blue-600);
    font-size: 22px;
}

.invoice-detail-items {
    display: grid;
}

.invoice-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}

.invoice-detail-item > div {
    min-width: 0;
}

.invoice-detail-item strong,
.invoice-detail-item small {
    display: block;
}

.invoice-detail-item strong {
    color: var(--text);
    font-size: 13px;
}

.invoice-detail-item small {
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 10px;
}

.invoice-note-box,
.invoice-rejection-box {
    margin: 18px 20px 20px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.invoice-note-box p,
.invoice-rejection-box p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.invoice-rejection-box {
    border-color: rgb(239 68 68 / .3);
    background: rgb(239 68 68 / .07);
}

.invoice-detail-totals {
    padding: 10px 20px 4px;
}

.invoice-review-panel {
    display: grid;
    gap: 16px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
}

.invoice-review-panel form,
.invoice-review-panel button,
.invoice-edit-detail-button {
    width: 100%;
}

.invoice-review-panel button,
.invoice-edit-detail-button {
    justify-content: center;
}

.invoice-reject-form {
    display: grid;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.invoice-edit-detail-button {
    margin: 5px 20px 20px;
    width: calc(100% - 40px);
}

.invoice-history-panel {
    padding-bottom: 14px;
}

.invoice-history-list {
    display: grid;
    padding: 8px 24px 12px;
}

.invoice-history-row {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
}

.invoice-history-row:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 27px;
    bottom: -7px;
    width: 1px;
    background: var(--border);
}

.invoice-history-dot {
    width: 11px;
    height: 11px;
    margin-top: 4px;
    border: 3px solid var(--surface);
    border-radius: 999px;
    background: var(--blue-500);
    box-shadow: 0 0 0 1px var(--blue-500);
}

.invoice-history-row strong,
.invoice-history-row small {
    display: block;
}

.invoice-history-row strong {
    color: var(--text);
    font-size: 12px;
}

.invoice-history-row small {
    margin-top: 3px;
    color: var(--text-faint);
    font-size: 9px;
}

.invoice-history-row p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 11px;
}

.invoice-catalog-empty {
    min-height: 280px;
}

@media (max-width: 1220px) {
    .invoice-list-row,
    .management-invoice-row {
        grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .9fr) minmax(120px, .6fr) auto;
    }

    .invoice-money-cell {
        display: none;
    }

    .management-invoice-row .invoice-status-cell {
        display: none;
    }

    .invoice-filter-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .invoice-filter-actions {
        grid-column: span 3;
        justify-content: flex-end;
    }

    .invoice-editor-grid {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .72fr);
    }

    .invoice-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .invoice-editor-grid,
    .invoice-detail-grid {
        grid-template-columns: 1fr;
    }

    .invoice-cart-panel {
        position: static;
    }

    .invoice-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-detail-side {
        order: -1;
    }
}

@media (max-width: 760px) {
    .invoice-hero-main {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 20px 20px;
    }

    .invoice-hero-title {
        gap: 13px;
    }

    .invoice-hero-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .invoice-hero .accounts-heading h1 {
        font-size: 29px;
    }

    .invoice-new-button {
        width: 100%;
        justify-content: center;
    }

    .invoice-status-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-status-tabs a:nth-child(2) {
        border-right: 0;
    }

    .invoice-status-tabs a:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .invoice-list-row,
    .management-invoice-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 13px;
        padding: 16px;
    }

    .invoice-status-cell,
    .management-invoice-row .invoice-status-cell {
        display: block;
        grid-column: 1;
    }

    .invoice-total-cell {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    .invoice-employee-cell {
        grid-column: 1 / -1;
    }

    .invoice-row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 11px;
        border-top: 1px solid var(--border);
    }

    .invoice-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .invoice-filter-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .invoice-filter-actions > * {
        flex: 1;
        justify-content: center;
    }

    .invoice-catalog-tools,
    .invoice-product-grid {
        grid-template-columns: 1fr;
    }

    .invoice-cart-row {
        grid-template-columns: minmax(0, 1fr) auto 28px;
    }

    .invoice-quantity-control {
        grid-column: 1 / -1;
        width: max-content;
    }

    .invoice-editor-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .invoice-filter-panel {
        grid-template-columns: 1fr;
    }

    .invoice-filter-actions {
        grid-column: 1;
        flex-direction: column;
    }

    .invoice-status-tabs a {
        padding-inline: 10px;
        font-size: 11px;
    }

    .invoice-catalog-group,
    .invoice-editor-section-header,
    .invoice-catalog-tools {
        padding-inline: 15px;
    }

    .invoice-product-card {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .invoice-product-add {
        display: none;
    }
}

/* Invoice drawer — v2.7.1 */
body.invoice-drawer-open {
    overflow: hidden;
}

:root {
    --invoice-drawer-footer-height: 94px;
}

.invoice-drawer-host {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
    visibility: hidden;
}

.invoice-drawer-host.is-open {
    pointer-events: auto;
    visibility: visible;
}

.invoice-drawer-shell {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
}

.invoice-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .56);
    opacity: 0;
    transition: opacity .2s ease;
    cursor: default;
}

.invoice-drawer-host.is-open .invoice-drawer-backdrop {
    opacity: 1;
}

.invoice-drawer {
    position: relative;
    width: min(860px, calc(100vw - 42px));
    height: 100dvh;
    max-height: 100dvh;
    background: var(--page-bg);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 64px rgba(15, 23, 42, .28);
    transform: translateX(100%);
    transition: transform .24s ease;
    overflow: hidden;
}

.invoice-drawer-host.is-open .invoice-drawer {
    transform: translateX(0);
}

.invoice-drawer-document {
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    isolation: isolate;
}

.invoice-drawer-header {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    padding: 22px 24px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.invoice-drawer-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 52px;
}

.invoice-drawer-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
}

.dark .invoice-drawer-heading-icon {
    color: var(--brand-accent-100);
    background: rgba(37, 99, 235, .13);
    border-color: rgba(96, 165, 250, .2);
}

.invoice-drawer-heading-icon .icon {
    width: 22px;
    height: 22px;
}

.invoice-drawer-heading h2 {
    margin: 3px 0 5px;
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--text);
}

.invoice-drawer-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.invoice-drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.invoice-drawer-close:hover {
    color: var(--blue-600);
    border-color: var(--brand-accent-100);
    background: var(--blue-50);
}

.dark .invoice-drawer-close:hover {
    color: var(--blue-200);
    background: rgba(37, 99, 235, .12);
}

.invoice-drawer-close .icon {
    width: 18px;
    height: 18px;
}

.invoice-drawer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.invoice-drawer-meta > span:not(.status-badge) {
    min-width: 120px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.invoice-drawer-meta small,
.invoice-drawer-footer-total small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.invoice-drawer-meta strong {
    color: var(--text);
    font-size: .91rem;
}

.invoice-drawer-form {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.invoice-drawer-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    background: var(--page-bg);
    overscroll-behavior: contain;
    padding: 20px 24px calc(var(--invoice-drawer-footer-height) + 20px);
    scroll-padding-bottom: calc(var(--invoice-drawer-footer-height) + 20px);
}

.invoice-drawer-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
    gap: 18px;
    align-items: start;
}

.invoice-drawer-pane,
.invoice-detail-drawer-section {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.invoice-drawer-products {
    min-height: 580px;
}

.invoice-drawer-cart {
    position: sticky;
    top: 0;
}

.invoice-drawer-pane .invoice-editor-section-header,
.invoice-detail-drawer-section .invoice-editor-section-header {
    padding: 0 0 14px;
}

.invoice-drawer-pane .invoice-editor-section-header h3,
.invoice-detail-drawer-section .invoice-editor-section-header h3 {
    margin: 3px 0 4px;
    color: var(--text);
    font-size: 1.05rem;
}

.invoice-drawer-pane .invoice-editor-section-header p,
.invoice-detail-drawer-section .invoice-editor-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: .87rem;
}

.invoice-drawer-products .invoice-catalog-tools {
    grid-template-columns: minmax(0, 1fr) 175px;
    margin-bottom: 12px;
}

.invoice-drawer-products .invoice-product-grid {
    grid-template-columns: 1fr;
}

.invoice-drawer-products .invoice-product-card {
    min-height: 68px;
    padding: 10px 11px;
}

.invoice-drawer-cart .invoice-cart-items {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 3px;
}

.invoice-drawer-cart .invoice-cart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
}

.invoice-drawer-cart .invoice-quantity-control {
    grid-column: 1;
}

.invoice-drawer-cart .invoice-cart-line-total,
.invoice-drawer-cart .invoice-cart-remove {
    grid-row: 1;
}

.invoice-drawer-cart .invoice-cart-line-total {
    grid-column: 2;
    padding-right: 34px;
}

.invoice-drawer-cart .invoice-cart-remove {
    grid-column: 2;
    justify-self: end;
}

.invoice-drawer-cart .invoice-discount-note {
    grid-template-columns: 150px minmax(0, 1fr);
    margin-top: 16px;
}

.invoice-drawer-mobile-tabs {
    display: none;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.invoice-drawer-mobile-tabs button {
    flex: 1 1 50%;
    border: 0;
    border-radius: 9px;
    padding: 9px 10px;
    color: var(--muted);
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.invoice-drawer-mobile-tabs button.active {
    color: var(--blue-700);
    background: var(--blue-50);
}

.dark .invoice-drawer-mobile-tabs button.active {
    color: var(--blue-200);
    background: rgba(37, 99, 235, .16);
}

.invoice-drawer-mobile-tabs span {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .13);
    font-size: .75rem;
}

.invoice-drawer-footer {
    position: sticky;
    bottom: 0;
    z-index: 6;
    flex: 0 0 auto;
    min-height: var(--invoice-drawer-footer-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border-top: 1px solid var(--border);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .06);
    backdrop-filter: blur(10px);
}

.invoice-drawer-footer-total strong {
    color: var(--blue-600);
    font-size: 1.32rem;
}

.dark .invoice-drawer-footer-total strong {
    color: var(--brand-accent-100);
}

.invoice-drawer-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.invoice-drawer-footer-actions .primary-button,
.invoice-drawer-footer-actions .secondary-button,
.invoice-drawer-footer-actions .danger-button,
.invoice-drawer-footer-actions .warning-button {
    min-height: 42px;
    justify-content: center;
}

.warning-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .48rem;
    padding: .72rem 1rem;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    color: #92400e;
    background: #fffbeb;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.warning-button:hover {
    color: #78350f;
    background: #fef3c7;
    border-color: #d97706;
}

.dark .warning-button {
    color: #fde68a;
    background: rgba(217, 119, 6, .13);
    border-color: rgba(245, 158, 11, .55);
}

.warning-button .icon {
    width: 1rem;
    height: 1rem;
}

.invoice-detail-drawer-meta {
    align-items: center;
}

.invoice-detail-drawer-meta .status-badge {
    min-height: 38px;
    align-self: stretch;
}

.invoice-detail-drawer-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 16px;
    margin-top: 16px;
}

.invoice-detail-drawer-section + .invoice-detail-drawer-section {
    margin-top: 16px;
}

.invoice-detail-drawer-grid .invoice-detail-drawer-section + .invoice-detail-drawer-section {
    margin-top: 0;
}

.invoice-detail-drawer-section .invoice-detail-items,
.invoice-detail-drawer-section .invoice-history-list {
    padding: 0;
}

.invoice-detail-notes {
    display: grid;
    align-content: start;
    gap: 12px;
}

.invoice-note-box.muted {
    opacity: .72;
}

.invoice-decision-section form + form {
    margin-top: 14px;
}

.invoice-decision-section .form-field {
    margin: 0;
}

.invoice-detail-drawer-footer {
    min-height: var(--invoice-drawer-footer-height);
}

.invoice-drawer-detail .invoice-drawer-scroll {
    padding-bottom: calc(var(--invoice-drawer-footer-height) + 28px);
}

.invoice-drawer-detail .invoice-detail-drawer-section,
.invoice-drawer-detail .invoice-note-box,
.invoice-drawer-detail .invoice-rejection-box,
.invoice-drawer-detail .invoice-history-row {
    scroll-margin-bottom: calc(var(--invoice-drawer-footer-height) + 20px);
}

.invoice-drawer-detail .invoice-detail-drawer-meta {
    gap: 8px;
}

.invoice-drawer-detail .invoice-detail-item {
    align-items: start;
}

.invoice-drawer-detail .invoice-note-box,
.invoice-drawer-detail .invoice-rejection-box {
    padding: 15px 16px;
}

@media (max-width: 900px) {
    .invoice-drawer {
        width: min(720px, calc(100vw - 22px));
    }

    .invoice-drawer-columns,
    .invoice-detail-drawer-grid {
        grid-template-columns: 1fr;
    }

    .invoice-drawer-cart {
        position: static;
    }

    .invoice-drawer-products {
        min-height: auto;
    }
}

@media (max-width: 680px) {
    .invoice-drawer {
        width: 100vw;
        border-left: 0;
    }

    .invoice-drawer-header {
        padding: 16px 16px 14px;
    }

    .invoice-drawer-heading {
        gap: 10px;
        padding-right: 42px;
    }

    .invoice-drawer-heading-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }

    .invoice-drawer-heading h2 {
        font-size: 1.18rem;
    }

    .invoice-drawer-heading p {
        font-size: .82rem;
    }

    .invoice-drawer-close {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
    }

    .invoice-drawer-meta {
        gap: 7px;
        margin-top: 12px;
        padding-top: 11px;
    }

    .invoice-drawer-meta > span:not(.status-badge) {
        min-width: 0;
        flex: 1 1 115px;
        padding: 8px 9px;
    }

    .invoice-drawer-scroll {
        padding: 14px 14px 22px;
    }

    .invoice-drawer-mobile-tabs {
        display: flex;
        position: sticky;
        top: -14px;
        z-index: 2;
    }

    .invoice-drawer-pane {
        display: none;
        padding: 14px;
        border-radius: 14px;
    }

    .invoice-drawer-pane.active {
        display: block;
    }

    .invoice-drawer-products .invoice-catalog-tools,
    .invoice-drawer-cart .invoice-discount-note {
        grid-template-columns: 1fr;
    }

    .invoice-drawer-cart .invoice-cart-items {
        max-height: none;
    }

    .invoice-drawer-footer {
        align-items: stretch;
        padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    }

    .invoice-drawer-footer-total {
        min-width: 86px;
    }

    .invoice-drawer-footer-total strong {
        font-size: 1.12rem;
    }

    .invoice-drawer-footer-actions {
        flex: 1 1 auto;
        gap: 6px;
    }

    .invoice-drawer-footer-actions .secondary-button,
    .invoice-drawer-footer-actions .danger-button,
    .invoice-drawer-footer-actions .warning-button,
    .invoice-drawer-footer-actions .primary-button {
        min-height: 40px;
        padding: .62rem .76rem;
        font-size: .84rem;
    }

    .invoice-drawer-footer-actions [data-invoice-clear] {
        display: none;
    }

    .invoice-detail-drawer-grid {
        gap: 12px;
    }

    .invoice-detail-drawer-section {
        padding: 14px;
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .invoice-drawer,
    .invoice-drawer-backdrop {
        transition: none;
    }
}

/* Invoice drawer layout polish — v2.7.2 */
@media (min-width: 1101px) {
    .invoice-drawer {
        width: min(1180px, calc(100vw - 64px));
    }

    .invoice-drawer-scroll {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 18px 22px 20px;
    }

    .invoice-drawer-scroll > .form-alert:not(.hidden) {
        flex: 0 0 auto;
        margin-bottom: 14px;
    }

    .invoice-drawer-columns {
        flex: 1 1 auto;
        min-height: 0;
        grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr);
        gap: 16px;
        align-items: stretch;
    }

    .invoice-drawer-pane {
        min-height: 0;
        overflow: hidden;
    }

    .invoice-drawer-products,
    .invoice-drawer-cart {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .invoice-drawer-products {
        min-height: 0;
    }

    .invoice-drawer-products #invoiceCatalogContainer {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .invoice-drawer-products .invoice-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-drawer-cart {
        position: static;
    }

    .invoice-drawer-cart .invoice-cart-items {
        min-height: 124px;
        max-height: none;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.invoice-drawer-header {
    padding: 20px 26px 17px;
}

.invoice-drawer-heading-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
}

.invoice-drawer-heading h2 {
    margin-top: 2px;
    font-size: clamp(1.35rem, 2vw, 1.62rem);
    line-height: 1.2;
}

.invoice-drawer-heading p {
    max-width: 680px;
    margin-top: 5px;
}

.invoice-drawer-pane {
    padding: 0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .04);
}

.dark .invoice-drawer-pane {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

.invoice-drawer-pane .invoice-editor-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 15px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 48%, transparent);
}

.invoice-drawer-pane .invoice-editor-section-header h3 {
    margin: 3px 0 3px;
    font-size: 1.08rem;
}

.invoice-drawer-pane .invoice-editor-section-header p {
    line-height: 1.5;
}

#invoiceCartCount {
    display: inline-flex;
    width: max-content;
    align-items: center;
    min-height: 25px;
    margin-top: 8px;
    padding: 4px 9px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 24%, var(--border));
    border-radius: 999px;
    color: var(--blue-600);
    background: var(--accent-soft);
    font-size: .76rem;
    font-weight: 750;
}

.dark #invoiceCartCount {
    color: var(--blue-200);
}

.invoice-drawer-products .invoice-catalog-tools {
    grid-template-columns: minmax(0, 1fr) minmax(170px, .46fr);
    gap: 10px;
    margin: 0;
    padding: 14px 16px;
    background: var(--surface);
}

.invoice-drawer-products .invoice-product-card {
    min-height: 76px;
    padding: 12px 13px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.invoice-drawer-products .invoice-product-card:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.invoice-drawer-products .invoice-product-copy strong {
    font-size: .82rem;
}

.invoice-drawer-products .invoice-product-copy small {
    font-size: .68rem;
}

.invoice-drawer-products .invoice-product-price {
    white-space: nowrap;
    font-size: .82rem;
}

.invoice-drawer-products .invoice-product-add {
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 20%, transparent);
}

.invoice-drawer-products .invoice-catalog-group {
    padding: 17px 16px 19px;
}

.invoice-drawer-products .invoice-catalog-group > header {
    margin-bottom: 11px;
}

.invoice-drawer-cart .invoice-cart-row {
    grid-template-columns: minmax(0, 1fr) auto 30px;
    grid-template-areas:
        "copy total remove"
        "quantity total remove";
    align-items: center;
    gap: 8px 12px;
    padding: 14px 16px;
}

.invoice-drawer-cart .invoice-cart-copy {
    grid-area: copy;
}

.invoice-drawer-cart .invoice-quantity-control {
    grid-area: quantity;
    width: max-content;
}

.invoice-drawer-cart .invoice-cart-line-total {
    grid-area: total;
    min-width: 78px;
    padding: 0;
    align-self: center;
    font-size: .82rem;
}

.invoice-drawer-cart .invoice-cart-remove {
    grid-area: remove;
    align-self: center;
    justify-self: end;
}

.invoice-drawer-cart .invoice-cart-copy strong {
    font-size: .82rem;
}

.invoice-drawer-cart .invoice-cart-copy small {
    font-size: .68rem;
}

.invoice-drawer-cart .invoice-discount-note {
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 0;
    padding: 16px;
    background: color-mix(in srgb, var(--surface-soft) 42%, transparent);
}

.invoice-drawer-cart .invoice-discount-note .form-field {
    min-width: 0;
    margin: 0;
}

.invoice-drawer-cart .invoice-discount-note .form-field > span {
    display: flex;
    min-height: 22px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.invoice-drawer-cart .invoice-discount-note em {
    color: var(--text-faint);
    font-size: .67rem;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
}

.invoice-drawer-cart .invoice-discount-note input,
.invoice-drawer-cart .invoice-discount-note textarea {
    width: 100%;
    margin-top: 7px;
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
}

.invoice-drawer-cart .invoice-discount-note input {
    min-height: 46px;
    font-size: 1rem;
    font-weight: 750;
}

.invoice-drawer-cart .invoice-discount-note textarea {
    min-height: 82px;
    resize: vertical;
    line-height: 1.45;
}

.invoice-drawer-cart .invoice-note-field small {
    display: block;
    margin-top: 6px;
    color: var(--text-faint);
    text-align: right;
    font-size: .68rem;
}

.invoice-drawer-cart .invoice-totals {
    padding: 6px 16px 12px;
    background: var(--surface);
}

.invoice-drawer-cart .invoice-totals > div {
    padding: 10px 0;
    font-size: .78rem;
}

.invoice-drawer-cart .invoice-total-final {
    margin-top: 2px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.invoice-drawer-cart .invoice-total-final dd {
    font-size: 1.5rem;
}

.invoice-drawer-footer {
    min-height: var(--invoice-drawer-footer-height);
    padding: 14px 22px;
}

.invoice-drawer-footer-total {
    min-width: 132px;
}

.invoice-drawer-footer-total strong {
    font-size: 1.45rem;
}

.invoice-drawer-footer-actions {
    gap: 8px;
}

.invoice-drawer-footer-actions .primary-button {
    min-width: 190px;
}

@media (max-width: 1100px) {
    :root {
        --invoice-drawer-footer-height: 90px;
    }

    .invoice-drawer {
        width: min(920px, calc(100vw - 24px));
    }

    .invoice-drawer-scroll {
        padding: 16px 16px calc(var(--invoice-drawer-footer-height) + 18px);
    }

    .invoice-drawer-columns {
        grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr);
        gap: 14px;
    }

    .invoice-drawer-products .invoice-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    :root {
        --invoice-drawer-footer-height: 124px;
    }

    .invoice-drawer {
        width: 100vw;
        border-left: 0;
    }

    .invoice-drawer-scroll {
        display: block;
        overflow-y: auto;
    }

    .invoice-drawer-columns {
        display: block;
    }

    .invoice-drawer-mobile-tabs {
        display: flex;
        position: sticky;
        top: -16px;
        z-index: 5;
        margin-bottom: 12px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
    }

    .invoice-drawer-pane {
        display: none;
    }

    .invoice-drawer-pane.active {
        display: block;
    }

    .invoice-drawer-products .invoice-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-drawer-cart .invoice-cart-items {
        max-height: none;
    }
}

@media (max-width: 620px) {
    :root {
        --invoice-drawer-footer-height: 132px;
    }

    .invoice-drawer-header {
        padding: 15px 15px 13px;
    }

    .invoice-drawer-scroll {
        padding: 12px 12px calc(var(--invoice-drawer-footer-height) + 14px);
    }

    .invoice-drawer-products .invoice-product-grid,
    .invoice-drawer-products .invoice-catalog-tools,
    .invoice-drawer-cart .invoice-discount-note {
        grid-template-columns: 1fr;
    }

    .invoice-drawer-pane .invoice-editor-section-header {
        padding: 15px 14px 13px;
    }

    .invoice-drawer-products .invoice-catalog-tools,
    .invoice-drawer-products .invoice-catalog-group {
        padding-inline: 13px;
    }

    .invoice-drawer-cart .invoice-cart-row {
        padding-inline: 14px;
    }

    .invoice-drawer-footer {
        flex-wrap: wrap;
        gap: 9px;
        padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    }

    .invoice-drawer-footer-total {
        flex: 0 0 auto;
        min-width: 92px;
    }

    .invoice-drawer-footer-actions {
        min-width: 0;
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .invoice-drawer-footer-actions .primary-button {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .invoice-drawer-footer-actions [data-invoice-clear] {
        display: inline-flex;
    }
}


/* Invoice drawer overflow fix — v2.7.3 */
@media (max-height: 860px) and (min-width: 861px) {
    .invoice-drawer-header {
        padding: 16px 20px 14px;
    }

    .invoice-drawer-meta {
        margin-top: 12px;
        padding-top: 12px;
    }

    .invoice-drawer-meta > span:not(.status-badge) {
        padding: 8px 10px;
    }

    .invoice-drawer-scroll {
        padding-top: 14px;
    }

    .invoice-detail-drawer-section,
    .invoice-drawer-pane {
        border-radius: 15px;
    }
}

/* Full-page invoice details — v2.7.4 */
.invoice-detail-summary small {
    display: block;
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .76rem;
}

.invoice-unaccept-panel .invoice-editor-section-header {
    padding: 0 0 14px;
    border-bottom: 1px solid var(--border);
}

.invoice-unaccept-panel form {
    display: grid;
    gap: 12px;
}

.invoice-unaccept-panel .warning-button {
    width: 100%;
    justify-content: center;
}


/* Invoice full-page interaction regression fix — v2.7.5 */
.invoice-editor-page .invoice-note-field textarea {
    scrollbar-color: color-mix(in srgb, var(--blue-500) 34%, var(--border)) transparent;
}

@media (min-width: 961px) {
    .invoice-editor-page .invoice-cart-panel {
        max-height: calc(100vh - 112px);
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

/* Scrollbar theme alignment — v2.7.7 */
.invoice-editor-page .invoice-cart-items,
.sidebar-scroll,
textarea,
.invoice-editor-page .invoice-cart-panel {
    scrollbar-gutter: stable;
}

/* Invoice list cards — v2.7.6 */
.invoice-list-panel {
    background: var(--surface);
}

.invoice-card-list {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: color-mix(in srgb, var(--surface-soft) 58%, var(--page-bg));
    border-top: 1px solid var(--border);
}

.invoice-list-row.employee-invoice-card,
.invoice-list-row.management-invoice-card {
    min-height: 108px;
    display: grid;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.invoice-list-row.employee-invoice-card {
    grid-template-columns: minmax(250px, 1.2fr) minmax(170px, .72fr) minmax(330px, 1.15fr) auto;
}

.invoice-list-row.management-invoice-card {
    grid-template-columns: minmax(230px, 1.1fr) minmax(190px, .82fr) minmax(160px, .65fr) minmax(130px, .48fr) auto;
}

.invoice-list-row.employee-invoice-card:hover,
.invoice-list-row.management-invoice-card:hover {
    border-color: color-mix(in srgb, var(--blue-500) 30%, var(--border));
    background: var(--surface);
    box-shadow: 0 10px 25px rgba(37, 99, 235, .07);
    transform: translateY(-1px);
}

.dark .invoice-list-row.employee-invoice-card,
.dark .invoice-list-row.management-invoice-card {
    box-shadow: 0 8px 22px rgba(0, 0, 0, .13);
}

.invoice-card-identity,
.invoice-card-employee {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-card-identity .invoice-row-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 28%, var(--border));
    background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface));
}

.invoice-card-title {
    min-width: 0;
}

.invoice-card-title > strong,
.invoice-card-employee strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: .91rem;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 6px;
    color: var(--text-faint);
    font-size: .7rem;
}

.invoice-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.invoice-card-meta span + span::before {
    width: 3px;
    height: 3px;
    margin-right: 5px;
    border-radius: 999px;
    background: var(--text-faint);
    content: "";
}

.invoice-card-status {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 8px;
}

.invoice-card-reason {
    max-width: 260px;
    margin: 0;
    padding-left: 10px;
    color: var(--text-muted);
    border-left: 2px solid rgba(239, 68, 68, .55);
    font-size: .69rem;
    line-height: 1.45;
}

.invoice-card-financials {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}

.management-card-financials {
    grid-template-columns: minmax(110px, 1fr);
}

.invoice-card-metric {
    min-width: 0;
    padding: 4px 7px;
}

.invoice-card-metric + .invoice-card-metric {
    border-left: 1px solid var(--border);
}

.invoice-card-metric small,
.invoice-card-employee small {
    display: block;
    color: var(--text-faint);
    font-size: .65rem;
    line-height: 1.3;
}

.invoice-card-metric strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: .84rem;
    font-weight: 760;
    white-space: nowrap;
}

.invoice-card-metric.muted strong {
    color: var(--text-faint);
}

.invoice-card-metric.invoice-card-total strong {
    color: var(--blue-600);
    font-size: 1rem;
}

.dark .invoice-card-metric.invoice-card-total strong {
    color: var(--brand-accent-100);
}

.invoice-card-employee .account-avatar.small {
    flex: 0 0 auto;
}

.invoice-card-actions {
    min-width: 0;
    justify-content: flex-end;
}

.invoice-card-actions .small-button {
    min-height: 38px;
    padding: .58rem .78rem;
    border-radius: 10px;
}

.invoice-card-actions form {
    display: contents;
}

@media (max-width: 1320px) {
    .invoice-list-row.employee-invoice-card {
        grid-template-columns: minmax(225px, 1fr) minmax(155px, .68fr) minmax(285px, 1fr) auto;
    }

    .invoice-list-row.management-invoice-card {
        grid-template-columns: minmax(210px, 1fr) minmax(170px, .8fr) minmax(145px, .62fr) minmax(115px, .46fr) auto;
    }
}

@media (max-width: 1080px) {
    .invoice-list-row.employee-invoice-card,
    .invoice-list-row.management-invoice-card {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .invoice-card-status {
        justify-items: end;
    }

    .invoice-card-reason {
        max-width: 320px;
        text-align: right;
        border-right: 2px solid rgba(239, 68, 68, .55);
        border-left: 0;
        padding-right: 10px;
        padding-left: 0;
    }

    .invoice-card-employee {
        grid-column: 1 / -1;
        padding: 10px 0;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .invoice-card-financials {
        grid-column: 1 / -1;
    }

    .invoice-card-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 4px;
    }
}

@media (max-width: 680px) {
    .invoice-card-list {
        gap: 10px;
        padding: 10px;
    }

    .invoice-list-row.employee-invoice-card,
    .invoice-list-row.management-invoice-card {
        grid-template-columns: 1fr;
        gap: 13px;
        padding: 14px;
        border-radius: 14px;
    }

    .invoice-card-status,
    .invoice-card-actions {
        justify-items: start;
        justify-content: flex-start;
    }

    .invoice-card-reason {
        max-width: none;
        text-align: left;
        border-right: 0;
        border-left: 2px solid rgba(239, 68, 68, .55);
        padding-right: 0;
        padding-left: 10px;
    }

    .invoice-card-financials {
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 6px;
    }

    .invoice-card-metric {
        padding: 8px 9px;
    }

    .invoice-card-metric:nth-child(3),
    .invoice-card-metric.invoice-card-total {
        grid-column: 1 / -1;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .management-card-financials {
        grid-template-columns: 1fr;
    }

    .management-card-financials .invoice-card-metric.invoice-card-total {
        margin-top: 0;
        border-top: 0;
    }

    .invoice-card-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .invoice-card-actions .small-button {
        width: 100%;
        justify-content: center;
    }
}


/* Work hours module — v2.8.0 */
.work-hours-page,
.issued-work-hours-page,
.work-entry-detail-page { display:grid; gap:18px; }
.work-hours-hero,.work-management-hero { overflow:hidden; }
.work-period-inline { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; padding:14px 18px; border-top:1px solid var(--border); background:var(--surface-soft); }
.work-period-inline>div { min-width:180px; }
.work-period-inline small,.work-period-dashboard small,.card-label { display:block; color:var(--text-faint); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.06em; }
.work-period-inline strong,.work-period-dashboard strong { display:block; margin-top:4px; color:var(--text); }
.employee-work-period-summary { display:grid; grid-template-columns:minmax(150px,.95fr) minmax(190px,1.15fr) repeat(5,minmax(140px,.9fr)); gap:1px; padding:0; background:var(--border); }
.employee-work-period-summary>div { min-width:0; padding:14px 18px; background:var(--surface-soft); }
.employee-work-period-summary .work-week-stat strong { font-size:15px; font-variant-numeric:tabular-nums; }
.employee-work-period-summary .tone-pending strong { color:var(--accent); }
.employee-work-period-summary .tone-accepted strong { color:var(--success); }
.employee-work-period-summary .tone-earned strong { color:var(--success); }
.employee-work-period-summary .tone-total strong { color:var(--text); }
.employee-work-period-summary .tone-rejected strong { color:var(--danger,#dc5252); }
.work-period-actions { display:flex; align-items:center; }
.work-period-actions form { margin:0; }
.work-period-dashboard { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:1px; margin-top:18px; border-top:1px solid var(--border); background:var(--border); }
.work-period-dashboard>div { padding:15px 18px; background:var(--surface-soft); }
.work-entry-list-panel { overflow:hidden; padding:0; }
.work-entry-card-list { display:grid; gap:10px; padding:16px; border-top:1px solid var(--border); background:color-mix(in srgb,var(--surface-soft) 55%,var(--page-bg)); }
.work-entry-card { display:grid; grid-template-columns:minmax(150px,.9fr) minmax(130px,.72fr) minmax(155px,.85fr) minmax(115px,.58fr) minmax(170px,.82fr) auto; align-items:center; gap:16px; padding:15px 16px; border:1px solid var(--border); border-radius:15px; background:var(--surface); box-shadow:0 5px 16px rgb(15 23 42/.035); }
.work-entry-card.management { grid-template-columns:minmax(145px,.75fr) minmax(165px,.9fr) minmax(145px,.75fr) minmax(110px,.55fr) minmax(170px,.82fr) auto; }
.work-entry-card strong,.work-entry-card small { display:block; }
.work-entry-card small:not(.card-label) { margin-top:4px; color:var(--text-faint); font-size:10px; }
.work-entry-date>span { color:var(--blue-600); font-size:11px; font-weight:800; }
.work-entry-date>strong { margin-top:3px; font-size:16px; }
.work-entry-amount strong { color:var(--blue-600); font-size:18px; }
.work-entry-actions { display:flex; justify-content:flex-end; gap:7px; }
.work-entry-actions form { margin:0; }
.work-entry-detail-list { margin:0; }
.work-entry-detail-list>div { display:flex; justify-content:space-between; gap:18px; padding:13px 0; border-bottom:1px solid var(--border); }
.work-entry-detail-list dt { color:var(--text-secondary); }
.work-entry-detail-list dd { margin:0; color:var(--text); font-weight:750; text-align:right; }
.work-entry-detail-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.65fr); gap:18px; align-items:start; }
.work-entry-detail-card,.work-entry-decision-card { padding:0; overflow:hidden; }
.work-entry-detail-list { padding:8px 22px 18px; }
.work-entry-detail-card .invoice-note-box,.work-entry-detail-card .invoice-rejection-box { margin:0 22px 20px; }
.work-entry-decision-body { display:grid; gap:16px; padding:20px; }
.work-entry-decision-body form { display:grid; gap:12px; }
.work-entry-decision-body button,.work-entry-decision-body>a { width:100%; justify-content:center; }
@media(max-width:1150px){.work-entry-card,.work-entry-card.management{grid-template-columns:repeat(3,minmax(0,1fr));}.work-entry-actions{grid-column:1/-1;}.work-period-dashboard{grid-template-columns:repeat(3,1fr);}.employee-work-period-summary{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:820px){.work-entry-detail-grid{grid-template-columns:1fr}.work-entry-card,.work-entry-card.management{grid-template-columns:repeat(2,minmax(0,1fr));}.work-period-dashboard{grid-template-columns:repeat(2,1fr);}.employee-work-period-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.work-entry-card,.work-entry-card.management{grid-template-columns:1fr}.work-entry-actions{display:grid;grid-template-columns:1fr 1fr}.work-period-dashboard{grid-template-columns:1fr 1fr}.employee-work-period-summary>div{padding:13px 14px}}


/* Leave requests — v2.9.0 */
.leave-page .account-form-card { max-width: 980px; }
.leave-form-card textarea { min-height: 130px; resize: vertical; }
.leave-page .invoice-review-panel { display: grid; gap: 14px; padding: 20px; }
.leave-page .invoice-review-panel form { display: grid; gap: 10px; }
.leave-page .invoice-review-panel button { width: 100%; justify-content: center; }
.leave-page .invoice-note-box, .leave-page .invoice-rejection-box { margin: 18px; }
@media(max-width:900px){.leave-page .employee-invoice-card,.leave-page .management-invoice-card{grid-template-columns:1fr}.leave-page .invoice-row-actions{justify-content:flex-start}}

/* Leave form access blocking — v2.9.2 */
.blocked-action-button {
    cursor: not-allowed;
    opacity: .78;
    user-select: none;
}

.blocked-action-button .icon {
    color: #d97706;
}

.leave-form-block-alert {
    display: grid;
    gap: 4px;
}

.leave-form-block-alert strong,
.leave-form-block-alert span {
    display: block;
}

/* Leave requests visual polish — v2.9.3 */
.leave-status-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.leave-status-tabs a {
    min-height: 56px;
    padding: 10px 12px;
    border-bottom: 0;
    text-align: center;
}

.leave-status-tabs a.active {
    box-shadow: inset 0 -2px 0 var(--blue-500);
}

.leave-form-page {
    max-width: 1320px;
    margin-inline: auto;
}

.leave-form-hero {
    align-items: center;
}

.leave-form-card {
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.leave-form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px 18px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 54%, transparent);
}

.leave-form-card-header h2 {
    margin: 3px 0 4px;
    color: var(--text);
    font-size: 1.08rem;
}

.leave-form-card-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .86rem;
}

.leave-form-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--blue-500) 22%, var(--border));
    border-radius: 12px;
    color: var(--blue-600);
    background: var(--accent-soft);
}

.leave-form-card-icon .icon {
    width: 20px;
    height: 20px;
}

.leave-form-fields {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.leave-datetime-grid {
    display: grid;
    gap: 14px;
}

.leave-datetime-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(150px, .65fr);
    gap: 16px;
}

.leave-datetime-hint {
    margin: -2px 0 0;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.5;
}

.leave-form-card .form-field {
    min-width: 0;
    margin: 0;
}

.leave-form-card .form-field > span {
    margin-bottom: 7px;
    font-size: 12px;
}

.leave-form-card .form-field em {
    color: var(--text-faint);
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
}

.leave-form-card select,
.leave-form-card input,
.leave-form-card textarea {
    width: 100%;
    border-radius: 11px;
    background: var(--surface-soft);
}

.leave-form-card select,
.leave-form-card input {
    min-height: 48px;
}

.leave-form-card textarea {
    min-height: 150px;
    padding: 13px 14px;
    line-height: 1.5;
    resize: vertical;
}

.leave-form-card textarea::placeholder {
    color: var(--text-faint);
}

.leave-note-field small {
    display: block;
    margin-top: 7px;
    color: var(--text-faint);
    text-align: right;
    font-size: 10px;
}

.leave-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 45%, transparent);
}

.leave-form-actions .primary-button {
    min-width: 190px;
    justify-content: center;
}

@media (max-width: 1050px) {
    .leave-status-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leave-status-tabs a:nth-child(3n) {
        border-right: 0;
    }

    .leave-status-tabs a:nth-child(-n+3) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 700px) {
    .leave-status-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .leave-status-tabs::-webkit-scrollbar {
        display: none;
    }

    .leave-status-tabs a {
        min-width: 165px;
        flex: 0 0 auto;
        border-bottom: 0 !important;
    }

    .leave-datetime-row {
        grid-template-columns: 1fr;
    }

    .leave-form-card-header,
    .leave-form-fields {
        padding-inline: 16px;
    }

    .leave-form-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .leave-form-actions .primary-button,
    .leave-form-actions .secondary-button {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
}

/* Account balance module — v3.0.0 */
.account-balance-page { display:grid; gap:18px; }
.account-balance-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:26px 28px; background:linear-gradient(120deg,var(--surface),color-mix(in srgb,var(--blue-500) 12%,var(--surface))); }
.account-balance-hero h1 { margin:4px 0 6px; font-size:clamp(1.65rem,3vw,2.2rem); }
.account-balance-hero p { margin:0; color:var(--text-secondary); }
.account-balance-hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.account-balance-reminder { display:flex; align-items:center; gap:14px; padding:16px 18px; border:1px solid color-mix(in srgb,#f59e0b 48%,var(--border)); border-radius:15px; background:color-mix(in srgb,#f59e0b 9%,var(--surface)); }
.account-balance-reminder>span { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; color:#f59e0b; border-radius:12px; background:color-mix(in srgb,#f59e0b 14%,transparent); }
.account-balance-reminder div { min-width:0; flex:1; }
.account-balance-reminder strong { color:var(--text); }
.account-balance-reminder p { margin:3px 0 0; color:var(--text-secondary); font-size:.86rem; }
.account-balance-invoice-blocker { border-color:color-mix(in srgb,#ef4444 42%,var(--border)); background:color-mix(in srgb,#ef4444 8%,var(--surface)); }
.account-balance-invoice-blocker>span { color:#f87171; background:color-mix(in srgb,#ef4444 13%,transparent); }
.account-balance-invoice-blocker small { display:block; margin-top:6px; color:var(--text-faint); font-size:.78rem; line-height:1.45; }
.account-balance-invoice-blocker .warning-button { flex:0 0 auto; text-decoration:none; }
.topbar-balance-reminder { display:inline-flex; align-items:center; gap:10px; min-height:40px; padding:7px 12px 7px 9px; border:1px solid color-mix(in srgb,#f59e0b 52%,var(--border)); border-radius:12px; background:color-mix(in srgb,#f59e0b 10%,var(--surface)); color:var(--text); text-decoration:none; }
.topbar-balance-reminder:hover { border-color:#f59e0b; background:color-mix(in srgb,#f59e0b 14%,var(--surface)); color:var(--text); }
.topbar-balance-reminder:focus-visible { outline:2px solid color-mix(in srgb,#f59e0b 55%,#fff); outline-offset:2px; }
.global-balance-reminder-icon { width:28px; height:28px; display:grid; place-items:center; flex:0 0 28px; color:#f59e0b; border-radius:9px; background:color-mix(in srgb,#f59e0b 14%,transparent); }
.topbar-balance-reminder-copy { display:grid; gap:1px; min-width:0; }
.topbar-balance-reminder-copy strong { color:var(--text); font-size:.78rem; line-height:1.15; white-space:nowrap; }
.topbar-balance-reminder-copy small { color:var(--text-secondary); font-size:.68rem; line-height:1.1; white-space:nowrap; }
.account-balance-summary-grid { display:grid; grid-template-columns:1.15fr 1fr 1fr; gap:14px; }
.account-balance-stat { padding:20px 22px; min-height:132px; display:flex; flex-direction:column; justify-content:center; }
.account-balance-stat>span { color:var(--text-secondary); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.account-balance-stat>strong { margin:8px 0 5px; color:var(--text); font-size:1.8rem; line-height:1.1; }
.account-balance-stat>small { color:var(--text-faint); }
.account-balance-stat-primary { background:linear-gradient(135deg,color-mix(in srgb,var(--blue-500) 18%,var(--surface)),var(--surface)); }
.positive { color:#22c55e !important; }
.negative { color:#f87171 !important; }
.account-balance-chart-panel,.account-balance-list-panel { overflow:hidden; padding:0; }
.account-balance-section-heading { display:flex; justify-content:space-between; padding:20px 22px 17px; border-bottom:1px solid var(--border); background:color-mix(in srgb,var(--surface-soft) 45%,transparent); }
.account-balance-section-heading h2 { margin:3px 0 4px; font-size:1.15rem; }
.account-balance-section-heading p { margin:0; color:var(--text-secondary); font-size:.86rem; }
.account-balance-chart-heading { align-items:center; gap:24px; }
.account-balance-chart-summary { display:grid; grid-template-columns:repeat(3,minmax(110px,1fr)); gap:8px; flex:0 0 auto; }
.account-balance-chart-summary>span { min-width:0; padding:9px 12px; border:1px solid color-mix(in srgb,var(--border) 82%,transparent); border-radius:11px; background:color-mix(in srgb,var(--surface) 72%,transparent); }
.account-balance-chart-summary small,.account-balance-chart-summary strong { display:block; }
.account-balance-chart-summary small { margin-bottom:3px; color:var(--text-faint); font-size:.65rem; font-weight:750; letter-spacing:.055em; text-transform:uppercase; }
.account-balance-chart-summary strong { min-width:0; overflow:hidden; color:var(--text); font-size:.82rem; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.account-balance-chart { --balance-chart-color:var(--accent); --balance-chart-grid:color-mix(in srgb,var(--border) 74%,transparent); padding:18px 22px 16px; color:var(--balance-chart-color); }
.account-balance-chart-plot { position:relative; height:220px; min-width:0; }
.account-balance-chart svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.account-balance-chart-grid line { stroke:var(--balance-chart-grid); stroke-width:.45; vector-effect:non-scaling-stroke; stroke-dasharray:2 4; }
.account-balance-chart-line { fill:none; stroke:currentColor; stroke-width:2; vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 3px 7px color-mix(in srgb,var(--balance-chart-color) 18%,transparent)); }
.account-balance-chart-area { stroke:none; }
.account-balance-chart-point { position:absolute; z-index:3; left:0; top:0; width:24px; height:24px; margin:0; padding:0; border:0; border-radius:50%; background:transparent; color:var(--balance-chart-color); cursor:pointer; opacity:1; transform:translate(-50%,-50%); }
.account-balance-chart-point:not([data-chart-positioned="1"]) { opacity:0; pointer-events:none; }
.account-balance-chart-point>span { position:absolute; left:50%; top:50%; width:10px; height:10px; border:2px solid currentColor; border-radius:50%; background:var(--surface); box-shadow:0 0 0 4px color-mix(in srgb,var(--balance-chart-color) 9%,transparent); transform:translate(-50%,-50%); transition:width .14s ease,height .14s ease,box-shadow .14s ease,background .14s ease; }
.account-balance-chart-point>span::after { content:""; position:absolute; inset:2px; border-radius:inherit; background:currentColor; opacity:.72; }
.account-balance-chart-point:hover,.account-balance-chart-point:focus-visible,.account-balance-chart-point.is-active { outline:0; }
.account-balance-chart-point:hover>span,.account-balance-chart-point:focus-visible>span,.account-balance-chart-point.is-active>span { width:14px; height:14px; box-shadow:0 0 0 6px color-mix(in srgb,var(--balance-chart-color) 14%,transparent),0 8px 18px color-mix(in srgb,var(--balance-chart-color) 18%,transparent); }
.account-balance-chart-point:hover>span::after,.account-balance-chart-point:focus-visible>span::after,.account-balance-chart-point.is-active>span::after { opacity:1; }
.account-balance-chart-guide { position:absolute; z-index:1; top:7%; bottom:6%; left:var(--chart-guide-x,50%); width:1px; background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--balance-chart-color) 30%,transparent) 18%,color-mix(in srgb,var(--balance-chart-color) 30%,transparent) 82%,transparent); opacity:0; pointer-events:none; transform:translateX(-50%); transition:opacity .12s ease; }
.account-balance-chart.is-inspecting .account-balance-chart-guide { opacity:1; }
.account-balance-chart-tooltip { position:absolute; z-index:6; left:clamp(94px,var(--chart-tooltip-x,50%),calc(100% - 94px)); top:var(--chart-tooltip-y,50%); width:max-content; max-width:230px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--balance-chart-color) 32%,var(--border)); border-radius:11px; background:color-mix(in srgb,var(--surface) 96%,var(--page-bg)); color:var(--text); box-shadow:0 12px 30px rgb(0 0 0 / .16); opacity:0; pointer-events:none; transform:translate(-50%,calc(-100% - 14px)) scale(.98); transform-origin:50% 100%; transition:opacity .12s ease,transform .12s ease; }
.account-balance-chart-tooltip.is-visible { opacity:1; transform:translate(-50%,calc(-100% - 14px)) scale(1); }
.account-balance-chart-tooltip.is-below { transform:translate(-50%,14px) scale(.98); transform-origin:50% 0; }
.account-balance-chart-tooltip.is-below.is-visible { transform:translate(-50%,14px) scale(1); }
.account-balance-chart-tooltip strong,.account-balance-chart-tooltip span,.account-balance-chart-tooltip small { display:block; }
.account-balance-chart-tooltip strong { margin-bottom:4px; color:var(--text-secondary); font-size:.7rem; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.account-balance-chart-tooltip span { color:var(--text); font-size:1rem; font-weight:850; line-height:1.2; }
.account-balance-chart-tooltip small { margin-top:5px; color:var(--text-faint); font-size:.7rem; line-height:1.35; }
.account-balance-chart-tooltip small.positive { color:#22c55e !important; }
.account-balance-chart-tooltip small.negative { color:#f87171 !important; }
.account-balance-chart-labels { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-top:4px; padding:0 0 1px; color:var(--text); }
.account-balance-chart-labels span { min-width:0; text-align:center; }
.account-balance-chart-labels strong { display:block; color:var(--text-secondary); font-size:.74rem; font-weight:750; }
.account-balance-chart-hint { margin:9px 0 0; color:var(--text-faint); font-size:.69rem; text-align:center; }
.account-balance-history-heading { align-items:center; gap:18px; }
.account-balance-tabs { display:inline-flex; align-items:center; gap:6px; padding:5px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.account-balance-tab { min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:8px 13px; color:var(--text-secondary); border:1px solid transparent; border-radius:10px; text-decoration:none; font-size:.8rem; font-weight:750; transition:border-color .16s ease,background .16s ease,color .16s ease; }
.account-balance-tab strong { min-width:24px; padding:3px 7px; color:var(--text-secondary); border-radius:999px; background:var(--surface-soft); font-size:.7rem; line-height:1.2; text-align:center; }
.account-balance-tab:hover { color:var(--text); border-color:var(--border); background:var(--surface-soft); }
.account-balance-tab:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.account-balance-tab.is-active { color:var(--text); border-color:color-mix(in srgb,var(--accent) 52%,var(--border)); background:var(--accent-soft); }
.account-balance-tab.is-active strong { color:var(--text); background:color-mix(in srgb,var(--accent) 18%,var(--surface)); }

.account-balance-simple-search-shell { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 20px; border-bottom:1px solid var(--border); background:color-mix(in srgb,var(--page-bg) 24%,transparent); }
.account-balance-simple-search { flex:1 1 680px; max-width:760px; min-width:0; }
.account-balance-simple-search-control { position:relative; display:flex; align-items:center; min-width:0; }
.account-balance-simple-search-control>.icon:first-child { position:absolute; left:14px; width:18px; height:18px; color:var(--text-muted); pointer-events:none; }
.account-balance-simple-search-control input { width:100%; min-height:46px; padding:10px 46px 10px 43px; border:1px solid var(--border); border-radius:13px; background:var(--surface); color:var(--text); }
.account-balance-simple-search-control input:focus { border-color:color-mix(in srgb,var(--accent) 58%,var(--border)); outline:2px solid color-mix(in srgb,var(--accent) 18%,transparent); outline-offset:1px; }
.account-balance-simple-search-control input::-webkit-search-cancel-button { display:none; }
.account-balance-search-clear { position:absolute; right:8px; width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:var(--text-muted); text-decoration:none; transition:background .16s ease,color .16s ease; }
.account-balance-search-clear:hover { color:var(--text); background:var(--surface-soft); }
.account-balance-search-clear .icon { width:16px; height:16px; }
.account-balance-search-result { flex:0 0 auto; color:var(--text-faint); font-size:.78rem; white-space:nowrap; }
.account-balance-search-result strong { color:var(--text); font-size:.9rem; }
.account-balance-simple-pagination-pages { display:flex; align-items:center; gap:10px; }
.account-balance-simple-pagination-pages>span { min-width:62px; color:var(--text-secondary); font-size:.8rem; text-align:center; }
.account-balance-list-panel>.list-pagination { margin:14px 20px 18px; }
.account-operation-list { display:grid; }
.account-operation-row { display:grid; grid-template-columns:minmax(320px,1.35fr) minmax(180px,.7fr) minmax(180px,.7fr) minmax(188px,.82fr); align-items:stretch; gap:16px; padding:18px 20px; border-bottom:1px solid var(--border); }
.account-operation-row:last-child { border-bottom:0; }
.account-operation-row.is-cancelled { background:color-mix(in srgb,var(--surface-soft) 52%,transparent); }
.account-operation-leading,.account-operation-metric,.account-operation-actions { min-width:0; }
.account-operation-leading { display:flex; align-items:flex-start; gap:14px; }
.account-operation-icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; color:var(--blue-500); border:1px solid color-mix(in srgb,var(--blue-500) 30%,var(--border)); border-radius:12px; background:var(--accent-soft); }
.account-operation-main,.account-operation-metric { display:grid; align-content:start; gap:3px; min-width:0; }
.account-operation-main strong,.account-operation-main small,.account-operation-money small,.account-operation-money strong,.account-operation-money span,.account-operation-author small,.account-operation-author strong,.account-operation-author span { display:block; min-width:0; }
.account-operation-main>strong { margin:1px 0 0; font-size:1rem; line-height:1.2; }
.account-operation-main small,.account-operation-author span,.account-operation-money span { color:var(--text-faint); font-size:.75rem; line-height:1.45; word-break:break-word; }
.account-operation-money strong { margin:1px 0 0; font-size:1.08rem; line-height:1.2; }
.account-operation-author small,.account-operation-money small { color:var(--text-secondary); font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; }
.account-operation-author strong { margin:1px 0 0; font-size:.9rem; line-height:1.2; }
.account-operation-actions { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:flex-end; align-content:flex-start; gap:8px; }
.compact-button { min-height:38px; padding:.58rem .75rem; white-space:nowrap; }
.balance-modal { position:fixed; inset:0; z-index:1600; display:grid; place-items:center; padding:20px; }
.balance-modal.hidden { display:none; }
.balance-modal-backdrop { position:absolute; inset:0; border:0; background:rgba(2,8,23,.72); backdrop-filter:blur(3px); }
.balance-modal-card { position:relative; z-index:1; width:min(560px,100%); max-height:calc(100dvh - 40px); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--border); border-radius:18px; background:var(--surface); box-shadow:0 28px 80px rgba(0,0,0,.35); }
.balance-modal-card>header { position:relative; padding:22px 24px 18px; padding-right:70px; border-bottom:1px solid var(--border); background:color-mix(in srgb,var(--surface-soft) 45%,transparent); }
.balance-modal-card>header h2 { margin:4px 0; }
.balance-modal-card>header p { margin:0; color:var(--text-secondary); }
.balance-modal-body { display:grid; gap:15px; overflow-y:auto; padding:20px 24px; }
.balance-modal-card>footer { display:flex; justify-content:flex-end; gap:9px; padding:14px 24px; border-top:1px solid var(--border); background:var(--surface-soft); }
.withdrawal-preview { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.withdrawal-preview span { padding:13px 14px; color:var(--text-secondary); border:1px solid var(--border); border-radius:12px; background:var(--surface-soft); font-size:.76rem; }
.withdrawal-preview strong { display:block; margin-top:5px; color:var(--text); font-size:1.05rem; }
@media (max-width:1050px) { .account-balance-history-heading{align-items:flex-start;flex-direction:column}.account-balance-tabs{width:100%;overflow-x:auto}.account-balance-tab{flex:1 0 auto}.account-balance-summary-grid{grid-template-columns:1fr 1fr}.account-balance-stat-primary{grid-column:1/-1}.account-operation-row{grid-template-columns:minmax(0,1fr) minmax(170px,.8fr) minmax(170px,.8fr)}.account-operation-actions{grid-column:1/-1;justify-content:flex-start;padding-top:2px} }
@media (max-width:700px) { .account-balance-simple-search-shell{align-items:stretch;flex-direction:column;padding:14px}.account-balance-simple-search{width:100%;max-width:none}.account-balance-search-result{white-space:normal}.account-balance-list-panel>.list-pagination{margin:12px 14px 16px}.account-balance-simple-pagination{align-items:stretch;flex-direction:column}.account-balance-simple-pagination-pages{justify-content:space-between;width:100%}.account-balance-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.account-balance-tab{min-width:0;padding-inline:8px}.account-balance-tab strong{min-width:21px;padding-inline:5px}.account-balance-hero{align-items:flex-start;flex-direction:column;padding:20px}.account-balance-hero-actions{width:100%}.account-balance-hero-actions>*{flex:1}.account-balance-reminder{align-items:flex-start;flex-wrap:wrap}.account-balance-reminder .primary-button,.account-balance-reminder .warning-button{width:100%}.topbar-balance-reminder{padding-inline:10px}.topbar-balance-reminder-copy small{display:none}.account-balance-summary-grid{grid-template-columns:1fr}.account-balance-stat-primary{grid-column:auto}.account-balance-chart{padding-inline:12px}.account-balance-chart-plot{height:180px}.account-balance-chart-heading{align-items:flex-start;flex-direction:column}.account-balance-chart-summary{width:100%;grid-template-columns:1fr}.account-balance-chart-summary>span{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px}.account-balance-chart-summary small{margin:0}.account-balance-chart-summary strong{font-size:.78rem;text-align:right}.account-balance-chart-hint{display:none}.account-operation-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:15px}.account-operation-leading{align-items:flex-start}.account-operation-actions{justify-content:flex-start}.balance-modal{padding:0;align-items:end}.balance-modal-card{width:100%;max-height:94dvh;border-radius:18px 18px 0 0}.balance-modal-card>header,.balance-modal-body,.balance-modal-card>footer{padding-inline:16px}.withdrawal-preview{grid-template-columns:1fr}.balance-modal-card>footer>*{flex:1} }

/* Shared list pagination — v3.1.0 */
.list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 94%, var(--surface-soft));
}
.list-pagination-summary,
.list-pagination-size,
.list-pagination-pages {
    display: flex;
    align-items: center;
    gap: 7px;
}
.list-pagination-summary { color: var(--text-secondary); font-size: .8rem; }
.list-pagination-summary strong { color: var(--text); }
.list-pagination-size > span { color: var(--text-secondary); font-size: .76rem; }
.list-pagination-size a,
.pagination-arrow {
    min-width: 32px;
    min-height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 700;
}
.list-pagination-size a:hover,
.pagination-arrow:hover,
.list-pagination-size a.is-active {
    color: var(--text);
    border-color: color-mix(in srgb, var(--blue-500) 55%, var(--border));
    background: color-mix(in srgb, var(--blue-500) 13%, var(--surface));
}
.pagination-arrow.is-disabled {
    pointer-events: none;
    opacity: .42;
}
.list-pagination-pages span { color: var(--text-secondary); font-size: .8rem; white-space: nowrap; }
.list-pagination-pages strong { color: var(--text); }
@media (max-width: 760px) {
    .list-pagination { align-items: stretch; flex-direction: column; }
    .list-pagination-summary,
    .list-pagination-pages { justify-content: space-between; }
    .list-pagination-size { overflow-x: auto; padding-bottom: 2px; }
}

/* Session inactivity protection — v3.2.0 */
.session-timeout-modal { position:fixed; inset:0; z-index:2200; display:grid; place-items:center; padding:20px; }
.session-timeout-modal.hidden { display:none; }
.session-timeout-backdrop { position:absolute; inset:0; background:rgba(2,8,23,.76); backdrop-filter:blur(4px); }
.session-timeout-card { position:relative; z-index:1; width:min(520px,100%); display:grid; grid-template-columns:52px minmax(0,1fr); gap:16px; padding:24px; border:1px solid color-mix(in srgb,#f59e0b 44%,var(--border)); border-radius:20px; background:var(--surface); box-shadow:0 28px 90px rgba(0,0,0,.42); }
.session-timeout-icon { width:52px; height:52px; display:grid; place-items:center; color:#f59e0b; border-radius:15px; background:color-mix(in srgb,#f59e0b 14%,transparent); }
.session-timeout-icon .icon { width:25px; height:25px; }
.session-timeout-content h2 { margin:4px 0 8px; font-size:1.35rem; }
.session-timeout-content p { margin:0; color:var(--text-secondary); line-height:1.5; }
.session-timeout-unsaved { margin-top:10px !important; padding:9px 11px; border:1px solid color-mix(in srgb,#f59e0b 38%,var(--border)); border-radius:10px; background:color-mix(in srgb,#f59e0b 8%,var(--surface)); color:var(--text) !important; font-size:.84rem; }
.session-timeout-countdown { margin-top:16px; color:var(--text-secondary); font-size:.9rem; }
.session-timeout-countdown strong { color:var(--text); font-size:1.05rem; font-variant-numeric:tabular-nums; }
.session-timeout-progress { width:100%; height:6px; margin-top:10px; overflow:hidden; border:0; border-radius:999px; background:var(--surface-soft); appearance:none; }
.session-timeout-progress::-webkit-progress-bar { border-radius:999px; background:var(--surface-soft); }
.session-timeout-progress::-webkit-progress-value { border-radius:999px; background:#f59e0b; transition:width .25s linear; }
.session-timeout-progress::-moz-progress-bar { border-radius:999px; background:#f59e0b; transition:width .25s linear; }
.session-timeout-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:10px; padding-top:4px; }
.session-timeout-actions form { display:flex; }
.session-timeout-open { overflow:hidden; }
@media (max-width:600px) {
    .session-timeout-modal { padding:12px; align-items:end; }
    .session-timeout-card { grid-template-columns:44px minmax(0,1fr); gap:12px; padding:18px; border-radius:18px; }
    .session-timeout-icon { width:44px; height:44px; border-radius:13px; }
    .session-timeout-actions { display:grid; grid-template-columns:1fr 1fr; }
    .session-timeout-actions form,.session-timeout-actions button { width:100%; }
}

/* Resto Panel 3.3.0: aktywni użytkownicy */
.online-users-control { position:relative; }
.online-users-button { min-height:40px; display:inline-flex; align-items:center; gap:7px; padding:0 11px; border:1px solid var(--border); border-radius:12px; color:var(--text); background:var(--surface); font:inherit; cursor:pointer; }
.online-users-button:hover,.online-users-button[aria-expanded="true"] { border-color:color-mix(in srgb,#22c55e 55%,var(--border)); background:color-mix(in srgb,#22c55e 7%,var(--surface)); }
.online-users-icon-wrap { position:relative; width:20px; height:20px; display:grid; place-items:center; }
.online-users-icon-wrap .icon { width:19px; height:19px; }
.online-users-status-dot { position:absolute; right:-2px; bottom:-1px; width:8px; height:8px; border:2px solid var(--surface); border-radius:50%; background:#22c55e; }
.online-users-count { min-width:1ch; font-size:.82rem; font-weight:800; }
.online-users-label { color:var(--text-secondary); font-size:.75rem; font-weight:650; }
.online-users-panel { position:absolute; z-index:60; top:calc(100% + 10px); right:0; width:min(340px,calc(100vw - 24px)); overflow:hidden; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:0 20px 50px rgba(2,6,23,.22); }
.online-users-panel>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 14px 12px 16px; border-bottom:1px solid var(--border); }
.online-users-panel>header div { display:grid; gap:2px; }
.online-users-panel>header strong { font-size:.9rem; }
.online-users-panel>header small { color:var(--text-secondary); font-size:.72rem; }
.online-users-close { width:32px; height:32px; min-height:32px; }
.online-users-list { max-height:360px; overflow:auto; padding:8px; }
.online-users-loading { margin:0; padding:18px 12px; color:var(--text-secondary); font-size:.82rem; text-align:center; }
.online-user-item { display:flex; align-items:center; gap:11px; padding:10px; border-radius:11px; }
.online-user-item:hover { background:var(--surface-muted); }
.online-user-avatar { position:relative; width:36px; height:36px; display:grid; place-items:center; flex:0 0 36px; border-radius:11px; color:var(--blue-100); background:linear-gradient(135deg,var(--blue-600),#8a5d20); font-size:.72rem; font-weight:800; }
.online-user-dot { position:absolute; right:-1px; bottom:-1px; width:9px; height:9px; border:2px solid var(--surface); border-radius:50%; background:#22c55e; }
.online-user-copy { min-width:0; display:grid; gap:3px; }
.online-user-copy strong,.online-user-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.online-user-copy strong { color:var(--text); font-size:.82rem; }
.online-user-copy small { color:var(--text-secondary); font-size:.7rem; }
@media (max-width:900px) { .online-users-label{display:none}.online-users-button{padding-inline:10px} }
@media (max-width:700px) { .online-users-button{min-width:40px;padding:0 9px}.online-users-panel{position:fixed;top:72px;right:12px}.online-users-icon-wrap{display:none} }

/* General settings — v3.4.1 */
.settings-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.settings-heading-icon { width:54px; height:54px; display:grid; place-items:center; flex:0 0 54px; border-radius:16px; color:var(--brand-accent-500); background:color-mix(in srgb,var(--blue-500) 14%,var(--surface)); border:1px solid color-mix(in srgb,var(--blue-500) 24%,var(--border)); }
.settings-heading-icon .icon { width:26px; height:26px; }
.settings-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:18px; align-items:start; }
.settings-navigation { position:sticky; top:calc(var(--topbar-height) + 18px); padding:10px; }
.settings-navigation-item { display:flex; gap:11px; align-items:center; padding:12px; border-radius:12px; color:var(--text); text-decoration:none; }
.settings-navigation-item.active { background:color-mix(in srgb,var(--blue-500) 12%,var(--surface)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--blue-500) 28%,var(--border)); }
.settings-navigation-item>span:first-child { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:var(--brand-accent-500); background:color-mix(in srgb,var(--blue-500) 12%,transparent); }
.settings-navigation-item strong,.settings-navigation-item small { display:block; }
.settings-navigation-item strong { font-size:.86rem; }
.settings-navigation-item small { margin-top:2px; color:var(--text-secondary); font-size:.72rem; }
.settings-form { overflow:hidden; }
.settings-form-header { display:flex; align-items:flex-start; gap:14px; padding:22px 24px; border-bottom:1px solid var(--border); }
.settings-form-header h2 { margin:3px 0 5px; font-size:1.2rem; }
.settings-form-header p { margin:0; color:var(--text-secondary); font-size:.84rem; }
.settings-section-icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; border-radius:12px; color:var(--brand-accent-500); background:color-mix(in srgb,var(--blue-500) 12%,transparent); }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:22px 24px; }
.settings-field { display:grid; gap:7px; padding:16px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface) 92%,var(--page-bg)); }
.settings-field>span { color:var(--text); font-weight:750; font-size:.9rem; }
.settings-field>small { min-height:34px; color:var(--text-secondary); font-size:.76rem; line-height:1.45; }
.settings-field>em { color:var(--text-faint); font-size:.68rem; font-style:normal; }
.settings-input-unit { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.settings-input-unit:focus-within { border-color:var(--blue-500); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue-500) 16%,transparent); }
.settings-input-unit input { width:100%; min-height:42px; padding:0 12px; border:0; outline:0; color:var(--text); background:transparent; font:inherit; font-weight:700; }
.settings-input-unit span { align-self:stretch; display:flex; align-items:center; padding:0 11px; border-left:1px solid var(--border); color:var(--text-secondary); background:color-mix(in srgb,var(--page-bg) 55%,var(--surface)); font-size:.72rem; font-weight:700; }
.settings-input-unit input[type="number"] { -moz-appearance:textfield; appearance:textfield; }
.settings-input-unit input[type="number"]::-webkit-outer-spin-button,
.settings-input-unit input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.settings-info-box { display:flex; align-items:flex-start; gap:10px; margin:0 24px 22px; padding:13px 15px; border:1px solid color-mix(in srgb,var(--blue-500) 28%,var(--border)); border-radius:12px; background:color-mix(in srgb,var(--blue-500) 8%,var(--surface)); color:var(--text-secondary); }
.settings-info-box .icon { width:18px; height:18px; flex:0 0 18px; color:var(--brand-accent-500); }
.settings-info-box p { margin:0; font-size:.78rem; line-height:1.5; }
.settings-form-actions { display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--border); background:color-mix(in srgb,var(--page-bg) 44%,var(--surface)); }
@media (max-width:900px) { .settings-layout{grid-template-columns:1fr}.settings-navigation{position:static}.settings-grid{grid-template-columns:1fr} }
@media (max-width:600px) { .settings-heading-icon{display:none}.settings-form-header,.settings-grid{padding-inline:16px}.settings-info-box{margin-inline:16px}.settings-form-actions{padding-inline:16px;flex-direction:column-reverse}.settings-form-actions>*{width:100%} }

/* Profile menu — v3.5.0 */
.profile-menu-control { position:relative; }
.user-profile-button { min-height:44px; padding:4px 8px 4px 10px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--text); cursor:pointer; }
.user-profile-button:hover,.user-profile-button.is-open { border-color:var(--border); background:var(--surface-hover); }
.user-profile-button:focus-visible { outline:2px solid var(--blue-500); outline-offset:2px; }
.profile-menu-chevron { display:grid; place-items:center; color:var(--text-secondary); transition:transform .18s ease; }
.profile-menu-chevron .icon { width:15px; height:15px; }
.user-profile-button.is-open .profile-menu-chevron { transform:rotate(180deg); }
.profile-menu { position:absolute; top:calc(100% + 10px); right:0; z-index:70; width:min(330px,calc(100vw - 24px)); padding:8px; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:0 18px 48px rgb(2 6 23 / .28); }
.profile-menu-header { display:flex; align-items:center; gap:11px; padding:10px 10px 13px; margin-bottom:5px; border-bottom:1px solid var(--border); }
.profile-menu-header>span:last-child { min-width:0; }
.profile-menu-header strong,.profile-menu-header small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-menu-header strong { color:var(--text); font-size:.88rem; }
.profile-menu-header small { margin-top:2px; color:var(--text-secondary); font-size:.73rem; }
.profile-menu-avatar { width:40px; height:40px; }
.profile-menu-item { width:100%; min-height:42px; display:flex; align-items:center; gap:10px; padding:0 11px; border:0; border-radius:10px; background:transparent; color:var(--text); font:inherit; font-size:.82rem; font-weight:650; text-decoration:none; cursor:pointer; }
.profile-menu-item:hover { background:var(--surface-hover); }
.profile-menu-item .icon { width:17px; height:17px; color:var(--blue-600); }
.profile-theme-section { padding:9px 4px 8px; margin-top:4px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.profile-menu-section-label { display:block; padding:0 7px 7px; color:var(--text-secondary); font-size:.68rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.profile-theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.profile-theme-options button { min-height:58px; display:grid; place-items:center; align-content:center; gap:5px; padding:7px 4px; border:1px solid var(--border); border-radius:10px; background:color-mix(in srgb,var(--page-bg) 38%,var(--surface)); color:var(--text-secondary); font:inherit; font-size:.68rem; font-weight:700; cursor:pointer; }
.profile-theme-options button:hover { border-color:var(--border-strong); color:var(--text); background:var(--surface-hover); }
.profile-theme-options button.is-active { border-color:var(--blue-500); color:var(--blue-700); background:color-mix(in srgb,var(--blue-500) 12%,var(--surface)); box-shadow:0 0 0 2px color-mix(in srgb,var(--blue-500) 10%,transparent); }
.dark .profile-theme-options button.is-active { color:var(--blue-200); }
.profile-theme-options .icon { width:17px; height:17px; }
.profile-ui-theme-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.profile-ui-theme-option { min-width:0; display:grid; grid-template-columns:38px minmax(0,1fr); align-items:center; gap:9px; min-height:58px; padding:8px; border:1px solid var(--border); border-radius:11px; background:color-mix(in srgb,var(--page-bg) 28%,var(--surface)); color:var(--text-secondary); font:inherit; text-align:left; cursor:pointer; transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease; }
.profile-ui-theme-option:hover { border-color:var(--border-strong); color:var(--text); background:var(--surface-hover); }
.profile-ui-theme-option.is-active { border-color:var(--blue-500); color:var(--text); background:color-mix(in srgb,var(--blue-500) 9%,var(--surface)); box-shadow:0 0 0 2px color-mix(in srgb,var(--blue-500) 9%,transparent); }
.profile-ui-theme-option.is-saving { opacity:.7; cursor:wait; }
.profile-ui-theme-option-copy { min-width:0; display:grid; gap:2px; }
.profile-ui-theme-option-copy strong { color:inherit; font-size:.72rem; line-height:1.15; }
.profile-ui-theme-option-copy small { color:var(--text-secondary); font-size:.62rem; line-height:1.2; }
.profile-ui-theme-preview { position:relative; width:38px; height:32px; overflow:hidden; border:1px solid var(--border-strong); border-radius:8px; background:linear-gradient(90deg,#16110b 0 31%,#fffaf0 31% 100%); box-shadow:inset 0 0 0 1px rgb(255 255 255 / .08); }
.dark .profile-ui-theme-preview { background:linear-gradient(90deg,#090705 0 31%,#17130e 31% 100%); }
.profile-ui-theme-preview::before { content:""; position:absolute; left:14px; top:7px; right:5px; height:5px; border-radius:3px; background:color-mix(in srgb,var(--blue-500) 55%,var(--surface)); box-shadow:0 8px 0 color-mix(in srgb,var(--border) 80%,transparent),0 14px 0 color-mix(in srgb,var(--border) 55%,transparent); }
.profile-ui-theme-preview[data-ui-preview="modern"] { background:linear-gradient(135deg,#111827 0 31%,#f7f9fc 31% 100%); }
.dark .profile-ui-theme-preview[data-ui-preview="modern"] { background:linear-gradient(135deg,#070b12 0 31%,#111827 31% 100%); }
.profile-ui-theme-preview[data-ui-preview="modern"]::before { background:#6366f1; box-shadow:0 8px 0 #dce3ef,0 14px 0 #e9edf4; }
.dark .profile-ui-theme-preview[data-ui-preview="modern"]::before { box-shadow:0 8px 0 #263244,0 14px 0 #202a3a; }
.profile-theme-usage-section { padding:10px 4px 9px; border-bottom:1px solid var(--border); }
.profile-theme-usage-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.profile-theme-usage-heading .profile-menu-section-label { padding-bottom:7px; }
.profile-theme-usage-info { width:24px; height:24px; display:grid; place-items:center; margin:0 4px 7px 0; border-radius:999px; color:var(--text-secondary); cursor:help; }
.profile-theme-usage-info .icon { width:14px; height:14px; }
.profile-theme-usage-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.profile-theme-usage-card { min-width:0; display:grid; gap:2px; padding:9px 10px; border:1px solid var(--border); border-radius:11px; background:color-mix(in srgb,var(--page-bg) 24%,var(--surface)); }
.profile-theme-usage-card>span { color:var(--text-secondary); font-size:.64rem; font-weight:800; }
.profile-theme-usage-card>strong { color:var(--text); font-size:1.08rem; line-height:1.1; }
.profile-theme-usage-card>small { color:var(--text-faint); font-size:.58rem; white-space:nowrap; }
.profile-theme-usage-card.is-modern { border-color:color-mix(in srgb,var(--blue-500) 35%,var(--border)); background:color-mix(in srgb,var(--blue-500) 7%,var(--surface)); }
.profile-theme-usage-card.is-modern>strong { color:var(--blue-600); }
.profile-theme-usage-progress { width:100%; height:5px; display:block; margin:9px 0 5px; overflow:hidden; border:0; border-radius:999px; background:var(--surface-hover); color:var(--blue-500); accent-color:var(--blue-500); }
.profile-theme-usage-progress::-webkit-progress-bar { background:var(--surface-hover); border-radius:999px; }
.profile-theme-usage-progress::-webkit-progress-value { background:var(--blue-500); border-radius:999px; }
.profile-theme-usage-progress::-moz-progress-bar { background:var(--blue-500); border-radius:999px; }
.profile-theme-usage-total { display:block; color:var(--text-faint); font-size:.6rem; text-align:right; }
.profile-theme-usage-total strong { color:var(--text-secondary); font-weight:800; }
.profile-menu-logout { margin:5px 0 0; }
.profile-menu-item-danger { color:#dc2626; }
.profile-menu-item-danger .icon { color:currentColor; }
.dark .profile-menu-item-danger { color:#fca5a5; }
@media (max-width:700px) {
    .user-profile-button { padding-inline:5px; }
    .user-profile-button .user-copy,.user-profile-button .profile-menu-chevron { display:none; }
    .profile-menu { position:fixed; top:72px; right:12px; left:12px; width:auto; }
}

/* FiveM integration — v3.6.0 */
.fivem-users-button .online-users-status-dot{background:#22c55e}.fivem-users-button.is-unavailable .online-users-status-dot{background:#f59e0b}.fivem-users-button:hover{border-color:color-mix(in srgb,#8b5cf6 55%,var(--border));background:color-mix(in srgb,#8b5cf6 8%,var(--surface))}
.fivem-settings-panel{margin-top:18px;padding:22px}.settings-switch-field{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--surface) 94%,var(--page-bg))}.settings-switch-field span{display:grid;gap:3px}.settings-switch-field small{color:var(--text-secondary);font-size:.76rem}.settings-switch-field input{width:20px;height:20px;accent-color:var(--blue-600)}.settings-toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.settings-test-result{min-height:22px;margin:10px 0 0;color:var(--text-secondary);font-size:.8rem}.fivem-account-status{display:inline-flex;align-items:center;gap:7px;font-weight:750;font-size:.78rem}.fivem-account-status i{width:8px;height:8px;border-radius:50%;background:#22c55e}.fivem-account-status.online{color:#16a34a}.fivem-account-status.offline,.fivem-account-status.muted{color:var(--text-secondary)}.fivem-account-time{display:block;margin-top:4px;color:var(--text-secondary);font-size:.7rem}
@media(max-width:800px){.settings-toggle-grid{grid-template-columns:1fr}.fivem-settings-panel{padding:16px}}

/* FiveM and general settings layout fixes — v3.6.1 */
.settings-content { min-width:0; }
.settings-navigation-heading { padding:6px 10px 9px; color:var(--text-faint); font-size:.66rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.settings-navigation-item { position:relative; padding-right:34px; transition:background .16s ease,border-color .16s ease,transform .16s ease; }
.settings-navigation-item:hover { background:var(--surface-hover); transform:translateX(2px); }
.settings-navigation-item.active { color:var(--text); }
.settings-navigation-chevron { position:absolute; right:11px; width:15px; height:15px; color:var(--text-faint); }
.settings-navigation-item.active .settings-navigation-chevron { color:var(--brand-accent-500); }
.fivem-settings-panel { margin:0; padding:0; }
.fivem-section-icon { color:#a78bfa; background:color-mix(in srgb,#8b5cf6 13%,transparent); }
.settings-section-block { padding:20px 24px; border-bottom:1px solid var(--border); }
.settings-section-block-highlight { padding-block:18px; background:color-mix(in srgb,var(--blue-500) 4%,var(--surface)); }
.settings-section-title { display:grid; gap:3px; margin-bottom:15px; }
.settings-section-title strong { color:var(--text); font-size:.9rem; }
.settings-section-title small { color:var(--text-secondary); font-size:.75rem; }
.settings-grid-compact { padding:0; gap:12px; }
.settings-grid-compact .settings-field { padding:14px; }
.settings-field-wide { grid-column:1/-1; }
.settings-field>input[type="url"],.settings-field>input[type="text"] { width:100%; min-height:42px; padding:0 12px; border:1px solid var(--border); border-radius:10px; outline:0; color:var(--text); background:var(--surface); font:inherit; font-weight:650; }
.settings-field>input[type="url"]:focus,.settings-field>input[type="text"]:focus { border-color:var(--blue-500); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue-500) 16%,transparent); }
.settings-switch-field { min-height:76px; padding:14px 15px; transition:border-color .16s ease,background .16s ease; cursor:pointer; }
.settings-switch-field:hover { border-color:var(--border-strong); background:var(--surface-hover); }
.settings-switch-primary { min-height:82px; border-color:color-mix(in srgb,var(--blue-500) 28%,var(--border)); background:color-mix(in srgb,var(--blue-500) 7%,var(--surface)); }
.settings-switch-field input[type="checkbox"] { position:relative; width:42px; height:24px; flex:0 0 42px; appearance:none; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface-muted); cursor:pointer; transition:background .16s ease,border-color .16s ease; }
.settings-switch-field input[type="checkbox"]::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:var(--text-secondary); box-shadow:0 1px 3px rgb(0 0 0 / .25); transition:transform .16s ease,background .16s ease; }
.settings-switch-field input[type="checkbox"]:checked { border-color:var(--blue-600); background:var(--blue-600); }
.settings-switch-field input[type="checkbox"]:checked::after { transform:translateX(18px); background:#fff; }
.settings-switch-field input[type="checkbox"]:focus-visible { outline:2px solid var(--brand-accent-500); outline-offset:3px; }
.settings-toggle-grid { margin:0; }
.settings-inline-errors { margin:18px 24px 0; }
.fivem-status-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; margin:20px 24px; padding:15px 16px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface) 92%,var(--page-bg)); }
.fivem-status-card-icon { position:relative; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#a78bfa; background:color-mix(in srgb,#8b5cf6 13%,transparent); }
.fivem-status-card-icon i { position:absolute; right:4px; bottom:4px; width:8px; height:8px; border:2px solid var(--surface); border-radius:50%; background:#f59e0b; }
.fivem-status-card.status-online .fivem-status-card-icon i { background:#22c55e; }
.fivem-status-card>div { min-width:0; display:grid; gap:2px; }
.fivem-status-card>div strong { font-size:.82rem; }
.fivem-status-card>div span { color:var(--text); font-size:.78rem; font-weight:750; text-transform:capitalize; }
.fivem-status-card>div small { color:var(--text-secondary); font-size:.7rem; }
.fivem-status-card dl { display:flex; gap:8px; margin:0; }
.fivem-status-card dl div { min-width:72px; padding:8px 11px; border:1px solid var(--border); border-radius:10px; text-align:center; background:var(--surface); }
.fivem-status-card dt { color:var(--text-secondary); font-size:.64rem; text-transform:uppercase; }
.fivem-status-card dd { margin:3px 0 0; color:var(--text); font-size:.94rem; font-weight:800; }
.settings-test-result { margin:0 24px 14px; min-height:0; }
.fivem-users-control .online-users-panel { z-index:85; }
@media(max-width:800px){
    .settings-section-block { padding-inline:16px; }
    .settings-field-wide { grid-column:auto; }
    .fivem-status-card { grid-template-columns:auto minmax(0,1fr); margin-inline:16px; }
    .fivem-status-card dl { grid-column:1/-1; width:100%; }
    .fivem-status-card dl div { flex:1; }
    .settings-inline-errors,.settings-test-result { margin-inline:16px; }
}

/* Google Sheets — v3.7.0 */
.sheets-heading{margin-bottom:18px}.sheets-workspace{display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px;align-items:start}.sheets-list{position:sticky;top:calc(var(--topbar-height) + 18px);padding:12px;display:grid;gap:7px}.sheets-list-label{padding:8px 10px;color:var(--text-secondary);font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.sheet-list-item{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;padding:11px;border:1px solid transparent;border-radius:11px;color:var(--text);text-decoration:none}.sheet-list-item:hover,.sheet-list-item.active{border-color:color-mix(in srgb,var(--blue-500) 55%,var(--border));background:color-mix(in srgb,var(--blue-500) 12%,var(--surface))}.sheet-list-item .icon{width:18px}.sheet-list-item span:last-child{display:grid;gap:2px;min-width:0}.sheet-list-item strong,.sheet-list-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-list-item small{color:var(--text-secondary);font-size:.7rem}.sheet-viewer{overflow:hidden}.sheet-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border)}.sheet-toolbar>div:first-child{display:grid;gap:2px}.sheet-toolbar small{color:var(--text-secondary)}.sheet-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.sheet-frame-wrap{position:relative;height:var(--sheet-height);min-height:500px;background:#fff}.sheet-frame-wrap iframe{width:100%;height:100%;border:0;background:#fff}.sheet-scroll-shield{display:none;position:absolute;inset:0;z-index:2}.sheets-workspace[data-scroll-locked="1"] .sheet-scroll-shield{display:block;pointer-events:none}.sheet-page-scroll-locked,.sheet-page-scroll-locked body{overflow:hidden!important;overscroll-behavior:none}.sheet-help{padding:10px 16px;border-top:1px solid var(--border);color:var(--text-secondary);font-size:.74rem}.sheet-help span{display:flex;align-items:center;gap:6px}.sheet-help kbd{padding:2px 5px;border:1px solid var(--border);border-radius:5px;background:var(--page-bg)}.sheet-viewer:fullscreen{background:var(--page-bg);padding:12px}.sheet-viewer:fullscreen .sheet-frame-wrap{height:calc(100vh - 110px)}
.sheets-admin-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(420px,1.2fr);gap:18px;padding:18px}.sheets-admin-list,.sheets-admin-form{padding:16px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--surface) 88%,var(--page-bg))}.sheets-admin-list>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.sheet-admin-card{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.sheet-admin-card>div:first-child{display:grid;gap:3px}.sheet-admin-card small{color:var(--text-secondary)}.sheet-admin-card>div:last-child{display:flex;gap:6px;align-items:center}.sheets-admin-form{display:grid;gap:14px}.sheets-admin-form h3{margin:0}.sheet-access-fieldset{display:grid;gap:10px;padding:14px;border:1px solid var(--border);border-radius:12px}.sheet-access-fieldset>label{display:flex;gap:8px;align-items:center}.sheet-access-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:6px}.sheet-access-columns>div{display:grid;gap:7px;max-height:260px;overflow:auto;padding:10px;border:1px solid var(--border);border-radius:10px}.sheet-access-columns label{display:flex;align-items:center;gap:7px;font-size:.82rem}
@media(max-width:1050px){.sheets-workspace{grid-template-columns:1fr}.sheets-list{position:static;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.sheets-list-label{grid-column:1/-1}.sheets-admin-grid{grid-template-columns:1fr}}@media(max-width:700px){.sheet-toolbar{align-items:flex-start;flex-direction:column}.sheet-toolbar-actions{width:100%}.sheet-toolbar-actions>*{flex:1}.sheet-frame-wrap{height:70vh}.sheets-admin-grid{padding:12px}.sheet-access-columns{grid-template-columns:1fr}}

/* Google Sheets focus mode — v3.7.3 */
.sheet-frame-wrap{height:min(var(--sheet-config-height),calc(100dvh - 250px));min-height:520px}
.sheet-frame-height-500{--sheet-config-height:500px}
.sheet-frame-height-520{--sheet-config-height:520px}
.sheet-frame-height-540{--sheet-config-height:540px}
.sheet-frame-height-560{--sheet-config-height:560px}
.sheet-frame-height-580{--sheet-config-height:580px}
.sheet-frame-height-600{--sheet-config-height:600px}
.sheet-frame-height-620{--sheet-config-height:620px}
.sheet-frame-height-640{--sheet-config-height:640px}
.sheet-frame-height-660{--sheet-config-height:660px}
.sheet-frame-height-680{--sheet-config-height:680px}
.sheet-frame-height-700{--sheet-config-height:700px}
.sheet-frame-height-720{--sheet-config-height:720px}
.sheet-frame-height-740{--sheet-config-height:740px}
.sheet-frame-height-760{--sheet-config-height:760px}
.sheet-frame-height-780{--sheet-config-height:780px}
.sheet-frame-height-800{--sheet-config-height:800px}
.sheet-frame-height-820{--sheet-config-height:820px}
.sheet-frame-height-840{--sheet-config-height:840px}
.sheet-frame-height-860{--sheet-config-height:860px}
.sheet-frame-height-880{--sheet-config-height:880px}
.sheet-frame-height-900{--sheet-config-height:900px}
.sheet-frame-height-920{--sheet-config-height:920px}
.sheet-frame-height-940{--sheet-config-height:940px}
.sheet-frame-height-960{--sheet-config-height:960px}
.sheet-frame-height-980{--sheet-config-height:980px}
.sheet-frame-height-1000{--sheet-config-height:1000px}
.sheet-frame-height-1020{--sheet-config-height:1020px}
.sheet-frame-height-1040{--sheet-config-height:1040px}
.sheet-frame-height-1060{--sheet-config-height:1060px}
.sheet-frame-height-1080{--sheet-config-height:1080px}
.sheet-frame-height-1100{--sheet-config-height:1100px}
.sheet-frame-height-1120{--sheet-config-height:1120px}
.sheet-frame-height-1140{--sheet-config-height:1140px}
.sheet-frame-height-1160{--sheet-config-height:1160px}
.sheet-frame-height-1180{--sheet-config-height:1180px}
.sheet-frame-height-1200{--sheet-config-height:1200px}
.sheet-frame-height-1220{--sheet-config-height:1220px}
.sheet-frame-height-1240{--sheet-config-height:1240px}
.sheet-frame-height-1260{--sheet-config-height:1260px}
.sheet-frame-height-1280{--sheet-config-height:1280px}
.sheet-frame-height-1300{--sheet-config-height:1300px}
.sheet-frame-height-1320{--sheet-config-height:1320px}
.sheet-frame-height-1340{--sheet-config-height:1340px}
.sheet-frame-height-1360{--sheet-config-height:1360px}
.sheet-frame-height-1380{--sheet-config-height:1380px}
.sheet-frame-height-1400{--sheet-config-height:1400px}
.sheet-frame-height-1420{--sheet-config-height:1420px}
.sheet-frame-height-1440{--sheet-config-height:1440px}
.sheet-frame-height-1460{--sheet-config-height:1460px}
.sheet-frame-height-1480{--sheet-config-height:1480px}
.sheet-frame-height-1500{--sheet-config-height:1500px}
.sheet-frame-height-1520{--sheet-config-height:1520px}
.sheet-frame-height-1540{--sheet-config-height:1540px}
.sheet-frame-height-1560{--sheet-config-height:1560px}
.sheet-frame-height-1580{--sheet-config-height:1580px}
.sheet-frame-height-1600{--sheet-config-height:1600px}
.sheet-toolbar-actions .secondary-button{min-height:38px;padding:.58rem .78rem}
.sheet-toolbar-actions .secondary-button .icon{width:16px;height:16px}
.sheet-focus-mode{overflow:hidden}
.sheet-focus-mode body{overflow:hidden}
.sheet-focus-mode .sidebar,
.sheet-focus-mode .sidebar-backdrop,
.sheet-focus-mode .topbar,
.sheet-focus-mode .sheets-heading,
.sheet-focus-mode .breadcrumb,
.sheet-focus-mode .sheets-list{display:none!important}
.sheet-focus-mode .app-main{padding-left:0!important}
.sheet-focus-mode .main-content{padding:0!important;max-width:none!important}
.sheet-focus-mode .sheets-workspace{position:fixed;inset:0;z-index:90;display:block;background:var(--page-bg)}
.sheet-focus-mode .sheet-viewer{height:100dvh;border:0;border-radius:0;display:flex;flex-direction:column}
.sheet-focus-mode .sheet-toolbar{flex:0 0 auto;padding:10px 14px}
.sheet-focus-mode .sheet-toolbar>div:first-child small{display:none}
.sheet-focus-mode .sheet-frame-wrap{flex:1 1 auto;min-height:0;height:auto!important}
.sheet-focus-mode .sheet-help{flex:0 0 auto;padding:7px 14px}
.sheet-viewer:fullscreen{display:flex;flex-direction:column;padding:0}
.sheet-viewer:fullscreen .sheet-toolbar,.sheet-viewer:fullscreen .sheet-help{flex:0 0 auto}
.sheet-viewer:fullscreen .sheet-frame-wrap{flex:1 1 auto;height:auto!important;min-height:0}
@media(max-width:900px){.sheet-toolbar-actions .secondary-button span{display:none}.sheet-toolbar-actions .secondary-button{width:40px;padding:0;justify-content:center}.sheet-toolbar-actions a.secondary-button:last-child{width:auto;padding-inline:10px}.sheet-toolbar-actions a.secondary-button:last-child span{display:inline}.sheet-frame-wrap{min-height:480px}}

/* RESTO Paleto Bay branding — v3.8.2 */
:root {
    --blue-50: #fff8e8;
    --blue-100: #f8e7bd;
    --blue-200: #e8cb86;
    --blue-500: #c7943f;
    --blue-600: #a97525;
    --blue-700: #7f5418;
    --page-bg: #f6f2e9;
    --surface: #fffdf8;
    --surface-soft: #faf5ea;
    --surface-hover: #f2eadb;
    --text: #251d12;
    --text-secondary: #746552;
    --text-faint: #9b8a72;
    --border: #e5d9c6;
    --border-strong: #cdbb9e;
    --sidebar-bg: #100d09;
    --sidebar-surface: #1a150f;
    --sidebar-text: #f3e7ce;
    --sidebar-muted: #a99677;
    --sidebar-border: #332719;
    --shadow: 0 1px 2px rgb(45 31 12 / .06), 0 12px 30px rgb(45 31 12 / .08);
}

html.dark {
    --page-bg: #0d0b08;
    --surface: #17130e;
    --surface-soft: #120f0b;
    --surface-hover: #211a12;
    --text: #f6ead2;
    --text-secondary: var(--brand-accent-muted-alt);
    --text-faint: #806f56;
    --border: #392d1e;
    --border-strong: #58452b;
    --sidebar-bg: #080705;
    --sidebar-surface: #15110c;
    --sidebar-text: #f3e7ce;
    --sidebar-muted: #9f8c6d;
    --sidebar-border: #2b2116;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 14px 34px rgb(0 0 0 / .25);
}

body {
    background-image: radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--blue-500) 7%, transparent), transparent 28rem);
}

.sidebar {
    background:
        linear-gradient(180deg, rgb(var(--brand-accent-rgb) / .055), transparent 190px),
        var(--sidebar-bg);
}

.sidebar-header {
    min-height: 86px;
    padding-block: 10px;
}

.brand {
    gap: 12px;
}

.brand-mark.brand-logo {
    width: 58px;
    height: 58px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid rgb(220 179 101 / .48);
    border-radius: 50%;
    background: #080705;
    box-shadow: 0 8px 24px rgb(0 0 0 / .34), 0 0 0 3px rgb(var(--brand-accent-rgb) / .08);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.brand-copy strong {
    color: #f4dfb5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    letter-spacing: .035em;
}

.brand-copy small {
    color: #aa9674;
    letter-spacing: .04em;
}

.sidebar-link.active,
.sidebar-submenu-link.active,
.sidebar-group-toggle.active {
    color: #f7e5bf;
    background: linear-gradient(90deg, rgb(var(--brand-accent-rgb) / .2), rgb(var(--brand-accent-rgb) / .06));
    box-shadow: inset 3px 0 0 var(--blue-500);
}

.primary-button {
    border: 1px solid #d5a957;
    background: linear-gradient(180deg, #c99742, #9c681f);
    color: #fff8e9;
    box-shadow: 0 7px 18px rgb(126 82 22 / .18);
}

.primary-button:hover {
    background: linear-gradient(180deg, var(--brand-accent-500), #ad7625);
}

.sidebar-link:focus-visible,
.sidebar-group-toggle:focus-visible,
.sidebar-submenu-link:focus-visible,
.sidebar-search input:focus-visible,
.icon-button:focus-visible,
.theme-button:focus-visible,
.quick-links a:focus-visible,
.primary-button:focus-visible {
    outline-color: rgb(var(--brand-accent-rgb) / .42);
}

.settings-navigation-item.active {
    background: color-mix(in srgb, var(--blue-500) 14%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue-500) 36%, var(--border));
}

.settings-navigation-item > span:first-child,
.settings-navigation-item.active .settings-navigation-chevron,
.section-icon,
.eyebrow {
    color: var(--blue-500);
}

.topbar,
.auth-topbar {
    border-bottom-color: color-mix(in srgb, var(--blue-500) 16%, var(--border));
}

.auth-body {
    background:
        radial-gradient(circle at 18% 14%, rgb(var(--brand-accent-rgb) / .12), transparent 30%),
        radial-gradient(circle at 82% 88%, rgb(111 74 25 / .08), transparent 28%),
        var(--page-bg);
}

.auth-topbar {
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.dark .auth-topbar {
    background: rgb(20 16 11 / .88);
}

.auth-brand .brand-mark.brand-logo {
    width: 54px;
    height: 54px;
}

.auth-brand .brand-copy strong {
    color: var(--text);
}

.auth-card-branded {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--blue-500) 28%, var(--border));
    box-shadow: 0 24px 70px rgb(69 44 12 / .14);
}

.auth-card-branded::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #6f4719, #dfbb70, #6f4719);
}

.auth-seal {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    margin: -4px auto 16px;
    border-radius: 50%;
    filter: drop-shadow(0 12px 18px rgb(57 35 8 / .2));
}

.auth-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-card-branded .auth-card-icon {
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 28%, var(--border));
    background: color-mix(in srgb, var(--blue-500) 11%, var(--surface));
    color: var(--blue-600);
}

.auth-card-branded .auth-card-heading {
    text-align: center;
}

.auth-card-branded .auth-form,
.auth-card-branded .auth-security-note,
.auth-card-branded .form-alert {
    text-align: left;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.settings-input-unit:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 17%, transparent);
}

.profile-theme-options button.is-active {
    color: var(--blue-700);
}

.dark .profile-theme-options button.is-active {
    color: var(--brand-accent-100);
}

@media (max-width: 1080px) {
    .brand-mark.brand-logo {
        width: 48px;
        height: 48px;
    }
}


/* RESTO visual consistency fixes — v3.8.2 */
.dark .eyebrow,
.dark .section-icon,
.dark .invoice-hero-icon,
.dark .invoice-row-icon,
.dark .invoice-product-icon,
.dark .invoice-status-tabs a:hover,
.dark .invoice-status-tabs a.active,
.dark .invoice-total-final dd,
.dark .invoice-card-metric.invoice-card-total strong,
.dark .account-position-label,
.dark .position-rank,
.dark .menu-product-price,
.dark .menu-current-price strong,
.dark .menu-archive-heading > span,
.dark .profile-theme-options button.is-active {
    color: var(--brand-accent-200);
}

.invoice-hero,
.dark .invoice-hero {
    background:
        radial-gradient(circle at 94% -20%, rgb(var(--brand-accent-rgb) / .14), transparent 36%),
        var(--surface);
}

.online-user-avatar {
    color: #fff4dc;
    background: linear-gradient(135deg, #b9822f, #704814);
}

.settings-heading-icon,
.settings-navigation-item > span:first-child,
.settings-section-icon,
.settings-info-box .icon,
.settings-navigation-item.active .settings-navigation-chevron,
.profile-menu-item .icon {
    color: var(--brand-accent-500);
}

.settings-heading-icon,
.settings-navigation-item > span:first-child,
.settings-section-icon {
    background: color-mix(in srgb, var(--blue-500) 13%, transparent);
    border-color: color-mix(in srgb, var(--blue-500) 25%, var(--border));
}

.settings-navigation-item.active,
.settings-switch-primary,
.settings-section-block-highlight,
.settings-info-box {
    background: color-mix(in srgb, var(--blue-500) 8%, var(--surface));
}

.settings-input-unit:focus-within,
.settings-field > input[type="url"]:focus,
.settings-field > input[type="text"]:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 16%, transparent);
}

.settings-switch-field input,
.permission-category input,
.permission-items input {
    accent-color: var(--blue-600);
}

.sheet-list-item:hover,
.sheet-list-item.active {
    border-color: color-mix(in srgb, var(--blue-500) 55%, var(--border));
    background: color-mix(in srgb, var(--blue-500) 12%, var(--surface));
}

.invoice-card-metric.invoice-card-total strong,
.invoice-total-final dd,
.work-entry-amount strong,
.menu-current-price strong,
.menu-product-price,
.account-position-label,
.position-meta .icon,
.app-modal-eyebrow,
.auth-back-link {
    color: var(--blue-600);
}

.dark .invoice-card-metric.invoice-card-total strong,
.dark .invoice-total-final dd,
.dark .work-entry-amount strong,
.dark .menu-current-price strong,
.dark .menu-product-price,
.dark .account-position-label,
.dark .position-meta .icon,
.dark .app-modal-eyebrow,
.dark .auth-back-link {
    color: var(--brand-accent-200);
}

.sidebar-submenu-link {
    color: #c8b38f;
}

.sidebar-submenu-link:hover {
    color: #f2ddb3;
}

.sidebar-submenu-link::before {
    background: #7f6848;
}

.sidebar-submenu-link.active::before {
    background: var(--blue-500);
    box-shadow: 0 0 0 4px rgb(var(--brand-accent-rgb) / .12);
}

.status-badge.info,
.dark .status-badge.info {
    background: color-mix(in srgb, var(--blue-500) 18%, var(--surface));
    color: var(--brand-accent-200);
}


/* RESTO final shared component palette — v3.8.2 */
.dark .navigation-icon,
.dark .metric-icon,
.dark .activity-icon,
.dark .quick-icon,
.dark .category-icon,
.dark .construction-icon {
    color: var(--brand-accent-200);
}

.dark .metric-card:hover,
.dark .quick-links a:hover {
    border-color: var(--brand-accent-border);
}

.date-pill,
.dark .date-pill {
    color: var(--brand-accent-muted-light);
}

.navigation-icon { color: var(--brand-accent-muted); }
.sidebar-link.active .navigation-icon,
.sidebar-link:hover .navigation-icon,
.sidebar-group-toggle:hover .navigation-icon,
.sidebar-group.open .sidebar-group-toggle .navigation-icon { color: var(--brand-accent-200); }

.metric-icon, .activity-icon, .quick-icon, .category-icon {
    color: var(--blue-600);
}

/* Collaborations — v3.9.0 */
.collaboration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:16px}.collaboration-grid>.empty-state{grid-column:1/-1}.collaboration-card{display:grid;grid-template-columns:180px minmax(0,1fr);overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.collaboration-thumb{display:block;min-height:170px;background:color-mix(in srgb,var(--page-bg) 70%,#000);overflow:hidden}.collaboration-thumb img{width:100%;height:100%;min-height:170px;object-fit:cover;display:block;transition:transform .2s ease}.collaboration-thumb:hover img{transform:scale(1.025)}.collaboration-card-body{display:flex;flex-direction:column;justify-content:space-between;gap:18px;padding:18px}.collaboration-card h3{margin:12px 0 4px;color:var(--text);font-size:1.08rem}.collaboration-card small{color:var(--text-secondary)}.collaboration-card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.collaboration-card-actions form{display:inline-flex}.collaboration-form{padding:24px}.collaboration-form-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:20px}.collaboration-dropzone{position:relative;display:grid;place-items:center;align-content:center;gap:8px;min-height:210px;padding:24px;border:1px dashed color-mix(in srgb,var(--blue-500) 62%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--blue-500) 6%,var(--surface));text-align:center;cursor:pointer}.collaboration-dropzone:hover,.collaboration-dropzone:focus-visible,.collaboration-dropzone.is-paste-target{border-color:var(--blue-500);background:color-mix(in srgb,var(--blue-500) 11%,var(--surface));outline:none}.collaboration-dropzone input{position:absolute;inline-size:1px;block-size:1px;opacity:0;pointer-events:none}.collaboration-dropzone-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;color:var(--blue-500);background:color-mix(in srgb,var(--blue-500) 15%,transparent)}.collaboration-dropzone-icon .icon{width:25px;height:25px}.collaboration-dropzone strong{color:var(--text)}.collaboration-dropzone small{color:var(--text-secondary)}.collaboration-preview{margin-top:20px;display:grid;grid-template-columns:minmax(0,420px);gap:8px}.collaboration-preview[hidden]{display:none}.collaboration-preview img{width:100%;max-height:360px;object-fit:contain;border:1px solid var(--border);border-radius:16px;background:#090704}.collaboration-preview span{color:var(--text-secondary);font-size:.8rem}.collaboration-detail-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr);gap:18px}.collaboration-image-panel{padding:14px}.collaboration-image-panel img{display:block;width:100%;max-height:72vh;object-fit:contain;border-radius:12px;background:#090704}.collaboration-decision-panel{padding:24px;align-self:start}.collaboration-decision-panel dl{display:grid;gap:0;margin:20px 0}.collaboration-decision-panel dl>div{display:grid;grid-template-columns:130px minmax(0,1fr);gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}.collaboration-decision-panel dt{color:var(--text-secondary);font-size:.8rem}.collaboration-decision-panel dd{margin:0;color:var(--text);font-weight:700}.collaboration-review-form{display:grid;gap:14px;margin-top:20px}.management-collaboration-grid .collaboration-card{grid-template-columns:150px minmax(0,1fr)}
@media(max-width:1000px){.collaboration-grid{grid-template-columns:1fr}.collaboration-detail-grid,.collaboration-form-grid{grid-template-columns:1fr}}
@media(max-width:650px){.collaboration-grid{padding:12px}.collaboration-card,.management-collaboration-grid .collaboration-card{grid-template-columns:1fr}.collaboration-thumb,.collaboration-thumb img{min-height:210px}.collaboration-form{padding:16px}.collaboration-card-actions>*{flex:1}.collaboration-card-actions form,.collaboration-card-actions form button{width:100%}.collaboration-decision-panel dl>div{grid-template-columns:1fr;gap:4px}}

/* Collaborations fixes — v3.9.1 */
.collaboration-preview-error {
    display: block;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #ef4444 45%, var(--border));
    border-radius: 12px;
    color: #fca5a5;
    background: color-mix(in srgb, #ef4444 10%, var(--surface));
}
.collaboration-dropzone.is-paste-target {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 16%, transparent);
}
.collaboration-preview img {
    min-height: 120px;
}

/* Collaborations layout refinements — v3.9.3 */
.collaboration-form-modern{padding:0;overflow:hidden}.collaboration-form-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border-bottom:1px solid var(--border)}.collaboration-form-intro h2{margin:4px 0 3px;color:var(--text);font-size:1.15rem}.collaboration-form-intro p{margin:0;color:var(--text-secondary);font-size:.82rem}.collaboration-form-step{padding:7px 10px;border:1px solid var(--border);border-radius:999px;color:var(--text-secondary);font-size:.72rem;font-weight:700}.collaboration-form-modern .collaboration-form-grid{padding:24px;grid-template-columns:minmax(300px,.72fr) minmax(420px,1.28fr);align-items:stretch}.collaboration-company-card,.collaboration-upload-card{padding:20px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--surface-soft) 72%,var(--surface))}.collaboration-company-card{display:flex;flex-direction:column;justify-content:space-between;gap:24px}.collaboration-company-card .form-field input{min-height:50px}.collaboration-help{display:flex;align-items:flex-start;gap:10px;padding:13px;border-radius:12px;background:color-mix(in srgb,var(--blue-500) 8%,transparent);color:var(--text-secondary)}.collaboration-help .icon{width:18px;height:18px;flex:0 0 18px;color:var(--blue-500)}.collaboration-help p{margin:0;font-size:.78rem;line-height:1.5}.collaboration-upload-card .form-field{height:100%}.collaboration-upload-card .collaboration-dropzone{min-height:260px;height:100%}.collaboration-dropzone-meta{margin-top:4px;padding:5px 9px;border-radius:999px;background:color-mix(in srgb,var(--page-bg) 60%,transparent);color:var(--text-faint);font-size:.68rem;font-weight:700}.collaboration-form-modern .collaboration-preview{margin:0 24px 22px;grid-template-columns:minmax(0,520px);padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.collaboration-form-modern .collaboration-preview img{max-height:320px}.collaboration-form-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-top:1px solid var(--border);background:color-mix(in srgb,var(--page-bg) 35%,var(--surface))}.collaboration-form-footer>p{display:flex;align-items:center;gap:8px;margin:0;color:var(--text-secondary);font-size:.75rem}.collaboration-form-footer>p .icon{width:16px;height:16px;color:var(--blue-500)}.collaboration-form-footer .form-actions{margin:0}.collaboration-filter-panel{display:grid;grid-template-columns:minmax(180px,.75fr) minmax(180px,.8fr) minmax(260px,1.2fr) auto;align-items:end;gap:16px;padding:20px 22px;border-radius:18px}.collaboration-filter-heading{align-self:center;display:grid;gap:4px}.collaboration-filter-heading strong{color:var(--text);font-size:.92rem}.collaboration-filter-panel .form-field{gap:7px}.collaboration-filter-panel select{width:100%;min-height:44px;padding:0 38px 0 12px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:.82rem;font-weight:600}.collaboration-filter-panel select:focus{border-color:var(--blue-500);outline:none;box-shadow:0 0 0 3px rgb(var(--brand-accent-rgb) / .15)}.collaboration-filter-actions{display:flex;align-items:center;gap:8px}.collaboration-filter-actions>*{min-height:44px;white-space:nowrap}
@media(max-width:1050px){.collaboration-form-modern .collaboration-form-grid{grid-template-columns:1fr}.collaboration-filter-panel{grid-template-columns:1fr 1fr}.collaboration-filter-heading,.collaboration-filter-actions{grid-column:1/-1}.collaboration-filter-actions{justify-content:flex-end}}
@media(max-width:650px){.collaboration-form-intro,.collaboration-form-footer{align-items:flex-start;flex-direction:column}.collaboration-form-modern .collaboration-form-grid{padding:16px}.collaboration-company-card,.collaboration-upload-card{padding:16px}.collaboration-upload-card .collaboration-dropzone{min-height:220px}.collaboration-form-modern .collaboration-preview{margin:0 16px 16px}.collaboration-form-footer .form-actions,.collaboration-form-footer .form-actions>*{width:100%}.collaboration-filter-panel{grid-template-columns:1fr;padding:16px}.collaboration-filter-heading,.collaboration-filter-actions{grid-column:auto}.collaboration-filter-actions>*{flex:1}}

/* General logs — v4.0.0 */
.general-logs-page,.general-log-detail-page{display:grid;gap:18px}.general-logs-export{margin-left:auto;align-self:center}.general-log-filters{padding:22px}.general-log-filter-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.general-log-filter-heading h2{margin:3px 0 0}.general-log-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.general-log-search{grid-column:span 2}.general-log-filter-actions{display:flex;justify-content:flex-end;margin-top:16px}.general-log-list-panel{overflow:hidden}.general-log-list-panel>.panel-section-header{padding:22px 24px;border-bottom:1px solid var(--border)}.general-log-table-wrap{overflow:auto}.general-log-table{width:100%;border-collapse:collapse;min-width:1050px}.general-log-table th,.general-log-table td{padding:15px 16px;border-bottom:1px solid var(--border);vertical-align:middle;text-align:left}.general-log-table th{color:var(--text-secondary);font-size:.72rem;text-transform:uppercase;letter-spacing:.07em}.general-log-table td strong,.general-log-table td small{display:block}.general-log-table td small{margin-top:3px;color:var(--text-secondary);font-size:.73rem}.general-log-table tbody tr:hover{background:color-mix(in srgb,var(--accent) 5%,transparent)}.general-log-module{display:inline-flex;align-items:center;padding:5px 9px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:999px;color:var(--accent-strong);background:color-mix(in srgb,var(--accent) 8%,transparent);font-size:.75rem;font-weight:750}.general-log-result{display:inline-flex;align-items:center;justify-content:center;min-width:76px;padding:6px 10px;border-radius:999px;font-size:.73rem;font-weight:800}.general-log-result-success{color:#86efac;background:rgba(34,197,94,.14)}.general-log-result-failed{color:#fca5a5;background:rgba(239,68,68,.16)}.general-log-result-warning{color:#fcd34d;background:rgba(245,158,11,.15)}.general-log-result-denied{color:#fda4af;background:rgba(225,29,72,.16)}.general-log-result-conflict{color:#c4b5fd;background:rgba(139,92,246,.15)}.general-log-detail-card{overflow:hidden}.general-log-detail-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px;border-bottom:1px solid var(--border)}.general-log-detail-card>header h2{margin:10px 0 4px}.general-log-detail-card code{color:var(--text-secondary)}.general-log-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:22px 24px}.general-log-detail-grid>div,.general-log-note{padding:16px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--surface) 88%,var(--page-bg))}.general-log-detail-grid span,.general-log-note>span{display:block;margin-bottom:7px;color:var(--text-secondary);font-size:.72rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em}.general-log-detail-grid small{display:block;margin-top:4px;color:var(--text-secondary)}.general-log-note{margin:0 24px 14px}.general-log-note p{margin:0;white-space:pre-wrap}.general-log-changes{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:10px 24px 24px}.general-log-changes section{min-width:0;padding:18px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--page-bg) 45%,var(--surface))}.general-log-changes h3{margin:0 0 12px}.general-log-changes pre{max-height:430px;overflow:auto;margin:0;padding:14px;border-radius:10px;background:#090806;color:#e9d9b2;font:500 .78rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;word-break:break-word}
@media(max-width:1100px){.general-log-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.general-log-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.general-logs-export{margin-left:0}.general-log-filter-heading{align-items:stretch;flex-direction:column}.general-log-filter-grid{grid-template-columns:1fr}.general-log-search{grid-column:auto}.general-log-filter-actions .primary-button{width:100%}.general-log-detail-card>header{flex-direction:column}.general-log-detail-grid,.general-log-changes{grid-template-columns:1fr}.general-log-note{margin-inline:16px}.general-log-detail-grid,.general-log-changes{padding-inline:16px}}

/* General logs polish — v4.0.1 */
.general-logs-hero,.general-log-detail-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px;background:linear-gradient(125deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),var(--surface) 62%)}
.general-logs-hero-main{display:flex;align-items:center;gap:18px;min-width:0}.general-logs-hero-icon{width:50px;height:50px;display:grid;place-items:center;flex:0 0 50px;border:1px solid color-mix(in srgb,var(--accent) 42%,var(--border));border-radius:15px;color:var(--accent-strong);background:color-mix(in srgb,var(--accent) 12%,transparent)}.general-logs-hero-icon .icon{width:23px;height:23px}.general-logs-hero h1,.general-log-detail-hero h1{margin:4px 0 6px;font-size:clamp(1.8rem,3vw,2.35rem)}.general-logs-hero p,.general-log-detail-hero p{margin:0;color:var(--text-secondary)}
.general-logs-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.general-log-stat{min-width:92px;padding:9px 13px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--page-bg) 36%,var(--surface))}.general-log-stat span,.general-log-stat strong{display:block}.general-log-stat span{color:var(--text-secondary);font-size:.65rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em}.general-log-stat strong{margin-top:2px;font-size:1.05rem}
.general-log-filters{padding:24px;border-color:color-mix(in srgb,var(--accent) 24%,var(--border))}.general-log-filter-heading p{margin:5px 0 0;color:var(--text-secondary);font-size:.82rem}.general-log-filter-grid .form-field>span{margin-bottom:7px}.general-log-filter-actions{padding-top:4px;border-top:1px solid color-mix(in srgb,var(--border) 75%,transparent)}
.general-log-list-panel>.panel-section-header{background:color-mix(in srgb,var(--accent) 4%,var(--surface))}.general-log-table thead{background:color-mix(in srgb,var(--page-bg) 55%,var(--surface))}.general-log-table tbody tr:last-child td{border-bottom:0}.general-log-table td:first-child time{font-weight:750}.general-log-table code{padding:4px 7px;border:1px solid var(--border);border-radius:7px;background:color-mix(in srgb,var(--page-bg) 52%,var(--surface));color:var(--text-secondary);font-size:.72rem}
.general-log-detail-card{border-color:color-mix(in srgb,var(--accent) 25%,var(--border));box-shadow:0 20px 55px rgba(0,0,0,.16)}.general-log-detail-card>header{align-items:center;background:linear-gradient(100deg,color-mix(in srgb,var(--accent) 7%,var(--surface)),var(--surface))}.general-log-detail-title{display:flex;align-items:center;gap:16px}.general-log-detail-title h2{margin:0 0 5px}.general-log-detail-card>header time{padding:8px 11px;border:1px solid var(--border);border-radius:10px;color:var(--text-secondary);background:color-mix(in srgb,var(--page-bg) 45%,var(--surface));font-size:.78rem;font-weight:700}.general-log-detail-grid>div{min-height:104px;display:flex;flex-direction:column;justify-content:center}.general-log-detail-grid strong{font-size:1rem}.general-log-note{border-left:3px solid var(--accent)}.general-log-change-heading span{display:block;margin-bottom:4px;color:var(--accent-strong);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.general-log-change-heading h3{margin:0 0 14px}.general-log-changes section:first-child{border-top:3px solid color-mix(in srgb,var(--text-secondary) 60%,transparent)}.general-log-changes section:last-child{border-top:3px solid var(--accent)}
@media(max-width:900px){.general-logs-hero,.general-log-detail-hero{align-items:flex-start;flex-direction:column}.general-logs-hero-actions{width:100%;justify-content:flex-start}}
@media(max-width:700px){.general-logs-hero,.general-log-detail-hero{padding:20px}.general-logs-hero-main{align-items:flex-start}.general-logs-hero-actions>*{flex:1 1 auto}.general-log-detail-title{align-items:flex-start;flex-direction:column}.general-log-table{min-width:0}.general-log-table thead{display:none}.general-log-table,.general-log-table tbody,.general-log-table tr,.general-log-table td{display:block;width:100%}.general-log-table tr{padding:14px 16px;border-bottom:1px solid var(--border)}.general-log-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:10px;padding:7px 0;border:0}.general-log-table td::before{content:attr(data-label);color:var(--text-secondary);font-size:.7rem;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.general-log-table td:last-child{display:block;padding-top:12px}.general-log-table td:last-child .small-button{width:100%}}
/* Payroll — v4.1.0 */
.payroll-page{display:grid;gap:18px}.payroll-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:26px 28px;background:linear-gradient(125deg,var(--surface),color-mix(in srgb,var(--brand-gold,#caa64b) 10%,var(--surface)))}.payroll-hero h1{margin:4px 0 6px}.payroll-hero p{margin:0;color:var(--text-secondary)}.payroll-generate{display:flex;align-items:end;gap:10px}.payroll-generate label{display:grid;gap:6px;min-width:260px}.payroll-generate label>span,.payroll-period-bar span,.payroll-summary-grid article>span{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text-secondary)}.payroll-generate select,.payroll-period-bar select{min-height:42px;padding:0 38px 0 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}.payroll-period-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px}.payroll-period-bar>div{display:grid;gap:4px}.payroll-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.payroll-summary-grid article{padding:18px 20px}.payroll-summary-grid strong{display:block;margin-top:8px;font-size:1.35rem}.payroll-table-wrap{overflow:hidden}.payroll-table-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid var(--border)}.payroll-table-head h2{margin:4px 0 0}.payroll-table{display:grid}.payroll-row{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(140px,.8fr) minmax(160px,.9fr) minmax(130px,.7fr) minmax(150px,.8fr);align-items:center;gap:14px;padding:15px 22px;border-bottom:1px solid var(--border)}.payroll-row:last-child{border-bottom:0}.payroll-row-header{min-height:44px;background:color-mix(in srgb,var(--page-bg) 60%,var(--surface));font-size:.7rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--text-secondary)}.payroll-person{display:flex;align-items:center;gap:11px;min-width:0}.payroll-person>div{display:grid;gap:2px;min-width:0}.payroll-person strong,.payroll-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.payroll-person small{color:var(--text-secondary)}.payroll-amount{font-size:1.05rem;color:var(--brand-gold,#caa64b)}.payroll-actions{display:flex;justify-content:flex-end}.payroll-actions form{margin:0}.payroll-actions .small-button{min-width:104px}.app-modal[data-payroll-modal]{max-width:520px}@media(max-width:1050px){.payroll-hero{align-items:flex-start;flex-direction:column}.payroll-generate{width:100%}.payroll-generate label{min-width:0;flex:1}.payroll-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.payroll-row{grid-template-columns:minmax(190px,1.3fr) 120px 140px 120px 120px;padding-inline:16px}}@media(max-width:760px){.payroll-generate{align-items:stretch;flex-direction:column}.payroll-generate .primary-button{width:100%}.payroll-period-bar{align-items:stretch;flex-direction:column}.payroll-period-bar select{width:100%}.payroll-summary-grid{grid-template-columns:1fr}.payroll-row-header{display:none}.payroll-row{grid-template-columns:1fr 1fr;gap:12px;padding:16px}.payroll-person{grid-column:1/-1}.payroll-row>strong:nth-child(2)::before{content:'Godziny: ';font-weight:500;color:var(--text-secondary)}.payroll-amount{text-align:right}.payroll-actions{grid-column:1/-1;justify-content:stretch}.payroll-actions form,.payroll-actions .small-button{width:100%}}

/* Payroll history read-only state — v4.1.5 */
.payroll-readonly-notice { display:flex; align-items:flex-start; gap:12px; margin:0 20px 16px; padding:13px 15px; border:1px solid color-mix(in srgb,var(--accent) 34%,var(--border)); border-radius:12px; background:color-mix(in srgb,var(--accent) 8%,var(--surface)); color:var(--text-secondary); }
.payroll-readonly-notice>.icon { width:20px; height:20px; flex:0 0 20px; color:var(--accent); margin-top:1px; }
.payroll-readonly-notice div { display:grid; gap:3px; }
.payroll-readonly-notice strong { color:var(--text); font-size:.84rem; }
.payroll-readonly-notice span { font-size:.76rem; line-height:1.45; }
.payroll-view-only { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:32px; padding:0 10px; border:1px solid var(--border); border-radius:10px; color:var(--text-secondary); background:color-mix(in srgb,var(--page-bg) 46%,var(--surface)); font-size:.75rem; font-weight:700; white-space:nowrap; }
.payroll-view-only .icon { width:15px; height:15px; }

/* Recruitment — v4.2.0 */
.recruitment-public-card{width:min(980px,100%);margin:auto;padding:28px;border:1px solid var(--border);border-radius:22px;background:var(--surface);box-shadow:var(--shadow-lg)}
.recruitment-public-header{display:flex;align-items:center;gap:22px;padding-bottom:24px;border-bottom:1px solid var(--border)}
.recruitment-public-header .brand-mark{width:92px;height:92px;flex:0 0 92px}.recruitment-public-header h1{margin:4px 0 8px;font-size:clamp(1.8rem,4vw,2.7rem)}.recruitment-public-header p{margin:0;color:var(--text-secondary);line-height:1.65}
.recruitment-closed-message,.recruitment-success-message{display:flex;gap:16px;align-items:flex-start;margin-top:24px;padding:24px;border:1px solid color-mix(in srgb,var(--gold-500) 45%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--gold-500) 9%,var(--surface))}.recruitment-closed-message .icon,.recruitment-success-message .icon{width:28px;height:28px;color:var(--gold-500)}.recruitment-closed-message strong,.recruitment-success-message strong{font-size:1.15rem}.recruitment-closed-message p,.recruitment-success-message p{margin:7px 0 0;color:var(--text-secondary);line-height:1.6}
.recruitment-public-form{display:grid;gap:22px;margin-top:24px}.recruitment-public-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.recruitment-question-list{display:grid;gap:16px}.recruitment-question{padding:18px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--page-bg) 40%,var(--surface))}.recruitment-consent{display:flex;align-items:flex-start;gap:10px;color:var(--text-secondary);line-height:1.45}.recruitment-consent input{margin-top:3px}.recruitment-public-actions{display:flex;justify-content:flex-end}.recruitment-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.recruitment-filter-bar{display:grid;grid-template-columns:220px minmax(260px,1fr) auto auto;align-items:end;gap:14px;padding:18px}.recruitment-filter-bar label{display:grid;gap:7px}.recruitment-filter-bar label>span{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--text-secondary)}
.recruitment-application-list{overflow:hidden}.recruitment-application-row{display:grid;grid-template-columns:minmax(260px,1.4fr) minmax(180px,.8fr) minmax(100px,.5fr) auto;align-items:center;gap:18px;padding:18px 20px;border-bottom:1px solid var(--border)}.recruitment-application-row:last-child{border-bottom:0}.recruitment-application-row>div{display:grid;gap:4px}.recruitment-application-row>div>span{font-size:.72rem;color:var(--text-secondary)}.recruitment-application-main{grid-template-columns:auto 1fr;column-gap:10px}.recruitment-application-main .status-badge{grid-row:1/3}.recruitment-application-main small{color:var(--text-secondary)}
.status-pending,.status-review{color:#fbbf24;background:rgba(245,158,11,.14)}.status-accepted{color:#86efac;background:rgba(34,197,94,.14)}.status-rejected,.status-spam{color:#fca5a5;background:rgba(239,68,68,.14)}
.recruitment-detail-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.7fr);gap:18px}.recruitment-answer-panel{padding:22px}.recruitment-answer-panel>header{display:flex;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--border)}.recruitment-answer-panel article{padding:18px 0;border-bottom:1px solid var(--border)}.recruitment-answer-panel article:last-child{border:0}.recruitment-answer-panel h3{margin:0 0 8px;font-size:1rem}.recruitment-answer-panel p{margin:0;color:var(--text-secondary);line-height:1.65;white-space:pre-wrap}.recruitment-decision-panel{padding:22px;align-self:start}.recruitment-decision-panel dl{display:grid;gap:0;margin:0 0 20px}.recruitment-decision-panel dl div{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--border)}.recruitment-decision-panel dt{color:var(--text-secondary)}.recruitment-decision-panel dd{margin:0;font-weight:800;text-align:right}.decision-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.recruitment-question-settings{margin-top:18px;padding:22px;border-top:1px solid var(--border)}.recruitment-question-setting-row{display:grid;grid-template-columns:minmax(280px,1fr) 160px 120px 110px;align-items:end;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}.recruitment-question-setting-row label{display:grid;gap:6px}.recruitment-question-setting-row label>span{font-size:.75rem;color:var(--text-secondary);font-weight:700}.compact-check{display:flex!important;grid-auto-flow:column;justify-content:start;align-items:center;padding-bottom:12px}.recruitment-settings-panel code{color:var(--gold-300);word-break:break-all}
@media(max-width:900px){.recruitment-public-grid,.recruitment-detail-grid{grid-template-columns:1fr}.recruitment-filter-bar{grid-template-columns:1fr 1fr}.recruitment-application-row{grid-template-columns:1fr auto}.recruitment-application-row>div:nth-child(2),.recruitment-application-row>div:nth-child(3){grid-column:1}.recruitment-question-setting-row{grid-template-columns:1fr 1fr}.compact-check{padding-bottom:0}}
@media(max-width:600px){.recruitment-public-card{padding:18px;border-radius:16px}.recruitment-public-header{align-items:flex-start}.recruitment-public-header .brand-mark{width:64px;height:64px;flex-basis:64px}.recruitment-filter-bar,.recruitment-question-setting-row{grid-template-columns:1fr}.recruitment-application-row{grid-template-columns:1fr}.recruitment-application-row .small-button{width:100%}.decision-actions{flex-direction:column}.decision-actions>*{width:100%}}

/* Recruitment redesign — v4.2.2 */
.recruitment-settings-panel { display:grid; gap:20px; }
.recruitment-settings-header { padding-bottom:22px; border-bottom:1px solid var(--border); }
.recruitment-main-settings-form { display:grid; gap:18px; }
.recruitment-settings-card { padding:20px; border:1px solid color-mix(in srgb,var(--gold-500) 28%,var(--border)); border-radius:18px; background:linear-gradient(145deg,color-mix(in srgb,var(--gold-500) 4%,var(--surface)),var(--surface)); box-shadow:0 12px 28px rgba(0,0,0,.12); }
.recruitment-settings-card-heading { display:flex; align-items:center; gap:13px; min-width:0; }
.recruitment-settings-card-heading>div { display:grid; gap:4px; min-width:0; }
.recruitment-settings-card-heading strong { color:var(--text); font-size:1rem; }
.recruitment-settings-card-heading small { color:var(--text-secondary); line-height:1.45; }
.recruitment-settings-card-icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; border:1px solid color-mix(in srgb,var(--gold-500) 35%,var(--border)); border-radius:12px; color:var(--gold-300); background:color-mix(in srgb,var(--gold-500) 10%,transparent); }
.recruitment-settings-card-icon .icon { width:20px; height:20px; }
.recruitment-settings-status-card { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.recruitment-inline-switch { margin-top:18px; padding:14px 16px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--page-bg) 42%,var(--surface)); }
.recruitment-settings-status-card .recruitment-inline-switch { margin-top:0; min-width:330px; }
.recruitment-settings-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:18px; }
.recruitment-settings-fields-wide .settings-field { grid-column:1/-1; }
.recruitment-protection-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.recruitment-discord-required { max-width:620px; }
.recruitment-webhook-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:18px; }
.recruitment-webhook-card { display:grid; gap:16px; padding:18px; border:1px solid var(--border); border-radius:15px; background:color-mix(in srgb,var(--page-bg) 42%,var(--surface)); }
.recruitment-webhook-toggle { padding-bottom:14px; border-bottom:1px solid var(--border); }
.recruitment-settings-save { margin:0; padding:0; border:0; background:none; }
.recruitment-question-settings { margin:0; }
.recruitment-question-header { display:flex; justify-content:space-between; align-items:center; gap:18px; padding-bottom:18px; border-bottom:1px solid var(--border); }
.recruitment-question-columns { display:grid; grid-template-columns:44px minmax(280px,1fr) 170px 120px 110px; gap:12px; padding:18px 12px 8px; color:var(--text-secondary); font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.recruitment-question-columns span:first-child { grid-column:2; }
.recruitment-question-rows { display:grid; gap:8px; }
.recruitment-question-setting-row { display:grid; grid-template-columns:44px minmax(280px,1fr) 170px 120px 110px; align-items:center; gap:12px; padding:12px; border:1px solid var(--border); border-radius:13px; background:color-mix(in srgb,var(--page-bg) 35%,var(--surface)); }
.recruitment-question-setting-row label { display:grid; gap:6px; min-width:0; }
.recruitment-question-setting-row label>span { display:none; }
.recruitment-question-number { width:34px; height:34px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--gold-500) 35%,var(--border)); border-radius:10px; color:var(--gold-200); background:color-mix(in srgb,var(--gold-500) 10%,transparent); font-weight:800; }
.recruitment-question-setting-row input,.recruitment-question-setting-row select { width:100%; min-width:0; }
.recruitment-question-setting-row .compact-check { display:flex!important; align-items:center; justify-content:center; gap:8px; padding:0; }
.recruitment-question-setting-row .compact-check span { display:inline; color:var(--text-secondary); font-size:.76rem; font-weight:700; }
.recruitment-question-setting-row .compact-check input { width:18px; height:18px; accent-color:var(--gold-500); }
.recruitment-question-actions { margin:18px 0 0; padding:18px 0 0; border-top:1px solid var(--border); background:none; }

.recruitment-public-card { width:min(1060px,calc(100% - 32px)); margin:32px auto; padding:34px; border-color:color-mix(in srgb,var(--gold-500) 35%,var(--border)); background:linear-gradient(150deg,color-mix(in srgb,var(--gold-500) 5%,var(--surface)),var(--surface)); }
.recruitment-public-header { gap:26px; padding-bottom:28px; }
.recruitment-public-header .brand-mark { width:104px; height:104px; flex-basis:104px; border:1px solid color-mix(in srgb,var(--gold-500) 42%,var(--border)); box-shadow:0 0 0 8px color-mix(in srgb,var(--gold-500) 5%,transparent); }
.recruitment-public-header h1 { margin:5px 0 10px; font-size:clamp(2rem,4vw,3rem); line-height:1.05; }
.recruitment-public-form { gap:18px; margin-top:28px; }
.recruitment-public-grid { gap:18px; }
.recruitment-public-form .form-field { gap:8px; }
.recruitment-public-form .form-field>span { color:var(--text); font-weight:800; }
.recruitment-public-form input,.recruitment-public-form textarea,.recruitment-public-form select { border-color:color-mix(in srgb,var(--gold-500) 24%,var(--border)); background:color-mix(in srgb,var(--page-bg) 55%,var(--surface)); }
.recruitment-public-form input:focus,.recruitment-public-form textarea:focus,.recruitment-public-form select:focus { border-color:var(--gold-500); box-shadow:0 0 0 3px color-mix(in srgb,var(--gold-500) 14%,transparent); }
.recruitment-question-list { gap:14px; }
.recruitment-question { display:grid; gap:12px; padding:18px; border-color:color-mix(in srgb,var(--gold-500) 24%,var(--border)); border-radius:16px; background:color-mix(in srgb,var(--page-bg) 40%,var(--surface)); }
.recruitment-question-label { display:flex!important; align-items:center; gap:12px; }
.recruitment-question-public-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 38px; border:1px solid color-mix(in srgb,var(--gold-500) 36%,var(--border)); border-radius:11px; color:var(--gold-300); background:color-mix(in srgb,var(--gold-500) 9%,transparent); }
.recruitment-question-public-icon .icon { width:18px; height:18px; }
.recruitment-question textarea { min-height:118px; resize:vertical; }
.recruitment-consent { padding:15px 17px; border:1px solid var(--border); border-radius:13px; background:color-mix(in srgb,var(--page-bg) 36%,var(--surface)); }
.recruitment-consent input { width:18px; height:18px; accent-color:var(--gold-500); }
.recruitment-public-actions { display:grid; justify-items:center; gap:12px; padding-top:4px; }
.recruitment-public-actions .primary-button { min-width:250px; justify-content:center; }
.recruitment-public-actions small { display:flex; align-items:center; gap:7px; color:var(--text-secondary); text-align:center; }
.recruitment-public-actions small .icon { width:14px; height:14px; }

@media(max-width:1180px){
  .recruitment-protection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .recruitment-question-columns{display:none}
  .recruitment-question-setting-row{grid-template-columns:44px minmax(0,1fr) 170px 110px 100px}
}
@media(max-width:900px){
  .recruitment-settings-status-card{align-items:stretch;flex-direction:column}
  .recruitment-settings-status-card .recruitment-inline-switch{min-width:0}
  .recruitment-webhook-grid,.recruitment-settings-fields,.recruitment-protection-grid{grid-template-columns:1fr}
  .recruitment-question-setting-row{grid-template-columns:40px minmax(0,1fr) 150px}
  .recruitment-question-setting-row .compact-check{grid-column:auto}
  .recruitment-question-setting-row .compact-check span{display:inline}
}
@media(max-width:650px){
  .recruitment-settings-card{padding:16px}
  .recruitment-question-header{align-items:stretch;flex-direction:column}
  .recruitment-question-header .secondary-button{width:100%;justify-content:center}
  .recruitment-question-setting-row{grid-template-columns:38px minmax(0,1fr)}
  .recruitment-question-setting-row>label:nth-of-type(2),.recruitment-question-setting-row .compact-check{grid-column:2}
  .recruitment-question-setting-row .compact-check{justify-content:flex-start}
  .recruitment-question-setting-row label>span{display:inline}
  .recruitment-public-card{width:calc(100% - 20px);margin:10px auto;padding:20px}
  .recruitment-public-header{align-items:flex-start;gap:16px}
  .recruitment-public-header .brand-mark{width:68px;height:68px;flex-basis:68px}
  .recruitment-public-header h1{font-size:1.75rem}
  .recruitment-public-grid{grid-template-columns:1fr}
  .recruitment-public-actions .primary-button{width:100%;min-width:0}
}

/* Recruitment questions polish — v4.2.4 */
.recruitment-webhook-card .settings-field input,
.recruitment-question-setting-row input[type="text"],
.recruitment-question-setting-row select {
    min-height:42px;
    border:1px solid color-mix(in srgb,var(--gold-500) 24%,var(--border));
    border-radius:10px;
    background:color-mix(in srgb,var(--page-bg) 72%,var(--surface));
    color:var(--text);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.recruitment-webhook-card .settings-field input::placeholder,
.recruitment-question-setting-row input[type="text"]::placeholder { color:color-mix(in srgb,var(--text-secondary) 82%,transparent); }
.recruitment-webhook-card .settings-field input:focus,
.recruitment-question-setting-row input[type="text"]:focus,
.recruitment-question-setting-row select:focus {
    border-color:var(--gold-500);
    outline:0;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--gold-500) 14%,transparent);
}
.recruitment-webhook-card .settings-field input:-webkit-autofill,
.recruitment-question-setting-row input[type="text"]:-webkit-autofill {
    -webkit-text-fill-color:var(--text);
    box-shadow:0 0 0 1000px color-mix(in srgb,var(--page-bg) 72%,var(--surface)) inset;
    transition:background-color 9999s ease-out 0s;
}
.recruitment-question-columns { grid-template-columns:44px minmax(280px,1fr) 170px 120px 110px 54px; }
.recruitment-question-setting-row { grid-template-columns:44px minmax(280px,1fr) 170px 120px 110px 42px; }
.recruitment-question-delete {
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid color-mix(in srgb,#ef4444 34%,var(--border));
    border-radius:10px;
    background:color-mix(in srgb,#ef4444 8%,transparent);
    color:#fca5a5;
    cursor:pointer;
    transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.recruitment-question-delete:hover {
    border-color:#ef4444;
    background:color-mix(in srgb,#ef4444 16%,transparent);
    color:#fecaca;
    transform:translateY(-1px);
}
.recruitment-question-delete:focus-visible { outline:2px solid #fca5a5; outline-offset:2px; }
.recruitment-question-delete .icon { width:17px; height:17px; }
@media(max-width:1180px){
  .recruitment-question-setting-row{grid-template-columns:44px minmax(0,1fr) 165px 110px 100px 42px}
}
@media(max-width:900px){
  .recruitment-question-setting-row{grid-template-columns:40px minmax(0,1fr) 150px 42px}
  .recruitment-question-setting-row .compact-check{grid-column:auto}
}
@media(max-width:650px){
  .recruitment-question-setting-row{grid-template-columns:38px minmax(0,1fr) 40px}
  .recruitment-question-setting-row>label:nth-of-type(2),.recruitment-question-setting-row .compact-check{grid-column:2}
  .recruitment-question-delete{grid-column:3;grid-row:1;align-self:start}
}

/* Recruitment interface correction — v4.2.5 */
.recruitment-settings-panel .settings-field > input,
.recruitment-settings-panel .settings-field > textarea,
.recruitment-settings-panel .settings-field > select,
.recruitment-settings-panel .settings-input-unit,
.recruitment-filter-bar select,
.recruitment-filter-bar input,
.recruitment-decision-form textarea {
    width:100%;
    min-height:44px;
    padding:10px 13px;
    border:1px solid color-mix(in srgb,var(--gold-500) 26%,var(--border));
    border-radius:11px;
    background:color-mix(in srgb,var(--page-bg) 76%,var(--surface));
    color:var(--text);
    font:inherit;
    outline:0;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.recruitment-settings-panel .settings-field > textarea,
.recruitment-decision-form textarea { min-height:104px; resize:vertical; line-height:1.55; }
.recruitment-settings-panel .settings-field > input:hover,
.recruitment-settings-panel .settings-field > textarea:hover,
.recruitment-settings-panel .settings-field > select:hover,
.recruitment-filter-bar select:hover,
.recruitment-filter-bar input:hover,
.recruitment-decision-form textarea:hover { border-color:color-mix(in srgb,var(--gold-500) 48%,var(--border)); }
.recruitment-settings-panel .settings-field > input:focus,
.recruitment-settings-panel .settings-field > textarea:focus,
.recruitment-settings-panel .settings-field > select:focus,
.recruitment-filter-bar select:focus,
.recruitment-filter-bar input:focus,
.recruitment-decision-form textarea:focus { border-color:var(--gold-500); box-shadow:0 0 0 3px color-mix(in srgb,var(--gold-500) 14%,transparent); background:color-mix(in srgb,var(--page-bg) 64%,var(--surface)); }
.recruitment-settings-panel .settings-input-unit { display:flex;align-items:center;padding:0;overflow:hidden; }
.recruitment-settings-panel .settings-input-unit input { min-width:0;min-height:42px;padding:10px 12px;border:0!important;background:transparent!important;color:var(--text);box-shadow:none!important; }
.recruitment-settings-panel .settings-input-unit span { align-self:stretch;display:flex;align-items:center;padding:0 12px;border-left:1px solid var(--border);color:var(--text-secondary);background:color-mix(in srgb,var(--gold-500) 7%,var(--surface));font-size:.78rem;font-weight:800; }
.recruitment-settings-fields-wide { grid-template-columns:1fr; }
.recruitment-settings-fields-wide .settings-field { display:grid;gap:8px;padding:17px 18px;border:1px solid color-mix(in srgb,var(--gold-500) 18%,var(--border));border-radius:14px;background:color-mix(in srgb,var(--page-bg) 40%,var(--surface)); }
.recruitment-settings-fields-wide .settings-field > span { color:var(--text);font-size:.84rem;font-weight:800; }

.recruitment-admin-page,.recruitment-detail-page{display:grid;gap:18px;min-width:0}
.recruitment-admin-hero,.recruitment-detail-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px;background:linear-gradient(125deg,color-mix(in srgb,var(--gold-500) 7%,var(--surface)),var(--surface) 62%)}
.recruitment-admin-hero-main{display:flex;align-items:center;gap:18px;min-width:0}.recruitment-admin-hero h1,.recruitment-detail-hero h1{margin:4px 0 6px}.recruitment-admin-hero p,.recruitment-detail-hero p{margin:0;color:var(--text-secondary)}
.recruitment-admin-count{min-width:130px;padding:12px 16px;border:1px solid var(--border);border-radius:13px;background:color-mix(in srgb,var(--page-bg) 42%,var(--surface));text-align:right}.recruitment-admin-count span{display:block;color:var(--text-secondary);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.recruitment-admin-count strong{display:block;margin-top:4px;font-size:1.45rem;color:var(--gold-300)}
.recruitment-filter-bar{display:grid;grid-template-columns:240px minmax(320px,1fr) auto;align-items:end;gap:14px;padding:18px 20px}.recruitment-filter-field{display:grid;gap:8px;min-width:0}.recruitment-filter-field>span:first-child{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--text-secondary)}.recruitment-search-control{position:relative;display:block}.recruitment-search-control>.icon{position:absolute;left:13px;top:50%;width:17px;height:17px;transform:translateY(-50%);color:var(--text-secondary);pointer-events:none}.recruitment-search-control input{padding-left:40px}.recruitment-filter-actions{display:flex;gap:10px}.recruitment-filter-actions>*{min-height:44px}
.recruitment-application-list{display:grid;gap:0;overflow:hidden}.recruitment-application-card{display:grid;grid-template-columns:minmax(260px,1.15fr) minmax(480px,1.5fr) auto;align-items:center;gap:22px;padding:20px 22px;border-bottom:1px solid var(--border);transition:background .16s ease}.recruitment-application-card:last-child{border-bottom:0}.recruitment-application-card:hover{background:color-mix(in srgb,var(--gold-500) 4%,var(--surface))}.recruitment-application-identity{display:flex;align-items:center;gap:13px;min-width:0}.recruitment-application-identity>div{min-width:0}.recruitment-application-identity h2{margin:0;font-size:1.05rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recruitment-application-identity p{margin:4px 0 0;color:var(--text-secondary);font-size:.78rem}.recruitment-application-meta{display:grid;grid-template-columns:1.2fr .65fr 1fr;gap:10px;margin:0}.recruitment-application-meta div{min-width:0;padding:10px 12px;border-left:1px solid var(--border)}.recruitment-application-meta dt{color:var(--text-secondary);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.recruitment-application-meta dd{margin:5px 0 0;font-weight:750;overflow-wrap:anywhere}.risk-pill{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border:1px solid var(--border);border-radius:999px;background:color-mix(in srgb,var(--page-bg) 45%,var(--surface));font-size:.72rem;font-weight:800;text-transform:capitalize}.risk-low{color:#86efac;border-color:rgba(34,197,94,.28);background:rgba(34,197,94,.1)}.risk-medium{color:#fde68a;border-color:rgba(245,158,11,.3);background:rgba(245,158,11,.1)}.risk-high{color:#fca5a5;border-color:rgba(239,68,68,.3);background:rgba(239,68,68,.1)}.recruitment-details-button{white-space:nowrap}
.recruitment-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px;align-items:start}.recruitment-answer-panel{padding:0;overflow:hidden}.recruitment-answer-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--gold-500) 4%,var(--surface))}.recruitment-answer-header h2{margin:3px 0 0}.recruitment-answer-list{display:grid;padding:8px 24px 20px}.recruitment-answer-card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:14px;padding:20px 0;border-bottom:1px solid var(--border)}.recruitment-answer-card:last-child{border-bottom:0}.recruitment-answer-number{width:34px;height:34px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--gold-500) 35%,var(--border));border-radius:10px;background:color-mix(in srgb,var(--gold-500) 9%,transparent);color:var(--gold-300);font-weight:850}.recruitment-answer-card h3{margin:2px 0 9px;font-size:.98rem}.recruitment-answer-card p{margin:0;color:var(--text-secondary);line-height:1.65;overflow-wrap:anywhere}.recruitment-decision-panel{padding:22px;position:sticky;top:88px}.recruitment-decision-panel>header{display:flex;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--border)}.recruitment-decision-panel h2{margin:3px 0 0}.recruitment-detail-meta{display:grid;margin:10px 0 20px}.recruitment-detail-meta div{display:grid;grid-template-columns:120px minmax(0,1fr);gap:14px;padding:13px 0;border-bottom:1px solid var(--border)}.recruitment-detail-meta dt{color:var(--text-secondary);font-size:.76rem}.recruitment-detail-meta dd{margin:0;text-align:right;font-weight:750;overflow-wrap:anywhere}.recruitment-decision-form{display:grid;gap:14px;padding-top:4px}.recruitment-decision-form .form-field{display:grid;gap:7px}.recruitment-decision-form .form-field>span{font-weight:800}.recruitment-decision-form .form-field>small{color:var(--text-secondary);line-height:1.45}.decision-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:2px}.decision-actions button{justify-content:center}.decision-summary{padding:16px;border:1px solid var(--border);border-radius:13px;background:color-mix(in srgb,var(--page-bg) 42%,var(--surface))}.decision-summary p{margin:7px 0 0;color:var(--text-secondary);line-height:1.55}
@media(max-width:1180px){.recruitment-application-card{grid-template-columns:minmax(240px,1fr) minmax(360px,1.25fr) auto}.recruitment-detail-grid{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:960px){.recruitment-filter-bar{grid-template-columns:220px 1fr}.recruitment-filter-actions{grid-column:1/-1;justify-content:flex-end}.recruitment-application-card{grid-template-columns:1fr auto}.recruitment-application-meta{grid-column:1/-1}.recruitment-detail-grid{grid-template-columns:1fr}.recruitment-decision-panel{position:static}}
@media(max-width:680px){.recruitment-admin-hero,.recruitment-detail-hero{align-items:flex-start;flex-direction:column;padding:20px}.recruitment-admin-count{width:100%;text-align:left}.recruitment-filter-bar{grid-template-columns:1fr}.recruitment-filter-actions{grid-column:auto}.recruitment-filter-actions>*{flex:1;justify-content:center}.recruitment-application-card{grid-template-columns:1fr;padding:17px}.recruitment-application-meta{grid-template-columns:1fr}.recruitment-application-meta div{padding:9px 0;border-left:0;border-top:1px solid var(--border)}.recruitment-details-button{width:100%;justify-content:center}.recruitment-answer-header{align-items:flex-start;flex-direction:column}.recruitment-answer-list{padding-inline:18px}.recruitment-answer-card{grid-template-columns:32px minmax(0,1fr);gap:10px}.recruitment-answer-number{width:30px;height:30px}.decision-actions{grid-template-columns:1fr}.recruitment-detail-meta div{grid-template-columns:1fr}.recruitment-detail-meta dd{text-align:left}}


/* Recruitment question controls — v4.2.6 */
.recruitment-question-setting-row .recruitment-question-text > input,
.recruitment-question-setting-row select {
    appearance:none;
    -webkit-appearance:none;
    min-height:42px;
    padding:9px 12px;
    border:1px solid color-mix(in srgb,var(--gold-500) 34%,var(--border));
    border-radius:10px;
    background:color-mix(in srgb,var(--page-bg) 88%,var(--surface));
    color:var(--text);
    font:inherit;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.recruitment-question-setting-row .recruitment-question-text > input:hover,
.recruitment-question-setting-row select:hover {
    border-color:color-mix(in srgb,var(--gold-500) 58%,var(--border));
}
.recruitment-question-setting-row .recruitment-question-text > input:focus,
.recruitment-question-setting-row select:focus {
    border-color:var(--gold-500);
    outline:0;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--gold-500) 16%,transparent), inset 0 1px 0 rgba(255,255,255,.03);
}
.recruitment-question-setting-row select {
    padding-right:38px;
    background-image:linear-gradient(45deg,transparent 50%,var(--gold-300) 50%),linear-gradient(135deg,var(--gold-300) 50%,transparent 50%);
    background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}


/* Recruitment border correction — v4.2.7 */
html.dark .recruitment-public-card {
    border-color: color-mix(in srgb, var(--gold-500) 28%, #17130e);
}
html.dark .recruitment-question {
    border-color: color-mix(in srgb, var(--gold-500) 22%, #17130e);
}
html.dark .recruitment-public-form input,
html.dark .recruitment-public-form textarea,
html.dark .recruitment-public-form select {
    border-color: color-mix(in srgb, var(--gold-500) 24%, #17130e);
}
html.dark .recruitment-question-public-icon,
html.dark .recruitment-public-header .brand-mark {
    border-color: color-mix(in srgb, var(--gold-500) 30%, #17130e);
}

/* Logs and recruitment border harmonization — v4.2.9 */
:root {
    --resto-outline: #5a4324;
    --resto-outline-soft: #44331d;
    --resto-outline-hover: #7a5a2d;
    --resto-outline-focus: #b98632;
}

html.dark .general-log-filters,
html.dark .general-log-list-panel,
html.dark .general-logs-hero,
html.dark .recruitment-public-card,
html.dark .recruitment-question {
    border-color: var(--resto-outline-soft) !important;
}

html.dark .general-log-filters .form-field input,
html.dark .general-log-filters .form-field select,
html.dark .recruitment-public-form input,
html.dark .recruitment-public-form textarea,
html.dark .recruitment-public-form select {
    border: 1px solid var(--resto-outline) !important;
    background-color: #100d09 !important;
    box-shadow: none !important;
}

html.dark .general-log-filters .form-field input:hover,
html.dark .general-log-filters .form-field select:hover,
html.dark .recruitment-public-form input:hover,
html.dark .recruitment-public-form textarea:hover,
html.dark .recruitment-public-form select:hover {
    border-color: var(--resto-outline-hover) !important;
}

html.dark .general-log-filters .form-field input:focus,
html.dark .general-log-filters .form-field select:focus,
html.dark .recruitment-public-form input:focus,
html.dark .recruitment-public-form textarea:focus,
html.dark .recruitment-public-form select:focus {
    border-color: var(--resto-outline-focus) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgb(185 134 50 / .14) !important;
}

html.dark .recruitment-public-header .brand-mark,
html.dark .recruitment-question-public-icon,
html.dark .recruitment-consent {
    border-color: var(--resto-outline-soft) !important;
}

/* Notification center — 4.4.0 */
.notification-control{position:relative}.notification-bell-button{position:relative;display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--border-color,#4b3818);border-radius:12px;background:var(--surface,#15110b);color:var(--text-primary,#f5ead6);cursor:pointer}.notification-bell-button .icon{width:20px;height:20px}.notification-count{position:absolute;right:-5px;top:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#b83333;color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center;border:2px solid #15110b}.notification-panel{position:absolute;right:0;top:calc(100% + 10px);width:min(390px,calc(100vw - 28px));z-index:80;background:#15110b;border:1px solid #5a421d;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.45);overflow:hidden}.notification-panel>header{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #392b16}.notification-panel>header div{display:flex;flex-direction:column}.notification-panel>header a{color:#d8a638;font-size:13px}.notification-dropdown-list{max-height:420px;overflow:auto}.notification-dropdown-item{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid #2e2415;color:inherit;text-decoration:none}.notification-dropdown-item:hover{background:#1c160d}.notification-dropdown-item.unread{background:rgba(184,132,35,.08)}.notification-dropdown-item .notification-type-icon{flex:0 0 34px;height:34px}.notification-dropdown-copy{min-width:0}.notification-dropdown-copy strong{display:block;font-size:14px}.notification-dropdown-copy p{margin:4px 0;color:#c4b697;font-size:13px;white-space:normal}.notification-dropdown-copy time{font-size:11px;color:#8f826b}.notification-page-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px}.notification-sidebar{display:grid;gap:20px;align-content:start}.notification-list-page{display:grid;gap:12px}.notification-page-item{display:flex;gap:14px;padding:16px;border:1px solid #3e301a;border-radius:14px;background:#120f0a}.notification-page-item.unread{border-color:#8a6424;background:#171109}.notification-type-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#241b0e;color:#d5a43b}.notification-type-icon .icon{width:19px}.notification-item-copy{flex:1;min-width:0}.notification-item-copy>div:first-child{display:flex;justify-content:space-between;gap:15px}.notification-item-copy time{font-size:12px;color:#8f826b}.notification-item-copy p{color:#c9bea8}.notification-item-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.notification-item-actions form{margin:0}.button-link{border:0;background:none;color:#cfa33f;cursor:pointer;padding:4px}.button-link.danger{color:#dc7777}.stack-form{display:grid;gap:14px}.stack-form label{display:grid;gap:7px}.stack-form input[type=text],.stack-form textarea,.stack-form select{width:100%}.stack-form input[type=range]{width:100%}@media(max-width:980px){.notification-page-grid{grid-template-columns:1fr}}@media(max-width:640px){.notification-item-copy>div:first-child{display:block}.notification-item-copy time{display:block;margin-top:4px}}


/* Notifications 4.5.0 */
.notifications-page{display:grid;gap:18px}.notifications-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px}.notifications-hero-main{display:flex;align-items:center;gap:16px}.notifications-hero-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));border-radius:14px;background:color-mix(in srgb,var(--accent) 10%,var(--surface));color:var(--accent-strong)}.notifications-hero-icon .icon{width:23px;height:23px}.notifications-hero h1{margin:3px 0 4px}.notifications-hero p{margin:0;color:var(--text-secondary)}.notifications-layout{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:18px;align-items:start}.notifications-history{overflow:hidden}.notifications-history>.panel-section-header,.notifications-settings-card>.panel-section-header{padding:20px 22px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--accent) 4%,var(--surface))}.notifications-history>.panel-section-header h2,.notifications-settings-card>.panel-section-header h2{margin:3px 0 2px}.notifications-history>.panel-section-header p,.notifications-settings-card>.panel-section-header p{margin:0;color:var(--text-secondary)}.notification-list-page{display:grid;gap:0}.notification-page-item{display:flex;gap:14px;padding:18px 20px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent}.notification-page-item:last-child{border-bottom:0}.notification-page-item.unread{background:color-mix(in srgb,var(--accent) 7%,var(--surface));box-shadow:inset 3px 0 0 var(--accent)}.notification-item-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.notification-item-copy p{margin:7px 0 12px;color:var(--text-secondary);line-height:1.55}.notification-item-heading time{white-space:nowrap;color:var(--text-secondary);font-size:.74rem}.notification-item-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.notifications-empty{min-height:310px}.notifications-empty>.icon{width:34px;height:34px;color:var(--accent)}.notifications-sidebar{display:grid;gap:18px}.notifications-settings-card{overflow:hidden}.notifications-form{display:grid;gap:15px;padding:20px 22px}.notifications-form .primary-button{justify-content:center;width:100%}.notifications-form input[type=range]{width:100%;accent-color:var(--accent)}.notifications-form textarea{min-height:120px;resize:vertical}@media(max-width:1050px){.notifications-layout{grid-template-columns:1fr}.notifications-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.notifications-hero{align-items:flex-start;flex-direction:column}.notifications-sidebar{grid-template-columns:1fr}.notification-item-heading{display:block}.notification-item-heading time{display:block;margin-top:4px}}

/* Notifications 4.5.0 */
.notification-panel-actions{display:flex;align-items:center;gap:10px}.notification-panel-actions button{border:0;background:transparent;color:#d8a638;font:inherit;font-size:13px;cursor:pointer;padding:3px 0}.notification-panel-actions button:disabled{opacity:.45;cursor:default}.notification-panel-actions button.danger{color:var(--danger,#d85b5b)}.notification-panel-actions button.danger:hover:not(:disabled){text-decoration:underline}.notification-panel-actions a{font-size:13px}.notifications-sound-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.notifications-sound-actions .primary-button,.notifications-sound-actions .secondary-button{width:100%;justify-content:center}@media(max-width:520px){.notification-panel>header{align-items:flex-start}.notification-panel-actions{flex-direction:column;align-items:flex-end;gap:4px}.notifications-sound-actions{grid-template-columns:1fr}}

/* Notifications 4.5.5 — pełna zgodność z jasnym i ciemnym motywem */
.notification-bell-button {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}
.notification-bell-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
.notification-bell-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue-500) 28%, transparent);
    outline-offset: 2px;
}
.notification-count {
    border-color: var(--surface);
}
.notification-panel {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: 0 20px 48px rgb(15 23 42 / .18);
}
html.dark .notification-panel {
    box-shadow: 0 22px 54px rgb(0 0 0 / .42);
}
.notification-panel > header {
    border-bottom-color: var(--border);
    background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}
.notification-panel > header strong {
    color: var(--text);
}
.notification-panel > header small,
.notification-panel .online-users-loading {
    color: var(--text-secondary);
}
.notification-panel > header a,
.notification-panel-actions button {
    color: color-mix(in srgb, var(--blue-600) 82%, var(--text));
}
html.dark .notification-panel > header a,
html.dark .notification-panel-actions button {
    color: color-mix(in srgb, var(--blue-200) 70%, var(--text));
}
.notification-panel-actions button:hover,
.notification-panel > header a:hover {
    color: var(--blue-600);
    text-decoration: underline;
}
html.dark .notification-panel-actions button:hover,
html.dark .notification-panel > header a:hover {
    color: var(--blue-200);
}
.notification-dropdown-list {
    background: var(--surface);
}
.notification-dropdown-item {
    border-bottom-color: var(--border);
    color: var(--text);
}
.notification-dropdown-item:hover {
    background: var(--surface-hover);
}
.notification-dropdown-item.unread {
    background: color-mix(in srgb, var(--blue-500) 8%, var(--surface));
    box-shadow: inset 3px 0 0 var(--blue-500);
}
.notification-dropdown-item .notification-type-icon {
    background: color-mix(in srgb, var(--blue-500) 11%, var(--surface-soft));
    color: var(--blue-600);
}
html.dark .notification-dropdown-item .notification-type-icon {
    color: var(--blue-200);
}
.notification-dropdown-copy strong {
    color: var(--text);
}
.notification-dropdown-copy p,
.notification-dropdown-copy time {
    color: var(--text-secondary);
}
.notification-page-item,
.notification-page-item.unread,
.notification-type-icon,
.notifications-history,
.notifications-settings-card {
    color: var(--text);
}
.notification-type-icon {
    background: color-mix(in srgb, var(--blue-500) 10%, var(--surface-soft));
    color: var(--blue-600);
}
html.dark .notification-type-icon {
    color: var(--blue-200);
}

/* Dashboard 4.7.0 */
.dashboard-hero { align-items: center; }
.dashboard-metrics .dashboard-metric { position: relative; color: inherit; text-decoration: none; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.dashboard-metrics .dashboard-metric:hover { border-color: var(--accent); transform: translateY(-1px); }
.dashboard-card-arrow { margin-left: auto; width: 18px; height: 18px; color: var(--text-secondary); }
.dashboard-primary-grid { align-items: start; }
.dashboard-attention-list, .dashboard-quick-grid { display: grid; gap: 12px; }
.dashboard-attention-item, .dashboard-quick-action { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); color: var(--text); text-decoration: none; transition: border-color .18s ease, background .18s ease; }
a.dashboard-attention-item:hover, .dashboard-quick-action:hover { border-color: var(--accent); background: var(--surface); }
.dashboard-item-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.dashboard-item-icon svg { width: 20px; height: 20px; }
.dashboard-item-copy, .dashboard-quick-action > span:last-child { min-width: 0; display: grid; gap: 4px; }
.dashboard-item-copy strong, .dashboard-quick-action strong { color: var(--text); }
.dashboard-item-copy small, .dashboard-quick-action small { color: var(--text-secondary); }
.dashboard-item-arrow { margin-left: auto; flex: 0 0 auto; width: 18px; height: 18px; color: var(--text-secondary); }
.dashboard-attention-item.tone-warning .dashboard-item-icon { background: color-mix(in srgb, var(--dashboard-attention-fill) 15%, var(--surface)); color: var(--dashboard-attention-text); }
.dashboard-attention-item.tone-success .dashboard-item-icon { background: color-mix(in srgb, #2e9d61 15%, var(--surface)); color: #25814f; }
.dashboard-attention-item.tone-info .dashboard-item-icon { background: color-mix(in srgb, var(--blue-500) 12%, var(--surface)); color: var(--blue-600); }
.dashboard-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-quick-action { min-height: 82px; }
.dashboard-activity-panel { margin-top: 22px; }
.dashboard-activity-list .activity-item { border-color: var(--border); }
@media (max-width: 860px) { .dashboard-quick-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dashboard-hero { align-items: flex-start; } .dashboard-card-arrow { display:none; } .dashboard-attention-item, .dashboard-quick-action { padding: 12px; } .dashboard-activity-panel .panel-header { align-items: flex-start; } }

/* Dashboard 4.7.2 — refined layout */
.dashboard-hero {
    min-height: 116px;
    padding: 24px 26px;
    margin-bottom: 20px;
}
.dashboard-hero h1 {
    font-size: clamp(25px, 2.4vw, 34px);
}
.dashboard-hero p {
    max-width: 680px;
}
.dashboard-metrics {
    gap: 16px;
    margin-bottom: 20px;
}
.dashboard-metrics .dashboard-metric {
    min-height: 118px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 16px;
    overflow: hidden;
}
.dashboard-metrics .dashboard-metric::after {
    content: '';
    position: absolute;
    inset: auto -28px -38px auto;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    pointer-events: none;
}
.dashboard-metrics .metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
}
.dashboard-metrics .metric-copy small {
    font-size: 12px;
}
.dashboard-metrics .metric-copy strong {
    margin-top: 3px;
    font-size: 25px;
}
.dashboard-metrics .metric-copy span {
    margin-top: 5px;
    font-size: 11px;
}
.dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, .95fr);
    gap: 18px;
    margin-bottom: 20px;
}
.dashboard-attention-panel,
.dashboard-quick-panel,
.dashboard-activity-panel {
    padding: 22px;
    border-radius: 18px;
}
.dashboard-attention-panel .panel-header,
.dashboard-quick-panel .panel-header,
.dashboard-activity-panel .panel-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.dashboard-attention-panel .panel-header h2,
.dashboard-quick-panel .panel-header h2,
.dashboard-activity-panel .panel-header h2 {
    font-size: 19px;
}
.dashboard-attention-list {
    gap: 10px;
}
.dashboard-attention-item {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 15px;
}
.dashboard-attention-item:hover,
.dashboard-quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgb(0 0 0 / .06);
}
html.dark .dashboard-attention-item:hover,
html.dark .dashboard-quick-action:hover {
    box-shadow: 0 10px 26px rgb(0 0 0 / .22);
}
.dashboard-item-copy strong,
.dashboard-quick-action strong {
    font-size: 14px;
    line-height: 1.25;
}
.dashboard-item-copy small,
.dashboard-quick-action small {
    font-size: 11px;
    line-height: 1.35;
}
.dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-quick-action {
    min-height: 92px;
    padding: 15px;
    border-radius: 15px;
}
.dashboard-quick-action .dashboard-item-icon {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
}
.dashboard-activity-panel {
    margin-top: 0;
}
.dashboard-activity-list {
    border-top: 0;
}
.dashboard-activity-list .activity-item {
    min-height: 72px;
    padding: 12px 4px;
}
.dashboard-activity-list .activity-item:first-child {
    padding-top: 2px;
}
.dashboard-activity-list .activity-item strong {
    font-size: 13px;
}
.dashboard-activity-list .activity-item small,
.dashboard-activity-list .activity-item time {
    font-size: 11px;
}
.dashboard-activity-panel .button-secondary {
    white-space: nowrap;
}
@media (max-width: 1280px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-primary-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    }
}
@media (max-width: 1020px) {
    .dashboard-primary-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .dashboard-hero {
        min-height: 0;
        padding: 20px;
    }
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    .dashboard-metrics .dashboard-metric {
        min-height: 104px;
    }
    .dashboard-attention-panel,
    .dashboard-quick-panel,
    .dashboard-activity-panel {
        padding: 17px;
        border-radius: 16px;
    }
    .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-activity-list .activity-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }
    .dashboard-activity-list .activity-item time {
        grid-column: 2;
        margin-top: -6px;
    }
}


/* Sidebar navigation hierarchy — v4.7.2 */
.sidebar-navigation {
    gap: 8px;
}

.navigation-label {
    margin: 5px 8px 2px;
    padding: 0 4px;
    color: color-mix(in srgb, var(--sidebar-muted) 82%, var(--sidebar-text));
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.sidebar-link,
.sidebar-group-toggle {
    min-height: 48px;
    padding: 7px 11px 7px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.sidebar-link > span:not(.navigation-icon),
.sidebar-group-copy strong {
    color: var(--sidebar-text);
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.2;
}

.sidebar-group {
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: border-color .18s ease, background-color .18s ease;
}

.sidebar-group.open {
    border-color: color-mix(in srgb, var(--blue-500) 24%, var(--sidebar-border));
    background: color-mix(in srgb, var(--blue-500) 5%, var(--sidebar-bg));
}

.sidebar-group-toggle {
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 9px;
}

.sidebar-group-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.sidebar-group-copy small {
    color: var(--sidebar-muted);
    font-size: .64rem;
    font-weight: 600;
    line-height: 1.15;
}

.sidebar-group.open .sidebar-group-toggle {
    background: color-mix(in srgb, var(--blue-500) 8%, var(--sidebar-surface));
}

.sidebar-group.open .sidebar-group-copy strong,
.sidebar-group-toggle:hover .sidebar-group-copy strong {
    color: #f6dfb1;
}

.sidebar-group-toggle:hover .sidebar-group-copy small,
.sidebar-group.open .sidebar-group-copy small {
    color: #bda983;
}

.group-chevron {
    width: 17px;
    height: 17px;
    padding: 3px;
    border-radius: 6px;
    color: #b9a47e;
    background: color-mix(in srgb, var(--sidebar-surface) 72%, transparent);
}

.sidebar-submenu {
    position: relative;
    padding: 5px 5px 8px 48px;
}

.sidebar-submenu::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 10px;
    left: 31px;
    width: 1px;
    background: color-mix(in srgb, var(--blue-500) 24%, var(--sidebar-border));
}

.sidebar-group.open .sidebar-submenu {
    gap: 3px;
}

.sidebar-submenu-link {
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #cdbb9b;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
}

.sidebar-submenu-link::before {
    display: none;
}

.sidebar-submenu-link:hover {
    border-color: color-mix(in srgb, var(--blue-500) 18%, var(--sidebar-border));
    background: color-mix(in srgb, var(--blue-500) 7%, var(--sidebar-surface));
    color: #f5dfb6;
}

.sidebar-submenu-link.active {
    border-color: color-mix(in srgb, var(--blue-500) 35%, var(--sidebar-border));
    background: linear-gradient(90deg, color-mix(in srgb, var(--blue-500) 20%, var(--sidebar-surface)), color-mix(in srgb, var(--blue-500) 7%, var(--sidebar-surface)));
    color: #fff0d2;
    box-shadow: inset 3px 0 0 var(--blue-500);
}

.sidebar-scroll {
    padding-inline: 10px 8px;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--blue-500) 62%, var(--sidebar-border)) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 7px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--blue-500) 56%, var(--sidebar-border));
    background-clip: padding-box;
}

.sidebar-footer {
    background: color-mix(in srgb, var(--sidebar-surface) 42%, var(--sidebar-bg));
}

@media (max-width: 1080px) {
    .sidebar-scroll {
        padding-inline: 10px;
    }
}

/* Issued leave requests — v4.7.3 */
.issued-leaves-page {
    display: grid;
    gap: 18px;
}

.issued-leaves-page > * {
    margin: 0;
}

.issued-leaves-hero {
    min-height: 0;
    padding: 28px 30px;
}

.issued-leaves-hero .invoice-hero-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
}

.issued-leaves-hero .accounts-heading h1 {
    margin-top: 5px;
    font-size: clamp(1.75rem, 2.5vw, 2.35rem);
}

.issued-leaves-hero .accounts-heading p {
    max-width: 620px;
    margin-top: 9px;
}

.issued-leaves-filter {
    grid-template-columns: minmax(210px, .72fr) minmax(300px, 1.2fr) auto;
    gap: 14px;
    padding: 18px 20px;
}

.issued-leaves-filter-actions {
    justify-content: flex-start;
    align-self: end;
}

.issued-leaves-filter-actions .primary-button,
.issued-leaves-filter-actions .secondary-button {
    min-height: 46px;
}

.issued-leaves-list-panel {
    overflow: hidden;
}

.issued-leaves-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.issued-leaves-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.05rem;
}

.issued-leaves-list-hint {
    color: var(--text-secondary);
    font-size: .78rem;
}

.issued-leaves-card-list {
    gap: 10px;
    padding: 14px;
    border-top: 0;
}

.issued-leave-card {
    min-height: 88px !important;
    grid-template-columns: minmax(280px, 1.25fr) minmax(190px, .8fr) minmax(180px, .68fr) auto !important;
    gap: 22px !important;
    padding: 15px 16px !important;
    border-radius: 13px !important;
}

.issued-leave-type .invoice-row-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

.issued-leave-type strong {
    font-size: .92rem;
}

.issued-leave-type small {
    margin-top: 5px;
    font-size: .73rem;
}

.issued-leave-employee,
.issued-leave-status {
    display: grid;
    align-content: center;
    gap: 5px;
}

.issued-leave-meta-label {
    color: var(--text-faint);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.issued-leave-employee strong {
    font-size: .84rem;
}

.issued-leave-status .status-badge {
    width: fit-content;
}

.issued-leave-actions {
    flex-wrap: nowrap;
}

.issued-leave-actions .secondary-button {
    min-height: 40px;
    white-space: nowrap;
}

.issued-leaves-empty {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 36px 20px;
    text-align: center;
    background: color-mix(in srgb, var(--surface-soft) 58%, var(--page-bg));
}

.issued-leaves-empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 5px;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.issued-leaves-empty strong {
    color: var(--text);
}

.issued-leaves-empty p {
    max-width: 430px;
    margin: 0;
    color: var(--text-secondary);
    font-size: .82rem;
}

.issued-leaves-page > .list-pagination {
    margin-top: 0;
    padding: 10px 12px;
    border-radius: 12px;
}

@media (max-width: 1100px) {
    .issued-leave-card {
        grid-template-columns: minmax(250px, 1.2fr) minmax(170px, .8fr) minmax(150px, .65fr) auto !important;
        gap: 14px !important;
    }
}

@media (max-width: 860px) {
    .issued-leaves-filter {
        grid-template-columns: 1fr 1fr;
    }

    .issued-leaves-filter-actions {
        grid-column: 1 / -1;
    }

    .issued-leave-card {
        grid-template-columns: 1fr 1fr !important;
    }

    .issued-leave-type {
        grid-column: 1 / -1;
    }

    .issued-leave-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .issued-leaves-hero {
        padding: 20px;
    }

    .issued-leaves-filter {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .issued-leaves-filter-actions {
        grid-column: auto;
    }

    .issued-leaves-filter-actions > * {
        flex: 1;
    }

    .issued-leaves-list-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .issued-leave-card {
        grid-template-columns: 1fr !important;
        gap: 13px !important;
    }

    .issued-leave-type {
        grid-column: auto;
    }

    .issued-leave-employee,
    .issued-leave-status {
        padding-left: 54px;
    }

    .issued-leave-actions {
        padding-top: 4px;
    }

    .issued-leave-actions .secondary-button {
        width: 100%;
        justify-content: center;
    }
}

/* Personal leave and collaboration lists — v4.7.4 */
.personal-list-header {
    align-items: center;
    padding: 22px 24px 18px;
}
.personal-list-header p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: .82rem;
}
.personal-leave-list {
    display: grid;
    gap: 12px;
    padding: 16px;
}
.personal-leave-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) minmax(120px, .55fr) minmax(170px, .7fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 104px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.personal-leave-card:hover {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    background: color-mix(in srgb, var(--accent) 3%, var(--surface-soft));
}
.personal-leave-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.personal-leave-main .invoice-row-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}
.personal-leave-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.personal-leave-copy strong {
    color: var(--text);
    font-size: .96rem;
}
.personal-leave-copy span,
.personal-meta-label {
    color: var(--text-secondary);
    font-size: .76rem;
}
.personal-leave-duration,
.personal-leave-status {
    display: grid;
    gap: 7px;
}
.personal-leave-duration strong {
    color: var(--text);
    font-size: .9rem;
}
.personal-leave-status .status-badge {
    justify-self: start;
}
.personal-leave-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.personal-leave-actions form {
    display: inline-flex;
}
.personal-leave-actions .secondary-button,
.personal-leave-actions .danger-button {
    min-height: 42px;
}
.personal-list-empty {
    min-height: 230px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
}
.personal-list-empty .empty-state-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    border-radius: 14px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.personal-list-empty .empty-state-icon .icon {
    width: 23px;
    height: 23px;
}
.personal-leave-page > .list-pagination,
.personal-collaboration-page > .list-pagination {
    margin-top: 14px;
}

.personal-collaboration-list-panel {
    overflow: hidden;
}
.personal-collaboration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
}
.personal-collaboration-card {
    grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
    min-height: 220px;
    border-radius: 16px;
    background: var(--surface-soft);
}
.personal-collaboration-card .collaboration-thumb {
    position: relative;
    min-height: 220px;
    aspect-ratio: 4 / 3;
    background: color-mix(in srgb, var(--page-bg) 82%, var(--surface));
}
.personal-collaboration-card .collaboration-thumb img {
    position: relative;
    z-index: 2;
    min-height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.collaboration-image-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 20px;
    color: var(--text-secondary);
    text-align: center;
    background: color-mix(in srgb, var(--surface-soft) 72%, var(--page-bg));
}
.collaboration-image-fallback .icon {
    width: 34px;
    height: 34px;
    color: var(--accent);
    opacity: .82;
}
.collaboration-image-fallback small {
    color: var(--text-secondary);
    font-size: .75rem;
}
.collaboration-thumb.is-image-missing img {
    display: none;
}
.personal-collaboration-card .collaboration-card-body {
    padding: 20px;
}
.collaboration-card-header {
    display: grid;
    align-content: start;
    gap: 10px;
}
.collaboration-card-header h3 {
    margin: 2px 0 0;
    font-size: 1.12rem;
}
.collaboration-card-header small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.collaboration-card-header small .icon {
    width: 14px;
    height: 14px;
}
.personal-collaboration-card .collaboration-card-actions {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.personal-collaboration-card .collaboration-card-actions .secondary-button,
.personal-collaboration-card .collaboration-card-actions .danger-button {
    min-height: 42px;
}

@media (max-width: 1180px) {
    .personal-leave-card {
        grid-template-columns: minmax(250px, 1.4fr) minmax(120px, .55fr) minmax(160px, .7fr);
    }
    .personal-leave-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 14px;
        border-top: 1px solid var(--border);
    }
    .personal-collaboration-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .personal-leave-card {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .personal-leave-main,
    .personal-leave-actions {
        grid-column: 1 / -1;
    }
    .personal-collaboration-card {
        grid-template-columns: 1fr;
    }
    .personal-collaboration-card .collaboration-thumb {
        min-height: 230px;
        aspect-ratio: 16 / 9;
    }
    .personal-collaboration-card .collaboration-thumb img {
        aspect-ratio: 16 / 9;
    }
}
@media (max-width: 520px) {
    .personal-list-header {
        padding: 18px;
    }
    .personal-leave-list,
    .personal-collaboration-grid {
        padding: 12px;
    }
    .personal-leave-card {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .personal-leave-main,
    .personal-leave-actions {
        grid-column: auto;
    }
    .personal-leave-actions > *,
    .personal-leave-actions form,
    .personal-leave-actions button,
    .personal-collaboration-card .collaboration-card-actions > *,
    .personal-collaboration-card .collaboration-card-actions form,
    .personal-collaboration-card .collaboration-card-actions button {
        width: 100%;
    }
}


/* Personal list geometry and integrated pagination — v4.7.5 */
.personal-leave-list-panel,
.personal-collaboration-list-panel {
    overflow: hidden;
}
.personal-list-pagination {
    padding: 0 16px 16px;
}
.personal-list-pagination .list-pagination {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 92%, var(--surface));
}
.personal-leave-page > .list-pagination,
.personal-collaboration-page > .list-pagination {
    display: none;
}

.personal-collaboration-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}
.personal-collaboration-card {
    display: grid;
    grid-template-columns: clamp(220px, 25vw, 320px) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    min-height: 210px;
    overflow: hidden;
}
.personal-collaboration-card .collaboration-thumb {
    width: 100%;
    min-width: 0;
    min-height: 210px;
    height: 100%;
    aspect-ratio: auto;
    overflow: hidden;
    border-right: 1px solid var(--border);
}
.personal-collaboration-card .collaboration-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
    max-height: 280px;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    background: color-mix(in srgb, var(--page-bg) 88%, var(--surface));
}
.personal-collaboration-card .collaboration-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}
.personal-collaboration-card .collaboration-card-header,
.personal-collaboration-card .collaboration-card-actions {
    min-width: 0;
}
.personal-collaboration-card .collaboration-card-header h3 {
    overflow-wrap: anywhere;
}
.personal-collaboration-card .collaboration-card-actions {
    margin-top: auto;
}

.personal-leave-list {
    align-items: stretch;
}
.personal-leave-card {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .personal-collaboration-card {
        grid-template-columns: minmax(180px, 34%) minmax(0, 1fr);
    }
    .personal-collaboration-card .collaboration-thumb,
    .personal-collaboration-card .collaboration-thumb img {
        min-height: 200px;
    }
}
@media (max-width: 680px) {
    .personal-list-pagination {
        padding: 0 12px 12px;
    }
    .personal-collaboration-card {
        grid-template-columns: 1fr;
    }
    .personal-collaboration-card .collaboration-thumb {
        min-height: 190px;
        max-height: 260px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .personal-collaboration-card .collaboration-thumb img {
        min-height: 190px;
        max-height: 260px;
    }
}

/* Collaboration acceptance rollback — v4.7.8 */
.collaboration-review-form .warning-button { justify-content: center; width: 100%; }

/* 4.7.9 — spójny główny przycisk na ekranie zmiany hasła */
.auth-card .auth-form .auth-submit.primary-button {
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
    font-size: 13px;
}
.auth-card .auth-form .auth-submit.primary-button:disabled {
    cursor: not-allowed;
    opacity: .58;
    box-shadow: none;
}
.auth-card > .auth-back-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
}

/* 4.8.0 — saldo przy wypłatach rozliczeń */
.payroll-balance-note {
    display: block;
    margin-top: .35rem;
    color: var(--text-secondary, var(--muted));
    font-size: .78rem;
}
.payroll-actions button:disabled {
    opacity: .48;
    cursor: not-allowed;
    filter: grayscale(.35);
}


.maintenance-warning{margin:14px 24px 0;display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--text);position:sticky;top:8px;z-index:60}.maintenance-warning.hidden{display:none}.maintenance-warning-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--accent);color:var(--accent-text)}.maintenance-warning strong{display:block}.maintenance-warning p{margin:3px 0 0;color:var(--text-secondary)}
.maintenance-page{min-height:70vh;display:grid;place-items:center;padding:32px}.maintenance-card{width:min(680px,100%);text-align:center;padding:42px;border:1px solid var(--border);border-radius:24px;background:var(--surface);color:var(--text)}.maintenance-icon{display:grid;place-items:center;width:68px;height:68px;margin:0 auto 18px;border-radius:20px;background:var(--accent);color:var(--accent-text)}.maintenance-card h1{margin:8px 0 12px}.maintenance-card p{color:var(--text-secondary)}.maintenance-status{display:flex;justify-content:center;align-items:center;gap:9px;margin:22px 0}.maintenance-status span,.maintenance-current-status>span{width:10px;height:10px;border-radius:50%;background:var(--accent);animation:maintenancePulse 1.5s infinite}.maintenance-card form{margin-top:22px}.maintenance-current-status{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft);margin-bottom:22px}.maintenance-current-status div{display:grid;gap:3px}.maintenance-current-status small{color:var(--text-secondary)}@keyframes maintenancePulse{50%{opacity:.35;transform:scale(.82)}}

/* Maintenance warning flow — 4.10.2 */
.maintenance-warning{
    position:relative;
    top:auto;
    z-index:1;
    margin:0;
    border-width:0 0 1px;
    border-radius:0;
    padding:12px 24px;
    background:color-mix(in srgb,var(--accent) 10%,var(--surface));
}
.maintenance-warning-copy{min-width:0;display:grid;gap:2px}
.maintenance-warning-copy p{margin:0;color:var(--text-secondary)}
body.maintenance-warning-active a[data-maintenance-locked="1"]{cursor:not-allowed;opacity:.55}
body.maintenance-warning-active form[data-maintenance-grace-allowed="0"]{opacity:.62}
body.maintenance-warning-active form[data-maintenance-grace-allowed="0"] :is(input,select,textarea,button){cursor:not-allowed}
@media (max-width:720px){.maintenance-warning{padding:11px 14px;align-items:flex-start}.maintenance-warning-icon{flex:0 0 auto}.maintenance-warning-copy p{font-size:.875rem}}
/* 4.11.1 — kopie zapasowe */
.backup-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:22px;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.backup-history{margin-top:22px}.backup-history h3{margin:0 0 14px}.backup-history table{width:100%;border-collapse:collapse}.backup-history th,.backup-history td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--border);vertical-align:top}.backup-history td small{display:block;margin-top:5px;color:var(--text-secondary);max-width:320px}.backup-history .table-actions{display:flex;gap:8px;align-items:center}.backup-history .table-actions form{margin:0}.backup-history .small-button{display:inline-flex;min-height:34px;align-items:center;padding:7px 11px;border-radius:10px}
@media(max-width:900px){.backup-toolbar{align-items:stretch;flex-direction:column}.backup-history .table-shell{overflow-x:auto}.backup-history table{min-width:920px}}

/* Backup settings layout — 4.11.3 */
.backup-settings-panel{position:relative;overflow:hidden;border-radius:28px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 3%,var(--surface)),var(--surface) 38%);box-shadow:0 18px 48px rgb(0 0 0 / .12)}
.backup-settings-panel>.settings-form-header{position:relative;padding:26px 28px 24px;border-bottom:0;background:radial-gradient(circle at 92% 10%,color-mix(in srgb,var(--accent) 9%,transparent),transparent 34%)}
.backup-settings-panel>.settings-form-header::after{content:"";position:absolute;right:28px;bottom:0;left:28px;height:1px;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 26%,var(--border)) 12%,color-mix(in srgb,var(--accent) 26%,var(--border)) 88%,transparent)}
.backup-settings-panel .settings-section-icon{border-radius:15px;box-shadow:inset 0 1px 0 rgb(255 255 255 / .05)}
.backup-settings-form{display:grid;gap:20px;margin-top:24px;padding:0 22px 26px}
.backup-config-section{position:relative;isolation:isolate;display:grid;gap:18px;overflow:hidden;padding:24px;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--border));border-radius:24px;background:linear-gradient(145deg,color-mix(in srgb,var(--page-bg) 34%,var(--surface-soft)),var(--surface-soft));box-shadow:0 10px 30px rgb(0 0 0 / .07),inset 0 1px 0 rgb(255 255 255 / .025)}
.backup-config-section::before{content:"";position:absolute;z-index:-1;top:-125px;right:-90px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 8%,transparent),transparent 67%);pointer-events:none}
.backup-config-section-highlight{border-color:color-mix(in srgb,var(--accent) 32%,var(--border));background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 6%,var(--surface-soft)),var(--surface-soft) 54%,color-mix(in srgb,var(--page-bg) 38%,var(--surface-soft)))}
.backup-config-heading{display:flex;align-items:flex-start;gap:14px;padding:2px 2px 4px}
.backup-config-heading>div{display:grid;gap:5px;min-width:0;padding-top:2px}
.backup-config-heading strong{font-size:1.02rem;color:var(--text)}
.backup-config-heading small{color:var(--text-secondary);line-height:1.5}
.backup-config-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid color-mix(in srgb,var(--accent) 38%,var(--border));border-radius:15px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 16%,var(--surface)),var(--accent-soft));color:var(--accent);box-shadow:0 7px 18px color-mix(in srgb,var(--accent) 8%,transparent),inset 0 1px 0 rgb(255 255 255 / .06)}
.backup-config-icon svg{width:20px;height:20px}
.backup-master-switch{border-color:color-mix(in srgb,var(--accent) 40%,var(--border))!important;background:linear-gradient(105deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),color-mix(in srgb,var(--page-bg) 25%,var(--surface)))!important;box-shadow:0 8px 20px rgb(0 0 0 / .06)}
.backup-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.backup-fields-grid .settings-field,.backup-webhook-field{min-width:0;margin:0;padding:17px 18px;border:1px solid color-mix(in srgb,var(--accent) 14%,var(--border));border-radius:18px;background:color-mix(in srgb,var(--page-bg) 42%,var(--surface));box-shadow:inset 0 1px 0 rgb(255 255 255 / .018);transition:border-color .16s ease,background .16s ease}
.backup-fields-grid .settings-field:hover,.backup-webhook-field:hover{border-color:color-mix(in srgb,var(--accent) 32%,var(--border));background:color-mix(in srgb,var(--page-bg) 32%,var(--surface))}
.backup-fields-grid .settings-field>span,.backup-webhook-field>span{font-weight:750;color:var(--text)}
.backup-fields-grid .settings-field>small,.backup-webhook-field>small{min-height:2.6em;color:var(--text-secondary);line-height:1.4}
.backup-fields-grid .settings-field>input,.backup-fields-grid .settings-field>select,.backup-webhook-field>input{width:100%;min-height:46px;padding:0 14px;border:1px solid var(--border-strong);border-radius:13px;outline:0;background:var(--input-bg);color:var(--text);font:inherit;font-weight:650;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.backup-fields-grid select{padding-right:40px}
.backup-fields-grid .settings-input-unit{border-color:var(--border-strong);border-radius:13px;background:var(--input-bg)}
.backup-fields-grid .settings-input-unit input{min-height:44px;padding-inline:14px;border:0;border-radius:0;background:transparent}
.backup-fields-grid .settings-input-unit span{padding-inline:13px;background:color-mix(in srgb,var(--accent) 6%,var(--surface));color:var(--text-secondary)}
.backup-fields-grid input[type="number"]{-moz-appearance:textfield;appearance:textfield}
.backup-fields-grid input[type="number"]::-webkit-outer-spin-button,.backup-fields-grid input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.backup-fields-grid .settings-field>input:focus,.backup-fields-grid .settings-field>select:focus,.backup-webhook-field>input:focus{border-color:var(--accent);background:color-mix(in srgb,var(--page-bg) 58%,var(--surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}
.backup-notification-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.backup-settings-form .settings-switch-field{min-height:78px;margin:0;padding:17px 19px;border:1px solid color-mix(in srgb,var(--accent) 14%,var(--border));border-radius:18px;background:color-mix(in srgb,var(--page-bg) 36%,var(--surface));box-shadow:inset 0 1px 0 rgb(255 255 255 / .02);transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.backup-settings-form .settings-switch-field:hover{border-color:color-mix(in srgb,var(--accent) 38%,var(--border));background:color-mix(in srgb,var(--accent) 4%,var(--surface));box-shadow:0 8px 20px rgb(0 0 0 / .055)}
.backup-settings-form .settings-switch-field span{min-width:0}
.backup-settings-form .settings-switch-field small{display:block;margin-top:5px;line-height:1.45;color:var(--text-secondary)}
.backup-info-box{margin:0;border-radius:17px}
.backup-form-actions{margin-top:0;padding:18px;border:1px solid var(--border);border-radius:18px;background:color-mix(in srgb,var(--page-bg) 38%,var(--surface))}
.backup-toolbar{margin:24px 22px 0;border-color:color-mix(in srgb,var(--accent) 22%,var(--border-strong));border-radius:20px;background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 5%,var(--surface-soft)),var(--surface-soft));box-shadow:0 9px 24px rgb(0 0 0 / .06)}
.backup-history{margin:24px 22px 26px}
@media(max-width:900px){.backup-fields-grid,.backup-notification-grid{grid-template-columns:1fr}.backup-fields-grid .settings-field>small,.backup-webhook-field>small{min-height:0}.backup-config-section{padding:18px}.backup-form-actions{align-items:stretch;flex-direction:column}.backup-form-actions .primary-button,.backup-form-actions .secondary-button{width:100%;justify-content:center}}
@media(max-width:600px){.backup-settings-panel{border-radius:22px}.backup-settings-panel>.settings-form-header{padding:22px 18px}.backup-settings-panel>.settings-form-header::after{right:18px;left:18px}.backup-settings-form{padding-inline:14px}.backup-config-section{padding:16px;border-radius:20px}.backup-fields-grid .settings-field,.backup-webhook-field{padding:15px;border-radius:16px}.backup-toolbar,.backup-history{margin-inline:14px}}

/* Awanse i degradacje Discord — 4.12.0 */
.position-discord-settings-panel{overflow:hidden;border-radius:28px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 4%,var(--surface)),var(--surface) 42%);box-shadow:0 18px 48px rgb(0 0 0 / .11)}
.position-discord-header{padding:27px 29px 24px;border-bottom:1px solid color-mix(in srgb,var(--accent) 18%,var(--border));background:radial-gradient(circle at 92% 6%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 36%)}
.position-discord-header-icon{border-radius:16px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 17%,var(--surface)),var(--accent-soft));box-shadow:0 10px 24px color-mix(in srgb,var(--accent) 10%,transparent)}
.position-discord-errors{margin:22px 24px 0;border-radius:18px}
.position-discord-form{display:grid;gap:22px;padding:24px}
.position-discord-rule,.position-discord-security-note{margin:0;border-radius:18px}
.position-discord-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.position-discord-card{--event-color:#22C55E;position:relative;display:grid;gap:18px;min-width:0;overflow:hidden;padding:22px;border:1px solid color-mix(in srgb,var(--event-color) 25%,var(--border));border-radius:26px;background:linear-gradient(150deg,color-mix(in srgb,var(--event-color) 5%,var(--surface-soft)),color-mix(in srgb,var(--page-bg) 34%,var(--surface)) 68%);box-shadow:0 12px 34px rgb(0 0 0 / .075),inset 0 1px 0 rgb(255 255 255 / .03)}
.position-discord-card::after{content:"";position:absolute;top:-90px;right:-80px;width:210px;height:210px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--event-color) 10%,transparent),transparent 68%);pointer-events:none}
.position-discord-card-demotion{--event-color:#EF4444}
.position-discord-card-heading{position:relative;z-index:1;display:flex;align-items:center;gap:13px}
.position-discord-card-heading>div{display:grid;gap:4px}.position-discord-card-heading strong{font-size:1.08rem;color:var(--text)}
.position-discord-card-heading small{display:flex;align-items:center;gap:7px;color:var(--text-secondary)}
.position-discord-card-heading small i{width:8px;height:8px;border-radius:50%;background:var(--event-color);box-shadow:0 0 0 4px color-mix(in srgb,var(--event-color) 13%,transparent)}
.position-discord-event-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid color-mix(in srgb,var(--event-color) 36%,var(--border));border-radius:15px;background:color-mix(in srgb,var(--event-color) 11%,var(--surface));color:var(--event-color)}
.position-discord-event-icon svg{width:20px;height:20px}
.position-discord-switch{min-height:78px;margin:0;padding:16px 18px;border:1px solid color-mix(in srgb,var(--event-color) 23%,var(--border));border-radius:19px;background:color-mix(in srgb,var(--event-color) 5%,var(--surface))}
.position-discord-switch small{display:block;margin-top:4px;color:var(--text-secondary)}
.position-discord-fields{display:grid;gap:14px}
.position-discord-fields .settings-field{min-width:0;margin:0;padding:16px 17px;border:1px solid color-mix(in srgb,var(--event-color) 13%,var(--border));border-radius:18px;background:color-mix(in srgb,var(--page-bg) 36%,var(--surface));transition:border-color .16s ease,background .16s ease}
.position-discord-fields .settings-field:hover{border-color:color-mix(in srgb,var(--event-color) 32%,var(--border));background:color-mix(in srgb,var(--page-bg) 27%,var(--surface))}
.position-discord-fields .settings-field>span{font-weight:750;color:var(--text)}
.position-discord-fields .settings-field>small{line-height:1.45;color:var(--text-secondary)}
.position-discord-fields :is(input,textarea){width:100%;padding:12px 13px;border:1px solid var(--border-strong);border-radius:13px;outline:0;background:var(--input-bg);color:var(--text);font:inherit;transition:border-color .16s ease,box-shadow .16s ease}
.position-discord-fields textarea{min-height:194px;resize:vertical;line-height:1.5}
.position-discord-fields :is(input,textarea):focus{border-color:var(--event-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--event-color) 14%,transparent)}
.position-discord-tokens{display:flex;flex-wrap:wrap;gap:7px}
.position-discord-tokens code{padding:6px 9px;border:1px solid color-mix(in srgb,var(--event-color) 20%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--event-color) 7%,var(--surface));color:var(--text);font-size:.76rem}
.position-discord-preview{overflow:hidden;border:1px solid var(--border);border-radius:19px;background:color-mix(in srgb,var(--page-bg) 55%,var(--surface));box-shadow:inset 0 1px 0 rgb(255 255 255 / .025)}
.position-discord-preview-bar{display:flex;align-items:center;gap:8px;padding:11px 14px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-size:.77rem}
.position-discord-preview-bar>span{width:7px;height:7px;border-radius:50%;background:var(--event-color)}
.position-discord-preview-bar strong{color:var(--text);font-size:.8rem}.position-discord-preview-bar small{margin-left:auto}
.position-discord-preview article{position:relative;display:grid;gap:10px;margin:15px;padding:15px 16px 16px 20px;border-radius:12px;background:color-mix(in srgb,var(--surface) 82%,var(--page-bg));box-shadow:0 8px 18px rgb(0 0 0 / .08)}
.position-discord-preview article::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;border-radius:12px 0 0 12px;background:var(--event-color)}
.position-discord-preview article>strong{color:var(--text);font-size:.98rem}
.position-discord-preview article>div{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text-secondary);font-size:.87rem;line-height:1.52}
.position-discord-preview article>div strong{color:var(--text)}
.position-discord-test{width:100%;justify-content:center;border-color:color-mix(in srgb,var(--event-color) 30%,var(--border))}
.position-discord-actions{margin:0;padding:18px;border:1px solid var(--border);border-radius:19px;background:color-mix(in srgb,var(--page-bg) 35%,var(--surface))}
@media(max-width:1100px){.position-discord-grid{grid-template-columns:1fr}.position-discord-card{max-width:760px}}
@media(max-width:650px){.position-discord-settings-panel{border-radius:22px}.position-discord-header{padding:22px 18px}.position-discord-form{padding:16px}.position-discord-card{padding:17px;border-radius:21px}.position-discord-actions{align-items:stretch;flex-direction:column}.position-discord-actions :is(.primary-button,.secondary-button){width:100%;justify-content:center}.position-discord-preview-bar small{display:none}}


/* Dokumenty pracowników */
.employee-documents-panel{display:grid;gap:22px;padding:24px}.employee-documents-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:20px}.identity-upload-field{display:grid;gap:9px}.form-label{font-weight:750;color:var(--text)}.identity-paste-zone{display:grid;justify-items:center;gap:8px;min-height:220px;padding:24px;border:1px dashed var(--border);border-radius:18px;background:var(--surface-soft);text-align:center;outline:none}.identity-paste-zone:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}.identity-paste-zone>span{color:var(--text-secondary)}.identity-paste-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:var(--surface);color:var(--accent)}.identity-paste-icon .icon{width:27px;height:27px}.identity-file-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;color:var(--text-secondary);font-size:.86rem}.danger-check{display:flex;align-items:center;gap:7px;color:var(--danger,#d44)}.employee-contract-field{align-content:start}.contract-open-button{width:max-content;margin-top:6px}.employee-documents-actions{margin:0;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.employee-document-actions{display:flex;flex-wrap:wrap;gap:7px}.document-missing{display:inline-flex;align-items:center;min-height:32px;padding:0 9px;border:1px solid var(--border);border-radius:9px;color:var(--text-secondary);font-size:.75rem}.identity-preview-modal{width:min(920px,calc(100vw - 32px));max-width:920px;grid-template-columns:minmax(0,1fr);gap:0;padding:22px}.identity-preview-modal .app-modal-content{display:grid;gap:16px}.identity-preview-modal .app-modal-header{align-items:center;padding-bottom:2px}.identity-preview-modal .app-modal-actions{margin-top:0;padding-top:2px}.identity-preview-frame{display:grid;place-items:center;min-height:180px;max-height:min(70vh,720px);overflow:auto;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.identity-preview-frame img{display:block;width:auto;height:auto;max-width:100%;max-height:min(68vh,700px);object-fit:contain}.account-column-documents{width:210px}@media(max-width:900px){.employee-documents-grid{grid-template-columns:1fr}.identity-file-summary{align-items:flex-start;flex-direction:column}.employee-documents-actions{align-items:stretch;flex-direction:column}.employee-documents-actions .primary-button{width:100%;justify-content:center}}@media(max-width:560px){.identity-preview-modal{width:100%;padding:16px;border-radius:18px 18px 0 0}.identity-preview-modal .app-modal-content{gap:13px}.identity-preview-modal .app-modal-actions{grid-template-columns:1fr}.identity-preview-frame{min-height:140px;max-height:62vh;border-radius:12px}.identity-preview-frame img{max-height:60vh}}

/* Resto Panel 4.15.1: czytelniejsza tabela kont pracowników */
.accounts-table-compact{min-width:960px}.accounts-table-compact .account-column-person{width:28%}.accounts-table-compact .account-column-status{width:16%}.accounts-table-compact .account-column-permissions{width:12%}.accounts-table-compact .account-column-fivem{width:18%}.accounts-table-compact .account-column-documents{width:17%}.accounts-table-compact .account-column-actions{width:9%}.account-state-stack,.account-fivem-stack{display:grid;justify-items:start;gap:6px}.account-state-stack .account-last-login{color:var(--text-secondary);font-size:10px}.account-active-leave{margin-top:5px}.account-active-leave .status-badge{min-height:25px;padding:0 9px;font-size:10px}.employee-document-actions-compact{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.document-status-link,.document-status-missing{display:inline-flex;align-items:center;gap:6px;min-height:30px;width:max-content;padding:0 9px;border:1px solid var(--border);border-radius:9px;background:var(--surface-soft);color:var(--text-secondary);font:inherit;font-size:11px;line-height:1;text-align:left;text-decoration:none;white-space:nowrap}.document-status-link{color:var(--text);cursor:pointer}.document-status-link:hover{border-color:var(--accent);color:var(--accent)}.document-status-link .icon{width:14px;height:14px}.document-status-link b{color:var(--success,#22c55e);font-size:11px}.document-status-missing{border-style:dashed;background:transparent}.document-status-missing b{color:var(--text-faint);font-weight:700}.account-actions-menu{position:relative;width:max-content;margin-left:auto}.account-actions-menu>summary{width:38px;height:36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--text);cursor:pointer;font-weight:900;letter-spacing:2px;list-style:none}.account-actions-menu>summary::-webkit-details-marker{display:none}.account-actions-menu>summary:hover,.account-actions-menu[open]>summary{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface))}.account-actions-menu>summary:focus-visible{outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}.account-actions-popover{width:160px;overflow:hidden;padding:5px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 14px 34px rgb(0 0 0 / .24)}.account-actions-popover:not(.account-actions-popover-floating){position:absolute;z-index:30;top:calc(100% + 7px);right:0}.account-actions-popover-floating{position:fixed;z-index:10050;margin:0}.account-actions-popover a,.account-actions-popover button{width:100%;min-height:38px;display:flex;align-items:center;gap:9px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;font-size:12px;text-align:left;text-decoration:none;cursor:pointer}.account-actions-popover a:hover,.account-actions-popover button:hover{background:var(--surface-soft)}.account-actions-popover .icon{width:16px;height:16px}.account-actions-popover form{margin:0}.account-actions-popover .danger{color:var(--danger,#dc5252)}
@media(max-width:760px){.accounts-table-compact tbody td:nth-child(4){grid-column:auto}.accounts-table-compact tbody td:nth-child(5){grid-column:1/-1}.accounts-table-compact tbody td:last-child{grid-column:1/-1}.employee-document-actions-compact{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.document-status-link,.document-status-missing{min-height:34px;padding:0 10px;border:1px solid var(--border);border-radius:9px}.document-status-missing::before{display:none}.document-status-missing{grid-template-columns:minmax(0,1fr) auto}.account-actions-menu{width:100%;margin:0}.account-actions-menu>summary{width:100%;letter-spacing:3px}.account-actions-popover,.account-actions-popover:not(.account-actions-popover-floating){position:static;width:100%;margin-top:7px;box-shadow:none}.account-actions-popover a,.account-actions-popover button{min-height:42px}}
@media(max-width:520px){.employee-document-actions-compact{grid-template-columns:1fr}.accounts-table-compact tbody td:nth-child(5){grid-column:1}.account-state-stack,.account-fivem-stack{justify-items:end;text-align:right}}

/* 4.16.0 — zespołowe ocenianie podań */
.recruitment-voting-panel{grid-column:1;padding:0;overflow:hidden}.recruitment-decision-panel{grid-column:2;grid-row:1/span 2}.recruitment-voting-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--gold-500) 4%,var(--surface))}.recruitment-voting-header h2{margin:3px 0 0}.recruitment-vote-totals,.recruitment-vote-summary{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.recruitment-vote-totals>span,.recruitment-vote-summary>span{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);font-weight:850}.vote-positive{color:#86efac}.vote-negative{color:#fca5a5}.recruitment-vote-summary small{display:block;width:100%;color:var(--text-secondary);font-size:.7rem}.recruitment-vote-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:18px 24px;border-bottom:1px solid var(--border)}.recruitment-vote-controls form{margin:0}.recruitment-vote-button.is-selected{border-color:color-mix(in srgb,var(--accent) 68%,var(--border));background:color-mix(in srgb,var(--accent) 14%,var(--surface));box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 20%,transparent)}.recruitment-vote-button.vote-negative-trigger.is-selected{border-color:rgba(239,68,68,.5);background:rgba(239,68,68,.1)}.recruitment-vote-remove{min-height:42px;padding:.7rem 1rem;border-color:color-mix(in srgb,var(--danger,#dc2626) 46%,var(--border));background:color-mix(in srgb,var(--danger,#dc2626) 6%,var(--surface));color:var(--danger,#dc2626)}.recruitment-vote-remove:hover{border-color:var(--danger,#dc2626);background:color-mix(in srgb,var(--danger,#dc2626) 12%,var(--surface));color:var(--danger,#dc2626)}.recruitment-vote-locked{margin:0;color:var(--text-secondary)}.recruitment-vote-list{display:grid;padding:4px 24px 18px}.recruitment-vote-entry{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;padding:15px 0;border-bottom:1px solid var(--border)}.recruitment-vote-entry:last-child{border-bottom:0}.recruitment-vote-mark{width:34px;height:34px;display:grid;place-items:center;border:1px solid currentColor;border-radius:10px;background:var(--surface-soft);font-size:1.05rem;font-weight:900}.recruitment-vote-entry>div{display:grid;gap:4px}.recruitment-vote-entry small{color:var(--text-secondary);font-size:.72rem}.recruitment-vote-entry p{margin:5px 0 0;padding:11px 13px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--text-secondary);line-height:1.55;overflow-wrap:anywhere}.recruitment-vote-empty{padding:24px 0}.recruitment-negative-vote-modal[hidden]{display:none}.recruitment-negative-vote-dialog{width:min(560px,calc(100vw - 32px))}.recruitment-negative-vote-form{display:grid;gap:18px}.recruitment-negative-vote-form .form-field{display:grid;gap:8px}.recruitment-negative-vote-form .form-field>span{font-weight:850}.recruitment-negative-vote-form .form-field>small{color:var(--text-secondary);line-height:1.45}
@media(max-width:960px){.recruitment-voting-panel,.recruitment-decision-panel{grid-column:auto;grid-row:auto}}
@media(max-width:680px){.recruitment-voting-header{align-items:flex-start;flex-direction:column;padding:18px}.recruitment-vote-controls{padding:16px 18px}.recruitment-vote-controls form,.recruitment-vote-controls button{width:100%}.recruitment-vote-list{padding-inline:18px}.recruitment-negative-vote-dialog{width:calc(100vw - 20px)}.recruitment-negative-vote-form .app-modal-actions{grid-template-columns:1fr}.recruitment-application-meta{grid-template-columns:1fr}.recruitment-vote-summary small{width:auto}}
.recruitment-application-meta{grid-template-columns:1.05fr .55fr .85fr 1fr}
@media(max-width:680px){.recruitment-application-meta{grid-template-columns:1fr}}

/* Warehouse inventory */
.warehouse-board{display:grid;grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:14px;align-items:stretch}.warehouse-zone{min-width:0;padding:0;overflow:hidden;transition:border-color .18s ease,background .18s ease}.warehouse-zone.is-drop-target{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 5%,var(--surface))}.warehouse-zone-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border-bottom:1px solid var(--border)}.warehouse-zone-header h2{margin:3px 0 0}.warehouse-search{display:flex;align-items:center;gap:8px;min-width:190px;padding:0 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}.warehouse-search input{width:100%;height:40px;border:0;background:transparent;color:var(--text);outline:0}.warehouse-search .icon{width:17px;color:var(--text-secondary)}.warehouse-items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px;align-content:start;min-height:480px;max-height:66vh;padding:16px;overflow:auto}.warehouse-item-card{display:grid;grid-template-rows:116px auto auto;gap:10px;padding:10px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft);cursor:grab;transition:transform .16s ease,border-color .16s ease}.warehouse-item-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 55%,var(--border))}.warehouse-item-card.is-dragging{opacity:.45}.warehouse-item-image{display:grid;place-items:center;min-width:54px;min-height:54px;overflow:hidden;border-radius:11px;background:color-mix(in srgb,var(--page-bg) 74%,#000)}.warehouse-item-image img{width:100%;height:100%;object-fit:contain;padding:7px}.warehouse-item-image>.icon{width:34px;height:34px;color:var(--text-secondary)}.warehouse-item-copy{display:grid;gap:3px;min-width:0}.warehouse-item-copy strong,.warehouse-item-copy small,.warehouse-item-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.warehouse-item-copy small,.warehouse-item-copy span{font-size:.76rem;color:var(--text-secondary)}.warehouse-item-action{width:100%;justify-content:center}.warehouse-transfer-hint{display:grid;place-items:center;align-content:center;gap:9px;color:var(--text-secondary);font-size:.72rem;text-align:center}.warehouse-transfer-hint .icon{width:20px}.warehouse-empty{grid-column:1/-1;align-self:center}[data-warehouse-modal][hidden]{display:none!important}.warehouse-quantity-modal{width:min(460px,calc(100vw - 28px));grid-template-columns:1fr}.warehouse-quantity-modal form{display:grid;gap:18px}.warehouse-settings-tabs{display:flex;gap:8px;padding:0 24px 20px;border-bottom:1px solid var(--border)}.warehouse-settings-tabs a{padding:10px 14px;border:1px solid var(--border);border-radius:11px;color:var(--text-secondary);font-weight:750}.warehouse-settings-tabs a.is-active{background:var(--accent);border-color:var(--accent);color:var(--accent-contrast,#111)}.warehouse-settings-content{display:grid;gap:18px;padding:24px}.warehouse-editor-card,.warehouse-saved-items{overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.warehouse-editor-header,.warehouse-list-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 22px;border-bottom:1px solid var(--border)}.warehouse-editor-header h3,.warehouse-list-header h3{margin:4px 0 3px}.warehouse-editor-header p,.warehouse-list-header p{margin:0;color:var(--text-secondary)}.warehouse-item-editor{display:grid;gap:22px;padding:22px}.warehouse-item-fields{gap:14px}.warehouse-image-field{display:grid;gap:9px}.warehouse-field-label{font-weight:800}.warehouse-image-dropzone{min-height:126px;padding:16px;border-radius:14px}.warehouse-upload-placeholder{display:grid;place-items:center;gap:5px;text-align:center}.warehouse-image-preview{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:center;gap:16px;width:100%;text-align:left}.warehouse-image-preview img{width:104px;height:86px;object-fit:contain;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.warehouse-image-preview-copy{display:grid;gap:4px;min-width:0}.warehouse-image-preview-copy strong{color:var(--text)}.warehouse-image-preview-copy small,.warehouse-image-preview-copy em{overflow:hidden;color:var(--text-secondary);font-size:.78rem;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.warehouse-editor-actions{padding-top:2px;border-top:0}.warehouse-list-header{align-items:center}.warehouse-settings-search{display:flex;align-items:center;gap:9px;width:min(360px,100%);padding:0 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.warehouse-settings-search .icon{width:18px;color:var(--text-secondary)}.warehouse-settings-search input{width:100%;height:42px;border:0;background:transparent;color:var(--text);outline:0}.warehouse-settings-list{display:grid;gap:10px;padding:16px}.warehouse-settings-item{display:grid;grid-template-columns:76px minmax(0,1fr) auto auto;align-items:center;gap:16px;min-height:82px;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);transition:border-color .16s ease,transform .16s ease}.warehouse-settings-item:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));transform:translateY(-1px)}.warehouse-settings-item .warehouse-item-image{width:76px;height:62px}.warehouse-settings-item-copy{display:grid;gap:5px;min-width:0}.warehouse-settings-item-copy strong{font-size:.96rem}.warehouse-settings-item-copy small{overflow:hidden;color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap}.warehouse-settings-item>form{justify-self:end}.warehouse-settings-item>form .small-button{min-width:104px}.warehouse-settings-list>.empty-state{padding:30px 18px}
@media(max-width:1050px){.warehouse-board{grid-template-columns:1fr}.warehouse-transfer-hint{display:none}.warehouse-items-grid{min-height:300px;max-height:none}.warehouse-zone-header{align-items:flex-start;flex-direction:column}.warehouse-search{width:100%}}
@media(max-width:600px){.warehouse-items-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:8px}.warehouse-item-card{grid-template-rows:92px auto auto}.warehouse-settings-content{padding:16px}.warehouse-settings-tabs{padding:0 16px 16px}.warehouse-settings-tabs a{flex:1;text-align:center}.warehouse-editor-header,.warehouse-list-header{display:grid;padding:18px}.warehouse-item-editor{padding:18px}.warehouse-image-preview{grid-template-columns:78px minmax(0,1fr);gap:12px}.warehouse-image-preview img{width:78px;height:68px}.warehouse-settings-search{width:100%}.warehouse-settings-item{grid-template-columns:62px minmax(0,1fr);gap:12px}.warehouse-settings-item .warehouse-item-image{width:62px;height:56px}.warehouse-settings-item>.status-badge,.warehouse-settings-item>form{grid-column:2}.warehouse-settings-item>form{width:100%}.warehouse-settings-item>form button{width:100%}}
.warehouse-item-card[hidden]{display:none}

/* 4.19.3 — spójny nagłówek magazynu i kontroler ilości */
.warehouse-page{display:grid;gap:20px}.warehouse-page>.breadcrumb{margin-bottom:-6px}.warehouse-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px;background:linear-gradient(120deg,var(--surface),color-mix(in srgb,var(--accent) 8%,var(--surface)))}.warehouse-hero-main{display:flex;align-items:center;gap:18px;min-width:0}.warehouse-hero-icon{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border:1px solid color-mix(in srgb,var(--accent) 42%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--accent) 10%,var(--surface-soft));color:var(--accent)}.warehouse-hero-icon .icon{width:25px;height:25px}.warehouse-hero h1{margin:4px 0 6px;font-size:clamp(1.65rem,3vw,2.2rem)}.warehouse-hero p{margin:0;color:var(--text-secondary)}.warehouse-hero-summary{display:grid;gap:4px;min-width:170px;padding:13px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);text-align:right}.warehouse-hero-summary span{font-size:.72rem;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.08em}.warehouse-hero-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.warehouse-quantity-field{display:grid;gap:10px}.warehouse-quantity-label{font-weight:800}.warehouse-quantity-control{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:stretch;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:var(--surface-soft)}.warehouse-quantity-control input{width:100%;height:48px;border:0;border-inline:1px solid var(--border);border-radius:0;background:transparent;color:var(--text);font:inherit;font-weight:800;text-align:center;appearance:textfield;-moz-appearance:textfield;outline:0}.warehouse-quantity-control input::-webkit-inner-spin-button,.warehouse-quantity-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.warehouse-quantity-control input:focus{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 68%,transparent)}.warehouse-quantity-step{display:grid;place-items:center;border:0;background:transparent;color:var(--text);cursor:pointer;transition:background .16s ease,color .16s ease}.warehouse-quantity-step:hover,.warehouse-quantity-step:focus-visible{background:color-mix(in srgb,var(--accent) 13%,transparent);color:var(--accent);outline:0}.warehouse-quantity-step .icon{width:18px;height:18px}.warehouse-quantity-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.warehouse-quantity-presets button{min-height:38px;padding:7px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--text-secondary);font:inherit;font-weight:800;cursor:pointer}.warehouse-quantity-presets button:hover,.warehouse-quantity-presets button:focus-visible{border-color:var(--accent);color:var(--text);outline:0}.warehouse-quantity-presets button[hidden]{display:none}.warehouse-quantity-field small{color:var(--text-secondary)}
@media(max-width:700px){.warehouse-hero{align-items:flex-start;flex-direction:column;padding:20px}.warehouse-hero-main{align-items:flex-start}.warehouse-hero-summary{width:100%;text-align:left}.warehouse-quantity-presets{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Warehouse quantity selector and combined name/category search — 4.19.4 */
.warehouse-quantity-modal{width:min(500px,calc(100vw - 28px))}
.warehouse-quantity-field{gap:12px;padding:16px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft)}
.warehouse-quantity-control{grid-template-columns:56px minmax(110px,1fr) 56px;border-color:color-mix(in srgb,var(--accent) 40%,var(--border));border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 5%,transparent)}
.warehouse-quantity-control input{height:54px;border-inline-color:color-mix(in srgb,var(--accent) 35%,var(--border));background:var(--surface);font-size:1.18rem;color:var(--text)}
.warehouse-quantity-step{font-size:1.6rem;font-weight:500;line-height:1;color:var(--text-secondary)}
.warehouse-quantity-step span{transform:translateY(-1px)}
.warehouse-quantity-presets{display:flex;flex-wrap:wrap;gap:8px}
.warehouse-quantity-presets button{flex:1 1 76px;min-height:40px;background:var(--surface);color:var(--text-secondary)}
.warehouse-quantity-presets button.is-active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--text);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 42%,transparent)}
.warehouse-quantity-field small{line-height:1.45}
@media(max-width:520px){.warehouse-quantity-modal .app-modal-content{padding:18px}.warehouse-quantity-control{grid-template-columns:50px minmax(90px,1fr) 50px}.warehouse-quantity-presets button{flex-basis:calc(50% - 4px)}}

/* Warehouse quantity modal header spacing — 4.19.5 */
.warehouse-quantity-modal .app-modal-header > div {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.warehouse-quantity-modal .app-modal-header .eyebrow {
    display: block;
    margin: 0;
    line-height: 1.2;
}
.warehouse-quantity-modal .app-modal-header h2 {
    margin: 0;
    line-height: 1.16;
}


/* Warehouse quantity modal spacing rhythm — 4.19.6 */
.warehouse-quantity-modal .app-modal-content{display:grid;padding:26px}
.warehouse-quantity-modal .app-modal-header{align-items:flex-start;margin-bottom:26px}
.warehouse-quantity-modal .app-modal-header>div{gap:9px}
.warehouse-quantity-modal form{display:grid;gap:0}
.warehouse-quantity-modal .warehouse-quantity-field{gap:14px;padding:20px}
.warehouse-quantity-modal .warehouse-quantity-label{display:block;line-height:1.25}
.warehouse-quantity-modal .warehouse-quantity-presets{margin-top:2px}
.warehouse-quantity-modal .warehouse-quantity-field small{display:block;margin-top:2px;line-height:1.55}
.warehouse-quantity-modal .app-modal-actions{margin-top:30px}
@media(max-width:520px){.warehouse-quantity-modal .app-modal-content{padding:20px}.warehouse-quantity-modal .app-modal-header{margin-bottom:22px}.warehouse-quantity-modal .warehouse-quantity-field{padding:16px;gap:12px}.warehouse-quantity-modal .app-modal-actions{margin-top:24px}}

/* Warehouse settings polish 4.19.8 */
.warehouse-settings-panel>.settings-form-header{align-items:center;padding:20px 24px}.warehouse-settings-panel>.settings-form-header .settings-section-icon{flex:0 0 auto}.warehouse-settings-panel>.settings-form-header h2{margin-top:2px}.warehouse-settings-panel>.settings-form-header p{max-width:680px}.warehouse-settings-panel .warehouse-settings-tabs{padding:0 24px 18px}.warehouse-sort-order-input{appearance:textfield}.warehouse-sort-order-input::-webkit-outer-spin-button,.warehouse-sort-order-input::-webkit-inner-spin-button{margin:0;appearance:none}.warehouse-image-preview-media{display:grid;place-items:center;width:104px;height:86px;overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.warehouse-image-preview-media img{width:100%;height:100%;padding:7px;object-fit:contain}.warehouse-image-fallback{display:grid;place-items:center;width:100%;height:100%;color:var(--text-secondary)}.warehouse-image-fallback .icon{width:30px;height:30px}.warehouse-settings-item .warehouse-item-image.has-image-error{background:var(--surface-soft)}
@media(max-width:600px){.warehouse-settings-panel>.settings-form-header{padding:18px}.warehouse-settings-panel .warehouse-settings-tabs{padding-inline:18px}.warehouse-image-preview-media{width:78px;height:68px}}

/* Warehouse settings layout and image polish 4.19.9 */
.warehouse-settings-panel>.settings-form-header{gap:18px;padding:24px 28px}.warehouse-settings-panel>.settings-form-header .settings-section-icon{width:46px;height:46px}.warehouse-settings-panel>.settings-form-header h2{margin:5px 0 6px}.warehouse-settings-panel>.settings-form-header p{line-height:1.55}.warehouse-settings-panel .warehouse-settings-tabs{gap:10px;padding:0 28px 22px}.warehouse-settings-panel .warehouse-settings-tabs a{min-height:44px;padding:11px 18px;display:inline-flex;align-items:center;justify-content:center}.warehouse-settings-content{gap:22px;padding:28px}.warehouse-editor-card,.warehouse-saved-items{border-radius:18px}.warehouse-editor-header,.warehouse-list-header{padding:24px 26px}.warehouse-item-editor{gap:26px;padding:26px}.warehouse-image-dropzone{min-height:180px;padding:22px}.warehouse-upload-placeholder{gap:8px}.warehouse-image-preview{grid-template-columns:152px minmax(0,1fr);gap:22px}.warehouse-image-preview-media{width:152px;height:112px;border-radius:14px;background:var(--surface)}.warehouse-image-preview-media img{width:100%;height:100%;padding:0;object-fit:cover;display:block}.warehouse-image-preview-media img[hidden],.warehouse-settings-item .warehouse-item-image img[hidden],.warehouse-image-fallback[hidden]{display:none!important}.warehouse-image-preview-copy{gap:7px}.warehouse-editor-actions{padding-top:6px}.warehouse-settings-list{gap:12px;padding:20px}.warehouse-settings-item{grid-template-columns:92px minmax(0,1fr) auto auto;gap:18px;min-height:100px;padding:14px 16px}.warehouse-settings-item .warehouse-item-image{width:92px;height:72px;border-radius:13px}.warehouse-settings-item .warehouse-item-image img{width:100%;height:100%;padding:0;object-fit:cover;display:block}.warehouse-settings-item .warehouse-item-image.has-image-error{background:var(--surface-soft)}.warehouse-settings-item-copy{gap:7px}.warehouse-settings-item-copy strong{font-size:1rem}.warehouse-settings-item-copy small{font-size:.8rem}.warehouse-settings-item>.status-badge{white-space:nowrap}.warehouse-settings-item>form .small-button{min-width:116px}.warehouse-image-fallback{place-items:center}.warehouse-image-fallback .icon{width:32px;height:32px}
@media(max-width:900px){.warehouse-settings-item{grid-template-columns:82px minmax(0,1fr) auto}.warehouse-settings-item>form{grid-column:3}.warehouse-settings-item>.status-badge{grid-column:3;justify-self:end}.warehouse-settings-item .warehouse-item-image{width:82px;height:68px}}
@media(max-width:600px){.warehouse-settings-panel>.settings-form-header{padding:20px}.warehouse-settings-panel .warehouse-settings-tabs{padding:0 20px 18px}.warehouse-settings-content{padding:18px}.warehouse-editor-header,.warehouse-list-header{padding:20px}.warehouse-item-editor{padding:20px}.warehouse-image-dropzone{min-height:164px;padding:18px}.warehouse-image-preview{grid-template-columns:96px minmax(0,1fr);gap:14px}.warehouse-image-preview-media{width:96px;height:82px}.warehouse-settings-item{grid-template-columns:72px minmax(0,1fr);min-height:92px;padding:12px}.warehouse-settings-item .warehouse-item-image{width:72px;height:62px}.warehouse-settings-item>.status-badge,.warehouse-settings-item>form{grid-column:2;justify-self:stretch}.warehouse-settings-item>form .small-button{width:100%}}


/* Warehouse settings header and tabs compact layout 4.19.10 */
.warehouse-settings-panel>.settings-form-header{
    gap:14px;
    padding:18px 24px 16px;
}
.warehouse-settings-panel>.settings-form-header .settings-section-icon{
    width:42px;
    height:42px;
}
.warehouse-settings-panel>.settings-form-header h2{
    margin:2px 0 4px;
}
.warehouse-settings-panel>.settings-form-header p{
    line-height:1.4;
}
.warehouse-settings-panel .warehouse-settings-tabs{
    gap:8px;
    padding:12px 24px 16px;
}
.warehouse-settings-panel .warehouse-settings-tabs a{
    min-height:40px;
    padding:9px 16px;
}
@media(max-width:600px){
    .warehouse-settings-panel>.settings-form-header{
        gap:12px;
        padding:16px;
    }
    .warehouse-settings-panel>.settings-form-header .settings-section-icon{
        width:40px;
        height:40px;
    }
    .warehouse-settings-panel .warehouse-settings-tabs{
        padding:10px 16px 14px;
    }
}

/* Warehouse settings filtered empty state 4.19.11 */
[data-warehouse-settings-empty][hidden]{display:none!important}


/* Warehouse item card transparent-margin fitting 4.19.13 */
.warehouse-item-card .warehouse-item-image img{
    width:100%;
    height:100%;
    padding:0;
    object-fit:contain;
    object-position:center;
    display:block;
}

.warehouse-item-image img.is-auto-cropped{object-fit:contain;background:transparent}

/* Warehouse item administration */
.warehouse-settings-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.warehouse-settings-item-actions form {
    margin: 0;
}
.warehouse-settings-item-actions .warehouse-item-delete-button {
    min-height: 36px;
    padding: 0 11px;
    gap: 7px;
    border-color: color-mix(in srgb, var(--danger, #ff6b6b) 42%, var(--border));
    background: transparent;
    color: var(--danger, #ff6b6b);
    box-shadow: none;
}
.warehouse-settings-item-actions .warehouse-item-delete-button .icon {
    width: 15px;
    height: 15px;
}
.warehouse-settings-item-actions .warehouse-item-delete-button:hover,
.warehouse-settings-item-actions .warehouse-item-delete-button:focus-visible {
    border-color: var(--danger, #ff6b6b);
    background: color-mix(in srgb, var(--danger, #ff6b6b) 9%, var(--surface));
    color: var(--danger, #ff6b6b);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger, #ff6b6b) 18%, transparent);
}
.warehouse-item-editor .hidden {
    display: none !important;
}
@media (max-width: 760px) {
    .warehouse-settings-item-actions {
        width: 100%;
        justify-content: stretch;
    }
    .warehouse-settings-item-actions > button,
    .warehouse-settings-item-actions > form,
    .warehouse-settings-item-actions > form > button {
        width: 100%;
    }
    .warehouse-settings-item-actions .warehouse-item-delete-button {
        justify-content: center;
    }
}


/* 4.38.2 — ujednolicony, ciemny wskaźnik select bez natywnego białego pola */
select:not([multiple]):not([size]) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23caa64b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 42px;
}

select:not([multiple]):not([size])::-ms-expand {
    display: none;
}

/* 4.39.0 — Pakiety menu i pakiety na rachunkach */
.menu-package-list{display:grid;gap:14px;padding:18px}.menu-package-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.menu-package-main{display:flex;gap:14px;min-width:0}.menu-package-badge{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--border));border-radius:13px;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent)}.menu-package-badge .icon{width:22px;height:22px}.menu-package-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.menu-package-title-line strong{font-size:1rem}.menu-package-main p{margin:6px 0 0;color:var(--text-secondary);line-height:1.45}.menu-package-items,.invoice-cart-package-items,.invoice-package-contents{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0;padding:0;list-style:none}.menu-package-items li,.invoice-cart-package-items li,.invoice-package-contents li{padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);font-size:.72rem;font-weight:750}.menu-package-items li span{color:var(--accent)}.menu-package-items-editor{display:grid;gap:14px;margin-bottom:14px}.menu-package-item-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,160px) auto;align-items:end;gap:14px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.menu-package-item-row .form-field{margin:0}.menu-package-product-field{min-width:0}.menu-package-product-field select{width:100%}.menu-package-quantity-field input{min-width:0;width:100%}.menu-package-remove-button{align-self:end;min-height:48px;padding-inline:14px;white-space:nowrap}.invoice-package-card{border-color:color-mix(in srgb,var(--accent) 36%,var(--border));background:linear-gradient(135deg,var(--surface-soft),color-mix(in srgb,var(--accent) 7%,var(--surface-soft)))}.invoice-package-preview{display:block;margin-top:4px;color:var(--text-secondary);font-size:.7rem;font-style:normal;line-height:1.35}.invoice-detail-package-item{align-items:flex-start}.invoice-package-contents{margin-top:8px}@media(max-width:760px){.menu-package-card{grid-template-columns:1fr}.menu-package-item-row{grid-template-columns:1fr}.menu-package-remove-button{width:100%;justify-content:center}.menu-row-actions{justify-content:flex-start}}

.menu-price-editor .menu-current-price{margin-bottom:14px}
.menu-price-form-grid .form-field input{min-height:54px}
.menu-price-form-grid .form-field input[type="date"]{min-height:54px}
.menu-price-form-grid .form-field{align-content:start}
.menu-price-form-grid .form-field > small{min-height:16px}

/* 4.53.6 — TOP sprzedaży przeniesiony na Pulpit */
.invoice-sales-panel {
    overflow: hidden;
    padding: 0;
    border-color: var(--border);
    background: var(--surface);
}

.invoice-sales-header {
    margin: 0;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.invoice-sales-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.invoice-sales-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.invoice-sales-heading > div {
    min-width: 0;
}

.invoice-sales-heading h2 {
    margin: 2px 0 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.invoice-sales-heading p {
    max-width: 880px;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: .8rem;
    line-height: 1.45;
}

#invoiceTopSalesLiveContainer {
    padding: 12px 18px 18px;
}


.dashboard-invoice-sales-panel {
    margin-top: 22px;
    margin-bottom: 22px;
}

.invoice-top-sales-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.invoice-top-sale-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 74%, var(--surface));
}

.invoice-top-sale-card.is-package {
    border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
}

.invoice-top-sale-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 13%, var(--surface));
    color: var(--accent-strong);
    font-size: .78rem;
    font-weight: 850;
}

.invoice-top-sale-main {
    min-width: 0;
}

.invoice-top-sale-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.invoice-top-sale-title strong {
    overflow: hidden;
    color: var(--text);
    font-size: .88rem;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-top-sale-main small {
    display: block;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: .72rem;
    line-height: 1.3;
}

.invoice-top-sale-quantity {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    min-width: 76px;
    color: var(--text);
    white-space: nowrap;
}

.invoice-top-sale-quantity strong {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.invoice-top-sale-quantity small {
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 750;
}

.invoice-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, #f59e0b 42%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, #f59e0b 12%, var(--surface));
    color: #b45309;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .01em;
    white-space: nowrap;
}

.dark .invoice-discount-badge {
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .38);
    color: #fcd34d;
}

.invoice-package-badge {
    min-height: 20px;
    padding: 2px 7px;
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    color: var(--accent-strong);
    font-size: .6rem;
}

.invoice-sales-empty {
    margin: 14px 18px 18px;
    border-top: 0;
}

@media (min-width: 980px) {
    .invoice-top-sales-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .invoice-sales-header {
        padding: 18px;
    }

    .invoice-sales-heading {
        gap: 10px;
    }

    #invoiceTopSalesLiveContainer {
        padding: 12px;
    }

    .invoice-top-sale-card {
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: start;
    }

    .invoice-top-sale-quantity {
        grid-column: 2;
        justify-content: flex-start;
        min-width: 0;
        margin-top: 2px;
    }
}

/* 4.42.1 — miękki live refresh bez przeładowania całej strony */
[data-live-fragment],
#managementInvoicesLiveContainer,
#invoiceTopSalesLiveContainer,
#accountBalanceLiveContainer {
    transition: box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}

.live-fragment-updated {
    animation: liveFragmentSoftPulse 1.05s ease-out;
}

@keyframes liveFragmentSoftPulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent);
    }
    45% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* 4.42.1 — miękki live refresh menu restauracji i katalogu rachunku */
#restaurantMenuLiveContainer,
#invoiceCatalogContainer {
    transition: box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}

/* Mobile layout hardening — v4.45.3 */
@media (max-width: 760px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        -webkit-text-size-adjust: 100%;
    }

    .app-shell,
    .app-main,
    .main-content,
    [data-live-fragment] {
        min-width: 0;
    }

    .sidebar {
        width: min(92vw, 320px);
    }

    .sidebar-header,
    .sidebar-footer {
        padding-inline: 14px;
    }

    .topbar {
        min-width: 0;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .topbar-left,
    .topbar-actions,
    .page-context,
    .module-heading,
    .module-heading > div,
    .welcome-panel > div,
    .panel,
    .card,
    .settings-content {
        min-width: 0;
    }

    .topbar-actions {
        flex: 0 0 auto;
        gap: 7px;
    }

    .page-context strong {
        max-width: min(48vw, 230px);
    }

    .main-content {
        padding: 14px 10px 24px;
    }

    .module-heading,
    .page-heading,
    .settings-heading,
    .invoice-heading,
    .warehouse-heading,
    .payroll-hero,
    .general-logs-hero,
    .general-log-detail-hero,
    .collaboration-form-intro,
    .collaboration-form-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .module-heading h1,
    .welcome-panel h1,
    .settings-heading h1,
    .invoice-heading h1,
    .warehouse-heading h1,
    .payroll-hero h1,
    .general-logs-hero h1,
    .general-log-detail-hero h1 {
        overflow-wrap: anywhere;
        font-size: clamp(24px, 8vw, 31px);
        line-height: 1.12;
    }

    .module-heading p,
    .welcome-panel p,
    .settings-heading p,
    .invoice-heading p,
    .warehouse-heading p {
        max-width: 100%;
    }

    .panel,
    .metric-card,
    .settings-form,
    .invoice-list-panel,
    .warehouse-panel,
    .collaboration-card,
    .menu-category-card,
    .menu-package-card,
    .recruitment-settings-card {
        border-radius: 14px;
    }

    .panel,
    .settings-form,
    .invoice-list-panel,
    .warehouse-panel {
        overflow: hidden;
    }

    .form-grid,
    .filter-grid,
    .invoice-filter-grid,
    .settings-grid,
    .backup-settings-grid,
    .recruitment-settings-grid,
    .warehouse-settings-grid,
    .position-discord-grid,
    .collaboration-filter-panel,
    .general-log-filter-grid,
    .general-log-detail-grid,
    .payroll-grid {
        grid-template-columns: 1fr !important;
    }

    .form-field,
    .settings-field,
    .switch-field,
    .settings-switch-field,
    .recruitment-question-row,
    .warehouse-editor-card,
    .position-discord-card {
        min-width: 0;
    }

    input,
    select,
    textarea,
    .form-field input,
    .form-field select,
    .form-field textarea,
    .settings-input-unit,
    .settings-input-unit input {
        max-width: 100%;
        min-width: 0;
    }

    .form-actions,
    .settings-form-actions,
    .invoice-row-actions,
    .menu-row-actions,
    .collaboration-card-actions,
    .warehouse-actions,
    .app-modal-actions,
    .table-actions,
    .backup-form-actions,
    .recruitment-question-actions,
    .position-discord-actions {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 9px;
    }

    .form-actions > *,
    .settings-form-actions > *,
    .invoice-row-actions > *,
    .invoice-row-actions form,
    .invoice-row-actions form > *,
    .menu-row-actions > *,
    .menu-row-actions form,
    .menu-row-actions form > *,
    .collaboration-card-actions > *,
    .collaboration-card-actions form,
    .collaboration-card-actions form > *,
    .warehouse-actions > *,
    .app-modal-actions > *,
    .backup-form-actions > *,
    .recruitment-question-actions > *,
    .position-discord-actions > * {
        width: 100%;
    }

    .primary-button,
    .secondary-button,
    .danger-button,
    .small-button,
    button.primary-button,
    button.secondary-button,
    button.danger-button,
    a.primary-button,
    a.secondary-button,
    a.danger-button {
        min-height: 44px;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .table-shell,
    .responsive-table,
    .backup-history,
    .general-log-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-shell table,
    .responsive-table table,
    .backup-history table {
        min-width: 640px;
    }

    .empty-state {
        padding-inline: 16px;
        text-align: left;
    }

    .invoice-card-list,
    .collaboration-grid,
    .warehouse-items-grid,
    .menu-list,
    .recruitment-applications-list {
        gap: 12px;
    }

    .employee-invoice-card,
    .management-invoice-card,
    .collaboration-card,
    .warehouse-item-card,
    .menu-category-row,
    .menu-package-card,
    .account-operation-row,
    .notification-item {
        min-width: 0;
        padding: 14px;
    }

    .invoice-card-financials,
    .invoice-card-metric,
    .account-balance-summary-grid,
    .work-period-dashboard {
        min-width: 0;
    }

    .status-badge,
    .date-pill,
    .tag-pill {
        max-width: 100%;
        white-space: normal;
    }

    img,
    video,
    canvas,
    svg {
        max-width: 100%;
    }

    .warehouse-item-image img,
    .warehouse-image-preview-media img,
    .invoice-product-card img,
    .menu-item-image img,
    .menu-package-image img,
    .collaboration-thumb img,
    .collaboration-upload-preview img,
    [data-warehouse-autofit-image] {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .warehouse-image-preview-media img,
    .collaboration-upload-preview img {
        object-fit: contain;
    }

    .app-modal,
    .balance-modal {
        padding: 0;
        align-items: flex-end;
    }

    .app-modal-content,
    .balance-modal-card {
        width: 100%;
        max-width: none;
        max-height: 94dvh;
        overflow-y: auto;
        border-radius: 18px 18px 0 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-inline: 8px;
    }

    .welcome-panel,
    .metric-card,
    .activity-panel,
    .quick-panel,
    .categories-panel,
    .settings-section-block,
    .settings-form-header,
    .settings-grid,
    .invoice-list-header,
    .warehouse-section-header,
    .payroll-hero,
    .general-logs-hero,
    .general-log-detail-hero {
        padding-inline: 14px;
    }

    .topbar {
        gap: 6px;
    }

    .mobile-menu-button,
    .theme-button,
    .user-profile-button,
    .online-users-button,
    .fivem-users-button {
        min-width: 40px;
    }

    .profile-menu,
    .online-users-panel {
        left: 8px;
        right: 8px;
        width: auto;
    }

    .metric-card,
    .activity-item,
    .notification-item,
    .account-operation-leading {
        grid-template-columns: minmax(0, 1fr);
    }

    .table-shell table,
    .responsive-table table,
    .backup-history table {
        min-width: 560px;
    }
}

/* Mobile viewport overflow fix — v4.45.4 */
@media (max-width: 760px) {
    html,
    body,
    .app-shell,
    .app-main,
    .topbar,
    .main-content,
    #dashboardLiveContainer {
        width: 100%;
        max-width: 100%;
    }

    .app-shell,
    .app-main,
    .main-content,
    #dashboardLiveContainer,
    .dashboard-hero,
    .dashboard-metrics,
    .dashboard-primary-grid,
    .dashboard-attention-panel,
    .dashboard-quick-panel,
    .dashboard-activity-panel {
        overflow-x: clip;
    }

    .topbar {
        justify-content: flex-start;
        overflow: hidden;
    }

    .topbar-left {
        flex: 0 0 auto;
        max-width: 44px;
    }

    .page-context {
        display: none;
    }

    .topbar-actions {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        overflow: hidden;
    }

    .topbar-actions > * {
        flex: 0 0 auto;
    }

    .global-balance-reminder .topbar-balance-reminder-copy,
    .topbar-balance-reminder-copy {
        display: none !important;
    }

    .topbar-balance-reminder {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
        padding: 0;
        gap: 0;
    }

    .global-balance-reminder-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .notification-control,
    .profile-menu-control,
    .online-users-control {
        min-width: 0;
    }

    .notification-bell-button,
    .online-users-button,
    .fivem-users-button,
    .user-profile-button,
    .mobile-menu-button {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
        padding-inline: 0;
        justify-content: center;
    }

    .online-users-count {
        min-width: 0;
    }

    .user-profile-button .avatar {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    .profile-menu-chevron {
        display: none;
    }

    .dashboard-hero,
    .dashboard-metrics .dashboard-metric,
    .dashboard-attention-panel,
    .dashboard-quick-panel,
    .dashboard-activity-panel {
        width: 100%;
        max-width: 100%;
    }

    .dashboard-hero h1,
    .dashboard-hero p,
    .dashboard-metrics .metric-copy,
    .dashboard-metrics .metric-copy small,
    .dashboard-metrics .metric-copy strong,
    .dashboard-metrics .metric-copy span,
    .dashboard-item-copy,
    .dashboard-item-copy strong,
    .dashboard-item-copy small,
    .dashboard-quick-action strong,
    .dashboard-quick-action small {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .topbar {
        height: 58px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .topbar-actions {
        gap: 5px;
    }

    .main-content {
        padding: 10px 8px 22px;
    }

    .dashboard-hero {
        padding: 18px 14px;
        margin-bottom: 14px;
        border-radius: 14px;
    }

    .dashboard-hero h1 {
        font-size: clamp(24px, 7.4vw, 29px);
        line-height: 1.08;
    }

    .dashboard-hero p {
        font-size: 14px;
        line-height: 1.45;
    }

    .dashboard-metrics {
        gap: 10px;
        margin-bottom: 14px;
    }

    .dashboard-metrics .dashboard-metric {
        min-height: 96px;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .dashboard-metrics .dashboard-metric::after {
        right: -40px;
        bottom: -46px;
        width: 86px;
        height: 86px;
    }

    .dashboard-metrics .metric-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .dashboard-metrics .metric-copy strong {
        font-size: 24px;
    }

    .dashboard-primary-grid {
        gap: 14px;
        margin-bottom: 14px;
    }

    .dashboard-attention-panel,
    .dashboard-quick-panel,
    .dashboard-activity-panel {
        padding: 15px;
        border-radius: 15px;
    }

    .dashboard-attention-panel .panel-header,
    .dashboard-quick-panel .panel-header,
    .dashboard-activity-panel .panel-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .dashboard-attention-item,
    .dashboard-quick-action {
        min-height: 70px;
        gap: 11px;
        padding: 12px;
        border-radius: 13px;
    }

    .dashboard-item-icon,
    .dashboard-quick-action .dashboard-item-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}

@media (max-width: 380px) {
    .online-users-control.fivem-users-control {
        display: none;
    }

    .topbar-actions {
        gap: 4px;
    }

    .notification-bell-button,
    .online-users-button,
    .fivem-users-button,
    .user-profile-button,
    .mobile-menu-button,
    .topbar-balance-reminder {
        width: 38px;
        min-width: 38px;
    }
}


/* Mobile topbar dropdown access fix — v4.45.5 */
@media (max-width: 760px) {
    .topbar {
        overflow-x: clip;
        overflow-y: visible;
    }

    .topbar-actions {
        overflow: visible;
    }

    .notification-panel,
    .profile-menu,
    .online-users-panel {
        position: fixed;
        top: calc(var(--topbar-height) + max(8px, env(safe-area-inset-top)));
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        width: auto;
        max-width: none;
        max-height: calc(100dvh - var(--topbar-height) - 18px);
        z-index: 140;
    }

    .notification-dropdown-list,
    .online-users-list {
        max-height: min(420px, calc(100dvh - var(--topbar-height) - 118px));
    }

    .profile-menu {
        max-height: calc(100dvh - var(--topbar-height) - 18px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-menu-control,
    .notification-control,
    .online-users-control {
        position: static;
    }
}

/* Invoice mobile editor workflow — v4.45.6 */
.invoice-mobile-switch,
.invoice-mobile-footer {
    display: none;
}

@media (max-width: 760px) {
    .invoice-editor-page {
        padding-bottom: 88px;
    }

    .invoice-editor-grid {
        display: block;
    }

    .invoice-mobile-switch {
        position: sticky;
        top: calc(var(--topbar-height, 68px) + 8px);
        z-index: 45;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 0 12px;
        padding: 6px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(14px);
    }

    .invoice-mobile-switch button {
        min-width: 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: var(--text-muted);
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        font-weight: 800;
        cursor: pointer;
    }

    .invoice-mobile-switch button.active {
        color: var(--text);
        border-color: var(--accent);
        background: var(--accent-soft);
    }

    .invoice-mobile-switch span {
        min-width: 24px;
        height: 24px;
        display: inline-grid;
        place-items: center;
        padding: 0 7px;
        color: var(--surface);
        border-radius: 999px;
        background: var(--accent);
        font-size: 12px;
    }

    .invoice-editor-grid [data-invoice-pane] {
        display: none;
    }

    .invoice-editor-grid [data-invoice-pane].active {
        display: block;
    }

    .invoice-catalog-panel,
    .invoice-cart-panel {
        min-width: 0;
        width: 100%;
    }

    .invoice-catalog-tools {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .invoice-product-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .invoice-product-card {
        min-height: 78px;
        grid-template-columns: 42px minmax(0, 1fr) auto 38px;
        gap: 10px;
        padding: 12px;
        border-radius: 15px;
    }

    .invoice-product-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .invoice-product-copy strong {
        font-size: 13px;
        line-height: 1.3;
    }

    .invoice-product-copy small,
    .invoice-package-preview {
        font-size: 10px;
        line-height: 1.45;
    }

    .invoice-product-price {
        align-self: center;
        font-size: 13px;
        white-space: nowrap;
    }

    .invoice-product-add {
        width: 36px;
        height: 36px;
        align-self: center;
    }

    .invoice-cart-items {
        padding: 12px;
        gap: 10px;
    }

    .invoice-cart-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "copy remove"
            "quantity price";
        gap: 10px 12px;
        align-items: center;
        padding: 13px;
        border-radius: 15px;
    }

    .invoice-cart-copy {
        grid-area: copy;
    }

    .invoice-quantity-control {
        grid-area: quantity;
        width: max-content;
        grid-template-columns: 42px 56px 42px;
        border-radius: 12px;
    }

    .invoice-quantity-control button,
    .invoice-quantity-control .invoice-quantity-input {
        height: 40px;
        font-size: 15px;
    }

    .invoice-cart-line-total {
        grid-area: price;
        min-width: 0;
        text-align: right;
        font-size: 14px;
    }

    .invoice-cart-remove {
        grid-area: remove;
        width: 40px;
        height: 40px;
        border-color: var(--border);
        border-radius: 12px;
        font-size: 20px;
    }

    .invoice-discount-note {
        padding: 14px;
    }

    .invoice-totals {
        padding: 4px 14px 8px;
    }

    .invoice-editor-actions {
        grid-template-columns: 1fr;
        padding: 12px 14px 16px;
    }

    .invoice-mobile-footer {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 120;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        box-shadow: 0 18px 44px rgb(0 0 0 / .26);
        backdrop-filter: blur(16px);
    }

    .invoice-mobile-footer-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .invoice-mobile-footer-copy span {
        color: var(--text-muted);
        font-size: 11px;
    }

    .invoice-mobile-footer-copy > strong {
        color: var(--blue-600);
        font-size: 18px;
    }

    .dark .invoice-mobile-footer-copy > strong {
        color: var(--brand-accent-200);
    }

    .invoice-mobile-footer .primary-button {
        min-height: 46px;
        padding-inline: 14px;
        white-space: nowrap;
    }
}

@media (max-width: 430px) {
    .invoice-product-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        grid-template-areas:
            "icon copy add"
            "icon price add";
    }

    .invoice-product-icon {
        grid-area: icon;
    }

    .invoice-product-copy {
        grid-area: copy;
    }

    .invoice-product-price {
        grid-area: price;
        justify-self: start;
    }

    .invoice-product-add {
        grid-area: add;
    }

    .invoice-mobile-footer {
        grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
    }
}

/* Company contracts module — v4.46.7 */
.company-contracts-hero .invoice-hero-main,
.company-contracts-top-actions,
.company-contract-actions,
.company-contract-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.company-contracts-hero .invoice-hero-main,
.company-contract-card-header,
.company-contracts-list-header {
    justify-content: space-between;
}

.company-contracts-top-actions {
    flex-wrap: wrap;
}

.company-contracts-top-actions .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.company-contracts-hero {
    margin-bottom: 18px;
}

.company-contracts-hero + .small-info-panel,
.company-contracts-hero + #companyContractsLiveContainer,
.company-contracts-hero + .construction-panel,
.small-info-panel + #companyContractsLiveContainer {
    display: block;
    margin-top: 18px;
}

.company-contracts-list-panel {
    overflow: hidden;
    padding: 0;
}

.company-contracts-list-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.company-contracts-list-header h2 {
    margin-bottom: 6px;
}

.company-contracts-list-header p {
    margin: 0;
    color: var(--text-secondary);
}

.company-contracts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 16px 0;
}

.company-contract-card {
    display: grid;
    gap: 15px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--page-bg)), var(--surface)),
        var(--surface);
    box-shadow: 0 14px 34px rgb(0 0 0 / 0.12);
}

.company-contract-card-header {
    align-items: flex-start;
    min-width: 0;
}

.company-contract-card-title {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.company-contract-card-title .status-badge {
    justify-self: start;
}

.company-contract-card-header h3 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 1.08rem;
    line-height: 1.2;
}

.company-contract-card-header small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.company-contract-card-header small .icon {
    width: 15px;
    height: 15px;
}

.company-contract-open-button {
    flex: 0 0 auto;
    min-width: 116px;
    justify-content: center;
}

.company-contract-url-wrap {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.company-contract-url-wrap > span {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.company-contract-url {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 0.78rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-contract-preview {
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-soft);
    overflow: hidden;
}

.company-contract-preview summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0 1rem;
    cursor: pointer;
    color: var(--text);
    font-weight: 850;
    list-style: none;
}

.company-contract-preview summary::-webkit-details-marker {
    display: none;
}

.company-contract-preview summary:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.company-contract-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.78rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.company-contract-preview-expand {
    flex: 0 0 auto;
}

.company-contract-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(0 0 0 / 0.72);
    backdrop-filter: blur(4px);
}

.company-contract-preview-modal.hidden {
    display: none;
}

.company-contract-preview-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1480px, 96vw);
    height: min(900px, 92vh);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgb(0 0 0 / 0.42);
}

.company-contract-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}

.company-contract-preview-modal-header h2 {
    margin: 0.15rem 0 0;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.company-contract-preview-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.company-contract-preview-modal-actions [data-company-contract-preview-close] {
    min-width: 44px;
    padding-inline: 0.9rem;
    font-size: 1.35rem;
    line-height: 1;
}

.company-contract-preview-modal-body {
    min-height: 0;
    background: #f5f6f8;
}

.company-contract-preview-modal-frame,
.company-contract-preview-modal-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #f5f6f8;
}

.company-contract-preview-modal-image {
    object-fit: contain;
    padding: 18px;
    box-sizing: border-box;
}

.company-contract-iframe,
.company-contract-image-preview img {
    display: block;
    width: 100%;
    min-height: clamp(420px, 58vh, 680px);
    border: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.company-contract-image-preview img {
    height: auto;
    min-height: 0;
    max-height: 460px;
    object-fit: contain;
}

.company-contract-preview-fallback {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 64px;
    padding: 0.95rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.company-contract-preview-fallback p {
    margin: 0;
    line-height: 1.45;
}

.company-contract-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 2px;
    padding-top: 2px;
}

.company-contract-actions form {
    margin: 0;
}

.company-contract-form-page {
    display: grid;
    gap: 18px;
}

.company-contract-form-hero .account-form-profile {
    width: 100%;
}

.company-contract-editor-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.42fr);
}

.company-contract-editor-grid .form-field-full {
    grid-column: 1 / -1;
}

.company-contract-editor-actions {
    align-items: center;
}

.compact-button {
    white-space: nowrap;
}

.small-info-panel p {
    margin: 0;
    color: var(--text-secondary);
}


.company-contract-editor {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}

.company-contract-editor .editor-section {
    padding: 28px 30px;
}

.company-contract-editor .form-field {
    align-content: start;
}

.company-contract-editor .form-field > span {
    font-size: 12px;
}

.company-contract-editor .form-field input,
.company-contract-editor .form-field select {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--text);
    box-sizing: border-box;
}

.company-contract-editor .form-field small {
    line-height: 1.4;
}

@media (max-width: 760px) {
    .company-contract-editor .editor-section {
        padding: 22px 18px;
    }

    .company-contract-editor-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .company-contract-editor-actions .editor-actions-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .company-contract-editor-actions .editor-actions-buttons > * {
        width: 100%;
    }

    .company-contracts-hero .invoice-hero-main,
    .company-contract-card-header,
    .company-contract-actions,
    .company-contracts-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .company-contracts-top-actions,
    .company-contract-actions form,
    .company-contract-actions button,
    .company-contract-actions a,
    .company-contract-card-header > a {
        width: 100%;
    }

    .company-contracts-list-header {
        padding-inline: 18px;
    }

    .company-contract-editor-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .company-contracts-grid {
        padding-inline: 12px;
    }

    .company-contract-card {
        padding: 14px;
        border-radius: 16px;
        box-shadow: none;
    }

    .company-contract-url {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .company-contract-iframe {
        min-height: 360px;
    }

    .company-contract-preview-toolbar,
    .company-contract-preview-modal-header,
    .company-contract-preview-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .company-contract-preview-modal {
        padding: 0;
    }

    .company-contract-preview-modal-card {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .company-contract-preview-modal-actions,
    .company-contract-preview-modal-actions > * {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .company-contract-editor .editor-section {
        padding: 20px 16px;
    }

    .company-contract-editor-actions .editor-actions-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .company-contracts-list-header {
        padding-inline: 14px;
    }

    .company-contracts-grid {
        padding-inline: 10px;
    }

    .company-contract-card {
        padding: 12px;
        border-radius: 14px;
    }

    .company-contract-preview summary {
        min-height: 46px;
        padding-inline: 0.85rem;
    }

    .company-contract-iframe {
        min-height: 320px;
    }
}

/* Phone directory module — v4.48.3 */
.phone-directory-hero .invoice-hero-main,
.phone-directory-top-actions,
.phone-directory-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}

.phone-directory-top-actions {
    flex-wrap: wrap;
}

.phone-directory-top-actions .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.phone-directory-hero {
    margin-bottom: 18px;
}

.phone-directory-hero + .small-info-panel,
.phone-directory-hero + #phoneDirectoryLiveContainer,
.phone-directory-hero + .construction-panel,
.small-info-panel + #phoneDirectoryLiveContainer {
    display: block;
    margin-top: 18px;
}

.phone-directory-list-panel {
    overflow: hidden;
    padding: 0;
}

.phone-directory-list-header {
    padding: 24px 24px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.phone-directory-list-header h2 {
    margin-bottom: 6px;
}

.phone-directory-list-header p {
    margin: 0;
    color: var(--text-secondary);
}


.phone-directory-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: min(100%, 460px);
    flex-wrap: wrap;
}

.phone-directory-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(100%, 280px);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-secondary);
}

.phone-directory-search-field .icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.phone-directory-search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.phone-directory-search-field input::placeholder {
    color: var(--text-muted);
}

.phone-directory-table {
    padding: 16px;
}

.phone-directory-table-head,
.phone-directory-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(220px, auto);
    gap: 12px;
    align-items: center;
}

.phone-directory-table-head {
    padding: 0 14px 10px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phone-directory-rows {
    display: grid;
    gap: 8px;
}

.phone-directory-row {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, var(--page-bg)), var(--surface));
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
}

.phone-directory-person,
.phone-directory-type {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.phone-directory-person strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-directory-person small,
.phone-directory-type small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-directory-person small .icon,
.phone-directory-type small .icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
}

.phone-directory-number-cell {
    min-width: 0;
}

.phone-directory-number-copy {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.phone-directory-number-copy:hover,
.phone-directory-number-copy:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-soft));
    outline: 0;
    transform: translateY(-1px);
}

.phone-directory-number-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-directory-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.phone-directory-actions form {
    margin: 0;
}

.phone-directory-actions .compact-button {
    min-height: 38px;
    padding-block: 0.48rem;
    white-space: nowrap;
}

.phone-directory-form-page {
    display: grid;
    gap: 18px;
}

.phone-directory-form-hero .account-form-profile {
    width: 100%;
}

.phone-directory-editor-grid {
    grid-template-columns: minmax(260px, 0.65fr) minmax(260px, 1fr);
}

.phone-directory-editor-grid .form-field-full {
    grid-column: 1 / -1;
}

.phone-directory-editor {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}

.phone-directory-editor .editor-section {
    padding: 28px 30px;
}

.phone-directory-editor .form-field {
    align-content: start;
}

.phone-directory-editor .form-field > span {
    font-size: 12px;
}

.phone-directory-editor .form-field input,
.phone-directory-editor .form-field select {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--text);
    box-sizing: border-box;
}

.phone-directory-editor .form-field small {
    line-height: 1.4;
}

.phone-directory-editor-actions {
    align-items: center;
}

@media (max-width: 980px) {
    .phone-directory-table-head {
        display: none;
    }

    .phone-directory-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px 12px;
    }

    .phone-directory-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .phone-directory-editor .editor-section {
        padding: 22px 18px;
    }

    .phone-directory-editor-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .phone-directory-editor-actions .editor-actions-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .phone-directory-editor-actions .editor-actions-buttons > * {
        width: 100%;
    }

    .phone-directory-hero .invoice-hero-main,
    .phone-directory-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .phone-directory-top-actions,
    .phone-directory-search {
        width: 100%;
    }

    .phone-directory-search {
        justify-content: flex-start;
    }

    .phone-directory-list-header {
        padding-inline: 18px;
    }

    .phone-directory-editor-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .phone-directory-table {
        padding-inline: 12px;
    }

    .phone-directory-row {
        grid-template-columns: 1fr;
        padding: 13px;
        border-radius: 14px;
        box-shadow: none;
    }

    .phone-directory-person strong,
    .phone-directory-person small,
    .phone-directory-type small,
    .phone-directory-number-copy span {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .phone-directory-search-field,
    .phone-directory-search button,
    .phone-directory-search a,
    .phone-directory-number-copy,
    .phone-directory-actions,
    .phone-directory-actions form,
    .phone-directory-actions button,
    .phone-directory-actions a {
        width: 100%;
    }

    .phone-directory-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .phone-directory-editor .editor-section {
        padding: 20px 16px;
    }

    .phone-directory-editor-actions .editor-actions-buttons {
        grid-template-columns: 1fr;
    }

    .phone-directory-table {
        padding-inline: 10px;
    }
}

/* Inspection terms module — v4.48.3 */
.inspection-terms-hero .invoice-hero-main,
.inspection-terms-top-actions,
.inspection-terms-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inspection-terms-hero .invoice-hero-main,
.inspection-terms-list-header {
    justify-content: space-between;
}

.inspection-terms-top-actions {
    flex-wrap: wrap;
}

.inspection-terms-top-actions .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.inspection-terms-hero {
    margin-bottom: 18px;
}

.inspection-terms-hero + .small-info-panel,
.inspection-terms-hero + #inspectionTermsLiveContainer,
.inspection-terms-hero + .construction-panel,
.small-info-panel + #inspectionTermsLiveContainer {
    display: block;
    margin-top: 18px;
}

.inspection-terms-list-panel {
    overflow: hidden;
    padding: 0;
}

.inspection-terms-list-header {
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--border);
}

.inspection-terms-list-header h2 {
    margin: 0.15rem 0;
}

.inspection-terms-list-header p {
    margin: 0;
    color: var(--muted);
}

.inspection-terms-table {
    --inspection-terms-actions-column: 240px;
    padding: 1rem;
}

.inspection-terms-table-head,
.inspection-terms-row {
    display: grid;
    grid-template-columns: 150px minmax(260px, 1fr) 190px var(--inspection-terms-actions-column);
    gap: 1rem;
    align-items: center;
}

.inspection-terms-table-head {
    padding: 0 0.95rem 0.7rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.inspection-terms-table-head span:nth-child(3),
.inspection-terms-next-date {
    justify-self: start;
}

.inspection-terms-table-head span:nth-child(4),
.inspection-terms-actions {
    justify-self: end;
}

.inspection-terms-rows {
    display: grid;
    gap: 0.75rem;
}

.inspection-terms-row {
    padding: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.inspection-terms-date strong,
.inspection-terms-next-date strong,
.inspection-terms-type strong {
    color: var(--text);
    font-size: 0.95rem;
}

.inspection-terms-type small {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    line-height: 1.45;
}

.inspection-terms-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.inspection-terms-actions form {
    margin: 0;
}

.inspection-terms-actions .compact-button {
    min-height: 38px;
    padding: 0.5rem 0.75rem;
}

.inspection-terms-form-page {
    display: grid;
    gap: 1rem;
}

.inspection-terms-form-hero .account-form-profile {
    margin-top: 1rem;
}

.inspection-terms-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inspection-terms-editor-grid .form-field-full {
    grid-column: 1 / -1;
}

.inspection-terms-editor textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
}

@media (max-width: 980px) {
    .inspection-terms-table-head {
        display: none;
    }

    .inspection-terms-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .inspection-terms-actions {
        justify-content: flex-start;
    }

    .inspection-terms-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .inspection-terms-hero .invoice-hero-main,
    .inspection-terms-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .inspection-terms-top-actions {
        width: 100%;
    }

    .inspection-terms-top-actions > *,
    .inspection-terms-actions,
    .inspection-terms-actions form,
    .inspection-terms-actions button,
    .inspection-terms-actions a {
        width: 100%;
    }

    .inspection-terms-actions {
        align-items: stretch;
    }
}

/* Sanepid books module — v4.49.3 */
.sanepid-books-hero .invoice-hero-main,
.sanepid-books-top-actions,
.sanepid-books-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sanepid-books-hero .invoice-hero-main,
.sanepid-books-list-header {
    justify-content: space-between;
}

.sanepid-books-top-actions {
    flex-wrap: wrap;
}

.sanepid-books-top-actions .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.sanepid-books-hero {
    margin-bottom: 18px;
}

.sanepid-books-hero + .small-info-panel,
.sanepid-books-hero + #sanepidBooksLiveContainer,
.sanepid-books-hero + .construction-panel,
.small-info-panel + #sanepidBooksLiveContainer {
    display: block;
    margin-top: 18px;
}

.sanepid-books-list-panel {
    overflow: hidden;
    padding: 0;
}

.sanepid-books-list-header {
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--border);
}

.sanepid-books-list-header h2 {
    margin: 0.15rem 0;
}

.sanepid-books-list-header p {
    margin: 0;
    color: var(--muted);
}

.sanepid-books-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sanepid-books-search-field {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: min(360px, 100%);
    min-height: 42px;
    padding: 0 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.sanepid-books-search-field .icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.sanepid-books-search-field input {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: 0;
}

.sanepid-books-table {
    padding: 1rem;
}

.sanepid-books-table-head,
.sanepid-books-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(130px, 0.32fr) minmax(250px, auto);
    gap: 1rem;
    align-items: center;
}

.sanepid-books-table-head {
    padding: 0 0.95rem 0.7rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sanepid-books-table-head span:last-child,
.sanepid-books-actions {
    justify-self: end;
}

.sanepid-books-rows {
    display: grid;
    gap: 0.75rem;
}

.sanepid-books-row {
    padding: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.sanepid-books-person {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.sanepid-books-person strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sanepid-books-person small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.sanepid-books-person small .icon {
    width: 14px;
    height: 14px;
}

.sanepid-books-preview-cell,
.sanepid-books-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sanepid-books-actions {
    justify-content: flex-end;
}

.sanepid-books-actions form {
    margin: 0;
}

.sanepid-books-form-page {
    display: grid;
    gap: 1rem;
}

.sanepid-books-form-hero .account-form-profile {
    margin-top: 1rem;
}

.sanepid-books-editor-grid {
    grid-template-columns: 1fr;
}

.sanepid-upload-field {
    gap: 0.8rem;
}

.sanepid-upload-box {
    position: relative;
    display: grid;
    place-items: center;
    gap: 0.5rem;
    min-height: 190px;
    padding: 1.35rem;
    border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 6%, var(--surface-soft));
    text-align: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sanepid-upload-box:hover,
.sanepid-upload-field.is-dragover .sanepid-upload-box {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-soft));
    transform: translateY(-1px);
}

.sanepid-upload-box input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.sanepid-upload-icon .icon,
.sanepid-upload-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.sanepid-upload-box strong {
    color: var(--text);
}

.sanepid-upload-box small,
.sanepid-upload-preview span {
    color: var(--muted);
}

.sanepid-upload-preview {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.sanepid-upload-preview img {
    width: 120px;
    height: 86px;
    border-radius: 10px;
    object-fit: contain;
    background: color-mix(in srgb, var(--page-bg) 65%, #000);
}

.sanepid-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.72);
}

.sanepid-preview-modal.hidden {
    display: none;
}

.sanepid-preview-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(980px, calc(100vw - 44px));
    height: min(86vh, 820px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.sanepid-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.sanepid-preview-modal-header h2 {
    margin: 0.15rem 0 0;
}

.sanepid-preview-modal-body {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 1rem;
    overflow: auto;
    background: color-mix(in srgb, var(--page-bg) 72%, #000);
}

.sanepid-preview-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 900px) {
    .sanepid-books-table-head {
        display: none;
    }

    .sanepid-books-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .sanepid-books-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .sanepid-books-hero .invoice-hero-main,
    .sanepid-books-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .sanepid-books-top-actions,
    .sanepid-books-search,
    .sanepid-books-search-field,
    .sanepid-books-search button,
    .sanepid-books-search a,
    .sanepid-books-top-actions > *,
    .sanepid-books-preview-cell,
    .sanepid-books-preview-cell button,
    .sanepid-books-actions,
    .sanepid-books-actions form,
    .sanepid-books-actions button,
    .sanepid-books-actions a {
        width: 100%;
    }

    .sanepid-books-actions {
        align-items: stretch;
    }

    .sanepid-books-table {
        padding-inline: 12px;
    }

    .sanepid-books-row {
        padding: 13px;
        border-radius: 14px;
    }

    .sanepid-books-person strong,
    .sanepid-books-person small {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .sanepid-upload-preview {
        grid-template-columns: 1fr;
    }

    .sanepid-upload-preview img {
        width: 100%;
        height: 180px;
    }

    .sanepid-preview-modal {
        padding: 0;
    }

    .sanepid-preview-modal-card {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }
}

/* Document invoices module — v4.50.3 */
.document-invoices-hero .invoice-hero-main,
.document-invoices-top-actions,
.document-invoices-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-invoices-hero .invoice-hero-main,
.document-invoices-list-header {
    justify-content: space-between;
}

.document-invoices-top-actions {
    flex-wrap: wrap;
}

.document-invoices-top-actions .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.document-invoices-hero {
    margin-bottom: 18px;
}

.document-invoices-hero + .construction-panel,
.document-invoices-hero + #documentInvoicesLiveContainer {
    display: block;
    margin-top: 18px;
}

.document-invoices-list-panel {
    overflow: hidden;
    padding: 0;
}

.document-invoices-list-header {
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--border);
}

.document-invoices-list-header h2 {
    margin: 0.15rem 0;
}

.document-invoices-list-header p {
    margin: 0;
    color: var(--muted);
}

.document-invoices-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.document-invoices-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: min(360px, 100%);
    min-height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.document-invoices-search-field .icon {
    width: 17px;
    color: var(--muted);
}

.document-invoices-search-field input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: 0;
}

.document-invoices-table {
    padding: 1rem;
}

.document-invoices-table-head,
.document-invoices-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) 180px 140px 140px minmax(280px, auto);
    gap: 1rem;
    align-items: center;
}

.document-invoices-table-head {
    padding: 0 0.95rem 0.7rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.document-invoices-table-head span:last-child,
.document-invoices-actions {
    justify-self: end;
}

.document-invoices-rows {
    display: grid;
    gap: 0.75rem;
}

.document-invoices-row {
    padding: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.document-invoices-main,
.document-invoices-date {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.document-invoices-main strong,
.document-invoices-main small,
.document-invoices-date strong,
.document-invoices-date small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-invoices-main small,
.document-invoices-date small {
    color: var(--muted);
}

.document-invoices-date small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.document-invoices-date small .icon {
    width: 14px;
    height: 14px;
}

.document-invoices-total strong {
    color: var(--accent);
    font-size: 1rem;
}

.document-invoices-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.document-invoices-actions form {
    margin: 0;
}

.status-badge.status-badge-success,
.status-badge-success {
    background: rgb(22 101 52 / 0.28);
    color: #4ade80;
}

.status-badge.status-badge-warning,
.status-badge-warning {
    background: rgb(146 64 14 / 0.28);
    color: #fcd34d;
}

.status-badge.status-badge-danger,
.status-badge-danger {
    background: rgb(127 29 29 / 0.30);
    color: #fca5a5;
}

.document-invoices-form-page {
    display: grid;
    gap: 18px;
}

.document-invoices-form-hero .account-form-profile {
    width: 100%;
}

.document-invoices-editor {
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}

.document-invoices-editor .editor-section {
    padding: 28px 30px;
}

.document-invoices-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-invoices-editor-grid .form-field-full {
    grid-column: 1 / -1;
}

.document-invoices-editor textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
}

.document-invoice-items-section {
    border-top: 1px solid var(--border);
}

.document-invoice-items {
    display: grid;
    gap: 0.65rem;
}

.document-invoice-items-head,
.document-invoice-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 110px 150px 140px auto;
    gap: 0.75rem;
    align-items: center;
}

.document-invoice-items-head {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.document-invoice-item-row {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.document-invoice-item-row label {
    min-width: 0;
}

.document-invoice-item-row input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 88%, #000 12%);
    color: var(--text);
    font: inherit;
    outline: 0;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.document-invoice-item-row input::placeholder {
    color: var(--muted);
    opacity: 0.86;
}

.document-invoice-item-row input:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.document-invoice-item-row > strong {
    color: var(--accent);
    white-space: nowrap;
}

.document-invoice-items-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.document-invoice-grand-total {
    display: grid;
    gap: 0.25rem;
    min-width: 220px;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    text-align: right;
}

.document-invoice-grand-total small {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.document-invoice-grand-total strong {
    color: var(--accent);
    font-size: 1.35rem;
}

.document-invoice-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgb(0 0 0 / 0.72);
}

.document-invoice-preview-modal.hidden {
    display: none;
}

.document-invoice-preview-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1100px, 100%);
    height: min(88vh, 900px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgb(0 0 0 / 0.42);
}

.document-invoice-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border);
}

.document-invoice-preview-modal-header h2 {
    margin: 0.15rem 0 0;
}

.document-invoice-preview-modal-body,
.document-invoice-preview-frame {
    width: 100%;
    height: 100%;
}

.document-invoice-preview-frame {
    border: 0;
    background: #f8fafc;
}

@media (max-width: 1100px) {
    .document-invoices-table-head {
        display: none;
    }

    .document-invoices-row {
        grid-template-columns: minmax(0, 1fr) minmax(140px, 0.6fr);
    }

    .document-invoices-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .document-invoices-hero .invoice-hero-main,
    .document-invoices-list-header,
    .document-invoice-items-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .document-invoices-top-actions,
    .document-invoices-search,
    .document-invoices-search-field,
    .document-invoices-search button,
    .document-invoices-search a,
    .document-invoices-actions,
    .document-invoices-actions form,
    .document-invoices-actions button,
    .document-invoices-actions a {
        width: 100%;
    }

    .document-invoices-row,
    .document-invoices-editor-grid,
    .document-invoice-item-row {
        grid-template-columns: 1fr;
    }

    .document-invoices-editor .editor-section {
        padding: 22px 18px;
    }

    .document-invoice-items-head {
        display: none;
    }

    .document-invoice-grand-total {
        width: 100%;
        text-align: left;
    }

    .document-invoice-preview-modal {
        padding: 0;
    }

    .document-invoice-preview-modal-card {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
    }
}

/* Collaboration companies settings — v4.52.4 */
.collaboration-companies-panel {
    overflow: hidden;
}

.collaboration-companies-toolbar,
.company-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.collaboration-companies-toolbar {
    padding: 0 24px 18px;
    border-bottom: 1px solid var(--border);
}

.company-tabs .active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.collaboration-company-create {
    display: grid;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 58%, transparent);
}

.collaboration-company-create-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.55fr) auto;
    align-items: end;
    gap: 14px;
}

.collaboration-companies-panel .settings-field {
    min-width: 0;
}

.collaboration-companies-panel .settings-field input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-sizing: border-box;
}

.collaboration-companies-panel .settings-field input[type="text"]:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.collaboration-company-status-field {
    align-content: start;
}

.collaboration-company-status-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 44px;
}

.collaboration-company-status-options label {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.collaboration-company-status-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.collaboration-company-status-options span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-secondary);
    font-weight: 800;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.collaboration-company-status-options input:checked + span {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    color: var(--text);
}

.collaboration-company-status-options label:hover span,
.collaboration-company-status-options input:focus-visible + span {
    border-color: var(--accent);
    color: var(--text);
    outline: 0;
}

.collaboration-company-status-options label:hover span {
    transform: translateY(-1px);
}

.collaboration-companies-list {
    display: grid;
    gap: 12px;
    padding: 18px 20px 22px;
}

.collaboration-companies-table {
    display: grid;
    gap: 10px;
}

.collaboration-companies-head,
.collaboration-company-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(140px, 0.32fr) minmax(280px, auto);
    gap: 16px;
    align-items: center;
}

.collaboration-companies-head {
    padding: 0 14px 4px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.collaboration-company-row {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.collaboration-company-row:hover {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
}

.collaboration-company-name {
    min-width: 0;
}

.collaboration-company-name strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collaboration-company-status-cell {
    display: flex;
    align-items: center;
}

.collaboration-company-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.collaboration-company-row-actions form {
    margin: 0;
}

.collaboration-company-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 1850;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(2 8 23 / 0.74);
    backdrop-filter: blur(5px);
}

.collaboration-company-edit-modal.hidden {
    display: none;
}

.collaboration-company-edit-card {
    width: min(560px, 100%);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-strong);
}

.collaboration-company-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 64%, var(--surface));
}

.collaboration-company-edit-header h3 {
    margin: 3px 0 4px;
    color: var(--text);
    font-size: 1.15rem;
}

.collaboration-company-edit-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.collaboration-company-edit-form {
    display: grid;
    gap: 16px;
    padding: 20px 22px 22px;
}

.collaboration-company-edit-form .modal-actions {
    justify-content: flex-end;
    margin-top: 2px;
}

.collaboration-company-warning {
    margin: 12px 0 0;
}

.collaboration-company-card select {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--text);
}

@media (max-width: 980px) {
    .collaboration-company-create-grid,
    .collaboration-companies-head,
    .collaboration-company-row {
        grid-template-columns: 1fr;
    }

    .collaboration-companies-head {
        display: none;
    }

    .collaboration-company-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .collaboration-companies-toolbar,
    .collaboration-company-create,
    .collaboration-companies-list {
        padding-inline: 16px;
    }

    .collaboration-company-status-options {
        grid-template-columns: 1fr;
    }

    .collaboration-company-row-actions,
    .collaboration-company-row-actions form,
    .collaboration-company-row-actions button,
    .company-tabs,
    .company-tabs a,
    .collaboration-company-edit-form .modal-actions,
    .collaboration-company-edit-form .modal-actions > * {
        width: 100%;
    }

    .collaboration-company-edit-modal,
    .collaboration-company-employees-modal {
        padding: 0;
    }

    .collaboration-company-edit-card,
    .collaboration-company-employees-card {
        width: 100%;
        max-height: none;
        min-height: 100dvh;
        border-radius: 0;
    }

    .company-employees-modal-body {
        padding: 16px;
    }
}

/* Collaboration invoice calculator — v4.52.3 */
.management-collaboration-hero .invoice-hero-main,
.management-collaboration-actions,
.collaboration-invoice-date-grid,
.collaboration-invoice-form .modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.management-collaboration-hero .invoice-hero-main {
    justify-content: space-between;
}

.management-collaboration-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.collaboration-invoice-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(2 8 23 / 0.74);
    backdrop-filter: blur(5px);
}

.collaboration-invoice-modal.hidden {
    display: none;
}

.collaboration-invoice-modal-card {
    position: relative;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 28px 90px rgb(0 0 0 / 0.42);
}

.collaboration-invoice-modal-card .modal-card-header {
    padding: 22px 24px 18px;
    padding-right: 72px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}

.collaboration-invoice-modal-card .modal-card-header h2 {
    margin: 4px 0 8px;
}

.collaboration-invoice-modal-card .modal-card-header p {
    margin: 0;
    color: var(--text-secondary);
}

.collaboration-invoice-modal-card .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.collaboration-invoice-modal-card .modal-close:hover,
.collaboration-invoice-modal-card .modal-close:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: 0;
    transform: translateY(-1px);
}

.collaboration-invoice-modal-body {
    min-height: 0;
    overflow-y: auto;
}

.collaboration-invoice-form {
    display: grid;
    gap: 16px;
    padding: 20px 24px 24px;
}

.collaboration-invoice-form[hidden],
.collaboration-invoice-summary[hidden] {
    display: none !important;
}

.collaboration-invoice-date-grid {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.collaboration-invoice-form .form-field input,
.collaboration-invoice-form .form-field select {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    box-sizing: border-box;
}

.collaboration-invoice-form .form-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.6rem;
}

.collaboration-invoice-form .form-field input:focus,
.collaboration-invoice-form .form-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    outline: none;
}

.collaboration-invoice-form .modal-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
}

.collaboration-invoice-summary {
    display: grid;
    gap: 16px;
    padding: 20px 24px 24px;
}

.collaboration-invoice-summary h3 {
    margin: 0;
    font-size: 1.25rem;
}

.collaboration-invoice-summary-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}

.collaboration-invoice-summary-grid > div {
    display: grid;
    grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.collaboration-invoice-summary-grid dt {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.collaboration-invoice-summary-grid dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    text-align: right;
}

.collaboration-invoice-summary-grid .total {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
    background: color-mix(in srgb, var(--accent) 11%, var(--surface-soft));
}

.collaboration-invoice-summary-grid .total dd {
    color: var(--accent);
    font-size: 1.1rem;
}

.collaboration-invoice-summary-note {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 14px;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    line-height: 1.55;
}

.collaboration-invoice-summary .modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 4px;
}

@media (max-width: 760px) {
    .management-collaboration-hero .invoice-hero-main,
    .management-collaboration-actions,
    .collaboration-invoice-form .modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .management-collaboration-actions,
    .management-collaboration-actions button,
    .collaboration-invoice-form .modal-actions > * {
        width: 100%;
    }

    .collaboration-invoice-date-grid {
        grid-template-columns: 1fr;
    }

    .collaboration-invoice-summary-grid > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .collaboration-invoice-summary-grid dd {
        text-align: left;
    }

    .collaboration-invoice-summary .modal-actions,
    .collaboration-invoice-summary .modal-actions > * {
        width: 100%;
    }
}

/* Recruitment application decision reset — v4.53.0 */
.recruitment-decision-stack {
    display: grid;
    gap: 14px;
}
.recruitment-accept-form {
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.recruitment-accept-form .primary-button,
.recruitment-reject-form .danger-button,
.recruitment-decision-reset-form .warning-button {
    width: 100%;
    justify-content: center;
}
.recruitment-reject-form {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--page-bg) 32%, var(--surface));
}
.recruitment-decision-reset-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Recruitment application category tabs — v4.53.3 */
.recruitment-filter-tabs-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    padding: 18px 20px;
}

.recruitment-status-tabs {
    display: flex;
    gap: 10px;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    margin: -6px -14px -10px;
    padding: 6px 14px 16px;
    scroll-padding-inline: 14px;
    scrollbar-width: thin;
}

.recruitment-status-tabs::after {
    content: "";
    flex: 0 0 24px;
}

.recruitment-status-tab {
    flex: 0 0 auto;
    box-sizing: border-box;
    min-width: max-content;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--page-bg) 38%, var(--surface));
    font-weight: 850;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.recruitment-status-tab:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--gold-500) 56%, var(--border));
    background: color-mix(in srgb, var(--gold-500) 7%, var(--surface));
    transform: translateY(-1px);
}

.recruitment-status-tab.active {
    color: var(--text);
    border-color: var(--gold-500);
    background: linear-gradient(135deg, color-mix(in srgb, var(--gold-500) 20%, var(--surface)), color-mix(in srgb, var(--gold-500) 7%, var(--surface)));
    box-shadow: 0 6px 14px color-mix(in srgb, var(--gold-500) 13%, transparent);
}

.recruitment-status-tab strong {
    min-width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    color: var(--gold-200);
    background: color-mix(in srgb, var(--page-bg) 55%, transparent);
    font-size: .78rem;
    line-height: 1;
}

.recruitment-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.recruitment-search-form .recruitment-filter-field {
    min-width: 0;
}

.recruitment-search-clear {
    min-height: 44px;
    justify-content: center;
    white-space: nowrap;
}

@media(max-width:760px) {
    .recruitment-filter-tabs-panel {
        padding: 16px;
    }

    .recruitment-status-tabs {
        margin: -6px -12px -10px;
        padding: 6px 12px 16px;
        scroll-padding-inline: 12px;
    }

    .recruitment-search-form {
        grid-template-columns: 1fr;
    }

    .recruitment-search-clear {
        width: 100%;
    }
}

/* Management invoice category tabs and compact filters — v4.53.6 */
.management-invoice-filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    padding: 18px 20px;
}

.management-invoice-status-tabs {
    display: flex;
    gap: 10px;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    margin: -6px -14px -10px;
    padding: 6px 14px 16px;
    scroll-padding-inline: 14px;
    scrollbar-width: thin;
}

.management-invoice-status-tabs::after {
    content: "";
    flex: 0 0 24px;
}

.management-invoice-status-tab {
    flex: 0 0 auto;
    box-sizing: border-box;
    min-width: max-content;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--page-bg) 38%, var(--surface));
    font-weight: 850;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.management-invoice-status-tab:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--gold-500) 56%, var(--border));
    background: color-mix(in srgb, var(--gold-500) 7%, var(--surface));
    transform: translateY(-1px);
}

.management-invoice-status-tab.active {
    color: var(--text);
    border-color: var(--gold-500);
    background: linear-gradient(135deg, color-mix(in srgb, var(--gold-500) 20%, var(--surface)), color-mix(in srgb, var(--gold-500) 7%, var(--surface)));
    box-shadow: 0 6px 14px color-mix(in srgb, var(--gold-500) 13%, transparent);
}

.management-invoice-status-tab strong {
    min-width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    color: var(--gold-200);
    background: color-mix(in srgb, var(--page-bg) 55%, transparent);
    font-size: .78rem;
    line-height: 1;
}

.management-invoice-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.management-invoice-search-field {
    min-width: 0;
}

.management-invoice-search-control {
    position: relative;
    display: flex;
    align-items: center;
}

.management-invoice-search-control .icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.management-invoice-search-control input {
    width: 100%;
    padding-left: 42px;
}

.management-invoice-search-clear {
    min-height: 44px;
    justify-content: center;
    white-space: nowrap;
}

.management-invoice-advanced-filters {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--page-bg) 32%, transparent);
    overflow: hidden;
}

.management-invoice-advanced-filters > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--gold-200);
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.management-invoice-advanced-filters > summary::-webkit-details-marker {
    display: none;
}

.management-invoice-advanced-filters > summary::after {
    content: "↓";
    margin-left: auto;
    color: var(--text-muted);
    font-size: .82rem;
}

.management-invoice-advanced-filters[open] > summary::after {
    content: "↑";
}

.management-invoice-advanced-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(145px, .42fr) minmax(145px, .42fr) auto;
    gap: 12px;
    align-items: end;
    padding: 0 15px 15px;
}

.management-invoice-advanced-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 980px) {
    .management-invoice-advanced-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .management-invoice-advanced-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .management-invoice-filter-panel {
        padding: 16px;
    }

    .management-invoice-status-tabs {
        margin: -6px -12px -10px;
        padding: 6px 12px 16px;
        scroll-padding-inline: 12px;
    }

    .management-invoice-search-form,
    .management-invoice-advanced-grid {
        grid-template-columns: 1fr;
    }

    .management-invoice-search-clear,
    .management-invoice-advanced-actions > * {
        width: 100%;
    }

    .management-invoice-advanced-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 4.53.7 — ranking zaakceptowanych rachunków na Pulpicie */
.dashboard-invoice-ranking-panel {
    overflow: hidden;
    padding: 0;
    margin: 0 0 22px;
    border-color: var(--border);
    background: var(--surface);
}

.dashboard-invoice-ranking-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
}

.dashboard-invoice-ranking-heading {
    flex: 1 1 auto;
}

.dashboard-ranking-period-tabs {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
}

.dashboard-ranking-period-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.dashboard-ranking-period-tab:hover,
.dashboard-ranking-period-tab.active {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
    color: var(--accent-strong);
}

.dashboard-ranking-period-label {
    padding: 13px 22px 0;
    color: var(--text-secondary);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-invoice-ranking-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 18px 18px;
    list-style: none;
}

.dashboard-invoice-ranking-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(96px, auto) minmax(120px, auto);
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.dashboard-invoice-ranking-row.is-current-user,
.dashboard-invoice-ranking-full-list li.is-current-user {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface-soft));
}

.dashboard-invoice-ranking-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 13%, var(--surface));
    color: var(--accent-strong);
    font-size: .82rem;
    font-weight: 900;
}

.dashboard-invoice-ranking-person {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.dashboard-invoice-ranking-person strong {
    overflow: hidden;
    color: var(--text);
    font-size: .94rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-invoice-ranking-person small,
.dashboard-invoice-ranking-metric small,
.dashboard-invoice-ranking-amount small {
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 750;
    line-height: 1.25;
}

.dashboard-invoice-ranking-metric,
.dashboard-invoice-ranking-amount {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 0;
    white-space: nowrap;
}

.dashboard-invoice-ranking-metric strong,
.dashboard-invoice-ranking-amount strong {
    color: var(--text);
    font-size: .98rem;
    font-weight: 900;
    line-height: 1.1;
}

.dashboard-invoice-ranking-amount strong {
    color: var(--accent-strong);
}

.dashboard-invoice-ranking-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 18px 14px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.dashboard-invoice-ranking-current span {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-invoice-ranking-current strong {
    color: var(--text);
    text-align: right;
}

.dashboard-invoice-ranking-full {
    margin: 0 18px 18px;
}

.dashboard-invoice-ranking-full summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: .8rem;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.dashboard-invoice-ranking-full summary::-webkit-details-marker {
    display: none;
}

.dashboard-invoice-ranking-full-list {
    display: grid;
    gap: 7px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-invoice-ranking-full-list li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(100px, auto) minmax(120px, auto);
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
}

.dashboard-invoice-ranking-full-list li span {
    color: var(--accent-strong);
    font-size: .76rem;
    font-weight: 900;
}

.dashboard-invoice-ranking-full-list li strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-invoice-ranking-full-list li small {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 750;
    text-align: right;
    white-space: nowrap;
}

.dashboard-invoice-ranking-full-list li b {
    color: var(--accent-strong);
    font-size: .82rem;
    text-align: right;
    white-space: nowrap;
}

.dashboard-invoice-ranking-empty {
    margin: 14px 18px 18px;
    border-top: 0;
}

@media (max-width: 820px) {
    .dashboard-invoice-ranking-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-ranking-period-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .dashboard-ranking-period-tab {
        flex: 1 0 auto;
    }

    .dashboard-invoice-ranking-row,
    .dashboard-invoice-ranking-full-list li {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .dashboard-invoice-ranking-amount,
    .dashboard-invoice-ranking-full-list li b {
        grid-column: 2 / -1;
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .dashboard-invoice-ranking-header,
    .dashboard-ranking-period-label {
        padding-inline: 16px;
    }

    .dashboard-invoice-ranking-list,
    .dashboard-invoice-ranking-full,
    .dashboard-invoice-ranking-empty,
    .dashboard-invoice-ranking-current {
        margin-inline: 12px;
    }

    .dashboard-invoice-ranking-list {
        padding-inline: 12px;
    }

    .dashboard-invoice-ranking-row,
    .dashboard-invoice-ranking-full-list li {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .dashboard-invoice-ranking-metric,
    .dashboard-invoice-ranking-amount,
    .dashboard-invoice-ranking-full-list li small,
    .dashboard-invoice-ranking-full-list li b {
        grid-column: 2;
        justify-self: start;
        text-align: left;
    }

    .dashboard-invoice-ranking-current {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-invoice-ranking-current strong {
        text-align: left;
    }
}

/* Collaboration company employees — v4.54.3 */
.collaboration-company-create-grid-limits {
    grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.36fr) minmax(260px, 0.56fr) auto;
}

.collaboration-companies-panel .settings-field input[type="number"],
.collaboration-companies-panel .settings-field input[type="text"] {
    width: 100%;
}

.collaboration-companies-panel .settings-field input[type="number"] {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-sizing: border-box;
}

.collaboration-companies-table-extended .collaboration-companies-head,
.collaboration-company-main-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.28fr) minmax(110px, 0.2fr) minmax(280px, auto);
    gap: 16px;
    align-items: center;
}

.collaboration-company-row-extended {
    display: block;
    padding: 0;
    overflow: hidden;
}

.collaboration-company-main-row {
    padding: 14px;
}

.company-limit-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--surface-soft);
}


.company-employees-open-button {
    gap: 7px;
}

.company-employees-open-button small {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
}

.collaboration-company-employees-modal {
    position: fixed;
    inset: 0;
    z-index: 1860;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(2 8 23 / 0.74);
    backdrop-filter: blur(5px);
}

.collaboration-company-employees-modal.hidden {
    display: none;
}

.collaboration-company-employees-card {
    width: min(980px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-strong);
}

.collaboration-company-employees-header {
    flex: 0 0 auto;
}

.company-employees-modal-body {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 16px;
    padding: 18px 20px 20px;
}


.company-employees-modal-errors {
    margin: 0;
}

.company-employees-modal-errors ul {
    margin-bottom: 0;
}

.company-employees-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-soft) 45%, transparent);
}

.company-employees-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.company-employees-section-header strong {
    color: var(--text);
}

.company-employees-section-header span {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 850;
    background: var(--surface);
}

.company-employee-empty-note {
    margin: 0;
}

.company-employees-panel {
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 54%, transparent);
}

.company-employees-panel > summary,
.company-employee-archive > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
}

.company-employees-panel > summary span,
.company-employee-archive > summary span {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 750;
}

.company-employees-content {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.company-employee-create,
.company-employee-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.42fr) minmax(170px, 0.34fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.company-employee-list {
    display: grid;
    gap: 10px;
}

.company-employee-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.company-employee-archive {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--page-bg) 22%, transparent);
}

.company-employee-archive-list {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}


.company-employees-section .company-employee-archive-list {
    padding: 0;
}

.company-employee-archive-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.company-employee-archive-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.company-employee-archive-row small,
.collaboration-decision-panel dd small {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 650;
}

@media (max-width: 1100px) {
    .collaboration-company-create-grid-limits,
    .collaboration-companies-table-extended .collaboration-companies-head,
    .collaboration-company-main-row,
    .company-employee-create,
    .company-employee-row {
        grid-template-columns: 1fr;
    }

    .company-employee-actions,
    .collaboration-company-limit-cell {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .company-employee-create,
    .company-employee-row,
    .company-employee-archive-row {
        align-items: stretch;
        flex-direction: column;
    }

    .company-employee-actions,
    .company-employee-actions > *,
    .company-employee-archive-row > * {
        width: 100%;
    }
}

/* Payroll bonuses — v4.55.0 */
.payroll-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.payroll-amount-breakdown { display:grid; gap:4px; min-width:0; }
.payroll-amount-breakdown > span { font-size:.76rem; color:var(--text-secondary); }
.payroll-amount-breakdown .payroll-bonus-line { color:var(--brand-gold,#caa64b); font-weight:800; }
.payroll-amount-breakdown .payroll-amount { display:block; font-size:.95rem; }
.payroll-bonus-note { display:block; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-secondary); font-size:.72rem; }
.payroll-actions { gap:8px; flex-wrap:wrap; }
.payroll-actions .small-button { min-width:112px; }
.payroll-bonus-help { margin:10px 0 0; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:color-mix(in srgb,var(--brand-gold,#caa64b) 8%,var(--surface)); color:var(--text-secondary); font-size:.82rem; line-height:1.45; }

/* Payroll bonus modal spacing — v4.62.5 */
.payroll-bonus-modal { width:min(100%,560px); gap:18px; padding:22px; }
.payroll-bonus-form { display:grid; gap:15px; margin-top:17px; }
.payroll-bonus-form > p { margin:0; }
.payroll-bonus-form .form-field { gap:8px; }
.payroll-bonus-form .form-field > span { line-height:1.35; }
.payroll-bonus-form .form-field input { min-height:48px; }
.payroll-bonus-form .form-field textarea { min-height:118px; }
.payroll-bonus-form .payroll-bonus-help { margin:0; padding:12px 14px; }
.payroll-bonus-form .app-modal-actions { margin-top:2px; padding-top:4px; }
@media(max-width:560px){
    .payroll-bonus-modal { padding:18px; gap:14px; }
    .payroll-bonus-form { gap:14px; margin-top:14px; }
}
@media(max-width:1180px){ .payroll-summary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media(max-width:760px){ .payroll-summary-grid { grid-template-columns:1fr; } .payroll-bonus-note { max-width:100%; } }

/* Dashboard 4.56.0 — operational command center */
.dashboard-command-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 132px;
    padding: 28px 30px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--blue-500) 12%, transparent) 0, transparent 34%),
        linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface-soft) 72%, var(--surface)));
    box-shadow: var(--shadow);
}
.dashboard-command-hero::after {
    content: '';
    position: absolute;
    right: -70px;
    bottom: -105px;
    width: 240px;
    height: 240px;
    border: 1px solid color-mix(in srgb, var(--blue-500) 12%, transparent);
    border-radius: 50%;
    pointer-events: none;
}
.dashboard-command-hero-copy { position: relative; z-index: 1; min-width: 0; }
.dashboard-command-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -.035em;
}
.dashboard-command-hero p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.dashboard-command-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: blur(8px);
}
.dashboard-command-status-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
    color: var(--success);
}
.dashboard-command-status.has-attention .dashboard-command-status-icon {
    background: color-mix(in srgb, var(--dashboard-attention-fill) 13%, var(--surface));
    color: var(--dashboard-attention-text);
}
.dashboard-command-status-icon .icon { width: 19px; height: 19px; }
.dashboard-command-status span:last-child { display: grid; gap: 2px; min-width: 0; }
.dashboard-command-status small { color: var(--text-secondary); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.dashboard-command-status strong { font-size: 13px; }

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.dashboard-kpi-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 13px;
    min-height: 116px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.dashboard-kpi-card::after {
    content: '';
    position: absolute;
    right: -32px;
    bottom: -48px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--blue-500) 6%, transparent);
    pointer-events: none;
}
.dashboard-kpi-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue-500) 44%, var(--border)); box-shadow: 0 12px 30px rgb(15 23 42 / .08); }
html.dark .dashboard-kpi-card:hover { box-shadow: 0 14px 32px rgb(0 0 0 / .22); }
.dashboard-kpi-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--blue-500) 11%, var(--surface));
    color: var(--blue-600);
}
html.dark .dashboard-kpi-icon { color: var(--blue-200); }
.dashboard-kpi-card.tone-warning .dashboard-kpi-icon { background: color-mix(in srgb, var(--dashboard-attention-fill) 13%, var(--surface)); color: var(--dashboard-attention-text); }
.dashboard-kpi-card.tone-success .dashboard-kpi-icon { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.dashboard-kpi-icon .icon { width: 20px; height: 20px; }
.dashboard-kpi-copy { display: grid; min-width: 0; }
.dashboard-kpi-copy small { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.dashboard-kpi-copy strong { margin-top: 2px; overflow: hidden; color: var(--text); font-size: clamp(20px, 2vw, 27px); line-height: 1.1; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpi-copy span { margin-top: 5px; overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpi-arrow { width: 17px; height: 17px; color: var(--text-faint); }

.dashboard-command-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, .75fr);
    gap: 18px;
    margin-bottom: 18px;
}
.dashboard-trend-panel,
.dashboard-attention-panel-v2,
.dashboard-top-products-panel,
.dashboard-today-panel,
.dashboard-quick-panel-v2,
.dashboard-activity-panel-v2 {
    min-width: 0;
    padding: 22px;
    border-radius: 20px;
}
.dashboard-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.dashboard-section-header h2 { margin: 3px 0 4px; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.dashboard-section-header p { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: 11px; }
.dashboard-section-header-compact { padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.dashboard-trend-summary { display: grid; flex: 0 0 auto; gap: 2px; text-align: right; }
.dashboard-trend-summary strong { font-size: 20px; line-height: 1.15; }
.dashboard-trend-summary small { color: var(--text-secondary); font-size: 10px; }

.dashboard-line-chart { position: relative; min-height: 285px; padding-top: 2px; }
.dashboard-line-chart svg { width: 100%; height: 250px; overflow: visible; }
.dashboard-chart-gridline { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 7; vector-effect: non-scaling-stroke; }
.dashboard-chart-area { fill: color-mix(in srgb, var(--blue-500) 11%, transparent); }
.dashboard-chart-line { fill: none; stroke: var(--blue-500); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dashboard-line-chart.is-hours .dashboard-chart-area { fill: color-mix(in srgb, var(--success) 10%, transparent); }
.dashboard-line-chart.is-hours .dashboard-chart-line { stroke: var(--success); }
.dashboard-chart-point { fill: var(--surface); stroke: var(--blue-500); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: .22; transition: opacity .15s ease; }
.dashboard-line-chart.is-hours .dashboard-chart-point { stroke: var(--success); }
.dashboard-chart-point:hover { opacity: 1; }
.dashboard-chart-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.dashboard-chart-labels span { text-align: center; }
.dashboard-chart-labels span:first-child { text-align: left; }
.dashboard-chart-labels span:last-child { text-align: right; }
.dashboard-chart-empty { min-height: 250px; }

.dashboard-attention-count {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
    color: var(--success);
    font-weight: 800;
}
.dashboard-attention-count.has-items { background: color-mix(in srgb, var(--dashboard-attention-fill) 13%, var(--surface)); color: var(--dashboard-attention-text); }
.dashboard-attention-list-v2 { display: grid; gap: 9px; }
.dashboard-attention-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
a.dashboard-attention-row:hover { transform: translateX(2px); border-color: color-mix(in srgb, var(--blue-500) 42%, var(--border)); background: var(--surface-hover); }
.dashboard-attention-row-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--blue-500) 10%, var(--surface)); color: var(--blue-600); }
.dashboard-attention-row.tone-warning .dashboard-attention-row-icon { background: color-mix(in srgb, var(--dashboard-attention-fill) 13%, var(--surface)); color: var(--dashboard-attention-text); }
.dashboard-attention-row.tone-success .dashboard-attention-row-icon { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.dashboard-attention-row-icon .icon { width: 18px; height: 18px; }
.dashboard-attention-row-copy { display: grid; min-width: 0; gap: 3px; }
.dashboard-attention-row-copy strong { font-size: 12px; line-height: 1.25; }
.dashboard-attention-row-copy small { color: var(--text-secondary); font-size: 10px; line-height: 1.35; }
.dashboard-attention-row-arrow { width: 16px; height: 16px; color: var(--text-faint); }

.dashboard-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 18px;
    margin-bottom: 18px;
}
.dashboard-insight-grid.is-personal { grid-template-columns: 1fr; }
.dashboard-top-products-list { display: grid; gap: 2px; padding: 0; margin: 0; list-style: none; }
.dashboard-top-products-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(92px, auto);
    align-items: center;
    gap: 12px;
    padding: 11px 5px;
    border-bottom: 1px solid var(--border);
}
.dashboard-top-products-list li:last-child { border-bottom: 0; }
.dashboard-top-products-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-soft); color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.dashboard-top-products-main { display: grid; min-width: 0; gap: 7px; }
.dashboard-top-products-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dashboard-top-products-title strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-top-products-title small { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--blue-500) 10%, var(--surface)); color: var(--blue-600); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.dashboard-top-products-main progress { width: 100%; height: 5px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-soft); }
.dashboard-top-products-main progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-soft); }
.dashboard-top-products-main progress::-webkit-progress-value { border-radius: 999px; background: var(--blue-500); }
.dashboard-top-products-main progress::-moz-progress-bar { border-radius: 999px; background: var(--blue-500); }
.dashboard-top-products-value { display: grid; gap: 1px; text-align: right; }
.dashboard-top-products-value strong { font-size: 11px; }
.dashboard-top-products-value small { color: var(--text-secondary); font-size: 9px; }
.dashboard-today-date { display: grid; place-items: center; min-width: 50px; height: 36px; border-radius: 11px; background: var(--surface-soft); color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.dashboard-today-list { display: grid; gap: 8px; }
.dashboard-today-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 69px; padding: 10px 11px; border-radius: 14px; background: var(--surface-soft); }
.dashboard-today-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--blue-500) 10%, var(--surface)); color: var(--blue-600); }
.dashboard-today-icon .icon { width: 18px; height: 18px; }
.dashboard-today-copy { display: grid; min-width: 0; }
.dashboard-today-copy small { color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.dashboard-today-copy strong { margin-top: 1px; font-size: 16px; line-height: 1.2; }
.dashboard-today-copy span { margin-top: 3px; overflow: hidden; color: var(--text-secondary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 18px; margin-top: 18px; }
.dashboard-quick-grid-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.dashboard-quick-action-v2 { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 10px; min-height: 68px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.dashboard-quick-action-v2:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue-500) 42%, var(--border)); background: var(--surface-hover); }
.dashboard-quick-action-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--blue-500) 10%, var(--surface)); color: var(--blue-600); }
.dashboard-quick-action-icon .icon { width: 17px; height: 17px; }
.dashboard-quick-action-v2 > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.dashboard-quick-action-v2 strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-quick-action-v2 small { overflow: hidden; color: var(--text-secondary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-quick-action-arrow { width: 15px; height: 15px; color: var(--text-faint); }
.dashboard-activity-list-v2 .activity-item { min-height: 61px; padding: 8px 2px; }
.dashboard-activity-list-v2 .activity-item strong { font-size: 11px; }
.dashboard-activity-list-v2 .activity-item small,
.dashboard-activity-list-v2 .activity-item time { font-size: 9px; }

.dashboard-invoice-ranking-panel { margin-top: 18px; }

@media (max-width: 1280px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-command-grid { grid-template-columns: minmax(0, 1.45fr) minmax(310px, .8fr); }
}
@media (max-width: 1020px) {
    .dashboard-command-grid,
    .dashboard-insight-grid,
    .dashboard-bottom-grid { grid-template-columns: 1fr; }
    .dashboard-attention-panel-v2 { order: 1; }
    .dashboard-trend-panel { order: 2; }
}
@media (max-width: 720px) {
    .dashboard-command-hero { align-items: flex-start; min-height: 0; padding: 21px; border-radius: 18px; }
    .dashboard-command-status { min-width: 0; }
    .dashboard-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
    .dashboard-kpi-card { min-height: 96px; padding: 14px; }
    .dashboard-trend-panel,
    .dashboard-attention-panel-v2,
    .dashboard-top-products-panel,
    .dashboard-today-panel,
    .dashboard-quick-panel-v2,
    .dashboard-activity-panel-v2 { padding: 17px; border-radius: 17px; }
    .dashboard-section-header { align-items: flex-start; }
    .dashboard-trend-summary { text-align: left; }
    .dashboard-line-chart { min-height: 230px; }
    .dashboard-line-chart svg { height: 198px; }
    .dashboard-quick-grid-v2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .dashboard-command-hero { display: grid; }
    .dashboard-command-status { width: 100%; }
    .dashboard-section-header { display: grid; }
    .dashboard-top-products-list li { grid-template-columns: 30px minmax(0, 1fr); }
    .dashboard-top-products-value { grid-column: 2; display: flex; gap: 8px; margin-top: -5px; text-align: left; }
    .dashboard-chart-labels { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-kpi-card,
    .dashboard-attention-row,
    .dashboard-quick-action-v2,
    .dashboard-chart-point { transition: none; }
}

/* ========================================================================== */
/* 4.65.0 — Opinie: kompaktowa tabela administracyjna */
.reviews-stars{display:inline-flex;align-items:center;gap:1px;color:var(--accent);font-size:1.05rem;letter-spacing:.04em}.reviews-stars span{color:color-mix(in srgb,var(--text-secondary) 44%,transparent)}
.reviews-admin-overview{margin-bottom:14px}.reviews-admin-overview-main{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px}.reviews-admin-overview-main>div{display:grid;gap:2px;min-width:150px}.reviews-admin-overview-main>div>strong{font-size:1.9rem;line-height:1;color:var(--text)}.reviews-admin-overview-main>div>small{color:var(--text-secondary);font-size:.78rem}.reviews-admin-overview-main dl{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:8px;margin:0;flex:1}.reviews-admin-overview-main dl>div{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.reviews-admin-overview-main dt{color:var(--text-secondary);font-size:.68rem;font-weight:780;text-transform:uppercase;letter-spacing:.04em}.reviews-admin-overview-main dd{margin:0;color:var(--text);font-size:1rem;font-weight:850}
.reviews-admin-workspace{padding:0;overflow:hidden}.reviews-admin-tabs-header{padding:12px 14px 0;border-bottom:1px solid var(--border)}.reviews-admin-type-tabs{display:flex;align-items:end;gap:5px}.reviews-admin-type-tabs a{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:230px;min-height:46px;padding:0 14px;border:1px solid transparent;border-bottom:0;border-radius:11px 11px 0 0;color:var(--text-secondary);font-size:.82rem;font-weight:800;text-decoration:none}.reviews-admin-type-tabs a span{display:inline-flex;align-items:center;gap:8px}.reviews-admin-type-tabs a .icon{width:16px;height:16px}.reviews-admin-type-tabs a strong{display:grid;place-items:center;min-width:28px;height:24px;padding:0 7px;border-radius:999px;background:var(--surface-soft);color:var(--text-secondary);font-size:.72rem}.reviews-admin-type-tabs a:hover{background:var(--surface-soft);color:var(--text)}.reviews-admin-type-tabs a.active{border-color:var(--border);background:var(--surface);color:var(--accent);transform:translateY(1px)}.reviews-admin-type-tabs a.active strong{background:var(--accent-soft);color:var(--accent)}
.reviews-admin-query-form{display:grid;gap:12px;padding:14px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface-soft) 58%,var(--surface))}.reviews-admin-search-row{display:flex;align-items:center;gap:9px}.reviews-admin-search-control{min-height:42px;display:flex;align-items:center;gap:9px;flex:1;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text-secondary)}.reviews-admin-search-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 15%,transparent)}.reviews-admin-search-control .icon{width:17px;height:17px;flex:0 0 auto}.reviews-admin-search-control input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:.82rem}.reviews-admin-search-control input::placeholder{color:var(--text-faint)}.reviews-admin-clear{min-height:42px}.reviews-admin-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:9px}.reviews-admin-filter-grid label{display:grid;gap:5px}.reviews-admin-filter-grid label>span{color:var(--text-secondary);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.reviews-admin-filter-grid select{width:100%;min-height:38px;padding:0 32px 0 10px;border:1px solid var(--border);border-radius:9px;background-color:var(--surface);color:var(--text);font:inherit;font-size:.78rem}
.reviews-admin-results-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface)}.reviews-admin-results-head>div{display:flex;align-items:baseline;gap:6px}.reviews-admin-results-head strong{font-size:.95rem}.reviews-admin-results-head span,.reviews-admin-results-head small{color:var(--text-secondary);font-size:.75rem}.reviews-admin-empty{margin:0;border:0;border-radius:0;min-height:220px}
.reviews-admin-table-wrap{width:100%;overflow-x:auto}.reviews-admin-table{width:100%;min-width:1080px;border-collapse:separate;border-spacing:0;table-layout:fixed}.reviews-admin-table .reviews-col-rating{width:105px}.reviews-admin-table .reviews-col-employee{width:170px}.reviews-admin-table .reviews-col-author{width:165px}.reviews-admin-table .reviews-col-comment{width:auto}.reviews-admin-table .reviews-col-status{width:105px}.reviews-admin-table .reviews-col-response{width:130px}.reviews-admin-table .reviews-col-date{width:145px}.reviews-admin-table .reviews-col-actions{width:112px}.reviews-admin-table th,.reviews-admin-table td{padding:11px 12px;text-align:left;vertical-align:middle}.reviews-admin-table th{position:sticky;top:0;z-index:1;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface-soft) 82%,var(--surface));color:var(--text-secondary);font-size:.66rem;font-weight:850;letter-spacing:.055em;text-transform:uppercase}.reviews-admin-table tbody td{border-bottom:1px solid var(--border);background:var(--surface)}.reviews-admin-table tbody tr:last-child td{border-bottom:0}.reviews-admin-table tbody tr:hover td{background:color-mix(in srgb,var(--surface) 88%,var(--accent-soft))}.reviews-admin-table tbody tr.status-hidden td,.reviews-admin-table tbody tr.status-spam td{background:color-mix(in srgb,var(--surface) 94%,var(--surface-soft))}.reviews-admin-rating{display:grid;gap:3px}.reviews-admin-rating>strong{color:var(--text);font-size:.8rem}.reviews-admin-rating>span{white-space:nowrap;color:var(--accent);font-size:.72rem;letter-spacing:.02em}.reviews-admin-rating i{color:var(--text-faint);font-style:normal}.reviews-admin-employee-name{display:block;overflow:hidden;text-overflow:ellipsis;color:var(--text);font-size:.78rem;white-space:nowrap}.reviews-admin-author{display:grid;gap:3px}.reviews-admin-author strong{overflow:hidden;text-overflow:ellipsis;color:var(--text);font-size:.8rem;white-space:nowrap}.reviews-admin-author small{color:var(--text-secondary);font-size:.68rem}.reviews-admin-comment-preview{display:-webkit-box;overflow:hidden;margin:0;color:var(--text);font-size:.78rem;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2}.reviews-admin-comment-preview.is-empty{color:var(--text-secondary);font-style:italic}.reviews-admin-table .status-badge,.reviews-admin-detail-dialog .status-badge{min-height:25px;padding:0 8px;font-size:.66rem}.reviews-admin-table .status-badge.public,.reviews-admin-detail-dialog .status-badge.public{background:color-mix(in srgb,var(--success,#27a868) 13%,var(--surface));color:var(--success,#27a868)}.reviews-admin-table .status-badge.hidden,.reviews-admin-detail-dialog .status-badge.hidden{background:var(--surface-soft);color:var(--text-secondary)}.reviews-admin-table .status-badge.spam,.reviews-admin-detail-dialog .status-badge.spam{background:color-mix(in srgb,var(--danger,#d44) 12%,var(--surface));color:var(--danger,#d44)}.reviews-admin-response-state{display:inline-flex;align-items:center;gap:5px;color:var(--text-secondary);font-size:.72rem;font-weight:750}.reviews-admin-response-state .icon{width:14px;height:14px}.reviews-admin-response-state.is-answered{color:var(--success,#27a868)}.reviews-admin-date{display:block;color:var(--text-secondary);font-size:.7rem;line-height:1.35}.reviews-admin-detail-button{min-height:32px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:.72rem;font-weight:780;cursor:pointer}.reviews-admin-detail-button .icon{width:14px;height:14px}.reviews-admin-detail-button:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}.reviews-admin-detail-button:focus-visible{outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.reviews-admin-pagination{display:flex;align-items:center;justify-content:center;gap:5px;padding:14px;border-top:1px solid var(--border);background:var(--surface)}.reviews-admin-pagination a,.reviews-admin-pagination>span{min-width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft);color:var(--text-secondary);font-size:.75rem;font-weight:800;text-decoration:none}.reviews-admin-pagination a:hover{border-color:var(--accent);color:var(--accent)}.reviews-admin-pagination a.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.reviews-admin-pagination .is-disabled{pointer-events:none;opacity:.42}.reviews-admin-pagination>span{border-color:transparent;background:transparent;min-width:24px}
.reviews-admin-detail-modal{z-index:10020}.reviews-admin-detail-dialog{width:min(780px,calc(100vw - 28px));max-height:min(88vh,900px);padding:0;overflow:hidden}.reviews-admin-detail-host{min-height:180px}.reviews-admin-detail-loading{min-height:220px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--text-secondary)}.reviews-admin-detail-loading .icon{width:18px;height:18px;animation:reviews-admin-spin .9s linear infinite}@keyframes reviews-admin-spin{to{transform:rotate(360deg)}}.reviews-admin-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 22px 16px;border-bottom:1px solid var(--border);background:var(--surface)}.reviews-admin-modal-header h2{margin:3px 0 4px;color:var(--text);font-size:1.25rem}.reviews-admin-modal-header p{margin:0;color:var(--text-secondary);font-size:.78rem}.reviews-admin-modal-scroll{max-height:calc(min(88vh,900px) - 96px);overflow-y:auto;padding:18px 22px 22px}.reviews-admin-detail-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px}.reviews-admin-detail-rating{display:flex;align-items:center;gap:12px}.reviews-admin-detail-rating strong{font-size:1.4rem}.reviews-admin-detail-rating span{color:var(--accent);font-size:1rem;letter-spacing:.03em}.reviews-admin-detail-rating i{color:var(--text-faint);font-style:normal}.reviews-admin-detail-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 18px}.reviews-admin-detail-meta>div{display:grid;gap:4px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.reviews-admin-detail-meta dt{color:var(--text-secondary);font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.reviews-admin-detail-meta dd{display:grid;gap:2px;margin:0;color:var(--text);font-size:.8rem;font-weight:780;overflow-wrap:anywhere}.reviews-admin-detail-meta dd small{color:var(--text-secondary);font-size:.68rem;font-weight:650}.reviews-admin-detail-section{display:grid;gap:11px;padding:16px 0;border-top:1px solid var(--border)}.reviews-admin-detail-section>header{display:grid;gap:3px}.reviews-admin-detail-section h3{margin:0;color:var(--text);font-size:.95rem}.reviews-admin-detail-section>header p{margin:0;color:var(--text-secondary);font-size:.74rem}.reviews-admin-detail-comment,.reviews-admin-detail-response-readonly{margin:0;padding:13px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--text);font-size:.82rem;line-height:1.6;overflow-wrap:anywhere}.reviews-admin-detail-comment.is-empty,.reviews-admin-detail-response-readonly.is-empty{color:var(--text-secondary);font-style:italic}.reviews-admin-detail-response-form{display:grid;gap:10px}.reviews-admin-detail-response-form textarea{min-height:120px}.reviews-admin-detail-response-actions,.reviews-admin-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.reviews-admin-detail-actions form{display:inline-flex}.reviews-admin-detail-moderation{padding-bottom:0}.reviews-settings-section code{word-break:break-all}.account-review-visibility{margin-top:2px}
@media(max-width:1050px){.reviews-admin-filter-grid{grid-template-columns:repeat(3,minmax(140px,1fr))}.reviews-admin-overview-main dl{grid-template-columns:repeat(2,minmax(110px,1fr))}}
@media(max-width:760px){.reviews-admin-overview-main{align-items:stretch;flex-direction:column}.reviews-admin-overview-main dl{grid-template-columns:repeat(2,minmax(0,1fr))}.reviews-admin-type-tabs{display:grid;grid-template-columns:1fr 1fr}.reviews-admin-type-tabs a{min-width:0;padding:0 10px;gap:8px}.reviews-admin-type-tabs a span{gap:6px}.reviews-admin-search-row{align-items:stretch;flex-direction:column}.reviews-admin-clear{width:100%;justify-content:center}.reviews-admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reviews-admin-table-wrap{overflow:visible;padding:10px}.reviews-admin-table,.reviews-admin-table tbody{display:block;min-width:0}.reviews-admin-table colgroup,.reviews-admin-table thead{display:none}.reviews-admin-table tbody{display:grid;gap:9px}.reviews-admin-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.reviews-admin-table tbody td{min-width:0;display:grid;gap:4px;padding:10px 11px;border:0;border-bottom:1px solid var(--border);background:transparent!important}.reviews-admin-table tbody td::before{content:attr(data-label);color:var(--text-secondary);font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.045em}.reviews-admin-table tbody td[data-label="Opinia"]{grid-column:1/-1}.reviews-admin-table tbody td[data-label="Akcje"]{grid-column:1/-1;border-bottom:0}.reviews-admin-detail-button{width:100%;min-height:38px}.reviews-admin-comment-preview{-webkit-line-clamp:3}.reviews-admin-date{font-size:.75rem}.reviews-admin-modal-scroll{padding-inline:16px}.reviews-admin-modal-header{padding-inline:16px}.reviews-admin-detail-actions,.reviews-admin-detail-response-actions{align-items:stretch;flex-direction:column}.reviews-admin-detail-actions form,.reviews-admin-detail-actions button,.reviews-admin-detail-response-actions button{width:100%;justify-content:center}}
@media(max-width:520px){.reviews-admin-overview-main dl{grid-template-columns:1fr 1fr}.reviews-admin-filter-grid{grid-template-columns:1fr}.reviews-admin-type-tabs{grid-template-columns:1fr}.reviews-admin-type-tabs a{border:1px solid var(--border);border-radius:9px}.reviews-admin-type-tabs a.active{transform:none}.reviews-admin-tabs-header{padding:10px}.reviews-admin-query-form{padding:10px}.reviews-admin-results-head{align-items:flex-start;flex-direction:column;gap:4px}.reviews-admin-table tbody tr{grid-template-columns:1fr}.reviews-admin-table tbody td,.reviews-admin-table tbody td[data-label="Opinia"],.reviews-admin-table tbody td[data-label="Akcje"]{grid-column:auto}.reviews-admin-detail-meta{grid-template-columns:1fr}.reviews-admin-pagination{flex-wrap:wrap}.reviews-admin-detail-dialog{width:calc(100vw - 16px)}}
.account-review-visibility{grid-column:1/-1}

/* 4.65.1 — Opinie: zwarty nagłówek sekcji administracyjnej */
.reviews-admin-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:14px;padding:17px 18px;border:1px solid var(--border);border-radius:14px;background:linear-gradient(118deg,color-mix(in srgb,var(--accent) 6%,var(--surface)),var(--surface) 58%)}
.reviews-admin-heading-main{display:flex;align-items:center;gap:14px;min-width:0}
.reviews-admin-heading-icon{width:44px;height:44px;display:grid;place-items:center;flex:0 0 44px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--border));border-radius:12px;background:color-mix(in srgb,var(--accent) 9%,var(--surface-soft));color:var(--accent)}
.reviews-admin-heading-icon .icon{width:20px;height:20px}
.reviews-admin-heading-copy{min-width:0}
.reviews-admin-heading-copy .eyebrow{margin-bottom:3px}
.reviews-admin-heading-copy h1{font-size:clamp(1.65rem,2.35vw,2.05rem);line-height:1.05}
.reviews-admin-heading-copy p{max-width:720px;margin-top:5px;font-size:.82rem;line-height:1.45}
.reviews-admin-public-link{min-height:40px;flex:0 0 auto;padding:.58rem .82rem;white-space:nowrap;background:var(--surface-soft)}
.reviews-admin-public-link:hover{background:color-mix(in srgb,var(--accent) 8%,var(--surface-soft))}
@media(max-width:760px){.reviews-admin-heading{align-items:stretch;flex-direction:column;gap:14px;padding:15px}.reviews-admin-heading-main{align-items:flex-start}.reviews-admin-heading-icon{width:40px;height:40px;flex-basis:40px;border-radius:11px}.reviews-admin-heading-copy h1{font-size:1.65rem}.reviews-admin-public-link{width:100%;justify-content:center}}
@media(max-width:420px){.reviews-admin-heading{padding:14px}.reviews-admin-heading-icon{display:none}.reviews-admin-heading-copy p{font-size:.79rem}}


/* Public reviews settings workspace — v4.66.0 */
.reviews-settings-panel{overflow:hidden;border-color:color-mix(in srgb,var(--accent) 12%,var(--border));background:var(--surface)}
.reviews-settings-panel>.reviews-settings-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;padding:24px 28px;border-bottom:1px solid var(--border);background:radial-gradient(circle at 96% 0,color-mix(in srgb,var(--accent) 8%,transparent),transparent 34%)}
.reviews-settings-header-copy{min-width:0}.reviews-settings-header-copy h2{margin:4px 0 6px}.reviews-settings-header-copy p{max-width:760px;line-height:1.5}.reviews-settings-public-link{white-space:nowrap}
.reviews-settings-content{display:grid;gap:18px;padding:22px 24px 24px;background:color-mix(in srgb,var(--page-bg) 34%,var(--surface))}
.reviews-settings-card{display:grid;gap:18px;padding:20px;border:1px solid color-mix(in srgb,var(--accent) 10%,var(--border));border-radius:20px;background:var(--surface);box-shadow:inset 0 1px 0 rgb(255 255 255 / .018)}
.reviews-settings-card-status{grid-template-columns:minmax(0,1fr) minmax(320px,.58fr);align-items:center}
.reviews-settings-card-heading{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:13px;min-width:0}.reviews-settings-card-heading>div{display:grid;gap:4px;min-width:0}.reviews-settings-card-heading strong{color:var(--text);font-size:.94rem}.reviews-settings-card-heading small{color:var(--text-secondary);font-size:.76rem;line-height:1.5}.reviews-settings-card-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid color-mix(in srgb,var(--accent) 16%,var(--border));border-radius:12px;background:color-mix(in srgb,var(--accent) 7%,var(--surface));color:var(--accent)}.reviews-settings-card-icon .icon{width:18px;height:18px}.reviews-settings-card-icon-discord{border-color:color-mix(in srgb,#5865f2 26%,var(--border));background:color-mix(in srgb,#5865f2 10%,var(--surface));color:#8790ff}
.reviews-settings-card-heading-with-status{grid-template-columns:auto minmax(0,1fr) auto}.reviews-settings-card-heading-with-toggle{grid-template-columns:auto minmax(0,1fr) auto}
.reviews-settings-status{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);color:var(--text-secondary);font-size:.68rem;font-weight:800;white-space:nowrap}.reviews-settings-status.is-ready{border-color:color-mix(in srgb,var(--success) 30%,var(--border));background:color-mix(in srgb,var(--success) 8%,var(--surface));color:var(--success)}
.reviews-settings-primary-switch{margin:0;min-height:70px;border-color:color-mix(in srgb,var(--accent) 16%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--page-bg) 38%,var(--surface))}
.reviews-settings-inline-switch{display:flex;align-items:center;gap:10px;color:var(--text-secondary);font-size:.72rem;font-weight:800;cursor:pointer}.reviews-settings-inline-switch input{position:relative;width:42px;height:24px;appearance:none;border:1px solid var(--border-strong);border-radius:999px;background:var(--surface-muted);cursor:pointer;transition:background .16s ease,border-color .16s ease}.reviews-settings-inline-switch input::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:var(--text-secondary);box-shadow:0 1px 3px rgb(0 0 0 / .25);transition:transform .16s ease,background .16s ease}.reviews-settings-inline-switch input:checked{border-color:#5865f2;background:#5865f2}.reviews-settings-inline-switch input:checked::after{transform:translateX(18px);background:#fff}.reviews-settings-inline-switch input:focus-visible{outline:2px solid color-mix(in srgb,#5865f2 55%,transparent);outline-offset:3px}
.reviews-settings-fields{display:grid;gap:15px}.reviews-settings-fields-two{grid-template-columns:repeat(2,minmax(0,1fr))}.reviews-settings-fields-three{grid-template-columns:repeat(3,minmax(0,1fr))}.reviews-settings-fields-flat{gap:12px}.reviews-settings-field{display:grid;gap:7px;min-width:0}.reviews-settings-field>span{color:var(--text);font-size:.8rem;font-weight:800}.reviews-settings-field>small{color:var(--text-secondary);font-size:.72rem;line-height:1.45}.reviews-settings-field-wide{grid-column:1/-1}
.reviews-settings-field>input,.reviews-settings-field>textarea,.reviews-settings-field>select,.reviews-settings-secret-control>input,.reviews-webhook-color-control>input[type="text"]{width:100%;min-width:0;min-height:44px;padding:10px 13px;border:1px solid var(--border-strong);border-radius:12px;outline:0;background:var(--input-bg);color:var(--text);font:inherit;font-size:.82rem;font-weight:650;line-height:1.4;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.reviews-settings-field>textarea{min-height:92px;resize:vertical}.reviews-settings-field>input::placeholder,.reviews-settings-field>textarea::placeholder,.reviews-settings-secret-control>input::placeholder,.reviews-webhook-color-control>input[type="text"]::placeholder{color:var(--text-faint);opacity:1}.reviews-settings-field>input:hover,.reviews-settings-field>textarea:hover,.reviews-settings-secret-control>input:hover,.reviews-webhook-color-control>input[type="text"]:hover{border-color:color-mix(in srgb,var(--accent) 28%,var(--border-strong))}.reviews-settings-field>input:focus,.reviews-settings-field>textarea:focus,.reviews-settings-secret-control>input:focus,.reviews-webhook-color-control>input[type="text"]:focus{border-color:var(--accent);background:color-mix(in srgb,var(--page-bg) 55%,var(--surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 15%,transparent)}
.reviews-settings-field>input:-webkit-autofill,.reviews-settings-field>input:-webkit-autofill:hover,.reviews-settings-field>input:-webkit-autofill:focus,.reviews-settings-secret-control>input:-webkit-autofill,.reviews-settings-secret-control>input:-webkit-autofill:hover,.reviews-settings-secret-control>input:-webkit-autofill:focus{-webkit-text-fill-color:var(--text)!important;caret-color:var(--text);-webkit-box-shadow:0 0 0 1000px var(--input-bg) inset!important;box-shadow:0 0 0 1000px var(--input-bg) inset!important;border-color:var(--border-strong)!important;transition:background-color 9999s ease-out 0s}
.reviews-settings-secret-control{position:relative;display:grid;min-width:0}.reviews-settings-secret-control>input{padding-right:104px}.reviews-settings-secret-state{position:absolute;top:50%;right:10px;display:inline-flex;align-items:center;gap:5px;min-height:26px;padding:0 8px;transform:translateY(-50%);border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);color:var(--text-secondary);font-size:.64rem;font-weight:800;pointer-events:none}.reviews-settings-secret-state .icon{width:12px;height:12px}.reviews-settings-secret-state.is-saved{border-color:color-mix(in srgb,var(--success) 30%,var(--border));background:color-mix(in srgb,var(--success) 7%,var(--surface));color:var(--success)}
.reviews-settings-field .settings-input-unit{margin-top:auto;border-color:var(--border-strong);border-radius:12px;background:var(--input-bg)}.reviews-settings-field .settings-input-unit input{min-height:42px;font-size:.82rem}.reviews-settings-field .settings-input-unit span{background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
.reviews-settings-webhook-url-field{padding:15px 16px;border:1px solid color-mix(in srgb,#5865f2 13%,var(--border));border-radius:16px;background:color-mix(in srgb,#5865f2 3%,var(--surface))}
.reviews-webhook-editor-layout{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(360px,.84fr);gap:18px;align-items:start}.reviews-webhook-editor{display:grid;gap:14px}.reviews-webhook-editor-group{display:grid;gap:13px;padding:16px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--page-bg) 30%,var(--surface))}.reviews-webhook-editor-heading{display:grid;gap:3px}.reviews-webhook-editor-heading strong{color:var(--text);font-size:.82rem}.reviews-webhook-editor-heading small{color:var(--text-secondary);font-size:.7rem;line-height:1.45}.reviews-webhook-color-control{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px}.reviews-webhook-color-control input[type="color"]{width:48px;height:44px;padding:4px;border:1px solid var(--border-strong);border-radius:12px;background:var(--input-bg);cursor:pointer}.reviews-webhook-color-control input[type="color"]::-webkit-color-swatch-wrapper{padding:2px}.reviews-webhook-color-control input[type="color"]::-webkit-color-swatch{border:0;border-radius:7px}.reviews-webhook-color-control input[type="color"]::-moz-color-swatch{border:0;border-radius:7px}
.reviews-webhook-visibility-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reviews-webhook-visibility-option{display:flex;align-items:center;gap:9px;min-height:40px;padding:9px 11px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text-secondary);font-size:.72rem;font-weight:750;cursor:pointer;transition:border-color .15s ease,background .15s ease,color .15s ease}.reviews-webhook-visibility-option:hover{border-color:color-mix(in srgb,#5865f2 30%,var(--border));background:color-mix(in srgb,#5865f2 4%,var(--surface));color:var(--text)}.reviews-webhook-visibility-option input{width:17px;height:17px;accent-color:#5865f2}.reviews-webhook-editor-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:2px}.reviews-webhook-editor-actions small{max-width:360px;color:var(--text-secondary);font-size:.69rem;line-height:1.45}
.reviews-webhook-preview{position:sticky;top:88px;display:grid;gap:14px;padding:16px;border:1px solid color-mix(in srgb,#5865f2 16%,var(--border));border-radius:18px;background:color-mix(in srgb,#1e1f22 82%,var(--surface));box-shadow:0 18px 40px rgb(0 0 0 / .12);color:#dbdee1}.reviews-webhook-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.reviews-webhook-preview-toolbar>div:first-child{display:grid;gap:2px}.reviews-webhook-preview-toolbar .eyebrow{color:#9fa4aa}.reviews-webhook-preview-toolbar strong{color:#f2f3f5;font-size:.8rem}.reviews-webhook-preview-tabs{display:flex;padding:3px;border:1px solid #3f4147;border-radius:10px;background:#111214}.reviews-webhook-preview-tabs button{min-height:28px;padding:0 9px;border:0;border-radius:7px;background:transparent;color:#949ba4;font:inherit;font-size:.65rem;font-weight:800;cursor:pointer}.reviews-webhook-preview-tabs button.active{background:#2b2d31;color:#f2f3f5}.reviews-webhook-discord-message{display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;padding:14px;border-radius:14px;background:#313338}.reviews-webhook-discord-avatar{display:grid;place-items:center;width:40px;height:40px;overflow:hidden;border-radius:50%;background:linear-gradient(135deg,#5865f2,#3ba55d);color:#fff;font-size:.72rem;font-weight:900}.reviews-webhook-discord-avatar img{width:100%;height:100%;object-fit:cover}.reviews-webhook-discord-body{min-width:0}.reviews-webhook-discord-username{display:flex;align-items:center;gap:6px;min-width:0;margin-bottom:6px}.reviews-webhook-discord-username strong{overflow:hidden;color:#f2f3f5;font-size:.74rem;text-overflow:ellipsis;white-space:nowrap}.reviews-webhook-discord-username>span{padding:1px 4px;border-radius:3px;background:#5865f2;color:#fff;font-size:.5rem;font-weight:900}.reviews-webhook-discord-username time{color:#949ba4;font-size:.58rem;white-space:nowrap}.reviews-webhook-discord-embed{display:grid;gap:7px;min-width:0;padding:10px 12px;border-left:4px solid var(--reviews-webhook-preview-color,#5865f2);border-radius:4px;background:#2b2d31}.reviews-webhook-discord-embed>a{width:max-content;max-width:100%;overflow:hidden;color:#00a8fc;font-size:.64rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.reviews-webhook-discord-title{color:#f2f3f5;font-size:.78rem;line-height:1.35;overflow-wrap:anywhere}.reviews-webhook-discord-description{margin:0;color:#dbdee1;font-size:.66rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}.reviews-webhook-discord-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}.reviews-webhook-discord-fields>div{display:grid;gap:2px;min-width:0}.reviews-webhook-discord-fields span{color:#b5bac1;font-size:.57rem;font-weight:800}.reviews-webhook-discord-fields strong{color:#dbdee1;font-size:.64rem;font-weight:650;line-height:1.35;overflow-wrap:anywhere}.reviews-webhook-discord-field-wide{grid-column:1/-1}.reviews-webhook-discord-footer{display:flex;gap:5px;min-height:13px;color:#949ba4;font-size:.56rem}.reviews-webhook-preview-note{margin:9px 0 0;color:#949ba4;font-size:.58rem;line-height:1.45}
.reviews-settings-actions{justify-content:space-between;gap:16px}.reviews-settings-actions-note{display:inline-flex;align-items:center;gap:7px;max-width:720px;color:var(--text-secondary);font-size:.7rem;line-height:1.45}.reviews-settings-actions-note .icon{flex:0 0 auto;width:15px;height:15px;color:var(--accent)}
@media(max-width:1180px){.reviews-webhook-editor-layout{grid-template-columns:1fr}.reviews-webhook-preview{position:static}.reviews-settings-card-status{grid-template-columns:1fr}}
@media(max-width:900px){.reviews-settings-panel>.reviews-settings-header{grid-template-columns:auto minmax(0,1fr)}.reviews-settings-public-link{grid-column:2;justify-self:start}.reviews-settings-fields-three{grid-template-columns:1fr}.reviews-settings-fields-two{grid-template-columns:1fr}.reviews-settings-field-wide{grid-column:auto}.reviews-settings-card-heading-with-status,.reviews-settings-card-heading-with-toggle{grid-template-columns:auto minmax(0,1fr)}.reviews-settings-status,.reviews-settings-inline-switch{grid-column:2;justify-self:start}.reviews-webhook-visibility-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.reviews-settings-panel{border-radius:20px}.reviews-settings-panel>.reviews-settings-header{grid-template-columns:1fr;padding:20px 18px}.reviews-settings-panel>.reviews-settings-header>.settings-section-icon{display:none}.reviews-settings-public-link{grid-column:1;width:100%;justify-content:center}.reviews-settings-content{gap:14px;padding:14px}.reviews-settings-card{padding:16px;border-radius:17px}.reviews-settings-card-heading,.reviews-settings-card-heading-with-status,.reviews-settings-card-heading-with-toggle{grid-template-columns:auto minmax(0,1fr)}.reviews-settings-status,.reviews-settings-inline-switch{grid-column:1/-1;justify-self:start;margin-left:51px}.reviews-settings-primary-switch{align-items:flex-start;min-height:0}.reviews-settings-secret-control>input{padding-right:13px}.reviews-settings-secret-state{position:static;justify-self:start;margin-top:7px;transform:none}.reviews-webhook-visibility-grid{grid-template-columns:1fr}.reviews-webhook-editor-group{padding:14px}.reviews-webhook-preview{padding:12px}.reviews-webhook-discord-message{grid-template-columns:34px minmax(0,1fr);padding:11px}.reviews-webhook-discord-avatar{width:34px;height:34px}.reviews-webhook-preview-toolbar{align-items:flex-start;flex-direction:column}.reviews-settings-actions{align-items:stretch;flex-direction:column-reverse}.reviews-settings-actions .primary-button{width:100%;justify-content:center}.reviews-settings-actions-note{align-items:flex-start}}
.reviews-webhook-discord-avatar.has-custom-avatar{background:linear-gradient(135deg,#3f4147,#5865f2);font-size:.56rem;letter-spacing:.04em}.reviews-webhook-discord-embed>a:not([href]){color:#b5bac1;cursor:default;text-decoration:none}


/* 4.68.0 — logi i retencja */
.general-log-active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}
.general-log-active-filters>span{font-size:12px;font-weight:700;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em}
.general-log-active-filters>strong{display:inline-flex;align-items:center;min-height:28px;padding:5px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);font-size:12px;color:var(--text);font-weight:700}
.log-retention-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.log-retention-summary article{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.log-retention-summary span,.log-retention-summary small{color:var(--text-secondary)}
.log-retention-summary span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.log-retention-summary strong{font-size:26px;line-height:1;color:var(--text)}
.log-retention-summary small{font-size:12px}
.log-retention-last-run strong{color:var(--text)}
.log-retention-manual-section{margin-top:18px}
.log-retention-preview{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-top:16px;padding:14px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.log-retention-preview span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}
.log-retention-preview strong{font-size:24px;color:var(--text)}
.log-retention-preview small{color:var(--text-secondary)}
@media (max-width:1050px){.log-retention-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.log-retention-summary{grid-template-columns:1fr}.general-log-active-filters{align-items:flex-start}.log-retention-preview{align-items:flex-start;flex-direction:column;gap:5px}}

/* Invoice discount settings */
.invoice-discounts-settings-panel > .settings-form-header {
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
}
.invoice-discounts-settings-panel > .settings-form-header .settings-section-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}
.invoice-discounts-settings-panel > .settings-form-header p {
    max-width: 820px;
    line-height: 1.55;
}
.invoice-discounts-settings-content {
    display: grid;
    gap: 18px;
    padding: 24px 28px 28px;
}
.invoice-discount-create-card,
.invoice-discount-list-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, var(--page-bg));
}
.invoice-discount-create-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px 22px;
    background:
        radial-gradient(circle at 94% 10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 38%),
        color-mix(in srgb, var(--surface) 96%, var(--page-bg));
}
.invoice-discount-card-heading,
.invoice-discount-list-heading > div:first-child {
    min-width: 0;
}
.invoice-discount-card-heading h3,
.invoice-discount-list-heading h3 {
    margin: 3px 0 5px;
    color: var(--text);
    font-size: 1rem;
}
.invoice-discount-card-heading p,
.invoice-discount-list-heading p {
    margin: 0;
    max-width: 700px;
    color: var(--text-secondary);
    font-size: .78rem;
    line-height: 1.5;
}
.invoice-discount-create-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.invoice-discount-create-form .settings-input-unit {
    width: 148px;
    border-color: var(--border-strong);
    border-radius: 12px;
    background: var(--input-bg);
}
.invoice-discount-create-form .settings-input-unit input {
    min-height: 44px;
    font-size: .9rem;
}
.invoice-discount-create-form .primary-button {
    min-height: 44px;
    white-space: nowrap;
}
.invoice-discount-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}
.invoice-discount-list-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.invoice-discount-list-stats > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: .72rem;
    font-weight: 700;
}
.invoice-discount-list-stats > span.success {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 25%, var(--border));
    background: color-mix(in srgb, var(--success) 10%, var(--surface));
}
.invoice-discount-settings-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}
.invoice-discount-settings-row {
    display: grid;
    grid-template-columns: auto minmax(270px, 1fr) minmax(170px, auto) auto;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .18s ease, background .18s ease, opacity .18s ease;
}
.invoice-discount-settings-row:hover {
    border-color: var(--border-strong);
    background: color-mix(in srgb, var(--surface-hover) 45%, var(--surface));
}
.invoice-discount-settings-row.is-disabled {
    opacity: .78;
    background: color-mix(in srgb, var(--page-bg) 45%, var(--surface));
}
.invoice-discount-order {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 2px;
}
.invoice-discount-order > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: .72rem;
    font-weight: 800;
}
.invoice-discount-order-buttons {
    display: grid;
    grid-template-columns: repeat(2, 30px);
    gap: 4px;
}
.invoice-discount-order-buttons form {
    display: contents;
}
.invoice-discount-order-buttons .icon-button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--surface-soft);
}
.invoice-discount-order-buttons .icon-button:hover:not(:disabled) {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
.invoice-discount-order-buttons .icon-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}
.invoice-discount-order-buttons .icon {
    width: 15px;
    height: 15px;
}
.invoice-discount-edit-form {
    display: grid;
    grid-template-columns: minmax(150px, 190px) auto;
    align-items: end;
    justify-content: start;
    gap: 8px;
    min-width: 0;
}
.invoice-discount-edit-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.invoice-discount-edit-form label > span {
    color: var(--text-secondary);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .01em;
}
.invoice-discount-edit-form .settings-input-unit {
    border-color: var(--border-strong);
    border-radius: 10px;
    background: var(--input-bg);
}
.invoice-discount-edit-form .settings-input-unit input {
    min-height: 38px;
    font-size: .9rem;
}
.invoice-discount-edit-form .settings-input-unit span {
    min-width: 38px;
    justify-content: center;
}
.invoice-discount-edit-form .small-button {
    min-height: 38px;
    white-space: nowrap;
}
.invoice-discount-status-block {
    display: grid;
    justify-items: start;
    gap: 6px;
}
.invoice-discount-status-block small {
    color: var(--text-secondary);
    font-size: .66rem;
    white-space: nowrap;
}
.invoice-discount-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.invoice-discount-row-actions form {
    display: inline-flex;
}
.invoice-discount-row-actions .small-button {
    min-height: 38px;
    white-space: nowrap;
}
.invoice-discount-empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px;
    padding: 22px;
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    background: var(--surface-soft);
}
.invoice-discount-empty-icon,
.invoice-discount-history-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}
.invoice-discount-empty-icon .icon,
.invoice-discount-history-icon .icon {
    width: 19px;
    height: 19px;
}
.invoice-discount-empty-state strong,
.invoice-discount-history-note strong {
    display: block;
    color: var(--text);
    font-size: .8rem;
}
.invoice-discount-empty-state p,
.invoice-discount-history-note span:last-child {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: .72rem;
    line-height: 1.5;
}
.invoice-discount-history-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
}
.invoice-discounts-migration-alert {
    margin: 22px 28px 28px;
}
@media (max-width: 1120px) {
    .invoice-discount-settings-row {
        grid-template-columns: auto minmax(240px, 1fr) auto;
    }
    .invoice-discount-status-block {
        justify-self: end;
    }
    .invoice-discount-row-actions {
        grid-column: 2 / -1;
        justify-content: flex-end;
        padding-top: 2px;
    }
}
@media (max-width: 760px) {
    .invoice-discounts-settings-panel > .settings-form-header {
        padding: 20px;
    }
    .invoice-discounts-settings-content {
        padding: 18px;
    }
    .invoice-discount-create-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }
    .invoice-discount-create-form {
        align-items: stretch;
    }
    .invoice-discount-create-form .settings-input-unit {
        width: 100%;
    }
    .invoice-discount-list-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }
    .invoice-discount-settings-row {
        grid-template-columns: auto 1fr;
        gap: 12px;
        padding: 14px;
    }
    .invoice-discount-edit-form,
    .invoice-discount-status-block,
    .invoice-discount-row-actions {
        grid-column: 1 / -1;
    }
    .invoice-discount-edit-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .invoice-discount-status-block {
        justify-self: stretch;
    }
    .invoice-discount-row-actions {
        justify-content: stretch;
    }
    .invoice-discount-row-actions form {
        flex: 1 1 0;
    }
    .invoice-discount-row-actions .small-button {
        width: 100%;
        justify-content: center;
    }
    .invoice-discounts-migration-alert {
        margin: 18px;
    }
}
@media (max-width: 480px) {
    .invoice-discount-create-form,
    .invoice-discount-edit-form,
    .invoice-discount-row-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .invoice-discount-create-form {
        display: grid;
    }
    .invoice-discount-create-form .primary-button,
    .invoice-discount-edit-form .small-button {
        width: 100%;
        justify-content: center;
    }
    .invoice-discount-list-stats {
        flex-wrap: wrap;
    }
}

/* Profile: work presence alarm volume — v4.79.1 */
.profile-presence-volume-section { margin:5px 0 0; padding:11px 7px 10px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.profile-presence-volume-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.profile-presence-volume-heading>div { min-width:0; }
.profile-presence-volume-heading .profile-menu-section-label { padding:0 0 2px; }
.profile-presence-volume-heading small { display:block; color:var(--text-faint); font-size:.61rem; line-height:1.3; }
.profile-presence-volume-value { min-width:48px; display:inline-flex; align-items:center; justify-content:center; margin-top:1px; padding:5px 8px; border:1px solid color-mix(in srgb,var(--blue-500) 28%,var(--border)); border-radius:9px; background:color-mix(in srgb,var(--blue-500) 8%,var(--surface)); color:var(--blue-600); font-size:.72rem; font-weight:850; line-height:1; font-variant-numeric:tabular-nums; }
.dark .profile-presence-volume-value { color:var(--blue-200); }
.profile-presence-volume-control { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; margin-top:10px; }
.profile-presence-volume-slider { min-width:0; display:grid; gap:3px; }
.profile-presence-volume-control input[type="range"] { width:100%; height:18px; margin:0; accent-color:var(--blue-500); cursor:pointer; }
.profile-presence-volume-control input[type="range"]:focus-visible { outline:2px solid var(--brand-accent-500); outline-offset:3px; border-radius:999px; }
.profile-presence-volume-control input[type="range"]:disabled { opacity:.5; cursor:not-allowed; }
.profile-presence-volume-scale { display:flex; justify-content:space-between; padding:0 2px; color:var(--text-faint); font-size:.54rem; font-weight:700; font-variant-numeric:tabular-nums; }
.profile-presence-test-button { min-height:36px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0 11px; border:1px solid color-mix(in srgb,var(--blue-500) 24%,var(--border)); border-radius:10px; background:color-mix(in srgb,var(--blue-500) 6%,var(--surface)); color:var(--text); font:inherit; font-size:.68rem; font-weight:800; cursor:pointer; transition:border-color .16s ease,background .16s ease,transform .16s ease; }
.profile-presence-test-button:hover:not(:disabled) { border-color:var(--blue-500); background:color-mix(in srgb,var(--blue-500) 11%,var(--surface)); transform:translateY(-1px); }
.profile-presence-test-button:disabled { opacity:.5; cursor:not-allowed; }
.profile-presence-test-button .icon { width:14px; height:14px; color:var(--blue-600); }
.profile-presence-volume-note { display:block; margin-top:7px; color:var(--text-faint); font-size:.59rem; line-height:1.35; }

/* Resto Panel 4.84.0: kategorie edycji konta pracownika */
.account-editor-category-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.account-editor-category-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: max-content;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.account-editor-category-tab .icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.account-editor-category-tab:hover,
.account-editor-category-tab:focus-visible {
    border-color: var(--border);
    background: var(--surface-hover);
    color: var(--text);
    outline: 0;
}

.account-editor-category-tab.is-active {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    color: var(--text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}

.dark .account-editor-category-tab.is-active {
    background: color-mix(in srgb, var(--accent) 13%, var(--surface));
}

@media (max-width: 760px) {
    .account-editor-category-nav {
        justify-content: flex-start;
    }

    .account-editor-category-tab {
        flex: 0 0 auto;
        min-height: 42px;
        padding-inline: 14px;
    }
}

@media (max-width: 520px) {
    .account-editor-category-tab span {
        white-space: nowrap;
    }
}

/* Dashboard 4.86.0 — permission-aware operational home */
.dashboard-home-hero { margin-bottom: 18px; }
.dashboard-command-status.tone-warning .dashboard-command-status-icon { background: color-mix(in srgb, var(--dashboard-attention-fill) 13%, var(--surface)); color: var(--dashboard-attention-text); }
.dashboard-command-status.tone-success .dashboard-command-status-icon { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.dashboard-primary-grid,
.dashboard-summary-grid,
.dashboard-operations-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dashboard-primary-grid.has-single-panel,
.dashboard-summary-grid.has-single-panel { grid-template-columns: minmax(0, 1fr); }
.dashboard-my-work-panel,
.dashboard-week-panel,
.dashboard-management-overview-panel,
.dashboard-home-activity { padding: 20px; }
.dashboard-my-work-panel { display: grid; gap: 18px; }
.dashboard-work-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; padding: 17px 18px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.dashboard-work-clock { display: grid; gap: 4px; min-width: 0; }
.dashboard-work-clock small { color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dashboard-work-clock strong { font-size: clamp(27px, 3vw, 38px); line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.dashboard-work-clock span { color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.dashboard-work-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.dashboard-work-actions .primary-button,
.dashboard-work-actions .secondary-button { min-height: 42px; }
.dashboard-work-week-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-work-week-mini > div { display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 13px; background: color-mix(in srgb, var(--surface-soft) 74%, transparent); }
.dashboard-work-week-mini small { color: var(--text-secondary); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-work-week-mini strong { font-size: 15px; }
.dashboard-week-panel { display: grid; gap: 16px; }
.dashboard-week-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.dashboard-week-stats > div { display: grid; gap: 5px; min-width: 0; padding: 14px 15px; border-right: 1px solid var(--border); }
.dashboard-week-stats > div:last-child { border-right: 0; }
.dashboard-week-stats small { color: var(--text-secondary); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-week-stats strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.dashboard-week-stats .tone-accepted strong { color: var(--success); }
.dashboard-week-stats .tone-pending strong { color: var(--dashboard-attention-text); }
.dashboard-week-stats .tone-rejected strong { color: var(--danger,#dc5252); }
.dashboard-week-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--text-secondary); font-size: 10px; }
.dashboard-week-footer span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-week-footer .icon { width: 14px; height: 14px; }
.dashboard-management-overview-panel { display: grid; gap: 14px; }
.dashboard-management-overview-list { display: grid; gap: 9px; }
.dashboard-management-overview-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 68px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); color: var(--text); text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.dashboard-management-overview-row:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue-500) 42%, var(--border)); background: var(--surface-hover); }
.dashboard-management-overview-row > span:nth-child(2) { display: grid; min-width: 0; }
.dashboard-management-overview-row small { color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.dashboard-management-overview-row strong { margin-top: 1px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-management-overview-row em { margin-top: 3px; overflow: hidden; color: var(--text-secondary); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-management-overview-row > .icon { width: 15px; height: 15px; color: var(--text-faint); }
.dashboard-operations-grid .dashboard-today-panel,
.dashboard-operations-grid .dashboard-quick-panel-v2 { min-width: 0; }
.dashboard-operations-grid .dashboard-today-row { grid-template-columns: 40px minmax(0, 1fr) 16px; border: 1px solid transparent; color: var(--text); text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.dashboard-operations-grid .dashboard-today-row:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue-500) 38%, var(--border)); background: var(--surface-hover); }
.dashboard-today-arrow { width: 15px; height: 15px; color: var(--text-faint); }
.dashboard-home-activity { margin-top: 0; }
.dashboard-home-activity .dashboard-activity-list-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.dashboard-home-activity .activity-item { border-top: 1px solid var(--border); }
.dashboard-home-activity .activity-item:nth-child(-n+2) { border-top: 0; }

@media (max-width: 1080px) {
    .dashboard-primary-grid,
    .dashboard-summary-grid,
    .dashboard-operations-grid { grid-template-columns: 1fr; }
    .dashboard-home-activity .dashboard-activity-list-v2 { grid-template-columns: 1fr; }
    .dashboard-home-activity .activity-item:nth-child(2) { border-top: 1px solid var(--border); }
}

@media (max-width: 720px) {
    .dashboard-my-work-panel,
    .dashboard-week-panel,
    .dashboard-management-overview-panel,
    .dashboard-home-activity { padding: 17px; }
    .dashboard-work-main { grid-template-columns: 1fr; align-items: stretch; padding: 15px; }
    .dashboard-work-actions { justify-content: stretch; }
    .dashboard-work-actions .primary-button,
    .dashboard-work-actions .secondary-button { flex: 1 1 180px; justify-content: center; }
    .dashboard-work-week-mini { grid-template-columns: 1fr; }
    .dashboard-week-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-week-stats > div { border-bottom: 1px solid var(--border); }
    .dashboard-week-stats > div:nth-child(2n) { border-right: 0; }
    .dashboard-week-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 460px) {
    .dashboard-week-stats { grid-template-columns: 1fr; }
    .dashboard-week-stats > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .dashboard-week-stats > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
    .dashboard-week-stats > div:last-child { border-bottom: 0; }
}

/* v4.96.0 — ilość odebranych sztuk w zgłoszeniu współpracy */
.collaboration-quantity{display:grid;gap:10px}.collaboration-quantity>label{font-weight:700;font-size:.85rem;color:var(--text)}
.collaboration-quantity-stepper{display:flex;gap:10px;align-items:stretch;max-width:300px}
.collaboration-quantity-stepper>button{width:48px;min-height:48px;flex:0 0 48px;font-size:1.35rem;justify-content:center}
.collaboration-quantity-stepper>input{width:82px;max-width:100%;min-height:48px;padding:8px;text-align:center;font-size:1.25rem;font-weight:800;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface);color:var(--text)}
.collaboration-quantity>small{font-size:.77rem;color:var(--text-secondary)}
.collaboration-quantity-label{color:var(--text-secondary);font-size:.82rem}.collaboration-quantity-label strong{color:var(--text)}
@media(max-width:650px){.collaboration-quantity-stepper{max-width:none}.collaboration-quantity-stepper>input{flex:1}}


/* v4.96.1 — Współprace: spójny formularz i zintegrowany wybór sztuk */
.collaboration-form-modern .collaboration-form-intro{background:linear-gradient(115deg,color-mix(in srgb,var(--blue-500) 5%,var(--surface)) 0%,var(--surface) 85%)}
.collaboration-form-modern .collaboration-form-step{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-color:color-mix(in srgb,var(--blue-500) 55%,var(--border));background:color-mix(in srgb,var(--blue-500) 10%,var(--surface));color:var(--text);white-space:nowrap}
.collaboration-form-step .icon{width:18px;height:18px;color:var(--blue-500)}
.collaboration-form-modern .collaboration-form-grid{gap:18px}
.collaboration-form-modern .collaboration-company-card,.collaboration-form-modern .collaboration-upload-card{border-color:var(--border-strong);background:color-mix(in srgb,var(--surface-soft) 84%,var(--surface))}
.collaboration-form-modern .collaboration-company-card{justify-content:flex-start;gap:18px}
.collaboration-form-modern .collaboration-company-card .form-field{gap:8px}
.collaboration-form-modern .collaboration-field-title,.collaboration-form-modern .collaboration-quantity-title{display:flex;align-items:center;gap:10px;font-weight:750;color:var(--text)}
.collaboration-form-modern .collaboration-field-title .icon,.collaboration-form-modern .collaboration-quantity-title .icon{width:19px;height:19px;flex:none;color:var(--blue-500)}
.collaboration-form-modern .collaboration-company-card select{min-height:48px;border-color:var(--border-strong);border-radius:12px;background:var(--surface-soft)}
.collaboration-form-modern .collaboration-company-card select:focus-visible{outline:2px solid var(--blue-500);outline-offset:2px}
.collaboration-employee-stats{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:0 0 15px;border-bottom:1px solid var(--border);font-size:.79rem;color:var(--text-secondary)}
.collaboration-employee-stats[hidden]{display:none}
.collaboration-employee-stats>span{display:inline-flex;align-items:center;gap:6px}
.collaboration-employee-stats .icon{width:17px;height:17px;color:var(--blue-500)}
.collaboration-employee-stats strong{color:var(--blue-500);font-weight:800}
.collaboration-employee-remaining strong,.collaboration-employee-remaining .icon{color:#20b881}
.collaboration-form-modern .collaboration-quantity{gap:10px}
.collaboration-form-modern .collaboration-quantity-stepper{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;gap:0;width:min(100%,370px);max-width:none;min-height:64px;margin:2px auto 0;border:2px solid color-mix(in srgb,var(--blue-500) 75%,var(--border-strong));border-radius:17px;overflow:hidden;background:var(--surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--blue-500) 6%,transparent)}
.collaboration-form-modern .collaboration-quantity-stepper:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--blue-500) 23%,transparent)}
.collaboration-form-modern .collaboration-quantity-stepper>button{width:auto;min-height:60px;flex:unset;border:0;border-radius:14px;background:color-mix(in srgb,var(--blue-500) 12%,var(--surface-soft));color:var(--text);font-size:1.75rem;line-height:1;font-weight:700;box-shadow:none}
.collaboration-form-modern .collaboration-quantity-stepper>button:hover:not(:disabled){background:color-mix(in srgb,var(--blue-500) 24%,var(--surface-soft))}
.collaboration-form-modern .collaboration-quantity-stepper>button:disabled{opacity:.36;cursor:not-allowed}
.collaboration-form-modern .collaboration-quantity-stepper>button:focus-visible{outline:2px solid var(--blue-500);outline-offset:-4px}
.collaboration-form-modern .collaboration-quantity-stepper>input{width:100%;max-width:none;min-width:0;min-height:60px;margin:0;padding:8px 2px;border:0;border-radius:0;outline:0!important;box-shadow:none!important;background:transparent;text-align:center;font-size:1.8rem;font-weight:800;line-height:1.1;color:var(--text);appearance:textfield;-moz-appearance:textfield}
.collaboration-form-modern .collaboration-quantity-stepper>input::-webkit-inner-spin-button,.collaboration-form-modern .collaboration-quantity-stepper>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.collaboration-form-modern .collaboration-quantity>small{min-height:18px;text-align:center;font-size:.77rem}
.collaboration-form-modern .collaboration-help{gap:11px;padding:13px 14px;background:color-mix(in srgb,var(--blue-500) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--blue-500) 15%,transparent)}
.collaboration-form-modern .collaboration-help .icon{color:var(--blue-500)}
.collaboration-form-modern .collaboration-upload-card .form-field{display:flex;flex-direction:column;gap:12px}
.collaboration-form-modern .collaboration-upload-card .collaboration-dropzone{flex:1;min-height:330px;border-color:color-mix(in srgb,var(--blue-500) 75%,var(--border));background:color-mix(in srgb,var(--blue-500) 6%,var(--surface-soft))}
.collaboration-form-modern .collaboration-dropzone:hover,.collaboration-form-modern .collaboration-dropzone:focus-visible{border-color:var(--blue-500);background:color-mix(in srgb,var(--blue-500) 11%,var(--surface-soft))}
.collaboration-form-modern .collaboration-dropzone-icon{background:color-mix(in srgb,var(--blue-500) 16%,var(--surface))}
.collaboration-form-modern .collaboration-form-footer{gap:16px}
@media(max-width:1050px){.collaboration-form-modern .collaboration-upload-card .collaboration-dropzone{min-height:260px}}
@media(max-width:650px){.collaboration-form-modern .collaboration-form-intro{padding:18px 16px}.collaboration-form-modern .collaboration-form-step{white-space:normal}.collaboration-form-modern .collaboration-company-card{gap:17px}.collaboration-form-modern .collaboration-form-grid{gap:14px}.collaboration-form-modern .collaboration-quantity-stepper{grid-template-columns:56px minmax(0,1fr) 56px;min-height:56px}.collaboration-form-modern .collaboration-quantity-stepper>button,.collaboration-form-modern .collaboration-quantity-stepper>input{min-height:56px}.collaboration-form-modern .collaboration-upload-card .collaboration-dropzone{min-height:230px}}

.collaboration-form-modern [data-collaboration-employee-help][hidden]{display:none}


/* v4.96.2 — podgląd zdjęcia wewnątrz pola uploadu i czytelne akcje */
.collaboration-form-modern .collaboration-dropzone{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:0;padding:0;overflow:hidden;cursor:default}
.collaboration-form-modern .collaboration-dropzone-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;flex:1;min-height:328px;padding:22px;text-align:center;cursor:pointer}
.collaboration-form-modern .collaboration-dropzone-prompt[hidden],.collaboration-form-modern .collaboration-preview[hidden],.collaboration-form-modern [data-collaboration-photo-remove][hidden],.collaboration-form-modern .collaboration-upload-error[hidden]{display:none!important}
.collaboration-form-modern .collaboration-dropzone:focus-visible{outline:2px solid var(--blue-500);outline-offset:3px}
.collaboration-form-modern .collaboration-dropzone.has-preview{border-style:solid;background:color-mix(in srgb,var(--surface-soft) 90%,var(--surface))}
.collaboration-form-modern .collaboration-dropzone .collaboration-preview{display:flex;flex-direction:column;flex:1;width:100%;min-height:328px;margin:0;padding:0;border:0;border-radius:15px;overflow:hidden;background:var(--surface-soft)}
.collaboration-form-modern .collaboration-dropzone .collaboration-preview img{display:block;width:100%;height:100%;flex:1;min-height:210px;max-height:440px;object-fit:contain;border:0;border-radius:0;background:color-mix(in srgb,var(--page-bg) 80%,#000)}
.collaboration-form-modern .collaboration-preview-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;background:var(--surface)}
.collaboration-form-modern .collaboration-preview-bar>span{overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary);font-size:.76rem;font-weight:600}
.collaboration-form-modern .collaboration-photo-actions{display:flex;gap:8px;flex-wrap:wrap}
.collaboration-form-modern .collaboration-photo-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 12px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface-soft);color:var(--text);font-size:.78rem;font-weight:700;box-shadow:none;white-space:nowrap}
.collaboration-form-modern .collaboration-photo-actions button:hover{border-color:var(--blue-500);background:color-mix(in srgb,var(--blue-500) 13%,var(--surface-soft))}
.collaboration-form-modern .collaboration-photo-actions button .icon{width:16px;height:16px}
.collaboration-form-modern .collaboration-upload-error{margin:0;padding:10px 14px;color:#fca5a5;background:color-mix(in srgb,#ef4444 12%,var(--surface));font-size:.78rem}
.collaboration-form-modern .collaboration-form-footer .collaboration-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.collaboration-form-modern .collaboration-form-actions>.collaboration-cancel-button,.collaboration-form-modern .collaboration-form-actions>.collaboration-submit-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;margin:0;padding:10px 18px;border-radius:12px;font-size:.84rem;font-weight:750;line-height:1.2;text-decoration:none;white-space:nowrap}
.collaboration-form-modern .collaboration-form-actions>.collaboration-cancel-button{border:1px solid var(--border-strong);background:var(--surface-soft);color:var(--text)}
.collaboration-form-modern .collaboration-form-actions>.collaboration-submit-button:not(:disabled){border:1px solid color-mix(in srgb,var(--blue-500) 82%,var(--border));background:var(--blue-500);color:#fff;box-shadow:0 5px 16px color-mix(in srgb,var(--blue-500) 16%,transparent)}
.collaboration-form-modern .collaboration-form-actions>.collaboration-submit-button:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}
.collaboration-form-modern .collaboration-form-actions>.collaboration-submit-button .icon{width:17px;height:17px}
.collaboration-form-modern .collaboration-form-actions>:focus-visible,.collaboration-form-modern .collaboration-photo-actions button:focus-visible{outline:2px solid var(--blue-500);outline-offset:3px}
@media(max-width:1050px){.collaboration-form-modern .collaboration-dropzone-prompt,.collaboration-form-modern .collaboration-dropzone .collaboration-preview{min-height:260px}}
@media(max-width:650px){.collaboration-form-modern .collaboration-dropzone-prompt,.collaboration-form-modern .collaboration-dropzone .collaboration-preview{min-height:220px}.collaboration-form-modern .collaboration-form-actions{width:100%}.collaboration-form-modern .collaboration-form-actions>*{flex:1;min-width:0}.collaboration-form-modern .collaboration-preview-bar{align-items:stretch;flex-direction:column}.collaboration-form-modern .collaboration-photo-actions button{flex:1}}
