/* === GŁÓWNA STRUKTURA NOWEGO PANELU (VUE.JS) === */
.mc-vue-dashboard, .mc-vue-dashboard * { box-sizing: border-box; }
.mc-vue-dashboard { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; background: #fff; position: relative; }
.mc-vue-main-nav { display: flex; background-color: #f8f9fa; padding: 10px 20px 0 20px; border-bottom: 1px solid #dee2e6; }
.mc-vue-main-nav button { padding: 10px 20px; border: none; background: none; cursor: pointer; font-size: 1.1em; font-weight: 500; color: #495057; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.mc-vue-main-nav button.active { color: #0d6efd; border-bottom-color: #0d6efd; }

/* === NAGŁÓWEK === */
.mc-vue-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: #f8f9fa; border-bottom: 1px solid #dee2e6; flex-wrap: nowrap; gap: 1.5rem; }
.header-group { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.header-group.date-display-group { flex-grow: 1; justify-content: center; flex-shrink: 1; min-width: 200px; }
.date-display { font-size: 1.5em; font-weight: 500; margin: 0; color: #212529; white-space: nowrap; }
.nav-btn, .add-btn, .mc-vue-header select { background-color: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.9em; font-family: inherit; transition: all 0.15s; height: 38px; }
.nav-btn:hover, .mc-vue-header select:hover { border-color: #9ca3af; background: #f9fafb; }
.nav-btn { color: #374151; font-weight: 500; }
.view-switcher { display: inline-flex; background: #e9ecef; border-radius: 8px; padding: 3px; gap: 2px; border: none; flex-shrink: 0; }
.view-switcher button { border: none; border-radius: 6px; padding: 6px 18px; font-size: 0.88em; font-weight: 600; color: #495057; background: transparent; cursor: pointer; transition: all 0.2s; height: auto; white-space: nowrap; box-shadow: none !important; }
.view-switcher button:hover:not(.active) { background: rgba(255,255,255,0.5); }
.view-switcher button.active { background: #fff; color: #0d6efd; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }
.add-btn { background-color: #0d6efd; border-color: #0d6efd; color: #fff; font-weight: 600; border-radius: 8px; }
.add-btn:hover { background-color: #0b5ed7; }
.mc-vue-header select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px 12px; padding-right: 2.5rem; }

/* === NOWA STRUKTURA I KALIBRACJA SIATKI === */
.mc-vue-grid-wrapper { display: flex; flex-direction: column; }
.mc-vue-grid-header { display: flex; flex-shrink: 0; }
.header-corner { width: 60px; /* Szerokość osi czasu */ flex-shrink: 0; border-bottom: 1px solid #dee2e6; }
.day-header { flex: 1; text-align: center; padding: 10px 5px; border-bottom: 1px solid #dee2e6; font-weight: bold; background: #fff; z-index: 10; border-left: 1px solid #dee2e6; }
.day-header:first-of-type { border-left: none; }
.day-name { font-size: 0.9em; color: #6c757d; display: block; text-transform: uppercase; }
.day-num { font-size: 1.5em; line-height: 1.2; }
.day-header.is-today { background-color: #f0faff; }
.day-header.is-today .day-num { color: #0d6efd; }

.mc-vue-grid-body-container { display: flex; position: relative; }
.mc-vue-time-axis { width: 60px; flex-shrink: 0; }
.time-label {
    height: 80px;
    text-align: right;
    color: #6c757d;
    font-size: 0.9em;
    padding-right: 10px;
    /* Usunięto border-top */
    position: relative;
    top: -0.7em;
}.time-label:first-child { border-top: none; }

.mc-vue-grid { display: grid; flex-grow: 1; border-left: 1px solid #dee2e6; }
.day-column { position: relative; border-right: 1px solid #dee2e6; background-image: linear-gradient(to bottom, #e9ecef 1px, transparent 1px); background-size: 100% 40px; /* Linie co pół godziny */ }
.day-column:last-child { border-right: none; }

/* Przycisk "+" do dodawania wizyty — prawy margines kolumny */
.add-slot-btn {
    position: absolute;
    top: 4px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.day-column:hover .add-slot-btn { opacity: 1; }
.add-slot-btn:hover { transform: scale(1.15); background: #0b5ed7; }

/* Drag & drop */
.mc-vue-event[draggable="true"] { cursor: grab; }
.mc-vue-event[draggable="true"]:active { cursor: grabbing; }
.day-column.drag-over { background-color: rgba(13,110,253,.06) !important; outline: 2px dashed #0d6efd; outline-offset: -2px; }

/* Wskaźnik aktualnego czasu */
.time-indicator { position: absolute; left: 60px; /* Odsunięcie o szerokość osi czasu */ right: 0; height: 2px; background-color: #dc3545; z-index: 20; }
.time-indicator::before { content: ''; position: absolute; left: -5px; top: -4px; width: 12px; height: 12px; background-color: #dc3545; border-radius: 50%; }

/* Klocki z dostępnością specjalisty */
.availability-slot { position: absolute; left: 0; right: 0; z-index: 1; opacity: 0.15; pointer-events: none; }

/* KA_FELEK WIZYTY (EVENT) */
/* KA_FELEK WIZYTY (EVENT) */
.mc-vue-event {
    position: absolute;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    /* ZMIANA: Usunięto left i right, dodano płynne przejście dla szerokości i pozycji */
    transition: width 0.2s ease-in-out, left 0.2s ease-in-out, transform 0.2s, box-shadow 0.2s;
}

.mc-vue-event:hover {
    /* ZMIANA: Przy najechaniu, wizyta rozszerza się do pełnej szerokości i podnosi się na wierzch */
    width: calc(100% - 8px) !important; /* Ważne, aby nadpisać styl inline */
    left: 4px !important;               /* Ważne, aby nadpisać styl inline */
    z-index: 10;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}
.event-time-patient, .event-service, .event-specialist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-time-patient { display: flex; justify-content: space-between; font-weight: 700; }
.event-time { flex-shrink: 0; }
.event-patient { text-align: right; margin-left: 5px; }
.event-service {
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px; /* Odstęp między nazwą usługi a ceną */
}
.event-specialist { opacity: 0.7; font-size: 12px; margin-top: auto; }
.event-icons { position: absolute; bottom: 5px; right: 8px; display: flex; gap: 5px; }
.icon-google, .icon-payment { font-size: 12px; background: rgba(255,255,255,0.8); border-radius: 50%; width: 18px; height: 18px; text-align: center; line-height: 18px; font-weight: bold; }
.icon-google { color: #4285F4; }
.icon-payment { color: #fd7e14; }
.mc-vue-event.status-umówiona { border-left-color: #f59e0b !important; border-left-width: 4px; }
.mc-vue-event.status-odwołana { background-color: #e9ecef !important; border-left-color: #6c757d !important; color: #495057; text-decoration: line-through; }
.mc-vue-event.status-zakończona { background-color: #d1e7dd !important; border-left-color: #0f5132 !important; color: #0a3622; }
.mc-vue-event.status-zakończona .event-time { color: #0a3622; }

/* === POZOSTAŁE STYLE (BEZ ZMIAN) === */
.booking-tooltip { position: absolute; z-index: 100; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); width: 300px; padding: 15px; font-size: 14px; pointer-events: none; opacity: 0; transform: scale(0.95) translateY(-10px); transition: opacity 0.2s ease, transform 0.2s ease; transform-origin: top left; }
.booking-tooltip.is-active { opacity: 1; transform: scale(1) translateY(0); }
.tooltip-header { font-weight: bold; font-size: 1.2em; margin-bottom: 5px; }
.tooltip-meta { color: #555; margin-bottom: 15px; }
.tooltip-section { border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }
.tooltip-section .item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tooltip-section .item .icon { font-size: 1.1em; width: 24px; text-align: center; }
.mc-vue-clients-view { padding: 20px; }
.client-search-input { width: 100%; padding: 12px; font-size: 1.1em; border: 1px solid #ccc; border-radius: 6px; margin-bottom: 20px; }
.clients-table { width: 100%; border-collapse: collapse; }
.clients-table th, .clients-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e0e0e0; }
.clients-table th { background-color: #f7f7f7; font-weight: 600; }
.clients-table tbody tr { cursor: pointer; transition: background-color 0.2s; }
.clients-table tbody tr:hover { background-color: #f0faff; }
/* === BOOKING MODAL (zastąpił sidebar) === */
.mc-vue-sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.mc-vue-sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }
.mc-vue-sidebar { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: 520px; max-width: 94vw; max-height: 90vh; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,0.2); z-index: 999; border-radius: 12px; display: flex; flex-direction: column; opacity: 0; transition: all 0.25s ease; pointer-events: none; }
.mc-vue-sidebar.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.sidebar-content { padding: 28px 28px 20px; overflow-y: auto; flex-grow: 1; position: relative; }
.sidebar-loader { display: flex; align-items: center; justify-content: center; min-height: 200px; font-size: 1.1em; color: #6b7280; }
.sidebar-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.6em; color: #9ca3af; cursor: pointer; line-height: 1; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.15s; }
.sidebar-close:hover { color: #374151; background: #f3f4f6; }
.sidebar-title { margin: 0 0 20px; color: #111827; font-size: 1.25em; font-weight: 700; padding-right: 40px; }
.mc-vue-sidebar .form-group { margin-bottom: 16px; }
.mc-vue-sidebar label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.85em; color: #374151; letter-spacing: 0.01em; }
.mc-vue-sidebar input, .mc-vue-sidebar select, .mc-vue-sidebar textarea { width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.95em; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; background: #fff; }
.mc-vue-sidebar input:focus, .mc-vue-sidebar select:focus, .mc-vue-sidebar textarea:focus { border-color: #0d6efd; box-shadow: 0 0 0 3px rgba(13,110,253,0.12); outline: none; }
.datetime-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}
.datetime-picker > * {
    flex: 1 1 160px;
    min-width: 0;
}
.datetime-picker .mc-date-field {
    flex: 1 1 180px;
    min-width: 0;
}
.datetime-picker > select,
.datetime-picker > input[type="time"] {
    height: 42px;
    padding: 9px 12px;
    font-size: 0.95em;
}
.mc-manual-time-toggle { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 8px; font-weight: 500 !important; color: #4b5563 !important; cursor: pointer; }
.mc-manual-time-toggle input { width: auto !important; flex: 0 0 auto; }
.mc-manual-time-note { margin: 6px 0 0; padding: 8px 10px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.82em; line-height: 1.45; }
/* Dwie kolumny dla email+telefon */
.mc-vue-sidebar .form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mc-vue-sidebar .form-row-2col .form-group { margin-bottom: 0; }
.sidebar-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e5e7eb; display: flex; gap: 10px; }
.sidebar-actions .button-primary { background-color: #0d6efd; color: #fff; border: none; padding: 11px 20px; font-size: 0.95em; font-weight: 600; border-radius: 8px; cursor: pointer; text-align: center; flex-grow: 1; transition: background-color 0.15s; }
.sidebar-actions .button-primary:hover { background-color: #0b5ed7; }
.sidebar-actions .button-secondary { background-color: #fef2f2; color: #dc2626; border: 1px solid #fecaca; padding: 11px 20px; font-size: 0.95em; font-weight: 600; border-radius: 8px; cursor: pointer; text-align: center; flex-grow: 1; transition: background-color 0.15s; }
.sidebar-actions .button-secondary:hover { background-color: #fee2e2; }
.sidebar-message { margin-top: 15px; padding: 10px; border-radius: 6px; white-space: pre-line; }
.sidebar-message.success { background-color: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.sidebar-message.error { background-color: #fbe9e7; color: #c62828; border: 1px solid #ffccbc; }
.sidebar-message.info { background-color: #eef2f7; color: #374151; border: 1px solid #d1dce8; }
.sidebar-integrations { background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; margin-top: 16px; padding: 0 16px; }
.integration-section { padding: 14px 0; border-bottom: 1px solid #e5e7eb; }
.sidebar-integrations .integration-section:last-child { border-bottom: none; }
.integration-section h4 { margin: 0 0 10px 0; font-size: 0.9em; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: 0.03em; }
.integration-section p { margin: 0 0 8px 0; font-size: 0.9em; }
.p24-details { font-size: 0.82em; color: #6b7280; background: #f3f4f6; padding: 8px 10px; border-radius: 6px; margin-bottom: 10px; }
.p24-details span { display: block; }
.p24-actions button, .integration-section button { color: #374151; font-weight: 600; padding: 8px 12px; font-size: 0.88em; border-radius: 6px; cursor: pointer; border: 1px solid #d1d5db; background-color: #fff; transition: all 0.15s; }
.p24-actions button.button-primary, .integration-section button.button-primary { background-color: #0d6efd; color: #fff !important; border-color: #0d6efd; }
.p24-actions button.button-primary:hover { background-color: #0b5ed7; }
.p24-actions button.button-danger { background-color: #dc2626; color: #fff; border-color: #dc2626; }
.p24-actions button.button-danger:hover { background-color: #b91c1c; }
.integration-section button:hover:not(:disabled):not(.button-primary):not(.button-danger) { background-color: #f3f4f6; border-color: #9ca3af; }
.integration-section button:disabled { opacity: 0.7; cursor: not-allowed; }
.adjacent-bookings-info { padding: 10px 12px; background-color: #f0f6fc; border: 1px solid #d1dce8; border-radius: 6px; font-style: italic; color: #374151; font-size: 0.9em; margin-bottom: 10px !important; }
.update-all-toggle label { font-weight: normal !important; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9em !important; }
.recurring-section { background: #f9fafb; padding: 14px 16px; border-radius: 8px; margin: 0; border: 1px solid #e5e7eb; }
.recurring-options { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.recurring-options .form-group { margin-bottom: 0; }
/* Payment badges */
.payment-status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.82em; font-weight: 600; }
.payment-status-badge.is-paid { background: #dcfce7; color: #166534; }
.payment-status-badge.is-unpaid { background: #fef3c7; color: #92400e; }
.mc-vue-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999999; display: flex; align-items: center; justify-content: center; }
.mc-vue-modal { background: #fdfdfd; border-radius: 8px; width: 90%; max-width: 1000px; height: 90vh; box-shadow: 0 5px 25px rgba(0,0,0,0.3); position: relative; display: flex; flex-direction: column; overflow: hidden; }

/* Mobile: full-screen, nad menu i paskami */
@media (max-width: 768px) {
    .mc-vue-modal-overlay {
        z-index: 999999 !important;
        align-items: flex-start;
        padding: 0;
    }
    .mc-vue-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    /* Ukryj fixed elementy strony pod modalem */
    body:has(.mc-vue-modal-overlay) .mc-header,
    body:has(.mc-vue-modal-overlay) .mc-topbar,
    body:has(.mc-vue-modal-overlay) #wpadminbar { z-index: 0 !important; }
}
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 2em; color: #999; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-loader { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 1.2em; color: #555; }
.client-history-content { display: flex; flex-direction: column; height: 100%; }
.client-history-header { padding: 20px 25px; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; }
.client-history-header h2 { margin: 0 0 15px 0; font-size: 1.8em; }
.client-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.client-details-grid .form-group { margin: 0; }
.client-details-grid input[readonly] { background: #f0f0f0; border-color: #f0f0f0; cursor: default; }
.client-actions { margin-top: 15px; display: flex; gap: 10px; align-items: center; }
.client-actions button { padding: 8px 16px; font-size: 0.9em; border-radius: 5px; cursor: pointer; border: 1px solid #ccc; background: #f0f0f0; }
.client-actions .button-primary { background-color: #2271b1; border-color: #2271b1; color: #fff; }
.client-actions .button-secondary { color: #a00; }
.modal-message { margin-left: 15px; padding: 8px; border-radius: 4px; font-size: 0.9em; }
.modal-message.success { background-color: #e8f5e9; color: #1b5e20; }
.modal-message.error { background-color: #fbe9e7; color: #c62828; }
.client-history-body { padding: 0 25px 25px 25px; overflow-y: auto; flex-grow: 1; }
.client-history-body .clients-table .paid { color: #2ca02c; font-weight: 500; }
.client-history-body .clients-table .unpaid { color: #f59e0b; font-weight: 500; }
.integration-section .button-secondary-alt { background-color: #e3f2fd; border-color: #bbdefb; color: #0d47a1; font-weight: 500; }
.integration-section .button-danger { background-color: #fbe9e7; border-color: #ffccbc; color: #b71c1c; font-weight: 500; }
.payment-info { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.payment-status-badge { padding: 6px 12px; border-radius: 15px; font-size: 0.9em; font-weight: 600; color: #fff; text-transform: uppercase; }
.payment-status-badge.is-paid { background-color: #28a745; }
.payment-status-badge.is-unpaid { background-color: #fd7e14; }
.payment-method { font-size: 0.9em; color: #555; }
.manual-payment { padding-top: 10px; border-top: 1px dashed #ddd; margin-top: 10px; }
.form-group.with-button .input-wrapper { display: flex; align-items: center; gap: 8px; }
.form-group.with-button .input-wrapper input { flex-grow: 1; }
.button-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #ccc; background-color: #f0f0f0; cursor: pointer; font-size: 1.3em; padding: 0; line-height: 36px; text-align: center; }
.button-icon:hover { background-color: #e0e0e0; }
.payment-actions {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px dashed #ddd;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Poprawka dla autouzupełniania */
.patient-search-group {
    position: relative;
}
.client-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.client-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.client-search-results li {
    padding: 10px 12px;
    cursor: pointer;
}
.client-search-results li:hover {
    background-color: #f0f0f0;
}
/* === NOWE STYLE: Wizualne odróżnienie spotkań grupowych === */
.mc-vue-event.event-type-group {
    background-color: #d1e7dd; /* Zielonkawe tło */
    border-left-color: #0f5132;
    color: #0a3622;
}

.mc-vue-event.event-type-group .event-patient {
    font-weight: 600; /* Pogrubienie nazwy edycji */
}

.event-patient .group-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 0.9em;
}

/* Plik: css/dashboard-style.css (dodaj na końcu) */

/* === NOWE STYLE: MODAL ZARZĄDZANIA GRUPĄ (HI-FIDELITY) === */

/* --- Nagłówek Modala --- */
.mc-vue-modal .modal-header h2 { margin: 0 0 5px 0; font-size: 1.8em; }
.mc-vue-modal .modal-header p { margin: 0; color: #50575e; }
.group-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-top: 15px;
    font-size: 14px;
    color: #3c434a;
    align-items: center;
}
.group-meta-info span { display: inline-flex; align-items: center; gap: 6px; }
.group-meta-info a { color: #2271b1; text-decoration: none; }
.group-meta-info a:hover { text-decoration: underline; }

/* --- Pasek Akcji Masowych --- */
.modal-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 25px;
    background: #f6f7f7;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.mass-actions-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mass-actions-buttons .button .dashicons { font-size: 18px; height: 18px; width: 18px; }

/* --- Ciało Modala (Filtry i Tabela) --- */
.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}
.participant-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.participant-filters .button.active { background-color: #dcdcde; font-weight: 600; border-color: #c1c1c1; }

.clients-table .col-checkbox { width: 40px; }
.clients-table .col-actions { width: 220px; text-align: right; }

.participant-actions { display: flex; justify-content: flex-end; gap: 8px; }
.participant-actions .button { padding: 4px 10px; font-size: 13px; }

/* --- Siatka Płatności (Kafelki) --- */
.payment-months-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.payment-month {
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.payment-month.status-paid { background-color: #198754; }
.payment-month.status-pending { background-color: #dc3545; }
.payment-month.status-future { background-color: #6c757d; opacity: 0.8; }

/* === SUB-MODALE (do akcji w modalu grup) === */
.sub-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 240, 241, 0.85);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-modal-content {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 500px;
}
.sub-modal-content h3 { margin-top: 0; }
.sub-modal-content .form-group { margin-bottom: 15px; }
.sub-modal-content label { display: block; font-weight: 500; margin-bottom: 5px; }
.sub-modal-content input, .sub-modal-content select, .sub-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #8c8f94;
}
.sub-modal-content textarea { min-height: 120px; }
.sub-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
/* Plik: css/dashboard-style.css (dodaj na końcu) */

/* === NOWE STYLE: MODAL ZARZĄDZANIA GRUPĄ (HI-FIDELITY) === */

/* --- Nagłówek Modala --- */
.mc-vue-modal .modal-header h2 { margin: 0 0 5px 0; font-size: 1.8em; }
.mc-vue-modal .modal-header p { margin: 0; color: #50575e; }
.group-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-top: 15px;
    font-size: 14px;
    color: #3c434a;
    align-items: center;
}
.group-meta-info span { display: inline-flex; align-items: center; gap: 6px; }
.group-meta-info a { color: #2271b1; text-decoration: none; }
.group-meta-info a:hover { text-decoration: underline; }

/* --- Pasek Akcji Masowych --- */
.modal-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 25px;
    background: #f6f7f7;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.mass-actions-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mass-actions-buttons .button .dashicons { font-size: 18px; height: 18px; width: 18px; }

/* --- Ciało Modala (Filtry i Tabela) --- */
.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}
.participant-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.participant-filters .button.active { background-color: #dcdcde; font-weight: 600; border-color: #c1c1c1; }

.clients-table .col-checkbox { width: 40px; }
.clients-table .col-actions { width: 220px; text-align: right; }

.participant-actions { display: flex; justify-content: flex-end; gap: 8px; }
.participant-actions .button { padding: 4px 10px; font-size: 13px; }

/* --- Siatka Płatności (Kafelki) --- */
.payment-months-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.payment-month {
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.payment-month.status-paid { background-color: #198754; }
.payment-month.status-pending { background-color: #dc3545; }
.payment-month.status-future { background-color: #6c757d; opacity: 0.8; }

/* === SUB-MODALE (do akcji w modalu grup) === */
.sub-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 240, 241, 0.85);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-modal-content {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 500px;
}
.sub-modal-content h3 { margin-top: 0; }
.sub-modal-content .form-group { margin-bottom: 15px; }
.sub-modal-content label { display: block; font-weight: 500; margin-bottom: 5px; }
.sub-modal-content input, .sub-modal-content select, .sub-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #8c8f94;
}
.sub-modal-content textarea { min-height: 120px; }
.sub-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Plik: css/dashboard-style.css (dodaj na końcu) */

/* === NOWE STYLE: MODAL ZARZĄDZANIA GRUPĄ (HI-FIDELITY) === */

/* --- Nagłówek Modala --- */
.mc-vue-modal .modal-header h2 { margin: 0 0 5px 0; font-size: 1.8em; }
.mc-vue-modal .modal-header p { margin: 0; color: #50575e; }
.group-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-top: 15px;
    font-size: 14px;
    color: #3c434a;
    align-items: center;
}
.group-meta-info span { display: inline-flex; align-items: center; gap: 6px; }
.group-meta-info a { color: #2271b1; text-decoration: none; }
.group-meta-info a:hover { text-decoration: underline; }

/* --- Pasek Akcji Masowych --- */
.modal-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 25px;
    background: #f6f7f7;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.mass-actions-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mass-actions-buttons .button .dashicons { font-size: 18px; height: 18px; width: 18px; }

/* --- Ciało Modala (Filtry i Tabela) --- */
.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}
.participant-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.participant-filters .button.active { background-color: #dcdcde; font-weight: 600; border-color: #c1c1c1; }

.clients-table .col-checkbox { width: 40px; }
.clients-table .col-actions { width: 220px; text-align: right; }

.participant-actions { display: flex; justify-content: flex-end; gap: 8px; }
.participant-actions .button { padding: 4px 10px; font-size: 13px; }

/* --- Siatka Płatności (Kafelki) --- */
.payment-months-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.payment-month {
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.payment-month.status-paid { background-color: #198754; }
.payment-month.status-pending { background-color: #dc3545; }
.payment-month.status-future { background-color: #6c757d; opacity: 0.8; }

/* === SUB-MODALE (do akcji w modalu grup) === */
.sub-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 240, 241, 0.85);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-modal-content {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 500px;
}
.sub-modal-content h3 { margin-top: 0; }
.sub-modal-content .form-group { margin-bottom: 15px; }
.sub-modal-content label { display: block; font-weight: 500; margin-bottom: 5px; }
.sub-modal-content input, .sub-modal-content select, .sub-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #8c8f94;
}
.sub-modal-content textarea { min-height: 120px; }
.sub-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* KOD DO DODANIA (na końcu pliku dashboard-style.css) */

.payment-month.status-skipped { background-color: #adb5bd; text-decoration: line-through; opacity: 0.7; cursor: pointer; }
.payment-month.status-skipped:hover { opacity: 1; }
.mc-btn-muted { background: #e9ecef; color: #495057; border: 1px solid #ced4da; }
.mc-btn-muted:hover { background: #dee2e6; }
.payment-month.is-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.payment-month.is-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.clients-table tbody tr.is-suspended {
    opacity: 0.6;
    background-color: #f1f1f1;
    text-decoration: line-through;
}
.clients-table tbody tr.is-suspended a {
    color: #555;
}

/* KOD DO DODANIA (na końcu pliku dashboard-style.css) */
.client-group-log {
    padding: 0 25px 15px;
    border-bottom: 1px solid #e0e0e0;
}
.client-group-log h4 {
    margin: 0 0 10px;
}
.client-group-log ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
}
.client-group-log li {
    padding: 5px;
    border-bottom: 1px solid #f0f0f0;
}
.client-group-log li:last-child {
    border-bottom: none;
}

/* KOD DO DODANIA (na końcu pliku dashboard-style.css) */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 25px;
    flex-shrink: 0;
}
.modal-tabs button {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #555;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.modal-tabs button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}
.group-participation-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}
.group-participation-card h4 { margin-top: 0; }
.activity-log { list-style: disc; padding-left: 20px; font-size: 13px; max-height: 150px; overflow-y: auto; }
.event-price {
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* Zapobiega łamaniu linii */
    flex-shrink: 0; /* Zapobiega kurczeniu się ceny */
}

/* === RESPONSYWNOŚĆ MOBILNA === */
@media (max-width: 768px) {
    /* Nawigacja główna */
    .mc-vue-main-nav { padding: 8px 10px 0 10px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .mc-vue-main-nav button { padding: 8px 14px; font-size: 0.95em; }

    /* Nagłówek kalendarza - stack vertically */
    .mc-vue-header { flex-wrap: wrap; padding: 0.75rem; gap: 0.5rem; }
    .header-group { width: 100%; justify-content: center; }
    .header-group.date-display-group { order: -1; min-width: unset; }
    .date-display { font-size: 1.1em; }
    .header-group.actions-group { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .nav-btn, .add-btn, .view-switcher button, .mc-vue-header select { height: 36px; padding: 0.4rem 0.7rem; font-size: 0.85em; }
    .add-btn { width: 100%; }

    /* Siatka kalendarza */
    .header-corner { width: 40px; }
    .mc-vue-time-axis { width: 40px; }
    .time-label { font-size: 0.75em; padding-right: 4px; }
    .day-header { padding: 6px 2px; font-size: 0.85em; }
    .day-name { font-size: 0.7em; }
    .day-num { font-size: 1.2em; }

    /* Wydarzenia na kalendarzu */
    .mc-vue-event { padding: 3px 5px; font-size: 11px; border-radius: 4px; }
    .mc-vue-event:hover { width: calc(100% - 4px) !important; left: 2px !important; }
    .event-service, .event-specialist { display: none; }
    .event-time-patient { flex-direction: column; gap: 1px; }
    .event-patient { text-align: left; margin-left: 0; font-size: 10px; }
    .event-icons { bottom: 2px; right: 4px; }
    .icon-google, .icon-payment { width: 14px; height: 14px; font-size: 10px; line-height: 14px; }
    .event-price { display: none; }

    /* Tooltip ukryty na mobile (dotyk nie obsługuje hover) */
    .booking-tooltip { display: none !important; }

    /* Booking modal pełna szerokość na mobile */
    .mc-vue-sidebar { width: 96vw; max-width: 96vw; max-height: 94vh; border-radius: 10px; }
    .sidebar-content { padding: 18px 16px; }
    .sidebar-title { font-size: 1.1em; }
    .mc-vue-sidebar .form-row-2col { grid-template-columns: 1fr; gap: 0; }
    .mc-vue-sidebar .form-row-2col .form-group { margin-bottom: 16px; }
    .datetime-picker { flex-direction: column; gap: 6px; }

    /* Klienci - tabela */
    .mc-vue-clients-view { padding: 10px; }
    .clients-table th, .clients-table td { padding: 8px 6px; font-size: 0.85em; }

    /* Modal pełny ekran na mobile */
    .mc-vue-modal { width: 100%; height: 100vh; max-width: 100%; border-radius: 0; }
    .client-history-header { padding: 15px; }
    .client-history-header h2 { font-size: 1.3em; }
    .client-details-grid { grid-template-columns: 1fr; }
    .client-history-body { padding: 0 15px 15px; }
    .modal-tabs { padding: 0 10px; overflow-x: auto; white-space: nowrap; }
    .modal-tabs button { padding: 10px 12px; font-size: 0.9em; flex-shrink: 0; }

    /* Grupy modal */
    .modal-actions-bar { padding: 10px; }
    .mass-actions-buttons { gap: 6px; }
    .mass-actions-buttons .button { font-size: 12px; padding: 4px 8px; }
    .modal-body { padding: 15px; }
    .participant-filters { flex-wrap: wrap; }
    .col-actions { width: auto !important; }
    .participant-actions { flex-wrap: wrap; }
    .participant-actions .button { font-size: 11px; padding: 3px 6px; }

    /* Recurring section */
    .recurring-options { grid-template-columns: 1fr; }

    /* Statystyki */
    .analytics-filters { flex-wrap: wrap; gap: 8px; }
    .analytics-filters label { width: 100%; }
    .analytics-quick-ranges { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 480px) {
    /* Ultra-mały ekran - ukryj zbędne kolumny */
    .clients-table th:nth-child(3), .clients-table td:nth-child(3),
    .clients-table th:nth-child(4), .clients-table td:nth-child(4) { display: none; }

    .view-switcher { width: 100%; }
    .view-switcher button { flex: 1; }

    .mc-vue-header select { width: 100%; }
}

/* === Blok niedostępności (urlop) === */
.exception-slot {
    position: absolute;
    left: 0;
    right: 0;
    background-color: rgba(108, 117, 125, 0.15); /* Półprzezroczyste szare tło */
    /* Wzór w paski, aby sugerować "wyłączenie" */
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.05) 10px,
        rgba(0, 0, 0, 0.05) 20px
    );
    pointer-events: none; /* Pozwala klikać "przez" ten element */
}

/* === Polskie święto ustawowo wolne === */
.holiday-slot {
    position: absolute;
    left: 0;
    right: 0;
    background-color: rgba(120, 113, 108, 0.10);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 14px,
        rgba(0, 0, 0, 0.06) 14px,
        rgba(0, 0, 0, 0.06) 28px
    );
    border-top: 1px dashed rgba(120, 113, 108, 0.35);
    border-bottom: 1px dashed rgba(120, 113, 108, 0.35);
    pointer-events: none;
    overflow: hidden;
    color: #57534e;
    cursor: help;
}
.holiday-slot-label {
    position: sticky;
    top: 8px;
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #57534e;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    margin: 8px auto;
    width: fit-content;
    max-width: calc(100% - 16px);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════════
   ZAKŁADKA: GRUPY TERAPEUTYCZNE
   ═══════════════════════════════════════════════════════════════════════ */
.mc-vue-grupy-view { padding: 16px 0; }
.grupy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.grupy-header h2 { margin: 0; font-size: 20px; }
.grupy-loading, .grupy-empty { text-align: center; padding: 40px; color: #6b7280; }
.grupy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 16px; padding: 4px; }
.grupy-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.grupy-card-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #f8f9fa; border-bottom: 1px solid #e5e7eb; }
.grupy-card-header h3 { margin: 0; font-size: 16px; color: #1a1a2e; }
.grupy-payment-type { font-size: 11px; background: #e0e7ff; color: #3730a3; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.grupy-card-meta { padding: 10px 18px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #6b7280; border-bottom: 1px solid #f3f4f6; }
.grupy-card-meta strong { color: #111; }
.grupy-editions { padding: 8px; }
.grupy-edition { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: background 0.15s; gap: 12px; }
.grupy-edition:hover { background: #f0f4ff; }
.edition-info { display: flex; flex-direction: column; gap: 2px; }
.edition-info strong { font-size: 14px; color: #111; }
.edition-schedule, .edition-dates { font-size: 12px; color: #6b7280; }
.edition-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 120px; }
.edition-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.edition-status.status-zapisy-otwarte { background: #d1fae5; color: #065f46; }
.edition-status.status-w-trakcie { background: #dbeafe; color: #1e40af; }
.edition-status.status-planowana { background: #fef3c7; color: #92400e; }
.edition-status.status-zapisy-zamknięte { background: #fee2e2; color: #991b1b; }
.edition-status.status-zakończona { background: #f3f4f6; color: #6b7280; }
.edition-participants { font-size: 12px; color: #374151; }
.edition-payments { font-size: 11px; color: #dc2626; font-weight: 600; }
.edition-payments.all-paid { color: #059669; }

/* Formularz grupy */
.grupy-form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.grupy-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid #e5e7eb; padding-bottom: 12px; }
.grupy-form-header h3 { margin: 0; font-size: 18px; }
.grupy-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grupy-form .form-group { margin-bottom: 8px; }
.grupy-form .form-group label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.grupy-form .form-group input, .grupy-form .form-group select { width: 100%; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; }
.grupy-templates-section { margin-top: 16px; border-top: 1px solid #e5e7eb; padding-top: 12px; }
.grupy-templates-section h4 { margin: 0 0 4px; font-size: 15px; }
.grupy-templates-section code { background: #f3f4f6; padding: 1px 4px; border-radius: 3px; font-size: 11px; }
.grupy-editions-section { margin-top: 16px; border-top: 1px solid #e5e7eb; padding-top: 12px; }
.editions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.editions-header h4 { margin: 0; font-size: 15px; }
.edition-form-row { position: relative; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px 36px 12px 12px; margin-bottom: 8px; }
.edition-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.remove-edition-btn { position: absolute; top: 8px; right: 8px; background: none; border: none; color: #dc3545; font-size: 20px; cursor: pointer; line-height: 1; }
.grupy-form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.button-small { padding: 4px 10px; font-size: 12px; border: 1px solid #d1d5db; background: #fff; border-radius: 4px; cursor: pointer; }
.button-small:hover { background: #f3f4f6; }

/* Przyciski modala grup — czytelne style */
.mc-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; font-size: 13px; font-weight: 500; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.mc-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.mc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mc-btn-sm { padding: 4px 10px; font-size: 12px; }
.mc-btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.mc-btn-primary:hover { background: #0b5ed7; }
.mc-btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.mc-btn-danger:hover { background: #bb2d3b; }
.mc-btn-outline { background: transparent; border: 1px solid #6b7280; color: #374151; }
.mc-btn-outline:hover { background: #f9fafb; }
/* Modal grupy — layout */
.mc-group-modal { max-width: 1100px !important; }
.mc-group-modal > .modal-close { display: none; } /* Ukryj domyślny krzyżyk — używamy własnego w nagłówku */
.gm-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px 12px; border-bottom: 1px solid #e5e7eb; }
.gm-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gm-close-btn { background: none; border: none; font-size: 28px; line-height: 1; color: #9ca3af; cursor: pointer; padding: 0 4px; }
.gm-close-btn:hover { color: #111; }
.gm-header-left { flex: 1; }
.gm-title { margin: 0; font-size: 20px; color: #111; }
.gm-subtitle { font-size: 14px; color: #6b7280; margin-top: 2px; }
.gm-info-bar { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 24px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; font-size: 13px; color: #374151; }
.gm-info-item strong { color: #111; }
.gm-link { color: #0d6efd; text-decoration: none; }
.gm-link:hover { text-decoration: underline; }

/* Toolbar */
.gm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid #e5e7eb; }
.gm-toolbar-sep { width: 1px; height: 24px; background: #e5e7eb; }
.gm-selection-info { font-size: 12px; color: #6b7280; font-weight: 500; }

/* Body + tabela */
.gm-body {
    padding: 16px 24px 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.gm-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.gm-table-wrap { overflow-x: auto; overflow-y: visible; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gm-table th { text-align: left; padding: 8px 10px; background: #f8f9fa; border-bottom: 2px solid #e5e7eb; font-weight: 600; font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.3px; }
.gm-table td { padding: 10px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.gm-table tbody tr:hover { background: #f9fafb; }
.gm-col-check { width: 36px; text-align: center; }
.gm-participant-name { color: #0d6efd; text-decoration: none; font-weight: 600; }
.gm-participant-name:hover { text-decoration: underline; }
.gm-invoice-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; padding: 0 6px; border-radius: 6px; background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: 0; }
.gm-badge-suspended { display: inline-block; font-size: 10px; background: #fef2f2; color: #dc2626; padding: 1px 6px; border-radius: 8px; margin-left: 6px; font-weight: 500; }
.gm-row-suspended { opacity: 0.6; }
.gm-contact-cell { display: flex; flex-direction: column; }
.gm-contact-cell small { color: #9ca3af; }
.gm-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.gm-empty { text-align: center; padding: 24px !important; color: #9ca3af; }

/* Załączniki w tabeli uczestników */
.gm-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-attach-toggle { background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; position: relative; }
.gm-attach-toggle:hover { background: #f3f4f6; }

/* === Zakładka Płatności === */
.mc-payments-view { padding: 20px; max-width: 1200px; margin: 0 auto; }
.mc-payments-header h2 { margin: 0 0 6px; color: #111; }
.mc-payments-desc { color: #6b7280; margin: 0 0 20px; font-size: 14px; }
.mc-payments-form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.mc-payments-form-card h3 { margin: 0 0 16px; font-size: 16px; color: #111; }
.mc-payments-form-card .form-group { margin-bottom: 12px; }
.mc-payments-form-card input[type="text"], .mc-payments-form-card input[type="email"], .mc-payments-form-card input[type="tel"], .mc-payments-form-card input[type="number"], .mc-payments-form-card textarea { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.mc-payments-form-card input:focus, .mc-payments-form-card textarea:focus { outline: none; border-color: #0d6efd; }
.mc-payments-form-card .form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mc-recipient-mode { display: flex; gap: 16px; margin-top: 4px; }
.mc-recipient-mode label { font-weight: normal; cursor: pointer; }
.mc-payments-generated { margin-top: 16px; padding: 14px; background: #ecfccb; border: 1px solid #bef264; border-radius: 8px; }
.mc-payments-generated input[type="text"] { background: #fff; }
.mc-payments-list-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.mc-payments-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.mc-payments-list-header h3 { margin: 0; font-size: 16px; color: #111; }
.mc-payments-filters { display: flex; gap: 4px; }
.mc-payments-filters button { padding: 5px 12px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; }
.mc-payments-filters button.active { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.mc-payment-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 10px; }
.mc-payment-status-mc_pay_pending { background: #fef3c7; color: #92400e; }
.mc-payment-status-mc_pay_paid { background: #d1fae5; color: #065f46; }
.mc-payment-status-mc_pay_cancelled { background: #fee2e2; color: #991b1b; }

/* Panel faktur uczestnika */
.gm-invoice-toggle { background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; position: relative; margin-left: 2px; opacity: 0.55; }
.gm-invoice-toggle:hover { background: #f3f4f6; opacity: 1; }
.gm-invoice-toggle.is-active { opacity: 1; background: #dbeafe; }
.gm-invoices-panel { margin-top: 8px; padding: 10px 12px; background: #f0f9ff; border-radius: 8px; border: 1px solid #bfdbfe; }
.gm-inv-header { padding-bottom: 8px; border-bottom: 1px solid #bfdbfe; margin-bottom: 8px; }
.gm-inv-data { margin-bottom: 10px; }
.gm-inv-row { display: flex; gap: 6px; margin-bottom: 6px; }
.gm-inv-row input { flex: 1; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12px; min-width: 0; }
.gm-inv-row input:focus { outline: none; border-color: #3b82f6; }
.gm-inv-months { margin-top: 10px; }
.gm-inv-month-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #e0e7ff; font-size: 12px; }
.gm-inv-month-row:last-of-type { border-bottom: none; }
.gm-attach-count { position: absolute; top: -4px; right: -6px; background: #0d6efd; color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.gm-attachments { margin-top: 8px; padding: 8px 10px; background: #f9fafb; border-radius: 6px; border: 1px solid #e5e7eb; }
.gm-att-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; border-bottom: 1px solid #f3f4f6; }
.gm-att-item:last-of-type { border-bottom: none; }
.gm-att-name { color: #0d6efd; text-decoration: none; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-att-name:hover { text-decoration: underline; }
.gm-att-item small { color: #9ca3af; white-space: nowrap; }
.gm-att-delete { background: none; border: none; color: #dc3545; cursor: pointer; font-size: 16px; padding: 0 4px; line-height: 1; }
.gm-att-delete:hover { color: #b02a37; }
.gm-att-empty { font-size: 12px; color: #9ca3af; padding: 4px 0; }
.gm-att-upload-btn { margin-top: 6px; cursor: pointer; }

/* Sub-modale */
.sub-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 10001; display: flex; align-items: center; justify-content: center; }
.sub-modal-content { background: #fff; border-radius: 10px; padding: 24px; max-width: 440px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.sub-modal-content.is-wide { max-width: 760px; max-height: 86vh; overflow-y: auto; }
.sub-modal-content h3 { margin: 0 0 12px; font-size: 17px; }
.sub-modal-content .form-group { margin-bottom: 12px; }
.sub-modal-content .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #374151; }
.sub-modal-content .form-group input,
.sub-modal-content .form-group select,
.sub-modal-content .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.sub-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }

.payment-month { min-width: 64px; min-height: 38px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid transparent; box-sizing: border-box; line-height: 1.1; text-align: center; }
.payment-month .payment-month-doc { display: block; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; line-height: 1; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.payment-month.needs-invoice,
.payment-month.needs-email,
.payment-month.needs-receipt { border-color: #f59e0b; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.payment-month.needs-invoice .payment-month-doc,
.payment-month.needs-email .payment-month-doc,
.payment-month.needs-receipt .payment-month-doc { color: #fff7ed; }
.payment-month.documents-ok .payment-month-doc { color: #dcfce7; }

.gm-month-modal { display: flex; flex-direction: column; gap: 12px; }
.gm-month-modal h3 { margin-bottom: 0; }
.gm-month-subtitle { margin: 0; color: #64748b; font-size: 13px; }
.gm-month-section { padding: 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.gm-month-section.is-warning { background: #fff7ed; border-color: #fdba74; }
.gm-month-section h4 { margin: 0 0 10px; color: #111827; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.gm-month-kv { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; color: #475569; font-size: 13px; border-bottom: 1px dashed #e5e7eb; }
.gm-month-kv:last-of-type { border-bottom: none; }
.gm-month-kv strong { color: #111827; text-align: right; }
.gm-month-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gm-month-note { margin: 8px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.gm-month-note.is-ok { color: #047857; font-weight: 600; }
.gm-month-note.is-error { color: #b91c1c; font-weight: 600; }
.gm-month-check { display: flex !important; align-items: center; gap: 8px; margin: 10px 0 0 !important; color: #111827; font-size: 13px; font-weight: 600 !important; cursor: pointer; }
.gm-month-check input { width: auto !important; flex: 0 0 auto; margin: 0; }
.gm-month-check:has(input:disabled) { color: #94a3b8; cursor: default; }

@media (max-width: 768px) {
    .gm-header { flex-direction: column; gap: 8px; padding: 16px; }
    .gm-info-bar { padding: 8px 16px; }
    .gm-toolbar { padding: 8px 16px; }
    .gm-body { padding: 12px 16px; }
    .gm-table { font-size: 12px; }
}

@media (max-width: 768px) {
    .grupy-grid { grid-template-columns: 1fr; }
    .grupy-edition { flex-direction: column; align-items: flex-start; }
    .edition-stats { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .grupy-form-grid, .edition-form-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   LISTA KLIENTÓW
   ═══════════════════════════════════════════════════════════════════════ */
.cl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.cl-header h2 { margin: 0; font-size: 20px; }
.cl-search-wrap { flex: 1; max-width: 400px; }
.cl-search { width: 100%; padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; transition: border-color 0.15s; }
.cl-search:focus { outline: none; border-color: #0d6efd; box-shadow: 0 0 0 3px rgba(13,110,253,0.1); }
.cl-table-wrap { overflow-x: auto; }
.cl-row { cursor: pointer; transition: background 0.1s; }
.cl-row:hover { background: #f0f4ff !important; }
.cl-name { color: #0d6efd; }

/* ═══════════════════════════════════════════════════════════════════════
   MODAL KARTY KLIENTA
   ═══════════════════════════════════════════════════════════════════════ */
.mc-client-modal { max-width: 800px !important; }
.mc-client-modal > .modal-close { display: none; }
.cm-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px 14px; border-bottom: 1px solid #e5e7eb; }
.cm-header-left { flex: 1; }
.cm-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cm-name { margin: 0; font-size: 20px; font-weight: 700; color: #111; }
.cm-contact { display: flex; gap: 16px; margin-top: 4px; font-size: 13px; color: #6b7280; }

/* Badge obok nazwy klienta */
.cm-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle; }
.cm-badge-minor { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.cm-badge-parent { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Consent badges pod kontaktem */
.cm-consents { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.cm-consent-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 12px; }
.cm-consent-badge.is-granted { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.cm-consent-badge.is-denied { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Pasek z datą urodzenia */
.cm-birth-bar { background: #fef3c7; border-bottom: 1px solid #fcd34d; padding: 10px 24px; font-size: 13px; display: flex; gap: 24px; flex-wrap: wrap; color: #78350f; }
.cm-birth-item { display: flex; gap: 6px; align-items: center; }
.cm-age-badge { background: #fcd34d; color: #78350f; padding: 2px 10px; border-radius: 12px; font-weight: 700; font-size: 12px; }
.cm-age-badge.is-adult { background: #d1fae5; color: #065f46; }
.cm-countdown-badge { background: #fff; color: #78350f; padding: 2px 10px; border-radius: 12px; font-weight: 600; font-size: 11px; border: 1px solid #fcd34d; }
.cm-countdown-badge.is-warning { background: #fee2e2; color: #991b1b; border-color: #fca5a5; animation: mc-pulse-warning 2s ease-in-out infinite; }
@keyframes mc-pulse-warning { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Pasek rodziny (pomiędzy header a tabs) */
.cm-family-bar { background: #f8fafc; border-bottom: 1px solid #e5e7eb; padding: 10px 24px; font-size: 13px; display: flex; gap: 24px; flex-wrap: wrap; }
.cm-family-item { display: flex; gap: 6px; align-items: center; }
.cm-family-item strong { color: #374151; }
.cm-family-item a { color: #0d6efd; text-decoration: none; font-weight: 500; }
.cm-family-item a:hover { text-decoration: underline; }

/* Pasek preferencji faktury */
.cm-invoice-bar { background: #f0f9ff; border-bottom: 1px solid #bfdbfe; padding: 10px 24px; font-size: 13px; }
.cm-invoice-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cm-invoice-header strong { color: #1e40af; }
.cm-invoice-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.cm-invoice-type-badge.is-personal { background: #ede9fe; color: #5b21b6; }
.cm-invoice-type-badge.is-company { background: #fef3c7; color: #92400e; }
.cm-invoice-details { color: #475569; line-height: 1.5; font-size: 12px; }

.cm-edit-bar { padding: 12px 24px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.cm-edit-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.cm-edit-input { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; flex: 1; min-width: 140px; }
.cm-edit-input:focus { outline: none; border-color: #0d6efd; }
.cm-edit-actions { display: flex; gap: 6px; }

.cm-tabs { display: flex; border-bottom: 2px solid #e5e7eb; padding: 0 24px; }
.cm-tab { padding: 10px 16px; font-size: 13px; font-weight: 600; color: #6b7280; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: all 0.15s; }
.cm-tab:hover { color: #374151; }
.cm-tab.active { color: #0d6efd; border-bottom-color: #0d6efd; }

.cm-body { padding: 16px 24px 24px; overflow-y: auto; max-height: 50vh; }
.cm-body .gm-table tbody tr { cursor: pointer; }

.cm-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.cm-status-umówiona { background: #fef3c7; color: #92400e; }
.cm-status-potwierdzona { background: #d1fae5; color: #065f46; }
.cm-status-zakończona { background: #dbeafe; color: #1e40af; }
.cm-status-odwołana { background: #fee2e2; color: #991b1b; }
.cm-status-zwrócona { background: #fef3c7; color: #92400e; }

.cm-group-card { padding: 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; }
.cm-group-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-group-edition { font-size: 13px; color: #6b7280; }
.cm-group-status { font-size: 11px; padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.cm-group-status.active { background: #d1fae5; color: #065f46; }
.cm-group-status.suspended { background: #fee2e2; color: #991b1b; }

/* Log aktywności */
.cm-log { display: flex; flex-direction: column; gap: 0; }
.cm-log-entry { display: grid; grid-template-columns: 120px 1fr 90px; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; align-items: baseline; }
.cm-log-entry:last-child { border-bottom: none; }
.cm-log-date { color: #9ca3af; font-size: 12px; white-space: nowrap; }
.cm-log-content { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.cm-log-action { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.cm-log-booking { background: #dbeafe; color: #1e40af; }
.cm-log-payment { background: #d1fae5; color: #065f46; }
.cm-log-status { background: #fef3c7; color: #92400e; }
.cm-log-group { background: #e0e7ff; color: #3730a3; }
.cm-log-confirmation, .cm-log-cancellation, .cm-log-reminder { background: #fce7f3; color: #9d174d; }
.cm-log-sms { background: #ede9fe; color: #5b21b6; }
.cm-log-invoice { background: #fef9c3; color: #854d0e; }
.cm-log-data { background: #f3f4f6; color: #6b7280; }
.cm-log-action.is-failed { background: #fee2e2 !important; color: #b91c1c !important; }
.cm-log-entry.is-failed .cm-log-details { color: #b91c1c; }
.cm-log-details { color: #374151; }
.cm-log-visit { appearance: none; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 4px; padding: 1px 6px; font: inherit; font-size: 12px; cursor: pointer; line-height: 1.4; text-align: left; }
.cm-log-visit:hover { background: #dbeafe; border-color: #93c5fd; }
.cm-log-user { color: #9ca3af; font-size: 12px; text-align: right; }

@media (max-width: 640px) {
    .cm-log-entry { grid-template-columns: 1fr; gap: 2px; }
    .cm-log-user { text-align: left; }
}

.cm-notes-textarea { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; resize: vertical; font-family: inherit; }
.cm-notes-textarea:focus { outline: none; border-color: #0d6efd; }
.cm-notes-status { text-align: right; font-size: 12px; color: #9ca3af; margin-top: 4px; }

@media (max-width: 768px) {
    .cl-header { flex-direction: column; align-items: stretch; }
    .cl-search-wrap { max-width: none; }
    .cm-header { flex-direction: column; gap: 8px; padding: 16px; }
    .cm-edit-form { flex-direction: column; }
    .cm-edit-input { min-width: unset; }
    .cm-tabs { padding: 0 16px; overflow-x: auto; }
    .cm-body { padding: 12px 16px; }
}
/* ================================
   B2B Packages tab (Vue dashboard)
   ================================ */
.mc-b2b-tab {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.mc-b2b-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mc-b2b-kpi-card {
    background: #fff;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid #e0e4eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mc-b2b-kpi-card.is-warning {
    border-color: #f4b73b;
    background: #fffbea;
}

.mc-b2b-kpi-label {
    font-size: 12px;
    color: #6a6d7a;
    margin-bottom: 6px;
    font-weight: 600;
}

.mc-b2b-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1d25;
    line-height: 1.1;
}

.mc-b2b-kpi-sub {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.mc-b2b-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.mc-b2b-tier-box {
    background: #f5f7fb;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
}

.mc-b2b-tier-name {
    font-size: 13px;
    color: #6a6d7a;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-b2b-tier-value {
    font-size: 34px;
    font-weight: 700;
    color: #46b450;
    line-height: 1;
}

.mc-b2b-tier-value.is-mid { color: #f4b73b; }
.mc-b2b-tier-value.is-low { color: #d63638; }

.mc-b2b-tier-sub {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.mc-b2b-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.mc-b2b-link-btn {
    display: block;
    background: #fff;
    padding: 16px;
    border: 1px solid #e0e4eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.mc-b2b-link-btn:hover {
    border-color: #4a6cf7;
    box-shadow: 0 2px 10px rgba(74, 108, 247, 0.12);
    transform: translateY(-1px);
}

.mc-b2b-refresh-btn {
    background: #eef2ff;
    border-color: #4a6cf7;
    width: 100%;
}

.mc-b2b-link-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.mc-b2b-link-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1d25;
    margin-bottom: 3px;
}

.mc-b2b-link-desc {
    font-size: 11px;
    color: #6a6d7a;
}

/* ==========================================================================
   MindConcept Panel — Apothecary Visual Refresh
   Inspired by "MindConcept - Panel Views _standalone_.html".
   Pure presentation layer: keeps existing Vue state, AJAX and interactions.
   ========================================================================== */

#mc-vue-calendar-app {
    --mc-ap-cream: #faf6ee;
    --mc-ap-cream-deep: #f3ecde;
    --mc-ap-surface: #fffdf8;
    --mc-ap-surface-alt: #fcfaf4;
    --mc-ap-sand: #d4c9a8;
    --mc-ap-sand-soft: #e8dfc5;
    --mc-ap-sand-deep: #b9ac85;
    --mc-ap-green: #2d4a3e;
    --mc-ap-green-dark: #1e3329;
    --mc-ap-green-line: #4a6658;
    --mc-ap-ink: #1f2420;
    --mc-ap-muted: #6e6458;
    --mc-ap-muted-soft: #9c9283;
    --mc-ap-line: #eae3d3;
    --mc-ap-line-soft: #f0ead9;
    --mc-ap-paid-bg: #e8efe9;
    --mc-ap-paid-fg: #2d4a3e;
    --mc-ap-unpaid-bg: #f8ecd4;
    --mc-ap-unpaid-fg: #8b5e2e;
    --mc-ap-warn-bg: #fff7df;
    --mc-ap-danger-bg: #f8e8e4;
    --mc-ap-danger-fg: #8f382e;
    --mc-ap-radius: 16px;
    --mc-ap-radius-sm: 10px;
    --mc-ap-serif: Georgia, "Times New Roman", serif;
    --mc-ap-sans: "Outfit", "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 18px;
    background: var(--mc-ap-cream);
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .mc-vue-dashboard,
#mc-vue-calendar-app .mc-vue-dashboard * {
    box-sizing: border-box;
}

#mc-vue-calendar-app .mc-vue-dashboard {
    min-height: min(860px, calc(100vh - 36px));
    border: 1px solid var(--mc-ap-line);
    border-radius: 24px;
    background: var(--mc-ap-cream);
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-sans) !important;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(45, 74, 62, .10);
}

#mc-vue-calendar-app .mc-vue-main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 58px;
    padding: 10px 18px;
    background: var(--mc-ap-cream);
    border-bottom: 1px solid var(--mc-ap-line);
}

#mc-vue-calendar-app .mc-vue-main-nav::before {
    content: "M  MindConcept";
    display: inline-flex;
    align-items: center;
    min-width: 154px;
    margin-right: 14px;
    color: var(--mc-ap-green);
    font-family: var(--mc-ap-serif);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -.02em;
    white-space: nowrap;
}

#mc-vue-calendar-app .mc-vue-main-nav button {
    height: 34px;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--mc-ap-muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#mc-vue-calendar-app .mc-vue-main-nav button:hover {
    background: rgba(255, 253, 248, .72);
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .mc-vue-main-nav button.active {
    background: var(--mc-ap-surface);
    border-color: var(--mc-ap-line);
    color: var(--mc-ap-green);
    box-shadow: 0 1px 2px rgba(45, 74, 62, .06);
}

#mc-vue-calendar-app .mc-vue-calendar-view,
#mc-vue-calendar-app .mc-vue-clients-view,
#mc-vue-calendar-app .mc-vue-grupy-view,
#mc-vue-calendar-app .mc-payments-view,
#mc-vue-calendar-app .mc-analytics-view,
#mc-vue-calendar-app .mc-b2b-tab {
    background: var(--mc-ap-cream);
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .mc-vue-header {
    gap: 12px;
    padding: 14px 18px;
    background: var(--mc-ap-cream);
    border-bottom: 1px solid var(--mc-ap-line);
}

#mc-vue-calendar-app .header-group {
    gap: 6px;
}

#mc-vue-calendar-app .date-display {
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-serif);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 400;
    letter-spacing: -.02em;
}

#mc-vue-calendar-app .date-display::first-letter {
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .nav-btn,
#mc-vue-calendar-app .add-btn,
#mc-vue-calendar-app .mc-vue-header select,
#mc-vue-calendar-app .mc-btn,
#mc-vue-calendar-app .button-primary,
#mc-vue-calendar-app .button-secondary,
#mc-vue-calendar-app .button-danger,
#mc-vue-calendar-app .button-small,
#mc-vue-calendar-app .mc-b2b-link-btn,
#mc-vue-calendar-app .mc-b2b-refresh-btn {
    min-height: 36px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#mc-vue-calendar-app .nav-btn,
#mc-vue-calendar-app .mc-vue-header select,
#mc-vue-calendar-app .button-secondary,
#mc-vue-calendar-app .button-small,
#mc-vue-calendar-app .mc-btn-outline,
#mc-vue-calendar-app .mc-btn-muted,
#mc-vue-calendar-app .mc-b2b-link-btn {
    border: 1px solid var(--mc-ap-line);
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .nav-btn:hover,
#mc-vue-calendar-app .mc-vue-header select:hover,
#mc-vue-calendar-app .button-secondary:hover,
#mc-vue-calendar-app .button-small:hover,
#mc-vue-calendar-app .mc-btn-outline:hover,
#mc-vue-calendar-app .mc-btn-muted:hover,
#mc-vue-calendar-app .mc-b2b-link-btn:hover {
    border-color: var(--mc-ap-sand);
    background: #fff;
    box-shadow: 0 5px 16px rgba(45, 74, 62, .08);
    transform: translateY(-1px);
}

#mc-vue-calendar-app .add-btn,
#mc-vue-calendar-app .button-primary,
#mc-vue-calendar-app .mc-btn-primary,
#mc-vue-calendar-app .mc-b2b-refresh-btn {
    border: 1px solid var(--mc-ap-green);
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream) !important;
    font-family: var(--mc-ap-serif);
    font-weight: 500;
}

#mc-vue-calendar-app .add-btn:hover,
#mc-vue-calendar-app .button-primary:hover,
#mc-vue-calendar-app .mc-btn-primary:hover,
#mc-vue-calendar-app .mc-b2b-refresh-btn:hover {
    border-color: var(--mc-ap-green-dark);
    background: var(--mc-ap-green-dark);
    box-shadow: 0 10px 24px rgba(45, 74, 62, .18);
    transform: translateY(-1px);
}

#mc-vue-calendar-app .button-danger,
#mc-vue-calendar-app .mc-btn-danger {
    border: 1px solid #e6c5bb;
    background: var(--mc-ap-danger-bg);
    color: var(--mc-ap-danger-fg);
}

#mc-vue-calendar-app .view-switcher {
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 12px;
    background: var(--mc-ap-cream-deep);
}

#mc-vue-calendar-app .view-switcher button {
    height: 30px;
    padding: 6px 16px;
    border-radius: 10px;
    color: var(--mc-ap-muted);
    font-size: 12px;
}

#mc-vue-calendar-app .view-switcher button.active {
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
    box-shadow: 0 1px 2px rgba(45, 74, 62, .08) !important;
}

#mc-vue-calendar-app .mc-vue-grid-wrapper {
    padding: 14px 18px 18px;
    background: var(--mc-ap-cream);
}

#mc-vue-calendar-app .mc-vue-grid-header {
    gap: 8px;
    margin-bottom: 8px;
}

#mc-vue-calendar-app .header-corner {
    width: 58px;
    border: 0;
}

#mc-vue-calendar-app .day-header {
    margin: 0;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .day-header.is-today {
    border-color: var(--mc-ap-green);
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream);
}

#mc-vue-calendar-app .day-name {
    color: inherit;
    opacity: .58;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}

#mc-vue-calendar-app .day-num {
    margin-top: 2px;
    color: inherit;
    font-family: var(--mc-ap-serif);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.1;
}

#mc-vue-calendar-app .mc-vue-grid-body-container {
    gap: 8px;
}

#mc-vue-calendar-app .mc-vue-time-axis {
    width: 58px;
}

#mc-vue-calendar-app .time-label {
    height: 80px;
    padding-right: 10px;
    color: var(--mc-ap-muted-soft);
    font-family: var(--mc-ap-serif);
    font-size: 12px;
}

#mc-vue-calendar-app .mc-vue-grid {
    gap: 8px;
    border-left: 0;
}

#mc-vue-calendar-app .day-column {
    border: 1px solid var(--mc-ap-line-soft);
    border-radius: 14px;
    background-color: var(--mc-ap-surface-alt);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 53px,
        var(--mc-ap-line) 53px,
        var(--mc-ap-line) 54px
    );
    overflow: hidden;
}

#mc-vue-calendar-app .day-column:last-child {
    border-right: 1px solid var(--mc-ap-line-soft);
}

#mc-vue-calendar-app .day-column.drag-over {
    background-color: rgba(45, 74, 62, .04) !important;
    outline: 2px dashed var(--mc-ap-green);
    outline-offset: -4px;
}

#mc-vue-calendar-app .add-slot-btn {
    top: 7px;
    right: 7px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(250, 246, 238, .35);
    border-radius: 50%;
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream);
    font-family: var(--mc-ap-serif);
    line-height: 22px;
    box-shadow: 0 6px 16px rgba(45, 74, 62, .18);
}

#mc-vue-calendar-app .availability-slot {
    border-radius: 10px;
    background: var(--mc-ap-green) !important;
    opacity: .08;
}

#mc-vue-calendar-app .exception-slot,
#mc-vue-calendar-app .holiday-slot {
    border-radius: 10px;
}

#mc-vue-calendar-app .time-indicator {
    left: 66px;
    height: 2px;
    background: var(--mc-ap-sand-deep);
}

#mc-vue-calendar-app .time-indicator::before {
    background: var(--mc-ap-sand-deep);
}

#mc-vue-calendar-app .mc-vue-event {
    padding: 7px 9px;
    border: 1px solid rgba(45, 74, 62, .08);
    border-left: 4px solid currentColor;
    border-radius: 10px;
    background: var(--mc-ap-paid-bg);
    color: var(--mc-ap-paid-fg);
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

#mc-vue-calendar-app .mc-vue-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(45, 74, 62, .14);
}

#mc-vue-calendar-app .event-time-patient {
    gap: 8px;
    align-items: baseline;
    font-family: var(--mc-ap-serif);
    font-size: 12.5px;
    font-weight: 500;
}

#mc-vue-calendar-app .event-time {
    font-variant-numeric: tabular-nums;
}

#mc-vue-calendar-app .event-service {
    margin-top: 2px;
    color: inherit;
    opacity: .82;
    font-size: 11px;
}

#mc-vue-calendar-app .event-specialist {
    margin-top: auto;
    color: inherit;
    opacity: .68;
    font-size: 10.5px;
}

#mc-vue-calendar-app .event-price {
    font-family: var(--mc-ap-serif);
    font-size: 11.5px;
}

#mc-vue-calendar-app .icon-google,
#mc-vue-calendar-app .icon-payment {
    background: rgba(255, 253, 248, .88);
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .mc-vue-event.status-oczekująca,
#mc-vue-calendar-app .mc-vue-event.status-oczekuje,
#mc-vue-calendar-app .mc-vue-event.status-pending-payment,
#mc-vue-calendar-app .mc-vue-event.status-umówiona {
    background: var(--mc-ap-unpaid-bg) !important;
    color: var(--mc-ap-unpaid-fg);
}

#mc-vue-calendar-app .mc-vue-event.status-odwołana,
#mc-vue-calendar-app .mc-vue-event.status-zwrócona {
    background: #eee7dc !important;
    color: var(--mc-ap-muted);
    opacity: .72;
}

#mc-vue-calendar-app .mc-vue-event.status-zakończona {
    background: var(--mc-ap-paid-bg) !important;
    color: var(--mc-ap-paid-fg);
}

#mc-vue-calendar-app .booking-tooltip,
#mc-vue-calendar-app .mc-vue-sidebar,
#mc-vue-calendar-app .mc-vue-modal {
    border: 1px solid var(--mc-ap-line);
    border-radius: 18px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-ink);
    box-shadow: 0 24px 70px rgba(31, 51, 41, .22);
}

#mc-vue-calendar-app .mc-vue-sidebar-overlay,
#mc-vue-calendar-app .mc-vue-modal-overlay {
    background: rgba(30, 51, 41, .46);
    backdrop-filter: blur(3px);
}

#mc-vue-calendar-app .sidebar-content,
#mc-vue-calendar-app .client-history-body,
#mc-vue-calendar-app .cm-body {
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .sidebar-title,
#mc-vue-calendar-app .cl-header h2,
#mc-vue-calendar-app .grupy-header h2,
#mc-vue-calendar-app .mc-payments-header h2,
#mc-vue-calendar-app .cm-name,
#mc-vue-calendar-app .gm-title,
#mc-vue-calendar-app .analytics-section-header h3,
#mc-vue-calendar-app .mc-b2b-kpi-value,
#mc-vue-calendar-app .mc-b2b-tier-value {
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-serif);
    font-weight: 400;
    letter-spacing: -.02em;
}

#mc-vue-calendar-app input,
#mc-vue-calendar-app select,
#mc-vue-calendar-app textarea,
#mc-vue-calendar-app .cl-search,
#mc-vue-calendar-app .cm-edit-input,
#mc-vue-calendar-app .cm-notes-textarea {
    border: 1px solid var(--mc-ap-line);
    border-radius: 12px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-ink);
    font-family: inherit;
}

#mc-vue-calendar-app input:focus,
#mc-vue-calendar-app select:focus,
#mc-vue-calendar-app textarea:focus,
#mc-vue-calendar-app .cl-search:focus,
#mc-vue-calendar-app .cm-edit-input:focus,
#mc-vue-calendar-app .cm-notes-textarea:focus {
    border-color: var(--mc-ap-green);
    box-shadow: 0 0 0 3px rgba(45, 74, 62, .12);
    outline: none;
}

#mc-vue-calendar-app .cl-header,
#mc-vue-calendar-app .grupy-header,
#mc-vue-calendar-app .mc-payments-header,
#mc-vue-calendar-app .mc-payments-list-header,
#mc-vue-calendar-app .gm-header,
#mc-vue-calendar-app .editions-header {
    border-color: var(--mc-ap-line);
}

#mc-vue-calendar-app .cl-table-wrap,
#mc-vue-calendar-app .mc-payments-form-card,
#mc-vue-calendar-app .mc-payments-list-card,
#mc-vue-calendar-app .grupy-form-card,
#mc-vue-calendar-app .grupy-card,
#mc-vue-calendar-app .gm-table-wrap,
#mc-vue-calendar-app .gm-info-bar,
#mc-vue-calendar-app .gm-invoices-panel,
#mc-vue-calendar-app .analytics-section,
#mc-vue-calendar-app .kpi-grid > *,
#mc-vue-calendar-app .mc-b2b-kpi-card,
#mc-vue-calendar-app .mc-b2b-tier-box {
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-surface);
    box-shadow: none;
}

#mc-vue-calendar-app .cl-table-wrap,
#mc-vue-calendar-app .gm-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

#mc-vue-calendar-app .gm-table {
    background: var(--mc-ap-surface);
    border-collapse: separate;
    border-spacing: 0;
}

#mc-vue-calendar-app .gm-table th,
#mc-vue-calendar-app .clients-table th {
    background: var(--mc-ap-cream-deep);
    color: var(--mc-ap-muted);
    border-color: var(--mc-ap-line);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

#mc-vue-calendar-app .gm-table td,
#mc-vue-calendar-app .clients-table td {
    border-color: var(--mc-ap-line-soft);
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .cl-row:hover,
#mc-vue-calendar-app .gm-table tbody tr:hover {
    background: var(--mc-ap-surface-alt) !important;
}

#mc-vue-calendar-app .cl-name,
#mc-vue-calendar-app .gm-link,
#mc-vue-calendar-app .cm-family-item a {
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .gm-empty,
#mc-vue-calendar-app .grupy-empty,
#mc-vue-calendar-app .grupy-loading,
#mc-vue-calendar-app .analytics-loading,
#mc-vue-calendar-app .modal-loader {
    color: var(--mc-ap-muted);
}

#mc-vue-calendar-app .grupy-payment-type,
#mc-vue-calendar-app .payment-status-badge,
#mc-vue-calendar-app .mc-payment-status,
#mc-vue-calendar-app .cm-status,
#mc-vue-calendar-app .cm-badge,
#mc-vue-calendar-app .cm-consent-badge,
#mc-vue-calendar-app .invoice-status-badge,
#mc-vue-calendar-app .edition-status,
#mc-vue-calendar-app .gm-badge-suspended {
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .03em;
}

#mc-vue-calendar-app .payment-status-badge.is-paid,
#mc-vue-calendar-app .cm-consent-badge.is-granted,
#mc-vue-calendar-app .cm-status-potwierdzona,
#mc-vue-calendar-app .cm-status-zakończona,
#mc-vue-calendar-app .mc-payment-status-paid {
    border: 1px solid rgba(45, 74, 62, .16);
    background: var(--mc-ap-paid-bg);
    color: var(--mc-ap-paid-fg);
}

#mc-vue-calendar-app .payment-status-badge.is-unpaid,
#mc-vue-calendar-app .cm-status-umówiona,
#mc-vue-calendar-app .cm-badge-minor,
#mc-vue-calendar-app .mc-payment-status-pending {
    border: 1px solid rgba(139, 94, 46, .18);
    background: var(--mc-ap-unpaid-bg);
    color: var(--mc-ap-unpaid-fg);
}

#mc-vue-calendar-app .cm-consent-badge.is-denied,
#mc-vue-calendar-app .cm-status-odwołana,
#mc-vue-calendar-app .mc-payment-status-cancelled {
    border: 1px solid rgba(143, 56, 46, .16);
    background: var(--mc-ap-danger-bg);
    color: var(--mc-ap-danger-fg);
}

#mc-vue-calendar-app .cm-header,
#mc-vue-calendar-app .cm-tabs,
#mc-vue-calendar-app .cm-edit-bar,
#mc-vue-calendar-app .cm-family-bar,
#mc-vue-calendar-app .cm-invoice-bar,
#mc-vue-calendar-app .client-history-header,
#mc-vue-calendar-app .sidebar-actions,
#mc-vue-calendar-app .integration-section {
    border-color: var(--mc-ap-line);
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .cm-birth-bar {
    border-color: var(--mc-ap-sand);
    background: var(--mc-ap-warn-bg);
    color: var(--mc-ap-unpaid-fg);
}

#mc-vue-calendar-app .cm-tabs {
    gap: 6px;
    padding: 10px 20px 0;
    border-bottom-width: 1px;
}

#mc-vue-calendar-app .cm-tab {
    margin-bottom: -1px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    color: var(--mc-ap-muted);
}

#mc-vue-calendar-app .cm-tab.active {
    border-color: var(--mc-ap-line);
    border-bottom-color: var(--mc-ap-surface);
    color: var(--mc-ap-green);
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .sidebar-integrations,
#mc-vue-calendar-app .recurring-section,
#mc-vue-calendar-app .adjacent-bookings-info,
#mc-vue-calendar-app .cm-group-card,
#mc-vue-calendar-app .cm-edit-bar,
#mc-vue-calendar-app .client-search-results,
#mc-vue-calendar-app .mc-payments-generated {
    border: 1px solid var(--mc-ap-line);
    border-radius: 14px;
    background: var(--mc-ap-surface-alt);
}

#mc-vue-calendar-app .analytics-filters,
#mc-vue-calendar-app .analytics-quick-ranges,
#mc-vue-calendar-app .mc-payments-filters,
#mc-vue-calendar-app .gm-filters,
#mc-vue-calendar-app .gm-toolbar {
    gap: 8px;
}

#mc-vue-calendar-app .analytics-filters button,
#mc-vue-calendar-app .analytics-quick-ranges button,
#mc-vue-calendar-app .mc-payments-filters button,
#mc-vue-calendar-app .gm-filters button {
    border: 1px solid var(--mc-ap-line);
    border-radius: 999px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
    font-size: 12px;
    font-weight: 600;
}

#mc-vue-calendar-app .analytics-filters button:hover,
#mc-vue-calendar-app .analytics-quick-ranges button:hover,
#mc-vue-calendar-app .mc-payments-filters button:hover,
#mc-vue-calendar-app .gm-filters button:hover,
#mc-vue-calendar-app .mc-payments-filters button.active {
    background: var(--mc-ap-green);
    border-color: var(--mc-ap-green);
    color: var(--mc-ap-cream);
}

#mc-vue-calendar-app .analytics-section-header {
    background: var(--mc-ap-surface);
    border-color: var(--mc-ap-line);
}

#mc-vue-calendar-app .analytics-section-content {
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .mc-b2b-kpi-label,
#mc-vue-calendar-app .mc-b2b-kpi-sub,
#mc-vue-calendar-app .mc-b2b-tier-name,
#mc-vue-calendar-app .mc-b2b-tier-sub,
#mc-vue-calendar-app .mc-b2b-link-desc,
#mc-vue-calendar-app .mc-payments-desc,
#mc-vue-calendar-app .gm-subtitle {
    color: var(--mc-ap-muted);
}

#mc-vue-calendar-app .mc-b2b-kpi-card.is-warning {
    border-color: var(--mc-ap-sand);
    background: var(--mc-ap-warn-bg);
}

#mc-vue-calendar-app .mc-b2b-link-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--mc-ap-cream-deep);
    font-size: 20px;
}

#mc-vue-calendar-app .booking-tooltip {
    z-index: 1200;
    width: 320px;
    max-width: calc(100% - 32px);
    padding: 0;
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-ink);
    box-shadow: 0 22px 55px rgba(30, 51, 41, .20);
    overflow: visible;
    transform: translateY(-4px) scale(.98);
    transform-origin: top left;
}

#mc-vue-calendar-app .booking-tooltip.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#mc-vue-calendar-app .booking-tooltip::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 12px;
    height: 12px;
    background: var(--mc-ap-surface);
    border: 1px solid var(--mc-ap-line);
    transform: rotate(45deg);
}

#mc-vue-calendar-app .booking-tooltip.is-right::before {
    left: -7px;
    border-top: 0;
    border-right: 0;
}

#mc-vue-calendar-app .booking-tooltip.is-left::before {
    right: -7px;
    border-bottom: 0;
    border-left: 0;
}

#mc-vue-calendar-app .tooltip-header {
    padding: 15px 16px 3px;
    color: var(--mc-ap-green);
    font-family: var(--mc-ap-serif);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -.01em;
}

#mc-vue-calendar-app .tooltip-meta {
    margin: 0;
    padding: 0 16px 13px;
    color: var(--mc-ap-muted);
    font-size: 12px;
    line-height: 1.4;
}

#mc-vue-calendar-app .tooltip-meta:empty {
    display: none;
}

#mc-vue-calendar-app .tooltip-section {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--mc-ap-line);
}

#mc-vue-calendar-app .tooltip-section .item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 0 0 9px;
    color: var(--mc-ap-ink);
    font-size: 12.5px;
    line-height: 1.45;
}

#mc-vue-calendar-app .tooltip-section .item:last-child {
    margin-bottom: 0;
}

#mc-vue-calendar-app .tooltip-section .item .icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: var(--mc-ap-cream-deep);
    color: var(--mc-ap-green) !important;
    font-size: 14px;
}

#mc-vue-calendar-app .tooltip-section b {
    color: var(--mc-ap-green);
    font-weight: 700;
}

#mc-vue-calendar-app .tooltip-section small {
    color: var(--mc-ap-muted);
}

#mc-vue-calendar-app .booking-invoice-status-card,
#mc-vue-calendar-app .invoice-toggle-section,
#mc-vue-calendar-app .invoice-section,
#mc-vue-calendar-app .minor-toggle-section,
#mc-vue-calendar-app .minor-status-badge {
    margin-top: 14px !important;
    padding: 14px 16px !important;
    border: 1px solid var(--mc-ap-line) !important;
    border-radius: 14px !important;
    background: var(--mc-ap-surface-alt) !important;
    color: var(--mc-ap-ink) !important;
    font-size: 13px !important;
    line-height: 1.45;
    box-shadow: inset 0 1px 0 rgba(255, 253, 248, .9);
}

#mc-vue-calendar-app .booking-invoice-status-card,
#mc-vue-calendar-app .minor-status-badge {
    display: flex !important;
    align-items: flex-start !important;
    gap: 11px !important;
}

#mc-vue-calendar-app .booking-invoice-status-card > span:first-child,
#mc-vue-calendar-app .minor-status-badge > span:first-child {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--mc-ap-cream-deep);
    color: var(--mc-ap-green);
    font-size: 15px !important;
}

#mc-vue-calendar-app .booking-invoice-status-card strong,
#mc-vue-calendar-app .minor-status-badge strong {
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .invoice-toggle-label {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px !important;
    align-items: start !important;
    margin: 0;
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .invoice-toggle-label input[type="checkbox"],
#mc-vue-calendar-app .minor-toggle-section input[type="checkbox"],
#mc-vue-calendar-app .recurring-section input[type="checkbox"],
#mc-vue-calendar-app .update-all-toggle input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border-radius: 4px;
}

#mc-vue-calendar-app .invoice-toggle-copy strong {
    display: block;
    color: var(--mc-ap-green);
    font-family: var(--mc-ap-serif);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
}

#mc-vue-calendar-app .invoice-toggle-copy small {
    display: block;
    margin-top: 3px;
    color: var(--mc-ap-muted);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
}

#mc-vue-calendar-app .invoice-toggle-section .invoice-toggle-label + div {
    margin-top: 12px !important;
    padding: 14px !important;
    border-top: 1px solid var(--mc-ap-line) !important;
    border-radius: 12px;
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .invoice-section h4 {
    color: var(--mc-ap-green) !important;
    font-family: var(--mc-ap-serif);
    font-size: 16px !important;
    font-weight: 500;
}

/* Booking visit card with tabs */
#mc-vue-calendar-app .mc-vue-sidebar {
    width: min(1080px, 96vw);
    max-height: 92vh;
}

#mc-vue-calendar-app .mc-visit-sidebar-content {
    padding: 0;
    overflow: auto;
}

#mc-vue-calendar-app .mc-visit-form {
    margin: 0;
}

#mc-vue-calendar-app .mc-visit-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: min(720px, 92vh);
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .mc-visit-context {
    padding: 28px 22px;
    border-right: 1px solid var(--mc-ap-line);
    background: var(--mc-ap-surface-alt);
}

#mc-vue-calendar-app .mc-visit-context-kicker,
#mc-vue-calendar-app .mc-visit-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--mc-ap-sand-deep);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

#mc-vue-calendar-app .mc-visit-person {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
}

#mc-vue-calendar-app .mc-visit-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream);
    font-family: var(--mc-ap-serif);
    font-size: 22px;
    line-height: 1;
}

#mc-vue-calendar-app .mc-visit-person strong {
    display: block;
    color: var(--mc-ap-ink);
    font-size: 16px;
    line-height: 1.25;
}

#mc-vue-calendar-app .mc-visit-person span,
#mc-vue-calendar-app .mc-visit-context-status small {
    display: block;
    margin-top: 3px;
    color: var(--mc-ap-muted);
    font-size: 12px;
}

#mc-vue-calendar-app .mc-visit-context-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

#mc-vue-calendar-app .mc-visit-context-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mc-ap-line-soft);
}

#mc-vue-calendar-app .mc-visit-context-list dt {
    margin: 0 0 4px;
    color: var(--mc-ap-muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#mc-vue-calendar-app .mc-visit-context-list dd {
    margin: 0;
    color: var(--mc-ap-ink);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#mc-vue-calendar-app .mc-visit-context-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 22px;
}

#mc-vue-calendar-app .mc-visit-main {
    min-width: 0;
    padding: 28px 30px 22px;
}

#mc-vue-calendar-app .mc-visit-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-right: 34px;
}

#mc-vue-calendar-app .mc-visit-topbar .sidebar-title {
    margin: 0;
    padding: 0;
}

#mc-vue-calendar-app .mc-visit-status-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--mc-ap-line);
    background: var(--mc-ap-surface-alt);
    color: var(--mc-ap-muted);
    font-size: 11px;
    font-weight: 800;
}

#mc-vue-calendar-app .mc-visit-status-pill.is-paid {
    border-color: rgba(45, 74, 62, .16);
    background: var(--mc-ap-paid-bg);
    color: var(--mc-ap-paid-fg);
}

#mc-vue-calendar-app .mc-visit-status-pill.is-unpaid {
    border-color: rgba(139, 94, 46, .18);
    background: var(--mc-ap-unpaid-bg);
    color: var(--mc-ap-unpaid-fg);
}

#mc-vue-calendar-app .mc-visit-tabs {
    display: flex;
    gap: 6px;
    margin: 22px 0 20px;
    border-bottom: 1px solid var(--mc-ap-line);
}

#mc-vue-calendar-app .mc-visit-tab {
    margin-bottom: -1px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--mc-ap-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#mc-vue-calendar-app .mc-visit-tab:hover {
    color: var(--mc-ap-green);
    background: var(--mc-ap-surface-alt);
}

#mc-vue-calendar-app .mc-visit-tab.is-active {
    border-color: var(--mc-ap-line);
    border-bottom-color: var(--mc-ap-surface);
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .mc-visit-panel {
    display: grid;
    gap: 14px;
}

#mc-vue-calendar-app .mc-visit-section,
#mc-vue-calendar-app .mc-visit-internal-banner,
#mc-vue-calendar-app .mc-visit-payment-summary {
    border: 1px solid var(--mc-ap-line);
    border-radius: 14px;
    background: var(--mc-ap-surface-alt);
}

#mc-vue-calendar-app .mc-visit-section {
    padding: 16px;
}

#mc-vue-calendar-app .mc-visit-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#mc-vue-calendar-app .mc-visit-section-head h4 {
    margin: 0;
    color: var(--mc-ap-green);
    font-family: var(--mc-ap-serif);
    font-size: 17px;
    font-weight: 500;
}

#mc-vue-calendar-app .mc-visit-section-head span {
    color: var(--mc-ap-muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
}

#mc-vue-calendar-app .mc-visit-internal-banner {
    display: grid;
    gap: 3px;
    padding: 13px 15px;
    background: var(--mc-ap-warn-bg);
}

#mc-vue-calendar-app .mc-visit-internal-banner strong {
    color: var(--mc-ap-unpaid-fg);
}

#mc-vue-calendar-app .mc-visit-internal-banner span {
    color: var(--mc-ap-muted);
    font-size: 12px;
}

#mc-vue-calendar-app .mc-visit-payment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

#mc-vue-calendar-app .mc-visit-payment-summary span {
    display: block;
    margin-bottom: 4px;
    color: var(--mc-ap-muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#mc-vue-calendar-app .mc-visit-payment-summary strong {
    color: var(--mc-ap-ink);
    font-size: 15px;
}

#mc-vue-calendar-app .mc-visit-check-row {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 11px !important;
    align-items: start !important;
    margin: 0 0 12px !important;
    cursor: pointer;
}

#mc-vue-calendar-app .mc-visit-check-row input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
}

#mc-vue-calendar-app .mc-visit-check-row strong,
#mc-vue-calendar-app .mc-visit-check-row small {
    display: block;
}

#mc-vue-calendar-app .mc-visit-check-row strong {
    color: var(--mc-ap-ink);
    font-size: 13px;
}

#mc-vue-calendar-app .mc-visit-check-row small {
    margin-top: 2px;
    color: var(--mc-ap-muted);
    font-size: 11.5px;
    line-height: 1.35;
}

#mc-vue-calendar-app .mc-visit-attention-card {
    border-color: var(--mc-ap-sand);
    background: var(--mc-ap-warn-bg);
}

@media (max-width: 900px) {
    #mc-vue-calendar-app .mc-visit-card {
        grid-template-columns: 1fr;
    }

    #mc-vue-calendar-app .mc-visit-context {
        border-right: 0;
        border-bottom: 1px solid var(--mc-ap-line);
    }

    #mc-vue-calendar-app .mc-visit-main {
        padding: 22px 18px;
    }

    #mc-vue-calendar-app .mc-visit-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    #mc-vue-calendar-app .mc-visit-tab {
        white-space: nowrap;
    }

    #mc-vue-calendar-app .mc-visit-payment-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    #mc-vue-calendar-app {
        padding: 10px;
    }

    #mc-vue-calendar-app .mc-vue-header {
        align-items: stretch;
        flex-wrap: wrap;
    }

    #mc-vue-calendar-app .header-group.date-display-group {
        order: -1;
        width: 100%;
        justify-content: flex-start;
    }

    #mc-vue-calendar-app .actions-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    #mc-vue-calendar-app {
        padding: 0;
    }

    #mc-vue-calendar-app .mc-vue-dashboard {
        min-height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    #mc-vue-calendar-app .mc-vue-main-nav {
        overflow-x: auto;
        padding: 8px 10px;
        scrollbar-width: none;
    }

    #mc-vue-calendar-app .mc-vue-main-nav::-webkit-scrollbar {
        display: none;
    }

    #mc-vue-calendar-app .mc-vue-main-nav::before {
        min-width: 36px;
        width: 36px;
        height: 36px;
        margin-right: 4px;
        justify-content: center;
        border-radius: 12px;
        background: var(--mc-ap-green);
        color: var(--mc-ap-cream);
        content: "M";
    }

    #mc-vue-calendar-app .mc-vue-main-nav button {
        white-space: nowrap;
    }

    #mc-vue-calendar-app .mc-vue-header {
        padding: 12px;
    }

    #mc-vue-calendar-app .date-display {
        white-space: normal;
        font-size: 1.2rem;
    }

    #mc-vue-calendar-app .mc-vue-grid-wrapper {
        padding: 10px;
        overflow-x: auto;
    }

    #mc-vue-calendar-app .mc-vue-grid-header,
    #mc-vue-calendar-app .mc-vue-grid-body-container {
        min-width: 760px;
    }

    #mc-vue-calendar-app .mc-vue-sidebar,
    #mc-vue-calendar-app .mc-vue-modal {
        border-radius: 0 !important;
    }
}

/* === B2B Budget tab (panel kalendarza) ============================== */
.mc-b2b-budget-tab { padding: 16px 0; max-width: 1280px; }
.mc-b2b-budget-subnav { display: flex; gap: 4px; border-bottom: 1px solid #e0e4eb; margin-bottom: 18px; flex-wrap: wrap; }
.mc-b2b-budget-subnav button {
    background: transparent; border: 1px solid transparent; border-bottom: none;
    padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 500;
    color: #4a5568; border-radius: 6px 6px 0 0; transition: all .15s;
}
.mc-b2b-budget-subnav button:hover { background: #f5f6fa; color: #2d3748; }
.mc-b2b-budget-subnav button.active {
    background: #fff; border-color: #e0e4eb; color: #2d3748;
    margin-bottom: -1px; padding-bottom: 11px;
}
.mc-b2b-budget-tab .mc-b2b-links {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px; margin-top: 8px;
}

/* Settings form */
.mc-b2b-budget-settings-form { background: #fff; padding: 0; }
.mc-b2b-budget-section {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 16px 18px; margin-bottom: 14px;
}
.mc-b2b-budget-section h3 { margin: 0 0 4px; font-size: 16px; color: #1f2937; }
.mc-b2b-budget-section .mc-b2b-hint { color: #6b7280; font-size: 13px; margin: 0 0 12px; }
.mc-b2b-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.mc-b2b-grid-2 label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 13px; font-weight: 500; color: #374151;
}
.mc-b2b-grid-2 input,
.mc-b2b-grid-2 textarea {
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 14px; font-family: inherit; background: #fff;
}
.mc-b2b-grid-2 input:focus,
.mc-b2b-grid-2 textarea:focus { outline: 2px solid var(--mc-ap-green, #3d6b4f); outline-offset: -1px; border-color: transparent; }
@media (max-width: 700px) { .mc-b2b-grid-2 { grid-template-columns: 1fr; } }

/* Modal: Dodaj budżet ręcznie */
.mc-b2b-modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 100000; padding: 16px; animation: mcB2BModalFade .15s ease-out;
}
@keyframes mcB2BModalFade { from { opacity: 0; } to { opacity: 1; } }
.mc-b2b-modal-box {
    background: #fff; border-radius: 10px; padding: 24px 26px;
    width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.mc-b2b-modal-box h3 { margin-top: 0; font-size: 18px; color: #1f2937; }
.mc-b2b-modal-box code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ==========================================================================
   B2B Tabs — final dashboard polish
   ========================================================================== */

#mc-vue-calendar-app .mc-b2b-tab,
#mc-vue-calendar-app .mc-b2b-budget-tab {
    max-width: none;
    margin: 0;
    padding: 18px;
    background: var(--mc-ap-cream);
    color: var(--mc-ap-ink);
}

#mc-vue-calendar-app .mc-b2b-panel-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 22px 24px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(45, 74, 62, .08), rgba(232, 223, 197, .42)),
        var(--mc-ap-surface);
    box-shadow: 0 12px 34px rgba(45, 74, 62, .08);
}

#mc-vue-calendar-app .mc-b2b-panel-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--mc-ap-sand-deep);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

#mc-vue-calendar-app .mc-b2b-panel-hero h2 {
    margin: 0;
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-serif);
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1.12;
}

#mc-vue-calendar-app .mc-b2b-panel-hero p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--mc-ap-muted);
    font-size: 13px;
    line-height: 1.6;
}

#mc-vue-calendar-app .mc-b2b-hero-action {
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid var(--mc-ap-green);
    border-radius: 999px;
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#mc-vue-calendar-app .mc-b2b-hero-action:hover:not(:disabled) {
    border-color: var(--mc-ap-green-dark);
    background: var(--mc-ap-green-dark);
    box-shadow: 0 12px 26px rgba(45, 74, 62, .18);
    transform: translateY(-1px);
}

#mc-vue-calendar-app .mc-b2b-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

#mc-vue-calendar-app .mc-b2b-kpi-card {
    min-height: 124px;
    padding: 18px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 18px;
    background: var(--mc-ap-surface);
    box-shadow: 0 8px 24px rgba(45, 74, 62, .05);
}

#mc-vue-calendar-app .mc-b2b-kpi-card.is-warning {
    border-color: rgba(185, 172, 133, .72);
    background: var(--mc-ap-warn-bg);
}

#mc-vue-calendar-app .mc-b2b-kpi-label,
#mc-vue-calendar-app .mc-b2b-tier-name {
    margin: 0 0 9px;
    color: var(--mc-ap-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
}

#mc-vue-calendar-app .mc-b2b-kpi-value,
#mc-vue-calendar-app .mc-b2b-tier-value {
    color: var(--mc-ap-green);
    font-family: var(--mc-ap-serif);
    font-size: clamp(1.8rem, 3.2vw, 2.55rem);
    font-weight: 400;
    line-height: 1;
}

#mc-vue-calendar-app .mc-b2b-kpi-sub,
#mc-vue-calendar-app .mc-b2b-tier-sub {
    margin-top: 9px;
    color: var(--mc-ap-muted-soft);
    font-size: 12px;
    line-height: 1.45;
}

#mc-vue-calendar-app .mc-b2b-tab h3 {
    margin: 26px 0 12px !important;
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-serif);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: -.01em;
}

#mc-vue-calendar-app .mc-b2b-tab h3 + p {
    margin: -4px 0 14px !important;
    color: var(--mc-ap-muted) !important;
    font-size: 13px !important;
}

#mc-vue-calendar-app .mc-b2b-tier-grid,
#mc-vue-calendar-app .mc-b2b-links-grid,
#mc-vue-calendar-app .mc-b2b-budget-tab .mc-b2b-links {
    display: grid;
    gap: 12px;
}

#mc-vue-calendar-app .mc-b2b-tier-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

#mc-vue-calendar-app .mc-b2b-links-grid,
#mc-vue-calendar-app .mc-b2b-budget-tab .mc-b2b-links {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

#mc-vue-calendar-app .mc-b2b-tier-box {
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 18px;
    background: var(--mc-ap-surface);
    text-align: left;
}

#mc-vue-calendar-app .mc-b2b-tier-value.is-mid {
    color: #9a6a2f;
}

#mc-vue-calendar-app .mc-b2b-tier-value.is-low {
    color: var(--mc-ap-danger-fg);
}

#mc-vue-calendar-app .mc-b2b-link-btn,
#mc-vue-calendar-app .mc-b2b-budget-tab .mc-b2b-link-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 98px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-ink);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(45, 74, 62, .04);
}

#mc-vue-calendar-app .mc-b2b-link-btn:hover,
#mc-vue-calendar-app .mc-b2b-budget-tab .mc-b2b-link-btn:hover {
    border-color: var(--mc-ap-sand);
    background: #fff;
    box-shadow: 0 12px 28px rgba(45, 74, 62, .09);
    transform: translateY(-1px);
}

#mc-vue-calendar-app .mc-b2b-link-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 14px;
    background: var(--mc-ap-cream-deep);
    color: var(--mc-ap-green);
    font-size: 18px;
}

#mc-vue-calendar-app .mc-b2b-link-title {
    margin: 1px 0 4px;
    color: var(--mc-ap-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

#mc-vue-calendar-app .mc-b2b-link-desc {
    color: var(--mc-ap-muted);
    font-size: 12px;
    line-height: 1.45;
}

#mc-vue-calendar-app .mc-b2b-refresh-btn {
    border-color: var(--mc-ap-green);
    background: var(--mc-ap-green);
    color: var(--mc-ap-cream);
}

#mc-vue-calendar-app .mc-b2b-refresh-btn .mc-b2b-link-title,
#mc-vue-calendar-app .mc-b2b-refresh-btn .mc-b2b-link-desc {
    color: var(--mc-ap-cream);
}

#mc-vue-calendar-app .mc-b2b-refresh-btn .mc-b2b-link-icon {
    background: rgba(255, 253, 248, .14);
    color: var(--mc-ap-cream);
}

#mc-vue-calendar-app .mc-b2b-budget-subnav {
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
    padding: 6px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-cream-deep);
    overflow-x: auto;
}

#mc-vue-calendar-app .mc-b2b-budget-subnav button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--mc-ap-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#mc-vue-calendar-app .mc-b2b-budget-subnav button:hover {
    background: rgba(255, 253, 248, .66);
    color: var(--mc-ap-green);
}

#mc-vue-calendar-app .mc-b2b-budget-subnav button.active {
    margin: 0;
    padding: 8px 14px;
    border-color: var(--mc-ap-line);
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
    box-shadow: 0 1px 2px rgba(45, 74, 62, .06);
}

#mc-vue-calendar-app .mc-b2b-budget-panel {
    padding: 20px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 20px;
    background: var(--mc-ap-surface);
    box-shadow: 0 8px 26px rgba(45, 74, 62, .05);
}

#mc-vue-calendar-app .mc-b2b-budget-toolbar {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin: 0 0 16px !important;
}

#mc-vue-calendar-app .mc-b2b-budget-toolbar h3,
#mc-vue-calendar-app .mc-b2b-budget-section h3,
#mc-vue-calendar-app .mc-b2b-modal-box h3 {
    margin: 0 0 6px !important;
    color: var(--mc-ap-ink);
    font-family: var(--mc-ap-serif);
    font-size: 1.25rem;
    font-weight: 400;
}

#mc-vue-calendar-app .mc-b2b-budget-toolbar p {
    max-width: 760px;
    color: var(--mc-ap-muted) !important;
    font-size: 13px !important;
    line-height: 1.55;
}

#mc-vue-calendar-app .mc-b2b-budget-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

#mc-vue-calendar-app .mc-b2b-budget-actions .mc-b2b-link-btn,
#mc-vue-calendar-app .mc-b2b-budget-actions .mc-b2b-refresh-btn {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    width: auto;
    padding: 9px 13px !important;
    border-radius: 999px;
}

#mc-vue-calendar-app .mc-b2b-inline-error,
#mc-vue-calendar-app .mc-b2b-empty-state {
    margin-bottom: 14px !important;
    padding: 15px 16px !important;
    border-radius: 14px !important;
    font-size: 13px;
    line-height: 1.55;
}

#mc-vue-calendar-app .mc-b2b-inline-error {
    border: 1px solid #e6c5bb !important;
    background: var(--mc-ap-danger-bg) !important;
    color: var(--mc-ap-danger-fg) !important;
}

#mc-vue-calendar-app .mc-b2b-empty-state {
    border: 1px dashed var(--mc-ap-sand) !important;
    background: var(--mc-ap-cream) !important;
    color: var(--mc-ap-muted) !important;
}

#mc-vue-calendar-app .mc-b2b-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-surface);
}

#mc-vue-calendar-app .mc-b2b-company-table {
    min-width: 980px;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--mc-ap-surface) !important;
}

#mc-vue-calendar-app .mc-b2b-company-table thead {
    background: var(--mc-ap-cream-deep);
}

#mc-vue-calendar-app .mc-b2b-company-table th,
#mc-vue-calendar-app .mc-b2b-company-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--mc-ap-line-soft);
    color: var(--mc-ap-ink);
    vertical-align: middle;
}

#mc-vue-calendar-app .mc-b2b-company-table th {
    color: var(--mc-ap-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

#mc-vue-calendar-app .mc-b2b-company-table td {
    font-size: 13px;
}

#mc-vue-calendar-app .mc-b2b-company-table tbody tr:hover td {
    background: rgba(45, 74, 62, .035);
}

#mc-vue-calendar-app .mc-b2b-company-table td:nth-child(4),
#mc-vue-calendar-app .mc-b2b-company-table td:nth-child(5),
#mc-vue-calendar-app .mc-b2b-company-table td:nth-child(6) {
    color: var(--mc-ap-green);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-weight: 700;
    white-space: nowrap;
}

#mc-vue-calendar-app .mc-b2b-company-table td:last-child {
    white-space: nowrap;
}

#mc-vue-calendar-app .mc-b2b-company-table .button,
#mc-vue-calendar-app .mc-b2b-company-table .button-small {
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 999px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-green);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

#mc-vue-calendar-app .mc-b2b-company-table .button:hover,
#mc-vue-calendar-app .mc-b2b-company-table .button-small:hover {
    border-color: var(--mc-ap-sand);
    background: #fff;
}

#mc-vue-calendar-app .mc-b2b-budget-settings-form {
    display: grid;
    gap: 14px;
    background: transparent;
}

#mc-vue-calendar-app .mc-b2b-budget-section {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 16px;
    background: var(--mc-ap-surface-alt);
}

#mc-vue-calendar-app .mc-b2b-budget-section .mc-b2b-hint,
#mc-vue-calendar-app .mc-b2b-shortcuts-intro,
#mc-vue-calendar-app .mc-b2b-budget-tab section > p:first-child {
    color: var(--mc-ap-muted) !important;
    font-size: 13px !important;
    line-height: 1.6;
}

#mc-vue-calendar-app .mc-b2b-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#mc-vue-calendar-app .mc-b2b-grid-2 label {
    display: grid;
    gap: 7px;
    color: var(--mc-ap-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

#mc-vue-calendar-app .mc-b2b-grid-2 input,
#mc-vue-calendar-app .mc-b2b-grid-2 textarea {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 12px;
    background: var(--mc-ap-surface);
    color: var(--mc-ap-ink);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

#mc-vue-calendar-app .mc-b2b-grid-2 textarea {
    min-height: 76px;
    resize: vertical;
}

#mc-vue-calendar-app .mc-b2b-grid-2 input:focus,
#mc-vue-calendar-app .mc-b2b-grid-2 textarea:focus {
    border-color: var(--mc-ap-green);
    box-shadow: 0 0 0 3px rgba(45, 74, 62, .10);
    outline: none;
}

#mc-vue-calendar-app .mc-b2b-settings-actions {
    flex-wrap: wrap;
    padding-top: 2px;
}

#mc-vue-calendar-app .mc-b2b-modal-overlay {
    z-index: 999999;
    padding: 18px;
    background: rgba(31, 36, 32, .56);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#mc-vue-calendar-app .mc-b2b-modal-box {
    width: min(700px, 100%);
    max-height: calc(100dvh - 36px);
    padding: 28px;
    border: 1px solid var(--mc-ap-line);
    border-radius: 22px;
    background: var(--mc-ap-surface);
    box-shadow: 0 28px 80px rgba(31, 36, 32, .26);
}

#mc-vue-calendar-app .mc-b2b-modal-box > p {
    color: var(--mc-ap-muted) !important;
    font-size: 13px !important;
    line-height: 1.6;
}

#mc-vue-calendar-app .mc-b2b-modal-box form > label {
    border-color: var(--mc-ap-line) !important;
    background: var(--mc-ap-cream) !important;
    color: var(--mc-ap-ink);
    border-radius: 14px !important;
}

#mc-vue-calendar-app .mc-b2b-modal-box form > label input[type="checkbox"] {
    accent-color: var(--mc-ap-green);
}

@media (max-width: 1100px) {
    #mc-vue-calendar-app .mc-b2b-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #mc-vue-calendar-app .mc-b2b-tab,
    #mc-vue-calendar-app .mc-b2b-budget-tab {
        padding: 12px;
    }

    #mc-vue-calendar-app .mc-b2b-panel-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
        border-radius: 18px;
    }

    #mc-vue-calendar-app .mc-b2b-hero-action {
        width: 100%;
    }

    #mc-vue-calendar-app .mc-b2b-kpi-grid,
    #mc-vue-calendar-app .mc-b2b-grid-2 {
        grid-template-columns: 1fr;
    }

    #mc-vue-calendar-app .mc-b2b-budget-panel {
        padding: 14px;
        border-radius: 18px;
    }

    #mc-vue-calendar-app .mc-b2b-budget-actions,
    #mc-vue-calendar-app .mc-b2b-budget-actions .button-primary,
    #mc-vue-calendar-app .mc-b2b-budget-actions .mc-b2b-link-btn {
        width: 100%;
    }

    #mc-vue-calendar-app .mc-b2b-modal-box {
        padding: 20px 16px;
        border-radius: 18px;
    }
}

/* === MC DATE FIELD (reusable, styl z modala rezerwacji) === */
.mc-date-field {
    width: 100%;
}
.mc-date-field-wrap {
    position: relative;
    display: block;
}
.mc-date-field-display {
    width: 100%;
    padding: 9px 52px 9px 12px !important;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: auto;
    line-height: 1.4;
}
.mc-date-field-display:focus {
    outline: none;
    border-color: var(--mc-primary, #3d6b4f);
    box-shadow: 0 0 0 3px rgba(61, 107, 79, 0.15);
}
.mc-date-field-display::placeholder {
    color: #94a3b8;
}
.mc-date-field-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--mc-primary, #3d6b4f);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    padding: 0;
    line-height: 1;
}
.mc-date-field-btn:hover {
    background: var(--mc-primary, #3d6b4f);
    color: #fff;
}
.mc-date-field-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.mc-date-field-native {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    background: transparent;
}
.mc-date-field-error {
    display: block;
    margin-top: 4px;
    color: #dc2626;
    font-size: 11px;
    font-weight: 500;
}

/* ── Pakiet wieloetapowy: znacznik etapu na kafelku kalendarza ── */
.mc-vue-event .event-package {
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    border-radius: 4px;
    background: rgba(61, 107, 79, .16);
    color: #234034;
    white-space: nowrap;
}

/* ── Pakiet: panel składowych w sidebarze dodawania/edycji wizyty ── */
.mc-pkg-panel {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(61, 107, 79, .22);
    border-radius: 10px;
    background: rgba(61, 107, 79, .06);
}
.mc-pkg-panel-head { font-weight: 700; font-size: 13px; color: #234034; margin-bottom: 8px; }
.mc-pkg-panel-flat { background: #eef5f0; border: 1px solid #cfe3d6; color: #234034; border-radius: 6px; padding: 7px 10px; font-size: 12px; margin-bottom: 10px; }
.mc-pkg-panel-list { list-style: none; margin: 0; padding: 0; }
.mc-pkg-panel-list li {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 5px 0; font-size: 12.5px; border-top: 1px solid rgba(61, 107, 79, .10);
}
.mc-pkg-panel-list li:first-child { border-top: none; }
.mc-pkg-c-name { font-weight: 600; color: #2c3e34; }
.mc-pkg-c-opt { font-weight: 400; color: #7a8d7f; }
.mc-pkg-c-meta { color: #4a5d50; white-space: nowrap; }
.mc-pkg-panel-note { margin: 8px 0 0; font-size: 11.5px; color: #6b7280; line-height: 1.45; }
.mc-pkg-blocked-note { margin: 8px 0 0; font-size: 12px; color: #991b1b; line-height: 1.45; }

/* ── Kreator terminów pakietu w panelu ── */
.mc-pkg-sched { margin: 6px 0 14px; padding: 12px 14px; border: 1px solid rgba(61,107,79,.22); border-radius: 10px; background: rgba(61,107,79,.05); }
.mc-pkg-sched-row { padding: 8px 0; border-top: 1px solid rgba(61,107,79,.10); }
.mc-pkg-sched-row:first-of-type { border-top: none; }
.mc-pkg-sched-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.mc-pkg-sched-head strong { font-size: 13px; color: #234034; }
.mc-pkg-sched-head span { font-size: 11.5px; color: #4a5d50; white-space: nowrap; }
.mc-pkg-defer-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #4a5d50; margin-bottom: 6px; cursor: pointer; }
.mc-pkg-sched-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mc-pkg-sched-pick input[type="date"], .mc-pkg-sched-pick input[type="time"], .mc-pkg-sched-pick select { padding: 5px 8px; }
.mc-pkg-err { margin: 8px 0 0; color: #b32d2e; font-size: 12px; font-weight: 600; }

/* ── Archiwizacja grup ── */
.grupy-card-archived { opacity: .6; }
.grupy-archived-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: #6b7280; color: #fff; border-radius: 4px; vertical-align: middle; }
.grupy-card-actions { margin: 6px 0 4px; }
.grupy-archive-btn { background: none; border: 1px solid #d1d5db; color: #4b5563; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.grupy-archive-btn:hover { background: #f3f4f6; color: #111827; }

/* ── Filtr grup (aktywne / zarchiwizowane / wszystkie) ── */
.grupy-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.grupy-filter-chip { background: #f3f4f6; border: 1px solid #e5e7eb; color: #4b5563; border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.grupy-filter-chip:hover { background: #e5e7eb; }
.grupy-filter-chip.active { background: #2d4a3e; border-color: #2d4a3e; color: #fff; font-weight: 600; }

/* ── Widok NABÓR ── */
.mc-nabor-desc { color: #6b7280; margin: -6px 0 12px; font-size: 13px; }
.nabor-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.nabor-filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.nabor-select, .nabor-search { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; }
.nabor-search { min-width: 220px; }
.nabor-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 10px; }
.nabor-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 980px; }
.nabor-table th { text-align: left; background: #f9fafb; color: #374151; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; }
.nabor-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.nabor-table small { color: #6b7280; }
.nabor-details small { display: block; line-height: 1.4; }
.nabor-badge { display: inline-block; margin-left: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; background: #6b7280; color: #fff; border-radius: 4px; }
.nabor-badge-lead { background: #2d4a3e; }
.nabor-status-sel, .nabor-attend-sel { padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }
.nabor-comment { width: 160px; min-height: 30px; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; resize: vertical; }
.nabor-save-btn { background: #2d4a3e; color: #fff; border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.nabor-save-btn:disabled { opacity: .6; cursor: default; }
.nabor-row-potwierdzony { background: rgba(61,107,79,.06); }
.nabor-row-rezygnacja { background: rgba(220,38,38,.05); }
.nabor-row-rezygnacja td:first-child { text-decoration: line-through; color: #9ca3af; }
.nabor-row-niezakwalifikowany { background: rgba(120,120,120,.07); }
.nabor-row-niezakwalifikowany td:first-child { text-decoration: line-through; color: #9ca3af; }
