/* ═══════════════════════════════════════════════════════════════
   PANASONIC LIVE PRESENTATIONS — Design System
   Kolory wyekstrahowane z test.pptx (Refrigeration 25 template)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Brand — z PPTX */
    --pres-cover-bg:    #E8EDE9;   /* tło slajdu tytułowego */
    --pres-cover-bar:   #93A496;   /* pasek dekoracyjny cover */
    --pres-brand-green: #65903A;   /* gradient lewy */
    --pres-brand-blue:  #179EC8;   /* Panasonic Blue — gradient prawy */
    --pres-brand-amber: #F8AB3C;   /* akcent złoty */
    --pres-brand-orange:#E0592A;   /* akcent "heating" */

    /* Slide */
    --pres-data-bg:     #FFFFFF;
    --pres-text-dark:   #1A1A1A;
    --pres-text-muted:  #5A6475;
    --pres-separator:   #D0D5CC;   /* 1px linie header/footer */

    /* UI — konfigurator */
    --pres-ui-bg:       #F4F6F8;
    --pres-panel-bg:    #FFFFFF;
    --pres-border:      #E2E6EA;
    --pres-selected-bg: #EBF5FB;
    --pres-accent:      #179EC8;
    --pres-accent-dark: #0E7FA8;
    --pres-radius:      8px;
    --pres-shadow:      0 1px 4px rgba(0,0,0,.10);
    --pres-shadow-md:   0 4px 16px rgba(0,0,0,.14);
}

/* ══ CLOUD SYNC INDICATOR ═══════════════════════════════════════ */
.pres-sync-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
    background: #CBD5E1;
    transition: background .4s;
    position: relative;
}
.pres-sync-dot.saved   { background: var(--pres-brand-green); }
.pres-sync-dot.saving  {
    background: var(--pres-brand-amber);
    animation: presSyncPulse .9s ease-in-out infinite;
}
.pres-sync-dot.error   { background: var(--pres-brand-orange); }

