/* =====================================================
   BASIS (APP)
   ===================================================== */

:root {
  --primary: #243447;
  --primary-hover: #1b2735;
  --accent: #c8a96b;
  --bg: #f6f4ef;
  --surface: #fcfbf8;
  --card-bg: #ffffff;
  --text: #1f2a33;
  --text-light: #66727d;
  --border: #e4ddd3;
  --success: #1f8f6a;
  --warning: #b78103;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  --radius: 10px;
}


body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

header {
  background: linear-gradient(135deg, #3f4a56 0%, #35414d 100%);
  color: white;
  padding: 16px 20px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 44px;
}

.brand-title {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.94);
}

#logoutBtn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
}

.container {
  max-width: 1000px;
  margin: 0px auto 60px;
  padding: 0 20px;
}

.card {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 24px rgba(31, 42, 51, 0.06);
  border: 1px solid var(--border);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =====================================================
   TABS
   ===================================================== */

.tabs {
  width: 100%;
  max-width: 1000px;
  margin: 4px auto 0;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
}


.tabs-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-height: 42px;
}

.tabs-right.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.tabs-right .dashboard-toggle-btn {
  border: 1px solid rgba(63, 74, 86, 0.16);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
}

.tabs-right .dashboard-toggle-btn:hover {
  background: #f6f1e7;
  border-color: rgba(63, 74, 86, 0.26);
}

.tabs-right .dashboard-toggle-btn.active {
  background: #3f4a56;
  color: #fff;
  border-color: #3f4a56;
}

.tab-buttons {
  display: flex;
  gap: 8px;
}

.tab-buttons button {
  margin-top: 0;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.tab-buttons button:hover {
  color: var(--primary);
  background: rgba(63, 74, 86, 0.05);
}

.tab-buttons button.active {
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-bottom-color: var(--card-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* =====================================================
   FORM elements
   ===================================================== */

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #5f6b76;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 16px;
  box-sizing: border-box;
  font-family: inherit;
  border: 1px solid #ddd6cb;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 16px;
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 107, 0.18);
}

input:disabled {
  background: var(--bg);
  cursor: not-allowed;
}

button {
  margin-top: 16px;
  padding: 11px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
}

button:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 18px rgba(27, 39, 53, 0.14);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

#saveCustomerBtn,
#editCustomerBtn,
#productBtn {
  width: auto;
  min-width: 140px;
  margin-top: 20px;
}

.disabled {
  opacity: 0.5;
  filter: grayscale(1);
  pointer-events: none;
}

.success {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 184, 148, 0.1);
  color: var(--success);
  border-radius: 6px;
  font-weight: 600;
  display: none;
}

/* =====================================================
   TABEL (APP)
   ===================================================== */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

th {
  text-align: left;
  background: #f7f4ee;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 400;
  vertical-align: top;
  color: var(--text-light);
}

td strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(63, 74, 86, 0.02);
}

/* =====================================================
   MONTERING
   ===================================================== */

.mounting-group {
  margin-top: 20px;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.mounting-row {
  display: flex;
  align-items: center;
  padding: 12px 8px;
  background: transparent;
  border-radius: 0;
}

.mounting-row+.mounting-row {
  border-top: 1px solid rgba(36, 52, 71, 0.08);
}

.mounting-row label {
  margin-top: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

.mounting-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  order: -1;
}

/* =====================================================
   OPSUMMERING
   ===================================================== */

.summary {
  margin-top: 22px;
  padding: 18px 20px;
  background: #f8f5ef;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.summary .row {
  display: flex;
  justify-content: space-between;
  margin: 3px 0;
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.35;
}

.summary .row strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Rabat – mere kompakt */
.discount {
  margin: 10px 0;
  padding: 6px 0;
  border-top: 0;
  border-bottom: 0;
}

.discount-inputs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.discount-inputs input,
.discount-inputs select {
  padding: 6px 8px;
  font-size: 0.9rem;
}

.discount-inputs input {
  width: 90px;
}

.discount-inputs select {
  width: 70px;
}

.summary .total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}

