@font-face {
    font-family: Cosmica;
    src: url("/fonts/cosmica/MonaSans-Medium.woff2") format("woff2");
    font-weight: 300 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Cosmica;
    src: url("/fonts/cosmica/MonaSans-SemiBold.woff2") format("woff2");
    font-weight: 600 700;
    font-style: normal;
    font-display: swap;
}

.fi-panel-ops,
.fi-simple.fi-panel-ops {
    --side: #f4f4f5;
    --side-line: #e6e6e8;
    --side-active: #ffffff;
    --canvas: #ffffff;
    --frame: #ffffff;
    --frame-line: #e6e6e8;
    --card: #ffffff;
    --line: #ededef;
    --line-strong: #dcdce0;
    --text: #16161a;
    --text-2: #3d3d44;
    --muted: #7d7d84;
    --faint: #b3b3b9;
    --ink: #1b1b1f;
    --ink-hover: #303036;
    --ok: #1f9254;
    --ok-soft: #ecf7f0;
    --ok-line: #cfeadb;
    --warn: #c98a12;
    --warn-soft: #fdf5e4;
    --warn-line: #f3e2b8;
    --danger: #c94a3f;
    --danger-soft: #fbeeec;
    --brand: #6426fd;
    --dot-empty: #efeff1;
    --dot-mid: #d6d6da;
    --dot-full: #1b1b1f;
    --r-lg: 14px;
    --r: 10px;
    --r-sm: 8px;
    --shadow-active: 0 1px 2px rgba(15, 15, 20, 0.06), 0 0 0 1px rgba(15, 15, 20, 0.05);
    --shadow-pop: 0 14px 36px rgba(15, 15, 20, 0.12), 0 0 0 1px rgba(15, 15, 20, 0.06);
    --font-sans: Cosmica, Arial, sans-serif;
    --side-w: 248px;
    --sidebar-width: 248px !important;
    --collapsed-sidebar-width: 4.5rem !important;
    --topbar-height: 56px !important;
    --font-family: Cosmica, Arial, sans-serif !important;
    --shell-ease: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.fi:has(.fi-panel-ops) {
    background: var(--side, #f4f4f5);
}

.fi-body.fi-panel-ops {
    font-family: Cosmica, Arial, sans-serif !important;
    font-size: 14px !important;
    color: #16161a !important;
    background: #f4f4f5 !important;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

.fi-panel-ops.dark {
    color-scheme: light;
}

.fi-panel-ops.dark,
.fi-panel-ops.dark .fi-body {
    background: #f4f4f5 !important;
}

/* ===== SHELL: ElevenLabs-like - collapsible sidebar + clean canvas ===== */
html.fi:has(.fi-panel-ops),
html.fi:has(.fi-panel-ops) body,
.fi-body.fi-panel-ops {
    min-height: 100vh;
    height: 100%;
}

.fi-body.fi-panel-ops {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.fi-panel-ops .fi-topbar-ctn {
    position: fixed !important;
    left: var(--side-w) !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 45;
    height: 56px !important;
    width: auto !important;
    max-width: none !important;
    transition: left var(--shell-ease);
}

html[data-crm-sidebar="closed"] .fi-panel-ops .fi-topbar-ctn {
    left: 0 !important;
}

html.crm-nav .fi-panel-ops .fi-topbar-ctn {
    transition: none !important;
}

.fi-panel-ops .fi-topbar {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 18px !important;
    background: #fff !important;
    border-bottom: 1px solid #ededef !important;
    box-shadow: none !important;
    gap: 10px !important;
}

.crm-top-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    margin-right: 4px;
    line-height: 1.15;
}

.crm-top-kicker {
    font-size: 11px;
    color: #8e8e95;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.crm-top-heading {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #16161a;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Toggle sidebar - sama ikona, bez kwadratu/ramki */
.fi-panel-ops .fi-topbar-start > a,
.fi-panel-ops .fi-topbar .fi-logo {
    display: none !important;
}

.fi-panel-ops .fi-topbar-start {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-right: 0 !important;
}

.fi-panel-ops .fi-topbar-collapse-sidebar-btn-ctn {
    display: flex !important;
    width: auto !important;
    flex-shrink: 0;
}

.fi-panel-ops .fi-topbar-open-sidebar-btn,
.fi-panel-ops .fi-topbar-close-sidebar-btn,
.fi-panel-ops .fi-topbar-open-collapse-sidebar-btn,
.fi-panel-ops .fi-topbar-close-collapse-sidebar-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #3d3d44 !important;
}

.fi-panel-ops .fi-topbar-open-sidebar-btn:hover,
.fi-panel-ops .fi-topbar-close-sidebar-btn:hover,
.fi-panel-ops .fi-topbar-open-collapse-sidebar-btn:hover,
.fi-panel-ops .fi-topbar-close-collapse-sidebar-btn:hover {
    background: #f3f3f5 !important;
    color: #16161a !important;
}

/* Na desktopie zamykanie przez ikonę panelu; hamburger-X zostaje na mobile */
@media (min-width: 1024px) {
    .fi-panel-ops .fi-topbar-close-sidebar-btn {
        display: none !important;
    }
}

.fi-panel-ops .fi-layout {
    display: block !important;
    min-width: 0;
    width: 100%;
    height: 100vh !important;
    min-height: 100vh !important;
    padding: 56px 0 0 var(--side-w) !important;
    background: #fff !important;
    box-sizing: border-box;
    transition: padding-left var(--shell-ease);
}

html[data-crm-sidebar="closed"] .fi-panel-ops .fi-layout {
    padding-left: 0 !important;
}

html.crm-nav .fi-panel-ops .fi-layout {
    transition: none !important;
}

.fi-panel-ops .fi-main-sidebar,
.fi-panel-ops .fi-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: var(--side-w) !important;
    max-width: var(--side-w) !important;
    transform: translateX(0) !important;
    background: #f4f4f5 !important;
    box-shadow: none !important;
    border: 0 !important;
    border-right: 1px solid #e6e6e8 !important;
    padding: 14px 12px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    z-index: 50 !important;
    overflow-y: auto !important;
    transition: transform var(--shell-ease) !important;
}

/* Nie chowaj sidebara przed Alpine (x-cloak powodował „mignięcie”) */
.fi-panel-ops .fi-sidebar[x-cloak] {
    display: flex !important;
}

html[data-crm-sidebar="closed"] .fi-panel-ops .fi-sidebar {
    transform: translateX(-105%) !important;
}

html.crm-nav .fi-panel-ops .fi-sidebar {
    transition: none !important;
}

.fi-panel-ops.fi-body-has-topbar .fi-sidebar {
    top: 0 !important;
    height: 100vh !important;
}

/* Ukryj domyślne logo Filament - własny brand w nav */
.fi-panel-ops .fi-sidebar-header-ctn,
.fi-panel-ops .fi-sidebar-header,
.fi-panel-ops .fi-sidebar-header-logo-ctn,
.fi-panel-ops .fi-sidebar .fi-logo {
    display: none !important;
}

.crm-side-brand {
    padding: 4px 10px 14px;
}

.crm-side-brand-mark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.crm-side-brand-name {
    font-size: 17px;
    font-weight: 650;
    color: #0f0f12;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.fi-panel-ops .fi-sidebar-nav {
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
}

.fi-panel-ops .fi-sidebar-nav-groups {
    margin: 0 !important;
    gap: 0 !important;
}

.fi-panel-ops .fi-sidebar-group {
    padding-top: 16px;
    margin-top: 0;
    border-top: 1px solid #e6e6e8;
    gap: 2px !important;
}

.fi-panel-ops .fi-sidebar-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.fi-panel-ops .fi-sidebar-group-btn {
    padding: 0 10px 6px !important;
    cursor: default !important;
    pointer-events: none;
}

.fi-panel-ops .fi-sidebar-group-collapse-btn {
    display: none !important;
}

.fi-panel-ops .fi-sidebar-group-label {
    font-size: 12px !important;
    color: #7d7d84 !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.fi-panel-ops .fi-sidebar-group-items {
    gap: 2px !important;
    display: flex !important;
}

.fi-panel-ops .fi-sidebar-item-btn {
    height: 34px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    gap: 10px !important;
    color: #3d3d44 !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fi-panel-ops .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.55) !important;
    color: #16161a !important;
}

.fi-panel-ops .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-panel-ops .fi-sidebar-item-active .fi-sidebar-item-btn {
    background: #fff !important;
    color: #16161a !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15, 15, 20, 0.06), 0 0 0 1px rgba(15, 15, 20, 0.05) !important;
}

.fi-panel-ops .fi-sidebar-item-icon {
    width: 17px !important;
    height: 17px !important;
    color: #7d7d84 !important;
}

.fi-panel-ops .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #16161a !important;
}

.fi-panel-ops .fi-sidebar-item-label {
    font-size: 13.5px !important;
}

.fi-panel-ops .fi-main-ctn {
    flex: 1 1 auto !important;
    min-width: 0;
    min-height: calc(100vh - 56px) !important;
    height: calc(100vh - 56px) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border-left: 0 !important;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    overflow: hidden !important;
    transition: none !important;
}

.fi-panel-ops .fi-main {
    max-width: none !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 100% !important;
    height: 100% !important;
    padding: 22px 20px 40px !important;
    background: #fff !important;
    overflow-y: auto !important;
    box-sizing: border-box;
}

.fi-panel-ops .fi-page,
.fi-panel-ops .fi-page-header-main-ctn,
.fi-panel-ops .fi-page-main,
.fi-panel-ops .fi-page-content {
    background: transparent !important;
    min-height: 0;
}

/* Tytuł jest w topbarze - bez duplikatów w treści */
.fi-panel-ops .fi-header,
.fi-panel-ops .fi-page-header,
.fi-panel-ops .fi-breadcrumbs,
.fi-panel-ops .fi-page-header-main-ctn > header,
.fi-panel-ops .fi-header-heading,
.fi-panel-ops .fi-header-subheading {
    display: none !important;
}

.fi-panel-ops .fi-user-avatar,
.fi-panel-ops .fi-avatar {
    border-radius: 999px !important;
    width: 30px !important;
    height: 30px !important;
}

/* Globalne icon-btn bez wymuszania ramki - ramki tylko w topbar-end */
.fi-panel-ops .fi-icon-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #6f6f76 !important;
}