.pres-sync-label {
    font-size: 11px; color: var(--pres-text-muted);
    transition: color .3s;
}
.pres-sync-label.saved   { color: var(--pres-brand-green); }
.pres-sync-label.saving  { color: #B07F2A; }
.pres-sync-label.error   { color: var(--pres-brand-orange); }

@keyframes presSyncPulse {
    0%, 100% { opacity: 1; transform: scale(1.1); }
    50%       { opacity: .35; transform: scale(.8); }
}

/* ══ TOOLBAR ════════════════════════════════════════════════════ */
.pres-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--pres-panel-bg);
    border-bottom: 1px solid var(--pres-border);
    flex-wrap: wrap;
}
.pres-toolbar-right {
    margin-left: auto; display: flex; align-items: center; gap: 8px;
}
.pres-btn {
    padding: 6px 14px; border: none; border-radius: 5px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.pres-btn-primary {
    background: var(--pres-accent); color: #fff;
}
.pres-btn-primary:hover { background: var(--pres-accent-dark); }
.pres-btn-success {
    background: var(--pres-brand-green); color: #fff;
}
.pres-btn-success:hover { background: #4e7a2c; }
.pres-btn-ghost {
    background: transparent; color: var(--pres-text-muted);
    border: 1px solid var(--pres-border);
}
.pres-btn-ghost:hover { background: var(--pres-ui-bg); color: var(--pres-text-dark); }
.pres-btn-danger {
    background: #fff; color: #C00; border: 1px solid #FECACA;
}
.pres-btn-danger:hover { background: #FEF2F2; }
.pres-btn-player {
    background: linear-gradient(135deg, var(--pres-brand-green), var(--pres-brand-blue));
    color: #fff; padding: 7px 18px;
}
.pres-profile-sel {
    padding: 5px 8px; font-size: 12px;
    border: 1px solid var(--pres-border); border-radius: 5px;
    background: #fff; min-width: 180px;
}
.pres-profile-name {
    padding: 5px 8px; font-size: 12px;
    border: 1px solid var(--pres-border); border-radius: 5px;
    width: 200px;
}

/* ══ KONFIGURATOR — 3-COLUMN LAYOUT ════════════════════════════ */
.pres-konfig-layout {
    display: grid;
    grid-template-columns: 230px 1fr 290px;
    grid-template-rows: 1fr;
    height: calc(100vh - 220px);
    min-height: 560px;
    background: var(--pres-ui-bg);
    border-top: none;
    overflow: hidden;
}

/* ── Panel Zasoby (lewy) ── */
.pres-panel-zasoby {
    background: var(--pres-panel-bg);
    border-right: 1px solid var(--pres-border);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.pres-panel-title {
    padding: 12px 14px 10px;
    font-size: 11px; font-weight: 700; color: var(--pres-text-muted);
    text-transform: uppercase; letter-spacing: .6px;
    border-bottom: 1px solid var(--pres-border);
    display: flex; align-items: center; gap: 7px;
    flex-shrink: 0;
}
.pres-zasoby-list {
    overflow-y: auto; flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px;
}
.pres-resource-card {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--pres-border); background: #fff;
    transition: all .13s; user-select: none;
}
.pres-resource-card:hover {
    background: var(--pres-selected-bg); border-color: var(--pres-accent);
}
.pres-resource-card:active { transform: scale(.98); }
.pres-resource-icon { font-size: 18px; flex-shrink: 0; }
.pres-resource-name {
    flex: 1; font-size: 12px; font-weight: 600; color: var(--pres-text-dark);
    line-height: 1.3;
}
.pres-resource-add {
    font-size: 16px; color: var(--pres-accent); font-weight: 700;
    opacity: 0; transition: opacity .13s;
}
.pres-resource-card:hover .pres-resource-add { opacity: 1; }
.pres-resource-divider {
    height: 1px; background: var(--pres-border); margin: 6px 4px;
}

/* ── Panel Środkowy: Timeline + Podgląd ── */
.pres-panel-center {
    display: flex; flex-direction: column; overflow: hidden;
}

/* Oś czasu (filmstrip) */
.pres-timeline-strip {
    display: flex; align-items: flex-end; gap: 0;
    padding: 14px 16px 12px; overflow-x: auto;
    background: var(--pres-panel-bg);
    border-bottom: 1px solid var(--pres-border);
    min-height: 120px; flex-shrink: 0;
    scrollbar-width: thin;
}
.pres-timeline-strip::-webkit-scrollbar { height: 4px; }
.pres-timeline-strip::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

.pres-timeline-add {
    display: flex; align-items: center; justify-content: center;
    width: 28px; flex-shrink: 0; height: 68px;
    color: #CBD5E1; font-size: 20px; cursor: pointer;
    border-radius: 4px; transition: all .13s;
}
.pres-timeline-add:hover { color: var(--pres-accent); background: var(--pres-selected-bg); }

.pres-thumb-wrap {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; flex-shrink: 0; cursor: pointer;
    padding: 0 2px;
}
.pres-thumb {
    width: 128px; height: 72px;
    border-radius: 4px;
    border: 2px solid var(--pres-border);
    overflow: hidden; position: relative;
    background: #fff;
    transition: all .13s;
    box-shadow: var(--pres-shadow);
}
.pres-thumb.active {
    border-color: var(--pres-brand-blue);
    box-shadow: 0 0 0 3px rgba(23,158,200,.25), var(--pres-shadow);
}
.pres-thumb:hover:not(.active) {
    border-color: #93C5FD;
    box-shadow: var(--pres-shadow-md);
}
.pres-thumb.dragging { opacity: .4; }
.pres-thumb-inner {
    width: 1280px; height: 720px;
    transform: scale(0.1);
    transform-origin: top left;
    pointer-events: none;
}
.pres-thumb-num {
    font-size: 10px; color: var(--pres-text-muted); font-weight: 600;
}
.pres-thumb-label {
    font-size: 10px; color: var(--pres-text-dark); max-width: 128px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: center; font-weight: 600;
}
.pres-thumb-del {
    position: absolute; top: 2px; right: 2px;
    background: rgba(220,38,38,.85); color: #fff;
    border: none; border-radius: 3px; width: 16px; height: 16px;
    font-size: 10px; cursor: pointer; display: none;
    align-items: center; justify-content: center; line-height: 1;
}
.pres-thumb:hover .pres-thumb-del { display: flex; }

/* Obszar podglądu */
.pres-preview-area {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: #4A5568; overflow: hidden; position: relative; min-height: 0;
}
.pres-preview-label {
    position: absolute; top: 8px; left: 12px;
    font-size: 10px; color: rgba(255,255,255,.6); font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
}
.pres-preview-slide-wrap {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box;
}
#presPreviewSlide {
    transform-origin: center center;
}

/* ── Panel Właściwości (prawy) ── */
.pres-panel-props {
    background: var(--pres-panel-bg);
    border-left: 1px solid var(--pres-border);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.pres-props-content {
    flex: 1; overflow-y: auto; padding: 14px 14px 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.pres-no-slide {
    color: var(--pres-text-muted); font-size: 12px;
    font-style: italic; text-align: center; padding: 24px 0;
}
.pres-prop-group { display: flex; flex-direction: column; gap: 5px; }
.pres-prop-label {
    font-size: 11px; font-weight: 700; color: var(--pres-text-muted);
    text-transform: uppercase; letter-spacing: .5px;
}
.pres-prop-input {
    padding: 7px 9px; font-size: 12px;
    border: 1px solid var(--pres-border); border-radius: 5px;
    background: #fff; width: 100%; box-sizing: border-box;
    font-family: inherit; color: var(--pres-text-dark);
    transition: border-color .13s;
}
.pres-prop-input:focus {
    outline: none; border-color: var(--pres-accent);
    box-shadow: 0 0 0 2px rgba(23,158,200,.15);
}
.pres-prop-textarea {
    resize: vertical; min-height: 70px; line-height: 1.5;
}

/* Sync Status w panelu właściwości */
.pres-sync-row {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 12px; border-radius: 6px;
    background: var(--pres-ui-bg); border: 1px solid var(--pres-border);
    margin-top: auto; flex-shrink: 0;
}

/* Ustawienia globalne (profil) */
.pres-settings-section {
    background: var(--pres-ui-bg); border-radius: 6px;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
    border: 1px solid var(--pres-border);
}
.pres-settings-title {
    font-size: 11px; font-weight: 700; color: var(--pres-text-muted);
    text-transform: uppercase; letter-spacing: .5px;
}

/* ══ PLAYER VIEW ════════════════════════════════════════════════ */
.pres-player-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; background: #0F172A; border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}
.pres-player-counter {
    color: #94A3B8; font-size: 13px; font-weight: 600;
}
#presPlayerArea {
    background: #1E293B; border-radius: 0 0 8px 8px;
    min-height: 520px; display: flex; align-items: center;
    justify-content: center; overflow: hidden; position: relative;
}
#presPlayerSlide {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
}
.pres-player-hint {
    text-align: center; margin-top: 8px;
    font-size: 11px; color: #94A3B8;
}

/* ══ FULLSCREEN OVERLAY ═════════════════════════════════════════ */
#presFullscreenOverlay {
    display: none; position: fixed; inset: 0;
    background: #000; z-index: 99999;
    flex-direction: column; align-items: center; justify-content: center;
}
#presFullscreenSlide {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.pres-fs-controls {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 20px; background: rgba(0,0,0,.75);
}
.pres-fs-btn {
    padding: 7px 20px; background: #334155; color: #fff;
    border: none; border-radius: 5px; cursor: pointer; font-size: 15px;
}
.pres-fs-close {
    position: absolute; top: -44px; right: 12px;
    padding: 5px 14px; background: #7F1D1D; color: #fff;
    border: none; border-radius: 4px; cursor: pointer; font-size: 12px;
}