.summary .total strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

/* =====================================================
   TILBUDSHANDLINGER
   ===================================================== */
.offer-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-actions-top {
  display: flex;
  justify-content: flex-end;
}

.offer-actions-top button {
  width: 100%;
  max-width: 220px;
}

.status-correction-box {
  width: 100%;
  max-width: 200px;
}

@media (max-width: 768px) {
  .status-correction-box {
    max-width: 100%;
  }
}
.status-correction-box select {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fffdfa;
  border: 1px solid #e3d7c6;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.offer-actions-toolbar {
  display: grid;
  grid-template-columns: 200px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.offer-actions button {
  width: 100%;
  min-height: 42px;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: none;
}

#saveOfferBtn,
#saveChangesBtn {
  background: #edf1f5;
  color: var(--primary);
}

#saveOfferBtn:hover,
#saveChangesBtn:hover {
  background: #e4ebf2;
}

#copyPortalLinkBtn {
  background: var(--primary);
  color: #fff;
}

#copyPortalLinkBtn:hover {
  background: var(--primary-hover);
}

#printOrderBtn,
.offer-actions button[onclick="printOffer()"] {
  background: #f4efe6;
  color: var(--primary);
  border: 1px solid #e3d7c6;
}

#printOrderBtn:hover,
.offer-actions button[onclick="printOffer()"]:hover {
  background: #eee4d6;
}

#changedSinceSent {
  margin: 0;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 999px;
  padding: 4px 8px;
}

.offer-timeline {
  margin-top: 4px;
  padding: 8px 10px;
  background: #f8f5ef;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.portal-copy-feedback {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  background: #dff3e8;
  color: #17603f;
  border: 1px solid #b7e4c7;
}

.portal-copy-feedback.error {
  background: #fde7e7;
  color: #9f1d1d;
  border-color: #f2b8b8;
}

.offer-timeline-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  padding: 0 14px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.offer-timeline-summary::before {
  content: "▸";
  margin-right: 8px;
  font-size: 0.85rem;
  transition: transform 0.15s ease;
  position: relative;
  top: 1px;
}

.offer-timeline-summary::-webkit-details-marker {
  display: none;
}

.offer-timeline-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.offer-timeline-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.offer-timeline-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.offer-timeline-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.offer-timeline-main,
.offer-timeline-actor,
.offer-timeline-header,
.offer-timeline-subtitle {
  display: none;
}

/* =====================================================
   PRINT / PDF
   ===================================================== */

@media print {

  @page {
    size: A4;
    margin: 6mm;
  }

  html,
  body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    width: 100%;
    overflow-x: hidden;
  }

  * {
    text-rendering: geometricPrecision;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-table,
  .print-table td,
  .print-table th,
  .print-totals td {
    color: #000 !important;
  }

  @page {
    margin: 15mm;
  }

  /* Hide everything except the print area */

  header,
  footer,
  .no-print,
  .tabs,
  .container,
  #tabNewContent,
  #tabHistoryContent {
    display: none !important;
  }

  body * {
    visibility: hidden;
  }

  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: white !important;
  }

  #printArea * {
    visibility: visible !important;
  }

  .print-page {
    width: 100%;
    height: 100%;
    padding: 5mm;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: black !important;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    background: white !important;
    width: 210mm;
    max-width: 210mm;
  }

  .print-logo {
    max-width: 150px;
    margin-bottom: 10px;
  }

  .print-title {
    margin: 5px 0;
  }

  .print-page-number {
    position: fixed;
    bottom: 8mm;
    right: 10mm;
    font-size: 11px;
    color: #000;
  }

  @page {
    @bottom-right {
      content: "Side " counter(page) " af " counter(pages);
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 500;
      color: #444;
    }
  }

  .print-customer-note,
  #printFooter,
  .print-totals,
  .print-line,
  .print-contact {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  @media print and (max-width: 600px) {
    .print-page {
      padding: 4mm;
    }

    .print-totals {
      margin-top: 20px;
    }

    .print-customer-note {
      margin-top: 16px;
      padding: 10px 12px;
    }

    #printFooter {
      margin-top: 14px;
    }
  }
}

