/* =========================================================
   Style strony: profile
   Wyeksportowane z bloku <style> w pliku profile.html
========================================================= */

/* ===========================
   PROFILE PAGE PREMIUM STYLE
=========================== */

:root {
    --blue: #3473BA;
    --blue-dark: #2C629D;
    --plum: #3A2A44;
    --dark: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
}

.content {
    background: #f8fafc;
    min-height: 100vh;
}

/* PAGE TITLE */

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title::before {
    content: "\F4E1";
    font-family: "bootstrap-icons";
    color: var(--blue);
    font-size: 21px;
}

/* ===========================
   MAIN BOXES
=========================== */

.company-box,
.owner-box {
    background: var(--white);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.company-header,
.owner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.company-header h4,
.owner-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.owner-header h4 {
    text-transform: none;
}

/* HEADER ACTIONS */

.company-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
}

/* przyciski w naglowkach sekcji (Ustaw podpis, Wyslij PUSH, Dodaj RBH) - pastelowy niebieski (K1) */
.header-action-btn,
.header-action-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #dce7fb;
    color: #2f56a6;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}

.header-action-btn:hover,
.header-action-btn:focus,
.header-action-btn-primary:hover,
.header-action-btn-primary:focus {
    background: #c8d9f8;
    border-color: transparent;
    color: #244688;
}

html[data-bs-theme="dark"] .header-action-btn,
html[data-bs-theme="dark"] .header-action-btn-primary { background: #223454; border-color: transparent; color: #a9c3f2; }
html[data-bs-theme="dark"] .header-action-btn:hover,
html[data-bs-theme="dark"] .header-action-btn-primary:hover { background: #2a4068; border-color: transparent; color: #bfd3f7; }

/* SIGNATURE MODAL */

#signatureModal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

#signatureModal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 16px 22px;
}

#signatureModal .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

#signatureModal .modal-body {
    padding: 18px 22px 22px;
}

.signature-top {
    display: flex;
    justify-content: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #dbe7f3;
}

.signature-hint {
    text-align: center;
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 10px;
}

.signature-pad-wrap {
    display: flex;
    justify-content: center;
}

#signaturePad {
    width: 100%;
    max-width: 640px;
    height: 320px;
    border: 3px solid #1f2937;
    border-radius: 2px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.signature-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #dbe7f3;
}

/* stare pelne kolory przyciskow usuniete - pastelowe sa w sekcji OKNO PODPISU */
.signature-actions .btn {
    border: 0;
}

.btn-sign-show {
    border: 0;
}

.signature-status {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    min-height: 18px;
}

@media (max-width: 575.98px) {
    #signaturePad {
        height: 220px;
    }

    .signature-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* PUSH MODAL */

#pushModal .modal-content {
    border: 0;
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

#pushModal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 18px 24px;
}

#pushModal .modal-title {
    font-size: 20px;
    font-weight: 500;
    color: #374151;
}

#pushModal .modal-body {
    padding: 22px 24px 10px;
}

#pushModal .modal-footer {
    border-top: 0;
    padding: 16px 24px 20px;
    display: flex;
    justify-content: space-between;
}

/* ===========================
   USTAWIENIA RBH
=========================== */

.rbh-subtitle {
    margin: 0 0 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}

.rbh-table-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.rbh-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
    color: var(--muted);
}

.rbh-table thead th {
    background: var(--white);
    padding: 14px 18px;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.rbh-table tbody td {
    padding: 12px 18px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.rbh-table tbody tr:nth-child(odd) {
    background: #f9fafb;
}

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

.rbh-table th + th,
.rbh-table td + td {
    border-left: 1px solid var(--border);
}

.rbh-action-col {
    width: 28%;
}

.rbh-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 220px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid #d9534f;
    border-radius: 10px;
    background: #d9534f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: .25s ease;
}

.rbh-delete-btn:hover {
    background: #c0403c;
    border-color: #c0403c;
    transform: translateY(-1px);
}

.rbh-empty {
    margin: 0;
    padding: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

/* ===========================
   MODAL STANY MAGAZYNOWE
=========================== */

#stockModal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

#stockModal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 16px 22px;
}

#stockModal .modal-title {
    font-size: 20px;
    font-weight: 500;
    color: #374151;
}

#stockModal .modal-body {
    padding: 18px 22px 8px;
}

#stockModal .modal-footer {
    border-top: 0;
    padding: 12px 22px 18px;
    justify-content: flex-end;
}

.stock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.stock-chip {
    min-width: 74px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.stock-chip:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.stock-chip.is-active,
.stock-chip.is-active:hover {
    background: #5cb85c;
    border-color: #5cb85c;
    color: #fff;
}

.stock-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.stock-toolbar .stock-chips {
    margin-bottom: 12px;
}

.stock-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.stock-search .form-control {
    width: 260px;
    height: 36px;
}

.stock-search-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.stock-search-btn:hover {
    border-color: var(--blue);
    background: rgba(52, 115, 186, .09);
    color: var(--blue);
}

.stock-table-wrap {
    border: 1px solid var(--border);
    border-radius: 6px;
    max-height: 420px;
    overflow: auto;
}

.stock-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
    color: var(--muted);
}

.stock-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--white);
    padding: 14px 18px;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.stock-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.stock-table tbody tr:nth-child(odd) {
    background: #f9fafb;
}

.stock-table tbody tr:hover {
    background: #eef4fb;
}

.stock-table th + th,
.stock-table td + td {
    border-left: 1px solid var(--border);
}

.stock-col-symbol {
    width: 22%;
}

.stock-col-qty {
    width: 10%;
    text-align: center;
}

.stock-col-date {
    width: 20%;
    text-align: center;
}

.stock-table td.stock-col-qty,
.stock-table td.stock-col-date {
    text-align: center;
    white-space: nowrap;
}

.stock-empty td {
    padding: 24px 18px;
    text-align: center;
    color: var(--muted);
}

.stock-close-btn {
    min-width: 130px;
    height: 40px;
    border: 1px solid #e0a458;
    border-radius: 8px;
    background: #e0a458;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: .2s ease;
}

