/* Consenty — VetStage Brand */

:root {
  --vs-coral: #FF6E5E;
  --vs-coral-hover: #ff5745;
  --vs-dark: #333333;
  --vs-navy: #004867;
  --vs-grey-50: #fafafa;
  --vs-grey-100: #f2f2f2;
  --vs-grey-200: #E6E6E6;
  --vs-grey-300: #DDDDDD;
  --vs-grey-400: #d9d9d9;
  --vs-text-muted: #666666;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: 'Source Sans Pro', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--vs-dark);
  background: #fff;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--vs-dark); text-decoration: none; }
a:hover { color: var(--vs-coral); }

h1, h2, h3, h4 { font-weight: 700; color: var(--vs-dark); margin: 0 0 .5rem; }
h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.05rem; }
h1.has-teaser, h2.has-teaser { margin-bottom: 0; }

p { margin: 0 0 1rem; }
small, .small { font-size: .85rem; }
.text-muted { color: var(--vs-text-muted); }
.text-white { color: #fff !important; }
hr { border: 0; border-top: 1px solid var(--vs-grey-300); margin: 1.5rem 0; }

.headline-teaser {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vs-coral);
  margin: 0 0 2px;
}

/* ========== Navbar ========== */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--vs-grey-300);
  padding: 14px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.navbar .brand img { height: 36px; width: 36px; }