.fi-panel-ops .fi-btn {
    height: 32px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 1px rgba(15, 15, 20, 0.04) !important;
}

.fi-panel-ops .fi-btn-color-primary {
    background: linear-gradient(#3b3b40, #2b2b30) !important;
    border-color: #26262b !important;
    color: #fff !important;
}

.fi-panel-ops .fi-ta-ctn,
.fi-panel-ops .fi-section {
    background: #fff !important;
    border: 1px solid #e6e6e8 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.fi-panel-ops .fi-section-content-ctn,
.fi-panel-ops .fi-ta {
    background: #fff !important;
    border: 0 !important;
    border-radius: 12px !important;
}

.fi-panel-ops .fi-ta-header-heading,
.fi-panel-ops .fi-section-header-heading {
    font-family: Cosmica, Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #3d3d44 !important;
    font-weight: 500 !important;
}

.fi-panel-ops .fi-ta table thead th {
    font-size: 11px !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    color: #7d7d84 !important;
}

.fi-panel-ops .fi-input,
.fi-panel-ops .fi-select-input,
.fi-panel-ops .fi-textarea {
    border-radius: 8px !important;
    border-color: #e3e3e7 !important;
    font-size: 13px !important;
}

.fi-panel-ops .fi-badge {
    border-radius: 999px !important;
    font-weight: 500 !important;
    font-size: 12px !important;
}

/* ===== PULPIT - białe kafelki jak menu (bez szarego tła) ===== */
.frame {
    background: #fff;
    border: 1px solid var(--frame-line);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: none;
}

.frame > .inner {
    background: #fff;
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
}

.frame-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 0;
}

.cap {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
    font-weight: 500;
}

.frame-head .info {
    width: 14px;
    height: 14px;
    color: var(--faint);
}

.frame-head a.link {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.frame-head a.link:hover {
    color: var(--text);
}

.frame-head a.link svg {
    width: 13px;
    height: 13px;
}

.psum > .inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0;
}

.ps {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.ps + .ps {
    border-left: 1px solid var(--line);
}

a.ps:hover {
    background: #fafafa;
}

.ps-cap {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}

.ps-cap svg {
    width: 14px;
    height: 14px;
    color: var(--faint);
    flex: none;
}

.ps-delta {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.ps-delta b {
    font-weight: 500;
    color: var(--text-2);
}

.ps-val {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;
}

.ps-val strong {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.ps-val .cur {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}

.ps-val .sub {
    font-size: 12.5px;
    color: var(--muted);
    margin-left: 4px;
}

.ps-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ps-stack {
    display: flex;
    height: 6px;
    border-radius: 99px;
    overflow: hidden;
    gap: 2px;
    background: var(--dot-empty);
}

.ps-stack i {
    display: block;
    height: 100%;
    border-radius: 99px;
    min-width: 4px;
}

.ps-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    font-size: 12px;
    color: var(--muted);
    min-height: 18px;
}

.ps-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ps-legend i {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    flex: none;
}

.ps-legend b {
    color: var(--text-2);
    font-weight: 500;
}

.ps-cols {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 30px;
}

.ps-cols span {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.ps-cols i {
    display: block;
    width: 100%;
    max-width: 22px;
    border-radius: 3px;
    background: var(--dot-mid);
}

.ps-cols span.on i {
    background: var(--ink);
}

.ps-months {
    display: flex;
    gap: 5px;
    font-size: 11px;
    color: var(--faint);
    margin-top: -4px;
}

.ps-months span {
    flex: 1;
    text-align: center;
}

.ps-months span.on {
    color: var(--text-2);
    font-weight: 500;
}

.ps-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    min-height: 18px;
}

.ps-note .warn {
    color: var(--warn);
    font-weight: 500;
}

.ps-note .bad {
    color: var(--danger);
    font-weight: 500;
}

.row-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 12px;
}

.ws-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.ws-page .tbl-bar {
    padding: 12px 16px 0;
}

.ws-page .tbl-inner {
    border-radius: 12px;
}

.ws-page .alert {
    background: #f7f7f8;
}

.ws-page .seg {
    background: #f4f4f5;
}

.chart-top {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.chart-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.chart-total strong {
    font-size: 24px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.legend {
    display: flex;
    gap: 16px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend i {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    display: block;
}

.seg {
    margin-left: auto;
    display: flex;
    background: #f1f1f3;
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}

.seg span,
.seg button {
    height: 26px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
}

.seg .is-on {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.dot-matrix {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding: 8px 0 0;
}

.dot-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    min-width: 0;
}

.dot-col .cells {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    width: 100%;
    max-width: 28px;
}

.dot-col .cells i {
    display: block;
    flex: 1;
    border-radius: 1.5px;
    background: var(--dot-empty);
    min-height: 4px;
}

.dot-col .cells i.mid {
    background: var(--dot-mid);
}

.dot-col .cells i.full {
    background: var(--dot-full);
}

.dot-col em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--faint);
    text-transform: uppercase;
}

.dot-col.on em {
    color: var(--text);
    font-weight: 600;
}

.status-top small {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.status-top strong {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.status-top strong span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 6px;
    padding: 9px 11px;
    border-radius: var(--r-sm);
    background: #f4f4f6;
    font-size: 12.5px;
    color: var(--text-2);
    text-decoration: none;
}

.alert:hover {
    background: #ededf0;
}

.alert .ic {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #fff;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
}

.alert .ic svg {
    width: 13px;
    height: 13px;
    color: var(--danger);
}

.alert > svg {
    margin-left: auto;
    width: 15px;
    height: 15px;
    color: var(--muted);
}

.st-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.st-row-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 7px;
    color: var(--text-2);
    text-decoration: none;
}

.st-row-head i {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    display: block;
}

.st-row-head b {
    margin-left: auto;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.st-row-head em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted);
    width: 38px;
    text-align: right;
}

.ticks {
    display: grid;
    grid-template-columns: repeat(40, 1fr);
    gap: 2px;
    height: 20px;
}

.ticks i {
    display: block;
    border-radius: 1px;
    background: var(--dot-empty);
}

.ticks i.on {
    background: var(--ink);
}

.ticks.planned i.on {
    background: #86868d;
}

.ticks.done i.on {
    background: #b6b6bc;
}

.ticks.archived i.on,
.ticks.warn i.on {
    background: #c98a12;
}

.ticks.danger i.on {
    background: #c94a3f;
}

.tbl-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 10px 12px;
}

.tbl-bar .right {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.tbl-inner {
    padding: 0 !important;
    overflow-x: auto;
}

.ws-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ws-page thead th {
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--muted);
    padding: 12px 11px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.ws-page tbody td {
    padding: 12px 11px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.ws-page tbody tr:last-child td {
    border-bottom: 0;
}

.ws-page tbody tr:hover td {
    background: #fafafb;
}

.ws-page td.id {
    color: var(--muted);
    font-size: 12.5px;
}

.ws-page td.num {
    font-weight: 500;
    text-align: right;
}

.ws-page td .job {
    font-weight: 500;
    color: inherit;
    text-decoration: none;
}

.ws-page td .job:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
}

.pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: block;
    background: currentColor;
}

.pill.done {
    color: var(--ok);
    background: var(--ok-soft);
    border-color: var(--ok-line);
}

.pill.planned {
    color: var(--warn);
    background: var(--warn-soft);
    border-color: var(--warn-line);
}

.pill.active {
    color: var(--text-2);
    background: #f4f3f0;
    border-color: var(--line-strong);
}

.pill.archived {
    color: var(--faint);
    background: #fafafb;
    border-color: var(--line);
}

.empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.empty strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 4px;
}

