/* ==========================================================================
   NetBill Suite Tools — Shared Styles for CV Builder, PDF Toolkit & Contracts
   Layered cleanly on top of main.css tokens
   ========================================================================== */

.suite-hero {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
.suite-hero h1 {
  margin: 0.45rem 0 0.55rem;
  max-width: 24ch;
}
.suite-hero .lead {
  max-width: 62ch;
  margin: 0;
}
.suite-quota-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}
.suite-quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  background: color-mix(in oklch, var(--accent) 12%, var(--surface));
  color: var(--ink);
  border: 1px solid color-mix(in oklch, var(--accent) 32%, var(--line));
}
.suite-quota-pill.is-pro {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.suite-quota-pill.is-empty {
  background: color-mix(in oklch, #dc2626 12%, var(--surface));
  color: #dc2626;
  border-color: color-mix(in oklch, #dc2626 35%, var(--line));
}

/* Tool mode tabs */
.suite-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.suite-tab {
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.suite-tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Split layout */
.suite-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}
.suite-card {
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}
.suite-card h2, .suite-card h3 {
  margin: 0;
}

/* Repeater rows (CV experience / education) */
.suite-repeater {
  display: grid;
  gap: 0.75rem;
}
.suite-rep-item {
  padding: 0.9rem;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}
.suite-rep-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.suite-rep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.suite-pro-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 38%, transparent);
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Live A4 Document Preview Sheet */
.suite-preview-wrap {
  position: sticky;
  top: 84px;
}
.suite-a4-sheet {
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  padding: 2rem;
  min-height: 620px;
  font-family: "Instrument Sans", system-ui, sans-serif;
  line-height: 1.48;
  font-size: 0.88rem;
}
.suite-a4-sheet.tpl-modern {
  display: grid;
  grid-template-columns: 33% 67%;
  padding: 0;
  overflow: hidden;
}
.cv-modern-side {
  background: #0f172a;
  color: #f1f5f9;
  padding: 1.75rem 1.25rem;
}
.cv-modern-side h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #34d399;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  padding-bottom: 0.35rem;
  margin: 1.2rem 0 0.6rem;
}
.cv-modern-main {
  padding: 1.75rem 1.65rem;
}
.cv-photo-thumb {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #10b981;
  margin-bottom: 0.75rem;
}
.cv-head-classic {
  border-bottom: 2px solid #0f766e;
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.cv-head-executive {
  background: #111827;
  color: #fff;
  margin: -2rem -2rem 1.4rem;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.cv-name { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.15; }
.cv-role { font-size: 0.98rem; color: #0f766e; font-weight: 600; margin: 0.25rem 0 0; }
.cv-head-executive .cv-role { color: #34d399; }
.cv-contact { font-size: 0.78rem; color: #475569; margin-top: 0.45rem; }
.cv-head-executive .cv-contact { color: #cbd5e1; }
.cv-sec-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f766e;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.28rem;
  margin: 1.15rem 0 0.6rem;
}
.cv-entry { margin-bottom: 0.75rem; }
.cv-entry-head { display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 700; font-size: 0.88rem; }
.cv-entry-org { color: #475569; font-size: 0.82rem; font-weight: 500; }
.cv-entry-desc { margin: 0.25rem 0 0; color: #334155; font-size: 0.82rem; white-space: pre-line; }
.cv-skill-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.cv-skill-tag {
  font-size: 0.74rem;
  padding: 0.18rem 0.52rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
}
.cv-modern-side .cv-skill-tag {
  background: rgba(255,255,255,0.12);
  color: #f8fafc;
}

/* Dropzone & File List (PDF Tools) */
.pdf-dropzone {
  position: relative;
  border: 2px dashed color-mix(in oklch, var(--accent) 45%, var(--line));
  border-radius: 14px;
  padding: 2rem 1.25rem;
  text-align: center;
  background: color-mix(in oklch, var(--accent) 4%, var(--paper));
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.pdf-dropzone:hover,
.pdf-dropzone.is-drag {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, var(--paper));
}
.pdf-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.pdf-file-list {
  display: grid;
  gap: 0.5rem;
}
.pdf-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}
.pdf-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.pdf-thumb-card {
  padding: 0.65rem;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.5rem;
  text-align: center;
}
.pdf-thumb-card img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}

/* Signature Canvas */
.sig-pad-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  touch-action: none;
}
.sig-pad-canvas {
  display: block;
  width: 100%;
  height: 160px;
  cursor: crosshair;
}
.pdf-sign-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.pdf-sign-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Legal / Reminder Letter Preview */
.letter-body-preview {
  white-space: pre-line;
  font-size: 0.9rem;
  line-height: 1.62;
  color: #1f2937;
}
.letter-header-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid #0f766e;
  padding-bottom: 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
}

/* Upsell Banner & Dialog */
.suite-upsell-banner {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklch, var(--accent) 42%, var(--line));
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 11%, var(--surface)), var(--surface));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.suite-upsell-banner strong { display: block; font-size: 0.98rem; margin-bottom: 0.2rem; }
.suite-upsell-banner p { margin: 0; font-size: 0.86rem; color: var(--ink-2); }

.suite-dialog {
  width: min(520px, calc(100% - 1.5rem));
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}
.suite-dialog::backdrop {
  background: rgba(10, 15, 30, 0.65);
  backdrop-filter: blur(5px);
}
.suite-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--line);
}
.suite-dialog-head h3 { margin: 0; font-size: 1.12rem; }
.suite-dialog-body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: grid;
  gap: 0.95rem;
}
.suite-dialog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
}
.suite-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

@media (max-width: 960px) {
  .suite-split { grid-template-columns: 1fr; }
  .suite-preview-wrap { position: static; }
  .suite-quota-box { align-items: flex-start; }
  .suite-rep-grid { grid-template-columns: 1fr; }
  .suite-a4-sheet.tpl-modern { grid-template-columns: 1fr; }
}
