.creative-builder {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.creative-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.creative-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .55rem;
    color: #087b69;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.creative-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
    gap: 1.5rem;
    align-items: start;
}

.creative-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.creative-card,
.creative-preview-card {
    margin: 0;
    border: 1px solid #dde8e5;
    border-radius: .75rem;
    box-shadow: 0 12px 32px rgba(26, 64, 57, .07);
}

.creative-card-header {
    display: flex;
    min-height: auto;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf2f1;
}

.creative-card-header h4,
.creative-preview-card .card-header h4 {
    margin: 0 0 .18rem;
    color: #1f3d37;
    font-size: 1rem;
}

.creative-card-header p,
.creative-preview-card .card-header small {
    margin: 0;
    color: #75847f;
    font-size: .78rem;
}

.creative-step {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e0f3ee;
    color: #087b69;
    font-weight: 800;
}

.creative-upload {
    display: flex;
    min-height: 88px;
    align-items: center;
    gap: .9rem;
    margin: 0;
    padding: 1rem;
    border: 1.5px dashed #8bbdb2;
    border-radius: .6rem;
    background: #f5fbf9;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.creative-upload:hover {
    border-color: #087b69;
    background: #edf8f5;
}

.creative-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.creative-upload-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .55rem;
    background: #087b69;
    color: #fff;
    font-size: 1.35rem;
}

.creative-upload > span:nth-child(3) {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.creative-upload small {
    color: #75847f;
    font-weight: 400;
}

.creative-file-name {
    overflow: hidden;
    max-width: 160px;
    color: #087b69;
    font-size: .78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creative-source-preview {
    margin-top: .75rem;
    padding: .6rem;
    border: 1px solid #e4ecea;
    border-radius: .5rem;
    background: #f8faf9;
    text-align: center;
}

.creative-source-preview img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.creative-copy-input {
    resize: vertical;
}

.creative-templates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
}

.creative-template {
    position: relative;
    display: flex;
    min-height: 110px;
    flex-direction: column;
    justify-content: flex-end;
    margin: 0;
    padding: 1rem;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: .65rem;
    box-shadow: inset 0 0 0 1px rgba(20, 61, 53, .1);
    cursor: pointer;
}

.creative-template::before,
.creative-template::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
}

.creative-template::before {
    width: 100px;
    height: 100px;
    top: -55px;
    right: -25px;
}

.creative-template::after {
    width: 55px;
    height: 55px;
    top: 18px;
    right: 22px;
}

.creative-template-mutual { background: linear-gradient(135deg, #f5fcf9, #d5eee5); color: #173b35; }
.creative-template-fresh { background: linear-gradient(135deg, #f3fbff, #d2eaf7); color: #17415a; }
.creative-template-night { background: linear-gradient(135deg, #123b46, #075e61); color: #fff; }

.creative-template input {
    position: absolute;
    opacity: 0;
}

.creative-template strong,
.creative-template small {
    position: relative;
    z-index: 1;
}

.creative-template small {
    opacity: .75;
}

.creative-template.selected {
    border-color: #f5a623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .17);
}

.creative-template-check {
    position: absolute;
    z-index: 2;
    top: .55rem;
    left: .55rem;
    display: none;
    width: 1.55rem;
    height: 1.55rem;
    place-items: center;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
}

.creative-template.selected .creative-template-check {
    display: grid;
}

.creative-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    border-radius: .4rem;
    background: #edf2f1;
}

.creative-segmented label {
    margin: 0;
}

.creative-segmented input {
    position: absolute;
    opacity: 0;
}

.creative-segmented span {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: .3rem;
    color: #61716c;
    cursor: pointer;
}

.creative-segmented input:checked + span {
    background: #fff;
    box-shadow: 0 2px 8px rgba(29, 64, 58, .12);
    color: #087b69;
    font-weight: 700;
}

.creative-switch {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: .55rem;
    margin: 0;
    cursor: pointer;
}

.creative-switch input {
    position: absolute;
    opacity: 0;
}

.creative-switch span {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5d2;
    transition: background .2s ease;
}

.creative-switch span::after {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    content: "";
    transition: transform .2s ease;
}

.creative-switch input:checked + span { background: #087b69; }
.creative-switch input:checked + span::after { transform: translateX(16px); }
.creative-switch strong { font-size: .76rem; }

.creative-preview-column {
    position: sticky;
    top: 94px;
}

.creative-preview-card .card-header {
    display: flex;
    min-height: auto;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.creative-preview-card .card-body {
    padding: 1rem;
}

.creative-final-image {
    display: block;
    width: 100%;
    border-radius: .55rem;
    background: #edf2f1;
    box-shadow: 0 8px 22px rgba(20, 53, 47, .12);
}

.creative-empty {
    display: flex;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    border: 1.5px dashed #c7d8d4;
    border-radius: .6rem;
    background: linear-gradient(145deg, #f8fbfa, #eef6f3);
    color: #75847f;
    text-align: center;
}

.creative-empty > span {
    display: grid;
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
    place-items: center;
    border-radius: 50%;
    background: #deefe9;
    color: #087b69;
    font-size: 2rem;
}

.creative-empty h5 {
    margin-bottom: .4rem;
    color: #29463f;
}

.creative-empty p {
    max-width: 290px;
    margin: 0;
    font-size: .82rem;
}

.creative-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    margin-top: .9rem;
    color: #477067;
    font-size: .76rem;
}

.creative-result-meta i { color: #18a67f; }

.creative-clean-link {
    display: inline-block;
    margin-top: .65rem;
    color: #087b69;
    font-size: .78rem;
    font-weight: 700;
}

.creative-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: 1rem;
    background: #f8faf9;
}

.creative-actions .btn { width: 100%; }

.creative-security-note {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: .6rem;
    background: #edf6f3;
    color: #476860;
}

.creative-security-note > i {
    color: #087b69;
    font-size: 1.2rem;
}

.creative-security-note div {
    display: flex;
    flex-direction: column;
    font-size: .75rem;
}

.creative-security-note strong { color: #24483f; }

@media (max-width: 1199.98px) {
    .creative-grid { grid-template-columns: 1fr; }
    .creative-preview-column { position: static; }
}

@media (max-width: 767.98px) {
    .creative-heading { align-items: stretch; flex-direction: column; }
    .creative-heading .btn { width: 100%; }
    .creative-templates { grid-template-columns: 1fr; }
    .creative-template { min-height: 90px; }
    .creative-grid { display: block; }
    .creative-controls { margin-bottom: 1rem; }
    .creative-upload { align-items: flex-start; flex-wrap: wrap; }
    .creative-file-name { width: 100%; max-width: none; padding-left: 62px; }
}
