﻿:root {
  --bg: #f5f1ea;
  --panel: #ffffff;
  --ink: #2b2a28;
  --muted: #6f6b63;
  --accent: #c45a3b;
  --accent-2: #23424a;
  --shadow: 0 20px 60px rgba(35, 66, 74, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 20%, #f7e7d8, #f5f1ea 45%, #efe7dc);
  min-height: 100vh;
  overflow: hidden;
}

body.materials-body {
  overflow: auto;
}

body.quote-body {
  overflow: auto;
}

body.clients-body {
  overflow: auto;
}

body.landing-body {
  overflow: auto;
  background: #efe7dc;
}

.app {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  min-height: 100vh;
}

.app.is-panel-collapsed {
  grid-template-columns: 0 1fr;
}

.panel {
  padding: 32px 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 2;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
}

.app.is-panel-collapsed .panel {
  opacity: 0;
  transform: translateX(-12px);
  padding: 0;
  pointer-events: none;
}

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

.panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel h1 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel__header h1 {
  margin: 0;
}

.panel-link {
  border: 1px solid #c7d2d4;
  background: transparent;
  color: var(--accent-2);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 14px rgba(35, 66, 74, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(35, 66, 74, 0.16);
}

.panel h1 i {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 24px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}

.field--inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field span i {
  color: var(--accent-2);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-2);
}
.field input {
  border: 1px solid #d2c9bc;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.field select {
  border: 1px solid #d2c9bc;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.field small,
.hint {
  font-size: 12px;
  color: var(--muted);
}

.import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-row select,
.import-row input[type="file"] {
  flex: 1 1 180px;
}

.import-row button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(196, 90, 59, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.import-row button:hover {
  transform: translateY(-1px);
}

.import-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.import-templates a {
  text-decoration: none;
  border: 1px solid #c7d2d4;
  color: var(--accent-2);
  background: #fff;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 16px rgba(35, 66, 74, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.import-templates a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(35, 66, 74, 0.14);
}

.materials-page {
  min-height: 100vh;
  padding: 32px 28px 48px;
  background: radial-gradient(circle at 15% 20%, #f7e7d8, #f5f1ea 45%, #efe7dc);
  color: var(--ink);
}

.quote-page {
  min-height: 100vh;
  padding: 32px 28px 48px;
  background: radial-gradient(circle at 15% 20%, #f7e7d8, #f5f1ea 45%, #efe7dc);
  color: var(--ink);
}

.landing-page {
  min-height: 100vh;
  padding: 40px 20px 64px;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: "Avenir Next", "Avenir", "Gill Sans", "Trebuchet MS", sans-serif;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(196, 90, 59, 0.14), transparent 55%),
    radial-gradient(circle at 10% 85%, rgba(35, 66, 74, 0.12), transparent 60%);
  pointer-events: none;
}

.landing-container {
  width: min(1200px, 100%);
  background: radial-gradient(circle at 15% 20%, #f7e7d8, #f5f1ea 45%, #efe7dc);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 56px);
  box-shadow: 0 30px 60px rgba(35, 66, 74, 0.18);
  position: relative;
  display: grid;
  gap: 32px;
  border: 1px solid rgba(35, 66, 74, 0.08);
}

.landing-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 10%, rgba(196, 90, 59, 0.14), transparent 55%),
    radial-gradient(circle at 10% 85%, rgba(35, 66, 74, 0.12), transparent 60%);
  pointer-events: none;
}

.landing-hero,
.landing-section {
  position: relative;
  z-index: 1;
}

.landing-page .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.landing-page .reveal.is-visible {
  animation: fadeInUp 0.7s ease forwards;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) minmax(260px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.landing-hero__header-image {
  grid-column: 1 / -1;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(35, 66, 74, 0.08);
  box-shadow: 0 18px 36px rgba(35, 66, 74, 0.16);
  min-height: 220px;
  background-image: url("https://www.enersolare.net/wp-content/uploads/2020/02/perche-installare-impianto-fotovoltaico.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.landing-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(35, 66, 74, 0.72), rgba(0, 0, 0, 0.35));
  color: #fff;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 28px 32px;
}

.landing-hero__overlay span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.landing-hero__overlay p {
  margin: 0;
  max-width: 520px;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.5;
  opacity: 0.95;
}

.landing-hero__copy h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.landing-hero__copy .lead {
  font-size: 16px;
  max-width: 520px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(35, 66, 74, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.landing-hero__copy h1 i {
  color: var(--accent);
  margin-right: 8px;
}

.landing-hero__cta {
  display: grid;
  gap: 8px;
  margin: 18px 0 16px;
}

.landing-cta {
  border: none;
  background: linear-gradient(130deg, #d76a44, #bf4c2f);
  color: #fff;
  padding: 13px 20px;
  font-size: 15px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 30px rgba(196, 90, 59, 0.32);
}

.landing-cta:hover {
  transform: translateY(-1px);
}

.landing-microcopy {
  font-size: 12px;
  color: var(--muted);
}

.landing-hero__list {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 66, 74, 0.08);
}

.landing-hero__list h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.landing-hero__list ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.landing-hero__list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
}

.landing-hero__list li i {
  color: var(--accent);
  margin-top: 2px;
}

.landing-form-card {
  background: var(--panel);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(35, 66, 74, 0.06);
}

.landing-form-card__header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.landing-form-card__header .hint {
  margin: 0 0 10px;
}

.landing-form {
  display: grid;
  gap: 14px;
}

.landing-form .field span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-form .field span em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.landing-actions button {
  border: none;
  background: linear-gradient(130deg, #d76a44, #bf4c2f);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(196, 90, 59, 0.28);
}

.landing-actions .hint {
  font-size: 12px;
}

.landing-section {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(35, 66, 74, 0.06);
}

.landing-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.landing-intro {
  margin: 0 0 18px;
  max-width: 640px;
  color: var(--muted);
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.landing-cards article {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 66, 74, 0.08);
}

.landing-cards h3 i {
  color: var(--accent);
  margin-right: 6px;
}

.landing-cards h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.landing-cards p {
  margin: 0;
  color: var(--muted);
}

.landing-steps {
  display: grid;
  gap: 18px;
}

.landing-step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.landing-step-list div {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(35, 66, 74, 0.08);
}

.landing-step-list span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(35, 66, 74, 0.12);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent-2);
}

.landing-step-list h3 i {
  color: var(--accent);
  margin-right: 6px;
}

.landing-step-list h3 {
  margin: 0 0 6px;
}

.landing-step-list p {
  margin: 0;
  color: var(--muted);
}

.landing-trust ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.landing-trust li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
}

.landing-trust li i {
  color: var(--accent);
  margin-top: 2px;
}

.landing-faq-list {
  display: grid;
  gap: 12px;
}

.landing-faq-list h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.landing-faq-list h3 i {
  color: var(--accent);
  margin-right: 6px;
}

.landing-faq-list p {
  margin: 0;
  color: var(--muted);
}

.landing-closing {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.landing-closing p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }
}

.materials-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.quote-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.quote-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.materials-toolbar {
  margin-bottom: 18px;
  max-width: 320px;
}

.materials-card.is-hidden {
  display: none;
}

.materials-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.materials-card {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.quote-card {
  background: var(--panel);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.quote-preview {
  background: var(--panel);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.quote-upload {
  display: grid;
  gap: 10px;
}

.quote-upload .field {
  margin-bottom: 0;
}

.quote-upload .button--ghost {
  justify-self: flex-start;
}

.signature-field {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.signature-field__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.signature-field__canvas {
  border: 1px dashed #d2c9bc;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.signature-field__canvas canvas {
  width: 100%;
  height: 160px;
  display: block;
  border-radius: 10px;
  background: #fff;
  touch-action: none;
}


.quote-preview__header h2 {
  margin: 0;
  font-size: 18px;
}

.quote-preview__frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid #e4ded4;
  border-radius: 14px;
  background: #fff;
}

.materials-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.materials-card__header h2 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.materials-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.materials-card__actions button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(196, 90, 59, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.materials-card__actions button:hover {
  transform: translateY(-1px);
}

.materials-card__actions .button--ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid #c7d2d4;
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
}

.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.materials-table th,
.materials-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e4ded4;
}

.materials-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.materials-table input {
  width: 100%;
  border: 1px solid #d2c9bc;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.materials-image-cell {
  display: grid;
  gap: 6px;
}

.materials-image-preview {
  width: 90px;
  height: 60px;
  object-fit: contain;
  border: 1px solid #e4ded4;
  border-radius: 10px;
  background: #fff;
  display: none;
}

.materials-image-preview.is-visible {
  display: block;
}

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

.row-remove {
  border: 1px solid #e2c4b8;
  background: #fff5f1;
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.row-remove:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(196, 90, 59, 0.18);
}

.range {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range input {
  flex: 1;
}

.range__btn {
  border: 1px solid #c7d2d4;
  background: #fff;
  color: var(--accent-2);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(35, 66, 74, 0.12);
}

.range__btn:hover {
  transform: translateY(-1px);
}

.range span {
  font-size: 14px;
  color: var(--muted);
  min-width: 44px;
  text-align: right;
}

.controls {
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.controls button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(196, 90, 59, 0.28);
}

.controls button:hover {
  transform: translateY(-1px);
}

.controls--stack {
  flex-direction: column;
  align-items: stretch;
}

.controls button.is-active {
  background: var(--accent-2);
  box-shadow: 0 12px 24px rgba(35, 66, 74, 0.28);
}

.controls .button--ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid #c7d2d4;
  box-shadow: none;
}

.stats {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.stats .label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.stats span {
  font-size: 18px;
}

.note {
  font-size: 12px;
  color: var(--muted);
}

.map-wrap {
  position: relative;
  height: 100vh;
}

.map-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roof-menu {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 260px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e4ded4;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-50% - 6px));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.roof-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}

.roof-menu__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.roof-menu .field {
  margin-bottom: 10px;
}

.roof-menu input[type="number"] {
  width: 100%;
}

.roof-menu__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roof-menu__estimate {
  border: 1px solid #cfd9d9;
  background: #eef6f5;
  color: #1f5b61;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.roof-menu__actions {
  display: grid;
  gap: 8px;
}

.roof-menu__toggle {
  border: 1px solid #e2c4b8;
  background: #fff5f1;
  color: var(--accent);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.roof-menu__toggle.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(196, 90, 59, 0.28);
}

.roof-menu__toggle.is-drag {
  background: #e3f2f2;
  color: #1f5b61;
  border-color: #acd6d4;
}

.map-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e4ded4;
  backdrop-filter: blur(6px);
}

.map-header__left,
.map-header__right {
  display: flex;
  align-items: center;
}

.map-header__center {
  display: flex;
  justify-content: center;
}

.map-header__right {
  justify-content: flex-end;
  gap: 12px;
}

.map-type-toggle {
  display: inline-flex;
  border: 1px solid #d8d2c9;
  border-radius: 999px;
  overflow: hidden;
  background: #f6f1ea;
  box-shadow: 0 10px 24px rgba(35, 66, 74, 0.18);
}

.map-type-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.map-type-btn.is-active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.map-header__menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-btn {
  --icon-btn-bg: #fff;
  --icon-btn-border: #d8d2c9;
  --icon-btn-color: var(--accent-2);
  --icon-btn-active-bg: var(--accent-2);
  --icon-btn-active-color: #fff;
  border: 1px solid var(--icon-btn-border);
  background: var(--icon-btn-bg);
  color: var(--icon-btn-color);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(35, 66, 74, 0.18);
}

.icon-btn.is-active {
  background: var(--icon-btn-active-bg);
  color: var(--icon-btn-active-color);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(35, 66, 74, 0.28);
}

.icon-btn--select {
  --icon-btn-bg: #eaf3ff;
  --icon-btn-border: #b8cdf6;
  --icon-btn-color: #2a4f93;
  --icon-btn-active-bg: #2a4f93;
}

.icon-btn--roof {
  --icon-btn-bg: #e9f6ee;
  --icon-btn-border: #b6dfc5;
  --icon-btn-color: #2d7a4e;
  --icon-btn-active-bg: #2d7a4e;
}

.icon-btn--exclude {
  --icon-btn-bg: #fff1db;
  --icon-btn-border: #f0c88c;
  --icon-btn-color: #8a5b13;
  --icon-btn-active-bg: #c86e16;
}

.icon-btn--quote {
  --icon-btn-bg: #e3f2f2;
  --icon-btn-border: #acd6d4;
  --icon-btn-color: #1f5b61;
  --icon-btn-active-bg: #1f5b61;
}

.icon-btn--delete {
  --icon-btn-bg: #ffe7e2;
  --icon-btn-border: #f5b1a6;
  --icon-btn-color: #b44133;
  --icon-btn-active-bg: #b44133;
}

.app-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(244, 238, 228, 0.96);
  border: 1px solid #e6dccf;
  box-shadow: 0 10px 24px rgba(35, 66, 74, 0.12);
  width: fit-content;
}

.app-tabs--page {
  display: flex;
  margin: 0 auto 18px;
}

.map-tabs {
  margin-left: auto;
  margin-right: auto;
}

.app-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-tab:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.app-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(35, 66, 74, 0.12);
  font-weight: 600;
}

.compass {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 11px;
  color: var(--muted);
}

.compass__ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d8d2c9;
  box-shadow: var(--shadow);
  position: relative;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.compass__needle {
  color: var(--accent-2);
  font-size: 18px;
  transform: rotate(var(--compass-needle-angle, -45deg));
}

.compass__n,
.compass__e,
.compass__s,
.compass__o {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
}

.compass__n {
  top: 6px;
}

.compass__e {
  right: 8px;
}

.compass__s {
  bottom: 6px;
}

.compass__o {
  left: 8px;
}

.compass__caption {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.map-menu {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-width: 230px;
  backdrop-filter: blur(6px);
}

.map-menu__group {
  display: grid;
  gap: 10px;
}

.map-menu__title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-menu button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(196, 90, 59, 0.28);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.map-menu button:hover {
  transform: translateY(-1px);
}

.map-menu button i {
  width: 16px;
  text-align: center;
}

.map-menu button.is-active {
  background: var(--accent-2);
  box-shadow: 0 12px 24px rgba(35, 66, 74, 0.28);
}

.map-menu .button--ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid #c7d2d4;
  box-shadow: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
}

.modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 20px 22px;
  width: min(90vw, 760px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 1;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal__header h2 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal__close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.modal__body {
  display: grid;
  gap: 14px;
}

.quote-client-tools {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.quote-client-tools .field {
  flex: 1;
  margin-bottom: 0;
}

.quote-client-tools button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  white-space: nowrap;
}

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

.modal__summary {
  border: 1px solid #e4ded4;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #fbfaf7;
}

.modal__summary .label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.modal__footer button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(196, 90, 59, 0.28);
}

.modal__footer .button--ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid #c7d2d4;
  box-shadow: none;
}

.modal textarea {
  border: 1px solid #d2c9bc;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  resize: vertical;
}

#map {
  position: absolute;
  inset: 0;
}


.panel-tab {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  border: none;
  background: var(--accent);
  color: #fff;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 14px;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(196, 90, 59, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, left 0.2s ease;
  z-index: 7;
}

.panel-tab:hover {
  transform: translateY(-50%) translateX(2px);
}

.panel-tab__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panel-tab__text {
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .panel {
    box-shadow: none;
    border-bottom: 1px solid #ded6ca;
  }

  #map {
    position: relative;
    height: 70vh;
  }

  .panel-tab {
    top: 50%;
    left: 0;
  }

  .map-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .map-header__left,
  .map-header__right {
    justify-content: center;
  }

  .map-header__menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .roof-menu {
    right: 12px;
  }

  .map-menu {
    width: 100%;
    max-width: none;
  }

  .modal__content {
    width: min(94vw, 720px);
    max-height: 90vh;
  }

  .modal__grid,
  .modal__summary {
    grid-template-columns: 1fr;
  }

  .quote-client-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-client-tools button {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-preview__frame {
    min-height: 420px;
  }
}
