/* CMS Panel Styles */
:root {
    --primary-color: #DC143C;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #DC143C;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
    --header-height: 60px;
    --demo-banner-height: 48px;
    --main-gutter: 2rem;
    --content-padding-left: var(--main-gutter);
    --content-padding-right: 2rem;
    --cms-vw: 100vw;
    --cms-sidebar-offset: clamp(0px, calc(var(--cms-vw) - 742px), var(--sidebar-width));
}

.cms-container {
    display: flex;
    min-height: 100vh;
    background: #1d2327;
    color: #f0f0f1;
}

/* Global dark theme */
body {
    background: #1d2327;
    color: #f0f0f1;
}

html {
    background: #1d2327;
}

/* WordPress-style Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #1d2327;
    color: #f0f0f1;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid #3c434a;
    transform: translateX(calc(-1 * min(var(--sidebar-width), max(0px, 992px - var(--cms-vw)))));
}

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

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #3c434a;
    background: #23282d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f0f0f1;
    margin: 0;
    min-width: 0;
}

.sidebar-header h2 i {
    margin-right: 0.5rem;
    color: #DC143C;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #c3c4c7;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-close i {
    font-size: 1.2rem;
    line-height: 1;
    margin: 0;
    color: inherit;
}

.sidebar-close:hover {
    background: #3c434a;
    color: #f0f0f1;
}

.sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 57px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.open {
    display: block;
    opacity: 1;
}

body.sidebar-open {
    overflow: hidden;
}

/* WordPress Admin Menu */
.wp-admin-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.wp-menu-item {
    margin: 0;
    position: relative;
}

.wp-menu-item .nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #f0f0f1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.wp-menu-item .nav-link:hover {
    background: #23282d;
    color: #DC143C;
    border-left-color: #DC143C;
}

.wp-menu-item .nav-link.active {
    background: #23282d;
    color: #DC143C;
    border-left-color: #DC143C;
}

.wp-menu-item .nav-link i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.wp-menu-item .nav-link span {
    font-size: 13px;
    font-weight: 400;
}

/* WordPress Submenu */
.wp-has-submenu .nav-link {
    position: relative;
}

.wp-submenu-toggle {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.wp-has-submenu.active .wp-submenu-toggle {
    transform: rotate(180deg);
}

.wp-submenu {
    display: none;
    background: #1d2327;
    border-left: 3px solid #DC143C;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-has-submenu.active .wp-submenu {
    display: block;
}

.wp-submenu-item {
    margin: 0;
}

.wp-submenu-item .nav-link {
    padding: 6px 12px 6px 24px;
    font-size: 12px;
    color: #a7aaad;
    border-left: none;
}

.wp-submenu-item .nav-link:hover {
    background: #2c3338;
    color: #DC143C;
}

.wp-submenu-item .nav-link.active {
    background: #2c3338;
    color: #DC143C;
}

.wp-submenu-item .nav-link i {
    font-size: 12px;
    width: 14px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--cms-sidebar-offset);
    min-height: 100vh;
    background: #1d2327;
    color: #f0f0f1;
    padding-left: var(--main-gutter);
    padding-right: var(--content-padding-right);
    box-sizing: border-box;
    min-width: 0;
    width: calc(100% - var(--cms-sidebar-offset));
}

/* Header — pełna szerokość od sidebara, tekst wyrównany do treści */
.header {
    background: #23282d;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-left: calc(-1 * var(--main-gutter));
    margin-right: calc(-1 * var(--content-padding-right));
    padding: 0 var(--content-padding-right) 0 var(--main-gutter);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: sticky;
    top: var(--demo-banner-height);
    z-index: 100;
    border-bottom: 1px solid #3c434a;
    width: calc(100% + var(--main-gutter) + var(--content-padding-right));
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    min-width: 0;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    margin-right: 0.75rem;
    padding: 0.5rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #f0f0f1;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: #2c3338;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0f0f1;
    margin: 0;
    min-width: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.session-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #c8e6c9;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    white-space: nowrap;
}

.session-timer::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    opacity: 0.85;
}

.session-timer--warning {
    color: #ffe082;
    border-color: rgba(255, 193, 7, 0.45);
    background: rgba(255, 193, 7, 0.12);
}

.session-timer--critical {
    color: #ffcdd2;
    border-color: rgba(244, 67, 54, 0.5);
    background: rgba(244, 67, 54, 0.15);
    animation: session-pulse 1s ease-in-out infinite;
}

.session-timer--expired {
    color: #ef9a9a;
    border-color: rgba(244, 67, 54, 0.6);
}

@keyframes session-pulse {
    50% { opacity: 0.65; }
}

.wp-menu-item--denied,
.wp-submenu-item.wp-menu-item--denied {
    display: none !important;
}

.nav-link--locked {
    opacity: 0.72;
}

.nav-link--locked span {
    position: relative;
}

.nav-link--locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    margin-left: 0.35rem;
    opacity: 0.75;
    color: #ffb74d;
}

.users-subtab--locked {
    opacity: 0.72;
    cursor: not-allowed;
}

.users-subtab--locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    margin-left: 0.35rem;
    opacity: 0.75;
    color: #ffb74d;
}

.marketing-tab-locked {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.marketing-tab-locked[hidden] {
    display: none !important;
}

.module-locked-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 50vh;
    padding: 2rem 1rem;
}

.module-locked-card {
    max-width: 520px;
    width: 100%;
    margin-top: 2rem;
    padding: 2rem 2rem 1.75rem;
    text-align: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.module-locked-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    font-size: 1.5rem;
}

.module-locked-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    color: #333;
}

.module-locked-message {
    margin: 0 0 1rem;
    color: #555;
    line-height: 1.55;
}

.module-locked-hint {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
}

.user-role-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #e3f2fd;
    background: rgba(33, 150, 243, 0.25);
    border-radius: 3px;
    white-space: nowrap;
}

.user-role-badge--szkolenie {
    color: #fff3e0;
    background: rgba(255, 152, 0, 0.3);
}

.cms-op-role {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cms-op-role--admin {
    background: rgba(33, 150, 243, 0.15);
    color: #1565c0;
}

.cms-op-role--szkolenie {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
}

.cms-operators-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
    white-space: nowrap;
}

.user-name {
    font-weight: 500;
    color: #f0f0f1;
    white-space: nowrap;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border-radius: 4px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.logout-btn:hover {
    background: #c82333;
}

/* Content */
.content {
    padding: 2rem 0;
    background: #1d2327;
    color: #f0f0f1;
    max-width: 1400px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #23282d;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #3c434a;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: #2c3338;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: var(--primary-color); }
.stat-card:nth-child(2) .stat-icon { background: var(--success-color); }
.stat-card:nth-child(3) .stat-icon { background: var(--warning-color); }
.stat-card:nth-child(4) .stat-icon { background: var(--info-color); }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #f0f0f1;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #a7aaad;
    font-size: 0.9rem;
}

/* Dashboard Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: #23282d;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid #3c434a;
    transition: all 0.3s ease;
}

.chart-container:hover {
    background: #2c3338;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.chart-container h3 {
    margin-bottom: 1rem;
    color: #f0f0f1;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #f0f0f1;
    font-size: 1.5rem;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #A50E2D;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    background: #23282d;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #3c434a;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #3c434a;
    color: #f0f0f1;
}

.data-table th {
    background: #2c3338;
    font-weight: 600;
    color: #f0f0f1;
}

.data-table tbody tr:hover {
    background: #2c3338;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #fce8ec;
    color: #7A0B20;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: #23282d;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #3c434a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #3c434a;
    background: #2c3338;
}

.modal-header h3 {
    margin: 0;
    color: #f0f0f1;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #a7aaad;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f0f0f1;
}

.modal-body {
    padding: 1.5rem;
    background: #23282d;
    color: #f0f0f1;
}

/* Formularze w modalach — spójny dark mode */
.modal-body .form-group label {
    color: #dcdcde;
    font-weight: 500;
}

.modal-body .form-group input,
.modal-body .form-group textarea,
.modal-body .form-group select {
    background: #2c3338;
    border: 1px solid #50575e;
    color: #f0f0f1;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body .form-group input::placeholder,
.modal-body .form-group textarea::placeholder {
    color: #8c8f94;
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus,
.modal-body .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.25);
    outline: none;
    background: #32373c;
}

.modal-body .form-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    color: #a7aaad;
    line-height: 1.4;
}

.modal-body .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.25rem;
}

.modal-body .form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.modal-body .form-check-label {
    color: #dcdcde;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
}

.modal-body .form-actions {
    padding-top: 0.5rem;
    border-top: 1px solid #3c434a;
}

.modal-body .form-actions .btn-secondary {
    background: #3c434a;
    border-color: #50575e;
    color: #f0f0f1;
}

.modal-body .form-actions .btn-secondary:hover {
    background: #50575e;
    border-color: #6c7781;
}

.users-invitations-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #3c434a;
}

.section-header--sub h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #f0f0f1;
}

.section-hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #a7aaad;
}

.invite-link-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #2c3338;
    border: 1px solid #50575e;
    border-radius: 4px;
}

.invite-link-box code {
    flex: 1;
    font-size: 0.75rem;
    word-break: break-all;
    color: #c3c4c7;
}

.invite-result {
    margin: 1rem 0;
    padding: 1rem;
    background: #2c3338;
    border: 1px solid #50575e;
    border-radius: 4px;
    color: #dcdcde;
}

.hidden {
    display: none !important;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analytics-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analytics-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.chart-placeholder {
    height: 300px;
    background: var(--light-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Responsive — układ CMS (sidebar, header) */
@media (max-width: 992px) {
    :root {
        --main-gutter: 1rem;
        --content-padding-right: 1rem;
    }

    .sidebar {
        width: min(280px, 88vw);
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
    }

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

    .sidebar-close {
        display: inline-flex;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-left: var(--main-gutter);
        padding-right: var(--main-gutter);
    }

    .header {
        margin-left: calc(-1 * var(--main-gutter));
        margin-right: calc(-1 * var(--main-gutter));
        padding: 0.4rem var(--main-gutter);
        width: calc(100% + 2 * var(--main-gutter));
        top: var(--demo-banner-height);
        gap: 0.5rem;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.5rem;
        min-height: 2.5rem;
        margin-right: 0.35rem;
    }

    .header h1 {
        font-size: 1.05rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-right {
        gap: 0.2rem;
        flex-shrink: 0;
    }

    .user-menu {
        gap: 0.2rem;
    }

    .user-name {
        display: none;
    }

    .header-btn,
    .notifications-btn {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        min-height: 2.5rem;
        padding: 0;
        margin-right: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .header-btn--link {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        padding: 0;
        justify-content: center;
        overflow: hidden;
        gap: 0;
    }

    .header-btn__label {
        display: none;
    }

    .header-btn--link i,
    .notifications-btn i {
        font-size: 1.05rem;
    }

    .logout-btn {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        padding: 0;
        justify-content: center;
        border-radius: 6px;
        font-size: 0;
        gap: 0;
        flex-shrink: 0;
    }

    .logout-btn i {
        font-size: 1rem;
    }

    .session-timer {
        font-size: 0.72rem;
        padding: 0.3rem 0.5rem;
    }

    .user-role-badge {
        font-size: 0.62rem;
        padding: 0.15rem 0.4rem;
    }

    .wp-menu-item .nav-link {
        padding: 10px 14px;
        min-height: 44px;
    }

    .wp-submenu-item .nav-link {
        padding: 8px 14px 8px 28px;
        min-height: 40px;
    }
}

/* Fallback układu gdy viewport MQ nie łapią od razu po F5 (sync w index.html) */
html[data-cms-viewport="tablet"],
html[data-cms-viewport="mobile"] {
    --main-gutter: 1rem;
    --content-padding-right: 1rem;
}

html[data-cms-viewport="tablet"] .sidebar,
html[data-cms-viewport="mobile"] .sidebar {
    width: min(280px, 88vw);
}

html[data-cms-viewport="tablet"] .sidebar-close,
html[data-cms-viewport="mobile"] .sidebar-close {
    display: inline-flex;
}

html[data-cms-viewport="tablet"] .main-content,
html[data-cms-viewport="mobile"] .main-content,
html.cms-bp-compact .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-left: var(--main-gutter);
    padding-right: var(--main-gutter);
}

html[data-cms-viewport="tablet"] .header,
html[data-cms-viewport="mobile"] .header,
html.cms-bp-compact .header {
    margin-left: calc(-1 * var(--main-gutter)) !important;
    margin-right: calc(-1 * var(--main-gutter)) !important;
    padding: 0.4rem var(--main-gutter);
    width: calc(100% + 2 * var(--main-gutter)) !important;
    top: var(--demo-banner-height);
    gap: 0.5rem;
}

html[data-cms-viewport="tablet"] .sidebar-toggle,
html[data-cms-viewport="mobile"] .sidebar-toggle,
html.cms-bp-compact .sidebar-toggle {
    display: inline-flex !important;
}

html[data-cms-viewport="tablet"] .user-name,
html[data-cms-viewport="mobile"] .user-name,
html.cms-bp-compact .user-name {
    display: none !important;
}

html[data-cms-viewport="tablet"] .header-btn__label,
html[data-cms-viewport="mobile"] .header-btn__label,
html.cms-bp-compact .header-btn__label {
    display: none !important;
}

html[data-cms-viewport="tablet"] .header-btn,
html[data-cms-viewport="mobile"] .header-btn,
html[data-cms-viewport="tablet"] .notifications-btn,
html[data-cms-viewport="mobile"] .notifications-btn,
html[data-cms-viewport="tablet"] .header-btn--link,
html[data-cms-viewport="mobile"] .header-btn--link,
html.cms-bp-compact .header-btn,
html.cms-bp-compact .notifications-btn,
html.cms-bp-compact .header-btn--link {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    margin-right: 0;
    overflow: hidden;
    flex-shrink: 0;
}

html[data-cms-viewport="tablet"] .header-right,
html[data-cms-viewport="mobile"] .header-right,
html.cms-bp-compact .header-right {
    gap: 0.35rem;
    flex-shrink: 0;
}

html[data-cms-viewport="tablet"] .user-menu,
html[data-cms-viewport="mobile"] .user-menu,
html.cms-bp-compact .user-menu {
    gap: 0.35rem;
    flex-shrink: 0;
}

html[data-cms-viewport="tablet"] .logout-btn,
html[data-cms-viewport="mobile"] .logout-btn,
html.cms-bp-compact .logout-btn {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    justify-content: center;
    font-size: 0;
    gap: 0;
    flex-shrink: 0;
}

html[data-cms-viewport="tablet"] .logout-btn i,
html[data-cms-viewport="mobile"] .logout-btn i,
html.cms-bp-compact .logout-btn i {
    font-size: 1rem;
}

html[data-cms-viewport="tablet"] .cms-demo-banner,
html[data-cms-viewport="mobile"] .cms-demo-banner,
html.cms-bp-compact .cms-demo-banner {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 0.4rem var(--main-gutter);
    z-index: 998;
}

html[data-cms-viewport="tablet"] .sidebar:not(.open),
html[data-cms-viewport="mobile"] .sidebar:not(.open),
html.cms-bp-compact .sidebar:not(.open) {
    transform: translateX(-100%) !important;
}

html[data-cms-viewport="tablet"] .sidebar.open,
html[data-cms-viewport="mobile"] .sidebar.open,
html.cms-bp-compact .sidebar.open {
    transform: translateX(0) !important;
}

html[data-cms-viewport="mobile"] .marketing-mobile-nav,
html.cms-bp-mobile .marketing-mobile-nav,
html[data-cms-viewport="mobile"] .users-mobile-nav,
html.cms-bp-mobile .users-mobile-nav {
    display: block;
}

html[data-cms-viewport="mobile"] .marketing-subtabs,
html.cms-bp-mobile .marketing-subtabs,
html[data-cms-viewport="mobile"] #users > .users-subtabs,
html.cms-bp-mobile #users > .users-subtabs {
    display: none;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 1rem 0;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .content {
        padding: 1rem 0;
    }
}

@media (max-width: 600px) {
    :root {
        --demo-banner-height: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --demo-banner-height: 36px;
    }

    .header h1 {
        font-size: 0.95rem;
    }

    .header-btn,
    .notifications-btn,
    .header-btn--link,
    .logout-btn,
    .sidebar-toggle {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
    }

    .session-timer,
    .user-role-badge {
        display: none;
    }
}

/* WordPress-style Menu Management */
.wp-menu-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.wp-menu-header {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
}

.wp-menu-header h3 {
    margin: 0 0 0.5rem 0;
    color: #f0f0f1;
}

.wp-menu-header p {
    margin: 0;
    color: #a7aaad;
    font-size: 0.9rem;
}

.wp-menu-tree {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    padding: 0;
    min-height: 200px;
}

.wp-menu-item {
    background: #1d2327;
    border-bottom: 1px solid #3c434a;
    position: relative;
    transition: all 0.2s ease;
}

.wp-menu-item:last-child {
    border-bottom: none;
}

.wp-menu-item-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: move;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.wp-menu-item-handle:hover {
    background: #2c3338;
    border-left-color: #DC143C;
}

.wp-menu-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #f0f0f1;
    flex: 1;
}

.wp-menu-item-title i {
    color: #DC143C;
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.wp-menu-item-controls {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wp-menu-item-handle:hover .wp-menu-item-controls {
    opacity: 1;
}

.wp-menu-item-toggle {
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 3px;
    color: #a7aaad;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.wp-menu-item-toggle:hover {
    background: #3c434a;
    color: #f0f0f1;
}

.wp-menu-item-toggle i {
    font-size: 10px;
}

.wp-menu-subitems {
    background: #23282d;
    border-left: 3px solid #DC143C;
    margin-left: 0;
}

.wp-menu-subitems .wp-menu-item {
    border-left: none;
    border-bottom: 1px solid #3c434a;
}

.wp-menu-subitems .wp-menu-item:last-child {
    border-bottom: none;
}

.wp-menu-subitems .wp-menu-item-handle {
    padding: 6px 12px 6px 24px;
    font-size: 0.9rem;
    background: #23282d;
}

.wp-menu-subitems .wp-menu-item-title {
    color: #a7aaad;
    font-size: 0.9rem;
}

.wp-menu-subitems .wp-menu-item-title i {
    font-size: 12px;
}

/* Drag and Drop Styles */
.wp-drag-handle {
    cursor: grab;
    color: #a7aaad;
    margin-right: 8px;
    transition: color 0.2s ease;
}

.wp-drag-handle:hover {
    color: #DC143C;
}

.wp-menu-item[draggable="true"] {
    cursor: move;
}

.wp-menu-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.wp-menu-item.drag-over {
    border-top: 2px solid #DC143C;
    background: rgba(0, 160, 210, 0.1);
}

.wp-menu-tree.drag-active {
    background: rgba(0, 160, 210, 0.05);
}

/* WordPress-style Preview */
.wp-menu-preview {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    padding: 15px;
}

.wp-menu-preview h3 {
    margin: 0 0 15px 0;
    color: #f0f0f1;
    font-size: 1.1rem;
}

.wp-menu-preview-content {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 4px;
    padding: 15px;
}

.wp-preview-nav {
    margin: 0;
}

.wp-preview-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.wp-preview-item {
    position: relative;
}

.wp-preview-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    color: #f0f0f1;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wp-preview-link:hover {
    background: #2c3338;
    color: #DC143C;
}

.wp-preview-link i {
    color: #DC143C;
    width: 14px;
    text-align: center;
}

.wp-preview-has-submenu .wp-preview-link {
    position: relative;
}

.wp-preview-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.wp-preview-has-submenu:hover .wp-preview-arrow {
    transform: rotate(180deg);
}

.wp-preview-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 150px;
    padding: 5px 0;
    margin-top: 2px;
}

.wp-preview-has-submenu:hover .wp-preview-submenu {
    display: block;
}

.wp-preview-submenu li {
    margin: 0;
}

.wp-preview-submenu .wp-preview-link {
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 400;
}

.wp-preview-submenu .wp-preview-link:hover {
    background: #2c3338;
}

/* Category Type Badges */
.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.video {
    background: #DC143C;
    color: #ffffff;
}

.type-badge.ebook {
    background: #28a745;
    color: #ffffff;
}

/* Demo Banner */
.cms-demo-banner {
    position: fixed;
    top: 0;
    left: var(--cms-sidebar-offset);
    right: 0;
    height: var(--demo-banner-height);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0 var(--content-padding-right) 0 var(--main-gutter);
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.cms-demo-banner__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: 0;
    min-width: 0;
}

.cms-demo-banner__badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.cms-demo-banner__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    min-width: 0;
}

.cms-container {
    padding-top: var(--demo-banner-height);
}

/* Demo banner — responsywność (po regułach bazowych, żeby nie były nadpisywane) */
@media (max-width: 992px) {
    .cms-demo-banner {
        left: 0;
        right: 0;
        width: 100%;
        padding: 0.4rem var(--main-gutter);
        height: var(--demo-banner-height);
        overflow: hidden;
        z-index: 998;
    }

    .cms-demo-banner__content {
        gap: 0.5rem;
    }

    .cms-demo-banner__text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        font-size: 0.78rem;
    }
}

