/* Paciolio Design System v2
   Navy #1B2A4A  Green #18B066  Bg #F5F6FA
   Font: DM Sans + Cormorant Garamond
*/

/* ---- Design Tokens ---- */
:root {
  --c-navy:      #1B2A4A;
  --c-navy-d:    #0f1e38;
  --c-navy-m:    #2a3f66;
  --c-navy-t10:  rgba(27,42,74,.10);
  --c-navy-t05:  rgba(27,42,74,.05);
  --c-green:     #18B066;
  --c-green-d:   #129150;
  --c-green-bg:  #e8f8f0;
  --c-page:      #F5F6FA;
  --c-surface:   #FFFFFF;
  --c-surface2:  #F9FAFB;
  --c-surface3:  #F0F2F7;
  --c-border:    #E4E7EF;
  --c-border-s:  #CAD0DE;
  --c-text:      #1B2A4A;
  --c-text-2:    #4A5568;
  --c-text-3:    #718096;
  --c-text-4:    #A0AEC0;
  --sh-xs:  0 1px 2px rgba(27,42,74,.06);
  --sh-sm:  0 2px 6px rgba(27,42,74,.08);
  --sh-md:  0 4px 14px rgba(27,42,74,.10);
  --sh-lg:  0 8px 28px rgba(27,42,74,.12);
  --sh-xl:  0 16px 48px rgba(27,42,74,.14);
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 9999px;
  --nav-h:  50px;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--c-page);
  color: var(--c-text);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-navy); text-decoration: none; }
a:hover { color: var(--c-green); }
h1,h2,h3,h4,h5,h6 { color: var(--c-navy); font-weight: 600; }

