body {
    font-family: Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
}

/* ------------------------------------------- */
/* INVOICE and CONTRACT PAGE STYLING */
/* ------------------------------------------- */

/* 📜 Contract Container */
.contract-container {
    margin: 0 auto;
    background: #ffffff;
    padding: 10px;
}

/* 📜 Invoice Container */
.invoice-container {
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
}

/* 🏆 Titles */
.contract-container h1 {
    color: #1877f2;
    text-align: center;
    font-weight: bold;
}

.invoice-container h1 {
    color: #1877f2;
    text-align: center;
    font-weight: bold;
}

.contract-container h3 {
    color: #1877f2;
    text-align: center;
    font-weight: bold;
}

/* 📌 Section Titles */
.contract-container .section-title {
    margin-top: 20px;
    font-weight: bold;
    font-size: 20px;
    border-bottom: 2px solid #1877f2;
    padding-bottom: 15px;
    color: #333;
}

/* ✍️ Text & Paragraphs */
.contract-container p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #333;
}

/* ------------------------------------------- */
/* Invoice Header */
/* ------------------------------------------- */

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-logo {
    max-width: 160px;
    height: auto;
}

.invoice-details {
    margin-top: 1em;
    display: flex;
    justify-content: space-between;
}

.company-details {
    width: 45%;
}

.client-details {
    width: 45%;
}

.details-item {
    margin-bottom: 1.5em;
}

/* ------------------------------------------- */
/* Invoice Table */
/* ------------------------------------------- */

.invoice-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.invoice-container table {
    border: 1px solid #ddd;
}

.invoice-container th {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    background-color: #0056b3;
    color: white;
}

.invoice-container td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

/* ------------------------------------------- */
/* Totals / Bank / Stamp */
/* ------------------------------------------- */

.totals {
    margin-top: 20px;
    text-align: right;
}

.totals p {
    margin: 0;
}

.bank-info {
    margin-top: 3em;
}

.stamp {
    margin-top: 2%;
    font-size: 0.6em;
    display: flex;
    align-items: center;
}


.signature-table {
    width: 100%;
    margin-top: 1em; /* същото като преди */
    border-collapse: collapse;
}

.signature-cell {
    width: 50%;
    text-align: center;
    vertical-align: top;
}


/* ------------------------------------------- */
/* Responsive */
/* ------------------------------------------- */

@media (max-width: 875px) {
    .contract-container {
        width: 90%;
        padding: 15px;
    }

    .invoice-container {
        width: 90%;
        padding: 15px;
    }
}

@media screen and (max-width: 600px) {

    .invoice-container table {
        display: block;
        width: 100%;
    }

    .invoice-container thead {
        display: none;
    }

    .invoice-container tbody {
        display: block;
        width: 100%;
    }

    .invoice-container tr {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
    }

    .invoice-container th {
        display: block;
        width: 100%;
    }

    .invoice-container td {
        display: block;
        width: 100%;
        text-align: right;
        padding-left: 50%;
        position: relative;
        justify-content: space-between;
    }

    .invoice-container td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }
}



/* -------------------------------------------
   ADMIN STYLES – MIRROR MAIN SITE CALCULATOR
------------------------------------------- */

/* ---------- Card ---------- */

.calc-card,
.card-block {
    background: #f8fbff;
    border: 1px solid #c8defe;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

/* ---------- Titles ---------- */

.calc-title,
.lead-calc-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
}

/* ---------- Labels ---------- */

.calc-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

/* ---------- Inputs (MIRRORED) ---------- */

.calc-card input[type="text"],
.calc-card input[type="number"] {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    font-size: 0.9rem;
    color: #111;
    background: #fff;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    box-sizing: border-box;
}

.calc-card input::placeholder {
    color: #6b7280;
}

.calc-card input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,.25);
}


/* ---------- Layout Wrapper ---------- */

.calc-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px;
}

/* ---------- ROW 1: VIN ---------- */

.calc-row-vin {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}

/* ---------- ROW 2: PRICE ---------- */

.calc-row-calc {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

/* ---------- Button container ---------- */

.calc-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
}

/* ---------- Vehicle Mini ---------- */

.vehicle-mini {
    margin: 30px auto;
    padding: 20px auto;
    font-size: 0.85rem;
}

.vehicle-mini .v-title {
    font-weight: 700;
    margin-bottom: 14px;
}

