:root {
    --clp-bg: #07101c;
    --clp-panel: rgba(12, 19, 34, 0.92);
    --clp-card: rgba(15, 24, 42, 0.96);
    --clp-border: rgba(255, 255, 255, 0.10);
    --clp-text: #eef4ff;
    --clp-muted: rgba(238, 244, 255, 0.72);
    --clp-blue: #0b57d0;
    --clp-blue-soft: rgba(11, 87, 208, 0.14);
    --clp-green: #1d8f53;
    --clp-red: #c73e3e;
    --clp-amber: #d18600;
}

html[data-theme="light"] {
    --clp-bg: #f4f7fb;
    --clp-panel: rgba(255, 255, 255, 0.90);
    --clp-card: rgba(255, 255, 255, 0.96);
    --clp-border: rgba(15, 33, 68, 0.12);
    --clp-text: #162133;
    --clp-muted: rgba(22, 33, 51, 0.72);
    --clp-blue: #0b57d0;
    --clp-blue-soft: rgba(11, 87, 208, 0.08);
}

.clp-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.clp-hero,
.clp-card {
    border: 1px solid var(--clp-border);
    border-radius: 24px;
    background: var(--clp-panel);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
}

.clp-hero {
    padding: 26px 28px;
}

.clp-eyebrow {
    margin: 0 0 6px;
    color: #90a7dc;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.clp-hero h2,
.clp-card h3 {
    margin: 0;
    line-height: 1.15;
}

.clp-intro,
.clp-help,
.clp-status,
.clp-file-name,
.clp-meta {
    color: var(--clp-muted);
    line-height: 1.55;
}

.clp-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 20px;
    margin-top: 20px;
}

.clp-card {
    padding: 24px;
}

.clp-step + .clp-step {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--clp-border);
}

.clp-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    margin: 0 0 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(144, 167, 220, 0.12);
    color: #9eb3df;
    font-weight: 800;
}

.clp-upload {
    display: block;
    padding: 24px;
    border: 2px dashed rgba(144, 167, 220, 0.36);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.clp-upload input {
    display: none;
}

.clp-upload-title {
    display: block;
    font-size: 1.12rem;
    font-weight: 800;
}

.clp-upload-subtitle {
    display: block;
    margin-top: 6px;
    color: var(--clp-muted);
}

.clp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.clp-template-refresh {
    margin-top: 14px;
}

.clp-grid label,
.clp-side-form label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.clp-full-row {
    grid-column: 1 / -1;
}

.clp-toggle-row {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: fit-content;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    min-height: 0;
    box-sizing: border-box;
    align-self: start;
}

.clp-toggle-row label {
    display: inline !important;
    margin: 0;
    padding: 0;
    color: var(--clp-text);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.clp-template-field {
    grid-column: 1 / -1;
    width: 100%;
}

.clp-toggle-row input {
    width: auto;
    min-height: auto;
    margin: 0;
    accent-color: var(--clp-blue);
    flex: 0 0 auto;
}

.clp-grid span,
.clp-side-form span {
    color: var(--clp-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.clp-grid input,
.clp-side-form input,
.clp-grid textarea,
.clp-grid select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(144, 167, 220, 0.30);
    background: rgba(255, 255, 255, 0.04);
    color: var(--clp-text);
    font: inherit;
}

.clp-grid select {
    appearance: auto;
    padding-right: 36px;
}

.clp-grid textarea {
    min-height: 90px;
    padding: 14px;
    resize: vertical;
}

.clp-grid input:focus,
.clp-side-form input:focus,
.clp-grid textarea:focus,
.clp-grid select:focus {
    outline: none;
    border-color: var(--clp-blue);
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
}

.clp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.clp-primary-button,
.clp-secondary-button {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.clp-primary-button:hover,
.clp-secondary-button:hover {
    transform: translateY(-1px);
}

.clp-primary-button {
    background: linear-gradient(135deg, var(--clp-blue), #0a3a86);
    color: #fff;
    box-shadow: 0 12px 28px rgba(11, 87, 208, 0.22);
}

.clp-secondary-button {
    background: rgba(22, 57, 132, 0.18);
    color: var(--clp-text);
    border: 1px solid rgba(144, 167, 220, 0.24);
}

.clp-primary-button:disabled,
.clp-secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.clp-status-box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--clp-border);
    background: rgba(255, 255, 255, 0.03);
}

.clp-status {
    margin: 0;
}

.clp-side-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.clp-note {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--clp-border);
    background: rgba(255, 255, 255, 0.03);
}

.clp-note strong {
    display: block;
    margin-bottom: 4px;
}

html[data-theme="light"] .clp-upload,
html[data-theme="light"] .clp-status-box,
html[data-theme="light"] .clp-note {
    background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .clp-grid input,
html[data-theme="light"] .clp-side-form input,
html[data-theme="light"] .clp-grid textarea,
html[data-theme="light"] .clp-grid select {
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .clp-secondary-button {
    background: rgba(11, 87, 208, 0.08);
    color: #162133;
    border-color: rgba(11, 87, 208, 0.18);
}

html[data-theme="light"] .clp-primary-button {
    background: linear-gradient(135deg, #0b57d0, #0a3a86);
}

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

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