/* ---- Bootstrap Overrides ---- */
.text-primary { color: var(--c-navy) !important; }
.bg-primary    { background-color: var(--c-navy) !important; }
.btn { border-radius: var(--r-sm); font-weight: 500; transition: all .18s ease; }
.btn-primary { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--c-navy-d); border-color: var(--c-navy-d); color: #fff; }
.btn-primary:disabled, .btn-primary.disabled { background: var(--c-navy); border-color: var(--c-navy); opacity: .5; }
.btn-outline-primary { color: var(--c-navy); border-color: var(--c-navy); }
.btn-outline-primary:hover { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.btn-accent { background: var(--c-green); border-color: var(--c-green); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--c-green-d); border-color: var(--c-green-d); color: #fff; }
.form-control:focus, .form-select:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(24,176,102,.18);
  outline: none;
}
.form-control, .form-select {
  border-color: var(--c-border);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
}
.badge { font-weight: 600; letter-spacing: .02em; }
.dropdown-menu {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: .9rem;
}
.dropdown-item { border-radius: var(--r-sm); padding: .45rem .9rem; }
.dropdown-item:hover { background: var(--c-surface3); color: var(--c-navy); }
.dropdown-item.active, .dropdown-item:active { background: var(--c-navy-t10); color: var(--c-navy); }
.alert { border-radius: var(--r-md); border: none; }
.alert-danger  { background: #fff0f0; color: #991b1b; }
.alert-success { background: var(--c-green-bg); color: #155724; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-info    { background: #eff6ff; color: #1e40af; }
.table { font-size: .88rem; }
.table > thead > tr > th {
  background: var(--c-surface3);
  color: var(--c-text-2);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--c-border);
  padding: .65rem .85rem;
}
.table > tbody > tr > td { padding: .6rem .85rem; border-color: var(--c-border); vertical-align: middle; }
.table-hover > tbody > tr:hover { background: var(--c-navy-t05); }
.table-striped > tbody > tr:nth-of-type(odd) { background: var(--c-surface2); }

/* ---- Navbar ---- */
.pac-nav {
  height: var(--nav-h);
  background: var(--c-navy);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: .75rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--sh-sm);
}
.pac-nav .pac-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: .5rem;
}
.pac-wordmark {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -.04em;
  color: #fff;
  line-height: 1;
  user-select: none;
}
.pac-wordmark .io { color: var(--c-green); }
.pac-divider { width: 1px; height: 16px; background: rgba(255,255,255,.18); flex-shrink: 0; }
.pac-tagline {
  font-family: var(--font-serif);
  font-size: .75rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: .12em;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
}
.pac-nav-spacer { flex: 1; }
.pac-nav-icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  font-size: .9rem;
  text-decoration: none;
}
.pac-nav-icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.pac-client-btn {
  display: flex; align-items: center; gap: .45rem;
  height: 32px; padding: 0 .7rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
  font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .15s;
  max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pac-client-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.pac-client-btn .bi { opacity: .7; flex-shrink: 0; }
.pac-user-btn {
  display: flex; align-items: center; gap: .45rem;
  height: 32px; padding: 0 .7rem 0 .55rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
  font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.pac-user-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }

/* ---- Stepper ---- */
.pac-steps {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.pac-steps .pac-steps-inner {
  display: flex; align-items: center; justify-content: center;
  padding: .55rem 1rem; gap: 0;
}
.ps-item { display: flex; align-items: center; flex-shrink: 0; }
.ps-link {
  display: flex; align-items: center; gap: .45rem;
  padding: .2rem .4rem;
  border-radius: var(--r-sm);
  text-decoration: none; transition: background .15s; cursor: pointer;
}
.ps-item:not(.now):not(.later) .ps-link:hover { background: var(--c-navy-t05); }
.ps-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0; transition: all .2s;
}
.ps-item.done   .ps-dot { background: var(--c-green); color: #fff; }
.ps-item.now    .ps-dot { background: var(--c-navy); color: #fff; box-shadow: 0 0 0 3px rgba(27,42,74,.14); }
.ps-item.later  .ps-dot { background: var(--c-surface3); color: var(--c-text-4); border: 1.5px solid var(--c-border); }
.ps-label { font-size: .76rem; font-weight: 500; color: var(--c-text-3); white-space: nowrap; }
.ps-item.now    .ps-label { color: var(--c-navy); font-weight: 700; }
.ps-item.done   .ps-label { color: var(--c-text-2); }
.ps-item.later  .ps-label { color: var(--c-text-4); }
.ps-line {
  flex: 1; max-width: 52px; min-width: 10px; height: 1.5px;
  background: var(--c-border); margin: 0 2px; flex-shrink: 0; transition: background .2s;
}
.ps-line.done { background: var(--c-green); }

/* ---- Brand (login + footer) ---- */
.brand-wordmark {
  font-family: var(--font-sans); font-size: 3rem; font-weight: 500;
  letter-spacing: -.06em; line-height: 1; color: var(--c-navy); user-select: none;
}
.brand-io { color: var(--c-green); }
.brand-tagline {
  font-family: var(--font-serif); font-size: 0.8125rem; font-weight: 300;
  font-style: italic; letter-spacing: .14em; color: var(--c-text-4); margin-top: 8px;
}
.brand-wordmark-sm {
  font-family: var(--font-sans); font-size: 1.3rem; font-weight: 500;
  letter-spacing: -.04em; line-height: 1; color: #fff; user-select: none;
}
.brand-wordmark-sm .brand-io { color: var(--c-green); }
.brand-divider-v { width: 1px; height: 16px; background: rgba(255,255,255,.2); }
.brand-tagline-sm {
  font-family: var(--font-serif); font-size: 0.8125rem; font-weight: 300;
  font-style: italic; letter-spacing: .12em; color: rgba(255,255,255,.42); white-space: nowrap;
}
.pio-mark { font-family: var(--font-sans); font-weight: 700; color: var(--c-navy); letter-spacing: -.04em; line-height: 1; user-select: none; }
.pio-mark-lg { font-size: 2.8rem; }
.pio-mark-sm { font-size: 1.1rem; }
.pio-g { color: var(--c-green); }

/* ---- Cards ---- */
.info-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1rem; box-shadow: var(--sh-sm);
}
.metric-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 1rem 1.25rem;
  text-align: center; box-shadow: var(--sh-xs); transition: box-shadow .18s;
}
.metric-card:hover { box-shadow: var(--sh-md); }
.metric-card .value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--c-navy); }
.metric-card .label { font-size: .78rem; color: var(--c-text-3); margin-top: .25rem; }