.vehicle-mini .v-meta {
    display: flex;
    gap: 18px;
    color: #374151;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* ---------- Results ---------- */

.result-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.result-hero h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.result-price {
    font-weight: 700;
    font-size: 1rem;
    color: #2563eb;
}

/* ---------- Breakdown ---------- */

.break-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.break-row .label {
    color: #4b5563;
}

.break-row .value {
    font-weight: 600;
}

.break-divider {
    border-bottom: 1px solid #e5e7eb;
    margin: 10px 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {

    .calc-row-vin,
    .calc-row-calc {
        grid-template-columns: 1fr;
    }

    .calc-action {
        justify-content: flex-start;
        padding-top: 6px;
    }

}




/* -------------------------------------------
   Offers Dashboard (admin) – refined UI
------------------------------------------- */

.offer-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:0;
  margin:16px 0;
}

/* Card panel */
.offer-panel{
  background:#f8fbff;
  border:1px solid #c8defe;
  border-radius:10px;
  padding:14px;
  box-shadow:0 2px 4px rgba(0,0,0,.06);
  min-width:0;
}

/* Header */
.offer-panel-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.fb-metrics-line{
  display:flex;
  gap:10px;
  margin:8px 0 10px 0;
  padding:8px 10px;
  border-radius:8px;
  background:#f3f4f6;
  flex-wrap:wrap;
}
.fb-metric{
  flex:1 1 0;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:14px;
}
.fb-k{opacity:.85;}
.fb-v strong{font-weight:700;}


.offer-panel.offer-left{
  border-top-right-radius:0;
  border-bottom-right-radius:0;
  border-right:0;
}

.offer-panel.offer-right{
  border-top-left-radius:0;
  border-bottom-left-radius:0;
}


/* Larger "виж" button */
.vin-view{
  padding:4px 16px;
  font-size:16px;
  border-radius:4px;
  font-weight:700;
  background: #1877f2;
  color: #fff;
}


/* Title line: year make model */
.offer-titleline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.offer-carmodel{
  font-weight:800;
}

/* Optional: show VIN smaller under the title */
.offer-vin-small{
  font-size:12px;
  color:#6b7280;
}

/* Put "Още полета" + "Запази" on the same row */
.offer-top-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:2px 0 10px;
}

.offer-actions{
  margin-top:0;
}

/* Fields grid */
.offer-fields{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-bottom:10px;
}

.offer-field{
  min-width:0;
}

.offer-field label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:#374151;
  margin-bottom:5px;
}

/* input container for min/max */
.offer-field .inputs{
  display:flex;
  gap:6px;
}

/* inputs */
.offer-field input{
  width:100%;
  height:34px;
  padding:6px 8px;
  font-size:13px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  box-sizing:border-box;
}

.offer-field input:disabled{
  background:#f3f4f6;
  color:#6b7280;
}

/* Make min/max look like a group */
.offer-field .inputs input:first-child{
  border-top-right-radius:6px;
  border-bottom-right-radius:6px;
}
.offer-field .inputs input:last-child{
  border-top-left-radius:6px;
  border-bottom-left-radius:6px;
}

/* Visible/Advanced separation */
.offer-visible{
  margin-bottom:8px;
}

.btn-toggle-advanced{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#f1f5f9;
  cursor:pointer;
  user-select:none;
  font-size:12px;
  line-height:1;
  margin:2px 0 10px;
}

.btn-toggle-advanced:hover{
  background:#eaf1fb;
}

.offer-advanced{
  display:none;
  padding-top:10px;
  margin-top:6px;
  border-top:1px dashed #d1d5db;
}

.offer-row.is-expanded .offer-advanced{
  display:block;
}

/* Notes + Save layout */
.offer-notes{
  margin-top:10px;
}

.offer-notes label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:#374151;
  margin-bottom:6px;
}

.offer-notes textarea{
  width:100%;
  min-height:96px;
  padding:8px 10px;
  font-size:13px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  box-sizing:border-box;
  resize:vertical;
}

.offer-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

.offer-actions .save-offer-btn{
  padding:8px 12px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  font-size:13px;
}

.offer-actions .save-offer-btn:hover{
  background:#f1f5f9;
}

/* Right panel placeholder (similar vehicles) */
.similar-panel .hint{
  color:#4b5563;
  font-size:13px;
  line-height:1.35;
}

.similar-panel{
  min-height: 220px;
}

/* Responsive */
@media (max-width: 1500px){
  .offer-fields{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .offer-row{
    grid-template-columns: 1fr;
  }
  .offer-fields{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 500px){
  .offer-fields{
    grid-template-columns: 1fr;
  }
  .offer-panel{
    padding:12px;
  }
}