.stock-close-btn:hover {
    background: #cf9146;
    border-color: #cf9146;
}

/* ===========================
   PRZYPISANE MAGAZYNY
=========================== */

.wh-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

/* dluga lista magazynow nie miesci sie w domyslnym max-height */
#warehousesContent.is-open {
    max-height: 3000px;
}

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

.wh-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
}

.wh-row:hover {
    background: #f9fafb;
}

.wh-name {
    font-size: 14px;
    color: var(--muted);
}

.wh-row.is-default .wh-name {
    color: var(--dark);
    font-weight: 600;
}

.wh-actions {
    flex: 0 0 240px;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wh-btn {
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.wh-btn:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.wh-btn-assign.is-on,
.wh-btn-assign.is-on:hover {
    background: #5cb85c;
    border-color: #5cb85c;
    color: #fff;
}

.wh-btn-default.is-on,
.wh-btn-default.is-on:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.wh-btn-show,
.wh-btn-show:hover {
    background: #e0a458;
    border-color: #e0a458;
    color: #fff;
}

.wh-btn-show:hover {
    background: #cf9146;
    border-color: #cf9146;
}

/* MODAL DODAWANIA RBH */

#rbhModal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

#rbhModal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 16px 22px;
}

#rbhModal .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

#rbhModal .modal-body {
    padding: 20px 22px 6px;
}

#rbhModal .modal-footer {
    border-top: 0;
    padding: 6px 22px 20px;
}

#rbhModal .modal-footer > .rbh-form-actions {
    width: 100%;
    margin: 0;
}

.rbh-form-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

.rbh-form-label {
    flex: 0 0 240px;
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

.rbh-form-row .form-control {
    flex: 1 1 auto;
}

.rbh-form-error {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #d9534f;
}

.rbh-form-actions {
    display: flex;
    gap: 14px;
}

.rbh-btn {
    flex: 1 1 0;
    height: 42px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: .25s ease;
}

.rbh-btn:hover {
    transform: translateY(-1px);
}

.rbh-btn-cancel {
    background: #e0a458;
    border-color: #e0a458;
}

.rbh-btn-cancel:hover {
    background: #cf9146;
    border-color: #cf9146;
}

.rbh-btn-save {
    background: var(--blue);
    border-color: var(--blue);
}

.rbh-btn-save:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

.push-devices {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    max-height: 380px;
    overflow-y: auto;
}

.push-devices table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
    color: #6b7280;
}

.push-devices thead th {
    position: sticky;
    top: 0;
    background: #fff;
    font-weight: 400;
    color: #6b7280;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1;
}

.push-devices tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    word-break: break-all;
}

.push-devices tbody tr:nth-child(odd) {
    background: #f9fafb;
}

.push-devices tbody tr:hover {
    background: #eef4fb;
}

.push-devices th + th,
.push-devices td + td {
    border-left: 1px solid #e5e7eb;
}

.push-devices th:last-child,
.push-devices td:last-child {
    width: 30%;
}

.push-check-col {
    width: 52px;
    text-align: center;
    vertical-align: middle;
}

.push-devices .form-check-input {
    width: 17px;
    height: 17px;
    margin: 0;
    cursor: pointer;
    border-color: #b6c2d1;
}

.push-devices .form-check-input:checked {
    background-color: var(--blue);
    border-color: var(--blue);
}

.push-devices .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(52, 115, 186, .15);
    border-color: var(--blue);
}

.push-devices tbody tr.is-selected {
    background: #e8f1fb;
}

.push-devices tbody tr {
    cursor: pointer;
}

#pushMessage {
    width: 100%;
    min-height: 110px;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 15px;
    color: #374151;
    resize: vertical;
}

#pushMessage:focus {
    outline: 0;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(52, 115, 186, .12);
}

.btn-push-send {
    background: #6cb96c;
    border: 0;
    border-radius: 4px;
    padding: 10px 22px;
    color: #fff;
    font-size: 15px;
    transition: .2s ease;
}

.btn-push-send:hover {
    background: #58a458;
    color: #fff;
}

.btn-push-close {
    background: #e6ac52;
    border: 0;
    border-radius: 4px;
    padding: 10px 22px;
    color: #fff;
    font-size: 15px;
    transition: .2s ease;
}

.btn-push-close:hover {
    background: #d2963c;
    color: #fff;
}

.push-status {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    min-height: 18px;
}

/* TOGGLE BUTTONS */

.toggle-company-btn,
.toggle-owner-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(52, 115, 186, .09);
    color: var(--blue);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s ease;
}

.toggle-company-btn:hover,
.toggle-owner-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: translateY(-2px);
}

/* COLLAPSE CONTENT */

.company-content,
.owner-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
}

.company-content.is-open,
.owner-content.is-open {
    max-height: 1400px;
    opacity: 1;
}

.owner-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* ===========================
   AVATAR
=========================== */