.fi-simple.fi-panel-ops,
.fi-simple-layout {
    background: #f4f4f5 !important;
    font-family: Cosmica, Arial, sans-serif !important;
}

@media (max-width: 1180px) {
    .psum > .inner {
        grid-template-columns: 1fr 1fr;
    }

    .ps:nth-child(3) {
        border-left: 0;
    }

    .ps:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .row-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .fi-panel-ops .fi-topbar-ctn,
    html[data-crm-sidebar="open"] .fi-panel-ops .fi-topbar-ctn {
        left: 0 !important;
    }

    .fi-panel-ops .fi-layout,
    html[data-crm-sidebar="open"] .fi-panel-ops .fi-layout {
        padding-left: 0 !important;
    }

    .fi-panel-ops .fi-main-ctn {
        border-left: 0 !important;
    }

    .crm-top-kicker {
        display: none;
    }

    .psum > .inner {
        grid-template-columns: 1fr;
    }

    .ps + .ps {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

/* Topbar end - ElevenLabs: dzwonek + avatar po prawej */
.fi-panel-ops .fi-topbar-end {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
}

.fi-panel-ops .fi-topbar-end .fi-icon-btn,
.fi-panel-ops .fi-topbar-end .fi-topbar-database-notifications-btn,
.fi-panel-ops .fi-topbar-end button.fi-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 10px !important;
    border: 1px solid #e8e8eb !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #4b4b52 !important;
}

.fi-panel-ops .fi-topbar-end .fi-icon-btn:hover,
.fi-panel-ops .fi-topbar-end .fi-topbar-database-notifications-btn:hover {
    background: #f7f7f8 !important;
    border-color: #dcdce0 !important;
    color: #16161a !important;
}

.fi-panel-ops .fi-topbar-end .fi-user-menu,
.fi-panel-ops .fi-topbar-end .fi-user-menu-trigger,
.fi-panel-ops .fi-user-menu-trigger {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-grid !important;
    place-items: center !important;
}

.fi-panel-ops .fi-topbar-end .fi-user-avatar,
.fi-panel-ops .fi-topbar-end .fi-avatar,
.fi-panel-ops .fi-user-menu-trigger .fi-avatar,
.fi-panel-ops .fi-user-menu-trigger .fi-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    box-shadow: 0 0 0 1px #e6e6e9 !important;
}