/* ---- Upload Zone ---- */
.upload-zone {
  border: 2px dashed var(--c-border-s); border-radius: var(--r-lg);
  padding: 2.5rem; text-align: center; background: var(--c-surface);
  cursor: pointer; transition: all .2s ease; color: var(--c-text-3);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--c-green); background: var(--c-green-bg); color: var(--c-green-d);
}
.upload-zone .bi { font-size: 2rem; opacity: .5; }
.upload-zone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-zone-label { font-size: .9rem; margin-top: .5rem; display: block; }

/* ---- Pipeline Logs ---- */
.pipeline-logs {
  background: #0D1B2E; color: #a6adc8; border-radius: var(--r-md);
  padding: .75rem 1rem; font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: .8rem; max-height: 240px; overflow-y: auto; line-height: 1.5;
}
.pipeline-logs .log-line { margin-bottom: 1px; }
.pipeline-logs .log-ok   { color: #68d391; }
.pipeline-logs .log-warn { color: #f6ad55; }
.pipeline-logs .log-err  { color: #fc8181; }
.pipeline-status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: var(--r-full);
}
.pipeline-status.running { background: #dbeafe; color: #1e40af; }
.pipeline-status.done    { background: var(--c-green-bg); color: var(--c-green-d); }
.pipeline-status.error   { background: #fee2e2; color: #991b1b; }
.pipeline-status.idle    { background: var(--c-surface3); color: var(--c-text-3); }

/* ---- Notes ---- */
.notes-section-header {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .85rem; background: var(--c-surface2);
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  cursor: pointer; transition: background .15s; user-select: none;
}
.notes-section-header:hover { background: var(--c-surface3); }
.notes-section-header .notes-section-title { font-weight: 600; font-size: .88rem; color: var(--c-navy); flex: 1; }
.notes-section-header .notes-section-badge {
  font-size: .7rem; padding: .15rem .45rem; border-radius: var(--r-full);
  background: var(--c-navy-t10); color: var(--c-text-2);
}
.notes-section-body {
  border: 1px solid var(--c-border); border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md); background: var(--c-surface); padding: .75rem;
}
.notes-row {
  display: grid; grid-template-columns: 1fr auto; align-items: start;
  gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--c-border);
}
.notes-row:last-child { border-bottom: none; }
.notes-row-label { font-size: .82rem; color: var(--c-text-2); line-height: 1.4; }
.notes-row-value { font-size: .82rem; font-weight: 600; color: var(--c-navy); text-align: right; white-space: nowrap; }

/* ---- Deliverable Cards ---- */
.deliverable-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem;
  box-shadow: var(--sh-xs); transition: box-shadow .18s, border-color .18s;
}
.deliverable-card:hover { box-shadow: var(--sh-md); border-color: var(--c-border-s); }
.deliverable-card .dc-title { font-weight: 600; font-size: .92rem; color: var(--c-navy); display: flex; align-items: center; gap: .45rem; }
.deliverable-card .dc-desc  { font-size: .8rem; color: var(--c-text-3); line-height: 1.45; }
.deliverable-card .dc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }

/* ---- Token Package Cards ---- */
.token-package-card {
  background: var(--c-surface); border: 2px solid var(--c-border); border-radius: var(--r-lg);
  padding: 1.5rem; text-align: center; transition: all .2s; cursor: pointer;
}
.token-package-card:hover { border-color: var(--c-navy-m); box-shadow: var(--sh-md); transform: translateY(-2px); }
.token-package-card.featured { border-color: var(--c-green); background: linear-gradient(180deg, #fff 0%, var(--c-green-bg) 100%); }
.token-package-card .pkg-amount { font-size: 2.2rem; font-weight: 700; color: var(--c-navy); line-height: 1; }
.token-package-card .pkg-label { font-size: .78rem; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .08em; margin-top: .2rem; }
.token-package-card .pkg-price { font-size: 1.3rem; font-weight: 700; color: var(--c-green-d); margin: .6rem 0 .2rem; }

/* ---- Login Card ---- */
.login-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-xl); box-shadow: var(--sh-xl); }