/* =====================================================
   PDF SKJULT I APP
   ===================================================== */

#printArea {
  display: none;
}


/* =====================================================
   PRINT ELEMENT STYLES
   ===================================================== */

/* LOGO */

.print-logo {
  display: block;
  margin: 0 auto 28px;
  max-width: 150px;
}


.print-customer {
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.4;
}

.print-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.4;
}


/* TITEL */

.print-title {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.5px;
  margin: 15px 0 8px;
}


/* LINJE */

.print-line {
  border-top: 1.5px solid #000;
  border-bottom: 1px solid #ccc;
  margin: 12px 0 16px;
}


/* =====================================================
   PRODUKTTABEL
   ===================================================== */

.print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.print-table thead th {
  font-size: 12px;
  font-weight: 700;
  padding: 6px;
  border-bottom: 1.5px solid #000;
  text-align: left;
}

.print-table tbody td {
  font-size: 13.5px;
  line-height: 1.4;
  padding: 7px 6px;
  vertical-align: top;
}


/* =====================================================
   KOLONNER
   ===================================================== */

.col-desc {
  width: 50%;
}

.col-qty {
  width: 8%;
  text-align: right;
}

.col-unit {
  width: 8%;
  text-align: center;
}

.col-unitprice {
  width: 17%;
  text-align: right;
}

.col-price {
  width: 17%;
  text-align: right;
}


/* =====================================================
   TOTALER
   ===================================================== */

.print-totals {
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-top: 30px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-totals td {
  padding: 8px 10px;
  font-size: 12px;
}

.print-totals tr:not(.total) td {
  border-bottom: 1px solid #eee;
}

.print-totals .total td {
  font-weight: 700;
  font-size: 14px;
  border-top: 2px solid #000;
  padding-top: 8px;
}

.print-note-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-customer-note {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid #d9d1c3;
  border-radius: 10px;
  background: #faf7f1;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

.print-customer-note strong {
  display: block;
  margin-bottom: 8px;
}

.print-customer-note p {
  margin: 0;
  white-space: pre-wrap;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-totals {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-line,
.print-contact {
  break-inside: avoid;
  page-break-inside: avoid;
}


/* =====================================================
   FOOTER
   ===================================================== */

.print-contact {
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.4;
}

.print-contact p,
.print-contact div,
.print-contact strong,
.print-contact a {
  font-size: inherit;
  line-height: inherit;
}

#printFooter {
  break-inside: avoid;
  page-break-inside: avoid;
  font-size: 13.5px;
  line-height: 1.4;
}

#printFooter p,
#printFooter div,
#printFooter strong,
#printFooter a {
  font-size: inherit;
  line-height: inherit;
}

@media screen and (max-width: 600px) {

  .print-logo {
    max-width: 120px;
  }

  .print-table thead th,
  .print-table tbody td {
    font-size: 11px;
    padding: 4px;
  }

  .print-title {
    font-size: 16px;
  }
}


/* APP */

tr.active-offer {
  background-color: #e8f4ff;
  font-weight: 600;
}

.autosave {
  font-size: 14px;
  margin: 10px 0;
  min-width: 90px;
}

.autosave.saving {
  color: #d89e00;
}

.autosave.saved {
  color: #28a745;
}

.offer-meta-box {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f8f5ef;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.offer-meta-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.offer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.offer-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.offer-meta-field {
  margin-bottom: 14px;
}

.offer-meta-field label {
  margin-top: 0;
}

#paymentMethod {
  max-width: 280px;
}

#customerCvr,
#customerContactPerson {
  max-width: 320px;
}

.customer-type-toggle {
  display: inline-flex;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
  padding: 4px;
  background: #f7f4ee;
  border: 1px solid #e3d7c6;
  border-radius: 999px;
}

.customer-type-btn {
  margin-top: 0;
  padding: 8px 16px;
  min-width: 96px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  box-shadow: none;
  transform: none;
}

.customer-type-btn:hover {
  background: rgba(36, 52, 71, 0.06);
  color: var(--primary);
  box-shadow: none;
  transform: none;
}

.customer-type-btn.active {
  background: #fff;
  color: var(--primary);
  border: 1px solid #d9d1c3;
  box-shadow: 0 2px 6px rgba(31, 42, 51, 0.06);
}

#customerB2bFields {
  margin-top: 14px;
}