/* -- Maile (WS360 mailbox) -- */
.fi-panel-ops .fi-page:has(.mailbox) .fi-header,
.fi-panel-ops .fi-page:has(.mailbox) .fi-page-header-main-ctn > header {
    display: none !important;
}

.fi-panel-ops .fi-page:has(.mailbox) .fi-main {
    padding: 12px !important;
    overflow: hidden !important;
}

.fi-panel-ops .fi-page:has(.mailbox) .fi-page-content {
    height: 100%;
    min-height: 0;
}

.mailbox {
    display: grid;
    grid-template-columns: 220px 380px minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - var(--topbar-height, 56px) - 24px);
    min-height: 560px;
}

.mailbox > .frame {
    min-height: 0;
    background: #fff;
    border: 1px solid var(--frame-line, #e6e6e8);
    border-radius: 12px;
    overflow: hidden;
}

.mailbox > .frame > .inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 14px 16px;
    background: #fff;
}

.mailbox-pad {
    padding: 10px 8px !important;
}

.mailbox .acct {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 12px;
}

.mailbox .acct-meta {
    min-width: 0;
}

.mailbox .acct small {
    display: block;
    color: var(--muted);
    font-size: 11.5px;
}

.mailbox .acct b {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox .ini {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    background: #ececee;
    color: var(--text);
    flex: none;
}

.mailbox .ini.dark {
    background: var(--ink);
    color: #fff;
}

.mailbox .ini.round {
    border-radius: 999px;
}

.mailbox-compose {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.mailbox .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.mailbox .btn svg,
.mailbox .ibtn svg,
.mailbox .side-list button svg,
.mailbox .new-fold svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.mailbox .btn.dark,
.mailbox-modal .btn.dark {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.mailbox .btn.sm {
    height: 30px;
    font-size: 12.5px;
    padding: 0 10px;
}

.mailbox .btn.sm .chev {
    width: 14px;
    height: 14px;
}

.mailbox .ibtn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    place-items: center;
    color: var(--text-2);
    cursor: pointer;
}

.mailbox .ibtn:hover {
    background: #f4f4f6;
}

.mailbox .side-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mailbox .side-list button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.mailbox .side-list button.is-on {
    background: #1b1b1f;
    color: #fff;
}

.mailbox .side-list button.is-on svg,
.mailbox .side-list button.is-on .n {
    color: #fff;
}

.mailbox .side-list button .n {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mailbox .side-list button.drop-ok {
    outline: 1.5px dashed var(--line-strong);
    outline-offset: -2px;
}

.mailbox .side-list button.drop-over {
    background: #1b1b1f !important;
    color: #fff !important;
    outline: 0;
}

.mailbox .side-list button.drop-over svg,
.mailbox .side-list button.drop-over .n {
    color: #fff !important;
}

.mailbox .side-list button.drop-no {
    opacity: 0.4;
}

.mailbox .side-cap {
    margin: 14px 8px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--faint);
}

.mailbox .new-fold {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    border: 0;
    background: transparent;
    font-size: 12.5px;
    color: var(--muted);
    cursor: pointer;
}

.mailbox .new-fold:hover {
    background: #f5f5f6;
    color: var(--text);
}

.mailbox .drag-hint {
    font-size: 11.5px;
    color: var(--faint);
    padding: 8px 8px 0;
    line-height: 1.4;
}

.mailbox .list-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 2px 10px;
    border-bottom: 1px solid var(--line);
}

.mailbox .list-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mailbox .list-top-row .ibtn {
    margin-left: auto;
}

.mailbox .search-in {
    position: relative;
    display: block;
}

.mailbox .search-in > svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--muted);
    pointer-events: none;
}