/* ---- Status Indicators ---- */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.ok      { background: var(--c-green); }
.status-dot.warn    { background: #f59e0b; }
.status-dot.error   { background: #ef4444; }
.status-dot.pending { background: var(--c-text-4); }

/* ---- Cross-check Cells ---- */
.xcheck-ok   { color: var(--c-green-d); background: var(--c-green-bg); }
.xcheck-fail { color: #991b1b; background: #fee2e2; }
.xcheck-warn { color: #92400e; background: #fffbeb; }
.xcheck-cell { font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: var(--r-full); display: inline-block; }

/* ---- Offcanvas ---- */
.offcanvas { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.offcanvas-header { background: var(--c-navy); color: #fff; border-radius: var(--r-lg) 0 0 0; }
.offcanvas-title { font-weight: 600; font-size: .95rem; }

/* ---- Footer watermark ---- */
.paciolio-footer {
  position: fixed; bottom: 12px; right: 16px;
  display: flex; align-items: center; gap: .35rem;
  opacity: .22; pointer-events: none; user-select: none; z-index: 10; transition: opacity .2s;
}
.paciolio-footer:hover { opacity: .55; }
.paciolio-footer-text { font-family: var(--font-sans); font-size: .85rem; font-weight: 500; letter-spacing: -.03em; color: var(--c-navy); }

/* ---- Paciolisation animation ---- */
.paciolisation { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 3rem 1rem; }
.paciolisation-word { display: flex; gap: 1px; font-family: var(--font-sans); font-size: 1.8rem; font-weight: 600; letter-spacing: -.04em; color: var(--c-text-4); }
.pio-letter { transition: color .25s, transform .25s; display: inline-block; }
.pio-letter.lit { color: var(--c-navy); transform: translateY(-2px); }
.paciolisation-dots { display: flex; gap: 6px; }
.pio-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-border-s); animation: pioDotPulse 1.4s ease-in-out infinite; }
.pio-dot:nth-child(1) { animation-delay: 0s; }
.pio-dot:nth-child(2) { animation-delay: .18s; }
.pio-dot:nth-child(3) { animation-delay: .36s; }
.pio-dot:nth-child(4) { animation-delay: .54s; }
.pio-dot:nth-child(5) { animation-delay: .72s; }
.pio-dot:nth-child(6) { animation-delay: .90s; }
.pio-dot:nth-child(7) { animation-delay: 1.08s; }
.pio-dot:nth-child(8) { animation-delay: 1.26s; }
@keyframes pioDotPulse {
  0%, 80%, 100% { background: var(--c-border-s); transform: scale(1); }
  40% { background: var(--c-navy-m); transform: scale(1.4); }
}
.paciolisation-stage { font-size: .8rem; color: var(--c-text-3); letter-spacing: .05em; }

/* ---- Toast notifications ---- */
.toast-container-global {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem; pointer-events: none;
}
.toast-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem; border-radius: var(--r-md);
  font-size: .86rem; font-weight: 500; box-shadow: var(--sh-lg);
  background: var(--c-surface); color: var(--c-text);
  border-left: 3px solid var(--c-border-s);
  min-width: 240px; max-width: 380px;
  opacity: 1; transition: opacity .3s, transform .3s; pointer-events: auto;
}
.toast-success { border-left-color: var(--c-green); color: var(--c-green-d); background: var(--c-green-bg); }
.toast-error   { border-left-color: #ef4444; color: #991b1b; background: #fee2e2; }
.toast-warning { border-left-color: #f59e0b; color: #92400e; background: #fffbeb; }
.toast-info    { border-left-color: #3b82f6; color: #1e40af; background: #eff6ff; }

/* ---- Step page header ---- */
.step-page-header { margin-bottom: 1.5rem; }
.step-page-title { font-size: 1.3rem; font-weight: 700; color: var(--c-navy); margin: 0; }
.step-page-subtitle { font-size: .85rem; color: var(--c-text-3); margin-top: .25rem; }
.section-divider { height: 1px; background: var(--c-border); margin: 1.5rem 0; }

/* ---- Step progress bar ---- */
.step-progress { height: 3px; background: var(--c-border); border-radius: 2px; overflow: hidden; margin-bottom: 1.25rem; }
.step-progress-fill { height: 100%; background: linear-gradient(90deg, var(--c-navy-m), var(--c-green)); border-radius: 2px; transition: width .4s ease; }

/* ---- Org members ---- */
.org-member-row { display: flex; align-items: center; gap: .75rem; padding: .65rem .9rem; border-bottom: 1px solid var(--c-border); }
.org-member-row:last-child { border-bottom: none; }
.org-member-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c-surface3); display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: var(--c-navy); flex-shrink: 0; }

/* ---- Low balance bar ---- */
.balance-warning-bar { background: #fffbeb; border-bottom: 1px solid #fde68a; padding: .45rem 1rem; font-size: .82rem; color: #92400e; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* ---- Mapping table ---- */
.mapping-table th { font-size: .72rem; }
.mapping-table td { font-size: .82rem; }
.mapping-table .td-account { font-family: Consolas, monospace; font-size: .78rem; }

/* ---- Utility classes ---- */
.text-navy   { color: var(--c-navy) !important; }
.text-green  { color: var(--c-green) !important; }
.text-muted  { color: var(--c-text-3) !important; }
.bg-surface  { background: var(--c-surface) !important; }
.bg-surface2 { background: var(--c-surface2) !important; }
.rounded-pac { border-radius: var(--r-md) !important; }
.border-pac  { border: 1px solid var(--c-border) !important; }
.shadow-pac  { box-shadow: var(--sh-sm) !important; }

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border-s); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-4); }

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .pac-tagline { display: none; }
  .ps-label { display: none !important; }
  .ps-line  { min-width: 6px; max-width: 20px; }
  .pac-steps .pac-steps-inner { padding: .45rem .5rem; }
  .deliverable-card { padding: 1rem; }
  .info-card { padding: 1rem; }
  .metric-card .value { font-size: 1.4rem; }
}
@media (max-width: 575px) {
  .pac-client-btn span:not(.bi) { display: none; }
  .pac-user-btn span:not(.bi)   { display: none; }
}

@media (max-width: 991.98px), (hover: none), (pointer: coarse) {
  :is(.btn, button) {
    min-height: 44px;
  }

  :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea, .form-control, .form-select) {
    min-height: 44px;
    font-size: 16px;
  }
}