#customerB2bFields label:first-child {
  margin-top: 0;
}

#customerNoteText {
  min-height: 96px;
  resize: vertical;
}

#myggenetDirectionFields {
  margin-top: 14px;
}

#myggenetDirectionFields label {
  margin-top: 0;
}

#myggenetDirection {
  max-width: 220px;
}

.fabric-detail-row {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

#fabricPanelFields,
#fabricWaveWidthFields {
  flex: 0 0 220px;
}

#fabricPanelFields label,
#fabricWaveWidthFields label {
  margin-top: 0;
}

#fabricPanels,
#fabricWaveWidth {
  max-width: 220px;
}

#customerNoteText {
  min-height: 96px;
  resize: vertical;
}

.autosave.error {
  color: #dc3545;
}

.app-toast {
  position: fixed;
  right: 20px;
  top: 20px;
  left: auto;
  bottom: auto;
  transform: translateY(-8px);
  background: #17603f;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(27, 39, 53, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100000;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.error {
  background: #9f1d1d;
}

#saveChangesBtn {
  display: none;
}

#offerList tr td {
  padding: 14px 16px;
  vertical-align: middle;
}

#offerList tr td:last-child {
  text-align: right;
}

#offerList td {
  vertical-align: middle;
}

.status-badge {
  margin-top: 0;
}

#offerList td:last-child {
  text-align: right;
  vertical-align: middle;
}

/* Status colors */
.status-badge {
  display: inline-block;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.status-draft {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
}

.status-sent {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffe69c;
}

.status-viewed {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.status-awaiting_response {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.status-accepted {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-production {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.status-under_delivery {
  background: #ede9fe;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.status-received {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.status-installed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.status-paid {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-declined {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* =====================================================
   TILVALG – SAMLET PREMIUM DESIGN
   ===================================================== */

#optionsContainer {
  margin-top: 24px;
}

.tilvalg-wrapper {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.tilvalg-title {
  margin: 0 0 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tilvalg-group {
  margin-bottom: 22px;
}

.tilvalg-group:last-child {
  margin-bottom: 0;
}

.tilvalg-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-light);
}

/* Dropdown */
.tilvalg-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.tilvalg-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 74, 86, 0.1);
  outline: none;
}

/* Checkbox & quantity rows */
.tilvalg-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.tilvalg-option:hover {
  border-color: var(--primary);
  background: rgba(63, 74, 86, 0.04);
}

.tilvalg-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.tilvalg-option input[type="number"] {
  width: 80px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

#productNote {
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-top: 8px;
}

/* ===== INTERN ORDRE MODE ===== */

.order-mode #printFooter {
  display: none;
}

.order-mode .print-table thead {
  display: none;
}

.order-mode .print-totals {
  display: none;
}

/* =========================
   INTERN ORDRE – PRODUKTIONSLAYOUT
   ========================= */

.order-mode .print-logo {
  width: 120px;
  opacity: 0.8;
}

.order-mode .print-page {
  font-size: 12px;
}

.order-mode .order-product-block {
  border: 1px solid #000;
  padding: 12px;
  margin-bottom: 12px;
}

.order-mode .order-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  border-bottom: 1px solid #000;
  padding-bottom: 4px;
}

.order-mode .order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
  margin-top: 6px;
}

