:root{--bg:#f4f7fb;--panel:#fff;--text:#26344d;--muted:#7c899f;--border:#e4e9f1;--primary:#2774ea;--primary-dark:#195fc9;--nav:#12213a;--nav-soft:#1d3354;--success:#15956c;--danger:#df3e54;--warning:#c78517;--shadow:0 10px 32px rgba(28,45,75,.08);--mobile-nav-h:64px}
*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}body{margin:0;min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:#fff;color:var(--text);padding:20px 16px 16px;display:flex;flex-direction:column;z-index:20;border-right:1px solid var(--border);box-shadow:8px 0 28px rgba(35,55,85,.045)}.brand{display:flex;align-items:center;gap:12px;padding:4px 9px 22px;margin-bottom:5px;border-bottom:1px solid #edf1f6}.brand-mark{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#348bff,#1d68dc);display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:900;box-shadow:0 9px 20px rgba(39,116,234,.25);flex:0 0 auto}.brand-logo{width:54px;height:54px;border-radius:0;background:transparent;box-shadow:none;overflow:visible;padding:0}.brand-logo img{display:block;width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 4px 5px rgba(72,31,27,.18))}.brand-copy{display:grid;gap:2px;min-width:0}.brand-copy strong{font-size:18px;line-height:1.15;color:#24344f}.brand-copy small{font-size:11px;color:var(--muted);font-weight:650}.sidebar-section-label{padding:18px 12px 8px;color:#9aa6b8;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.1em}.sidebar-nav{display:grid;gap:5px}.sidebar-nav a{position:relative;display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 12px;border-radius:10px;color:#65738a;font-weight:700;font-size:14px;transition:background .15s,color .15s,transform .15s}.sidebar-nav a:hover{background:#f3f7fd;color:var(--primary);transform:translateX(1px)}.sidebar-nav a.active{background:#eaf3ff;color:#1d69dc}.sidebar-nav a.active::before{content:"";position:absolute;left:-16px;top:9px;bottom:9px;width:4px;border-radius:0 5px 5px 0;background:var(--primary)}.nav-icon{width:21px;height:21px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 21px;color:currentColor}.nav-icon svg{width:20px;height:20px;display:block;fill:currentColor}.sidebar-account-label{margin-top:5px}.sidebar-bottom{margin-top:auto;border-top:1px solid #edf1f6;padding:15px 4px 0;display:grid;gap:10px}.sidebar-user{display:flex;align-items:center;gap:10px;padding:7px 8px}.sidebar-avatar{width:35px;height:35px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:#edf4ff;color:var(--primary);font-size:14px;font-weight:850;flex:0 0 auto}.sidebar-user-copy{display:grid;gap:2px;min-width:0}.sidebar-user-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#2d3c55}.sidebar-user-copy small{font-size:11px;color:var(--muted)}.logout-link{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:9px;color:#8a96a9;font-size:13px;font-weight:700;transition:.15s}.logout-link:hover{background:#fff0f2;color:var(--danger)}.main-content{margin-left:250px;min-height:100vh}.topbar{min-height:92px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:18px 34px;position:sticky;top:0;z-index:10}.topbar h1{font-size:24px;margin:0 0 4px}.topbar p{margin:0;color:var(--muted);font-size:13px}.content{padding:28px 34px 50px;max-width:1550px;margin:auto}.alert{padding:13px 16px;border-radius:10px;margin:0 0 18px;border:1px solid transparent;font-weight:600}.alert-success{background:#eaf8f2;color:#0c7451;border-color:#ccecdf}.alert-danger{background:#fff0f2;color:#ad243a;border-color:#ffd5dc}.alert-warning{background:#fff7e8;color:#8a5b0a;border-color:#f5dfb3}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}.stat-card,.panel{background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow)}.stat-card{padding:21px}.stat-card span,.summary-card span{display:block;color:var(--muted);font-size:13px;font-weight:700;margin-bottom:10px}.stat-card strong{display:block;font-size:25px;line-height:1.15;margin-bottom:7px}.stat-card small,.summary-card small{color:var(--muted)}.stat-card.danger strong{color:var(--danger)}.panel-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.panel{overflow:hidden}.panel-heading{padding:20px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.panel-heading h2{font-size:17px;margin:0 0 4px}.panel-heading p{font-size:13px;color:var(--muted);margin:0}.list-items{display:grid}.list-row{display:flex;justify-content:space-between;align-items:center;padding:15px 22px;border-bottom:1px solid var(--border);transition:.15s}.list-row:last-child{border:0}.list-row:hover{background:#f8faff}.list-row span{display:grid;gap:4px}.list-row small,td small{display:block;color:var(--muted);font-size:12px;margin-top:4px}.positive{color:var(--success)!important}.negative{color:var(--danger)!important}.empty{padding:35px 24px;text-align:center;color:var(--muted)}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.filters{display:flex;gap:10px;flex:1}.filters input{max-width:420px}.filters select{max-width:190px}input,select,textarea{width:100%;border:1px solid #ced7e4;background:#fff;border-radius:9px;padding:11px 12px;color:var(--text);outline:none;transition:.15s}input:focus,select:focus,textarea:focus{border-color:#76aaf5;box-shadow:0 0 0 3px #2774ea19}textarea{resize:vertical}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:9px;padding:10px 15px;font-weight:750;white-space:nowrap}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-secondary{background:#fff;border-color:#cfd8e5;color:#42526c}.btn-secondary:hover{background:#f7f9fc}.btn-block{width:100%;padding:12px}.btn-link{border:0;background:transparent;padding:5px;color:var(--primary);font-weight:700}.inline-form{display:inline}.table-panel{overflow:hidden}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:14px 17px;border-bottom:1px solid var(--border);font-size:14px}th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;background:#fafbfd}tbody tr{transition:.12s}tbody tr[onclick]{cursor:pointer}tbody tr:hover{background:#f8faff}.customer-table{min-width:820px}.customer-address,.customer-ip,.customer-price{white-space:nowrap}.badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.badge-active{background:#e7f7f0;color:#08754f}.badge-suspended{background:#fff4dd;color:#96600b}.badge-inactive{background:#eef1f5;color:#657188}.form-panel{padding:0 23px 22px}.form-section{padding:22px 0;border-bottom:1px solid var(--border)}.form-section:last-of-type{border:0}.form-section h2{font-size:17px;margin:0}.form-section-title{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 17px}.customer-number-display{display:flex;align-items:baseline;gap:9px;padding:7px 11px;border:1px solid var(--border);border-radius:9px;background:#f8faff}.customer-number-display span{font-size:12px;color:var(--muted);font-weight:700}.customer-number-display strong{font-size:17px;color:var(--primary)}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.form-grid label,.form-stack label{font-size:13px;font-weight:700;display:grid;gap:7px}.form-grid .span-2{grid-column:span 2}.form-stack{display:grid;gap:16px}.form-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:20px}.customer-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:20px}.customer-heading h2{font-size:27px;margin:8px 0 4px}.customer-heading p{color:var(--muted);margin:0}.back-link{color:var(--primary);font-size:13px;font-weight:700}.heading-actions{display:flex;gap:9px}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:20px}.summary-card{padding:20px}.summary-card strong{display:block;font-size:20px;margin-bottom:7px}.details{padding:7px 22px 20px;margin:0;display:grid;grid-template-columns:145px 1fr;gap:12px 18px}.details dt{color:var(--muted);font-size:13px}.details dd{margin:0;font-weight:600;line-height:1.5}.customer-panels{margin-bottom:20px}.modal{width:min(620px,calc(100% - 28px));border:0;border-radius:14px;padding:0;box-shadow:0 25px 70px #0b1d3855}.modal::backdrop{background:#0b1a2d88}.modal form{padding:0 22px 22px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 0}.modal-head h2{margin:0;font-size:19px}.modal-head button{border:0;background:none;font-size:27px;color:var(--muted)}.plans-layout{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}.plans-layout>.panel:last-child{height:max-content;padding-bottom:20px}.plans-layout .form-stack{padding:20px 22px 0}.billing-callout{padding:22px;display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:20px;border-left:4px solid var(--primary)}.billing-callout h2{margin:0 0 7px}.billing-callout p{max-width:850px;color:var(--muted);line-height:1.55;margin:0 0 8px}.narrow-form{max-width:720px}.login-shell{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at top right,#dceaff 0,transparent 37%),var(--bg)}.login-card{width:min(440px,100%);background:#fff;border:1px solid var(--border);border-radius:17px;padding:30px;box-shadow:0 25px 60px #263e661c}.login-card h1{font-size:24px;margin:28px 0 8px}.muted{color:var(--muted)}.login-brand{display:flex;align-items:center;gap:12px}.login-brand strong,.login-brand small{display:block}.login-brand small{color:var(--muted);margin-top:2px}.login-card .brand-mark{width:45px;height:45px}.login-card .form-stack{margin-top:24px}label small{font-weight:400;color:var(--muted)}
@media(max-width:1100px){.stats-grid,.summary-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.plans-layout{grid-template-columns:1fr}.plans-layout>.panel:last-child{order:-1}}
@media(max-width:800px){.form-section-title{align-items:flex-start;flex-direction:column}.customer-number-display{width:100%;justify-content:space-between}.sidebar{display:none}.main-content{margin-left:0}.topbar{padding:15px 20px;min-height:78px}.content{padding:20px}.panel-grid{grid-template-columns:1fr}.toolbar,.customer-heading,.billing-callout{align-items:stretch;flex-direction:column}.filters{display:grid;grid-template-columns:1fr}.filters input,.filters select{max-width:none}.heading-actions{width:100%}.heading-actions .btn{flex:1}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.details{grid-template-columns:1fr;gap:3px}.details dd{margin-bottom:9px}}
@media(max-width:520px){.stats-grid,.summary-grid{grid-template-columns:1fr}.content{padding:15px}.topbar h1{font-size:20px}.login-card{padding:23px}.form-actions{flex-direction:column-reverse}.form-actions .btn{width:100%}.heading-actions{flex-direction:column}.panel-heading{padding:17px}.list-row{padding:14px 17px}}

/* v1.3.1 - formularz abonamentu otwierany przyciskiem */
.plans-page{display:grid;gap:20px}
.plan-editor-panel{width:min(680px,100%);justify-self:end}
.plan-editor-panel .form-stack{padding:20px 22px 22px}
.plan-editor-panel[hidden]{display:none!important}
@media(max-width:800px){.panel-heading{align-items:flex-start;gap:14px;flex-wrap:wrap}.panel-heading>.btn{width:100%}.plan-editor-panel{width:100%}}

/* Sortowanie tabeli abonentów */
.customer-table th.sortable {
    padding: 0;
}
.customer-table th.sortable a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    width: 100%;
    padding: .85rem 1rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.customer-table th.sortable a:hover,
.customer-table th.sortable a:focus-visible {
    color: #1769e0;
    background: #eef5ff;
    outline: none;
}
.customer-table th.sortable.is-sorted a {
    color: #1769e0;
    background: #f3f7ff;
}
.sort-indicator {
    display: inline-flex;
    min-width: 1rem;
    justify-content: center;
    color: #9aa8b8;
    font-size: .85rem;
    line-height: 1;
}
.sort-indicator.active {
    color: #1769e0;
    font-weight: 800;
}

/* v1.3.4 / v2.1 — kursor tekstowy tylko w polach edytowalnych (nie miga wszędzie). */
html {
    caret-color: transparent;
}
input,
textarea,
[contenteditable="true"],
[contenteditable=""] {
    caret-color: auto;
}

.customer-table th.sortable a:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}


