/* Florals by Mel — Quoter styles */

:root {
  --rose: #b76e79;
  --rose-dark: #9a5561;
  --rose-soft: #f3e3e5;
  --sage: #8a9a7b;
  --sage-dark: #6f7f61;
  --sage-soft: #eef1e9;
  --cream: #faf6f1;
  --ink: #3a332f;
  --muted: #8b8178;
  --line: #e7ddd4;
  --white: #ffffff;
  --gold: #c1a05a;
  --danger: #c0522f;
  --shadow: 0 2px 10px rgba(90, 60, 50, 0.08);
  --shadow-lg: 0 12px 40px rgba(90, 60, 50, 0.16);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }

/* ============ PIN GATE ============ */
.pin-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f7ede9 0%, #eef1e9 100%);
  padding: 20px;
}
.pin-card {
  background: var(--white); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 44px 40px; max-width: 380px; width: 100%; text-align: center;
}
.pin-mark {
  font-family: 'Cormorant Garamond', serif; font-size: 46px; color: var(--rose);
  line-height: 1; margin-bottom: 6px;
}
.pin-card h1 { font-size: 28px; color: var(--ink); margin-bottom: 4px; }
.pin-card p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.pin-card input {
  width: 100%; text-align: center; letter-spacing: 8px; font-size: 22px;
  padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 14px;
}
.pin-card input:focus { outline: none; border-color: var(--rose); }
.pin-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ============ TOP BAR / NAV ============ */
.app { display: none; }
.topbar {
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand .logo { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--rose); font-weight: 700; }
.brand .sub { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--muted);
  background: none; border: none; border-radius: 8px; transition: all 0.15s;
}
.tab:hover { color: var(--ink); background: var(--sage-soft); }
.tab.active { color: var(--white); background: var(--rose); }

/* ============ LAYOUT ============ */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.view { display: none; animation: fade 0.2s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.view-head { margin-bottom: 20px; }
.view-head h2 { font-size: 30px; color: var(--ink); }
.view-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px;
}
.card h3 { font-size: 21px; margin-bottom: 4px; }
.card .card-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--rose); }
.field textarea { resize: vertical; min-height: 60px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 16px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: var(--rose); color: var(--white); transition: all 0.15s;
}
.btn:hover { background: var(--rose-dark); }
.btn.sage { background: var(--sage); }
.btn.sage:hover { background: var(--sage-dark); }
.btn.ghost { background: transparent; color: var(--rose); border: 1.5px solid var(--rose); }
.btn.ghost:hover { background: var(--rose-soft); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid #e3c3ba; }
.btn.danger:hover { background: #f8ece8; }
.btn-icon {
  background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
}
.btn-icon:hover { background: var(--rose-soft); color: var(--danger); }

/* ============ TABLES ============ */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px; padding: 8px 10px; border-bottom: 2px solid var(--line);
}
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--cream); }
.tbl input, .tbl select {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: var(--white);
}
.tbl input:focus, .tbl select:focus { outline: none; border-color: var(--rose); }
.tbl input.num { text-align: right; }
.col-qty { width: 84px; }
.col-stems { width: 90px; }
.col-money { width: 110px; }
.col-act { width: 44px; }

.totrow td { font-weight: 700; border-top: 2px solid var(--line); background: var(--sage-soft); }
.empty { text-align: center; color: var(--muted); font-style: italic; padding: 26px; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--sage-soft); color: var(--sage-dark); }
.badge.warn { background: #fdf0e6; color: #9a6428; }

/* Arrangement groups */
.arrangement { border: 1px solid var(--line); border-radius: 10px; background: #fdfbf9; padding: 14px 16px; margin-bottom: 16px; }
.arrangement:last-child { margin-bottom: 0; }
.arr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.arr-name {
  flex: 1; min-width: 140px; font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600;
  color: var(--ink); border: none; border-bottom: 1.5px solid transparent; background: transparent; padding: 3px 2px;
}
.arr-name:focus { outline: none; border-bottom-color: var(--rose); }
.arr-name::placeholder { color: var(--muted); font-style: italic; font-weight: 500; }
.arr-qty-lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.arr-qty { width: 64px; text-align: right; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; }
.arr-qty:focus { outline: none; border-color: var(--rose); }
.arr-del { font-size: 20px; }
.arr-tbl { margin-top: 4px; }
.arr-tbl th { border-bottom-width: 1px; padding-top: 4px; padding-bottom: 6px; }
.arr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.arr-sub { font-size: 12px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 180px; }
.spacer { flex: 1; }

/* ============ SUMMARY / PROPOSAL ============ */
.totals { max-width: 420px; margin-left: auto; }
.totals .line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; }
.totals .line span:last-child { font-variant-numeric: tabular-nums; }
.totals .line.sub { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 600; }
.totals .line.grand {
  border-top: 2px solid var(--rose); margin-top: 6px; padding-top: 12px;
  font-size: 22px; font-weight: 700; color: var(--rose-dark); font-family: 'Cormorant Garamond', serif;
}
.muted { color: var(--muted); }

/* Proposal document */
.proposal-doc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px; box-shadow: var(--shadow); max-width: 780px; margin: 0 auto;
}
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--rose-soft); padding-bottom: 20px; margin-bottom: 24px; }
.pd-biz .name { font-family: 'Cormorant Garamond', serif; font-size: 34px; color: var(--rose); line-height: 1; }
.pd-biz .owner { color: var(--ink); font-weight: 600; margin: 4px 0 8px; }
.pd-biz .meta { font-size: 13px; color: var(--muted); line-height: 1.7; }
.pd-title { text-align: right; }
.pd-title .word { font-family: 'Cormorant Garamond', serif; font-size: 30px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink); }
.pd-title .meta { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.8; }
.pd-billto { margin-bottom: 24px; }
.pd-billto .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }
.pd-billto .val { font-size: 15px; }
.pd-tbl { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.pd-tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); border-bottom: 1.5px solid var(--line); padding: 8px 6px; }
.pd-tbl th.num, .pd-tbl td.num { text-align: right; }
.pd-tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pd-terms { margin-top: 26px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* Small helpers */
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill-note { background: var(--sage-soft); border-left: 3px solid var(--sage); padding: 10px 14px; border-radius: 6px; font-size: 13px; color: var(--sage-dark); margin-bottom: 16px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; transition: all 0.25s; z-index: 200;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .proposal-doc { padding: 24px; }
  .pd-head { flex-direction: column; }
  .pd-title { text-align: left; }
}

/* ============ PRINT ============ */
@media print {
  body { background: var(--white); }
  .topbar, .no-print { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .view { display: none !important; }
  #print-mount { display: block !important; }
  .proposal-doc { box-shadow: none; border: none; padding: 0; max-width: none; margin: 0; }
  @page { margin: 0.6in; }
}
#print-mount { display: none; }
