.poc-color-tool,
.poc-color-tool * {
    box-sizing: border-box;
}

.poc-color-tool {
    --poc-border: #dedede;
    --poc-muted: #6d6d6d;
    --poc-bg: #f6f7f8;
    --poc-text: #171717;
    --poc-radius: 16px;
    width: 100%;
    max-width: 1180px;
    margin: 24px auto;
    color: var(--poc-text);
    font-family: inherit;
}

.poc-admin-wrap .poc-color-tool {
    margin-left: 0;
}

.poc-head {
    display: grid;
    grid-template-columns: 1fr 112px;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
}

.poc-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
}

.poc-head p {
    margin: 0;
    max-width: 780px;
    color: var(--poc-muted);
    font-size: 16px;
}

.poc-base-preview {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: #3a6ea5;
    border: 8px solid #fff;
    box-shadow: 0 0 0 1px var(--poc-border), 0 12px 34px rgba(0,0,0,.10);
}

.poc-control-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr .85fr;
    gap: 16px;
    margin-bottom: 28px;
}

.poc-panel {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--poc-border);
    border-radius: var(--poc-radius);
    box-shadow: 0 8px 26px rgba(0,0,0,.04);
}

.poc-panel h3 {
    margin: 0 0 16px;
    font-size: 17px;
}

.poc-field {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.poc-field input[type="text"],
.poc-field input[type="number"],
.poc-count-row input[type="number"] {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 9px;
    background: #fff;
    color: #151515;
    font: inherit;
}

.poc-picker-field input[type="color"] {
    width: 100%;
    height: 58px;
    padding: 3px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.poc-rgb-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.poc-cmyk-inputs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 2px;
}

.poc-sliders {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid #ececec;
}

.poc-slider {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: var(--poc-muted);
}

.poc-slider span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.poc-slider strong {
    color: var(--poc-text);
}

.poc-slider input,
.poc-count-row input[type="range"] {
    width: 100%;
    accent-color: #222;
}

.poc-values {
    display: grid;
    gap: 10px;
}

.poc-value {
    display: grid;
    grid-template-columns: 55px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fafafa;
    color: #171717;
    cursor: pointer;
}

.poc-value:hover {
    background: #f2f2f2;
}

.poc-value span {
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--poc-muted);
    font-size: 11px;
    letter-spacing: .08em;
}

.poc-value strong {
    font-size: 14px;
}

.poc-value small {
    color: var(--poc-muted);
    font-size: 10px;
}

.poc-note,
.poc-count-panel p {
    margin: 14px 0 0;
    color: var(--poc-muted);
    font-size: 12px;
    line-height: 1.5;
}

.poc-count-row {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 12px;
    align-items: center;
}

.poc-palettes {
    display: grid;
    gap: 26px;
}

.poc-palette-section {
    padding: 20px;
    border: 1px solid var(--poc-border);
    border-radius: var(--poc-radius);
    background: #fff;
}

.poc-palette-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 14px;
}

.poc-palette-heading h3 {
    margin: 0 0 3px;
    font-size: 20px;
}

.poc-palette-heading p {
    margin: 0;
    color: var(--poc-muted);
    font-size: 12px;
}

.poc-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 9px;
}

.poc-swatch {
    overflow: hidden;
    min-width: 0;
    border: 1px solid #e4e4e4;
    border-radius: 11px;
    background: #fff;
}

.poc-swatch-color {
    position: relative;
    display: block;
    width: 100%;
    height: 92px;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    appearance: none;
}

.poc-swatch-color::after {
    content: "Użyj jako bazowy";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 5px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,.56);
    color: #fff;
    text-align: center;
    font-size: 10px;
    opacity: 0;
    transform: translateY(4px);
    transition: .15s ease;
}

.poc-swatch-color:hover::after,
.poc-swatch-color:focus::after {
    opacity: 1;
    transform: translateY(0);
}

.poc-swatch-data {
    display: grid;
    gap: 4px;
    padding: 10px;
    font-size: 10px;
    line-height: 1.35;
}

.poc-swatch-data button {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.poc-swatch-data button:hover strong {
    text-decoration: underline;
}

.poc-swatch-data span {
    color: var(--poc-muted);
    flex: 0 0 auto;
}

.poc-swatch-data strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.poc-toast {
    position: fixed;
    z-index: 999999;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 12px);
    padding: 9px 15px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: .18s ease;
}

.poc-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .poc-control-grid {
        grid-template-columns: 1fr 1fr;
    }

    .poc-count-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .poc-head {
        grid-template-columns: 1fr 74px;
        gap: 14px;
    }

    .poc-base-preview {
        width: 74px;
        height: 74px;
        border-width: 5px;
    }

    .poc-control-grid {
        grid-template-columns: 1fr;
    }

    .poc-count-panel {
        grid-column: auto;
    }

    .poc-panel,
    .poc-palette-section {
        padding: 15px;
        border-radius: 12px;
    }

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