@media (max-width: 600px) {
    .cms-demo-banner__text {
        display: none;
    }

    .cms-demo-banner__content {
        justify-content: center;
    }
}

/* Toast Notifications */
.cms-toast-container {
    position: fixed;
    top: calc(var(--demo-banner-height) + var(--header-height) + 10px);
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.cms-toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    min-width: 300px;
}

.cms-toast--show {
    opacity: 1;
    transform: translateX(0);
}

.cms-toast--success {
    border-left: 4px solid #10b981;
}

.cms-toast--error {
    border-left: 4px solid #ef4444;
}

.cms-toast--warning {
    border-left: 4px solid #f59e0b;
}

.cms-toast--info {
    border-left: 4px solid #DC143C;
}

.cms-toast__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cms-toast--success .cms-toast__icon {
    color: #10b981;
}

.cms-toast--error .cms-toast__icon {
    color: #ef4444;
}

.cms-toast--warning .cms-toast__icon {
    color: #f59e0b;
}

.cms-toast--info .cms-toast__icon {
    color: #DC143C;
}

.cms-toast__message {
    flex: 1;
    color: #f0f0f1;
    font-size: 0.9rem;
}

.cms-toast__close {
    background: none;
    border: none;
    color: #a7aaad;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.cms-toast__close:hover {
    color: #f0f0f1;
}

/* Search and Filters */
.section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: #a7aaad;
    pointer-events: none;
}

.search-box input {
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
    font-size: 0.9rem;
    min-width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 2px rgba(0,160,210,0.2);
}

.filter-select,
.date-filter {
    padding: 0.5rem 0.75rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-select:focus,
.date-filter:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 2px rgba(0,160,210,0.2);
}

.date-filter {
    min-width: 150px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #23282d;
    border-top: 1px solid #3c434a;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #3c434a;
    border-color: #DC143C;
}

.pagination-btn.active {
    background: #DC143C;
    border-color: #DC143C;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: #a7aaad;
}

.pagination-info {
    color: #a7aaad;
    font-size: 0.9rem;
}

/* Analytics Stats Grid */
.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-stat-card {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.analytics-stat-card:hover {
    background: #2c3338;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.analytics-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.analytics-stat-content {
    flex: 1;
}

.analytics-stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f0f0f1;
    margin: 0 0 0.25rem 0;
}

.analytics-stat-content p {
    color: #a7aaad;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.analytics-stat-change {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.analytics-card {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.analytics-card h3 {
    margin: 0 0 1rem 0;
    color: #f0f0f1;
    font-size: 1.1rem;
}

.analytics-card canvas {
    max-height: 300px;
}

/* Modals - Large */
.modal-large {
    max-width: 900px;
}

.order-details,
.payment-details {
    color: #f0f0f1;
}

.order-details__section,
.payment-details__section {
    margin-bottom: 2rem;
}

.order-details__section h4,
.payment-details__section h4 {
    color: #f0f0f1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #3c434a;
    padding-bottom: 0.5rem;
}

.order-details__grid,
.payment-details__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.order-details__item,
.payment-details__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-details__item label,
.payment-details__item label {
    font-size: 0.85rem;
    color: #a7aaad;
    font-weight: 500;
}

.order-details__item span,
.payment-details__item span {
    color: #f0f0f1;
    font-size: 0.95rem;
}

.order-amount,
.payment-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
}

.order-status-select {
    padding: 0.5rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
    cursor: pointer;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-item {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
    padding: 1rem;
}

.order-item__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item__info strong {
    color: #f0f0f1;
}

.order-item__info span {
    color: #10b981;
    font-weight: 600;
}

/* Notifications Panel */
.notifications-btn {
    position: relative;
    background: none;
    border: none;
    color: #f0f0f1;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.notifications-btn:hover {
    background: #2c3338;
}

.notifications-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.notifications-panel {
    position: fixed;
    top: calc(var(--demo-banner-height) + var(--header-height));
    right: -400px;
    width: 400px;
    max-height: calc(100vh - 60px);
    background: #23282d;
    border: 1px solid #3c434a;
    border-right: none;
    box-shadow: -4px 0 12px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notifications-panel--open {
    right: 0;
}

.notifications-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #3c434a;
    background: #2c3338;
}

.notifications-panel__header h3 {
    margin: 0;
    color: #f0f0f1;
    font-size: 1.1rem;
}

.notifications-panel__close {
    background: none;
    border: none;
    color: #a7aaad;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.notifications-panel__close:hover {
    color: #f0f0f1;
}

.notifications-panel__content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notifications-empty {
    text-align: center;
    color: #a7aaad;
    padding: 2rem;
    margin: 0;
}

.notifications-actions {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #3c434a;
}

.notifications-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: #3c434a;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-item__icon--success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.notification-item__icon--error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.notification-item__icon--warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.notification-item__icon--info {
    background: rgba(59, 130, 246, 0.2);
    color: #DC143C;
}

.notification-item__content {
    flex: 1;
}

.notification-item__title {
    margin: 0 0 0.25rem 0;
    color: #f0f0f1;
    font-size: 0.95rem;
    font-weight: 600;
}

.notification-item__message {
    margin: 0 0 0.5rem 0;
    color: #a7aaad;
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-item__time {
    color: #6c757d;
    font-size: 0.75rem;
}

.notification-item__unread {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background: #DC143C;
    border-radius: 50%;
}

/* Logs */
.section-header--logs {
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header__desc {
    margin: 0;
    font-size: 0.9rem;
    color: #c8cdd2;
    font-weight: 400;
}

.logs-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 1.25rem;
}

.logs-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logs-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #3c434a;
    background: #23282d;
    color: #c3c4c7;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.logs-chip:hover {
    border-color: #DC143C;
    color: #f0f0f1;
}

.logs-chip--active {
    background: rgba(220, 20, 60, 0.15);
    border-color: #DC143C;
    color: #DC143C;
}

.logs-toolbar__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.logs-toolbar__footer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #3c434a;
    margin-top: 0.75rem;
}

.logs-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.logs-search i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a7aaad;
    font-size: 0.85rem;
    pointer-events: none;
}

.logs-search__input {
    width: 100%;
    height: 38px;
    padding: 0 0.85rem 0 2.25rem;
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 6px;
    color: #f0f0f1;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.logs-search__input::placeholder {
    color: #6b7280;
}

.logs-search__input:focus {
    outline: none;
    border-color: #DC143C;
}

.logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.logs-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logs-toolbar__filters .filter-select,
.logs-toolbar__filters .date-filter,
.logs-toolbar__filters .btn {
    height: 38px;
    box-sizing: border-box;
    margin: 0;
}

.logs-toolbar__filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.logs-toolbar__count {
    font-size: 0.85rem;
    color: #a7aaad;
    white-space: nowrap;
    line-height: 38px;
}

.logs-panel {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    overflow: hidden;
}

.logs-list {
    display: flex;
    flex-direction: column;
}

.log-entry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon body actions";
    align-items: start;
    gap: 0.65rem 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #3c434a;
    transition: background 0.15s ease;
    border-left: 3px solid transparent;
}

.log-entry--important { border-left-color: #8b5cf6; }
.log-entry--warning { border-left-color: #f59e0b; }
.log-entry--error { border-left-color: #ef4444; }

.log-entry__message {
    margin: 0.35rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #f0f0f1;
    line-height: 1.45;
}

.log-entry__source {
    font-size: 0.75rem;
    color: #a7aaad;
}

.log-entry__source i {
    margin-right: 0.2rem;
}

.log-entry__actions {
    grid-area: actions;
    align-self: start;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.log-entry__ticket-btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
}

.log-severity {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.log-severity--info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.log-severity--important { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.log-severity--warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.log-severity--error { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.activity-type--security {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.log-entry__icon--security {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.03);
}

.log-entry--clickable {
    cursor: pointer;
}

.log-entry--clickable:focus-visible {
    outline: 2px solid #DC143C;
    outline-offset: -2px;
}

.log-entry__hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

.log-details-grid {
    display: grid;
    gap: 0.75rem;
}

.log-details-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #3c434a;
}

.log-details-row:last-child {
    border-bottom: none;
}

.log-details-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a7aaad;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.log-details-value {
    font-size: 0.95rem;
    color: #f0f0f1;
    line-height: 1.45;
    word-break: break-word;
}

.log-details-message {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.logs-chart-wrap {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.logs-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    max-width: 100%;
    overflow: hidden;
}

.logs-chart-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
}

.logs-chart-wrap--hidden { display: none; }

.logs-chart-title {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: #f0f0f1;
    font-weight: 600;
}

.logs-chart-desc {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #a7aaad;
    line-height: 1.4;
}

.logs-chart-empty {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: #a7aaad;
    text-align: center;
    padding: 1.5rem;
    background: #1d2327;
    border-radius: 6px;
    border: 1px dashed #3c434a;
}

.logs-chart-empty--hidden {
    display: none;
}

.logs-sort-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.logs-sort-label, .logs-sort-current {
    font-size: 0.8rem;
    color: #a7aaad;
}

.logs-export-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.logs-export-actions .btn {
    height: 38px;
    min-width: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0 1rem;
    box-sizing: border-box;
}

.logs-preset-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
}

.logs-preset-bar .filter-select {
    min-width: 220px;
    height: 38px;
}

.logs-preset-bar .btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    white-space: nowrap;
}

.logs-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    background: rgba(220, 20, 60, 0.12);
    border: 1px solid rgba(220, 20, 60, 0.35);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #f0f0f1;
    margin-left: auto;
}

.logs-active-filter--hidden {
    display: none;
}

.logs-active-filter__clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}

.logs-active-filter__clear:hover {
    background: #3c434a;
    border-color: #DC143C;
}

.log-details-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.log-details-actions__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.log-details-actions__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a7aaad;
}

.log-details-actions__buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.5rem;
}

.log-details-actions__buttons .btn {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    box-sizing: border-box;
}

.log-review {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.log-review--unread { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.log-review--review { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.log-review--resolved { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.log-diff {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.log-diff__before { color: #f87171; text-decoration: line-through; }
.log-diff__after { color: #34d399; font-weight: 600; }

.log-related-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.log-related-btn {
    background: none;
    border: none;
    color: #60a5fa;
    cursor: pointer;
    text-align: left;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.log-related-btn:hover { text-decoration: underline; }

.log-immutable-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1rem;
}

.ticket-messages { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.ticket-message { background: #1d2327; border: 1px solid #3c434a; border-radius: 8px; padding: 0.75rem 1rem; }
.ticket-message--admin { border-left: 3px solid #DC143C; }
.ticket-message--internal {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}
.ticket-message--internal .ticket-message__meta { color: #fbbf24; }
.ticket-message__meta { font-size: 0.75rem; color: #a7aaad; margin-bottom: 0.35rem; }
.ticket-actions { margin-top: 1rem; }

.log-details-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #DC143C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.25rem 0 0.5rem;
}

.log-entry__icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: #fff;
}

.log-entry__icon--course { background: rgba(220, 20, 60, 0.2); color: #DC143C; }
.log-entry__icon--user { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.log-entry__icon--order { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.log-entry__icon--payment { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.log-entry__icon--category { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.log-entry__icon--menu { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.log-entry__icon--settings { background: rgba(156, 163, 175, 0.2); color: #d1d5db; }

.log-entry__body {
    grid-area: body;
    flex: 1;
    min-width: 0;
}

.log-entry__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.log-entry__action {
    font-weight: 600;
    color: #f0f0f1;
    font-size: 0.9rem;
}

.log-entry__time {
    margin-left: auto;
    font-size: 0.8rem;
    color: #a7aaad;
}

.log-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #a7aaad;
    margin-bottom: 0.25rem;
}

.log-entry__ip i {
    margin-right: 0.35rem;
    opacity: 0.7;
}

.log-entry__user i {
    margin-right: 0.35rem;
    opacity: 0.7;
}

.log-entry__details {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #c3c4c7;
    line-height: 1.5;
}

.logs-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #a7aaad;
}

.logs-empty__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.logs-empty h3 {
    margin: 0 0 0.5rem;
    color: #f0f0f1;
    font-size: 1.1rem;
}

.logs-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.activity-type {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-type--course {
    background: rgba(220, 20, 60, 0.15);
    color: #DC143C;
}

.activity-type--user {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.activity-type--order {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.activity-type--payment {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.activity-type--category {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.activity-type--settings {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.btn--sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

@media (max-width: 1100px) {
    .logs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .log-entry {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon body"
            "actions actions";
    }

    .log-entry__icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .log-entry__actions {
        justify-content: flex-start;
        padding-left: calc(34px + 0.75rem);
    }

    .log-entry__header {
        flex-wrap: wrap;
        gap: 0.4rem 0.65rem;
    }

    .log-entry__time {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .logs-stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header--logs {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .logs-toolbar__count {
        line-height: 1.4;
        text-align: right;
    }

    .log-entry__time {
        margin-left: 0;
        width: 100%;
    }
}

/* Header Button */
.header-btn {
    background: none;
    border: none;
    color: #f0f0f1;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
    margin-right: 0.5rem;
}

.header-btn:hover {
    background: #2c3338;
}

.header-btn--link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    margin-right: 0;
    white-space: nowrap;
}

.header-btn--link i {
    font-size: 1rem;
}

.header-btn__label {
    line-height: 1;
}

@media (max-width: 768px) {
    .header-btn__label {
        display: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cms-toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .cms-toast {
        min-width: auto;
    }

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

    .search-box input {
        min-width: 100%;
    }

    .analytics-stats-grid {
        grid-template-columns: 1fr;
    }

    .notifications-panel {
        width: 100%;
        right: -100%;
        top: calc(var(--demo-banner-height) + var(--header-height));
        max-height: calc(100vh - var(--demo-banner-height) - var(--header-height));
    }

    .order-details__grid,
    .payment-details__grid {
        grid-template-columns: 1fr;
    }
}

/* Support */
#support.content-section.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 4rem);
    min-height: 480px;
    overflow: hidden;
}

#support .support-controls {
    flex-shrink: 0;
}

#support .support-top-bar {
    margin-bottom: 0.35rem !important;
    align-items: center;
    gap: 0.5rem;
}

#support .support-top-bar__title {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}

#support .support-top-bar__title h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    flex-shrink: 0;
}

#support .support-top-bar__actions {
    flex-shrink: 0;
    gap: 0.35rem;
}

#support .support-top-bar__actions .btn-sm {
    padding: 0.28rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.3rem;
}

.support-header-hint {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.2;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-header--support {
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.section-header--support.section-header--compact {
    margin-bottom: 0.35rem;
}

.section-header--support.section-header--compact h2 {
    margin: 0;
    font-size: 1.05rem;
}

#support .support-kpi-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

#support .support-kpi-grid .users-kpi-card {
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
}

#support .support-kpi-grid .users-kpi-card__label {
    font-size: 0.65rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#support .support-kpi-grid .users-kpi-card__value {
    font-size: 1.05rem;
    line-height: 1.1;
}

button.users-kpi-card--clickable {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

button.users-kpi-card--clickable.users-kpi-card--active {
    border-color: #DC143C;
    background: rgba(220, 20, 60, 0.1);
    box-shadow: 0 0 0 1px rgba(220, 20, 60, 0.35);
}

#support .support-quick-filters {
    margin-bottom: 0.45rem;
    gap: 0.35rem;
}

#support .support-quick-filters .logs-chip {
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
}

.support-quick-filters .logs-chip--active {
    border-color: #DC143C;
    background: rgba(220, 20, 60, 0.15);
    color: #fff;
}

#support .support-toolbar {
    margin-bottom: 0.55rem;
}

#support .support-toolbar__main {
    flex-wrap: nowrap;
    gap: 0.5rem;
}

#support .support-search {
    flex: 1 1 220px;
    min-width: 140px;
}

#support .support-toolbar__main .filter-select {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 11rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.support-results-count {
    margin-left: auto;
    color: #a7aaad;
    font-size: 0.8rem;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.support-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 30%) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #3c434a;
    border-radius: 10px;
    overflow: hidden;
    background: #23282d;
}

.support-list-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #3c434a;
    background: #1d2327;
}

.support-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.45rem;
}

.support-list-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-left: 3px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
    color: #f0f0f1;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.support-list-item:hover {
    background: #2c3338;
    border-color: #3c434a;
    border-left-color: #DC143C;
}

.support-list-item--selected {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.35);
    border-left-color: #DC143C;
}

.support-list-item--priority-high { border-left-color: #ef4444; }
.support-list-item--priority-medium { border-left-color: #f59e0b; }
.support-list-item--priority-low { border-left-color: #3b82f6; }

.support-list-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.support-list-item__id,
.support-list-item__time {
    font-size: 0.72rem;
    color: #a7aaad;
}

.support-list-item__subject {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-list-item__user {
    font-size: 0.78rem;
    color: #c3c4c7;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-list-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.pagination--compact {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    border-top: 1px solid #3c434a;
    background: #1d2327;
}

.support-detail-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #23282d;
}

.support-detail-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.25rem;
    color: #a7aaad;
    text-align: center;
}

.support-detail-empty[hidden] {
    display: none !important;
}

.support-detail-empty i {
    font-size: 2rem;
    opacity: 0.45;
    color: #DC143C;
}

.support-detail-empty__hint {
    font-size: 0.82rem;
    max-width: 240px;
    line-height: 1.45;
}

.support-detail-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.support-detail-content[hidden] {
    display: none !important;
}

.support-detail {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.support-detail__head {
    flex-shrink: 0;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #3c434a;
    background: linear-gradient(180deg, #1d2327 0%, #23282d 100%);
}

.support-detail__head-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.support-detail__head-main {
    flex: 1 1 200px;
    min-width: 0;
}

.support-detail__id {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #a7aaad;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}

.support-detail__title {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #f0f0f1;
}

.support-detail__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
    max-width: 100%;
}

.support-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.support-detail__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #1d2327;
    border: 1px solid #3c434a;
    font-size: 0.7rem;
    color: #c3c4c7;
}

.support-detail__links {
    display: none;
}

.support-detail__thread {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.support-detail__thread .log-details-section-title {
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
}

.support-detail__thread .ticket-messages {
    margin-bottom: 0;
    gap: 0.5rem;
}

.support-detail__thread .ticket-message {
    padding: 0.55rem 0.7rem;
}

.support-detail__thread .ticket-message__meta {
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
}

.support-detail__reply {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    border-top: 1px solid #3c434a;
    background: #1d2327;
}

.support-detail__reply .support-reply-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.support-detail__reply-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.support-detail__reply-hint {
    font-size: 0.75rem;
    color: #a7aaad;
}

.support-props {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0;
    padding-top: 0.45rem;
    border-top: 1px solid #3c434a;
}

.support-prop {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.support-prop__label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #a7aaad;
}

.support-prop .filter-select {
    width: 100%;
    font-size: 0.78rem;
    padding: 0.3rem 0.45rem;
}

.support-detail__quick-bar {
    display: none;
}

.support-composer {
    flex-shrink: 0;
    border-top: 1px solid #3c434a;
    background: #1a1f23;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.support-composer__tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #3c434a;
    background: #23282d;
}

.support-composer__tab {
    flex: 1;
    border: none;
    background: transparent;
    color: #a7aaad;
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.support-composer__tab:hover {
    color: #f0f0f1;
    background: rgba(255, 255, 255, 0.03);
}

.support-composer__tab--active {
    color: #f0f0f1;
    border-bottom-color: #DC143C;
    background: rgba(220, 20, 60, 0.08);
}

.support-composer__tab--internal.support-composer__tab--active {
    border-bottom-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.support-composer__body {
    padding: 0.5rem 0.75rem 0;
}

.support-composer__input {
    width: 100%;
    min-height: 64px;
    max-height: 120px;
    resize: vertical;
    padding: 0.55rem 0.7rem;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
    color: #f0f0f1;
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.support-composer__input:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.2);
}

.support-composer__input--internal:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.support-composer__input::placeholder {
    color: #6b7280;
}

.support-composer__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem 0.6rem;
}

.support-composer__hint {
    font-size: 0.75rem;
    color: #a7aaad;
    line-height: 1.4;
    flex: 1 1 180px;
}

.support-composer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.support-composer__actions[hidden] {
    display: none !important;
}

.support-back-list-btn {
    display: none;
}

.support-list-item__assignee {
    font-size: 0.72rem;
    color: #93c5fd;
}

.support-status-select {
    min-width: 130px;
    font-size: 0.82rem;
}

.support-empty {
    text-align: center;
    color: #a7aaad;
    padding: 2rem 1rem;
}

.support-empty__hint {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.support-source-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.support-source-badge--forum { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.support-source-badge--log { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.support-source-badge--manual { background: rgba(107, 114, 128, 0.25); color: #d1d5db; }
.support-source-badge--cms { background: rgba(107, 114, 128, 0.25); color: #d1d5db; }

.status-open { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.status-in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.status-closed { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.support-extended-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #a7aaad;
}

.support-ext-stat strong { color: #e5e7eb; }
.support-ext-stat--warn strong { color: #fbbf24; }

.support-unread-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    text-transform: uppercase;
}

.support-sla-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.support-bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.45rem;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 6px;
    font-size: 0.85rem;
}

.support-list-item { position: relative; padding-left: 2rem !important; }
.support-bulk-cb {
    position: absolute;
    left: 0.55rem;
    top: 0.75rem;
}

.support-template-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.support-template-row[hidden] {
    display: none !important;
}

.support-email-opt {
    font-size: 0.8rem;
    color: #a7aaad;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.support-subject-edit {
    display: block;
    margin-bottom: 0.35rem;
}

.support-subject-edit .form-control {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.support-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.support-attachment-img {
    max-width: 120px;
    max-height: 90px;
    border-radius: 4px;
    border: 1px solid #3c434a;
    object-fit: cover;
}

.support-history-panel {
    flex-shrink: 0;
    margin-top: 0.65rem;
    padding: 0;
    border-top: 1px dashed #3c434a;
    background: transparent;
}

.support-history-panel summary {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a7aaad;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.support-history-panel summary::-webkit-details-marker {
    display: none;
}

.support-history-panel summary::before {
    content: '▸ ';
    color: #DC143C;
}

.support-history-panel[open] summary::before {
    content: '▾ ';
}

.support-history-panel .support-history-list {
    max-height: 96px;
    overflow-y: auto;
    padding: 0 0.75rem 0.45rem;
}

.support-history-item {
    font-size: 0.78rem;
    color: #a7aaad;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(60, 67, 74, 0.5);
}

.support-template-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.support-template-list__item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #3c434a;
}

.support-template-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 1500px), (max-height: 820px) {
    #support.support-section--ticket-open .support-kpi-grid,
    #support.support-section--ticket-open .support-quick-filters,
    #support.support-section--ticket-open .support-toolbar {
        display: none;
    }

    #support.support-section--ticket-open .support-bulk-bar {
        display: none;
    }

    #support.support-section--ticket-open.content-section.active {
        height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 1.5rem);
    }

    #support .support-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #support .support-toolbar__main .filter-select {
        max-width: 9.5rem;
    }

    .support-props {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .support-prop .filter-select {
        padding: 0.25rem 0.4rem;
        font-size: 0.74rem;
    }

    .support-detail__head {
        padding: 0.4rem 0.55rem;
    }

    .support-detail__head-top {
        margin-bottom: 0.3rem;
    }

    .support-detail__title {
        font-size: 0.88rem;
    }

    .support-detail__actions .btn {
        padding: 0.25rem 0.45rem;
        font-size: 0.72rem;
    }

    .support-workspace.support-workspace--detail-focus {
        grid-template-columns: 1fr;
    }

    .support-workspace.support-workspace--detail-focus .support-list-pane {
        display: none;
    }

    .support-workspace.support-workspace--detail-focus .support-detail-pane {
        min-height: 0;
    }

    .support-workspace.support-workspace--detail-focus .support-back-list-btn {
        display: inline-flex;
    }

    .support-composer__input {
        min-height: 52px;
        max-height: 88px;
    }

    .support-composer__footer {
        padding: 0.35rem 0.65rem 0.5rem;
    }
}

@media (max-width: 1200px) {
    #support .support-header-hint {
        display: none;
    }

    #support .support-top-bar__actions .support-btn-label {
        display: none;
    }

    #support .support-top-bar__actions .btn-sm {
        padding: 0.3rem 0.45rem;
    }

    #support.content-section.active {
        height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 2.5rem);
        min-height: 420px;
        overflow: hidden;
    }

    .support-workspace {
        grid-template-columns: 1fr;
    }

    .support-list-pane {
        border-right: none;
        border-bottom: 1px solid #3c434a;
        max-height: min(28vh, 260px);
        flex-shrink: 0;
    }

    .support-workspace.support-workspace--detail-focus .support-list-pane {
        display: none;
    }

    .support-detail-pane {
        flex: 1 1 auto;
        min-height: 0;
    }

    #support .support-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 1100px) {
    #support.content-section.active {
        height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 2rem);
        min-height: 380px;
        overflow: hidden;
    }

    #support.support-section--ticket-open.content-section.active {
        height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 1rem);
    }

    .support-workspace {
        min-height: 0;
        flex: 1 1 auto;
    }

    .support-list-pane {
        max-height: min(32vh, 280px);
    }
}

@media (max-width: 900px) {
    #support .support-toolbar__main {
        flex-wrap: wrap;
    }

    #support .support-toolbar__main .filter-select {
        max-width: none;
        flex: 1 1 calc(50% - 0.5rem);
    }

    .support-results-count {
        margin-left: 0;
        width: 100%;
    }
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.priority-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.priority-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.priority-low {
    background: rgba(59, 130, 246, 0.2);
    color: #DC143C;
}

/* Code styling */
code {
    background: #2c3338;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #10b981;
}

/* Settings Tabs */
.settings-tabs {
    margin-top: 1rem;
}

.settings-tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #3c434a;
    margin-bottom: 2rem;
}

.settings-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #a7aaad;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.settings-tab-btn:hover {
    color: #f0f0f1;
}

.settings-tab-btn.active {
    color: #DC143C;
    border-bottom-color: #DC143C;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

/* Payments Tab */
.payments-tab {
    margin-top: 1rem;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.role-admin {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.role-instructor {
    background: rgba(59, 130, 246, 0.2);
    color: #DC143C;
}

.role-buyer {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.role-seller {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.status-blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.role-user {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

/* Webhooks List */
.webhooks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.webhook-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 4px;
}

.webhook-item code {
    flex: 1;
    margin-right: 1rem;
}

/* Databases — status panel */
.section-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #a7aaad;
    font-weight: 400;
}

.db-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.db-summary-card {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.db-summary-card--healthy {
    border-color: rgba(34, 197, 94, 0.45);
}

.db-summary-card--degraded {
    border-color: rgba(234, 179, 8, 0.45);
}

.db-summary-card--critical {
    border-color: rgba(239, 68, 68, 0.45);
}

.db-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.db-summary-icon--info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.db-summary-icon--warn {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.db-summary-icon--danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.db-summary-content h3 {
    margin: 0 0 0.2rem;
    font-size: 1.5rem;
    color: #f0f0f1;
}

.db-summary-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #a7aaad;
}

.db-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.db-service-card {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.db-service-card--online {
    border-left: 4px solid #22c55e;
}

.db-service-card--offline {
    border-left: 4px solid #ef4444;
}

.db-service-card--degraded,
.db-service-card--disabled {
    border-left: 4px solid #eab308;
}

.db-service-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.db-service-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #2c3338;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DC143C;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.db-service-card__title {
    flex: 1;
    min-width: 0;
}

.db-service-card__title h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: #f0f0f1;
}

.db-service-card__title p {
    margin: 0;
    font-size: 0.85rem;
    color: #a7aaad;
}

.db-status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.db-status-badge--online {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.db-status-badge--offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.db-status-badge--degraded,
.db-status-badge--disabled {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.db-service-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.db-service-card__meta li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    color: #a7aaad;
    border-bottom: 1px solid #2c3338;
    padding-bottom: 0.35rem;
}

.db-service-card__meta li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.db-service-card__meta strong {
    color: #f0f0f1;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.db-service-card__error {
    margin: 0.75rem 0 0;
    padding: 0.6rem 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #fca5a5;
}

.db-tables-wrap {
    margin-top: 0.5rem;
}

.db-tables-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #f0f0f1;
}

.db-loading,
.db-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #a7aaad;
    padding: 2rem;
}

.db-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.db-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.db-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.db-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.db-alert--warning {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fde68a;
}

.db-panel {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.db-stats-grid,
.db-server-grid,
.db-availability-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.db-stat-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.db-stat-card--warn {
    border-color: rgba(234, 179, 8, 0.45);
}

.db-stat-card--danger {
    border-color: rgba(239, 68, 68, 0.45);
}

.db-stat-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(220, 20, 60, 0.15);
    color: #DC143C;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-stat-card__content h4 {
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    color: #f0f0f1;
    font-weight: 600;
    word-break: break-word;
}

.db-stat-card__content p {
    margin: 0;
    font-size: 0.8rem;
    color: #a7aaad;
    line-height: 1.3;
}

.db-empty-inline {
    color: #a7aaad;
    font-size: 0.9rem;
    margin: 0;
}

.db-availability-stats {
    margin-bottom: 1rem;
}

.db-chart-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.db-chart-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid #3c434a;
    background: #2c3338;
    color: #a7aaad;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.db-chart-tab:hover {
    color: #f0f0f1;
    border-color: #50575e;
}

.db-chart-tab--active {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.5);
    color: #f0f0f1;
}

.db-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    font-size: 0.8rem;
}

.db-panel--chart .db-chart-wrap {
    position: relative;
    height: 280px;
}

.db-panel__header {
    margin-bottom: 1rem;
}

.db-panel__header--row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.db-panel__header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: #f0f0f1;
}