.order-mode .order-grid div {
  line-height: 1.4;
}

.order-mode .order-note {
  margin-top: 8px;
  padding: 6px;
  background: #f3f3f3;
  font-size: 11px;
}

.order-mode .order-tilvalg {
  margin-top: 8px;
}

.order-mode .order-tilvalg ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.order-mode .order-tilvalg li {
  margin-bottom: 2px;
}

.autocomplete-dropdown {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: #f1f3f4;
}

.customer-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-dropdown-name {
  font-weight: 700;
  color: var(--text);
}

.customer-dropdown-address,
.customer-dropdown-meta {
  font-size: 0.82rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  header {
    padding: 12px 14px 14px;
  }

  .header-inner {
    max-width: 1000px;
    margin: auto;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 40px;
  }

  .brand-title {
    font-size: 0.92rem;
    letter-spacing: 0.01em;
  }

  #logoutBtn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
  }

  .tabs {
    margin: 4px auto 8px;
  }

  .container {
    margin: 0 auto 40px;
    padding: 0 14px;
  }

  .card {
    padding: 20px;
  }

  #tabHistoryContent .container,
  #tabCustomersContent .container {
    padding: 0 14px;
    margin: 0 auto 0;
  }

  #tabHistoryContent .card,
  #tabCustomersContent .card {
    padding: 12px 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  #tabHistoryContent .card input,
  #tabCustomersContent .card input {
    width: 100%;
  }

  #tabCustomersContent .card h2 {
    padding-left: 12px;
    padding-right: 12px;
  }

  #tabHistoryContent table,
  #tabCustomersContent table {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .card {
    padding: 20px 14px;
  }

  .card table {
    width: 100%;
    margin: 0;
  }

  .tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0 12px;
    box-sizing: border-box;
    margin: 6px auto 0;
  }

  .tabs-right {
    min-height: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    width: 100%;
    margin: 0;
    gap: 8px;
  }

  .tabs-right .dashboard-toggle-btn {
    width: auto;
    margin-right: 4px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .tabs-right.is-hidden {
    display: none;
  }

  .tab-buttons {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-buttons button {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .tabs-right .year-filter {
    justify-content: flex-start;
    width: 100%;
  }

  #yearFilter {
    width: 68px;
    min-width: 68px;
    padding: 4px 6px;
    font-size: 13px;
  }

  .customer-type-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .customer-type-btn {
    width: 100%;
    min-width: 0;
  }

  /* KNAPPER */
  .card>button,
  #saveCustomerBtn,
  #editCustomerBtn,
  #productBtn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }

  .offer-actions {
    gap: 8px;
  }

  .offer-actions-top {
    justify-content: stretch;
  }

  .offer-actions-top button {
    max-width: 100%;
  }

  .offer-actions-toolbar {
    grid-template-columns: 1fr;
  }

  .status-correction-box {
    max-width: 100%;
  }

  .status-correction-box select {
    width: 100%;
    min-height: 44px;
    font-size: 0.92rem;
  }

  .offer-actions button {
    min-height: 44px;
    font-size: 0.92rem;
  }

  #changedSinceSent {
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
    text-align: center;
  }

  .offer-timeline-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .offer-timeline-value {
    justify-self: start;
  }

  /* SUMMARY */
  .summary .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .history-actions {
    white-space: normal;
  }

  .history-btn {
    width: auto;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .history-btn+.history-btn {
    margin-left: 6px;
  }

  /* TABEL SCROLL */
  table {
    width: 100%;
  }

  .table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .table-actions button {
    margin-top: 0 !important;
    padding: 6px 10px;
    font-size: 16px;
    background: #f3f4f6;
    border-radius: 6px;
  }

  .table-actions button:hover {
    background: #e5e7eb;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrapper table {
    width: 100%;
    min-width: 600px;
  }

  .discount-inputs {
    flex-direction: column;
  }

  .discount-inputs input,
  .discount-inputs select {
    width: 100%;
  }
}

/* ================= LOGIN ================= */

.login-body {
  margin: 0;
  height: 100vh;
}

.login-wrapper {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg,
      #f5f7fb,
      #eef2f8);

  z-index: 9999;

  opacity: 0;
  transition: opacity 0.15s;
}

.login-card {
  width: 420px;
  max-width: 420px;
  margin: auto;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin-bottom: 5px;
}

.login-sub {
  color: var(--text-light);
  margin-bottom: 25px;
}

.login-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.login-card button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.login-card button:hover {
  background: var(--primary-hover);
}

.login-error {
  color: red;
  margin-top: 10px;
}

.app-hidden {
  display: none;
}

.customer-link {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}

#yearFilter {
  width: auto;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

  /* Dashboard år-filter */
  .year-filter {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }

  .year-filter select {
    width: auto;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
  }

  .followup-badge {
    background: #ffcc00;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 6px;
  }

.dashboard-notifications {
  display: grid;
  gap: 0;
  margin: 0 0 6px;
}

.dashboard-notification {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 42, 51, 0.05);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin: 0;
}

