/* SUGIR Collection — shared design tokens & components (customer site + all panels) */
:root {
  --ink: #0E0D0B;
  --ink-2: #1E1C18;
  --ink-line: #3A352C;
  --gold: #C6A15B;
  --gold-soft: #E3C88E;
  --gold-text: #7A5C24;
  --cream: #FAF7F1;
  --cream-2: #F6F3EC;
  --beige: #F1EBDF;
  --line: #ECE4D3;
  --line-2: #D9CDB4;
  --text: #1A1814;
  --muted: #5E584E;
  --muted-2: #6F685C;
  --green: #1F6B35;
  --green-bg: #EAF4EC;
  --red: #8C2F2F;
  --red-bg: #F8E9E9;
  --amber: #9A5B0B;
  --amber-bg: #FBF1DC;
  --blue: #24477F;
  --blue-bg: #E8EEF9;
  --radius: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: 'Marcellus', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-text); transition: color .25s ease, opacity .25s ease; }
a:hover { color: #5C4419; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(198, 161, 91, .6); outline-offset: 2px; }

/* ---------- Animations ---------- */
@keyframes pagein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.8); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes popin { 0% { opacity: 0; transform: translateY(30px) scale(.92); } 60% { opacity: 1; transform: translateY(-4px) scale(1.01); } 100% { transform: none; } }
@keyframes sheen { 0% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(420%) skewX(-20deg); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 97% { transform: rotate(6deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198, 161, 91, .55); } 100% { box-shadow: 0 0 0 12px rgba(198, 161, 91, 0); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes check { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.page { animation: pagein .6s var(--ease) both; }
.rise { animation: rise .6s var(--ease) both; }
.tap { transition: transform .25s var(--ease), box-shadow .3s ease, background .3s ease, border-color .3s ease; }
.tap:active { transform: scale(.96); }
.bell-ring { animation: ring 3.2s ease-in-out infinite; transform-origin: 50% 10%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; border: 0; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .25s var(--ease), background .3s ease, color .3s ease, box-shadow .3s ease; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-dark { background: var(--ink); color: var(--gold-soft); }
.btn-dark:hover { color: var(--gold-soft); box-shadow: 0 8px 20px rgba(14, 13, 11, .2); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { color: var(--ink); background: #D2AE68; }
.btn-line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-line:hover { color: var(--ink); background: var(--cream); }
.btn-soft { background: #fff; color: var(--text); border: 1px solid var(--line-2); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #E8CFCF; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: #3B352B; }
.input, .select, .textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 15px; outline: 0; transition: border-color .3s ease, box-shadow .3s ease; }
.textarea { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198, 161, 91, .22); }
.input::placeholder, .textarea::placeholder { color: #A39B8C; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

/* ---------- Cards & chips ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 16px; }
.chip { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--line-2); background: #fff; color: #3B352B; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .3s ease, color .3s ease, border-color .3s ease, transform .2s ease; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-blue { background: var(--blue-bg); color: var(--blue); }
.tag-grey { background: #EFE8DA; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Segmented control */
.seg { display: inline-flex; background: #fff; border: 1px solid #E5DAC3; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .3s ease, color .3s ease; }
.seg button.on { background: var(--ink); color: var(--gold-soft); }

/* Switch */
.switch { position: relative; width: 46px; height: 28px; border-radius: 14px; border: 0; background: var(--line-2); padding: 0; flex-shrink: 0; transition: background .3s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: transform .35s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* Checkbox look */
.cbox { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #BDB29C; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0; transition: all .25s ease; }
.cbox.on { background: var(--ink); border-color: var(--ink); color: var(--gold-soft); }

/* ---------- Glass ---------- */
.glass { background: rgba(28, 25, 20, .62); border: 1px solid rgba(227, 200, 142, .25); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); }
.glass-light { background: rgba(255, 255, 255, .78); border: 1px solid rgba(198, 161, 91, .35); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
.sheen { position: relative; overflow: hidden; }
.sheen::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 25%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent); animation: sheen 5s ease-in-out infinite; pointer-events: none; }

/* ---------- Toast ---------- */
#toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: rgba(14, 13, 11, .9); color: #F5EFE3; font-size: 14px; box-shadow: 0 14px 34px rgba(14, 13, 11, .3); animation: popin .5s var(--ease) both; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.toast.err { background: rgba(140, 47, 47, .95); }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .35s ease; }

/* ---------- Skeleton ---------- */
.skel { background: linear-gradient(90deg, #EFE8DA 0, #F7F2E8 40px, #EFE8DA 80px); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 10px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 900; background: rgba(14, 13, 11, .6); display: flex; align-items: flex-start; justify-content: center; padding: 70px 16px 16px; overflow-y: auto; animation: fade .35s ease both; }
.modal { width: 100%; max-width: 460px; border-radius: 26px; padding: 22px 18px 16px; position: relative; animation: popin .7s var(--ease) .05s both; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.modal .x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 20px; border: 0; background: rgba(14, 13, 11, .06); display: flex; align-items: center; justify-content: center; }

/* ---------- Tables (panels) ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .5px; font-weight: 600; padding: 12px 10px; background: var(--cream); white-space: nowrap; }
table.t td { padding: 12px 10px; border-top: 1px solid #F1EBDF; vertical-align: middle; }
table.t tbody tr { transition: background .2s ease; animation: rise .4s var(--ease) both; }
table.t tbody tr:hover { background: var(--cream); }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.ph-img { background: var(--beige); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ph-img img.ph { width: 34%; max-width: 60px; opacity: .3; filter: grayscale(1); }
.ph-img img.real { width: 100%; height: 100%; object-fit: cover; }