.mailbox .input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    padding: 0 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.mailbox .input.soft {
    background: #f7f7f8;
    border-color: transparent;
    padding-left: 34px;
}

.mailbox textarea.input {
    height: auto;
    padding: 10px;
    resize: vertical;
}

.mailbox .seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 9px;
    background: #f2f2f4;
    gap: 2px;
}

.mailbox .seg button {
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    cursor: pointer;
}

.mailbox .seg button.is-on {
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-active);
}

.mailbox .msgs {
    overflow-y: auto;
    flex: 1;
    margin: 0 -16px -14px;
}

.mailbox .msg {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    position: relative;
}

.mailbox .msg:hover {
    background: #fafafb;
}

.mailbox .msg.is-on {
    background: #f4f4f6;
}

.mailbox .msg.is-on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--ink);
}

.mailbox .msg .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 6px;
    background: transparent;
}

.mailbox .msg.unread .dot {
    background: var(--brand);
}

.mailbox .msg .from {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox .msg.unread .from {
    font-weight: 600;
}

.mailbox .msg .when {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
}

.mailbox .msg .subj {
    grid-column: 2 / 4;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}

.mailbox .msg.unread .subj {
    color: var(--text);
    font-weight: 500;
}

.mailbox .msg .prev {
    grid-column: 2 / 4;
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    gap: 6px;
    align-items: center;
}

.mailbox .msg .prev svg {
    width: 13px;
    height: 13px;
    flex: none;
}

.mailbox .msg .prev .star-on {
    fill: #c98a12;
    color: #c98a12;
}

.mailbox .empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.mailbox .empty strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 4px;
}