.profile-avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.avatar-preview {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff5f1, #ffffff);
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview i {
    font-size: 42px;
    color: #cbd5e1;
}

.btn-avatar-upload {
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: none;
}

.btn-avatar-upload:hover {
    background: var(--blue-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* ===========================
   FORM
=========================== */

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: #f9fafb;
    padding: 9px 13px;
    font-size: 14px;
    color: var(--dark);
    transition: .25s ease;
}

.form-control:focus,
.form-select:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(52, 115, 186, .12);
}

.form-control[readonly] {
    background: #f3f4f6;
    color: #6b7280;
}

.form-group {
    margin-bottom: 13px;
}

/* POSITION BADGES */

.btn-outline-primary {
    border-radius: 999px;
    border: 1px solid #fed7c7;
    color: var(--blue);
    background: rgba(52, 115, 186, .08);
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
}

.btn-check:checked + .btn-outline-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* ===========================
   BUTTONS
=========================== */

/* przyciski formularza profilu - pastelowy niebieski (K1); "Zapisz zmiany" pastelowy zielony (K2) */
.employee-add-btn,
.btn-orange {
    min-height: 42px;
    border-radius: 11px !important;
    background: #dce7fb !important;
    border: 0 !important;
    color: #2f56a6 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color .18s ease, color .18s ease;
    box-shadow: none;
}

.employee-add-btn:hover,
.employee-add-btn:focus,
.btn-orange:hover,
.btn-orange:focus {
    background: #c8d9f8 !important;
    color: #244688 !important;
}

/* "Zmien haslo" - na cala szerokosc karty, jak wczesniej */
.change-password-btn { width: 100%; }

.employee-save-btn { background: #d3f2e1 !important; color: #1b6b45 !important; }
.employee-save-btn:hover,
.employee-save-btn:focus { background: #bde9d0 !important; color: #155637 !important; }

html[data-bs-theme="dark"] .employee-add-btn,
html[data-bs-theme="dark"] .btn-orange { background: #223454 !important; color: #a9c3f2 !important; }
html[data-bs-theme="dark"] .employee-save-btn { background: #1a3d2c !important; color: #9fe0bf !important; }

/* ===========================
   TIME / CALENDAR LAYOUT
=========================== */

.time-calendar-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.calendar-sidebar {
    width: 250px;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calendar-content {
    flex: 1;
}

.summary-card,
.calendar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.summary-card {
    padding: 18px;
    transition: .25s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-icon {
    width: 42px;
    height: 42px;
    background: rgba(37, 99, 235, .1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.summary-icon.orange {
    background: rgba(52, 115, 186, .1);
}

.summary-icon i {
    font-size: 20px;
    color: #2563eb;
}

.summary-icon.orange i {
    color: var(--blue);
}

.summary-card h5 {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

.summary-card h6 {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
    margin-bottom: 6px;
}

.summary-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.rate-date {
    display: inline-block;
    background: rgba(52, 115, 186, .09);
    color: var(--blue);
    padding: 5px 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.calendar-card {
    padding: 18px;
}

#calendar {
    min-height: 560px;
}

/* ===========================
   FULLCALENDAR
=========================== */

.fc .fc-toolbar {
    margin-bottom: 14px;
}

.fc .fc-toolbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.fc .fc-button {
    background: #fff !important;
    color: var(--dark) !important;
    border: 1px solid var(--border) !important;
    border-radius: 9px !important;
    padding: 6px 13px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none;
    transition: .2s ease;
}

.fc .fc-button:hover {
    transform: translateY(-1px);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue) !important;
    box-shadow: 0 8px 18px rgba(52, 115, 186, .25);
}

.fc .fc-today-button {
    background: #f3f4f6 !important;
}

.fc .fc-col-header-cell {
    background: #f8fafc;
    padding: 9px 0;
}

.fc .fc-col-header-cell-cushion {
    color: var(--blue);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.fc .fc-daygrid-day-frame {
    min-height: 84px;
    padding: 6px;
}

.fc .fc-daygrid-day:hover {
    background: #fff8f6;
}

.fc .fc-daygrid-day-number {
    color: var(--dark);
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none;
}

.fc .fc-day-today {
    background: rgba(52, 115, 186, .08) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--blue);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc .fc-daygrid-event {
    border: 0 !important;
    border-radius: 8px;
    padding: 4px 8px;
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: none;
}

.fc-event-title {
    white-space: normal;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #eef2f7;
}

.fc-theme-standard .fc-scrollgrid {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #eef2f7;
}

/* ===========================
   PASSWORD CARD
=========================== */

.card.shadow {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05) !important;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

/* ===========================
   MODALS
=========================== */

#changePasswordModal .modal-content,
#calendarEventModal .modal-content,
#logoutModal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .18);
}

#changePasswordModal .modal-header,
#calendarEventModal .modal-header,
#logoutModal .modal-header {
    border-bottom: 0;
    padding: 18px 22px 8px;
}

#changePasswordModal .modal-title,
#logoutModal .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

#changePasswordModal .modal-body,
#calendarEventModal .modal-body,
#logoutModal .modal-body {
    padding: 14px 22px;
}

#changePasswordModal .modal-footer,
#calendarEventModal .modal-footer,
#logoutModal .modal-footer {
    border-top: 0;
    padding: 8px 22px 20px;
}

.input-group-text {
    border-radius: 0 11px 11px 0;
    border: 1px solid var(--border);
    background: #f3f4f6;
    color: var(--blue);
}

/* WORK MODAL CARDS */

.work-modal-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 15px;
    text-align: center;
    height: 100%;
    border: 1px solid #eef2f7;
}

.work-modal-card i {
    font-size: 21px;
    color: var(--blue);
    margin-bottom: 7px;
}

.work-modal-card span {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.work-modal-card h5 {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
    color: var(--dark);
}

.work-modal-card.orange {
    background: rgba(52, 115, 186, .08);
}

.work-modal-card.success {
    background: rgba(25, 135, 84, .08);
}

/* LOGOUT MODAL */

#logoutModal .btn-secondary {
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
}

#logoutModal .btn-danger {
    border: 0;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
}

/* ===========================
   SIDEBAR FIX
=========================== */

#sidebar,
#sidebar .sidebar-inner,
#sidebar .h-100 {
    min-height: 100vh;
    height: auto !important;
}

/* ===========================
   MOBILE
=========================== */

@media (max-width: 991px) {
    .time-calendar-layout {
        flex-direction: column;
    }

    .calendar-sidebar {
        width: 100%;
        min-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .content {
        padding-left: 0;
        padding-right: 0;
    }

    .page-title {
        font-size: 20px;
    }

    .page-title::before {
        font-size: 18px;
    }

    .company-box,
    .owner-box {
        padding: 16px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .company-header,
    .owner-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .company-header h4,
    .owner-header h4 {
        font-size: 15px;
    }

    .company-header-actions {
        gap: 6px;
    }

    .header-action-btn {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 9px;
    }

    .toggle-company-btn,
    .toggle-owner-btn {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .stock-search {
        width: 100%;
    }

    .stock-search .form-control {
        width: auto;
        flex: 1 1 auto;
    }

    .stock-table thead th,
    .stock-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .wh-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wh-actions {
        flex: 1 1 auto;
        width: 100%;
    }

    .wh-name {
        font-size: 13px;
    }

    .rbh-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .rbh-form-label {
        flex: 1 1 auto;
        font-size: 14px;
    }

    .rbh-table thead th,
    .rbh-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .rbh-delete-btn {
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .rbh-form-actions {
        flex-direction: column;
    }

    .avatar-preview {
        width: 92px;
        height: 92px;
    }

    .avatar-preview i {
        font-size: 38px;
    }

    .calendar-sidebar {
        grid-template-columns: 1fr;
    }

    .calendar-card {
        padding: 12px;
        border-radius: 14px;
    }

    #calendar {
        min-height: 460px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .fc .fc-toolbar-title {
        font-size: 17px;
        text-align: center;
    }

    .fc .fc-button {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 62px;
    }

    .row > .col {
        flex: 0 0 100%;
        width: 100%;
    }

    .employee-add-btn {
        width: 100%;
    }

    #changePasswordModal .modal-dialog,
    #calendarEventModal .modal-dialog,
    #logoutModal .modal-dialog {
        margin: 14px;
    }
}

/* ===========================
   KARTY PROFILU - naglowek jako pasek, bez pustego pasa po zwinieciu
   (jak karty na innych stronach: search-box / client-box)
=========================== */
.company-box,
.owner-box {
    padding: 0;
    overflow: hidden;
}

.company-header,
.owner-header {
    margin: 0;
    padding: 14px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

/* zwinieta sekcja: sam pasek naglowka, bez linii i odstepu pod nim */
.company-box:has(> .company-content:not(.is-open)) .company-header,
.owner-box:has(> .owner-content:not(.is-open)) .owner-header {
    border-bottom-color: transparent;
}

.company-content,
.owner-content {
    padding: 0 22px;
    transition: max-height .35s ease, opacity .25s ease, padding .25s ease;
}

.company-content.is-open,
.owner-content.is-open {
    padding: 20px 22px;
}

.toggle-company-btn:hover,
.toggle-owner-btn:hover {
    transform: none;
}

html[data-bs-theme="dark"] .company-box,
html[data-bs-theme="dark"] .owner-box {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    box-shadow: none;
}

html[data-bs-theme="dark"] .company-header,
html[data-bs-theme="dark"] .owner-header {
    background: var(--app-surface-2);
    border-bottom-color: var(--app-border);
}

html[data-bs-theme="dark"] .company-box:has(> .company-content:not(.is-open)) .company-header,
html[data-bs-theme="dark"] .owner-box:has(> .owner-content:not(.is-open)) .owner-header {
    border-bottom-color: transparent;
}

@media (max-width: 768px) {
    .company-box,
    .owner-box { padding: 0; }

    .company-header,
    .owner-header { margin: 0; padding: 12px 16px; }

    .company-content.is-open,
    .owner-content.is-open { padding: 16px; }

    .company-content,
    .owner-content { padding-left: 16px; padding-right: 16px; }
}

/* ===========================
   OKNO PODPISU - jak inne okna w systemie (ikona, podtytul, pastelowe przyciski)
=========================== */
#signatureModal .modal-header {
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}
#signatureModal .btn-close { margin-left: auto; }
.signature-modal-icon {
    width: 44px; height: 44px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; background: #dce7fb; color: #2f56a6; font-size: 20px;
}
.signature-modal-sub { margin: 2px 0 0; font-size: 12.5px; color: #6b7c8f; }
#signatureModal .modal-body { padding: 18px 22px; background: #f6f8fc; }

.signature-top {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 0;
    margin-bottom: 12px;
    border-bottom: 0;
}
.signature-hint {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #33475b;
    text-align: left;
}
.signature-hint i { color: #9a5a0c; margin-right: 4px; }

.btn-sign-show {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border-radius: 8px; font-size: 13px; font-weight: 600;
    background: #dce7fb; color: #2f56a6;
    transition: background-color .18s ease, color .18s ease;
}
.btn-sign-show:hover, .btn-sign-show:focus { background: #c8d9f8; color: #244688; }
.btn-sign-show i { font-size: 11px; }

/* ramka podpisu: zawsze biala (podpis jest ciemny), delikatna ramka, lekki cien */
.signature-pad-wrap { padding: 12px; background: #fff; border: 1px solid #eef2f7; border-radius: 12px; }
#signaturePad { border: 2px dashed #cbd5e1; border-radius: 10px; background: #fff; }

.signature-status { margin-top: 10px; font-weight: 600; }

.signature-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 12px 22px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}
.signature-actions .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px; font-size: 13.5px; font-weight: 600;
    transition: background-color .18s ease, color .18s ease;
}
.signature-actions .btn i { font-size: 11px; }
/* .signature-actions przed klasa przycisku - wygrywa ze starym "color: #fff" z gory pliku */
.signature-actions .btn-sign-clear { background: #fbdada; color: #a52022; }
.signature-actions .btn-sign-clear:hover, .signature-actions .btn-sign-clear:focus { background: #f7c6c6; color: #8a1a1c; }
.signature-actions .btn-sign-close { background: #fde3c4; color: #9a5a0c; }
.signature-actions .btn-sign-close:hover, .signature-actions .btn-sign-close:focus { background: #f9d5a6; color: #7d4906; }
.signature-actions .btn-sign-save { background: #d3f2e1; color: #1b6b45; }
.signature-actions .btn-sign-save:hover, .signature-actions .btn-sign-save:focus { background: #bde9d0; color: #155637; }

html[data-bs-theme="dark"] #signatureModal .modal-content { background: var(--app-surface); }
html[data-bs-theme="dark"] #signatureModal .modal-header { background: var(--app-surface-2); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] #signatureModal .modal-title { color: var(--app-ink); }
html[data-bs-theme="dark"] .signature-modal-sub { color: var(--app-muted); }
html[data-bs-theme="dark"] .signature-modal-icon { background: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] #signatureModal .modal-body { background: #0b1626; }
html[data-bs-theme="dark"] .signature-hint { color: var(--app-ink); }
html[data-bs-theme="dark"] .btn-sign-show { background-color: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .btn-sign-show:hover { background-color: #2a4068; color: #bfd3f7; }
html[data-bs-theme="dark"] .signature-pad-wrap { background: var(--app-surface-2); border-color: var(--app-border); }
html[data-bs-theme="dark"] #signaturePad { background-color: #fff; border-color: #4b5a72; }
html[data-bs-theme="dark"] .signature-actions { background: var(--app-surface); border-top-color: var(--app-border); }
html[data-bs-theme="dark"] .signature-actions .btn-sign-clear { background-color: #4a2224; color: #f2a9aa; }
html[data-bs-theme="dark"] .signature-actions .btn-sign-clear:hover { background-color: #5b2a2c; color: #f7c0c1; }
html[data-bs-theme="dark"] .signature-actions .btn-sign-close { background-color: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] .signature-actions .btn-sign-close:hover { background-color: #5b401b; color: #fbd8a8; }
html[data-bs-theme="dark"] .signature-actions .btn-sign-save { background-color: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .signature-actions .btn-sign-save:hover { background-color: #22503a; color: #b6ebd0; }

@media (max-width: 575.98px) {
    .signature-actions { grid-template-columns: minmax(0, 1fr); }
    .signature-top { justify-content: center; }
}

/* ===========================
   OKNO PUSH - jak inne okna w systemie (ikona, podtytul, tabela w ramce, pastelowe przyciski)
=========================== */
#pushModal .modal-content { border-radius: 16px; overflow: hidden; }
#pushModal .modal-header { align-items: center; gap: 14px; padding: 16px 22px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
#pushModal .modal-title { font-size: 17px; font-weight: 700; color: #111827; }
#pushModal .btn-close { margin-left: auto; }
.push-modal-icon { width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #fde3c4; color: #9a5a0c; font-size: 20px; }
.push-modal-sub { margin: 2px 0 0; font-size: 12.5px; color: #6b7c8f; }
#pushModal .modal-body { padding: 18px 22px; background: #f6f8fc; }

.push-devices { border-radius: 12px; border-color: #eef2f7; background: #fff; max-height: 320px; }
.push-devices table { font-size: 13px; color: #33475b; }
.push-devices thead th { padding: 10px 14px; background: #f8fafc; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7c8f; border-bottom-color: #eef2f7; }
.push-devices tbody td { padding: 10px 14px; border-bottom-color: #eef2f7; }
.push-devices tbody tr:last-child td { border-bottom: 0; }
.push-devices tbody tr:nth-child(odd) { background: #fff; }
.push-devices tbody tr:hover { background: #f7fafd; }
.push-devices th + th, .push-devices td + td { border-left: 0; }
.push-devices td:nth-child(2) { font-weight: 600; color: #0f2745; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.push-devices tbody tr.is-selected { background: #eaf2fd; }
.push-badge { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; font-family: inherit; }
.push-badge.is-on { background: #d3f2e1; color: #1b6b45; }
.push-badge.is-off { background: #eef1f5; color: #6b7c8f; }

.push-label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: #33475b; }
#pushMessage { margin-top: 0; min-height: 96px; border-radius: 10px; border-color: #dbe3ee; font-size: 13.5px; background: #fff; }
.push-status { font-weight: 600; }

#pushModal .modal-footer { justify-content: space-between; padding: 12px 22px; border-top: 1px solid #eef2f7; background: #fff; }
.btn-push-send, .btn-push-close {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
    transition: background-color .18s ease, color .18s ease;
}
.btn-push-send i, .btn-push-close i { font-size: 11px; }
.btn-push-send { background: #dce7fb; color: #2f56a6; }
.btn-push-send:hover, .btn-push-send:focus { background: #c8d9f8; color: #244688; }
.btn-push-close { background: #fde3c4; color: #9a5a0c; }
.btn-push-close:hover, .btn-push-close:focus { background: #f9d5a6; color: #7d4906; }

html[data-bs-theme="dark"] #pushModal .modal-content { background: var(--app-surface); }
html[data-bs-theme="dark"] #pushModal .modal-header { background: var(--app-surface-2); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] #pushModal .modal-title { color: var(--app-ink); }
html[data-bs-theme="dark"] .push-modal-sub, html[data-bs-theme="dark"] .push-label { color: var(--app-muted); }
html[data-bs-theme="dark"] .push-modal-icon { background: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] #pushModal .modal-body { background: #0b1626; }
html[data-bs-theme="dark"] .push-devices { background: var(--app-surface); border-color: var(--app-border); }
html[data-bs-theme="dark"] .push-devices table { color: #cbd8e8; }
html[data-bs-theme="dark"] .push-devices thead th { background-color: var(--app-surface-2); color: var(--app-muted); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .push-devices tbody td { border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .push-devices tbody tr:nth-child(odd) { background-color: var(--app-surface); }
html[data-bs-theme="dark"] .push-devices tbody tr:hover { background-color: var(--app-surface-2); }
html[data-bs-theme="dark"] .push-devices td:nth-child(2) { color: var(--app-ink); }
html[data-bs-theme="dark"] .push-devices tbody tr.is-selected { background-color: #16283b; }
html[data-bs-theme="dark"] .push-devices .form-check-input { background-color: var(--app-surface-2); border-color: #4b5a72; }
html[data-bs-theme="dark"] .push-badge.is-on { background: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .push-badge.is-off { background: #1d2a42; color: #94a4bb; }
html[data-bs-theme="dark"] #pushMessage { background: var(--app-surface-2); border-color: var(--app-border); color: var(--app-ink); }
html[data-bs-theme="dark"] #pushMessage::placeholder { color: #6f7f99; }
html[data-bs-theme="dark"] #pushModal .modal-footer { background: var(--app-surface); border-top-color: var(--app-border); }
html[data-bs-theme="dark"] .btn-push-send { background-color: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .btn-push-send:hover { background-color: #2a4068; color: #bfd3f7; }
html[data-bs-theme="dark"] .btn-push-close { background-color: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] .btn-push-close:hover { background-color: #5b401b; color: #fbd8a8; }

/* ===========================
   OKNA: DODAJ RBH, STANY MAGAZYNOWE, ZMIEN HASLO - wspolny wyglad okien systemu
=========================== */
#rbhModal .modal-content, #stockModal .modal-content, #changePasswordModal .modal-content {
    border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}
#rbhModal .modal-header, #stockModal .modal-header, #changePasswordModal .modal-header {
    align-items: center; gap: 14px; padding: 16px 22px; background: #f8fafc; border-bottom: 1px solid #eef2f7;
}
#rbhModal .modal-title, #stockModal .modal-title, #changePasswordModal .modal-title { font-size: 17px; font-weight: 700; color: #111827; }
#rbhModal .btn-close, #stockModal .btn-close, #changePasswordModal .btn-close { margin-left: auto; }
.pm-icon { width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #dce7fb; color: #2f56a6; font-size: 20px; }
.pm-sub { margin: 2px 0 0; font-size: 12.5px; color: #6b7c8f; }
#rbhModal .modal-body, #stockModal .modal-body, #changePasswordModal .modal-body { padding: 18px 22px; background: #f6f8fc; }
#rbhModal .modal-footer, #stockModal .modal-footer, #changePasswordModal .modal-footer { padding: 12px 22px; border-top: 1px solid #eef2f7; background: #fff; }

/* RBH: etykieta nad polem, pastelowe przyciski */
.rbh-form-row { flex-direction: column; align-items: stretch; gap: 6px; }
.rbh-form-label { flex: none; font-size: 13px; font-weight: 600; color: #33475b; }
.rbh-form-row .form-control { height: 38px; font-size: 13.5px; }
.rbh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 0; border-radius: 10px; font-size: 13.5px; transition: background-color .18s ease, color .18s ease; }
.rbh-btn:hover { transform: none; }
.rbh-btn i { font-size: 11px; }
.rbh-btn-cancel { background: #fde3c4; color: #9a5a0c; }
.rbh-btn-cancel:hover, .rbh-btn-cancel:focus { background: #f9d5a6; color: #7d4906; }
.rbh-btn-save { background: #d3f2e1; color: #1b6b45; }
.rbh-btn-save:hover, .rbh-btn-save:focus { background: #bde9d0; color: #155637; }

/* Stany magazynowe: pastelowe pigulki, tabela w ramce */
.stock-chip { height: 34px; border: 0; border-radius: 8px; background: #fff; color: #33475b; font-size: 13px; box-shadow: inset 0 0 0 1px #e5e7eb; }
.stock-chip:hover { background: #f1f5f9; }
.stock-chip.is-active, .stock-chip.is-active:hover { background: #d3f2e1; color: #1b6b45; box-shadow: none; }
.stock-search .form-control { height: 34px; font-size: 13px; }
.stock-search-btn { height: 34px; border: 0; border-radius: 8px; background: #dce7fb; color: #2f56a6; font-size: 13px; }
.stock-search-btn:hover, .stock-search-btn:focus { background: #c8d9f8; color: #244688; }
.stock-table-wrap { border-radius: 12px; border-color: #eef2f7; background: #fff; }
.stock-table { font-size: 13px; color: #33475b; }
.stock-table thead th { padding: 10px 14px; background: #f8fafc; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7c8f; border-bottom-color: #eef2f7; }
.stock-table tbody td { padding: 10px 14px; border-bottom-color: #eef2f7; }
.stock-table tbody tr:nth-child(odd) { background: #fff; }
.stock-table tbody tr:hover { background: #f7fafd; }
.stock-table th + th, .stock-table td + td { border-left: 0; }
.stock-table td.stock-col-symbol { font-weight: 600; color: #0f2745; }
.stock-close-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: #fde3c4; color: #9a5a0c; font-size: 13.5px; }
.stock-close-btn:hover, .stock-close-btn:focus { background: #f9d5a6; color: #7d4906; }
.stock-close-btn i { font-size: 11px; }

/* Zmien haslo: pola i przyciski */
#changePasswordModal .form-label { font-size: 13px; font-weight: 600; color: #33475b; }
#changePasswordModal .form-control { height: 38px; font-size: 13.5px; }
#changePasswordModal .input-group-text { background: #fff; border-color: #dbe3ee; color: #6b7c8f; }
#changePasswordModal .modal-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; border: 0; border-radius: 10px; font-size: 13.5px; font-weight: 600; transition: background-color .18s ease, color .18s ease; }
.pm-btn i { font-size: 11px; }
.pm-btn-cancel { background: #fde3c4; color: #9a5a0c; }
.pm-btn-cancel:hover, .pm-btn-cancel:focus { background: #f9d5a6; color: #7d4906; }
.pm-btn-primary { background: #dce7fb; color: #2f56a6; }
.pm-btn-primary:hover, .pm-btn-primary:focus { background: #c8d9f8; color: #244688; }

/* ciemny motyw */
html[data-bs-theme="dark"] #rbhModal .modal-content, html[data-bs-theme="dark"] #stockModal .modal-content, html[data-bs-theme="dark"] #changePasswordModal .modal-content { background: var(--app-surface); }
html[data-bs-theme="dark"] #rbhModal .modal-header, html[data-bs-theme="dark"] #stockModal .modal-header, html[data-bs-theme="dark"] #changePasswordModal .modal-header { background: var(--app-surface-2); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] #rbhModal .modal-title, html[data-bs-theme="dark"] #stockModal .modal-title, html[data-bs-theme="dark"] #changePasswordModal .modal-title { color: var(--app-ink); }
html[data-bs-theme="dark"] .pm-sub, html[data-bs-theme="dark"] .rbh-form-label, html[data-bs-theme="dark"] #changePasswordModal .form-label { color: var(--app-muted); }
html[data-bs-theme="dark"] .pm-icon { background: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] #rbhModal .modal-body, html[data-bs-theme="dark"] #stockModal .modal-body, html[data-bs-theme="dark"] #changePasswordModal .modal-body { background: #0b1626; }
html[data-bs-theme="dark"] #rbhModal .modal-footer, html[data-bs-theme="dark"] #stockModal .modal-footer, html[data-bs-theme="dark"] #changePasswordModal .modal-footer { background: var(--app-surface); border-top-color: var(--app-border); }
html[data-bs-theme="dark"] .rbh-btn-cancel, html[data-bs-theme="dark"] .stock-close-btn, html[data-bs-theme="dark"] .pm-btn-cancel { background-color: #4a3416; color: #f6c98d; border: 0; }
html[data-bs-theme="dark"] .rbh-btn-cancel:hover, html[data-bs-theme="dark"] .stock-close-btn:hover, html[data-bs-theme="dark"] .pm-btn-cancel:hover { background-color: #5b401b; color: #fbd8a8; }
html[data-bs-theme="dark"] .rbh-btn-save { background-color: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .rbh-btn-save:hover { background-color: #22503a; color: #b6ebd0; }
html[data-bs-theme="dark"] .pm-btn-primary, html[data-bs-theme="dark"] .stock-search-btn { background-color: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .pm-btn-primary:hover, html[data-bs-theme="dark"] .stock-search-btn:hover { background-color: #2a4068; color: #bfd3f7; }
html[data-bs-theme="dark"] .stock-chip { background: var(--app-surface-2); color: #cbd8e8; box-shadow: inset 0 0 0 1px var(--app-border); }
html[data-bs-theme="dark"] .stock-chip:hover { background: #1d2a42; }
html[data-bs-theme="dark"] .stock-chip.is-active, html[data-bs-theme="dark"] .stock-chip.is-active:hover { background: #1a3d2c; color: #9fe0bf; box-shadow: none; }
html[data-bs-theme="dark"] .stock-table-wrap { background: var(--app-surface); border-color: var(--app-border); }
html[data-bs-theme="dark"] .stock-table { color: #cbd8e8; }
html[data-bs-theme="dark"] .stock-table thead th { background: var(--app-surface-2); color: var(--app-muted); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .stock-table tbody td { border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .stock-table tbody tr:nth-child(odd) { background: var(--app-surface); }
html[data-bs-theme="dark"] .stock-table tbody tr:hover { background: var(--app-surface-2); }
html[data-bs-theme="dark"] .stock-table td.stock-col-symbol { color: var(--app-ink); }
html[data-bs-theme="dark"] #changePasswordModal .form-control, html[data-bs-theme="dark"] #rbhModal .form-control, html[data-bs-theme="dark"] .stock-search .form-control { background: var(--app-surface-2); border-color: var(--app-border); color: var(--app-ink); }
html[data-bs-theme="dark"] #changePasswordModal .input-group-text { background: var(--app-surface-2); border-color: var(--app-border); color: var(--app-muted); }

/* ===========================
   PRZYPISANE MAGAZYNY / ODDZIALY / REGIONY - pastelowe przelaczniki, linie w kolorze motywu
=========================== */
.wh-list { border-top-color: #eef2f7; }
.wh-row { padding: 10px 6px; border-bottom-color: #eef2f7; }
.wh-row:hover { background: #f7fafd; }
.wh-name { font-size: 13.5px; color: #33475b; }
.wh-row.is-default .wh-name { color: #0f2745; }
.wh-actions { flex-basis: 220px; width: 220px; }
.wh-btn {
    height: 32px; border: 0; border-radius: 8px;
    background: #eef1f5; color: #6b7c8f; font-size: 13px;
    transition: background-color .18s ease, color .18s ease;
}
.wh-btn:hover, .wh-btn:focus { background: #e2e8f0; color: #33475b; outline: none; }
.wh-btn-assign.is-on, .wh-btn-assign.is-on:hover { background: #d3f2e1; color: #1b6b45; }
/* "Nie" - pastelowy czerwony (K4) */
.wh-btn-assign:not(.is-on) { background: #fbdada; color: #a52022; }
.wh-btn-assign:not(.is-on):hover, .wh-btn-assign:not(.is-on):focus { background: #f7c6c6; color: #8a1a1c; }
.wh-btn-default.is-on, .wh-btn-default.is-on:hover { background: #dce7fb; color: #2f56a6; }
.wh-btn-show, .wh-btn-show:hover { background: #fde3c4; color: #9a5a0c; }
.wh-btn-show:hover, .wh-btn-show:focus { background: #f9d5a6; color: #7d4906; }

html[data-bs-theme="dark"] .wh-list { border-top-color: var(--app-border); }
html[data-bs-theme="dark"] .wh-row { border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .wh-row:hover { background-color: var(--app-surface-2); }
html[data-bs-theme="dark"] .wh-name { color: #cbd8e8; }
html[data-bs-theme="dark"] .wh-row.is-default .wh-name { color: var(--app-ink); }
html[data-bs-theme="dark"] .wh-btn { background-color: var(--app-surface-2); color: var(--app-muted); border: 0; }
html[data-bs-theme="dark"] .wh-btn:hover { background-color: #1d2a42; color: #cbd8e8; }
html[data-bs-theme="dark"] .wh-btn-assign.is-on, html[data-bs-theme="dark"] .wh-btn-assign.is-on:hover { background-color: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .wh-btn-assign:not(.is-on), html[data-bs-theme="dark"] .wh-btn-assign:not(.is-on):hover { background-color: #4a2224; color: #f2a9aa; }
html[data-bs-theme="dark"] .wh-btn-default.is-on, html[data-bs-theme="dark"] .wh-btn-default.is-on:hover { background-color: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .wh-btn-show, html[data-bs-theme="dark"] .wh-btn-show:hover { background-color: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] .wh-btn-show:hover { background-color: #5b401b; color: #fbd8a8; }

/* ===========================
   USTAWIENIA RBH - tabela w stylu innych tabel, pastelowy "Usun", ciemny motyw
=========================== */
.rbh-subtitle { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7c8f; text-align: left; }
.rbh-table-wrap { border-radius: 12px; border-color: #eef2f7; background: #fff; }
.rbh-table { font-size: 13px; color: #33475b; }
.rbh-table thead th { padding: 10px 14px; background: #f8fafc; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7c8f; border-bottom-color: #eef2f7; }
.rbh-table tbody td { padding: 10px 14px; border-bottom-color: #eef2f7; }
.rbh-table tbody tr:nth-child(odd) { background: #fff; }
.rbh-table tbody tr:hover { background: #f7fafd; }
.rbh-table th + th, .rbh-table td + td { border-left: 0; }
.rbh-table td:first-child { font-weight: 600; color: #0f2745; }
.rbh-delete-btn { max-width: 160px; height: 32px; border: 0; border-radius: 8px; background: #fbdada; color: #a52022; font-size: 13px; transition: background-color .18s ease, color .18s ease; }
.rbh-delete-btn:hover, .rbh-delete-btn:focus { background: #f7c6c6; color: #8a1a1c; transform: none; }
.rbh-delete-btn i { font-size: 11px; }
.rbh-empty { color: #6b7c8f; }

html[data-bs-theme="dark"] .rbh-subtitle, html[data-bs-theme="dark"] .rbh-empty { color: var(--app-muted); }
html[data-bs-theme="dark"] .rbh-table-wrap { background: var(--app-surface); border-color: var(--app-border); }
html[data-bs-theme="dark"] .rbh-table { color: #cbd8e8; }
html[data-bs-theme="dark"] .rbh-table thead th { background: var(--app-surface-2); color: var(--app-muted); border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .rbh-table tbody td { border-bottom-color: var(--app-border); }
html[data-bs-theme="dark"] .rbh-table tbody tr:nth-child(odd) { background: var(--app-surface); }
html[data-bs-theme="dark"] .rbh-table tbody tr:hover { background: var(--app-surface-2); }
html[data-bs-theme="dark"] .rbh-table td:first-child { color: var(--app-ink); }
html[data-bs-theme="dark"] .rbh-delete-btn { background-color: #4a2224; color: #f2a9aa; border: 0; }
html[data-bs-theme="dark"] .rbh-delete-btn:hover { background-color: #5b2a2c; color: #f7c0c1; }

/* tytul strony bez ikonki - jak na pozostalych stronach */
.page-title::before { content: none; }

/* stanowisko: prostokatne, pastelowe przelaczniki (zaznaczony - niebieski, odznaczony - szary) */
.position-group { display: flex; flex-wrap: wrap; gap: 8px; }
.position-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border: 1px solid #dfe5ee; border-radius: 8px; background: #eef1f5; color: #4b5563; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; margin: 0; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.position-btn i { font-size: 11px; opacity: 0; width: 0; overflow: hidden; transition: opacity .18s ease, width .18s ease; }
.position-btn:hover { background: #e6ebf3; color: #33475b; }
.btn-check:checked + .position-btn { background: #dce7fb; border-color: #c8d9f8; color: #2f56a6; }
.btn-check:checked + .position-btn i { opacity: 1; width: 11px; }
.btn-check:focus-visible + .position-btn { outline: 2px solid #c8d9f8; outline-offset: 2px; }
html[data-bs-theme="dark"] .position-btn { background: #2b3544; border-color: #3a4a66; color: #c3cdda; }
html[data-bs-theme="dark"] .position-btn:hover { background: #33405a; }
html[data-bs-theme="dark"] .btn-check:checked + .position-btn { background: #223454; border-color: #2f4a76; color: #a9c3f2; }
/* uprawnienia tylko do odczytu: ten sam prostokatny wyglad, bez kursora "lapki" i bez wyszarzenia */
.btn-check:disabled + .position-btn { cursor: default; opacity: 1; pointer-events: none; }

/* widok mobilny: wiersz oddzialu/magazynu uklada sie w kolumne, wiec szerokosc kolumny akcji (220px)
   dzialala tam jako wysokosc i robila wielkie odstepy - kolumna akcji ma miec naturalna wysokosc */
@media (max-width: 768px) {
    .wh-row .wh-actions { flex: 0 0 auto; width: 100%; height: auto; min-height: 0; }
    .wh-row { padding: 10px 4px; gap: 8px; }
}

/* okno postepu wysylki PUSH: kafelek ikony wg stanu (wysylanie niebieski, sukces zielony, blad czerwony) */
.push-progress-icon.is-sending { background: #dce7fb; color: #2f56a6; }
.push-progress-icon.is-success { background: #d3f2e1; color: #1b6b45; }
.push-progress-icon.is-error { background: #fbdada; color: #a52022; }
#pushProgressModal .logout-actions { margin-top: 18px; }
.push-retry-btn { background: #dce7fb !important; color: #2f56a6 !important; border-color: #dce7fb !important; }
.push-retry-btn:hover, .push-retry-btn:focus { background: #c8d9f8 !important; color: #244688 !important; }
html[data-bs-theme="dark"] .push-progress-icon.is-sending { background: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .push-progress-icon.is-success { background: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .push-progress-icon.is-error { background: #4a2224; color: #f2a9aa; }
html[data-bs-theme="dark"] .push-retry-btn { background: #223454 !important; color: #a9c3f2 !important; border-color: #223454 !important; }

/* okno "Zmien haslo" bez X - naglowek wyrownany do lewej */
#changePasswordModal .modal-header { justify-content: flex-start; }
/* okno "Zmien haslo": kafelek ikony jak w innych oknach (obramowanie, jasne tlo), wyrazna klodka */
#changePasswordModal .pm-icon { align-self: flex-start; background: #eef4fb; border: 2px solid #3a64a8; color: #2f5597; font-size: 19px; }
html[data-bs-theme="dark"] #changePasswordModal .pm-icon { background: #172236; border-color: #7fa3dc; color: #a9c3f2; }