.dashboard-notification + .dashboard-notification {
  margin-top: 8px;
}

.dashboard-notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  pointer-events: none;
}

.dashboard-notification:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 42, 51, 0.08);
  border-color: #d7ccbc;
  background: #fcfaf6;
}

.dashboard-notification:active {
  transform: translateY(0);
  background: #f6f1e8;
  border-color: #cdbfa8;
}

.dashboard-notification:focus,
.dashboard-notification:focus-visible {
  outline: 2px solid #d8c29a;
  outline-offset: 2px;
  background: #fcfaf6;
}

  .dashboard-notification-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .dashboard-notification-body strong {
    color: var(--primary);
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .dashboard-notification-body span {
    color: var(--text-light);
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .dashboard-notification.info .dashboard-notification-icon {
    background: #e9f0fb;
    color: #1f4d8f;
  }

  .dashboard-notification.warning .dashboard-notification-icon {
    background: #fff3cd;
    color: #856404;
  }

  .dashboard-notification.success .dashboard-notification-icon {
    background: #dff3e8;
    color: #17603f;
  }

.dashboard-followup {
  margin-top: 30px;
}

.followup-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.followup-card {
  width: 100%;
  border: 1px solid #e2d8ca;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 42, 51, 0.05);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.followup-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(31, 42, 51, 0.08);
  border-color: #d3c5b1;
}

.followup-card:focus-visible {
  outline: 2px solid #1f2a37;
  outline-offset: 2px;
}

.followup-card-icon {
  width: 48px;
  height: 48px;
  margin-left: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff3e2;
  color: #8a5a00;
  font-size: 24px;
  font-weight: 700;
  flex: 0 0 48px;
}

.followup-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
}

.followup-card-body strong {
  color: #1f2a37;
  font-size: 1.05rem;
}

.followup-card-body span {
  color: #5f6b7a;
  font-size: 0.98rem;
}

.followup-card-action {
  padding: 0 18px;
  color: #1f2a37;
  font-weight: 700;
  white-space: nowrap;
}

.followup-empty {
  border: 1px solid #e2d8ca;
  border-radius: 18px;
  background: #fff;
  padding: 18px 20px;
  color: #6b7280;
}

  /* =====================================================
     DASHBOARD
     ===================================================== */

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 16px;
  }

  .dashboard-chart {
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 28px 20px 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .dashboard-chart h3 {
    margin: 0 0 16px;
  }

  #revenueChart {
    width: 100%;
    height: 280px !important;
  }

  .dashboard-box {
    background: #fff;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 92px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(31, 42, 51, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
  }

  .dashboard-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #3f4a56, rgba(63, 74, 86, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .dashboard-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  }

  .dashboard-box:hover::before {
    opacity: 1;
  }

  .dashboard-number {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    line-height: 1.2;
  }

  .dashboard-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  #tabDashboardContent {
    margin-top: 0;
    padding-top: 0;
  }

  #tabDashboardContent .container {
    margin-top: 0;
    padding-top: 0;
  }

  #tabNewContent .container,
  #tabHistoryContent .container,
  #tabCustomersContent .container {
    margin-top: 0;
    padding-top: 0;
  }

  .dashboard-box.revenue {
    grid-column: span 3;
    background: linear-gradient(135deg, #3f4a56 0%, #2f3a46 100%);
    color: white;
    min-height: 110px;
  }

  .dashboard-box.revenue .dashboard-number {
    color: #fff;
    font-size: clamp(26px, 2.6vw, 32px);
  }

  .dashboard-box.revenue .dashboard-label {
    color: rgba(255, 255, 255, 0.9);
  }

  .dashboard-box.revenue:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(63, 74, 86, 0.25);
  }

  .dashboard-box.revenue::before {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.3), transparent);
  }

  @media (max-width: 1024px) {
    .dashboard-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px;
    }
  }

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 10px;
  }

  .dashboard-box {
    padding: 16px 12px;
    min-height: 88px;
  }

  .dashboard-box.revenue {
    grid-column: 1 / -1;
    min-height: 96px;
  }

  .dashboard-number {
    font-size: clamp(18px, 4.6vw, 24px);
  }

  .dashboard-box.revenue .dashboard-number {
    font-size: clamp(24px, 7vw, 34px);
  }

  .dashboard-label {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .dashboard-notification {
    grid-template-columns: 34px 1fr;
    padding: 11px 12px;
    margin-top: 0;
  }

  .dashboard-chart {
    margin-top: 10px;
    padding: 20px 14px 14px;
  }

  #revenueChart {
    height: 240px !important;
  }
}