.db-panel__desc {
    margin: 0;
    font-size: 0.85rem;
    color: #a7aaad;
}

.db-chart-empty {
    text-align: center;
    color: #a7aaad;
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

.db-incidents-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.db-incident {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    background: #2c3338;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #a7aaad;
}

.db-incident strong {
    color: #f0f0f1;
}

.db-empty-cell {
    text-align: center;
    color: #a7aaad;
    padding: 1.5rem !important;
}

#db-backups-table code {
    font-size: 0.8rem;
    color: #d1d5db;
}

.db-backup-details__status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.db-demo-badge--inline {
    margin: 0;
}

.db-detail-list {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
}

.db-detail-list > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #3c434a;
}

.db-detail-list dt {
    margin: 0;
    font-size: 0.85rem;
    color: #a7aaad;
}

.db-detail-list dd {
    margin: 0;
    font-size: 0.9rem;
    color: #f0f0f1;
    word-break: break-word;
}

.db-detail-path {
    font-size: 0.8rem;
}

.db-detail-ok { color: #22c55e; }
.db-detail-err { color: #ef4444; }

.db-detail-error dd {
    color: #fca5a5;
}

.db-backup-restore-warn {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 6px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fde68a;
    font-size: 0.875rem;
}

.db-backup-restore-warn--muted {
    background: rgba(107, 114, 128, 0.15);
    border-color: #3c434a;
    color: #a7aaad;
}

.db-backup-restore-warn p {
    margin: 0;
}

.db-backup-details__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.db-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.db-settings-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1.25rem;
}

.db-settings-card h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #f0f0f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.db-settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.875rem;
    color: #d1d5db;
    cursor: pointer;
}

.db-settings-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.db-settings-row input[type="number"] {
    width: 4rem;
    padding: 0.35rem 0.5rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
}

.db-settings-field {
    margin: 0.75rem 0;
}

.db-settings-field label {
    display: block;
    font-size: 0.8rem;
    color: #a7aaad;
    margin-bottom: 0.35rem;
}

.db-settings-field input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
}

.db-settings-meta,
.db-settings-hint {
    font-size: 0.8rem;
    color: #a7aaad;
    margin: 0.75rem 0;
}

.db-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.db-maintenance-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 8px;
    color: #fcd34d;
}

.db-maintenance-banner[hidden] {
    display: none !important;
}

.db-maintenance-banner i {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.db-maintenance-banner strong {
    display: block;
    color: #fef3c7;
    margin-bottom: 0.15rem;
}

.db-legend {
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    color: #c3c4c7;
    font-size: 0.85rem;
}

.db-legend summary {
    cursor: pointer;
    font-weight: 600;
    color: #f0f0f1;
}

.db-legend__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
}

.db-legend__grid > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.db-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.db-meta-card {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
    min-width: 0;
    overflow: hidden;
}

.db-meta-card h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #f0f0f1;
}

.db-meta-card h4 i {
    margin-right: 0.35rem;
    color: #72aee6;
}

.db-meta-card p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #a7aaad;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.db-meta-card__label {
    margin: 0.5rem 0 0.25rem !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    color: #c3c4c7 !important;
}

.db-migration-pending {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #2c3338;
    border-radius: 6px;
    background: #23282d;
}

.db-migration-pending li {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #2c3338;
    line-height: 1.35;
}

.db-migration-pending li:last-child {
    border-bottom: none;
}

