.crd-offer {
    --crd-ink: #16202a;
    --crd-muted: #66717f;
    --crd-line: #dce3ea;
    --crd-soft: #f5f7f9;
    --crd-accent: #b68b3c;
    --crd-accent-dark: #8e6829;
    --crd-panel: #ffffff;
    color: var(--crd-ink);
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 16px 56px;
}

.crd-offer * {
    box-sizing: border-box;
}

.crd-offer__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 22px;
    padding: 34px;
    border: 1px solid rgba(22, 32, 42, .12);
    background: linear-gradient(135deg, #fff 0%, #f7f4ed 100%);
    border-radius: 8px;
}

.crd-offer__eyebrow {
    margin: 0 0 10px;
    color: var(--crd-accent-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.crd-offer__hero h1 {
    max-width: 760px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: 0;
}

.crd-offer__hero p {
    max-width: 720px;
    margin: 0;
    color: var(--crd-muted);
    font-size: 18px;
    line-height: 1.65;
}

.crd-offer__hero-panel {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(182, 139, 60, .28);
    background: rgba(255, 255, 255, .72);
    border-radius: 8px;
}

.crd-offer__hero-panel span {
    display: block;
    padding: 12px 14px;
    border-left: 3px solid var(--crd-accent);
    background: #fff;
    font-weight: 750;
}

.crd-offer__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.crd-offer__steps div {
    min-height: 86px;
    padding: 16px;
    border: 1px solid var(--crd-line);
    border-radius: 8px;
    background: #fff;
}

.crd-offer__steps strong {
    display: block;
    color: var(--crd-accent-dark);
    font-size: 22px;
    line-height: 1;
    margin-bottom: 8px;
}

.crd-offer__steps span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.crd-offer__form {
    display: grid;
    gap: 18px;
}

.crd-offer__required-note {
    margin: -6px 0 0;
    font-size: 13px;
    color: var(--crd-muted);
}

.crd-offer__section {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--crd-line);
    border-radius: 8px;
    background: var(--crd-panel);
}

.crd-offer__section legend {
    padding: 0 8px;
    font-size: 20px;
    font-weight: 850;
}

.crd-offer__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.crd-offer__field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

/* TASK 6 (2026-08-04) - corectie: `.crd-offer__field` de mai sus seta `display: grid` neconditionat,
   ceea ce anula complet atributul HTML `hidden` (foaia de stil a autorului bate stilul implicit al
   browserului `[hidden] { display: none }` indiferent de specificitate) - campurile Sector/Cartier/
   Camere randate/ascunse cu `hidden` (din PHP la incarcare, din owner-offer-taxonomy.js la schimbari)
   ramaneau vizibile in continuare. Regula de mai jos restaureaza comportamentul standard `hidden`. */
.crd-offer__field[hidden] {
    display: none;
}

.crd-offer__field--wide {
    margin-top: 16px;
}

.crd-offer__field span,
.crd-offer__declarations span,
.crd-offer__checks span {
    font-size: 14px;
    font-weight: 750;
}

.crd-offer__field input,
.crd-offer__field select,
.crd-offer__field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cfd8e1;
    border-radius: 6px;
    background: #fff;
    color: var(--crd-ink);
    font-size: 16px;
    line-height: 1.4;
    padding: 11px 12px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.crd-offer__field textarea {
    min-height: 170px;
    resize: vertical;
}

.crd-offer__field input:focus,
.crd-offer__field select:focus,
.crd-offer__field textarea:focus {
    border-color: var(--crd-accent);
    box-shadow: 0 0 0 3px rgba(182, 139, 60, .16);
}

.crd-offer__field.is-invalid input,
.crd-offer__field.is-invalid select,
.crd-offer__field.is-invalid textarea,
.crd-offer__declarations label.is-invalid {
    border-color: #c93d3d;
}

.crd-offer__checks,
.crd-offer__declarations {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

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

.crd-offer__checks label,
.crd-offer__declarations label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid var(--crd-line);
    border-radius: 6px;
    background: var(--crd-soft);
}

.crd-offer__checks input,
.crd-offer__declarations input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--crd-accent);
    flex: 0 0 auto;
}

.crd-offer__exclusive {
    margin-top: 12px;
    padding: 13px 14px;
    border-left: 4px solid var(--crd-accent);
    background: #fff7e8;
    color: #5f461b;
    font-weight: 700;
}

.crd-offer__dropzone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 1px dashed #aeb9c5;
    border-radius: 8px;
    background: var(--crd-soft);
    text-align: center;
    transition: border-color .18s ease, background .18s ease;
}