@media (max-width: 480px) {
  .dashboard-box {
    padding: 14px 10px;
    min-height: 80px;
  }

  .dashboard-box.revenue {
    grid-column: 1 / -1;
    min-height: 90px;
  }

  .dashboard-number {
    font-size: clamp(17px, 5.5vw, 22px);
  }

  .dashboard-box.revenue .dashboard-number {
    font-size: clamp(22px, 8vw, 30px);
  }

  .dashboard-label {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .dashboard-notification {
    grid-template-columns: 30px 1fr;
    text-align: left;
    justify-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .dashboard-notification-icon {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .dashboard-notification-body {
    align-items: flex-start;
  }

  .dashboard-chart {
    padding: 16px 10px 12px;
  }

  #yearFilter {
    width: 64px;
    min-width: 64px;
    padding: 4px 6px;
    font-size: 13px;
  }

  #revenueChart {
    height: 210px !important;
  }
}

.history-actions {
  text-align: right;
  white-space: nowrap;
}

.history-btn {
  margin-top: 0;
  padding: 9px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: none;
  transform: none;
}

.history-btn+.history-btn {
  margin-left: 8px;
}

.history-btn:hover {
  transform: none;
  box-shadow: none;
}

.history-btn-primary {
  background: var(--primary);
  color: #fff;
}

.history-btn-primary:hover {
  background: var(--primary-hover);
}

.history-btn-secondary {
  background: #f4efe6;
  color: var(--primary);
  border: 1px solid #e2d8ca;
}

.history-btn-secondary:hover {
  background: #ede5d8;
}

.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: flex-start;
}

.table-actions button {
  padding: 6px 10px;
  font-size: 16px;
  background: #f1eee8;
  color: var(--primary);
  margin-top: 0;
  border-radius: 8px;
}

.table-actions button:hover {
  background: #e7e1d7;
}

#productTable td {
  vertical-align: top !important;
}

#productTable tr {
  display: table-row;
}

#productTable td {
  display: table-cell;
}


/* CUSTOMER PORTAL */