.db-migration-pending code {
    display: block;
    font-size: 0.75rem;
    color: #d1d5db;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.db-meta-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.db-meta-badge--ok { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.db-meta-badge--warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.db-meta-badge--muted { background: rgba(107, 114, 128, 0.25); color: #d1d5db; }

.db-period-tabs {
    display: flex;
    gap: 0.35rem;
}

.db-period-tab {
    padding: 0.35rem 0.75rem;
    border: 1px solid #3c434a;
    background: #23282d;
    color: #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.db-period-tab--active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.db-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.db-insights-card {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.85rem;
}

.db-insights-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.db-insights-card__header h4 {
    margin: 0;
}

.db-vacuum-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.db-vacuum-action-cell {
    white-space: nowrap;
}

.db-insights-card h4 {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    color: #f0f0f1;
}

.db-insights-body {
    font-size: 0.82rem;
    color: #c3c4c7;
}

.db-insights-body table {
    width: 100%;
    border-collapse: collapse;
}

.db-insights-body th,
.db-insights-body td {
    padding: 0.35rem 0.25rem;
    text-align: left;
    border-bottom: 1px solid #3c434a;
}

.db-insights-body code {
    font-size: 0.75rem;
    word-break: break-all;
}

.db-vacuum-priority--high { color: #f87171; font-weight: 600; }
.db-vacuum-priority--medium { color: #fcd34d; }
.db-vacuum-priority--low { color: #86efac; }

.db-compare-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.db-compare-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #a7aaad;
}

.db-compare-select {
    min-width: 220px;
    padding: 0.4rem 0.5rem;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 4px;
    color: #f0f0f1;
}

.db-compare-result {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.85rem;
}

.db-compare-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.db-compare-stat {
    text-align: center;
    padding: 0.5rem;
    background: #1d2327;
    border-radius: 6px;
}

.db-compare-stat strong {
    display: block;
    font-size: 1.1rem;
    color: #f0f0f1;
}

.db-compare-stat span {
    font-size: 0.75rem;
    color: #a7aaad;
}

.db-compare-diff--up { color: #86efac; }
.db-compare-diff--down { color: #f87171; }

/* Forum (NodeBB) panel */
.db-forum-status {
    margin-bottom: 1rem;
}

.db-forum-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.db-forum-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #d7d9db;
}

.db-forum-chip small { color: #a7aaad; }

.db-forum-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.db-forum-dot--online {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.db-forum-dot--offline {
    background: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

/* Users module — KPI, subtabs, detail drawer */
.users-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.users-kpi-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.users-kpi-card--warn {
    border-color: #7c2d12;
}

.users-kpi-card__label {
    display: block;
    font-size: 0.75rem;
    color: #a7aaad;
    margin-bottom: 0.35rem;
}

.users-kpi-card__value {
    font-size: 1.35rem;
    color: #f0f0f1;
    font-weight: 600;
}

.users-kpi-card__sub {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #8c8f94;
}

.mkt-dash {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mkt-dash__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mkt-dash__title {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #f0f0f1;
}

.mkt-dash__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #a7aaad;
}

.mkt-dash__header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mkt-dash-period {
    display: inline-flex;
    border: 1px solid #3c434a;
    border-radius: 8px;
    overflow: hidden;
}

.mkt-dash-period__btn {
    border: none;
    background: #2c3338;
    color: #c8cdd2;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.mkt-dash-period__btn:hover {
    background: #383f45;
}

.mkt-dash-period__btn--active {
    background: #2271b1;
    color: #fff;
}

.mkt-dash-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.mkt-dash-hero-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid #3c434a;
    background: linear-gradient(145deg, #2c3338 0%, #252b30 100%);
}

.mkt-dash-hero-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mkt-dash-hero-card--revenue .mkt-dash-hero-card__icon { background: rgba(102, 187, 106, 0.2); color: #81c784; }
.mkt-dash-hero-card--email .mkt-dash-hero-card__icon { background: rgba(171, 71, 188, 0.2); color: #ce93d8; }
.mkt-dash-hero-card--affiliate .mkt-dash-hero-card__icon { background: rgba(255, 167, 38, 0.2); color: #ffb74d; }
.mkt-dash-hero-card--carts .mkt-dash-hero-card__icon { background: rgba(239, 83, 80, 0.2); color: #e57373; }

.mkt-dash-hero-card__label {
    display: block;
    font-size: 0.75rem;
    color: #a7aaad;
    margin-bottom: 0.2rem;
}

.mkt-dash-hero-card__value {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: #f0f0f1;
    line-height: 1.2;
}

.mkt-dash-hero-card__sub {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #8c8f94;
    line-height: 1.35;
}

.mkt-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
}

.mkt-dash-stat {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #2c3338;
    border: 1px solid #383f45;
}

.mkt-dash-stat span {
    display: block;
    font-size: 0.72rem;
    color: #a7aaad;
    margin-bottom: 0.15rem;
}

.mkt-dash-stat strong {
    font-size: 0.95rem;
    color: #f0f0f1;
}

.mkt-dash-alert-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mkt-dash-alert-summary__item {
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #2c3338;
    border: 1px solid #3c434a;
    color: #c8cdd2;
}

.mkt-dash-alert-summary__item--error { border-color: #c62828; color: #ef9a9a; }
.mkt-dash-alert-summary__item--warn { border-color: #e65100; color: #ffcc80; }

.mkt-dash-modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem;
}

.mkt-dash-module {
    text-align: left;
    border: 1px solid #3c434a;
    border-radius: 10px;
    background: #2c3338;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.mkt-dash-module:hover {
    border-color: #2271b1;
    background: #323940;
}

.mkt-dash-module__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mkt-dash-module__icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(34, 113, 177, 0.2);
    color: #72aee6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.mkt-dash-module__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0f0f1;
    flex: 1;
}

.mkt-dash-module__badge {
    font-size: 0.7rem;
    background: #c62828;
    color: #fff;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    min-width: 1.2rem;
    text-align: center;
}

.mkt-dash-module__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.mkt-dash-module__metrics span {
    font-size: 0.72rem;
    color: #8c8f94;
}

.mkt-dash-module__metrics em {
    display: block;
    font-style: normal;
    color: #a7aaad;
}

.mkt-dash-module__metrics strong {
    color: #e0e0e0;
    font-weight: 600;
}

.mkt-dash-main {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
}

@media (max-width: 1100px) {
    .mkt-dash-main { grid-template-columns: 1fr; }
}

.mkt-dash-main__left,
.mkt-dash-main__right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mkt-dash-panel {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 10px;
    padding: 1rem;
}

.mkt-dash-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mkt-dash-panel__title {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #e8e8e8;
}

.mkt-dash-panel__head .mkt-dash-panel__title {
    margin-bottom: 0;
}

.mkt-dash-panel__chart {
    position: relative;
    height: 120px;
}

.mkt-dash-panel__chart--tall {
    height: 220px;
}

.mkt-dash-panel__chart--empty::after {
    content: 'Brak danych w okresie';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: #8c8f94;
}

.mkt-dash-mini-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .mkt-dash-mini-charts { grid-template-columns: 1fr; }
}

.mkt-dash-funnels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .mkt-dash-funnels { grid-template-columns: 1fr; }
}

.mkt-dash-funnel__row {
    margin-bottom: 0.55rem;
}

.mkt-dash-funnel__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #c8cdd2;
    margin-bottom: 0.2rem;
}

.mkt-dash-funnel__bar {
    height: 6px;
    background: #1d2327;
    border-radius: 999px;
    overflow: hidden;
}

.mkt-dash-funnel__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #72aee6);
    border-radius: 999px;
}

.mkt-dash-funnel__rate {
    font-size: 0.7rem;
    color: #8c8f94;
    text-align: right;
    margin-top: 0.1rem;
}

.mkt-dash-todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 280px;
    overflow-y: auto;
}

.mkt-dash-todo__item {
    text-align: left;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #252b30;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    color: inherit;
}

.mkt-dash-todo__item:hover {
    border-color: #2271b1;
}

.mkt-dash-todo__item--error { border-left: 3px solid #ef5350; }
.mkt-dash-todo__item--warn { border-left: 3px solid #ff9800; }

.mkt-dash-todo__title {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #f0f0f1;
}

.mkt-dash-todo__detail {
    display: block;
    font-size: 0.76rem;
    color: #a7aaad;
    margin-top: 0.15rem;
}

.mkt-dash-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
}

.mkt-dash-timeline__item {
    text-align: left;
    border: none;
    border-left: 2px solid #2271b1;
    background: #252b30;
    padding: 0.45rem 0.55rem 0.45rem 0.65rem;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    color: inherit;
    width: 100%;
}

.mkt-dash-timeline__item:hover {
    background: #2f363c;
}

.mkt-dash-timeline__date {
    display: block;
    font-size: 0.72rem;
    color: #8c8f94;
}

.mkt-dash-timeline__title {
    display: block;
    font-size: 0.84rem;
    color: #f0f0f1;
    margin-top: 0.1rem;
}

.mkt-dash-timeline__meta {
    display: block;
    font-size: 0.72rem;
    color: #a7aaad;
}

.mkt-dash-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1100px) {
    .mkt-dash-tables { grid-template-columns: 1fr; }
}

.mkt-dash-activity__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.mkt-dash-activity__item {
    display: flex;
    gap: 0.65rem;
    text-align: left;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #252b30;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    color: inherit;
}

.mkt-dash-activity__item:hover {
    border-color: #2271b1;
}

.mkt-dash-activity__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(34, 113, 177, 0.15);
    color: #72aee6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mkt-dash-activity__body strong {
    display: block;
    font-size: 0.84rem;
    color: #f0f0f1;
}

.mkt-dash-activity__body span {
    display: block;
    font-size: 0.76rem;
    color: #a7aaad;
    margin-top: 0.1rem;
}

.mkt-dash-activity__body time {
    display: block;
    font-size: 0.7rem;
    color: #8c8f94;
    margin-top: 0.2rem;
}

.mkt-dash-empty {
    font-size: 0.85rem;
    color: #8c8f94;
    margin: 0;
    padding: 0.5rem 0;
}

.mkt-dash-empty--ok {
    color: #81c784;
}

.mkt-dash-error {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(198, 40, 40, 0.12);
    border: 1px solid rgba(198, 40, 40, 0.35);
}

.mkt-dash-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mkt-dash-list {
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.6;
}

.mkt-dash-list .btn-link {
    padding: 0;
    border: none;
    background: none;
    color: #72aee6;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.mkt-dash-list .btn-link:hover {
    text-decoration: underline;
}

.users-alerts-bar .users-alert-chip--error {
    border-color: #b71c1c;
}

.users-alerts-bar .users-alert-chip--warning {
    border-color: #e65100;
}

.users-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #3c434a;
    padding-bottom: 0.5rem;
}

.users-subtab {
    background: transparent;
    border: 1px solid transparent;
    color: #c3c4c7;
    padding: 0.5rem 0.9rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.users-subtab:hover {
    background: #2c3338;
    color: #f0f0f1;
}

.users-subtab--active {
    background: #2c3338;
    border-color: #3c434a;
    border-bottom-color: #2c3338;
    color: #f0f0f1;
}

.users-tab-panel {
    display: none;
}

.users-tab-panel--active {
    display: block;
}

.marketing-subtabs {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.marketing-subtabs .users-subtab {
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
}

.section-header--sub {
    margin-bottom: 1rem;
}

.section-header--sub h3 {
    margin: 0;
}

.section-actions--wrap {
    flex-wrap: wrap;
    width: 100%;
}

.users-row__name {
    background: none;
    border: none;
    color: #72aee6;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-align: left;
}

.users-row__name:hover {
    text-decoration: underline;
}

.users-row__actions {
    white-space: nowrap;
}

td.users-row__actions,
td.users-col-actions {
    display: table-cell !important;
    vertical-align: middle !important;
    text-align: right;
    white-space: nowrap;
}

.users-actions-inline {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
    vertical-align: middle;
}

.users-row__actions:not(td) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
}

/* ——— Tabela listy użytkowników ——— */
.table-container--users {
    overflow-x: auto;
}

.data-table--users {
    min-width: 1080px;
    font-size: 0.8125rem;
}

.data-table--users th,
.data-table--users td {
    padding: 0.5rem 0.6rem;
    vertical-align: middle;
    line-height: 1.35;
}

.data-table--users thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a7aaad;
    background: #2c3338;
    white-space: nowrap;
}

.data-table--users tbody tr:hover {
    background: rgba(114, 174, 230, 0.06);
}

.data-table--users .users-col-check {
    width: 2.5rem;
    text-align: center;
}

.data-table--users .users-col-id {
    width: 3rem;
    color: #8c8f94;
    font-variant-numeric: tabular-nums;
}

.data-table--users .users-col-name {
    min-width: 9rem;
    max-width: 11rem;
}

.data-table--users .users-col-tags {
    min-width: 6rem;
    max-width: 9rem;
}

.data-table--users .users-col-email {
    min-width: 10rem;
    max-width: 14rem;
}

.data-table--users .users-col-role,
.data-table--users .users-col-status {
    white-space: nowrap;
}

.data-table--users .users-col-num {
    width: 3.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #c3c4c7;
}

.data-table--users .users-col-money {
    width: 6.5rem;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.data-table--users .users-col-date {
    width: 5.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #c3c4c7;
    font-size: 0.78rem;
}

.data-table--users .users-col-actions {
    width: 11rem;
    min-width: 11rem;
}

.data-table--marketing {
    min-width: 960px;
    font-size: 0.8125rem;
}

.data-table--marketing th,
.data-table--marketing td {
    padding: 0.5rem 0.6rem;
    vertical-align: middle;
    line-height: 1.35;
}

.data-table--marketing thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a7aaad;
    background: #2c3338;
    white-space: nowrap;
}

.data-table--marketing tbody tr:hover {
    background: rgba(114, 174, 230, 0.06);
}

.data-table--discount-codes .users-col-actions {
    width: 11.5rem;
    min-width: 11.5rem;
}

.data-table--discount-codes code {
    font-size: 0.85em;
    color: #f0a0a8;
}

.data-table--marketing .status-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.data-table--marketing .status-active {
    background: rgba(74, 222, 128, 0.18);
    color: #bbf7d0;
}

.data-table--marketing .status-inactive {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.data-table--marketing .status-expired {
    background: rgba(248, 113, 113, 0.22);
    color: #fecaca;
}

.data-table--marketing .status-draft {
    background: rgba(114, 174, 230, 0.18);
    color: #9ec5e8;
}

.data-table--marketing .status-scheduled {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.data-table--marketing .status-sent {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.data-table--marketing .status-cancelled {
    background: rgba(139, 149, 168, 0.15);
    color: #a7aaad;
}

.data-table--email-campaigns .users-col-actions {
    width: 12.5rem;
    min-width: 12.5rem;
}

.data-table--automations .users-col-actions {
    width: 13rem;
    min-width: 13rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}

.mkt-segment-info {
    margin: -0.5rem 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #c8cdd2;
}

.mkt-segment-info strong {
    color: #e8ecf4;
}

/* Marketing calendar hub */
.mkt-cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mkt-cal-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mkt-cal-nav__title {
    margin: 0;
    min-width: 10rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8ecf4;
}

.mkt-cal-view-toggle {
    display: flex;
    gap: 0.35rem;
}

.mkt-cal-view-btn--active {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
}

.mkt-cal-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .mkt-cal-layout {
        grid-template-columns: 1fr;
    }
}

.mkt-cal-main {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.75rem;
    min-height: 420px;
}

.mkt-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.mkt-cal-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8c8f94;
    padding: 0.35rem 0;
}

.mkt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mkt-cal-day {
    min-height: 88px;
    background: #101517;
    border: 1px solid #2c3338;
    border-radius: 6px;
    padding: 0.35rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.mkt-cal-day:hover {
    border-color: #4a5560;
}

.mkt-cal-day--outside {
    opacity: 0.45;
}

.mkt-cal-day--today {
    border-color: #2271b1;
    box-shadow: inset 0 0 0 1px rgba(34, 113, 177, 0.35);
}

.mkt-cal-day--selected {
    background: #243447;
    border-color: #72aee6;
}

.mkt-cal-day__num {
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8cdd2;
    margin-bottom: 0.25rem;
}

.mkt-cal-day__events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mkt-cal-pill {
    display: block;
    font-size: 0.68rem;
    line-height: 1.25;
    padding: 2px 5px;
    border-radius: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    text-align: left;
    cursor: pointer;
}

.mkt-cal-pill--campaign { background: #2271b1; }
.mkt-cal-pill--booking { background: #2e7d32; }
.mkt-cal-pill--automation { background: #7c4dff; }
.mkt-cal-pill--outing { background: #e67e22; }

.mkt-cal-day__more {
    font-size: 0.65rem;
    color: #8c8f94;
    margin-top: 2px;
}

.mkt-cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.mkt-cal-week-day {
    background: #101517;
    border: 1px solid #2c3338;
    border-radius: 6px;
    padding: 0.5rem;
    min-height: 200px;
}

.mkt-cal-week-day--today {
    border-color: #2271b1;
}

.mkt-cal-week-day__head {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #e8ecf4;
}

.mkt-cal-sidebar {
    padding: 1rem;
}

.mkt-cal-sidebar__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.mkt-cal-sidebar__subtitle {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.85rem;
    color: #8c8f94;
}

.mkt-cal-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mkt-cal-event-card {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: #101517;
    border: 1px solid #2c3338;
    border-radius: 6px;
    color: #c8cdd2;
    cursor: pointer;
    transition: border-color 0.15s;
}

.mkt-cal-event-card:hover {
    border-color: #4a5560;
}

.mkt-cal-event-card strong {
    display: block;
    color: #e8ecf4;
    margin-bottom: 0.2rem;
}

.mkt-cal-event-card small {
    color: #8c8f94;
}

.mkt-cal-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: #8c8f94;
}

.mkt-cal-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.mkt-cal-legend .mkt-cal-pill {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Marketing reports hub */
.mkt-rpt-period-toggle {
    display: flex;
    gap: 0.35rem;
}

.mkt-rpt-period-btn--active {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
}

.users-kpi-card__delta {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    color: #8c8f94;
}

.users-kpi-card__delta--up { color: #7ad07a; }
.users-kpi-card__delta--down { color: #e57373; }

.mkt-rpt-funnels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .mkt-rpt-funnels { grid-template-columns: 1fr; }
}

.mkt-rpt-funnel-card {
    padding: 1rem;
}

.mkt-rpt-funnel-card h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.mkt-rpt-funnel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #c8cdd2;
}

.mkt-rpt-funnel-stats strong {
    color: #e8ecf4;
    font-size: 1.1rem;
    display: block;
}

.mkt-rpt-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 1100px) {
    .mkt-rpt-charts { grid-template-columns: 1fr; }
}

.mkt-rpt-chart-card {
    padding: 1rem;
}

.mkt-rpt-chart-card h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #8c8f94;
}

.mkt-rpt-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 1100px) {
    .mkt-rpt-tables { grid-template-columns: 1fr; }
}

.mkt-tm {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.mkt-tm__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.mkt-tm__title {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #f0f0f1;
}

.mkt-tm__subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: #dcdcde;
}

.mkt-tm__header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mkt-tm-updated {
    font-size: 0.8rem;
    color: #c3c4c7;
    white-space: nowrap;
}

.mkt-tm-info {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(114, 174, 230, 0.35);
    background: linear-gradient(135deg, rgba(34, 113, 177, 0.14) 0%, rgba(34, 113, 177, 0.06) 100%);
    color: #e0e0e1;
}

.mkt-tm-info > i {
    color: #72aee6;
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.mkt-tm-info strong {
    display: block;
    color: #f0f0f1;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.mkt-tm-info p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
}

.mkt-tm-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

@media (max-width: 960px) {
    .mkt-tm-hero { grid-template-columns: 1fr; }
}

.mkt-tm-hero-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    border-radius: 10px;
    border: 1px solid #3c434a;
    background: linear-gradient(145deg, #2c3338 0%, #252b30 100%);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mkt-tm-hero-card--active {
    border-color: rgba(122, 208, 122, 0.45);
    box-shadow: 0 0 0 1px rgba(122, 208, 122, 0.08);
}

.mkt-tm-hero-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.mkt-tm-hero-card--gtm .mkt-tm-hero-card__icon { background: rgba(66, 133, 244, 0.18); color: #8ab4f8; }
.mkt-tm-hero-card--meta .mkt-tm-hero-card__icon { background: rgba(24, 119, 242, 0.18); color: #6ea8fe; }
.mkt-tm-hero-card--consent .mkt-tm-hero-card__icon { background: rgba(230, 126, 34, 0.18); color: #f0a060; }

.mkt-tm-hero-card__body {
    min-width: 0;
    flex: 1;
}

.mkt-tm-hero-card__label {
    display: block;
    font-size: 0.74rem;
    color: #c3c4c7;
    margin-bottom: 0.35rem;
}

.mkt-tm-hero-card__value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f0f1;
    line-height: 1.35;
    word-break: break-all;
}

.mkt-tm-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

.mkt-tm-badge--on {
    background: rgba(122, 208, 122, 0.15);
    color: #7ad07a;
}

.mkt-tm-badge--off {
    background: rgba(140, 143, 148, 0.22);
    color: #c3c4c7;
}

.mkt-tm-badge--warn {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

.mkt-tm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 960px) {
    .mkt-tm-grid { grid-template-columns: 1fr; }
}

.mkt-tm-provider {
    position: relative;
    border-radius: 12px;
    border: 1px solid #3c434a;
    background: #2c3338;
    overflow: hidden;
    transition: opacity 0.2s, border-color 0.2s;
}

.mkt-tm-provider--off {
    opacity: 0.72;
}

.mkt-tm-provider--off .mkt-tm-provider__body {
    pointer-events: none;
    filter: grayscale(0.15);
}

.mkt-tm-provider__accent {
    height: 3px;
    width: 100%;
}

.mkt-tm-provider--gtm .mkt-tm-provider__accent {
    background: linear-gradient(90deg, #4285f4, #34a853);
}

.mkt-tm-provider--meta .mkt-tm-provider__accent {
    background: linear-gradient(90deg, #1877f2, #0d65d9);
}

.mkt-tm-provider__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.75rem;
}

.mkt-tm-provider__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.mkt-tm-provider__brand h4 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    color: #f0f0f1;
}

.mkt-tm-provider__brand p {
    margin: 0;
    font-size: 0.78rem;
    color: #c3c4c7;
}

.mkt-tm-provider__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #c3c4c7;
}

.mkt-tm-provider--gtm .mkt-tm-provider__logo { color: #8ab4f8; background: rgba(66, 133, 244, 0.12); }
.mkt-tm-provider--meta .mkt-tm-provider__logo { color: #6ea8fe; background: rgba(24, 119, 242, 0.12); }

.mkt-tm-provider__body {
    padding: 0 1.1rem 1.1rem;
}

.mkt-tm-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.mkt-tm-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mkt-tm-switch__track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: #3c434a;
    transition: background 0.2s;
}

.mkt-tm-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0f0f1;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mkt-tm-switch input:checked + .mkt-tm-switch__track {
    background: #2271b1;
}

.mkt-tm-switch input:checked + .mkt-tm-switch__track::after {
    transform: translateX(18px);
}

.mkt-tm-switch__label {
    font-size: 0.8rem;
    color: #dcdcde;
}

.mkt-tm-input-wrap {
    display: flex;
    align-items: stretch;
}

.mkt-tm-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.65rem;
    border: 1px solid #3c434a;
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: #1d2327;
    color: #dcdcde;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
}

.mkt-tm-input--prefixed {
    border-radius: 0 6px 6px 0 !important;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.03em;
}

.mkt-tm-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #c3c4c7;
}

.mkt-tm-hint i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.mkt-tm-optional {
    font-size: 0.75rem;
    font-weight: 400;
    color: #c3c4c7;
}

.mkt-tm-preview {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.18);
}

.mkt-tm-preview--active {
    border-color: rgba(122, 208, 122, 0.25);
    background: rgba(122, 208, 122, 0.06);
}

.mkt-tm-preview__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c3c4c7;
    margin-bottom: 0.4rem;
}

.mkt-tm-preview code {
    display: block;
    font-size: 0.82rem;
    color: #e8e8e9;
    word-break: break-all;
    line-height: 1.45;
}

.mkt-tm-preview--active code {
    color: #b8f0b8;
}

.mkt-tm-settings {
    padding: 1rem 1.1rem;
    border-radius: 12px;
}

.mkt-tm-settings__header h4 {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: #f0f0f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mkt-tm-settings__header h4 i {
    color: #72aee6;
}

.mkt-tm-consent-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid #3c434a;
    background: rgba(0, 0, 0, 0.12);
    transition: border-color 0.2s, background 0.2s;
}

.mkt-tm-consent-option:hover {
    border-color: #50575e;
}

.mkt-tm-consent-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mkt-tm-consent-option__box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #50575e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
    transition: all 0.2s;
}

.mkt-tm-consent-option__box i {
    font-size: 0.65rem;
    color: transparent;
}

.mkt-tm-consent-option input:checked + .mkt-tm-consent-option__box {
    background: #2271b1;
    border-color: #2271b1;
}

.mkt-tm-consent-option input:checked + .mkt-tm-consent-option__box i {
    color: #fff;
}

.mkt-tm-consent-option__text strong {
    display: block;
    color: #f0f0f1;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.mkt-tm-consent-option__text small {
    display: block;
    color: #c3c4c7;
    font-size: 0.8rem;
    line-height: 1.4;
}

.mkt-tm-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid #3c434a;
    background: linear-gradient(180deg, #2c3338 0%, #252b30 100%);
}

.mkt-tm-footer__hint {
    margin: 0;
    font-size: 0.84rem;
    color: #c3c4c7;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.mkt-tm-footer__hint i {
    color: #72aee6;
}

.mkt-tm-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mkt-tm .form-group label {
    color: #e8e8e9;
}

.mkt-smtp-badge {
    display: inline-block;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.mkt-smtp-badge--ok {
    color: #7ad07a;
}

.mkt-smtp-badge--sim {
    color: #e8b84a;
}

.ec-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #a7aaad;
}

.ec-status-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.campaign-html-editor {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.85rem;
}

.campaign-vars-hint code {
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

.campaign-preview-frame {
    width: 100%;
    min-height: 280px;
    border: 1px solid #3c434a;
    border-radius: 6px;
    background: #fff;
    margin-top: 0.5rem;
}

.campaign-preview-tabs {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.campaign-body-preview {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 6px;
    padding: 0.75rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    max-height: 320px;
    overflow: auto;
}

.list-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.chart-section-title {
    font-size: 0.9rem;
    color: #a7aaad;
    margin: 0 0 0.35rem;
    font-weight: 500;
}

.data-table--marketing tbody td {
    vertical-align: middle;
}

.users-cell-email {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dcdcde;
}

.users-cell-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.data-table--users .user-tag-chip {
    font-size: 0.65rem;
    padding: 0.12rem 0.4rem;
    background: #3d4349;
    color: #e2e4e7;
    white-space: nowrap;
}

.data-table--users .role-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.data-table--users .role-buyer {
    background: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}

.data-table--users .role-seller {
    background: rgba(74, 222, 128, 0.18);
    color: #bbf7d0;
}

.data-table--users .status-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
}

.data-table--users .status-active {
    background: rgba(74, 222, 128, 0.18);
    color: #bbf7d0;
}

.data-table--users .status-blocked {
    background: rgba(248, 113, 113, 0.22);
    color: #fecaca;
}

.users-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #50575e;
    border-radius: 4px;
    background: #3c434a;
    color: #dcdcde;
    flex-shrink: 0;
}

.users-action-btn:hover:not(:disabled) {
    background: #50575e;
    color: #fff;
}

.users-action-btn--warn {
    border-color: #92400e;
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.users-action-btn--danger {
    border-color: #7f1d1d;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.users-action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.data-table--compact {
    font-size: 0.8125rem;
}

.data-table--compact th,
.data-table--compact td {
    padding: 0.45rem 0.6rem;
}

.user-detail-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
    visibility: hidden;
}

.user-detail-drawer--open {
    pointer-events: auto;
    visibility: visible;
}

.user-detail-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.user-detail-drawer--open .user-detail-drawer__backdrop {
    opacity: 1;
}

.user-detail-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(520px, 100vw);
    height: 100%;
    background: #1d2327;
    border-left: 1px solid #3c434a;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}

.user-detail-drawer--open .user-detail-drawer__panel {
    transform: translateX(0);
}

body.user-detail-open {
    overflow: hidden;
}

.user-detail-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #3c434a;
}

.user-detail-drawer__header h3 {
    margin: 0;
    color: #f0f0f1;
    font-size: 1.15rem;
}

.user-detail-drawer__subtitle {
    margin: 0.25rem 0 0;
    color: #a7aaad;
    font-size: 0.875rem;
}

.user-detail-drawer__close {
    background: none;
    border: none;
    color: #c3c4c7;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.user-detail-drawer__summary {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #3c434a;
    background: #23282d;
}

.user-detail-summary__chips {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.user-detail-summary__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.user-detail-summary__stats div {
    text-align: center;
    padding: 0.5rem;
    background: #2c3338;
    border-radius: 6px;
}

.user-detail-summary__stats span {
    display: block;
    font-size: 0.7rem;
    color: #a7aaad;
}

.user-detail-summary__stats strong {
    color: #f0f0f1;
    font-size: 0.95rem;
}

.user-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #3c434a;
    background: #1d2327;
}

.user-detail-tab {
    background: #2c3338;
    border: 1px solid #3c434a;
    color: #c3c4c7;
    padding: 0.4rem 0.7rem;
    line-height: 1.2;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.user-detail-tab--active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.user-detail-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.user-detail-pane {
    display: none;
}

.user-detail-pane--active {
    display: block;
}

.user-detail-dl {
    margin: 0;
}

.user-detail-dl > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #2c3338;
}

.user-detail-dl dt {
    color: #a7aaad;
    font-size: 0.8125rem;
}

.user-detail-dl dd {
    margin: 0;
    color: #f0f0f1;
    font-size: 0.875rem;
}

.user-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #2c3338;
}

.user-activity-item time {
    font-size: 0.75rem;
    color: #a7aaad;
}

.user-activity-item p {
    margin: 0.25rem 0;
    color: #f0f0f1;
    font-size: 0.875rem;
}

.user-activity-item__meta {
    font-size: 0.7rem;
    color: #72777c;
    text-transform: uppercase;
}

.user-note-form {
    margin-bottom: 1rem;
}

.user-note-form textarea {
    width: 100%;
    margin-bottom: 0.5rem;
    background: #2c3338;
    border: 1px solid #50575e;
    color: #f0f0f1;
    border-radius: 4px;
    padding: 0.6rem;
    resize: vertical;
}

.user-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-note {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 6px;
    padding: 0.75rem;
}

.user-note header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
}

