/* Retur și garanție — stiluri proprii, ca să nu depindă de tema activă.
   Culorile vin din temă când există; valorile de rezervă sunt cele din logo. */

.trg {
    --trg-cyan: var(--milan-cyan, #04A7E6);
    --trg-bleumarin: var(--milan-bleumarin, #091C37);
    --trg-margine: var(--milan-margine, #e5eaf1);
    --trg-fundal: var(--milan-fundal-blând, #f5f8fb);
    --trg-text: var(--milan-text, #46536a);
    color: var(--trg-text);
}

.trg h2 {
    margin: 34px 0 10px;
    font-size: 1.25rem;
    color: var(--trg-bleumarin);
}

.trg h2:first-child { margin-top: 0; }

.trg-marunt {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: #7a889c;
}

/* --- mesaje --- */

.trg-mesaj {
    margin: 0 0 24px;
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 4px solid;
    font-weight: 600;
}

.trg-mesaj--succes { background: #eaf7ee; border-color: #2f9e52; color: #1c5c31; }
.trg-mesaj--eroare { background: #fdeced; border-color: #d93a45; color: #8c2129; }

/* --- lista de comenzi --- */

.trg-comanda {
    margin-bottom: 14px;
    border: 1px solid var(--trg-margine);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

/* Comanda bifată se vede dintr-o privire: cu zece comenzi în listă, un buton
   radio de 14px nu e suficient ca semnal. */
.trg-comanda:has(input[type="radio"]:checked) {
    border-color: var(--trg-cyan);
    box-shadow: 0 0 0 1px var(--trg-cyan);
}

.trg-comanda-antet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 14px 18px;
    background: var(--trg-fundal);
    cursor: pointer;
}

.trg-comanda-nr { font-weight: 700; color: var(--trg-bleumarin); }
.trg-comanda-data,
.trg-comanda-total { font-size: 0.9rem; }

.trg-zile {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 11px;
    background: var(--trg-cyan);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Produsele apar doar la comanda aleasă: altfel pagina devine o listă lungă
   din care nu se înțelege ce ține de ce. */
.trg-produse { display: none; padding: 6px 18px 16px; }
.trg-comanda:has(input[type="radio"]:checked) .trg-produse { display: block; }

.trg-produs {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--trg-margine);
    cursor: pointer;
}

.trg-produs:last-child { border-bottom: 0; }

.trg-produs-poza img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 6px;
}

.trg-produs-nume { flex: 1; font-weight: 600; color: var(--trg-bleumarin); }
.trg-produs-nume small { display: block; font-weight: 400; color: #7a889c; }

.trg-produs-cant {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.trg-produs-cant input {
    width: 62px;
    min-height: 38px;
    padding: 4px 8px;
    border: 1px solid var(--trg-margine);
    border-radius: 8px;
}

/* --- câmpuri --- */

.trg-select,
.trg-input,
.trg-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--trg-margine);
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
}

.trg-textarea { margin-top: 10px; resize: vertical; }

.trg-acord {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.trg-acord input { margin-top: 3px; flex: none; }

.trg-buton {
    display: inline-block;
    padding: 13px 26px;
    border: 0;
    border-radius: 10px;
    background: var(--trg-cyan);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.trg-buton--mare { width: 100%; }
.trg-buton:hover { filter: brightness(0.94); color: #fff; }

/* --- gol / istoric --- */

.trg-gol {
    padding: 26px;
    border: 1px solid var(--trg-margine);
    border-radius: 12px;
    background: var(--trg-fundal);
}

.trg-istoric-titlu { margin-top: 40px; }

.trg-istoric {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.trg-istoric th,
.trg-istoric td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--trg-margine);
    text-align: left;
}

.trg-istoric th { color: #7a889c; font-weight: 600; }

.trg-stare {
    padding: 3px 10px;
    border-radius: 11px;
    background: var(--trg-margine);
    font-size: 0.8rem;
    font-weight: 700;
}

.trg-stare--rezolvata { background: #eaf7ee; color: #1c5c31; }
.trg-stare--respinsa  { background: #fdeced; color: #8c2129; }
.trg-stare--aprobata,
.trg-stare--primita   { background: #e4f3fb; color: #0b5d80; }

@media (max-width: 600px) {
    .trg-comanda-antet { gap: 8px 12px; }
    .trg-zile { margin-left: 0; }

    .trg-produs { flex-wrap: wrap; }
    .trg-produs-nume { flex-basis: calc(100% - 130px); }
    .trg-produs-cant { margin-left: auto; }
}