.navbar .brand .brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--vs-dark);
  line-height: 1;
}
.brand-vetstage { color: var(--vs-coral); }
.navbar .brand .brand-sub {
  font-size: .75rem;
  color: var(--vs-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.navbar-meta { display: flex; align-items: center; gap: .5rem; color: var(--vs-text-muted); font-size: .9rem; }

/* ========== Container ========== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }

/* ========== Page Header (coral) ========== */
.page-header-coral {
  background: var(--vs-coral);
  color: #fff;
  padding: 32px 0;
}
.page-header-sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.page-header-coral .headline-teaser { color: rgba(255,255,255,.85); }
.page-header-coral h1 { color: #fff; }
.page-header-coral p { color: rgba(255,255,255,.92); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 10px 24px;
  border-radius: 25px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .25s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-sm { padding: 7px 16px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-coral {
  background: var(--vs-coral);
  color: #fff;
  border-color: var(--vs-coral);
}
.btn-coral:hover { background: var(--vs-coral-hover); border-color: var(--vs-coral-hover); color: #fff; }

.btn-navy {
  background: var(--vs-navy);
  color: #fff;
  border-color: var(--vs-navy);
}
.btn-navy:hover { background: #003a55; border-color: #003a55; color: #fff; }

.btn-white-bordered {
  background: #fff;
  color: var(--vs-dark);
  border: 1px solid var(--vs-grey-300);
}
.btn-white-bordered:hover { background: var(--vs-grey-100); color: var(--vs-dark); }

.page-header-coral .btn-white-bordered { border-color: rgba(255,255,255,.5); }

.btn-rounded {
  width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%;
}
.btn-rounded.btn-sm { width: 34px; height: 34px; }

.btn-outline-danger {
  background: #fff;
  color: var(--vs-coral-hover);
  border: 1px solid var(--vs-coral-hover);
}
.btn-outline-danger:hover { background: var(--vs-coral-hover); color: #fff; }

/* ========== Cards ========== */
.card {
  background: #fff;
  border: 1px solid var(--vs-grey-300);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  overflow: hidden;
}
.card-body { padding: 1.25rem 1.5rem; }
.card-header {
  padding: .9rem 1.5rem;
  border-bottom: 1px solid var(--vs-grey-300);
  font-weight: 700;
  font-size: 1rem;
  background: #fff;
}

/* ========== Form controls ========== */
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: .55rem .8rem;
  border: 1px solid var(--vs-grey-300);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--vs-dark);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--vs-coral);
  box-shadow: 0 0 0 3px rgba(255,110,94,.15);
}
.form-label { font-size: .9rem; font-weight: 600; margin-bottom: .35rem; display: block; }

/* ========== Status labels (VetStage label-style) ========== */
.label {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .7rem;
  border-radius: 25px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.label i { font-size: .75rem; }

.label-pending      { color: #555;     background: var(--vs-grey-200); }
.label-unrestricted { color: #1f7a3a;  background: #d8f2e1; }
.label-limited      { color: #CCAC00;  background: #FFF7CC; }
.label-restricted   { color: #B45A12;  background: #FFE3CC; }
.label-revoked      { color: #FF5745;  background: #FFE1DE; }

/* ========== Table ========== */
.table-wrap { width: 100%; overflow-x: auto; }

/* Referenten-Welcome-Banner (vor dem orangenen Hero) */
.referent-welcome {
  background: #fff8f6;
  border-bottom: 1px solid #fde8e4;
  padding: 2.75rem 0 0;
}
.referent-welcome-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 2rem;
}
.referent-welcome-text {
  flex: 1;
  padding-bottom: 2.5rem;
}
.referent-welcome-greeting {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--vs-coral);
  margin-bottom: .6rem;
}
.referent-welcome-text p {
  color: var(--vs-dark);
  line-height: 1.65;
  margin-bottom: .55rem;
}
.referent-welcome-text a {
  color: var(--vs-coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.referent-welcome-corgi {
  flex-shrink: 0;
  align-self: flex-end;
}
.referent-welcome-corgi img {
  width: 180px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.08));
}
@media (max-width: 600px) {
  .referent-welcome { padding-top: 2rem; }
  .referent-welcome-inner { flex-direction: column; align-items: center; gap: 1rem; }
  .referent-welcome-text { padding-bottom: 1.5rem; text-align: center; }
  .referent-welcome-corgi { order: -1; margin-bottom: 0; }
  .referent-welcome-corgi img { width: 110px; }
}

/* Abschnittsüberschriften auf der Referenten-Seite */
.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vs-navy);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.section-heading-bar {
  display: inline-block;
  width: 4px;
  height: 1.3em;
  background: var(--vs-coral);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Team-Seite: volle Breite bis 1600px, dann zentriert mit Seitenabstand */
.team-page-wrap {
  width: 100%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
.table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--vs-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .68rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--vs-grey-300);
  background: var(--vs-grey-50);
}
.table tbody td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--vs-grey-200);
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--vs-grey-50); }

/* ========== Table toolbar (search + counter) ========== */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex-grow: 1;
  max-width: 380px;
}
.search-box i {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--vs-text-muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: .55rem 1rem .55rem 2.4rem;
  border: 1px solid var(--vs-grey-300);
  border-radius: 25px;
  font-family: inherit; font-size: .95rem;
  background: #fff;
}
.search-box input:focus {
  outline: none;
  border-color: var(--vs-coral);
  box-shadow: 0 0 0 3px rgba(255,110,94,.15);
}

/* ========== Sortable headers ========== */
.table thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}
.table thead th[data-sort]:hover { color: var(--vs-coral); }
.table thead th[data-sort] .sort-icon {
  margin-left: .35rem;
  font-size: .7rem;
  color: var(--vs-grey-300);
}
.table thead th[data-sort].sort-asc .sort-icon,
.table thead th[data-sort].sort-desc .sort-icon { color: var(--vs-coral); }
.table thead th { border-bottom: 2px solid var(--vs-coral); background: #fff; }
.table tbody tr.is-hidden { display: none; }

/* ========== Status pill (Ampel) ========== */
.status-form { margin: 0; }
.status-pill {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border: 0;
  border-radius: 25px;
  padding: .4rem 2.1rem .4rem .9rem;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23333' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1.5 6,6.5 11,1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: .65rem;
  line-height: 1.3;
  transition: filter .15s ease;
}
.status-pill:focus { outline: 2px solid rgba(255,110,94,.35); outline-offset: 2px; }
.status-pill:hover { filter: brightness(0.96); }
.status-pill-pending      { background-color: #E6E6E6; color: #444; }
.status-pill-unrestricted { background-color: #d8f2e1; color: #1f7a3a; }
.status-pill-limited      { background-color: #FFF7CC; color: #8C7600; }
.status-pill-restricted   { background-color: #FFE3CC; color: #B45A12; }
.status-pill-revoked      { background-color: #FFE1DE; color: #B33526; }

/* ========== Consent text + upload steps (referent page) ========== */
.consent-text-box {
  background: var(--vs-grey-50);
  border: 1px solid var(--vs-grey-300);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-height: 520px;
  overflow-y: auto;
  font-size: .9rem;
  line-height: 1.55;
}
.consent-text-box h4 { color: var(--vs-coral); font-size: 1rem; margin: 0 0 .5rem; }
.consent-text-box p:last-child { margin-bottom: 0; }
.consent-text-box ul { margin: .5rem 0; padding-left: 1.25rem; }

.consent-purposes {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: .5rem 0 .25rem;
}
.consent-purpose {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  cursor: pointer;
  padding: .5rem .65rem;
  background: #fff;
  border: 1px solid var(--vs-grey-300);
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.4;
  transition: all .15s ease;
}
.consent-purpose:hover { border-color: var(--vs-coral); }
.consent-purpose input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: .15rem;
  accent-color: var(--vs-coral);
  cursor: pointer;
}
.consent-purpose:has(input:checked) {
  background: #fffaf9;
  border-color: var(--vs-coral);
}

.upload-steps { list-style: none; padding: 0; margin: 0; counter-reset: ust; }
.upload-steps > li {
  position: relative;
  padding: 0 0 1.25rem 2.5rem;
  border-left: 2px solid var(--vs-grey-200);
  margin-left: 1rem;
}
.upload-steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.upload-steps > li::before {
  counter-increment: ust;
  content: counter(ust);
  position: absolute;
  left: -1rem; top: -.1rem;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--vs-coral);
  color: #fff;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.upload-steps > li > strong { display: block; margin-bottom: .35rem; }

/* ========== Chips (selectable on referent + filter on team) ========== */
.chip-group {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.chip {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: .35rem .75rem;
  border: 1px solid var(--vs-grey-300);
  border-radius: 25px;
  background: #fff;
  color: var(--vs-dark);
  font-size: .82rem;
  user-select: none;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--vs-coral); color: var(--vs-coral); }
.chip input { display: none; }
.chip:has(input:checked) {
  background: var(--vs-coral);
  border-color: var(--vs-coral);
  color: #fff;
}
.chip:has(input:checked):hover { background: var(--vs-coral-hover); color: #fff; }

/* Display-only chips in team table rows */
.row-topics { display: flex; flex-wrap: wrap; gap: .25rem; max-width: 320px; }
.chip-display {
  display: inline-block;
  padding: .15rem .55rem;
  background: var(--vs-grey-100);
  border-radius: 25px;
  font-size: .75rem;
  color: var(--vs-dark);
  white-space: nowrap;
}
.chip-display.chip-more { background: var(--vs-coral); color: #fff; font-weight: 600; }

/* Filter panel (collapsible) */
.filter-panel {
  background: #fff;
  border: 1px solid var(--vs-grey-300);
  border-radius: 12px;
}
.filter-panel > summary {
  padding: .85rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: .55rem;
}
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary i.fa-filter { color: var(--vs-coral); }
.filter-panel[open] > summary { border-bottom: 1px solid var(--vs-grey-200); }
.filter-panel-body { padding: .9rem 1.1rem 1.1rem; }
.filter-chips .chip { font-size: .78rem; padding: .25rem .65rem; }

/* Comment cell button */
.comment-cell {
  background: transparent; border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s ease;
}
.comment-cell:hover { background: var(--vs-grey-100); }
.comment-cell.has-comment { color: var(--vs-coral); }
.comment-cell.no-comment { color: var(--vs-grey-300); }
.comment-cell.no-comment:hover { color: var(--vs-coral); }

/* Tooltip for comment-cell — native title is fine; enhance with CSS to allow line-breaks */
.comment-cell[title] { position: relative; }

/* Modal */
.consenty-modal {
  border: 0;
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 520px;
  width: 92vw;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.consenty-modal::backdrop { background: rgba(0,0,0,.45); }
.consenty-modal h3 { font-size: 1.1rem; }

/* Dirty indicator */
.dirty-indicator { display: inline-flex; align-items: center; gap: .4rem; }
.dirty-indicator i { animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}

/* Toolbar form-select tweak */
.table-toolbar .form-select { font-size: .9rem; padding: .5rem 2.4rem .5rem 1rem; border-radius: 25px; }

/* ========== Lernkärtchen pill (team column) ========== */
.lk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--vs-grey-300);
  color: var(--vs-grey-400);
  font-size: .8rem;
  cursor: pointer;
  padding: 0;
  transition: all .15s ease;
}
.lk-pill:hover { transform: scale(1.08); }
.lk-pill-off { border-color: #bbb; color: #999; text-decoration: none; }
.lk-pill-off:hover { border-color: var(--vs-coral); color: var(--vs-coral); text-decoration: none; }
.lk-pill-waiting { border-color: var(--vs-coral); color: var(--vs-coral); background: #fffaf9; }
.lk-pill-yes { border-color: var(--vs-coral); background: var(--vs-coral); color: #fff; }
.lk-pill-trash:hover { border-color: #e53935 !important; color: #e53935 !important; }

/* Pilot-Badge (referent card header) */
.pilot-badge {
  display: inline-block;
  padding: .12rem .55rem;
  background: var(--vs-coral);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  border-radius: 25px;
}

.lernkarten-card { border-color: var(--vs-coral); }

/* ========== Compact cells: photo card + team pdf chips ========== */
.photo-card-compact .card-body { padding: .85rem 1.1rem; }

.cell-pdf-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .1rem .55rem;
  background: var(--vs-grey-100);
  border-radius: 25px;
  font-size: .75rem;
  white-space: nowrap;
}
.cell-pdf-chip:hover { background: var(--vs-grey-200); color: var(--vs-coral); }

.attach-icons { display: inline-flex; align-items: center; gap: .15rem; }
.attach-icon {
  display: inline-flex;
  width: 22px; height: 22px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: .85rem;
  transition: transform .15s ease, background .15s ease;
}
.attach-icon:hover { transform: rotate(-12deg); }
.attach-consent { color: var(--vs-coral); }
.attach-consent:hover { background: rgba(255, 110, 94, 0.12); color: var(--vs-coral); }
.attach-cv { color: var(--vs-navy); }
.attach-cv:hover { background: rgba(0, 72, 103, 0.12); color: var(--vs-navy); }
.attach-photo { color: #777; }
.attach-photo:hover { background: var(--vs-grey-200); color: var(--vs-dark); }

/* ========== Profile inline-edit (referent hero) ========== */
.profile-display {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.profile-edit-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all .15s ease;
}
.profile-edit-btn:hover {
  background: #fff;
  color: var(--vs-coral);
  border-color: #fff;
}
.profile-edit-form {
  display: flex; gap: .4rem; flex-wrap: wrap;
  align-items: center; margin-top: .35rem;
  max-width: 640px;
}
.profile-input-title { flex: 0 0 110px; }
.profile-input-name  { flex: 1 1 240px; min-width: 200px; }
.profile-title { color: rgba(255,255,255,.85); margin-right: .25rem; }


/* Token neu generieren — kleiner Inline-Button neben Token-Link */
.token-regen-btn {
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  color: var(--vs-text-muted);
  font-size: .75rem;
  line-height: 1;
  transition: color .15s, transform .2s;
  vertical-align: middle;
}
.token-regen-btn:hover {
  color: var(--vs-coral);
  transform: rotate(180deg);
}

/* ========== Token abgelaufen (404) ========== */
.token-expired-wrap {
  max-width: 520px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.token-expired-corgi {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.08));
}
.token-expired-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vs-dark);
  margin: 0;
}
.token-expired-text {
  color: var(--vs-text-muted);
  line-height: 1.7;
  margin: 0;
}
.token-expired-link {
  color: var(--vs-coral);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== Send-to-VetStage card ========== */
.send-card {
  text-align: center;
  border: 2px dashed var(--vs-coral);
  background: #fffaf9;
}

/* ========== Avatar ========== */
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--vs-coral) center/cover no-repeat;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.avatar-lg { width: 96px; height: 96px; font-size: 1.6rem; background-color: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.4); }
.avatar-md { width: 52px; height: 52px; font-size: 1.1rem; background-color: var(--vs-coral); color: #fff; border: 2px solid var(--vs-grey-200); }
.cell-name { font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 240px; }
.cell-email { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 240px; }

/* ========== Layout helpers ========== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.gap-1 { gap: .35rem; } .gap-2 { gap: .65rem; } .gap-3 { gap: 1rem; }
.flex-grow-1 { flex-grow: 1; }
.w-100 { width: 100%; }

.mt-1 { margin-top: .35rem; } .mt-2 { margin-top: .65rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .35rem; } .mb-2 { margin-bottom: .65rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; }
.me-1 { margin-right: .35rem; } .me-2 { margin-right: .65rem; }
.ms-auto { margin-left: auto; }
.py-1 { padding-top: .35rem; padding-bottom: .35rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }

.row { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.col { flex: 1 1 0; min-width: 0; }
.col-12 { flex: 0 0 100%; }
.col-md-6 { flex: 0 0 100%; }
.col-md-8 { flex: 0 0 100%; }
.col-md-4 { flex: 0 0 100%; }
@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 calc(50% - .625rem); }
  .col-md-8 { flex: 0 0 calc(66.666% - .625rem); }
  .col-md-4 { flex: 0 0 calc(33.333% - .625rem); }
}

/* ========== Tabs (simple) ========== */
.tabs {
  display: flex; gap: .5rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--vs-grey-300);
  margin-bottom: 1rem;
}
.tab-btn {
  background: transparent; border: 0;
  padding: .55rem 1rem;
  font: inherit; font-weight: 600;
  color: var(--vs-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--vs-coral); border-bottom-color: var(--vs-coral); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ========== Signature pad ========== */
.signature-frame {
  border: 2px dashed var(--vs-grey-300);
  border-radius: 12px;
  background: #fff;
  position: relative;
}
.signature-frame canvas {
  width: 100%; height: 200px;
  border-radius: 12px;
  display: block;
  touch-action: none;
}
.signature-frame.has-content { border-style: solid; border-color: var(--vs-coral); }

/* ========== Token-link box ========== */
.token-link-box {
  background: var(--vs-grey-50);
  border: 1px solid var(--vs-grey-300);
  border-radius: 8px;
  padding: .85rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85rem;
  word-break: break-all;
}

/* ========== Inline alert / flash ========== */
.alert {
  border-radius: 12px;
  padding: .85rem 1.1rem;
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-success { background: #d8f2e1; color: #1f7a3a; border-color: #b9e3c8; }
.alert-info    { background: #e6f3fb; color: #004867; border-color: #c3e0f0; }
.alert-danger  { background: #FFE1DE; color: #B33526; border-color: #ffc7c1; }

.flash-toast {
  position: fixed; top: 1rem; right: 1rem; z-index: 1080;
  max-width: 420px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--vs-grey-50);
  border-top: 1px solid var(--vs-grey-300);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: .85rem;
  color: var(--vs-text-muted);
}
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.site-footer a { color: var(--vs-text-muted); }
.site-footer a:hover { color: var(--vs-coral); }
.site-footer .footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--vs-dark); }
.site-footer .footer-brand img { height: 22px; }

/* ========== Inline action form ========== */
.inline-form { display: inline-flex; align-items: center; gap: .35rem; }

/* ========== Document download chip ========== */
.doc-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .55rem .85rem;
  background: #fff;
  border: 1px solid var(--vs-grey-300);
  border-radius: 8px;
  text-decoration: none;
  color: var(--vs-dark);
  font-size: .9rem;
  transition: all .2s ease;
}
.doc-chip:hover { border-color: var(--vs-coral); color: var(--vs-coral); }
.doc-chip .doc-icon { color: var(--vs-coral); font-size: 1.1rem; }

/* ========== Mobile ========== */
@media (max-width: 768px) {
  .navbar .container { flex-wrap: wrap; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  .card-body { padding: 1rem; }
  .table thead { display: none; }
  .table tbody tr {
    display: block;
    border: 1px solid var(--vs-grey-300);
    border-radius: 8px;
    margin-bottom: .75rem;
    padding: .75rem;
  }
  .table tbody td {
    display: flex; justify-content: space-between; gap: 1rem;
    border: 0; padding: .35rem 0;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--vs-text-muted);
    font-size: .75rem; text-transform: uppercase;
  }
}