.user-note header time {
    color: #a7aaad;
    margin-left: auto;
}

.user-note__delete {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 0.15rem;
}

.user-note p {
    margin: 0;
    color: #dcdcde;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.user-detail-drawer__footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #3c434a;
}

.user-detail-drawer__footer .btn {
    width: 100%;
}

/* Sekcje i przyciski w panelu szczegółów */
.user-detail-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #2c3338;
}

.user-detail-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.user-detail-block__title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f0f0f1;
}

.user-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.user-detail-pane .user-inline-form.user-detail-actions {
    margin-top: 0;
}

.user-detail-pane .user-inline-form input {
    flex: 1 1 120px;
    min-width: 0;
    margin: 0;
}

.user-detail-pane .user-hub-form label {
    margin-bottom: 0.65rem;
}

.user-detail-check {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem !important;
}

.user-detail-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.user-detail-list,
.user-enrollment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-detail-list li,
.user-detail-list-item {
    padding: 0.45rem 0;
    border-bottom: 1px solid #2c3338;
    font-size: 0.875rem;
    color: #dcdcde;
}

.user-enrollment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #2c3338;
}

.user-enrollment-item small {
    color: #a7aaad;
}

.user-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.user-tags-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.user-tags-add select {
    flex: 1 1 140px;
    min-width: 120px;
    margin: 0;
}

.user-tag-chip__remove {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 0 0.15rem;
    margin-left: 0.15rem;
    font-size: 0.85rem;
    line-height: 1;
}

.user-detail-pane hr {
    border: none;
    border-top: 1px solid #3c434a;
    margin: 1.25rem 0;
}

@media (max-width: 768px) {
    .user-detail-summary__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-detail-dl > div {
        grid-template-columns: 1fr;
    }
}

.users-bulk-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 6px;
}

.users-filter-check {
    font-size: 0.8125rem;
    color: #c3c4c7;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-input {
    width: 90px;
    padding: 0.4rem 0.5rem;
    background: #2c3338;
    border: 1px solid #50575e;
    color: #f0f0f1;
    border-radius: 4px;
    font-size: 0.8125rem;
}

.user-tag-chip {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    background: #3c434a;
    border-radius: 999px;
    color: #c3c4c7;
    margin: 0.1rem;
}

.users-textarea, .user-hub-form textarea, .user-hub-form input, .user-hub-form select {
    width: 100%;
    max-width: 100%;
    background: #2c3338;
    border: 1px solid #50575e;
    color: #f0f0f1;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.35rem 0 0;
    box-sizing: border-box;
}

.user-hub-form textarea {
    margin-bottom: 0.5rem;
}

.user-hub-form .user-detail-actions {
    margin-top: 0.75rem;
}

.user-hub-form label {
    display: block;
    font-size: 0.8125rem;
    color: #a7aaad;
}

.users-segment-form, .users-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.users-segment-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #2c3338;
    border-radius: 6px;
    border: 1px solid #3c434a;
}

.users-segments-list code {
    display: block;
    font-size: 0.7rem;
    color: #a7aaad;
    margin: 0.35rem 0;
    word-break: break-all;
}

.users-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.reports-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.reports-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.reports-panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.users-report-card--chart .users-chart-wrap {
    height: 200px;
}

.users-chart-wrap--sm {
    height: 180px;
    max-width: 220px;
    margin: 0 auto;
}

.reports-detail-text p {
    margin: 0.35rem 0;
    font-size: 0.9rem;
}

.reports-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.reports-tags-wrap .user-tag-chip strong {
    margin-left: 0.25rem;
}

.users-report-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
}

.users-report-card--wide {
    grid-column: 1 / -1;
}

.users-report-card h4 {
    margin: 0 0 0.5rem;
    color: #f0f0f1;
    font-size: 0.95rem;
}

.users-divider {
    border: none;
    border-top: 1px solid #3c434a;
    margin: 1.5rem 0;
}

.btn-warning {
    background: #b45309;
    color: #fff;
    border: none;
}

.users-alerts-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #1d2327;
    border-radius: 8px;
    border: 1px solid #3c434a;
}

.users-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #2c3338;
}

.users-alert--warning { border-left: 3px solid #f59e0b; }
.users-alert--info { border-left: 3px solid #3b82f6; }

.users-alert__dismiss {
    background: none;
    border: none;
    color: #a7aaad;
    cursor: pointer;
    font-size: 1.1rem;
}

.user-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-timeline__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #3c434a;
}

.user-timeline__type {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #a7aaad;
    margin-right: 0.5rem;
}

.user-order-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.user-order-card header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.user-order-card__sub h5 {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.85rem;
    color: #a7aaad;
}

.user-progress-bar {
    height: 6px;
    background: #3c434a;
    border-radius: 3px;
    margin: 0.35rem 0;
    overflow: hidden;
}

.user-progress-bar__fill {
    height: 100%;
    background: #DC143C;
}

.user-progress-row {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #3c434a;
}

.users-chart-wrap {
    height: 220px;
    position: relative;
}

.user-blocked-warn {
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.user-note-cat {
    font-size: 0.7rem;
    background: #3c434a;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-right: 0.35rem;
}

.invitation-templates-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.invitation-template-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.75rem;
}

.invitations-kpi-grid,
.sellers-kpi-grid,
.segments-kpi-grid,
.reports-kpi-grid,
.list-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.list-toolbar {
    margin-bottom: 1rem;
}

.list-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.list-quick-filters__label {
    font-size: 0.9rem;
    color: #c8cdd2;
}

/* Tekst drugorzędny — czytelny na ciemnym tle CMS */
.text-muted {
    color: #c8cdd2;
}

.users-alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.35;
    background: #2c3338;
    border: 1px solid #50575e;
    color: #e8eaed;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.users-alert-chip:hover {
    background: #353d44;
    border-color: #72aee6;
}

.users-alert-chip strong {
    color: #fff;
    font-weight: 600;
}

#marketing .data-table--marketing small.text-muted,
#marketing td small {
    color: #b0b7bc;
}

#dc-usage-chart-wrap {
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.75rem 0.5rem 0.25rem;
}

.list-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
}

.list-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #3c434a;
    background: #1d2327;
    color: #f0f0f1;
    font-size: 0.8rem;
    cursor: pointer;
}

.list-filter-chip span {
    opacity: 0.7;
}

.list-result-summary {
    font-size: 0.9rem;
    color: #c8cdd2;
}

.operations-kpi-grid,
.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.operations-card {
    background: #2c3338;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 1rem;
}

.operations-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.operations-card h3 i {
    margin-right: 0.35rem;
    color: #72aee6;
}

.operations-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.operations-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.operations-form-row label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: 120px;
}

.operations-form-row input,
.operations-form-row select {
    width: 100%;
}

.ops-preview-panel {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.ops-preview-table-wrap {
    max-height: 180px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.ops-preview-row--new { background: rgba(16, 185, 129, 0.08); }
.ops-preview-row--exists { background: rgba(245, 158, 11, 0.08); }
.ops-preview-row--invalid { background: rgba(239, 68, 68, 0.08); }

.ops-merge-preview-grid {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ops-warnings {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: #f59e0b;
    font-size: 0.85rem;
}

.users-kpi-card__value--sm {
    font-size: 0.95rem;
    line-height: 1.25;
}

.segments-quick-templates,
.mkt-seg-quick-templates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.segments-quick-templates__label {
    font-size: 0.9rem;
    color: #a7aaad;
}

.segments-row--dynamic {
    background: rgba(99, 102, 241, 0.06);
}

.segment-form-filters-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
}

.segment-form-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.segment-form-filters input,
.segment-form-filters select {
    width: 100%;
}

.segment-form-preview {
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
    color: #a7aaad;
}

.sellers-row--pending {
    background: rgba(245, 158, 11, 0.08);
}

.seller-onboarding-bar {
    width: 72px;
    height: 6px;
    background: #3c434a;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.seller-onboarding-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #72aee6);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.invitations-section-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .invitations-section-split { grid-template-columns: 1fr; }
}

.invitations-row--urgent {
    background: rgba(245, 158, 11, 0.08);
}

.bulk-invite-results {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.bulk-invite-results-list {
    max-height: 160px;
    overflow-y: auto;
    padding-left: 1.2rem;
}

.invitation-template-card__head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.invitation-template-card__body {
    font-size: 0.85rem;
    color: #a7aaad;
    margin: 0 0 0.5rem;
}

.invitation-template-form-wrap {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #2c3338;
    border-radius: 8px;
    border: 1px solid #3c434a;
}

.invitations-result textarea {
    margin-top: 0.5rem;
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: #DC143C;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.users-merge-wizard {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.modal-content--wide {
    max-width: 640px;
}

.ticket-msg {
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    background: #2c3338;
}

.ticket-msg--admin {
    border-left: 3px solid #DC143C;
}

/* ——— CMS mobile nav (Marketing, Użytkownicy) ——— */
.cms-mobile-nav,
.marketing-mobile-nav,
.users-mobile-nav {
    display: none;
    margin-bottom: 1rem;
}

.cms-mobile-nav__label,
.marketing-mobile-nav__label,
.users-mobile-nav__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a7aaad;
    margin-bottom: 0.35rem;
}

.cms-tab-select,
.marketing-tab-select,
.users-tab-select {
    width: 100%;
    padding: 0.65rem 2.25rem 0.65rem 0.85rem;
    background: #2c3338;
    border: 1px solid #50575e;
    border-radius: 8px;
    color: #f0f0f1;
    font-size: 0.95rem;
    line-height: 1.35;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a7aaad' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    cursor: pointer;
}

.cms-tab-select:focus,
.marketing-tab-select:focus,
.users-tab-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.marketing-subtabs,
#users > .users-subtabs {
    scrollbar-width: thin;
    scrollbar-color: #50575e transparent;
}

.marketing-subtabs::-webkit-scrollbar,
#users > .users-subtabs::-webkit-scrollbar {
    height: 6px;
}

.marketing-subtabs::-webkit-scrollbar-thumb,
#users > .users-subtabs::-webkit-scrollbar-thumb {
    background: #50575e;
    border-radius: 999px;
}

@media (max-width: 1100px) {
    .marketing-subtabs,
    #users > .users-subtabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid #3c434a;
    }

    .marketing-subtabs .users-subtab,
    #users > .users-subtabs .users-subtab {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    #marketing > .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.75rem;
    }

    #marketing > .section-header h2 {
        font-size: 1.15rem;
    }

    #marketing > .section-header .section-header__desc {
        display: none;
    }

    .marketing-mobile-nav,
    .users-mobile-nav {
        display: block;
        margin-bottom: 0.85rem;
    }

    .cms-mobile-nav__label {
        font-size: 0.72rem;
        margin-bottom: 0.25rem;
    }

    .marketing-subtabs {
        display: none;
    }

    #users > .users-subtabs {
        display: none;
    }

    #marketing .section-header.section-header--sub {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #marketing .section-header--sub .section-actions,
    #marketing .section-header--sub .section-actions--wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    #marketing .section-actions .search-box,
    #marketing .section-actions .search-box input,
    #marketing .section-actions select,
    #marketing .section-actions .btn {
        width: 100%;
    }

    #marketing .mkt-dash__header-actions,
    #marketing .mkt-tm__header-actions,
    #marketing .mkt-rpt-period-toggle {
        width: 100%;
    }

    #marketing .mkt-dash__header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: 0.5rem;
        align-items: stretch;
    }

    #marketing .mkt-dash-period,
    #marketing .mkt-rpt-period-toggle {
        display: flex;
        grid-column: 1 / -1;
        width: 100%;
    }

    #marketing .mkt-dash__header-actions .btn-primary {
        grid-column: 1;
        width: 100%;
        justify-content: center;
    }

    #marketing .mkt-dash__header-actions .btn-secondary:not(#mkt-dash-refresh-btn) {
        grid-column: 2;
        width: 100%;
        justify-content: center;
    }

    #marketing #mkt-dash-refresh-btn {
        grid-column: 3;
        grid-row: 2;
        width: 2.5rem;
        min-width: 2.5rem;
        padding: 0;
        justify-content: center;
        align-self: stretch;
    }

    #marketing .mkt-dash__subtitle {
        display: none;
    }

    #marketing .mkt-dash__title {
        font-size: 1.05rem;
        margin-bottom: 0;
    }

    #marketing .mkt-dash__header {
        gap: 0.65rem;
    }

    #marketing .mkt-dash-period__btn,
    #marketing .mkt-rpt-period-toggle .btn {
        flex: 1;
        justify-content: center;
    }

    #marketing .mkt-tm__header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .mkt-tm-updated {
        white-space: normal;
        text-align: center;
    }

    #marketing .mkt-tm-footer {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .mkt-tm-footer .btn {
        width: 100%;
        justify-content: center;
    }

    #marketing .mkt-cal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .mkt-cal-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    #marketing .mkt-cal-view-toggle {
        justify-content: center;
        flex-wrap: wrap;
    }

    #marketing .mkt-cal-weekdays span {
        font-size: 0.62rem;
        padding: 0.2rem 0;
    }

    #marketing .mkt-cal-day {
        min-height: 3.5rem;
        padding: 0.25rem;
    }

    #marketing .mkt-cal-day__num {
        font-size: 0.72rem;
    }

    #marketing .mkt-cal-pill {
        font-size: 0.58rem;
        padding: 0.1rem 0.25rem;
    }

    #marketing .mkt-cal-legend {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }

    #marketing .mkt-cal-week {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    #marketing .mkt-cal-week-day {
        min-height: auto;
    }

    #marketing .invitations-kpi-grid,
    #marketing .list-kpi-grid,
    #marketing .reports-kpi-grid,
    #marketing .mkt-rpt-kpi-grid,
    #marketing .users-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #marketing .users-kpi-card {
        padding: 0.65rem 0.75rem;
    }

    #marketing .users-kpi-card__label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    #marketing .users-kpi-card__value {
        font-size: 1rem;
    }

    #marketing .mkt-dash-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #marketing .mkt-dash-hero-card {
        padding: 0.7rem 0.75rem;
        gap: 0.55rem;
    }

    #marketing .mkt-dash-hero-card__icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    #marketing .mkt-dash-hero-card__label {
        font-size: 0.68rem;
    }

    #marketing .mkt-dash-hero-card__value {
        font-size: 0.95rem;
    }

    #marketing .mkt-dash-hero-card__sub {
        font-size: 0.65rem;
        line-height: 1.3;
    }

    #marketing .mkt-dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #marketing .mkt-dash-modules {
        grid-template-columns: 1fr;
    }

    #marketing .mkt-dash-panel__chart {
        min-height: 200px;
    }

    #marketing .mkt-dash-panel__chart--tall {
        min-height: 240px;
    }

    #marketing .mkt-rpt-chart-card canvas,
    #marketing .mkt-dash-panel__chart canvas {
        max-height: 220px;
    }

    #marketing .mkt-rpt-funnel-stats {
        gap: 0.65rem 1rem;
    }

    #marketing .users-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .users-bulk-bar .btn {
        width: 100%;
        justify-content: center;
    }

    #marketing .list-quick-filters {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .list-quick-filters .btn {
        width: 100%;
        justify-content: center;
    }

    #marketing .list-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    #marketing .list-pagination .btn {
        width: 100%;
        justify-content: center;
    }

    #marketing .segments-quick-templates,
    #marketing .mkt-seg-quick-templates {
        flex-direction: column;
        align-items: stretch;
    }

    #marketing .segments-quick-templates .btn,
    #marketing .mkt-seg-quick-templates .btn {
        width: 100%;
        justify-content: center;
    }

    #marketing .ec-status-legend {
        flex-direction: column;
        align-items: flex-start;
    }

    #marketing .table-container--users,
    #marketing .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    #marketing .data-table--marketing {
        min-width: 720px;
        font-size: 0.75rem;
    }

    #marketing .data-table--marketing th,
    #marketing .data-table--marketing td {
        padding: 0.4rem 0.45rem;
    }
}

@media (max-width: 420px) {
    #marketing .invitations-kpi-grid,
    #marketing .list-kpi-grid,
    #marketing .reports-kpi-grid,
    #marketing .mkt-rpt-kpi-grid,
    #marketing .users-kpi-grid,
    #marketing .mkt-dash-stats {
        grid-template-columns: 1fr;
    }

    #marketing .mkt-cal-grid {
        gap: 2px;
    }

    #marketing .mkt-cal-day__events {
        display: none;
    }
}

