/* INK ID — shared styles. Palette pulled straight from the logo:
   indigo #451DE8 · electric blue #0F60FC · coral #FD5551 · lime #CFEE24 · cream #FEFDFA */
:root {
  --primary: #451DE8;
  --primary-dark: #3512BE;
  --blue: #0262FE;
  --accent: #0F60FC;
  --coral: #FC4303;
  --lime: #86D205;
  --bg: #F7F3EA;
  --card: #ffffff;
  --ink: #241A4E;
  --muted: #6b6890;
  --faint: #9d99bb;
  --line: #eae5d9;
  --danger: #E8410A;
  --ok: #79a800;
  --radius: 18px;
  --shadow: 0 6px 26px rgba(69, 29, 232, .09);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Nunito', 'Segoe UI', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(rgba(69, 29, 232, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink); font-size: 14.5px; line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; font-weight: 700; }
h1, h2, h3 { letter-spacing: -.3px; font-family: 'Baloo 2', 'Nunito', 'Segoe UI', sans-serif; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  font-family: 'Baloo 2', 'Nunito', sans-serif; font-size: 15px; font-weight: 700;
  padding: 11px 26px; border-radius: 999px; transition: all .16s cubic-bezier(.34,1.56,.64,1);
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(69, 29, 232, .35); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn.secondary:hover { background: #f3efff; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--muted); border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--faint); color: var(--ink); box-shadow: none; background: #fff; }
.btn.danger { background: var(--coral); }
.btn.danger:hover { background: #e93f3b; box-shadow: 0 8px 20px rgba(253, 85, 81, .35); }
.btn.sm { padding: 7px 16px; font-size: 13.5px; }
.btn.accent { background: var(--blue); }
.btn.accent:hover { background: #0b4fd2; box-shadow: 0 8px 20px rgba(15, 96, 252, .35); }
.btn.lime { background: var(--lime); color: #3a4600; }
.btn.lime:hover { background: #bfe010; box-shadow: 0 8px 20px rgba(207, 238, 36, .45); }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f span { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 14.5px; color: var(--ink); background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(69, 29, 232, .12); }
input::placeholder, textarea::placeholder { color: #b9b5cc; font-weight: 500; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23451DE8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; cursor: pointer;
}
input[type=color] { width: 46px; height: 34px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 2px; }
textarea { resize: vertical; min-height: 80px; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge {
  display: inline-block; padding: 3px 12px; border-radius: 14px; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge.draft { background: #eeeaf9; color: var(--muted); }
.badge.sent { background: #ffedcc; color: #b7791f; }
.badge.completed { background: #ecf7c3; color: #5d7d00; }
.badge.voided { background: #ffe1e0; color: #d43734; }
.badge.pending { background: #eeeaf9; color: var(--muted); }
.badge.viewed { background: #dcE9ff; color: var(--blue); }
.badge.active { background: #ecf7c3; color: #5d7d00; }
.badge.deactivated { background: #ffe1e0; color: #d43734; }
.badge.invited { background: #ffedcc; color: #b7791f; }
.badge.admin { background: #e6dfff; color: var(--primary); }
.badge.member { background: #eeeaf9; color: var(--muted); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--blue)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- auth pages (wave card) ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: #2a1580; position: relative; overflow: hidden;
}
.auth-wrap::before, .auth-wrap::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .8; z-index: 0;
  animation: floaty 7s ease-in-out infinite;
}
.auth-wrap::before { width: 240px; height: 240px; background: radial-gradient(circle at 35% 35%, var(--blue), #0b48bd); top: -70px; left: -60px; }
.auth-wrap::after { width: 180px; height: 180px; background: radial-gradient(circle at 35% 35%, var(--coral), #d43734); bottom: -50px; right: -40px; animation-delay: 1.6s; }
.auth-blob { position: absolute; border-radius: 50%; z-index: 0; animation: floaty 8s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
.auth-card { width: 100%; max-width: 470px; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 70px rgba(10, 5, 40, .45); position: relative; z-index: 1; }
.wave-header { background: var(--primary); padding: 38px 24px 64px; text-align: center; position: relative; }
.wave-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 42px;
  background: #fff; border-radius: 100% 100% 0 0 / 200% 200% 0 0;
}
.wave-header.cream { background: #FEFDFA; padding-bottom: 30px; }
.wave-header.cream::after { display: none; }
.wave-header.cream img.lockup { max-width: 280px; width: 80%; display: inline-block; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.brand-row { display: inline-flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-row img.logo { max-height: 46px; }
.brand-name { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: -.5px; font-family: 'Baloo 2', sans-serif; }
.ring-logo { width: 46px; height: 46px; }
.auth-body { padding: 10px 40px 36px; }
.auth-body h2 { text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.auth-avatar { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.15); margin: -37px auto 0; position: relative; z-index: 2; display: block; object-fit: cover; background: #fff; }

.error-box { background: #ffe1e0; color: #c22f2c; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; font-weight: 700; }
.ok-box { background: #ecf7c3; color: #4c6700; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26, 13, 66, .55); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 20px; backdrop-filter: blur(3px);
}
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(10, 5, 40, .4); animation: popIn .3s cubic-bezier(.34,1.56,.64,1); }
.modal-head { padding: 20px 26px; border-bottom: 2px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 22px 26px; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--faint); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--coral); transform: rotate(90deg); transition: all .2s; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--faint); padding: 10px 16px; border-bottom: 2px solid var(--line); font-weight: 800; }
table.list td { padding: 13px 16px; border-bottom: 1px solid #f3f0e8; vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tr.click { cursor: pointer; transition: background .12s; }
table.list tr.click:hover { background: #faf7ff; }

/* ---------- misc ---------- */
.row { display: flex; gap: 12px; align-items: center; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.spin {
  width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 12px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 700; z-index: 300; box-shadow: 0 10px 28px rgba(69, 29, 232, .4);
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1); font-family: 'Baloo 2', sans-serif;
}
.toast.err { background: var(--coral); box-shadow: 0 10px 28px rgba(253, 85, 81, .4); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.9); } }
code.inline { background: #f1edff; padding: 2px 7px; border-radius: 7px; font-size: 12.5px; color: var(--primary); font-family: ui-monospace, Menlo, monospace; }

/* squiggle underline — like the logo's */
.squiggle::after {
  content: ''; display: block; width: 86px; height: 10px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 10'%3E%3Cpath d='M2 6 Q 14 1 28 5 T 56 5 T 70 5' fill='none' stroke='%23451DE8' stroke-width='4' stroke-linecap='round'/%3E%3Crect x='78' y='1' width='8' height='8' rx='2' fill='%23CFEE24'/%3E%3C/svg%3E") no-repeat;
}
