.pm-chart-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 30px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.pm-chart-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}
.pm-chart-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}
.pm-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.pm-control-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pm-control-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pm-btn-group {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ced4da;
}
.pm-btn {
    background: #fff;
    border: none;
    border-right: 1px solid #ced4da;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
}
.pm-btn:last-child {
    border-right: none;
}
.pm-btn:hover {
    background: #e9ecef;
}
.pm-btn.active {
    background: #243842;
    color: #fff;
}
.pm-chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}
.pm-chart-element {
    width: 100%;
    height: 100%;
    position: relative;
}
.pm-chart-element.has-watermark::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--watermark-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30%;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}
.pm-chart-element > * {
    position: relative;
    z-index: 1;
}
.pm-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* Let clicks pass through to chart unless drawing */
}
.pm-drawing-canvas.drawing-active {
    pointer-events: all;
    cursor: crosshair;
}
.pm-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}
.pm-error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
}
.pm-chart-tooltip {
    position: absolute;
    display: none;
    padding: 8px;
    box-sizing: border-box;
    font-size: 12px;
    text-align: left;
    z-index: 1000;
    top: 12px;
    left: 12px;
    pointer-events: none;
    border: 1px solid;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.pm-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.pm-tooltip-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}