/* ——— Użytkownicy — responsywność ——— */
@media (max-width: 768px) {
    #users > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    #users > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    #users > .section-header .section-actions {
        width: 100%;
    }

    #users > .section-header .section-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #users .section-header.section-header--sub {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    #users .section-header--sub .section-hint {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0;
    }

    #users .section-header--sub .section-actions,
    #users .section-header--sub .section-actions--wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }

    #users .section-header--sub .search-box,
    #users .section-header--sub .users-filter-check,
    #users .section-header--sub .section-hint {
        grid-column: 1 / -1;
    }

    #users .section-header--sub .search-box,
    #users .section-header--sub .search-box input,
    #users .section-header--sub .filter-select,
    #users .section-header--sub .filter-input {
        width: 100%;
        min-width: 0;
    }

    #users .section-header--sub .btn {
        justify-content: center;
    }

    #users .invitations-kpi-grid,
    #users .list-kpi-grid,
    #users .sellers-kpi-grid,
    #users .segments-kpi-grid,
    #users .operations-kpi-grid,
    #users .reports-kpi-grid,
    #users .users-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #users .users-kpi-card {
        padding: 0.65rem 0.75rem;
    }

    #users .users-kpi-card__label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    #users .users-kpi-card__value {
        font-size: 1rem;
    }

    #users .users-kpi-card__value--sm {
        font-size: 0.85rem;
    }

    #users .users-alerts-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #users .list-quick-filters {
        flex-direction: column;
        align-items: stretch;
    }

    #users .list-quick-filters .btn {
        width: 100%;
        justify-content: center;
    }

    #users .users-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #users .users-bulk-bar .btn {
        width: 100%;
        justify-content: center;
    }

    #users .segments-quick-templates {
        flex-direction: column;
        align-items: stretch;
    }

    #users .segments-quick-templates .btn {
        width: 100%;
        justify-content: center;
    }

    #users .operations-grid {
        grid-template-columns: 1fr;
    }

    #users .operations-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    #users .operations-card__actions .btn {
        width: 100%;
        justify-content: center;
    }

    #users .operations-form-row {
        flex-direction: column;
    }

    #users .reports-charts-grid,
    #users .reports-panels-grid,
    #users .users-reports-grid {
        grid-template-columns: 1fr;
    }

    #users .users-report-card--chart .users-chart-wrap {
        height: 180px;
    }

    #users .invitations-section-split {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    #users .table-container--users,
    #users .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    #users .data-table--users {
        min-width: 900px;
        font-size: 0.75rem;
    }

    #users .data-table:not(.data-table--users) {
        min-width: 640px;
        font-size: 0.8rem;
    }

    #users .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    #users .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .user-detail-drawer__panel {
        width: 100vw;
        max-width: 100vw;
    }

    .user-detail-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
    }

    .user-detail-tab {
        flex-shrink: 0;
    }

    .user-detail-drawer__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .user-detail-drawer__footer .btn {
        width: 100%;
        justify-content: center;
    }

    .user-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .user-detail-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #users .users-merge-wizard {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 420px) {
    #users .invitations-kpi-grid,
    #users .list-kpi-grid,
    #users .sellers-kpi-grid,
    #users .segments-kpi-grid,
    #users .operations-kpi-grid,
    #users .reports-kpi-grid,
    #users .users-kpi-grid {
        grid-template-columns: 1fr;
    }

    .user-detail-summary__stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ——— Logi aktywności — responsywność ——— */
@media (max-width: 768px) {
    #activity-logs .section-header--logs {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    #activity-logs .section-header__desc {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    #activity-logs .logs-export-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    #activity-logs .logs-export-actions .btn {
        width: 100%;
        min-width: 0;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }

    #activity-logs .logs-chart-wrap {
        padding: 0.85rem 1rem;
    }

    #activity-logs .logs-chart-desc {
        display: none;
    }

    #activity-logs .logs-chart-canvas-wrap {
        height: 160px;
    }

    #activity-logs .logs-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #activity-logs .analytics-stat-card {
        padding: 0.75rem;
    }

    #activity-logs .analytics-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    #activity-logs .analytics-stat-content h3 {
        font-size: 1.1rem;
    }

    #activity-logs .analytics-stat-content p {
        font-size: 0.72rem;
    }

    #activity-logs .logs-sort-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        margin-bottom: 0.65rem;
        scrollbar-width: thin;
    }

    #activity-logs .logs-sort-bar .logs-chip,
    #activity-logs .logs-sort-label,
    #activity-logs .logs-sort-current {
        flex-shrink: 0;
    }

    #activity-logs .logs-preset-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    #activity-logs .logs-preset-bar .filter-select,
    #activity-logs .logs-preset-bar .btn {
        width: 100%;
        justify-content: center;
    }

    #activity-logs .logs-active-filter {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #activity-logs .logs-quick-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #activity-logs .logs-quick-filters .logs-chip {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    #activity-logs .logs-toolbar {
        padding: 0.85rem;
        gap: 0.65rem;
    }

    #activity-logs .logs-search {
        min-width: 0;
        width: 100%;
    }

    #activity-logs .logs-toolbar__filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    #activity-logs .logs-toolbar__filters .filter-select,
    #activity-logs .logs-toolbar__filters .date-filter,
    #activity-logs .logs-toolbar__filters .btn {
        width: 100%;
        min-width: 0;
    }

    #activity-logs .logs-toolbar__footer {
        justify-content: stretch;
        text-align: center;
    }

    #activity-logs .logs-toolbar__count {
        width: 100%;
        text-align: center;
        line-height: 1.4;
    }

    #activity-logs .log-entry {
        gap: 0.65rem 0.75rem;
        padding: 0.85rem 1rem;
    }

    #activity-logs .log-entry__actions {
        padding-left: 0;
    }

    #activity-logs .log-entry__ticket-btn {
        width: 100%;
        justify-content: center;
    }

    #activity-logs .log-entry__message {
        font-size: 0.88rem;
    }

    #activity-logs .log-entry__time {
        font-size: 0.75rem;
    }

    #activity-logs .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    #activity-logs .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .log-details-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.5rem 0;
    }

    .log-details-label {
        font-size: 0.72rem;
    }

    .log-details-value {
        font-size: 0.88rem;
    }

    .log-details-message {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .log-details-actions__buttons {
        grid-template-columns: 1fr;
    }

    .log-details-actions__buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    #activity-logs .logs-export-actions {
        grid-template-columns: 1fr;
    }

    #activity-logs .logs-stats-grid,
    #activity-logs .logs-quick-filters {
        grid-template-columns: 1fr;
    }
}

/* ——— Bazy danych — responsywność ——— */
@media (max-width: 768px) {
    #databases > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    #databases > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    #databases .section-subtitle {
        font-size: 0.8rem;
    }

    #databases .db-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    #databases .db-toolbar .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }

    #databases .db-maintenance-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    #databases .db-legend__grid {
        grid-template-columns: 1fr;
    }

    #databases .db-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    #databases .db-summary-card {
        padding: 0.85rem 1rem;
    }

    #databases .db-summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    #databases .db-summary-content h3 {
        font-size: 1.2rem;
    }

    #databases .db-panel {
        padding: 0.85rem 1rem;
        margin-bottom: 1rem;
    }

    #databases .db-panel__header--row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    #databases .db-panel__header--row .btn {
        width: 100%;
        justify-content: center;
    }

    #databases .db-panel__desc {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    #databases .db-stats-grid,
    #databases .db-server-grid,
    #databases .db-availability-stats,
    #databases .db-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #databases .db-stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    #databases .db-stat-card__content h4 {
        font-size: 0.95rem;
    }

    #databases .db-services-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    #databases .db-service-card {
        padding: 0.85rem 1rem;
    }

    #databases .db-service-card:hover {
        transform: none;
    }

    #databases .db-period-tabs {
        width: 100%;
        display: flex;
    }

    #databases .db-period-tab {
        flex: 1;
        text-align: center;
        padding: 0.45rem 0.35rem;
    }

    #databases .db-chart-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    #databases .db-chart-tab {
        flex-shrink: 0;
    }

    #databases .db-panel--chart .db-chart-wrap {
        height: 200px;
    }

    #databases .db-insights-grid,
    #databases .db-settings-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    #databases .db-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #databases .db-settings-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #databases .db-settings-row {
        flex-direction: column;
        align-items: stretch;
    }

    #databases .db-settings-row input[type="number"] {
        width: 100%;
    }

    #databases .db-compare-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    #databases .db-compare-toolbar label,
    #databases .db-compare-select {
        width: 100%;
        min-width: 0;
    }

    #databases .db-compare-toolbar .btn {
        width: 100%;
        justify-content: center;
    }

    #databases .db-compare-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #databases .db-incident {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    #databases .db-forum-grid {
        flex-direction: column;
        align-items: stretch;
    }

    #databases .db-forum-chip {
        justify-content: center;
    }

    #databases .db-insights-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #databases .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    #databases .data-table {
        min-width: 640px;
        font-size: 0.8rem;
    }

    #databases .data-table th,
    #databases .data-table td {
        padding: 0.45rem 0.5rem;
    }

    .db-detail-list > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .db-backup-details__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .db-backup-details__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    #databases .db-toolbar {
        grid-template-columns: 1fr;
    }

    #databases .db-stats-grid,
    #databases .db-server-grid,
    #databases .db-availability-stats,
    #databases .db-meta-grid,
    #databases .db-compare-summary {
        grid-template-columns: 1fr;
    }

    #databases .db-period-tabs {
        flex-direction: column;
    }

    #databases .db-period-tab {
        width: 100%;
    }
}

/* ——— Użytkownicy CMS — responsywność ——— */
@media (max-width: 768px) {
    #cms-operators > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    #cms-operators > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    #cms-operators .section-subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    #cms-operators .db-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #cms-operators .db-toolbar .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
    }

    #cms-operators .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    #cms-operators .data-table {
        min-width: 820px;
        font-size: 0.8rem;
    }

    #cms-operators .data-table th,
    #cms-operators .data-table td {
        padding: 0.45rem 0.5rem;
    }

    #cms-operators .cms-op-role {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    #cms-operators .cms-operators-actions {
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    #cms-operators .db-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Modale są poza .main-content — tylko viewport / data-cms-viewport */
@media (max-width: 768px) {
    #cms-operator-modal .modal-content,
    #log-details-modal .modal-content,
    #backup-details-modal .modal-content {
        width: calc(100% - 1rem);
        max-width: none;
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
    }

    #cms-operator-modal .modal-header {
        padding: 1rem 1.15rem;
    }

    #cms-operator-modal .modal-header h3 {
        font-size: 1rem;
        line-height: 1.35;
        padding-right: 0.5rem;
    }

    #cms-operator-modal .modal-body {
        padding: 1rem 1.15rem;
    }

    #cms-operator-modal .form-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    #cms-operator-modal .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

html[data-cms-viewport="mobile"] #cms-operator-modal .modal-content,
html[data-cms-viewport="mobile"] #log-details-modal .modal-content,
html[data-cms-viewport="mobile"] #backup-details-modal .modal-content {
    width: calc(100% - 1rem);
    max-width: none;
    margin: 0.5rem auto;
    max-height: calc(100vh - 1rem);
}

html[data-cms-viewport="mobile"] #cms-operator-modal .form-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
}

html[data-cms-viewport="mobile"] #cms-operator-modal .form-actions .btn {
    width: 100%;
    justify-content: center;
}