.crd-offer__dropzone.is-dragging {
    border-color: var(--crd-accent);
    background: #fff8e8;
}

.crd-offer__dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.crd-offer__dropzone label {
    display: grid;
    gap: 8px;
    max-width: 520px;
    padding: 20px;
    pointer-events: none;
}

.crd-offer__dropzone strong {
    font-size: 18px;
}

.crd-offer__dropzone span {
    color: var(--crd-muted);
}

.crd-offer__preview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.crd-offer__photo {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--crd-line);
    background: #e8edf2;
}

.crd-offer__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crd-offer__photo button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(22, 32, 42, .86);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.crd-offer__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 20px 0 0;
}

.crd-offer__actions p {
    margin: 0;
    color: var(--crd-muted);
    font-size: 14px;
}

.crd-offer__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 6px;
    background: var(--crd-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.crd-offer__submit:hover {
    background: var(--crd-accent-dark);
}

.crd-offer__submit:disabled {
    cursor: wait;
    opacity: .74;
}

.crd-offer__submit.is-loading i {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: crd-spin .8s linear infinite;
}

.crd-offer__notice {
    display: none;
    padding: 15px 16px;
    border-radius: 8px;
    font-weight: 750;
}

.crd-offer__notice.is-visible {
    display: block;
}

.crd-offer__notice.is-success {
    border: 1px solid #8fc7a4;
    background: #effaf3;
    color: #1e6b3a;
}

.crd-offer__notice.is-error {
    border: 1px solid #e4a2a2;
    background: #fff1f1;
    color: #9f2d2d;
}

.crd-offer__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.crd-offer__policy-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--crd-accent-dark);
    font: inherit;
    font-weight: 850;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.crd-offer__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.crd-offer__modal.is-open {
    display: flex;
}

.crd-offer__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 22, .64);
}

.crd-offer__modal-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.crd-offer__modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--crd-line);
}

.crd-offer__modal-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.crd-offer__modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--crd-line);
    border-radius: 999px;
    background: #fff;
    color: var(--crd-ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.crd-offer__modal-body {
    max-height: calc(min(760px, 100vh - 36px) - 75px);
    overflow: auto;
    padding: 20px;
    color: var(--crd-ink);
    line-height: 1.65;
}

.crd-offer__modal-body h1,
.crd-offer__modal-body h2,
.crd-offer__modal-body h3 {
    margin-top: 0;
}

@keyframes crd-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 920px) {
    .crd-offer__hero,
    .crd-offer__grid,
    .crd-offer__checks,
    .crd-offer__declarations {
        grid-template-columns: 1fr 1fr;
    }

    .crd-offer__steps,
    .crd-offer__preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .crd-offer {
        padding: 18px 12px 36px;
    }

    .crd-offer__hero,
    .crd-offer__section {
        padding: 18px;
    }

    .crd-offer__hero,
    .crd-offer__grid,
    .crd-offer__checks,
    .crd-offer__declarations,
    .crd-offer__steps,
    .crd-offer__preview {
        grid-template-columns: 1fr;
    }

    .crd-offer__hero h1 {
        font-size: 36px;
    }

    .crd-offer__actions,
    .crd-offer__submit {
        width: 100%;
    }
}

/* CRD Offer full dark mode */
body.dark-mode .crd-offer,
html.dark-mode .crd-offer,
body.page-id-1716.dark-mode .crd-offer {
    --crd-ink: #eef6ff;
    --crd-muted: #c7d6e8;
    --crd-line: rgba(0, 224, 176, .26);
    --crd-soft: #0d2a4a;
    --crd-accent: #00e0b0;
    --crd-accent-dark: #00e0b0;
    --crd-panel: #10213a;
    color: var(--crd-ink) !important;
}

body.dark-mode .crd-offer__hero,
html.dark-mode .crd-offer__hero,
body.dark-mode .crd-offer__section,
html.dark-mode .crd-offer__section,
body.dark-mode .crd-offer__form,
html.dark-mode .crd-offer__form,
body.dark-mode .crd-offer__steps > div,
html.dark-mode .crd-offer__steps > div,
body.dark-mode .crd-offer__hero-panel,
html.dark-mode .crd-offer__hero-panel,
body.dark-mode .crd-offer__checks label,
html.dark-mode .crd-offer__checks label,
body.dark-mode .crd-offer__declarations label,
html.dark-mode .crd-offer__declarations label,
body.dark-mode .crd-offer__dropzone,
html.dark-mode .crd-offer__dropzone,
body.dark-mode .crd-offer__modal-dialog,
html.dark-mode .crd-offer__modal-dialog {
    background: #10213a !important;
    border-color: rgba(0, 224, 176, .26) !important;
    color: #eef6ff !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
}

