/* zip2sign — shared design tokens and primitives */
:root {
  --ink: #160f33;
  --ink-2: #3d3557;
  --muted: #6b6680;
  --line: #e3e1ea;
  --line-2: #d0cdd9;
  --bg: #ffffff;
  --bg-soft: #f5f4f8;
  --bg-sunk: #ecebf1;

  --violet-900: #1f0a4d;
  --violet-800: #2b0f6b;
  --violet-600: #4a1fd6;
  --violet-500: #5b34f0;
  --violet-100: #ece7ff;
  --violet-50: #f6f3ff;

  --navy: #1c4271;
  --navy-2: #163659;

  --amber: #f2a93b;
  --amber-hover: #e69a26;
  --amber-ink: #2a1a00;

  --blue: #3a6fdc;
  --green: #1fbf75;
  --green-soft: #d6f7e7;
  --red: #c8274e;
  --pink-soft: #fbe7ea;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 15, 51, .08);
  --shadow: 0 6px 24px rgba(22, 15, 51, .12);
  --shadow-lg: 0 18px 48px rgba(22, 15, 51, .22);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-doc: "Times New Roman", Times, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet-600); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font-weight: 700; letter-spacing: -.02em; }
.logo-mark { width: 22px; height: 22px; flex: none; }
.logo-word { font-size: 21px; }
.logo-word b { color: var(--violet-500); font-weight: 800; }
.logo.sm .logo-mark { width: 14px; height: 14px; }
.logo.sm .logo-word { font-size: 13px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--bg-sunk); color: var(--ink);
  font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #e1dfe9; }
.btn:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-amber:hover { background: var(--amber-hover); }
.btn-violet { background: var(--violet-800); color: #fff; }
.btn-violet:hover { background: var(--violet-900); }
.btn-cobalt { background: var(--violet-500); color: #fff; border-radius: 999px; }
.btn-cobalt:hover { background: var(--violet-600); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-text { background: transparent; padding: 0 10px; }
.btn-text:hover { background: var(--bg-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; }
.btn-caps { text-transform: uppercase; letter-spacing: .1em; font-size: 13px; font-weight: 600; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 0; background: transparent; cursor: pointer; color: inherit;
}
.icon-btn:hover { background: rgba(0,0,0,.06); }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 14px; }
.req { color: var(--red); }
.input, .select, .textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }

/* ---------- menus ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 60; min-width: 220px; padding: 10px 0; background: #fff;
  border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  color: var(--ink);
}
.menu h6 { margin: 6px 20px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.menu button, .menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  padding: 9px 20px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 15px;
  color: inherit; text-decoration: none;
}
.menu button:hover, .menu a:hover { background: var(--bg-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(22, 15, 51, .55);
  display: grid; place-items: start center; padding: 48px 16px; overflow-y: auto;
  animation: fade .15s ease-out;
}
.overlay.blur { backdrop-filter: blur(3px); background: rgba(36, 22, 80, .62); }
.modal {
  width: min(560px, 100%); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  position: relative; animation: rise .18s ease-out;
}
.modal-hd { padding: 22px 26px 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.modal-hd h2 { margin: 0; font-size: 21px; font-weight: 600; }
.modal-bd { padding: 6px 26px 22px; }
.modal-ft { padding: 16px 26px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.modal-close { position: absolute; top: 12px; right: 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- toast ---------- */
.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s ease-out; }

/* ---------- misc ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg-sunk); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: #0b6b3f; }
.badge.warn { background: #fff0d6; color: #7a4a00; }
.badge.bad { background: var(--pink-soft); color: #8d1433; }
.badge.info { background: var(--violet-100); color: var(--violet-800); }
.ai-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--violet-50); font-size: 14px; font-weight: 500; }
.sparkle { width: 18px; height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--violet-100); color: var(--violet-800); flex: none; }