/* ——— Mobile fallback (data-cms-viewport) — auto ——— */
    html[data-cms-viewport="mobile"] #marketing > .section-header, html.cms-bp-mobile #marketing > .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #marketing > .section-header h2, html.cms-bp-mobile #marketing > .section-header h2 {
        font-size: 1.15rem;
    }

    html[data-cms-viewport="mobile"] #marketing > .section-header .section-header__desc, html.cms-bp-mobile #marketing > .section-header .section-header__desc {
        display: none;
    }

    html[data-cms-viewport="mobile"] .marketing-mobile-nav, html.cms-bp-mobile .marketing-mobile-nav,

    html[data-cms-viewport="mobile"] .users-mobile-nav, html.cms-bp-mobile .users-mobile-nav {
        display: block;
        margin-bottom: 0.85rem;
    }

    html[data-cms-viewport="mobile"] .cms-mobile-nav__label, html.cms-bp-mobile .cms-mobile-nav__label {
        font-size: 0.72rem;
        margin-bottom: 0.25rem;
    }

    html[data-cms-viewport="mobile"] .marketing-subtabs, html.cms-bp-mobile .marketing-subtabs {
        display: none;
    }

    html[data-cms-viewport="mobile"] #users > .users-subtabs, html.cms-bp-mobile #users > .users-subtabs {
        display: none;
    }

    html[data-cms-viewport="mobile"] #marketing .section-header.section-header--sub, html.cms-bp-mobile #marketing .section-header.section-header--sub {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #marketing .section-header--sub .section-actions, html.cms-bp-mobile #marketing .section-header--sub .section-actions,

    html[data-cms-viewport="mobile"] #marketing .section-header--sub .section-actions--wrap, html.cms-bp-mobile #marketing .section-header--sub .section-actions--wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #marketing .section-actions .search-box, html.cms-bp-mobile #marketing .section-actions .search-box,

    html[data-cms-viewport="mobile"] #marketing .section-actions .search-box input, html.cms-bp-mobile #marketing .section-actions .search-box input,

    html[data-cms-viewport="mobile"] #marketing .section-actions select, html.cms-bp-mobile #marketing .section-actions select,

    html[data-cms-viewport="mobile"] #marketing .section-actions .btn, html.cms-bp-mobile #marketing .section-actions .btn {
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__header-actions, html.cms-bp-mobile #marketing .mkt-dash__header-actions,

    html[data-cms-viewport="mobile"] #marketing .mkt-tm__header-actions, html.cms-bp-mobile #marketing .mkt-tm__header-actions,

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-period-toggle, html.cms-bp-mobile #marketing .mkt-rpt-period-toggle {
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__header-actions, html.cms-bp-mobile #marketing .mkt-dash__header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: 0.5rem;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-period, html.cms-bp-mobile #marketing .mkt-dash-period,

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-period-toggle, html.cms-bp-mobile #marketing .mkt-rpt-period-toggle {
        display: flex;
        grid-column: 1 / -1;
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__header-actions .btn-primary, html.cms-bp-mobile #marketing .mkt-dash__header-actions .btn-primary {
        grid-column: 1;
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__header-actions .btn-secondary:not(#mkt-dash-refresh-btn), html.cms-bp-mobile #marketing .mkt-dash__header-actions .btn-secondary:not(#mkt-dash-refresh-btn) {
        grid-column: 2;
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing #mkt-dash-refresh-btn, html.cms-bp-mobile #marketing #mkt-dash-refresh-btn {
        grid-column: 3;
        grid-row: 2;
        width: 2.5rem;
        min-width: 2.5rem;
        padding: 0;
        justify-content: center;
        align-self: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__subtitle, html.cms-bp-mobile #marketing .mkt-dash__subtitle {
        display: none;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__title, html.cms-bp-mobile #marketing .mkt-dash__title {
        font-size: 1.05rem;
        margin-bottom: 0;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash__header, html.cms-bp-mobile #marketing .mkt-dash__header {
        gap: 0.65rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-period__btn, html.cms-bp-mobile #marketing .mkt-dash-period__btn,

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-period-toggle .btn, html.cms-bp-mobile #marketing .mkt-rpt-period-toggle .btn {
        flex: 1;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-tm__header-actions, html.cms-bp-mobile #marketing .mkt-tm__header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-tm-updated, html.cms-bp-mobile #marketing .mkt-tm-updated {
        white-space: normal;
        text-align: center;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-tm-footer, html.cms-bp-mobile #marketing .mkt-tm-footer {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-tm-footer .btn, html.cms-bp-mobile #marketing .mkt-tm-footer .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-toolbar, html.cms-bp-mobile #marketing .mkt-cal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-nav, html.cms-bp-mobile #marketing .mkt-cal-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-view-toggle, html.cms-bp-mobile #marketing .mkt-cal-view-toggle {
        justify-content: center;
        flex-wrap: wrap;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-weekdays span, html.cms-bp-mobile #marketing .mkt-cal-weekdays span {
        font-size: 0.62rem;
        padding: 0.2rem 0;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-day, html.cms-bp-mobile #marketing .mkt-cal-day {
        min-height: 3.5rem;
        padding: 0.25rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-day__num, html.cms-bp-mobile #marketing .mkt-cal-day__num {
        font-size: 0.72rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-pill, html.cms-bp-mobile #marketing .mkt-cal-pill {
        font-size: 0.58rem;
        padding: 0.1rem 0.25rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-legend, html.cms-bp-mobile #marketing .mkt-cal-legend {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-week, html.cms-bp-mobile #marketing .mkt-cal-week {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-cal-week-day, html.cms-bp-mobile #marketing .mkt-cal-week-day {
        min-height: auto;
    }

    html[data-cms-viewport="mobile"] #marketing .invitations-kpi-grid, html.cms-bp-mobile #marketing .invitations-kpi-grid,

    html[data-cms-viewport="mobile"] #marketing .list-kpi-grid, html.cms-bp-mobile #marketing .list-kpi-grid,

    html[data-cms-viewport="mobile"] #marketing .reports-kpi-grid, html.cms-bp-mobile #marketing .reports-kpi-grid,

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-kpi-grid, html.cms-bp-mobile #marketing .mkt-rpt-kpi-grid,

    html[data-cms-viewport="mobile"] #marketing .users-kpi-grid, html.cms-bp-mobile #marketing .users-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #marketing .users-kpi-card, html.cms-bp-mobile #marketing .users-kpi-card {
        padding: 0.65rem 0.75rem;
    }

    html[data-cms-viewport="mobile"] #marketing .users-kpi-card__label, html.cms-bp-mobile #marketing .users-kpi-card__label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    html[data-cms-viewport="mobile"] #marketing .users-kpi-card__value, html.cms-bp-mobile #marketing .users-kpi-card__value {
        font-size: 1rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero, html.cms-bp-mobile #marketing .mkt-dash-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero-card, html.cms-bp-mobile #marketing .mkt-dash-hero-card {
        padding: 0.7rem 0.75rem;
        gap: 0.55rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero-card__icon, html.cms-bp-mobile #marketing .mkt-dash-hero-card__icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero-card__label, html.cms-bp-mobile #marketing .mkt-dash-hero-card__label {
        font-size: 0.68rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero-card__value, html.cms-bp-mobile #marketing .mkt-dash-hero-card__value {
        font-size: 0.95rem;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-hero-card__sub, html.cms-bp-mobile #marketing .mkt-dash-hero-card__sub {
        font-size: 0.65rem;
        line-height: 1.3;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-stats, html.cms-bp-mobile #marketing .mkt-dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-modules, html.cms-bp-mobile #marketing .mkt-dash-modules {
        grid-template-columns: 1fr;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-panel__chart, html.cms-bp-mobile #marketing .mkt-dash-panel__chart {
        min-height: 200px;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-panel__chart--tall, html.cms-bp-mobile #marketing .mkt-dash-panel__chart--tall {
        min-height: 240px;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-chart-card canvas, html.cms-bp-mobile #marketing .mkt-rpt-chart-card canvas,

    html[data-cms-viewport="mobile"] #marketing .mkt-dash-panel__chart canvas, html.cms-bp-mobile #marketing .mkt-dash-panel__chart canvas {
        max-height: 220px;
    }

    html[data-cms-viewport="mobile"] #marketing .mkt-rpt-funnel-stats, html.cms-bp-mobile #marketing .mkt-rpt-funnel-stats {
        gap: 0.65rem 1rem;
    }

    html[data-cms-viewport="mobile"] #marketing .users-bulk-bar, html.cms-bp-mobile #marketing .users-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .users-bulk-bar .btn, html.cms-bp-mobile #marketing .users-bulk-bar .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .list-quick-filters, html.cms-bp-mobile #marketing .list-quick-filters {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .list-quick-filters .btn, html.cms-bp-mobile #marketing .list-quick-filters .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .list-pagination, html.cms-bp-mobile #marketing .list-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #marketing .list-pagination .btn, html.cms-bp-mobile #marketing .list-pagination .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .segments-quick-templates, html.cms-bp-mobile #marketing .segments-quick-templates,

    html[data-cms-viewport="mobile"] #marketing .mkt-seg-quick-templates, html.cms-bp-mobile #marketing .mkt-seg-quick-templates {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #marketing .segments-quick-templates .btn, html.cms-bp-mobile #marketing .segments-quick-templates .btn,

    html[data-cms-viewport="mobile"] #marketing .mkt-seg-quick-templates .btn, html.cms-bp-mobile #marketing .mkt-seg-quick-templates .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #marketing .ec-status-legend, html.cms-bp-mobile #marketing .ec-status-legend {
        flex-direction: column;
        align-items: flex-start;
    }

    html[data-cms-viewport="mobile"] #marketing .table-container--users, html.cms-bp-mobile #marketing .table-container--users,

    html[data-cms-viewport="mobile"] #marketing .table-container, html.cms-bp-mobile #marketing .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    html[data-cms-viewport="mobile"] #marketing .data-table--marketing, html.cms-bp-mobile #marketing .data-table--marketing {
        min-width: 720px;
        font-size: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #marketing .data-table--marketing th, html.cms-bp-mobile #marketing .data-table--marketing th,

    html[data-cms-viewport="mobile"] #marketing .data-table--marketing td, html.cms-bp-mobile #marketing .data-table--marketing td {
        padding: 0.4rem 0.45rem;
    }


    html[data-cms-viewport="mobile"] #users > .section-header, html.cms-bp-mobile #users > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #users > .section-header h2, html.cms-bp-mobile #users > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    html[data-cms-viewport="mobile"] #users > .section-header .section-actions, html.cms-bp-mobile #users > .section-header .section-actions {
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #users > .section-header .section-actions .btn, html.cms-bp-mobile #users > .section-header .section-actions .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .section-header.section-header--sub, html.cms-bp-mobile #users .section-header.section-header--sub {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    html[data-cms-viewport="mobile"] #users .section-header--sub .section-hint, html.cms-bp-mobile #users .section-header--sub .section-hint {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0;
    }

    html[data-cms-viewport="mobile"] #users .section-header--sub .section-actions, html.cms-bp-mobile #users .section-header--sub .section-actions,

    html[data-cms-viewport="mobile"] #users .section-header--sub .section-actions--wrap, html.cms-bp-mobile #users .section-header--sub .section-actions--wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .section-header--sub .search-box, html.cms-bp-mobile #users .section-header--sub .search-box,

    html[data-cms-viewport="mobile"] #users .section-header--sub .users-filter-check, html.cms-bp-mobile #users .section-header--sub .users-filter-check,

    html[data-cms-viewport="mobile"] #users .section-header--sub .section-hint, html.cms-bp-mobile #users .section-header--sub .section-hint {
        grid-column: 1 / -1;
    }

    html[data-cms-viewport="mobile"] #users .section-header--sub .search-box, html.cms-bp-mobile #users .section-header--sub .search-box,

    html[data-cms-viewport="mobile"] #users .section-header--sub .search-box input, html.cms-bp-mobile #users .section-header--sub .search-box input,

    html[data-cms-viewport="mobile"] #users .section-header--sub .filter-select, html.cms-bp-mobile #users .section-header--sub .filter-select,

    html[data-cms-viewport="mobile"] #users .section-header--sub .filter-input, html.cms-bp-mobile #users .section-header--sub .filter-input {
        width: 100%;
        min-width: 0;
    }

    html[data-cms-viewport="mobile"] #users .section-header--sub .btn, html.cms-bp-mobile #users .section-header--sub .btn {
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .invitations-kpi-grid, html.cms-bp-mobile #users .invitations-kpi-grid,

    html[data-cms-viewport="mobile"] #users .list-kpi-grid, html.cms-bp-mobile #users .list-kpi-grid,

    html[data-cms-viewport="mobile"] #users .sellers-kpi-grid, html.cms-bp-mobile #users .sellers-kpi-grid,

    html[data-cms-viewport="mobile"] #users .segments-kpi-grid, html.cms-bp-mobile #users .segments-kpi-grid,

    html[data-cms-viewport="mobile"] #users .operations-kpi-grid, html.cms-bp-mobile #users .operations-kpi-grid,

    html[data-cms-viewport="mobile"] #users .reports-kpi-grid, html.cms-bp-mobile #users .reports-kpi-grid,

    html[data-cms-viewport="mobile"] #users .users-kpi-grid, html.cms-bp-mobile #users .users-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #users .users-kpi-card, html.cms-bp-mobile #users .users-kpi-card {
        padding: 0.65rem 0.75rem;
    }

    html[data-cms-viewport="mobile"] #users .users-kpi-card__label, html.cms-bp-mobile #users .users-kpi-card__label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    html[data-cms-viewport="mobile"] #users .users-kpi-card__value, html.cms-bp-mobile #users .users-kpi-card__value {
        font-size: 1rem;
    }

    html[data-cms-viewport="mobile"] #users .users-kpi-card__value--sm, html.cms-bp-mobile #users .users-kpi-card__value--sm {
        font-size: 0.85rem;
    }

    html[data-cms-viewport="mobile"] #users .users-alerts-bar, html.cms-bp-mobile #users .users-alerts-bar {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .list-quick-filters, html.cms-bp-mobile #users .list-quick-filters {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .list-quick-filters .btn, html.cms-bp-mobile #users .list-quick-filters .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .users-bulk-bar, html.cms-bp-mobile #users .users-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .users-bulk-bar .btn, html.cms-bp-mobile #users .users-bulk-bar .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .segments-quick-templates, html.cms-bp-mobile #users .segments-quick-templates {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .segments-quick-templates .btn, html.cms-bp-mobile #users .segments-quick-templates .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .operations-grid, html.cms-bp-mobile #users .operations-grid {
        grid-template-columns: 1fr;
    }

    html[data-cms-viewport="mobile"] #users .operations-card__actions, html.cms-bp-mobile #users .operations-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #users .operations-card__actions .btn, html.cms-bp-mobile #users .operations-card__actions .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .operations-form-row, html.cms-bp-mobile #users .operations-form-row {
        flex-direction: column;
    }

    html[data-cms-viewport="mobile"] #users .reports-charts-grid, html.cms-bp-mobile #users .reports-charts-grid,

    html[data-cms-viewport="mobile"] #users .reports-panels-grid, html.cms-bp-mobile #users .reports-panels-grid,

    html[data-cms-viewport="mobile"] #users .users-reports-grid, html.cms-bp-mobile #users .users-reports-grid {
        grid-template-columns: 1fr;
    }

    html[data-cms-viewport="mobile"] #users .users-report-card--chart .users-chart-wrap, html.cms-bp-mobile #users .users-report-card--chart .users-chart-wrap {
        height: 180px;
    }

    html[data-cms-viewport="mobile"] #users .invitations-section-split, html.cms-bp-mobile #users .invitations-section-split {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    html[data-cms-viewport="mobile"] #users .table-container--users, html.cms-bp-mobile #users .table-container--users,

    html[data-cms-viewport="mobile"] #users .table-container, html.cms-bp-mobile #users .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    html[data-cms-viewport="mobile"] #users .data-table--users, html.cms-bp-mobile #users .data-table--users {
        min-width: 900px;
        font-size: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #users .data-table:not(.data-table--users), html.cms-bp-mobile #users .data-table:not(.data-table--users) {
        min-width: 640px;
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #users .pagination, html.cms-bp-mobile #users .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #users .pagination-controls, html.cms-bp-mobile #users .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    html[data-cms-viewport="mobile"] .user-detail-drawer__panel, html.cms-bp-mobile .user-detail-drawer__panel {
        width: 100vw;
        max-width: 100vw;
    }

    html[data-cms-viewport="mobile"] .user-detail-tabs, html.cms-bp-mobile .user-detail-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
    }

    html[data-cms-viewport="mobile"] .user-detail-tab, html.cms-bp-mobile .user-detail-tab {
        flex-shrink: 0;
    }

    html[data-cms-viewport="mobile"] .user-detail-drawer__footer, html.cms-bp-mobile .user-detail-drawer__footer {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] .user-detail-drawer__footer .btn, html.cms-bp-mobile .user-detail-drawer__footer .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] .user-detail-actions, html.cms-bp-mobile .user-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] .user-detail-actions .btn, html.cms-bp-mobile .user-detail-actions .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #users .users-merge-wizard, html.cms-bp-mobile #users .users-merge-wizard {
        flex-direction: column;
        align-items: stretch;
    }


    html[data-cms-viewport="mobile"] #activity-logs .section-header--logs, html.cms-bp-mobile #activity-logs .section-header--logs {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .section-header__desc, html.cms-bp-mobile #activity-logs .section-header__desc {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-export-actions, html.cms-bp-mobile #activity-logs .logs-export-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-export-actions .btn, html.cms-bp-mobile #activity-logs .logs-export-actions .btn {
        width: 100%;
        min-width: 0;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-chart-wrap, html.cms-bp-mobile #activity-logs .logs-chart-wrap {
        padding: 0.85rem 1rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-chart-desc, html.cms-bp-mobile #activity-logs .logs-chart-desc {
        display: none;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-chart-canvas-wrap, html.cms-bp-mobile #activity-logs .logs-chart-canvas-wrap {
        height: 160px;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-stats-grid, html.cms-bp-mobile #activity-logs .logs-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .analytics-stat-card, html.cms-bp-mobile #activity-logs .analytics-stat-card {
        padding: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .analytics-stat-icon, html.cms-bp-mobile #activity-logs .analytics-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .analytics-stat-content h3, html.cms-bp-mobile #activity-logs .analytics-stat-content h3 {
        font-size: 1.1rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .analytics-stat-content p, html.cms-bp-mobile #activity-logs .analytics-stat-content p {
        font-size: 0.72rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-sort-bar, html.cms-bp-mobile #activity-logs .logs-sort-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        margin-bottom: 0.65rem;
        scrollbar-width: thin;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-sort-bar .logs-chip, html.cms-bp-mobile #activity-logs .logs-sort-bar .logs-chip,

    html[data-cms-viewport="mobile"] #activity-logs .logs-sort-label, html.cms-bp-mobile #activity-logs .logs-sort-label,

    html[data-cms-viewport="mobile"] #activity-logs .logs-sort-current, html.cms-bp-mobile #activity-logs .logs-sort-current {
        flex-shrink: 0;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-preset-bar, html.cms-bp-mobile #activity-logs .logs-preset-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-preset-bar .filter-select, html.cms-bp-mobile #activity-logs .logs-preset-bar .filter-select,

    html[data-cms-viewport="mobile"] #activity-logs .logs-preset-bar .btn, html.cms-bp-mobile #activity-logs .logs-preset-bar .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-active-filter, html.cms-bp-mobile #activity-logs .logs-active-filter {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-quick-filters, html.cms-bp-mobile #activity-logs .logs-quick-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-quick-filters .logs-chip, html.cms-bp-mobile #activity-logs .logs-quick-filters .logs-chip {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar, html.cms-bp-mobile #activity-logs .logs-toolbar {
        padding: 0.85rem;
        gap: 0.65rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-search, html.cms-bp-mobile #activity-logs .logs-search {
        min-width: 0;
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__filters, html.cms-bp-mobile #activity-logs .logs-toolbar__filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__filters .filter-select, html.cms-bp-mobile #activity-logs .logs-toolbar__filters .filter-select,

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__filters .date-filter, html.cms-bp-mobile #activity-logs .logs-toolbar__filters .date-filter,

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__filters .btn, html.cms-bp-mobile #activity-logs .logs-toolbar__filters .btn {
        width: 100%;
        min-width: 0;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__footer, html.cms-bp-mobile #activity-logs .logs-toolbar__footer {
        justify-content: stretch;
        text-align: center;
    }

    html[data-cms-viewport="mobile"] #activity-logs .logs-toolbar__count, html.cms-bp-mobile #activity-logs .logs-toolbar__count {
        width: 100%;
        text-align: center;
        line-height: 1.4;
    }

    html[data-cms-viewport="tablet"] .log-entry, html.cms-bp-tablet .log-entry {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon body"
            "actions actions";
    }

    html[data-cms-viewport="tablet"] .log-entry__icon, html.cms-bp-tablet .log-entry__icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    html[data-cms-viewport="tablet"] .log-entry__actions, html.cms-bp-tablet .log-entry__actions {
        justify-content: flex-start;
        padding-left: calc(34px + 0.75rem);
    }

    html[data-cms-viewport="tablet"] .log-entry__header, html.cms-bp-tablet .log-entry__header {
        flex-wrap: wrap;
        gap: 0.4rem 0.65rem;
    }

    html[data-cms-viewport="tablet"] .log-entry__time, html.cms-bp-tablet .log-entry__time {
        margin-left: 0;
    }

    html[data-cms-viewport="tablet"] #activity-logs .log-entry, html.cms-bp-tablet #activity-logs .log-entry,
    html[data-cms-viewport="mobile"] #activity-logs .log-entry, html.cms-bp-mobile #activity-logs .log-entry {
        gap: 0.65rem 0.75rem;
        padding: 0.85rem 1rem;
    }

    html[data-cms-viewport="tablet"] #activity-logs .log-entry__header, html.cms-bp-tablet #activity-logs .log-entry__header,
    html[data-cms-viewport="mobile"] #activity-logs .log-entry__header, html.cms-bp-mobile #activity-logs .log-entry__header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 0.65rem;
        margin-bottom: 0.2rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .log-entry__time, html.cms-bp-mobile #activity-logs .log-entry__time {
        margin-left: 0;
        width: auto;
        font-size: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .log-entry__message, html.cms-bp-mobile #activity-logs .log-entry__message {
        font-size: 0.88rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .log-entry__actions, html.cms-bp-mobile #activity-logs .log-entry__actions {
        padding-left: 0;
    }

    html[data-cms-viewport="tablet"] #activity-logs .log-entry__ticket-btn, html.cms-bp-tablet #activity-logs .log-entry__ticket-btn,
    html[data-cms-viewport="mobile"] #activity-logs .log-entry__ticket-btn, html.cms-bp-mobile #activity-logs .log-entry__ticket-btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #activity-logs .pagination, html.cms-bp-mobile #activity-logs .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #activity-logs .pagination-controls, html.cms-bp-mobile #activity-logs .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    html[data-cms-viewport="mobile"] .log-details-row, html.cms-bp-mobile .log-details-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.5rem 0;
    }

    html[data-cms-viewport="mobile"] .log-details-label, html.cms-bp-mobile .log-details-label {
        font-size: 0.72rem;
    }

    html[data-cms-viewport="mobile"] .log-details-value, html.cms-bp-mobile .log-details-value {
        font-size: 0.88rem;
    }

    html[data-cms-viewport="mobile"] .log-details-message, html.cms-bp-mobile .log-details-message {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    html[data-cms-viewport="mobile"] .log-details-actions__buttons, html.cms-bp-mobile .log-details-actions__buttons {
        grid-template-columns: 1fr;
    }

    html[data-cms-viewport="mobile"] .log-details-actions__buttons .btn, html.cms-bp-mobile .log-details-actions__buttons .btn {
        width: 100%;
        justify-content: center;
    }


    html[data-cms-viewport="mobile"] #databases > .section-header, html.cms-bp-mobile #databases > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #databases > .section-header h2, html.cms-bp-mobile #databases > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    html[data-cms-viewport="mobile"] #databases .section-subtitle, html.cms-bp-mobile #databases .section-subtitle {
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-toolbar, html.cms-bp-mobile #databases .db-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-toolbar .btn, html.cms-bp-mobile #databases .db-toolbar .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-maintenance-banner, html.cms-bp-mobile #databases .db-maintenance-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-legend__grid, html.cms-bp-mobile #databases .db-legend__grid {
        grid-template-columns: 1fr;
    }

    html[data-cms-viewport="mobile"] #databases .db-summary-grid, html.cms-bp-mobile #databases .db-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-summary-card, html.cms-bp-mobile #databases .db-summary-card {
        padding: 0.85rem 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-summary-icon, html.cms-bp-mobile #databases .db-summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-summary-content h3, html.cms-bp-mobile #databases .db-summary-content h3 {
        font-size: 1.2rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-panel, html.cms-bp-mobile #databases .db-panel {
        padding: 0.85rem 1rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-panel__header--row, html.cms-bp-mobile #databases .db-panel__header--row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-panel__header--row .btn, html.cms-bp-mobile #databases .db-panel__header--row .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #databases .db-panel__desc, html.cms-bp-mobile #databases .db-panel__desc {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    html[data-cms-viewport="mobile"] #databases .db-stats-grid, html.cms-bp-mobile #databases .db-stats-grid,

    html[data-cms-viewport="mobile"] #databases .db-server-grid, html.cms-bp-mobile #databases .db-server-grid,

    html[data-cms-viewport="mobile"] #databases .db-availability-stats, html.cms-bp-mobile #databases .db-availability-stats,

    html[data-cms-viewport="mobile"] #databases .db-meta-grid, html.cms-bp-mobile #databases .db-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-stat-card, html.cms-bp-mobile #databases .db-stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-stat-card__content h4, html.cms-bp-mobile #databases .db-stat-card__content h4 {
        font-size: 0.95rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-services-grid, html.cms-bp-mobile #databases .db-services-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-service-card, html.cms-bp-mobile #databases .db-service-card {
        padding: 0.85rem 1rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-service-card:hover, html.cms-bp-mobile #databases .db-service-card:hover {
        transform: none;
    }

    html[data-cms-viewport="mobile"] #databases .db-period-tabs, html.cms-bp-mobile #databases .db-period-tabs {
        width: 100%;
        display: flex;
    }

    html[data-cms-viewport="mobile"] #databases .db-period-tab, html.cms-bp-mobile #databases .db-period-tab {
        flex: 1;
        text-align: center;
        padding: 0.45rem 0.35rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-chart-tabs, html.cms-bp-mobile #databases .db-chart-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    html[data-cms-viewport="mobile"] #databases .db-chart-tab, html.cms-bp-mobile #databases .db-chart-tab {
        flex-shrink: 0;
    }

    html[data-cms-viewport="mobile"] #databases .db-panel--chart .db-chart-wrap, html.cms-bp-mobile #databases .db-panel--chart .db-chart-wrap {
        height: 200px;
    }

    html[data-cms-viewport="mobile"] #databases .db-insights-grid, html.cms-bp-mobile #databases .db-insights-grid,

    html[data-cms-viewport="mobile"] #databases .db-settings-grid, html.cms-bp-mobile #databases .db-settings-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-settings-actions, html.cms-bp-mobile #databases .db-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #databases .db-settings-actions .btn, html.cms-bp-mobile #databases .db-settings-actions .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #databases .db-settings-row, html.cms-bp-mobile #databases .db-settings-row {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #databases .db-settings-row input[type="number"], html.cms-bp-mobile #databases .db-settings-row input[type="number"] {
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #databases .db-compare-toolbar, html.cms-bp-mobile #databases .db-compare-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #databases .db-compare-toolbar label, html.cms-bp-mobile #databases .db-compare-toolbar label,

    html[data-cms-viewport="mobile"] #databases .db-compare-select, html.cms-bp-mobile #databases .db-compare-select {
        width: 100%;
        min-width: 0;
    }

    html[data-cms-viewport="mobile"] #databases .db-compare-toolbar .btn, html.cms-bp-mobile #databases .db-compare-toolbar .btn {
        width: 100%;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #databases .db-compare-summary, html.cms-bp-mobile #databases .db-compare-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-cms-viewport="mobile"] #databases .db-incident, html.cms-bp-mobile #databases .db-incident {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    html[data-cms-viewport="mobile"] #databases .db-forum-grid, html.cms-bp-mobile #databases .db-forum-grid {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] #databases .db-forum-chip, html.cms-bp-mobile #databases .db-forum-chip {
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #databases .db-insights-body, html.cms-bp-mobile #databases .db-insights-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    html[data-cms-viewport="mobile"] #databases .table-container, html.cms-bp-mobile #databases .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    html[data-cms-viewport="mobile"] #databases .data-table, html.cms-bp-mobile #databases .data-table {
        min-width: 640px;
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #databases .data-table th, html.cms-bp-mobile #databases .data-table th,

    html[data-cms-viewport="mobile"] #databases .data-table td, html.cms-bp-mobile #databases .data-table td {
        padding: 0.45rem 0.5rem;
    }

    html[data-cms-viewport="mobile"] .db-detail-list > div, html.cms-bp-mobile .db-detail-list > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    html[data-cms-viewport="mobile"] .db-backup-details__actions, html.cms-bp-mobile .db-backup-details__actions {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-cms-viewport="mobile"] .db-backup-details__actions .btn, html.cms-bp-mobile .db-backup-details__actions .btn {
        width: 100%;
        justify-content: center;
    }


    html[data-cms-viewport="mobile"] #cms-operators > .section-header, html.cms-bp-mobile #cms-operators > .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    html[data-cms-viewport="mobile"] #cms-operators > .section-header h2, html.cms-bp-mobile #cms-operators > .section-header h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    html[data-cms-viewport="mobile"] #cms-operators .section-subtitle, html.cms-bp-mobile #cms-operators .section-subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    html[data-cms-viewport="mobile"] #cms-operators .db-toolbar, html.cms-bp-mobile #cms-operators .db-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    html[data-cms-viewport="mobile"] #cms-operators .db-toolbar .btn, html.cms-bp-mobile #cms-operators .db-toolbar .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
    }

    html[data-cms-viewport="mobile"] #cms-operators .table-container, html.cms-bp-mobile #cms-operators .table-container {
        margin-left: calc(-1 * var(--main-gutter, 1rem));
        margin-right: calc(-1 * var(--main-gutter, 1rem));
        padding-left: var(--main-gutter, 1rem);
        padding-right: var(--main-gutter, 1rem);
        width: calc(100% + 2 * var(--main-gutter, 1rem));
    }

    html[data-cms-viewport="mobile"] #cms-operators .data-table, html.cms-bp-mobile #cms-operators .data-table {
        min-width: 820px;
        font-size: 0.8rem;
    }

    html[data-cms-viewport="mobile"] #cms-operators .data-table th, html.cms-bp-mobile #cms-operators .data-table th,

    html[data-cms-viewport="mobile"] #cms-operators .data-table td, html.cms-bp-mobile #cms-operators .data-table td {
        padding: 0.45rem 0.5rem;
    }

    html[data-cms-viewport="mobile"] #cms-operators .cms-op-role, html.cms-bp-mobile #cms-operators .cms-op-role {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    html[data-cms-viewport="mobile"] #cms-operators .cms-operators-actions, html.cms-bp-mobile #cms-operators .cms-operators-actions {
        white-space: nowrap;
    }
}