.mailbox .reader-empty {
    margin: auto;
}

.mailbox .reader-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.mailbox .reader-spacer {
    flex: 1;
}

.mailbox .reader-body {
    overflow-y: auto;
    flex: 1;
    padding-top: 16px;
}

.mailbox .reader-body h2 {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mailbox .from-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.mailbox .from-row .t {
    flex: 1;
    min-width: 0;
    font-size: 13px;
}

.mailbox .from-row .t b {
    font-weight: 600;
}

.mailbox .from-row .t small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.mailbox .when-full {
    font-size: 12px;
    white-space: nowrap;
}

.mailbox .mail-text {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-2);
    max-width: 680px;
}

.mailbox .star-btn.on {
    color: #c98a12;
}

.mailbox .pop-wrap {
    position: relative;
}

.mailbox .pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    z-index: 20;
}

.mailbox .pop button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.mailbox .pop button:hover {
    background: #f5f5f6;
}

.mailbox-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 15, 20, 0.28);
    display: grid;
    place-items: center;
    padding: 20px;
}

.mailbox-modal-card {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

.mailbox-modal-card--sm {
    width: min(420px, 100%);
}

.mailbox-modal-head,
.mailbox-modal-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.mailbox-modal-foot {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    justify-content: flex-end;
}

.mailbox-modal-head strong {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.mailbox-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mailbox-modal .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.mailbox-modal .field .input {
    color: var(--text);
    font-size: 13.5px;
}

.mailbox-modal .field-error {
    color: var(--danger);
    font-size: 12px;
}

.mailbox-modal .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.mailbox-modal .ibtn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.mailbox-modal .ibtn svg {
    width: 15px;
    height: 15px;
}

.mailbox-modal .color-row {
    display: flex;
    gap: 8px;
}

.mailbox-modal .color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
}

.mailbox-modal .color-swatch.is-on {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
}

@media (max-width: 1180px) {
    .mailbox {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .mailbox .reader {
        display: none;
    }

    .mailbox.open .reader {
        display: flex;
        position: fixed;
        inset: 64px 12px 12px;
        z-index: 40;
    }

    .mailbox.open .reader > .inner {
        border-radius: var(--r-lg, 14px);
        border: 1px solid var(--frame-line, #ececee);
    }
}

@media (max-width: 860px) {
    .mailbox {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .mailbox .folders {
        display: none;
    }
}

/* -- Analityka -- */
.analytics-page .analytics-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 18px;
}

.analytics-page .analytics-seg {
    margin-left: 0;
}

.analytics-page .analytics-seg button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.analytics-page .analytics-range-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.analytics-page .analytics-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.analytics-page .analytics-field span {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.analytics-page .analytics-field .input,
.analytics-page .input {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    min-width: 148px;
}

.analytics-page .btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.analytics-page .btn.dark {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.analytics-page .btn.dark:hover {
    background: var(--ink-hover);
    border-color: var(--ink-hover);
}

.analytics-page .analytics-range-note {
    margin: 0;
    width: 100%;
    font-size: 12.5px;
    color: var(--muted);
}

.analytics-psum > .inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-page thead th.num,
.analytics-page td.num {
    text-align: right;
}

@media (max-width: 720px) {
    .analytics-psum > .inner {
        grid-template-columns: 1fr;
    }

    .analytics-psum .ps + .ps {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