/* ---- Notes navigation (step 4/5) ---- */
.notes-topbar {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: .55rem .85rem;
  margin-bottom: .75rem;
  box-shadow: var(--sh-xs);
}
.notes-tabs-sticky { position: sticky; top: 0; z-index: 24; }
.notes-topbar-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
}
.notes-progress-inline { display: flex; align-items: center; gap: .5rem; }
.notes-progress-label { font-size: .78rem; white-space: nowrap; color: var(--c-text-2); }
.notes-template-strip {
  padding: .5rem 0 .25rem;
  border-top: 1px solid var(--c-border);
  margin-top: .5rem;
}
.notes-nav-strip {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding-top: .45rem; border-top: 1px solid var(--c-border); margin-top: .45rem;
}
.notes-nav-pill {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--c-border); border-radius: var(--r-sm);
  padding: 2px 8px; font-size: .72rem; font-weight: 500;
  background: var(--c-surface); color: var(--c-text-2);
  cursor: pointer; transition: all .15s; white-space: nowrap; line-height: 1.5;
}
.notes-nav-pill:hover { border-color: var(--c-green); background: var(--c-green-bg); color: var(--c-navy); }
.notes-nav-pill.active { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.notes-nav-pill.active .notes-nav-count,
.notes-nav-pill.active .note-nav-progress { background: rgba(255,255,255,.25) !important; color: #fff !important; }
.notes-nav-num { font-weight: 700; min-width: 14px; text-align: center; }
.notes-nav-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.notes-nav-count { font-size: .65rem; padding: 1px 4px; line-height: 1.2; }
.note-nav-progress { font-size: .65rem; padding: 1px 4px; line-height: 1.2; }
.notes-nav-pill.has-unanswered { border-color: #fbbf24; background: #fffbeb; }
.notes-nav-pill.all-done { border-color: var(--c-green); }
.notes-nav-row {
  display: flex; align-items: center; gap: 6px;
  padding-top: .4rem; border-top: 1px solid var(--c-border); margin-top: .4rem;
}
.notes-nav-row .notes-nav-strip-wrap { flex: 1; min-width: 0; }
.notes-global-prev, .notes-global-next { flex-shrink: 0; padding: 2px 6px; font-size: .82rem; }
.notes-content-area {
  height: calc(100vh - 195px); overflow-y: auto;
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-page); padding: .5rem;
}
.note-page { scroll-margin-top: 0; }
.note-page.info-card { padding: 1rem 1.25rem; margin-bottom: 0; border-radius: var(--r-md); min-height: 100%; }
.notes-search-result-item { cursor: pointer; transition: background .1s; border-radius: var(--r-sm); margin: 2px 6px; }
.notes-search-result-item:hover, .notes-search-result-item:focus { background: var(--c-surface3) !important; outline: none; }
@keyframes search-highlight-pulse {
  0%,60% { background: #fef3c7; }
  100% { background: transparent; }
}
.search-highlight { animation: search-highlight-pulse 1.8s ease forwards; border-radius: 4px; }

/* ---- Other component helpers ---- */
.btn-nav { min-width: 160px; padding: .6rem 1.5rem; font-weight: 600; }
.table-responsive { position: relative; }
.upload-zone-inner { display: flex; min-height: 210px; flex-direction: column; align-items: center; justify-content: center; }
.upload-zone-icon { font-size: 2.25rem; color: var(--c-navy); }
.upload-zone-badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 10px; border-radius: var(--r-full); margin-bottom: .5rem;
}
.upload-zone-badge.required { background: var(--c-navy); color: #fff; }
.upload-zone-badge.optional { background: var(--c-surface3); color: var(--c-text-3); }
.upload-zone.is-dragover { border-color: var(--c-green); border-style: solid; background: var(--c-green-bg); box-shadow: 0 0 0 4px rgba(24,176,102,.14); }
.upload-zone.is-locked { cursor: not-allowed; border-color: var(--c-border); background: var(--c-surface2); opacity: .9; }
.upload-zone.is-locked:hover { border-color: var(--c-border); background: var(--c-surface2); }
.upload-selected-name { font-size: .86rem; color: var(--c-text-3); word-break: break-word; max-width: 100%; }
.upload-selected-name.is-selected { color: var(--c-green); font-weight: 600; }
.upload-submit-btn { min-height: 54px; min-width: 320px; font-weight: 700; }

/* UX PRO auth/live alignment */
:root {
  --c-page: #f6f0e6;
  --c-surface: rgba(255,252,247,.94);
  --c-surface2: rgba(255,255,255,.72);
  --c-surface3: rgba(23,37,59,.06);
  --c-border: rgba(23,37,59,.10);
  --c-border-s: rgba(23,37,59,.18);
  --c-text: #17253b;
  --c-text-2: #53647c;
  --c-text-3: #718096;
  --c-navy: #17253b;
  --c-navy-d: #111d31;
  --c-green: #209561;
  --c-green-d: #187c50;
  --c-green-bg: rgba(32,149,97,.12);
  --sh-md: 0 18px 42px rgba(23,37,59,.10);
  --sh-lg: 0 28px 64px rgba(23,37,59,.12);
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
}

body {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.96), transparent 24%),
    radial-gradient(circle at left center, rgba(32,149,97,.08), transparent 18%),
    linear-gradient(180deg, #f6f0e6 0%, #f7f2ea 55%, #f3ecdf 100%) !important;
}

.login-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(18px);
}

.btn,
.form-control,
.form-select,
.alert {
  border-radius: var(--r-sm);
}

.btn-primary {
  box-shadow: 0 18px 28px rgba(23,37,59,.12);
}

.form-control,
.form-select {
  min-height: 42px;
  background: rgba(255,255,255,.92);
}

.bg-light-subtle,
.border.rounded {
  border-color: var(--c-border) !important;
  border-radius: var(--r-lg) !important;
  background: rgba(255,255,255,.62) !important;
}