/* Dokumentacja CMS */
.section-header--docs {
    margin-bottom: 1rem;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100vh - 200px);
}

.docs-nav {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 10px;
    overflow: hidden;
}

.docs-nav__header {
    padding: 0.9rem 0.9rem 0.75rem;
    border-bottom: 1px solid #3c434a;
    background: #23282d;
}

.docs-nav__title {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a7aaad;
}

.docs-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #1d2327;
    color: #a7aaad;
}

.docs-search:focus-within {
    border-color: #dc143c;
    box-shadow: 0 0 0 1px rgba(220, 20, 60, 0.25);
}

.docs-search__input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #f0f0f1;
    font-size: 0.84rem;
    outline: none;
}

.docs-search__input::placeholder {
    color: #72777c;
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.docs-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #f0f0f1;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.docs-item:hover {
    background: #2a3036;
    border-color: #3c434a;
}

.docs-item--active {
    border-color: rgba(220, 20, 60, 0.55);
    background: rgba(220, 20, 60, 0.1);
}

.docs-item__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(220, 20, 60, 0.14);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.docs-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.docs-item__title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.docs-item__desc {
    font-size: 0.76rem;
    color: #a7aaad;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.docs-empty {
    margin: 0;
    padding: 0.5rem 0.25rem;
    font-size: 0.84rem;
    color: #a7aaad;
    line-height: 1.45;
}

.docs-workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background: #23282d;
    border: 1px solid #3c434a;
    border-radius: 10px;
    overflow: hidden;
}

.docs-viewer__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #3c434a;
    background: linear-gradient(180deg, #1d2327 0%, #23282d 100%);
}

.docs-viewer__toolbar-main {
    min-width: 0;
    flex: 1 1 220px;
}

.docs-viewer__title {
    margin: 0;
    font-size: 1.05rem;
    color: #f0f0f1;
    line-height: 1.3;
}

.docs-viewer__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #a7aaad;
    line-height: 1.4;
}

.docs-viewer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.docs-workspace__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    min-height: 0;
    flex: 1;
}

.docs-workspace__body--no-toc {
    grid-template-columns: minmax(0, 1fr);
}

.docs-reader-wrap {
    position: relative;
    min-height: 0;
    min-width: 0;
    background: #e8eaed;
}

.docs-viewer__empty {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: #5c636a;
    background: #f4f5f7;
}

.docs-viewer__empty[hidden],
.docs-viewer__frame[hidden],
.docs-toc[hidden] {
    display: none !important;
}

.docs-viewer__empty-icon {
    font-size: 2.2rem;
    color: #dc143c;
    opacity: 0.8;
}

.docs-viewer__empty h3 {
    margin: 0;
    color: #1d2327;
}

.docs-viewer__empty p {
    margin: 0;
    max-width: 28rem;
    line-height: 1.55;
    font-size: 0.92rem;
}

.docs-viewer__frame {
    display: block;
    width: 100%;
    height: calc(100vh - 260px);
    min-height: 520px;
    border: 0;
    background: #fff;
}

.docs-toc {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid #3c434a;
    background: #1d2327;
}

.docs-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #3c434a;
}

.docs-toc__title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a7aaad;
}

.docs-toc__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #a7aaad;
    cursor: pointer;
}

.docs-toc__close:hover {
    background: #2a3036;
    color: #f0f0f1;
}

.docs-toc__nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
}

.docs-toc__link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #c3c4c7;
    font-size: 0.8rem;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.docs-toc__link:hover {
    background: #2a3036;
    color: #f0f0f1;
}

.docs-toc__link--active {
    background: rgba(220, 20, 60, 0.14);
    color: #fda4af;
}

.docs-toc__link--sub {
    padding-left: 1.1rem;
    font-size: 0.76rem;
    color: #a7aaad;
}

.docs-toc__empty {
    margin: 0;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #72777c;
    line-height: 1.4;
}

#docs-download-pdf[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 1200px) {
    .docs-workspace__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .docs-toc {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1200;
        width: min(320px, 92vw);
        height: 100vh;
        border-left: 1px solid #3c434a;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
        transform: translateX(100%);
        transition: transform 0.2s ease;
    }

    .docs-toc.docs-toc--open {
        transform: translateX(0);
    }

    .docs-toc__close {
        display: inline-flex;
    }

    .docs-toc-toggle {
        display: inline-flex;
    }
}

@media (min-width: 1201px) {
    .docs-toc-toggle {
        display: none;
    }
}

@media (max-width: 992px) {
    .docs-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .docs-list {
        max-height: 220px;
    }

    .docs-viewer__frame {
        min-height: 55vh;
        height: 55vh;
    }
}

@media (max-width: 768px) {
    html[data-cms-viewport="mobile"] #documentation .docs-layout,
    html.cms-bp-mobile #documentation .docs-layout {
        gap: 0.75rem;
    }

    html[data-cms-viewport="mobile"] #documentation .docs-viewer__actions,
    html.cms-bp-mobile #documentation .docs-viewer__actions {
        width: 100%;
    }

    html[data-cms-viewport="mobile"] #documentation .docs-viewer__actions .btn,
    html.cms-bp-mobile #documentation .docs-viewer__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    html[data-cms-viewport="mobile"] #documentation .docs-viewer__frame,
    html.cms-bp-mobile #documentation .docs-viewer__frame {
        min-height: 50vh;
        height: 50vh;
    }
}

/* ── Kursy (CMS) ── */
#courses.content-section.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 4rem);
    min-height: 480px;
    overflow: hidden;
}

#courses .courses-controls {
    flex-shrink: 0;
}

#courses .courses-top-bar {
    margin-bottom: 0.35rem;
    align-items: center;
    gap: 0.5rem;
}

#courses .courses-top-bar__title {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}

#courses .courses-top-bar__title h2 {
    margin: 0;
    font-size: 1.05rem;
}

.courses-header-hint {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-muted, #a7aaad);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#courses .courses-kpi-grid {
    margin-bottom: 0.55rem;
}

#courses .courses-toolbar {
    margin-bottom: 0.55rem;
}

#courses .courses-toolbar__main {
    flex-wrap: wrap;
    gap: 0.45rem;
}

#courses .courses-search {
    flex: 1 1 200px;
    min-width: 140px;
}

.courses-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #3c434a;
    border-radius: 10px;
    overflow: hidden;
    background: #23282d;
}

.courses-list-pane,
.courses-detail-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.courses-list-pane {
    border-right: 1px solid #3c434a;
    background: #1d2327;
}

.courses-list-pane__head,
.courses-detail-pane__head {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a7aaad;
    border-bottom: 1px solid #3c434a;
    background: #1a1f23;
}

.courses-list-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.45rem;
}

.courses-list-pane__foot {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    border-top: 1px solid #3c434a;
}

.courses-list-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-left: 3px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
    color: #f0f0f1;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.courses-list-item:hover {
    border-color: #50575e;
    background: #2c3338;
}

.courses-list-item--selected {
    border-left-color: #DC143C;
    background: rgba(220, 20, 60, 0.08);
}

.courses-list-item__thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1f23;
}

.courses-list-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.courses-list-item__main {
    flex: 1 1 auto;
    min-width: 0;
}

.courses-list-item__title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.courses-list-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #a7aaad;
    margin-top: 0.15rem;
}

.courses-list-item__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.courses-badge {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    background: #3c434a;
    color: #dcdcde;
}

.courses-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
}

.courses-detail-empty,
.courses-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 180px;
    color: #a7aaad;
    text-align: center;
    padding: 1.5rem;
}

.courses-empty--error {
    color: #f87171;
}

.courses-detail__head {
    margin-bottom: 0.65rem;
}

.courses-detail__head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.courses-detail__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.courses-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex-shrink: 0;
}

.courses-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.courses-detail__hero {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.courses-detail__image {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    background: #1a1f23;
}

.courses-detail__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.courses-detail__stats div {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
}

.courses-detail__stats span {
    display: block;
    font-size: 0.68rem;
    color: #a7aaad;
}

.courses-detail__stats strong {
    font-size: 0.9rem;
}

.courses-props {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.courses-prop {
    background: #1d2327;
    border: 1px solid #3c434a;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
}

.courses-prop dt {
    font-size: 0.68rem;
    color: #a7aaad;
    margin-bottom: 0.15rem;
}

.courses-prop dd {
    margin: 0;
    font-size: 0.8rem;
}

.courses-detail__section h4 {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    color: #a7aaad;
}

.courses-detail__description {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #dcdcde;
}

.courses-back-list-btn {
    display: none;
}

.users-kpi-card--active {
    outline: 2px solid #DC143C;
    outline-offset: -2px;
}

.form-row {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.form-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-group--checkbox {
    margin-bottom: 0.75rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 1200px) {
    #courses .courses-header-hint {
        display: none;
    }

    #courses .courses-top-bar__actions .courses-btn-label {
        display: none;
    }

    .courses-workspace {
        grid-template-columns: 1fr;
    }

    .courses-workspace--detail-focus .courses-list-pane {
        display: none;
    }

    .courses-workspace--detail-focus .courses-back-list-btn {
        display: inline-flex;
    }

    .courses-list-pane {
        max-height: min(32vh, 280px);
        border-right: none;
        border-bottom: 1px solid #3c434a;
    }

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

    .courses-detail__hero {
        grid-template-columns: 1fr;
    }

    .courses-detail__image {
        width: 100%;
        height: 120px;
    }
}

/* ── Produkty (zakładka CMS) ── */
#products.content-section.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--demo-banner-height) - var(--header-height) - 4rem);
    min-height: 480px;
    overflow: hidden;
}

#products .products-controls {
    flex-shrink: 0;
}

#products .products-top-bar {
    margin-bottom: 0.35rem;
    align-items: center;
    gap: 0.5rem;
}

#products .products-top-bar__title {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}

#products .products-top-bar__title h2 {
    margin: 0;
    font-size: 1.05rem;
}

.products-header-hint {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-muted, #a7aaad);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#products .products-type-tabs {
    margin-bottom: 0.55rem;
}

#products .products-kpi-grid {
    margin-bottom: 0.55rem;
}

#products .products-toolbar {
    margin-bottom: 0.55rem;
}

#products .products-toolbar__main {
    flex-wrap: wrap;
    gap: 0.45rem;
}

#products .products-search {
    flex: 1 1 200px;
    min-width: 140px;
}

.products-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.55rem;
    border: 1px solid #2271b1;
    border-radius: 8px;
    background: rgba(34, 113, 177, 0.12);
    font-size: 0.82rem;
}

.products-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#products .products-panel[hidden],
#products[data-products-view="catalog"] #products-panel-listings,
#products[data-products-view="listings"] #products-panel-catalog {
    display: none !important;
}

#products[data-products-view="listings"] #products-kpi-wrap,
#products[data-products-view="listings"] #products-toolbar,
#products[data-products-view="listings"] #products-bulk-bar,
#products[data-products-view="listings"] #products-export-csv-btn,
#products[data-products-view="listings"] #products-export-json-btn {
    display: none !important;
}

#products[data-products-view="catalog"] #listings-controls,
#products #listings-controls[hidden],
#products .listings-bulk-bar[hidden],
#products .products-bulk-bar[hidden] {
    display: none !important;
}

#products .listings-controls {
    flex-shrink: 0;
}

#products .listings-kpi-grid {
    margin-bottom: 0.55rem;
}

#products .listings-toolbar {
    margin-bottom: 0.55rem;
}

#products .listings-toolbar__main {
    flex-wrap: wrap;
    gap: 0.45rem;
}

#products .listings-search {
    flex: 1 1 200px;
    min-width: 140px;
}

.products-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #3c434a;
    border-radius: 10px;
    background: #23282d;
    overflow: auto;
}

.products-table-foot {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    border-top: 1px solid #3c434a;
}

.data-table--products {
    width: 100%;
}

.data-table--products .products-col-check {
    width: 36px;
    text-align: center;
}

.data-table--products .products-col-thumb {
    width: 48px;
}

.data-table--products .products-col-thumb img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.data-table--products .products-col-actions {
    width: 88px;
    white-space: nowrap;
}

.products-row--selected {
    background: rgba(34, 113, 177, 0.12);
}

.products-row-title {
    background: none;
    border: none;
    color: #72aee6;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    text-align: left;
}

.products-row-title:hover {
    text-decoration: underline;
}

.products-row-meta {
    font-size: 0.72rem;
    color: #a7aaad;
    margin-top: 0.15rem;
}

.products-type-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #3c434a;
    color: #f0f0f1;
}

.products-type-badge--video { background: #1d4ed8; }
.products-type-badge--ebook { background: #047857; }
.products-type-badge--podcast { background: #7c3aed; }

.products-empty,
.products-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 2.5rem 1rem;
    color: #a7aaad;
    text-align: center;
    min-height: 200px;
}

.products-empty-state i,
.products-empty i {
    font-size: 2rem;
    opacity: 0.55;
}

.products-empty--error {
    color: #f87171;
}

.products-editor-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
}

.products-editor-drawer--open {
    pointer-events: auto;
}

.products-editor-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.products-editor-drawer--open .products-editor-drawer__backdrop {
    opacity: 1;
}

.products-editor-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(680px, 100vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1d2327;
    border-left: 1px solid #3c434a;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}

.products-editor-drawer--open .products-editor-drawer__panel {
    transform: translateX(0);
}

.products-editor-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid #3c434a;
}

.products-editor-drawer__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.products-editor-drawer__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: #a7aaad;
}

.products-editor-drawer__close {
    background: none;
    border: none;
    color: #a7aaad;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.products-editor-tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #3c434a;
}

.products-editor-tab {
    background: #23282d;
    border: 1px solid #3c434a;
    color: #c3c4c7;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    font-size: 0.82rem;
}

.products-editor-tab--active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.products-editor-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.1rem;
}

.products-editor-drawer__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #3c434a;
}

.products-detail__hero {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.products-detail__image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.products-detail__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    font-size: 0.82rem;
}

.products-detail__stats span {
    display: block;
    color: #a7aaad;
    font-size: 0.72rem;
}

.products-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.products-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #3c434a;
}

.products-props {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 1rem;
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
}

.products-prop dt {
    color: #a7aaad;
    font-size: 0.72rem;
}

.products-prop dd {
    margin: 0.15rem 0 0;
}

.products-detail__section h4 {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
}

.products-detail__description {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #dcdcde;
}

.products-drawer-form .form-group {
    margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
    #products .products-toolbar__main {
        flex-direction: column;
        align-items: stretch;
    }

    .products-detail__hero {
        grid-template-columns: 1fr;
    }

    .products-props {
        grid-template-columns: 1fr;
    }

    .products-preview__hero {
        grid-template-columns: 1fr;
    }

    .products-preview__stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .products-editor-drawer__panel {
        width: 100vw;
    }
}

.products-preview-drawer .products-editor-drawer__panel {
    width: min(760px, 100vw);
}

.products-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.products-preview-seller {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
    font-size: 0.82rem;
    color: #c3c4c7;
}

.products-preview-seller i {
    color: #72aee6;
}

.products-preview__hero {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #3c434a;
    border-radius: 10px;
    background: linear-gradient(135deg, #23282d 0%, #1d2327 100%);
}

.products-preview__cover {
    position: relative;
}

.products-preview__image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #3c434a;
}

.products-preview__type {
    position: absolute;
    left: 0.45rem;
    bottom: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    font-size: 0.72rem;
    color: #f0f0f1;
}

.products-preview__intro {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.products-preview__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.products-preview__stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.products-preview__stat {
    padding: 0.55rem 0.65rem;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #1d2327;
    font-size: 0.82rem;
}

.products-preview__stat span {
    display: block;
    color: #a7aaad;
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
}

.products-preview__stat strong {
    display: block;
    color: #f0f0f1;
    font-size: 0.95rem;
}

.products-preview__stat small {
    display: block;
    margin-top: 0.1rem;
    color: #72777c;
    font-size: 0.68rem;
}

.products-preview__section {
    padding-top: 0.25rem;
    border-top: 1px solid #3c434a;
}

.products-preview__section--meta {
    padding-top: 0.75rem;
}

.products-preview__section-title {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #f0f0f1;
}

.products-preview__description {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #dcdcde;
}

.products-props--preview {
    margin: 0;
}

.products-prop__mono {
    word-break: break-all;
    font-size: 0.78rem;
}

.listings-table__thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.listings-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.55rem;
    border: 1px solid #2271b1;
    border-radius: 8px;
    background: rgba(34, 113, 177, 0.12);
    font-size: 0.82rem;
}

.listings-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.55rem;
}

.listings-gallery__item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3c434a;
    aspect-ratio: 4/3;
}

.listings-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listings-gallery__item--cover {
    border-color: #72aee6;
}

.listings-gallery__cover-badge {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.listings-gallery-empty {
    font-size: 0.82rem;
    color: #a7aaad;
    padding: 0.75rem;
    border: 1px dashed #3c434a;
    border-radius: 8px;
}

.listings-preview__section {
    margin-bottom: 1rem;
}

.listings-preview__section h4 {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
}

.listings-preview__description {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #dcdcde;
}

.listings-preview__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.listings-preview__mod-note {
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: rgba(219, 166, 23, 0.12);
    border: 1px solid #dba617;
    font-size: 0.82rem;
    color: #f0f0f1;
}

.listings-gallery-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.listings-gallery-editor {
    margin-top: 0.25rem;
}

.status-badge.status-warn {
    background: rgba(219, 166, 23, 0.2);
    color: #dba617;
}

.products-edit-drawer {
    z-index: 1210;
}

.products-confirm {
    position: fixed;
    inset: 0;
    z-index: 2500;
    pointer-events: none;
}

.products-confirm--open {
    pointer-events: auto;
}

.products-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.products-confirm--open .products-confirm__backdrop {
    opacity: 1;
}

.products-confirm__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(420px, calc(100vw - 2rem));
    padding: 1.25rem;
    border: 1px solid #3c434a;
    border-radius: 10px;
    background: #1d2327;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.products-confirm--open .products-confirm__panel {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.products-confirm__panel h4 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.products-confirm__panel p {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #c3c4c7;
    line-height: 1.45;
}

.products-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.products-program-editor__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.products-program-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #a7aaad;
}

.products-program-stats strong {
    color: #f0f0f1;
}

.products-program-module,
.products-program-lesson {
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.products-program-module__head,
.products-program-lesson__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.products-program-module__actions,
.products-program-lesson__actions {
    display: flex;
    gap: 0.25rem;
}

.products-program-lessons {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #3c434a;
}

.products-program-lessons__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    color: #a7aaad;
}

.products-program-lesson {
    background: #1d2327;
}

.products-program-lesson__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.products-program-empty,
.products-content-hint {
    font-size: 0.82rem;
    color: #a7aaad;
    margin-bottom: 0.75rem;
}

.products-program-empty {
    padding: 1rem;
    border: 1px dashed #3c434a;
    border-radius: 8px;
    text-align: center;
}

.products-seller-warning {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dba617;
    border-radius: 8px;
    background: rgba(219, 166, 23, 0.12);
    color: #f0f0f1;
}

.products-seller-warning i {
    color: #dba617;
    margin-top: 0.15rem;
}

.products-seller-warning p {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: #c3c4c7;
}

.products-edit-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #3c434a;
}

.products-edit-section__title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #f0f0f1;
}

.products-edit-section--program {
    margin-top: 0.5rem;
}

.products-program-preview-module {
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    border: 1px solid #3c434a;
    border-radius: 8px;
    background: #23282d;
}

.products-program-preview-module__title {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.products-program-preview-module__desc {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: #a7aaad;
}

.products-program-preview-lessons {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.82rem;
}

.products-program-preview-lessons li {
    margin-bottom: 0.35rem;
}

.products-program-preview-lessons__title {
    color: #f0f0f1;
}

.products-program-preview-lessons__meta {
    display: block;
    color: #a7aaad;
    font-size: 0.78rem;
}

.products-program-preview-empty {
    font-size: 0.82rem;
    color: #a7aaad;
    padding: 0.75rem;
    border: 1px dashed #3c434a;
    border-radius: 8px;
}