/* =====================================================
   CUSTOMER PORTAL
   ===================================================== */

.portal-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(200, 169, 107, 0.08), transparent 34%),
    var(--bg);
}

.portal-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.portal-hero {
  margin-bottom: 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.portal-hero h1 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.portal-intro {
  margin: 14px 0 0;
  color: var(--text-light);
  max-width: 560px;
}

.portal-state-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 38px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.portal-state-card h2 {
  margin: 0 0 10px;
  color: var(--primary);
}

.portal-state-card p {
  margin: 0;
  color: var(--text-light);
}

.portal-state-card-error {
  border-color: #fecaca;
}

.portal-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(36, 52, 71, 0.12);
  border-top-color: var(--primary);
  animation: portal-spin 0.9s linear infinite;
}

.portal-summary-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.portal-card {
  margin-bottom: 18px;
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.portal-card-header h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.portal-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-print-btn {
  margin-top: 0;
}

.portal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-total-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.portal-total-row-grand {
  font-size: 1.1rem;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.portal-products {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-product {
  border: 1px solid rgba(200, 169, 107, 0.28);
  border-radius: 18px;
  padding: 22px 24px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(63, 74, 86, 0.04);
}

.portal-product-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.portal-product-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.12rem;
  line-height: 1.3;
  font-weight: 800;
}

.portal-product-room {
  margin: 6px 0 0;
  color: var(--text-light);
}

.portal-product-summary {
  margin-top: 6px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
}

.portal-product-lines {
  margin-top: 10px;
  color: var(--text);
  line-height: 1.45;
}

.portal-product-lines div {
  margin: 0;
}

.portal-product-price {
  color: var(--primary);
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.portal-product-summary {
  margin-top: 8px;
  color: #6c7a89;
  font-size: 0.98rem;
  font-weight: 700;
}

.portal-product-lines {
  margin-top: 14px;
  color: var(--text);
  line-height: 1.55;
  font-size: 0.98rem;
}

.portal-product-lines div {
  margin: 0;
}

.portal-product-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.portal-inline-list,
.portal-option-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.portal-section-label {
  margin: 14px 0 0;
  color: var(--primary);
  font-weight: 700;
}

.portal-product-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(200, 169, 107, 0.12);
  color: var(--text);
}

.portal-empty-state {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  color: var(--text-light);
  background: var(--surface);
}

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

@media (max-width: 768px) {

  .portal-summary-grid,
  .portal-meta-grid,
  .portal-product-details {
    grid-template-columns: 1fr;
  }

  .portal-card {
    padding: 22px;
  }

  .portal-product-header {
    flex-direction: column;
  }

  .portal-card-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.portal-offer-text p {
  margin: 0 0 16px;
  color: var(--text);
}

.portal-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .portal-contact-grid {
    grid-template-columns: 1fr;
  }
}

  .portal-response-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

.portal-response-card-accepted {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}

.portal-response-card-paid {
  border-color: #b7e4c7;
  background: linear-gradient(180deg, #ffffff 0%, #eefaf2 100%);
}

.portal-response-card-pending {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #ffffff 0%, #fff9e8 100%);
}

.portal-response-card-declined {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff 0%, #fff3f3 100%);
}

.portal-response-intro {
  margin: 0;
  color: var(--text-light);
}

.portal-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-secondary-btn {
  background: #f4efe6;
  color: var(--primary);
  border: 1px solid #e2d8ca;
}

.portal-secondary-btn:hover {
  background: #ede5d8;
}

.portal-danger-btn {
  background: #fff3f3;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.portal-danger-btn:hover {
  background: #fee2e2;
}

.portal-response-feedback {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.portal-response-feedback.success {
  background: #dff3e8;
  color: #17603f;
}

.portal-response-feedback.error {
  background: #fde7e7;
  color: #9f1d1d;
}

.portal-response-feedback.info {
  background: #e9f0fb;
  color: #1f4d8f;
}