/* ══ SLAJD PANASONIC — Shell 1280×720 ══════════════════════════ */
.pres-slide-shell {
    width: 1280px; height: 720px;
    font-family: Arial, Helvetica, sans-serif;
    display: flex; flex-direction: column;
    overflow: hidden; position: relative;
    box-sizing: border-box;
}

/* --- Type A: Cover / Transition (tło korporacyjne) --- */
.pres-slide-shell.type-cover {
    background: var(--pres-cover-bg);
}
.pres-slide-shell.type-end {
    background: var(--pres-cover-bg);
}

/* --- Type B: Data Slide (białe tło) --- */
.pres-slide-shell.type-chart {
    background: var(--pres-data-bg);
    box-shadow: 0 4px 32px rgba(0,0,0,.30);
}

/* Wspólny header */
.pres-slide-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 36px; height: 56px; min-height: 56px; flex-shrink: 0;
}
.pres-slide-header.with-border {
    border-bottom: 1px solid var(--pres-separator);
}
.pres-slide-header-title {
    font-size: 17px; font-weight: 700; color: var(--pres-text-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 820px; outline: none; flex: 1;
}
.pres-slide-header-title[contenteditable="true"]:focus {
    background: rgba(23,158,200,.08); border-radius: 3px; padding: 2px 6px;
}
.pres-slide-logo { flex-shrink: 0; }
.pres-slide-logo img { height: 28px; width: auto; display: block; }

/* Content */
.pres-slide-content {
    flex: 1; padding: 10px 36px 8px;
    display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.pres-slide-chart-wrap {
    flex: 1; min-height: 0; position: relative;
    border-radius: 2px; overflow: hidden;
}
.pres-slide-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.pres-slide-desc {
    margin-top: 8px; min-height: 48px; max-height: 80px;
    font-size: 13px; color: var(--pres-text-muted); line-height: 1.55;
    border: none; border-top: 1px dashed #B8BDB9; padding-top: 7px;
    background: transparent; resize: none; width: 100%; box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif; outline: none;
}
.pres-slide-desc::placeholder { color: #B0BAC5; font-style: italic; }

/* Footer */
.pres-slide-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 36px; height: 38px; min-height: 38px; flex-shrink: 0;
    font-size: 11px; color: var(--pres-text-muted);
}
.pres-slide-footer.with-border {
    border-top: 1px solid var(--pres-separator);
}
.pres-footer-num { font-weight: 700; color: var(--pres-text-dark); }
.pres-footer-right { color: #888; font-size: 10px; }

/* Slajd COVER */
.pres-cover-wave-bar {
    position: absolute; bottom: 0; left: 0; right: 0; height: 8px;
    background: linear-gradient(90deg, var(--pres-brand-green), var(--pres-brand-blue));
}
.pres-cover-body {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 20px 60px; text-align: center; position: relative;
}
.pres-cover-logo-big { margin-bottom: 28px; }
.pres-cover-logo-big img { height: 54px; width: auto; }
.pres-cover-title {
    font-size: 36px; font-weight: 700; color: var(--pres-text-dark);
    line-height: 1.2; margin-bottom: 12px; outline: none;
}
.pres-cover-subtitle {
    font-size: 20px; font-weight: 400; color: var(--pres-cover-bar);
    outline: none;
}
.pres-cover-wave {
    position: absolute; bottom: 8px; left: 0; right: 0; pointer-events: none;
}

/* Slajd END */
.pres-end-body {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.pres-end-logo img { height: 80px; width: auto; }
.pres-end-tagline {
    margin-top: 16px; font-size: 16px; color: var(--pres-cover-bar);
}

/* Slajd EMPTY */
.pres-slide-empty {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #94A3B8; font-size: 16px; font-style: italic;
    flex-direction: column; gap: 12px;
}

/* Fullscreen slide size override */
#presFullscreenOverlay .pres-slide-shell {
    width: 100vw !important; height: 100vh !important;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════
   SILNIK PREZENTACJI v2 — PowerPoint Pro (uzupełnienie stylów)
   Uwaga: główne style overlay (#pv2Overlay, #pv2SlideWrap, #pv2Nav
   itp.) są zdefiniowane inline w index.html <style>. Tu są TYLKO
   style nieobecne w inline: Master Slide, Section Toolbar, Sidebar,
   Toolbar profili, pv2-tb-save/danger.
   ═══════════════════════════════════════════════════════════════ */

/* ── Sidebar ── */
#pv2Sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 64px;
    width: 148px;
    background: rgba(8, 10, 20, 0.92);
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    display: flex; flex-direction: column;
    padding: 52px 0 6px;
    gap: 2px;
    z-index: 9;
    scrollbar-width: thin;
}
#pv2Sidebar:empty { display: none; }
#pv2Sidebar::-webkit-scrollbar { width: 3px; }
#pv2Sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.pv2-sb-item {
    display: flex; align-items: flex-start; gap: 7px;
    padding: 7px 10px; cursor: pointer;
    border-radius: 4px; margin: 0 4px;
    transition: background 0.13s;
    color: #94a3b8; font-size: 10px; font-weight: 600;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.3;
}
.pv2-sb-item:hover { background: rgba(255,255,255,0.07); }
.pv2-sb-item.active {
    background: rgba(23,158,200,0.18);
    color: #38bdf8;
}
.pv2-sb-num {
    width: 18px; height: 18px; min-width: 18px;
    background: #1e293b; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; color: #64748b;
}
.pv2-sb-item.active .pv2-sb-num {
    background: #0c4a6e; color: #38bdf8;
}
.pv2-sb-label {
    flex: 1;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}

/* ═══════════════════════════════════════════════════════════════
   MASTER SLIDE — Premium PowerPoint layout v2
   Top accent: 5px Panasonic gradient
   Header: tytuł (lewo) + PANASONIC czarny duży (prawo)
   Rule top/bottom: 2px czarny (#0f172a)
   Chart area: ~78% slajdu, bez nagłówka sekcji (ukryty przy capture)
   Comment: italic edytowalny
   Footer: "1 / N" lewo + "Panasonic Manufacturing" prawo
   ═══════════════════════════════════════════════════════════════ */
.pv2-ms-slide {
    width: 100%; height: 100%;
    background: #ffffff;
    display: flex; flex-direction: column;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    overflow: hidden; box-sizing: border-box;
}

/* 5px gradient bar — Panasonic brand */
.pv2-ms-top-accent {
    height: 5px;
    background: linear-gradient(90deg, #0068b5 0%, #00a0d4 50%, #00c5a0 100%);
    flex-shrink: 0;
}

.pv2-ms-header {
    display: flex; align-items: center;
    padding: 0 3.5%;
    height: 10%; min-height: 52px;
    flex-shrink: 0;
}
.pv2-ms-title-text {
    flex: 1;
    font-size: clamp(15px, 2.5vw, 22px);
    font-weight: 800;
    color: #0f172a; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 20px;
    letter-spacing: -0.2px;
}
.pv2-ms-logo {
    font-size: clamp(15px, 2.3vw, 22px);
    font-weight: 900;
    color: #000000;           /* czarny jak w PPTX brand */
    letter-spacing: -0.5px;
    white-space: nowrap; flex-shrink: 0;
}
.pv2-ms-rule-top {
    height: 2px;
    background: #0f172a;      /* czarny — jak zgłoszono */
    margin: 0 3.5%;
    flex-shrink: 0;
}
.pv2-ms-chart-area {
    flex: 1; min-height: 0;
    padding: 1.5% 3.5% 0.5%;
    display: flex; align-items: stretch;
    overflow: hidden;
}
.pv2-ms-chart-area img {
    width: 100%; height: 100%;
    object-fit: contain; display: block;
    image-rendering: -webkit-optimize-contrast;
}
/* Komentarz — domyślnie ukryty, C key go otwiera */
.pv2-ms-comment {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 3.5%;
    font-size: clamp(10px, 1.25vw, 13px); color: #64748b;
    font-style: italic; line-height: 1.4;
    white-space: pre-wrap;
    outline: none; flex-shrink: 0;
    transition: max-height .35s ease, opacity .35s ease, padding .35s ease;
    border-left: 3px solid #0068b5;
    margin: 0 3.5%;
}
.pv2-ms-comment.pv2-comment-visible {
    max-height: 56px;
    opacity: 1;
    padding: 0.5% 3.5% 0.5% calc(3.5% + 10px);
}
.pv2-ms-comment:focus { background: rgba(0,104,181,0.04); }
.pv2-ms-comment:empty::before {
    content: attr(data-placeholder);
    color: #cbd5e1; pointer-events: none;
}
/* Toolbar formatowania komentarza */
.pv2-ms-comment-toolbar {
    display: none;
    align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 4px 3.5%;
    flex-shrink: 0;
    animation: pv2TbReveal .25s ease;
}
@keyframes pv2TbReveal { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.pv2-cmt-btn {
    padding: 2px 8px; border: 1px solid #e2e8f0;
    border-radius: 3px; background: #f8fafc; color: #334155;
    font-size: clamp(9px, 1vw, 11px); cursor: pointer;
    transition: all .12s; line-height: 1.4; white-space: nowrap;
}
.pv2-cmt-btn:hover { background: #e0e7ef; border-color: #94a3b8; }
.pv2-cmt-color, .pv2-cmt-bg {
    width: 16px; height: 16px; border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15); cursor: pointer;
    transition: transform .12s; font-size: 9px;
    display: flex; align-items: center; justify-content: center; color: #64748b;
}
.pv2-cmt-color:hover, .pv2-cmt-bg:hover { transform: scale(1.25); }
.pv2-cmt-sep { width: 1px; height: 14px; background: #e2e8f0; margin: 0 2px; flex-shrink: 0; }
.pv2-cmt-label { font-size: 9px; color: #94a3b8; white-space: nowrap; }
.pv2-ms-rule-bottom {
    height: 2px;
    background: #0f172a;      /* czarny — jak górna linia */
    margin: 0 3.5%;
    flex-shrink: 0;
}
.pv2-ms-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 3.5%;
    height: 6%; min-height: 30px;
    flex-shrink: 0;
}
.pv2-ms-pgnum {
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: 800;
    color: #0f172a;
}
.pv2-ms-footer-brand {
    font-size: clamp(8px, 0.9vw, 10px);
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* ── Sekcja toolbar (nad każdym wykresem) ── */
.pv2-ct-wrap {
    background: #f8fafc;
    border: 1px solid #e2e6ea;
    border-bottom: none;
    border-radius: 7px 7px 0 0;
    padding: 6px 14px;
    margin-top: 8px;
}
.pv2-ct-inner {
    display: flex; align-items: center; gap: 8px;
}
.pv2-ct-name {
    font-size: 11px; font-weight: 700; color: #5a6475;
    text-transform: uppercase; letter-spacing: 0.5px;
    flex: 1;
}
.pv2-ct-actions { display: flex; align-items: center; gap: 6px; }
.pv2-ct-btn {
    padding: 4px 12px; border: 1px solid #e2e6ea;
    border-radius: 4px; background: #fff;
    font-size: 11px; font-weight: 600; color: #5a6475;
    cursor: pointer; transition: all 0.13s; white-space: nowrap;
}
.pv2-ct-btn:hover { border-color: #179EC8; color: #179EC8; background: #ebf5fb; }
.pv2-ct-btn.pv2-ct-btn-added {
    background: #179EC8; color: #fff; border-color: #179EC8;
}
.pv2-ct-btn.pv2-ct-btn-added:hover { background: #0e7fa8; border-color: #0e7fa8; }
.pv2-ct-order {
    font-size: 11px; font-weight: 800; color: #179EC8;
    min-width: 20px; text-align: center;
}

/* ── Toolbar pv2 główny — uzupełnienie brakujących klas ── */
.pv2-toolbar-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pv2-toolbar-profiles {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 7px;
}
.pv2-profile-sel {
    padding: 4px 7px; font-size: 11px;
    border: 1px solid #334155; border-radius: 4px;
    background: #1e293b; color: #e2e8f0;
    min-width: 160px;
}
.pv2-profile-name {
    padding: 4px 8px; font-size: 11px;
    border: 1px solid #334155; border-radius: 4px;
    background: #1e293b; color: #e2e8f0;
    width: 150px;
}
/* Uzupełnienie dla .pv2-tb — index.html definiuje ghost/prim/ok/div, tu dodajemy save/danger */
.pv2-tb-save { background: #0ea5e9; color: #fff; border-color: #0ea5e9; }
.pv2-tb-save:hover { background: #0284c7; border-color: #0284c7; }
.pv2-tb-danger { background: transparent; color: #f87171; border: 1px solid #7f1d1d; }
.pv2-tb-danger:hover { background: #7f1d1d; color: #fff; }
