@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Poppins:wght@400;500;600&display=swap');

:root {
  --cream: #fbf7fa; --paper: #ffffff; --sand: #f1e6ed; --line: #e4d9e1;
  --ink: #182238; --ink-2: #566074; --ink-3: #858997;
  --rose: #a84276; --rose-d: #87335f; --rose-l: #f8e3ee;
  --sage: #7f9a8f; --sage-l: #e5eeea; --gold: #b8935a;
  --danger: #b4483c; --danger-l: #f8e3e0; --ok: #4f8a6a; --ok-l: #e2f1e8; --warn: #b98a2e; --warn-l: #f7eedb;
  --radius: 14px; --shadow: 0 1px 2px rgba(47,38,34,.05), 0 8px 24px rgba(47,38,34,.07);
  --serif: 'Poppins', system-ui, sans-serif; --sans: 'Poppins', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); } h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); } h3 { font-size: 1.3rem; }
a { color: var(--rose-d); }
img { max-width: 100%; display: block; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .xs { font-size: .75rem; } .center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hidden { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 20px; font: 500 .95rem var(--sans); cursor: pointer; text-decoration: none; transition: .15s; background: var(--rose); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--rose-d); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); } .btn.ghost:hover { border-color: var(--rose); color: var(--rose-d); }
.btn.soft { background: var(--rose-l); color: var(--rose-d); } .btn.soft:hover { background: #ecd5ce; }
.btn.sage { background: var(--sage); } .btn.danger { background: var(--danger); } .btn.ok { background: var(--ok); }
.btn.wa { background: #25d366; color: #fff; } .btn.wa:hover { background: #1fb457; }
.btn.sm { padding: 6px 12px; font-size: .85rem; } .btn.block { width: 100%; }

label { display: block; font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: 400 .95rem var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: border .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-l); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--rose); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; } .check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); font-weight: 400; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } @media (max-width: 520px) { .f2 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--sand); color: var(--ink-2); }
.badge.ok { background: var(--ok-l); color: var(--ok); } .badge.warn { background: var(--warn-l); color: var(--warn); } .badge.danger { background: var(--danger-l); color: var(--danger); } .badge.rose { background: var(--rose-l); color: var(--rose-d); } .badge.sage { background: var(--sage-l); color: #4d6b60; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(47,38,34,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 100; animation: fade .15s; }
@media (min-width: 640px) { .modal-bg { align-items: center; padding: 20px; } }
.modal { background: var(--paper); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 24px; animation: up .2s; }
.modal.wide { max-width: 860px; }
@media (min-width: 640px) { .modal { border-radius: 20px; } }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.modal-h h3 { margin: 0; }
.x { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(20px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 200; font-size: .92rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: up .2s; }
.toast.err { background: var(--danger); }

.sig-pad { border: 1px dashed var(--ink-3); border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 160px; display: block; }
.consent-text { background: var(--cream); border-radius: 10px; padding: 14px; max-height: 200px; overflow: auto; font-size: .88rem; white-space: pre-wrap; margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--cream); }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 30px; color: var(--ink-3); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--rose); border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
