.cte-public {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #182230;
}

.cte-header {
    padding: 28px 30px;
    border-radius: 18px;
    background: linear-gradient(135deg, #173b67, #245d92);
    color: #fff;
    box-shadow: 0 12px 35px rgba(16, 44, 72, 0.15);
}

.cte-header h1 {
    margin: 0 0 7px;
    font-size: 28px;
    line-height: 1.2;
}

.cte-header p {
    margin: 0;
    opacity: 0.88;
}

.cte-container {
    margin-top: 18px;
}

.cte-card {
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 10px 28px rgba(20, 40, 65, 0.08);
}

.cte-card-title {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.cte-kicker {
    font-size: 11px;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #47739c;
}

.cte-card h2 {
    margin: 3px 0 0;
    font-size: 22px;
}

.cte-mode {
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf4fb;
    color: #315b80;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cte-mode.editing {
    background: #fff4df;
    color: #986313;
}

.cte-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cte-grid > div {
    min-width: 0;
}

.cte-field-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #354252;
}

label span {
    color: #c52b2b;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccd5df;
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
    color: #1d2733;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
    border-color: #3c78a8;
    box-shadow: 0 0 0 3px rgba(60, 120, 168, 0.12);
}

.cte-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.cte-actions button {
    border: 0;
    border-radius: 10px;
    padding: 11px 17px;
    font-weight: 700;
    cursor: pointer;
}

.cte-primary {
    background: #1f5f93;
    color: #fff;
}

.cte-secondary {
    background: #eef2f5;
    color: #34414e;
}

.cte-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cte-msg {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.cte-msg.error {
    background: #fff0f0;
    color: #a32020;
    border: 1px solid #f2c5c5;
}

.cte-msg.success {
    background: #edf9f0;
    color: #21733a;
    border: 1px solid #c7e8cf;
}

.cte-msg.warning {
    background: #fff7e8;
    color: #8a5a0a;
    border: 1px solid #efd59e;
}

.cte-msg.info {
    background: #eef6ff;
    color: #275c88;
    border: 1px solid #c9dff3;
}

.cte-loading {
    font-size: 12px;
    color: #5e7183;
    margin: -8px 0 14px;
}

.cte-public input[type="date"] {
    min-height: 42px;
}

/* ===== MEDIA QUERY CORRIGIDA ===== */
@media (max-width: 700px) {
    .cte-header,
    .cte-card {
        padding: 20px;
    }

    .cte-header h1 {
        font-size: 23px;
    }

    .cte-grid {
        grid-template-columns: 1fr;
    }

    .cte-field-full {
        grid-column: auto;
    }

    .cte-card-title {
        align-items: flex-start;
        flex-direction: column;
    }
}