/* v1.3.7 — szybkie dodawanie wpłaty z pulpitu i listy abonentów */
.page-actions{display:flex;justify-content:flex-end;margin-bottom:18px}
.toolbar-actions{display:flex;align-items:center;gap:10px}
.quick-payment-modal{width:min(760px,calc(100% - 28px))}
.quick-payment-customer{margin-bottom:18px}
.quick-payment-customer>label{display:block;margin-bottom:7px;font-size:13px;font-weight:700}
.customer-picker{position:relative}
.customer-picker-list{display:none;margin-top:7px;max-height:255px;overflow:auto;border:1px solid #d6deea;border-radius:10px;background:#fff;box-shadow:0 14px 32px rgba(28,45,75,.12)}
.customer-picker-list.is-open{display:block}
.customer-picker-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 13px;border:0;border-bottom:1px solid var(--border);background:#fff;color:var(--text);text-align:left}
.customer-picker-option:last-of-type{border-bottom:0}
.customer-picker-option:hover,.customer-picker-option:focus-visible{background:#f3f7fd;outline:none}
.customer-picker-option.is-selected{background:#eaf3ff;color:#1d69dc}
.customer-picker-option>span:first-child{display:grid;gap:3px;min-width:0}
.customer-picker-option strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-picker-option small{margin:0;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-picker-number{flex:0 0 auto;color:var(--muted);font-size:12px;font-weight:750}
.customer-picker-empty{padding:18px;text-align:center;color:var(--muted)}
.customer-picker-selection{min-height:20px;margin-top:7px;color:var(--muted);font-size:12px}
.customer-picker-selection.is-selected{color:var(--success);font-weight:700}
.customer-picker-selection.is-error{color:var(--danger);font-weight:700}
.quick-payment-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.toolbar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.toolbar-actions .btn{width:100%}.page-actions .btn{width:100%}.quick-payment-fields{grid-template-columns:1fr}}
@media(max-width:520px){.toolbar-actions{grid-template-columns:1fr}.customer-picker-option{align-items:flex-start}.customer-picker-number{display:none}}

.operations-table{min-width:900px}.operations-table th:last-child,.operations-table td:last-child{width:110px;text-align:right}.operation-edit-button{padding:6px 8px;border-radius:7px}.operation-edit-button:hover{background:#eaf3ff}.modal [hidden]{display:none!important}

/* v2.1 - wylogowanie jako formularz POST (CSRF) */
.logout-form{margin:0}
button.logout-link{width:100%;border:0;background:transparent;text-align:left;font:inherit}

/* v2.2 - mobilny dolny pasek nawigacji + okrojony pulpit na telefonie */
.mobile-nav{display:none}
.mobile-nav-fab-slot{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1}
.mobile-nav-fab{
    width:54px;height:54px;border-radius:50%;border:4px solid #fff;
    background:var(--primary);color:#fff;display:inline-flex;align-items:center;
    justify-content:center;transform:translateY(-20px);cursor:pointer;padding:0;
}
.mobile-nav-fab svg{width:26px;height:26px;fill:currentColor;display:block}
.mobile-nav-fab-label{font-size:11px;color:#8a96a9;margin-top:-16px}

@media(max-width:800px){
    /* Boczne menu ukrywane w bazowym bloku 800px; nawigację przejmuje dolny pasek */

    /* Dolny pasek widoczny tylko na telefonie */
    .mobile-nav{
        display:flex;align-items:flex-end;justify-content:space-around;
        position:fixed;left:0;right:0;bottom:0;z-index:30;
        background:#fff;border-top:1px solid #e7edf4;
        padding:8px 6px calc(10px + env(safe-area-inset-bottom));
    }
    .mobile-nav-item{
        flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
        color:#8a96a9;font-size:11px;font-weight:700;text-align:center;
    }
    .mobile-nav-item.active{color:var(--primary)}
    .mobile-nav-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}
    .mobile-nav-icon svg{width:22px;height:22px;fill:currentColor;display:block}
    /* Wyloguj jako formularz POST – wygląd jak pozostałe pozycje */
    .mobile-nav-logout{margin:0}
    .mobile-nav-logout button{
        width:100%;border:0;background:transparent;padding:0;cursor:pointer;
        display:flex;flex-direction:column;align-items:center;gap:3px;
        color:#8a96a9;font:inherit;font-size:11px;font-weight:700;
    }

    /* Zapas miejsca, by pasek nie zasłaniał treści */
    .content{padding-bottom:calc(var(--mobile-nav-h) + 40px + env(safe-area-inset-bottom))}

    /* Okrojony pulpit: bez kart statystyk i bez zdublowanego przycisku wpłaty */
    .stats-grid{display:none}
    .page-actions{display:none}
    [data-open-quick-payment]:not(.mobile-nav-fab){display:none}
}

/* v2.0.3 — strzałka pola wyboru statusu przesunięta o 10 px w lewo */
.filters select[name="status"]{
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    padding-right:42px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237c899f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 18px center;
    background-size:12px 8px;
}
.filters select[name="status"]::-ms-expand{display:none}

/* v2.0.5 — większy numer abonenta i przesunięcie o 20 px w lewo */
.customer-heading-actions{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:8px;
}
.customer-heading-number{
    font-size:20px;
    line-height:1.2;
    font-weight:700;
    color:var(--muted);
    text-align:right;
    transform:translateX(-20px);
}
@media(max-width:800px){
    .customer-heading-actions{
        width:100%;
        align-items:stretch;
    }
    .customer-heading-number{
        text-align:right;
    }
}

/* LMS v2.0.6 — akcje historii operacji */
.operation-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}
.btn-link-danger{color:var(--danger)}
.btn-link-danger:hover{color:#b8273a;text-decoration:underline}


/* LMS v2.0.8 — ikony zamiast napisów Edytuj / Usuń */
.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-btn{width:42px;padding:10px 0}
.icon-btn,.icon-action{display:inline-flex;align-items:center;justify-content:center}
.icon-btn svg,.icon-action svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
.operation-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}
.icon-action{width:34px;height:34px;padding:0;border-radius:8px}
.icon-action:hover{background:#eaf3ff;text-decoration:none}
.btn-link-danger{color:var(--danger)}
.btn-link-danger.icon-action:hover{background:#fff1f3;color:#b8273a;text-decoration:none}


/* LMS v2.0.10 — mobilna lista abonentów i wyszukiwarka w dolnym pasku */
.mobile-customer-search{display:none}
.mobile-nav-search{border:0;background:transparent;padding:0;cursor:pointer;font:inherit}
.mobile-nav-search .mobile-nav-icon svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.mobile-nav-search.is-open{color:var(--primary)}

@media(max-width:800px){
    /* Na telefonie nad listą pozostaje tylko przycisk dodania abonenta. */
    .customers-desktop-filters{display:none}
    .customers-toolbar{display:block;margin-bottom:16px}
    .customers-toolbar-actions{display:block;width:100%}
    .customers-toolbar-actions .btn{width:100%}
    .customers-toolbar-actions [data-open-quick-payment]{display:none!important}

    /* Wysuwane wyszukiwanie umieszczone bezpośrednio nad dolnym menu. */
    .mobile-customer-search:not([hidden]){
        display:block;position:fixed;left:10px;right:10px;
        bottom:calc(var(--mobile-nav-h) + 10px + env(safe-area-inset-bottom));z-index:32;
        padding:10px;background:#fff;border:1px solid #dce4ef;border-radius:13px;
        box-shadow:0 14px 38px rgba(25,45,75,.22)
    }
    .mobile-customer-search-form{display:flex;align-items:stretch;gap:8px}
    .mobile-customer-search-form input{min-width:0;flex:1;font-size:16px}
    .mobile-customer-search-submit{flex:0 0 auto;padding-inline:14px}

    /* Mobilna tabela: Klient, Adres IP i Saldo. */
    .customers-table-panel .table-wrap{overflow:visible}
    .customer-table{min-width:0;width:100%;table-layout:fixed}
    .customer-table .customer-col-address,
    .customer-table .customer-col-price,
    .customer-table .customer-col-status{display:none}
    .customer-table .customer-col-client{width:43%}
    .customer-table .customer-col-ip{width:34%}
    .customer-table .customer-col-balance{width:23%;text-align:right}
    .customer-table th,
    .customer-table td{padding:13px 10px;font-size:13px}
    .customer-table th.customer-col-balance a{justify-content:flex-end}
    .customer-table .customer-col-client strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .customer-table .customer-col-ip{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
    .customer-table .customer-col-balance{white-space:nowrap}

    /* Przy sześciu pozycjach pasek pozostaje czytelny również na węższym ekranie. */
    .mobile-nav-item,.mobile-nav-search{min-width:0}
    .mobile-nav-item>span:last-child,.mobile-nav-search>span:last-child{font-size:10px}
}

@media(max-width:390px){
    .mobile-nav{padding-left:2px;padding-right:2px}
    .mobile-nav-icon,.mobile-nav-icon svg{width:20px;height:20px}
    .mobile-nav-item>span:last-child,
    .mobile-nav-search>span:last-child,
    .mobile-nav-logout button>span:last-child{font-size:9px}
    .customer-table th,.customer-table td{padding-left:7px;padding-right:7px}
}


/* LMS v2.0.12 — numer abonenta w wierszu powrotu na telefonie */
.customer-heading-top{display:block}
.customer-heading-number-mobile{display:none}
@media(max-width:800px){
    .customer-heading-main{width:100%}
    .customer-heading-top{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}
    .customer-heading-number-mobile{display:block;transform:none;text-align:right;white-space:nowrap}
    .customer-heading-number-desktop{display:none}
}

/* LMS v2.0.13 — stała szerokość dolnego paska na ekranie szczegółów abonenta */
@media(max-width:800px){
    html,body{max-width:100%;overflow-x:hidden}
    .app-shell,.main-content,.content{min-width:0;max-width:100%}
    .mobile-nav{
        left:0;right:0;width:auto;max-width:none;min-width:0;
        box-sizing:border-box;justify-content:flex-start
    }
    .mobile-nav>.mobile-nav-item,
    .mobile-nav>.mobile-nav-fab-slot,
    .mobile-nav>.mobile-nav-logout{
        flex:0 0 20%;width:20%;max-width:20%;min-width:0;box-sizing:border-box
    }
    .mobile-nav-item{padding-left:2px;padding-right:2px;overflow:hidden}
    .mobile-nav-item>span:last-child,
    .mobile-nav-logout button>span:last-child{
        display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
    }
}


/* LMS v2.0.18 — pasek zawsze przyklejony do okna, szerokość z v2.0.13 */
@media(max-width:800px){
    body{padding-bottom:calc(var(--mobile-nav-h) + env(safe-area-inset-bottom))}
    body>.mobile-nav{
        display:flex!important;
        position:fixed!important;
        top:auto!important;
        bottom:0!important;
        left:0!important;
        right:0!important;
        width:auto!important;
        max-width:none!important;
        min-width:0!important;
        margin:0!important;
        box-sizing:border-box!important;
        z-index:9999!important;
    }
    .content{padding-bottom:calc(var(--mobile-nav-h) + 52px + env(safe-area-inset-bottom))}
}


/* LMS v2.0.19 — brak poziomego rozszerzania formularza abonenta */
@media(max-width:800px){
    html,body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
        overscroll-behavior-x:none;
    }
    .app-shell,
    .main-content,
    .content{
        width:100%;
        min-width:0;
        max-width:100%;
    }
    .app-shell,
    .main-content{
        overflow-x:clip;
    }
    .customer-form,
    .customer-form .form-section,
    .customer-form .form-section-title,
    .customer-form .form-grid,
    .customer-form .form-grid>label{
        width:100%;
        min-width:0;
        max-width:100%;
    }
    .customer-form input,
    .customer-form select,
    .customer-form textarea{
        min-width:0;
        max-width:100%;
    }
    .customer-form .customer-number-display{
        min-width:0;
        max-width:100%;
    }
    .topbar>div{
        min-width:0;
        max-width:100%;
    }
    .topbar h1{
        overflow-wrap:anywhere;
    }
}


/* ============================================================
   LMS v2.3.0 — poprawki mobilne
   1) Historia operacji, Naliczenia i Abonamenty bez przewijania
      poziomego na telefonie (redukcja kolumn jak na liście abonentów)
   2) Awatar "Moje konto" w górnym pasku na telefonie
   ============================================================ */

/* Elementy widoczne wyłącznie na telefonie — na desktopie ukryte */
.op-mobile-amount,
.plan-mobile-meta{display:none}

@media(max-width:800px){
    /* Na telefonie wszystkie tabele mieszczą się w ekranie */
    .table-wrap{overflow:visible}

    /* --- Historia operacji: Data, Operacja (+kwota), Saldo po operacji --- */
    .operations-table{min-width:0;width:100%;table-layout:fixed}
    .operations-table th.op-col-charge,
    .operations-table td.op-col-charge,
    .operations-table th.op-col-payment,
    .operations-table td.op-col-payment,
    .operations-table th.op-col-actions,
    .operations-table td.op-col-actions{display:none}
    .operations-table th.op-col-date,
    .operations-table td.op-col-date{width:82px;white-space:nowrap}
    .operations-table th.op-col-balance,
    .operations-table td.op-col-balance{width:104px;text-align:right;white-space:nowrap}
    .operations-table th,
    .operations-table td{padding:12px 10px;font-size:13px}
    .operations-table th.op-col-desc,
    .operations-table td.op-col-desc{text-align:center}
    .operations-table td.op-col-desc{overflow-wrap:anywhere;word-break:break-word}
    .op-mobile-amount{display:block;font-size:12px;font-weight:700;margin-top:3px;white-space:nowrap}

    /* --- Naliczenia: Data, Klient, Kwota (bez kolumny Opis) --- */
    .billing-table{min-width:0;width:100%;table-layout:fixed}
    .billing-table .bill-col-desc{display:none}
    .billing-table .bill-col-date{width:88px;white-space:nowrap}
    .billing-table .bill-col-amount{width:96px;text-align:right;white-space:nowrap}
    .billing-table th,
    .billing-table td{padding:12px 10px;font-size:13px}
    .billing-table td.bill-col-client strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

    /* --- Abonamenty: Nazwa (+cena i status pod spodem), Akcje --- */
    .plans-table{min-width:0;width:100%;table-layout:fixed}
    .plans-table .plan-col-price,
    .plans-table .plan-col-count,
    .plans-table .plan-col-status{display:none}
    .plans-table .plan-col-actions{width:104px}
    .plans-table th,
    .plans-table td{padding:12px 10px;font-size:13px}
    .plans-table td.plan-col-name strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .plans-table td.plan-col-name .plan-desktop-desc{display:none}
    .plan-mobile-meta{display:block;color:var(--muted);font-size:12px;margin-top:4px}
    .plans-table td.plan-col-actions{text-align:right}
    .plans-table .plan-col-actions .btn-link{padding:5px 6px}
}


/* LMS v2.0.20 — wybierany rodzaj dodatkowego kontaktu */
.contact-alternative-field{display:grid;gap:7px}
.contact-alternative-field select,.contact-alternative-field input{width:100%;min-width:0}


/* LMS v2.0.22 — stały nagłówek listy abonentów, przewijane tylko rekordy */
.customers-table-panel .table-wrap{
    max-height:calc(100dvh - 235px);
    overflow-x:auto;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}
.customers-table-panel .customer-table thead th{
    position:sticky;
    top:0;
    z-index:4;
    background:#fafbfd;
    box-shadow:0 1px 0 var(--border);
}
@supports not (height:100dvh){
    .customers-table-panel .table-wrap{max-height:calc(100vh - 235px)}
}
@media(max-width:800px){
    .customers-table-panel .table-wrap{
        max-height:calc(100dvh - 252px);
        overflow-x:hidden;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }
}
@media(max-width:800px) and (max-height:620px){
    .customers-table-panel .table-wrap{max-height:330px}
}


/* LMS v2.0.27 — pełny branding zachowujący stały nagłówek listy abonentów */
.brand-full{display:grid;justify-items:start;gap:8px;padding-top:2px;padding-bottom:18px}
.brand-full-logo{display:block;width:176px;max-width:100%;height:auto;object-fit:contain}
.brand-tagline{font-size:11px;color:var(--muted);font-weight:700;letter-spacing:.02em}
.login-brand-full{justify-content:center;margin-bottom:12px}
.login-brand-full img{display:block;width:min(100%,320px);height:auto;object-fit:contain}
@media(max-width:800px){.brand-full-logo{width:164px}.brand-tagline{text-align:left}}


/* LMS v2.0.32 — kafelek numeru klienta na karcie abonenta */
.customer-heading-number.customer-number-display{
    width:auto;
    font-size:inherit;
    color:inherit;
    white-space:nowrap;
}
@media(max-width:800px){
    .customer-heading-top .customer-number-display{
        width:auto;
        flex:0 0 auto;
        justify-content:flex-start;
        padding:6px 9px;
    }
    .customer-heading-top .customer-number-display span{font-size:10px}
    .customer-heading-top .customer-number-display strong{font-size:15px}
}


/* LMS v2.0.33 — przełączanie abonentów obok kafelka numeru */
.customer-navigation-card-row{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.customer-heading-mobile-navigation{display:none;align-items:center;justify-content:flex-end;gap:5px;min-width:0}
.customer-switcher-button{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid #cfd8e5;border-radius:9px;background:#fff;color:#42526c;transition:background .15s,border-color .15s,color .15s,transform .15s}
.customer-switcher-button:hover{background:#eaf3ff;border-color:#a9c7f2;color:var(--primary);transform:translateY(-1px)}
.customer-switcher-button svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.customer-switcher-button.is-disabled{opacity:.35;cursor:not-allowed;pointer-events:none}
@media(max-width:800px){
    .customer-navigation-card-row{display:none}
    .customer-heading-mobile-navigation{display:flex;margin-left:auto}
    .customer-heading-top{gap:8px}
    .customer-switcher-button{width:34px;height:34px;border-radius:8px}
}
@media(max-width:380px){
    .customer-heading-mobile-navigation{gap:3px}
    .customer-switcher-button{width:30px;height:30px}
    .customer-switcher-button svg{width:18px;height:18px}
    .customer-heading-top .customer-number-display{padding:5px 7px;gap:5px}
    .customer-heading-top .customer-number-display span{font-size:9px}
    .customer-heading-top .customer-number-display strong{font-size:14px}
}


/* LMS v2.0.34 — oba przyciski po lewej stronie kafelka numeru */
.customer-navigation-card-row,.customer-heading-mobile-navigation{align-items:center;justify-content:flex-end}
.customer-switcher-buttons{display:flex;align-items:center;gap:7px;flex:0 0 auto}
@media(max-width:800px){
    .customer-heading-mobile-navigation{gap:7px;min-width:0}
    .customer-switcher-buttons{gap:5px}
}
@media(max-width:380px){
    .customer-heading-mobile-navigation{gap:5px}
    .customer-switcher-buttons{gap:3px}
}

/* LMS v2.0.35 — przesunięcie sekcji strzałek o 20 px w lewo */
.customer-switcher-buttons{transform:translateX(-20px)}