body.dark-mode .crd-offer__hero,
html.dark-mode .crd-offer__hero {
    background: linear-gradient(135deg, #10213a 0%, #0b1d34 100%) !important;
}

body.dark-mode .crd-offer__hero-panel span,
html.dark-mode .crd-offer__hero-panel span {
    background: #0d2a4a !important;
    border-left-color: #00e0b0 !important;
}

body.dark-mode .crd-offer,
body.dark-mode .crd-offer *,
html.dark-mode .crd-offer,
html.dark-mode .crd-offer * {
    color: #eef6ff !important;
    opacity: 1 !important;
}

body.dark-mode .crd-offer__hero p,
html.dark-mode .crd-offer__hero p,
body.dark-mode .crd-offer__actions p,
html.dark-mode .crd-offer__actions p,
body.dark-mode .crd-offer__modal-body,
html.dark-mode .crd-offer__modal-body {
    color: #c7d6e8 !important;
}

body.dark-mode .crd-offer h1,
html.dark-mode .crd-offer h1,
body.dark-mode .crd-offer__eyebrow,
html.dark-mode .crd-offer__eyebrow,
body.dark-mode .crd-offer__steps strong,
html.dark-mode .crd-offer__steps strong,
body.dark-mode .crd-offer__policy-link,
html.dark-mode .crd-offer__policy-link,
body.dark-mode .crd-offer__dropzone strong,
html.dark-mode .crd-offer__dropzone strong {
    color: #00e0b0 !important;
}

body.dark-mode .crd-offer__field input,
html.dark-mode .crd-offer__field input,
body.dark-mode .crd-offer__field select,
html.dark-mode .crd-offer__field select,
body.dark-mode .crd-offer__field textarea,
html.dark-mode .crd-offer__field textarea {
    background: #071f38 !important;
    border-color: rgba(0, 224, 176, .35) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.dark-mode .crd-offer__field input:focus,
html.dark-mode .crd-offer__field input:focus,
body.dark-mode .crd-offer__field select:focus,
html.dark-mode .crd-offer__field select:focus,
body.dark-mode .crd-offer__field textarea:focus,
html.dark-mode .crd-offer__field textarea:focus {
    border-color: #00e0b0 !important;
    box-shadow: 0 0 0 3px rgba(0, 224, 176, .16) !important;
}

body.dark-mode .crd-offer__field input::placeholder,
html.dark-mode .crd-offer__field input::placeholder,
body.dark-mode .crd-offer__field textarea::placeholder,
html.dark-mode .crd-offer__field textarea::placeholder,
body.dark-mode .crd-offer__dropzone span,
html.dark-mode .crd-offer__dropzone span {
    color: rgba(238, 246, 255, .72) !important;
}

/* Campurile marcate .is-invalid (validare la Trimite oferta) au chenarul rosu suprascris de regula
   generica de mai sus (border-color teal, aceeasi specificitate + !important, dar declarata inainte) -
   fara acest override, un camp gol nu se distinge vizual de unul completat corect, in night mode. */
body.dark-mode .crd-offer__field.is-invalid input,
html.dark-mode .crd-offer__field.is-invalid input,
body.dark-mode .crd-offer__field.is-invalid select,
html.dark-mode .crd-offer__field.is-invalid select,
body.dark-mode .crd-offer__field.is-invalid textarea,
html.dark-mode .crd-offer__field.is-invalid textarea {
    background: rgba(255, 61, 61, .14) !important;
    border-color: #ff3d3d !important;
    box-shadow: 0 0 0 3px rgba(255, 61, 61, .28) !important;
}

/* Doar chenarul e rosu - textul (eticheta campului si mesajul de eroare) ramane alb, la fel ca restul
   formularului in night mode (cerinta explicita). */
body.dark-mode .crd-offer__field.is-invalid > span:first-child,
html.dark-mode .crd-offer__field.is-invalid > span:first-child,
body.dark-mode .crd-offer__field-error,
html.dark-mode .crd-offer__field-error {
    color: #eef6ff !important;
}

body.dark-mode .crd-offer__declarations label.is-invalid,
html.dark-mode .crd-offer__declarations label.is-invalid {
    border-color: #ff3d3d !important;
    color: #eef6ff !important;
}

body.dark-mode .crd-offer__exclusive,
html.dark-mode .crd-offer__exclusive,
body.dark-mode .crd-offer__notice.is-success,
html.dark-mode .crd-offer__notice.is-success,
body.dark-mode .crd-offer__notice.is-error,
html.dark-mode .crd-offer__notice.is-error {
    background: #0d2a4a !important;
    border-color: rgba(0, 224, 176, .32) !important;
    color: #eef6ff !important;
}

body.dark-mode .crd-offer__modal-close,
html.dark-mode .crd-offer__modal-close {
    background: #071f38 !important;
    border-color: rgba(0, 224, 176, .35) !important;
    color: #eef6ff !important;
}

/* CRD GDPR modal readability */
.crd-offer__modal-dialog,
.crd-offer__modal-body {
    background: #10213a !important;
    color: #eef6ff !important;
}

.crd-offer__modal-body,
.crd-offer__modal-body p,
.crd-offer__modal-body li,
.crd-offer__modal-body span,
.crd-offer__modal-body div,
.crd-offer__modal-body strong,
.crd-offer__modal-body em,
.crd-offer__modal-body td,
.crd-offer__modal-body th {
    color: #eef6ff !important;
    background: transparent !important;
    opacity: 1 !important;
}

.crd-offer__modal-head,
.crd-offer__modal-body h1,
.crd-offer__modal-body h2,
.crd-offer__modal-body h3,
.crd-offer__modal-body h4,
.crd-offer__modal-body h5,
.crd-offer__modal-body h6 {
    color: #00e0b0 !important;
    background: transparent !important;
}

.crd-offer__modal-body a,
.crd-offer__modal-body button {
    color: #7fffe4 !important;
    background: transparent !important;
    text-decoration: underline !important;
}

.crd-offer__modal-close {
    background: #071f38 !important;
    color: #eef6ff !important;
    border-color: rgba(127, 255, 228, .45) !important;
}

/* CRD GDPR policy trigger - force link style */
.crd-offer .crd-offer__policy-link,
.crd-offer button.crd-offer__policy-link,
body.dark-mode .crd-offer .crd-offer__policy-link,
body.dark-mode .crd-offer button.crd-offer__policy-link,
html.dark-mode .crd-offer .crd-offer__policy-link,
html.dark-mode .crd-offer button.crd-offer__policy-link {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #7fffe4 !important;
    font: inherit !important;
    font-weight: 850 !important;
    line-height: inherit !important;
    text-align: left !important;
    text-decoration: underline !important;
    text-transform: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.crd-offer .crd-offer__policy-link:hover,
.crd-offer button.crd-offer__policy-link:hover,
body.dark-mode .crd-offer .crd-offer__policy-link:hover,
body.dark-mode .crd-offer button.crd-offer__policy-link:hover,
html.dark-mode .crd-offer .crd-offer__policy-link:hover,
html.dark-mode .crd-offer button.crd-offer__policy-link:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
}

/* CRD GDPR policy trigger - readable hover/focus */
.crd-offer .crd-offer__policy-link:hover,
.crd-offer .crd-offer__policy-link:focus,
.crd-offer .crd-offer__policy-link:active,
.crd-offer button.crd-offer__policy-link:hover,
.crd-offer button.crd-offer__policy-link:focus,
.crd-offer button.crd-offer__policy-link:active {
    color: #006b62 !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration-color: #006b62 !important;
    outline: 2px solid rgba(0, 107, 98, .25) !important;
    outline-offset: 2px !important;
}

body.dark-mode .crd-offer .crd-offer__policy-link:hover,
body.dark-mode .crd-offer .crd-offer__policy-link:focus,
body.dark-mode .crd-offer .crd-offer__policy-link:active,
html.dark-mode .crd-offer .crd-offer__policy-link:hover,
html.dark-mode .crd-offer .crd-offer__policy-link:focus,
html.dark-mode .crd-offer .crd-offer__policy-link:active,
body.dark-mode .crd-offer button.crd-offer__policy-link:hover,
body.dark-mode .crd-offer button.crd-offer__policy-link:focus,
body.dark-mode .crd-offer button.crd-offer__policy-link:active,
html.dark-mode .crd-offer button.crd-offer__policy-link:hover,
html.dark-mode .crd-offer button.crd-offer__policy-link:focus,
html.dark-mode .crd-offer button.crd-offer__policy-link:active {
    color: #7fffe4 !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration-color: #7fffe4 !important;
    outline-color: rgba(127, 255, 228, .35) !important;
}

.crd-offer__field-error {
    display: block;
    margin-top: 6px;
    color: #c93d3d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.crd-offer__field.is-invalid > span:first-child {
    color: #c93d3d;
}

.crd-offer__field.is-invalid input,
.crd-offer__field.is-invalid select,
.crd-offer__field.is-invalid textarea {
    background: #fff4f4;
    border-color: #c93d3d !important;
    box-shadow: 0 0 0 3px rgba(201,61,61,.12);
}