/* ============================================================
   Pigee Portal — Full redesign
   Light / Dark theme, professional SaaS aesthetic
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --brand:        #0A1F44;
  --brand-dark:   #061229;
  --brand-light:  #E8EDF5;
  --brand-mid:    #4A7CC7;
  --text:         #111827;
  --text-2:       #374151;
  --muted:        #6B7280;
  --muted-2:      #9CA3AF;
  --border:       #E5E7EB;
  --surface:      #FFFFFF;
  --surface-2:    #F9FAFB;
  --bg:           #F3F4F6;
  --danger:       #DC2626;
  --danger-light: #FEF2F2;
  --success:      #059669;
  --success-light:#D1FAE5;
  --warning:      #D97706;
  --warning-light:#FFFBEB;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.15);
  --sidebar-w:    240px;
  --topbar-h:     0px;
  --transition:   .18s ease;
}

/* ── Dark theme ─────────────────────────────────────────── */
[data-theme="dark"] {
  --brand:        #1A6BC0;
  --brand-dark:   #0A1F44;
  --brand-light:  #061229;
  --brand-mid:    #4A7CC7;
  --text:         #F9FAFB;
  --text-2:       #D1D5DB;
  --muted:        #9CA3AF;
  --muted-2:      #6B7280;
  --border:       #374151;
  --surface:      #1F2937;
  --surface-2:    #111827;
  --bg:           #0F172A;
  --danger-light: #450A0A;
  --success-light:#064E3B;
  --warning-light:#451A03;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.3);
  --shadow:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }

/* ── Splash ─────────────────────────────────────────────── */
.pp-splash {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100vh; gap: 16px;
}
.pp-splash__logo { animation: pp-pulse 1.4s ease infinite; }
@keyframes pp-pulse { 0%,100%{opacity:1}50%{opacity:.4} }

/* ── Marketing / Auth pages ─────────────────────────────── */
.pp-auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) { .pp-auth-page { grid-template-columns: 1fr; } }

.pp-auth-hero {
  background: linear-gradient(145deg, #061229 0%, #0A1F44 40%, #0A1F44 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 900px) { .pp-auth-hero { display: none; } }

.pp-auth-hero__logo { display: flex; align-items: center; gap: 12px; }
.pp-auth-hero__logo-icon {
  width: 42px; height: 42px; background: rgba(255,255,255,.15);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.pp-auth-hero__brand { font-size: 18px; font-weight: 700; }

.pp-auth-hero__content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 0; }
.pp-auth-hero__headline { font-size: 36px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.pp-auth-hero__headline span { color: #7EB0E8; }
.pp-auth-hero__sub { font-size: 17px; color: rgba(255,255,255,.75); line-height: 1.6; margin-bottom: 40px; }
.pp-auth-hero__features { display: flex; flex-direction: column; gap: 14px; }
.pp-auth-hero__feature {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,255,255,.08); border-radius: 10px; padding: 14px 16px;
}
.pp-auth-hero__feature-icon { font-size: 20px; flex-shrink: 0; }
.pp-auth-hero__feature-text strong { display: block; font-size: 14px; font-weight: 600; }
.pp-auth-hero__feature-text span { font-size: 13px; color: rgba(255,255,255,.65); }

.pp-auth-hero__trust { font-size: 12px; color: rgba(255,255,255,.5); }
.pp-auth-hero__trust-badges { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.pp-auth-hero__badge { background: rgba(255,255,255,.1); border-radius: 20px; padding: 5px 12px; font-size: 12px; }

.pp-auth-panel {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
}
.pp-auth-form { width: 100%; max-width: 400px; }
.pp-auth-form__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.pp-auth-form__logo-icon { width: 36px; height: 36px; background: var(--brand); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.pp-auth-form__brand { font-size: 16px; font-weight: 700; color: var(--text); }
.pp-auth-form__title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.pp-auth-form__sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.pp-auth-form__footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--muted); }
.pp-auth-form__footer a { font-weight: 600; }

/* ── Forms ──────────────────────────────────────────────── */
.pp-form-group { margin-bottom: 16px; }
.pp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pp-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.pp-input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; color: var(--text);
  background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.pp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10,31,68,.15); }
.pp-input.error { border-color: var(--danger); }
.pp-input[type="color"] { height: 42px; padding: 4px 6px; cursor: pointer; }
.pp-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.pp-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.pp-divider::before, .pp-divider::after { content:''; flex:1; height:1px; background:var(--border); }

/* ── Buttons ─────────────────────────────────────────────── */
.pp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent; transition: all var(--transition);
  white-space: nowrap; font-family: inherit; text-decoration: none; line-height: 1;
}
.pp-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.pp-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.pp-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.pp-btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.pp-btn--ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.pp-btn--danger { background: transparent; color: var(--danger); border-color: var(--border); }
.pp-btn--danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.pp-btn--google { background: var(--surface); color: var(--text); border-color: var(--border); width: 100%; }
.pp-btn--google:hover { background: var(--surface-2); }
.pp-btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.pp-btn--full { width: 100%; }
.pp-btn--icon { padding: 8px; border-radius: 8px; }

/* ── App shell ───────────────────────────────────────────── */
.pp-app { display: flex; min-height: 100vh; }

/* Sidebar */
.pp-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 200; transition: transform var(--transition);
  overflow-y: auto;
}
.pp-sidebar__top { padding: 20px 16px 12px; border-bottom: 1px solid var(--border); }
.pp-sidebar__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.pp-sidebar__logo-icon { width: 34px; height: 34px; background: var(--brand); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pp-sidebar__logo-text { font-weight: 800; font-size: 15px; color: var(--text); }
.pp-sidebar__logo-sub { font-size: 11px; color: var(--muted); }

.pp-sidebar__nav { flex: 1; padding: 10px 10px; }
.pp-nav-section { font-size: 11px; font-weight: 600; color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; padding: 14px 8px 4px; }
.pp-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer; border-radius: 8px; margin-bottom: 2px;
  transition: all var(--transition); border: none; background: none; width: 100%; text-align: left;
}
.pp-nav-item:hover { background: var(--surface-2); color: var(--text); }
.pp-nav-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
[data-theme="dark"] .pp-nav-item.active { background: rgba(10,31,68,.2); color: var(--brand-mid); }
.pp-nav-item__icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }
.pp-nav-item__badge { margin-left: auto; background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }

.pp-sidebar__bottom {
  padding: 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.pp-sidebar__user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.pp-sidebar__avatar { width: 32px; height: 32px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pp-sidebar__user-info { flex: 1; min-width: 0; }
.pp-sidebar__user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sidebar__user-plan { font-size: 11px; color: var(--muted); }
.pp-sidebar__actions { display: flex; gap: 6px; }

/* Main content */
.pp-main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.pp-topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 100;
}
.pp-topbar__left { display: flex; align-items: center; gap: 12px; }
.pp-topbar__breadcrumb { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pp-topbar__breadcrumb span { color: var(--text); font-weight: 600; }
.pp-topbar__right { display: flex; align-items: center; gap: 10px; }
.pp-content { padding: 28px; flex: 1; }
.pp-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.pp-page-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.pp-page-sub { font-size: 14px; color: var(--muted); margin-top: 3px; }
.pp-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Dark toggle ─────────────────────────────────────────── */
.pp-theme-toggle {
  width: 38px; height: 22px; background: var(--border); border-radius: 11px;
  cursor: pointer; border: none; position: relative; transition: background var(--transition);
  flex-shrink: 0;
}
.pp-theme-toggle::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; background: var(--surface); border-radius: 50%;
  transition: transform var(--transition);
}
[data-theme="dark"] .pp-theme-toggle { background: var(--brand); }
[data-theme="dark"] .pp-theme-toggle::after { transform: translateX(16px); }
.pp-theme-toggle-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* ── Cards ───────────────────────────────────────────────── */
.pp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.pp-card__header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-card__title { font-weight: 700; font-size: 14px; color: var(--text); }
.pp-card__body { padding: 20px; }

/* ── Stats grid ──────────────────────────────────────────── */
.pp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.pp-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; }
.pp-stat__label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.pp-stat__val { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; }
.pp-stat__sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pp-stat__icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 28px; opacity: .12; }

/* ── Table ───────────────────────────────────────────────── */
.pp-table-wrap { overflow-x: auto; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pp-table th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.pp-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.pp-table tr:last-child td { border-bottom: 0; }
.pp-table tr:hover td { background: var(--surface-2); }
.pp-table__actions { display: flex; gap: 6px; align-items: center; }
.pp-table__title { font-weight: 600; color: var(--text); }
.pp-table__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Progress ────────────────────────────────────────────── */
.pp-progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; display: flex; gap: 0; }
.pp-progress__bar { height: 100%; background: var(--brand); border-radius: 3px; transition: width .4s; }
.pp-progress__bar--done { background: var(--success); }

/* ── Badges ──────────────────────────────────────────────── */
.pp-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.pp-badge--draft     { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pp-badge--sent      { background: #DBEAFE; color: #1D4ED8; }
.pp-badge--completed { background: var(--success-light); color: #065F46; }
.pp-badge--pending   { background: var(--warning-light); color: #92400E; }
.pp-badge--signed    { background: var(--success-light); color: #065F46; }
.pp-badge--invited   { background: #E0EAF5; color: #0A1F44; }
[data-theme="dark"] .pp-badge--sent      { background: rgba(29,78,216,.3); color: #93C5FD; }
[data-theme="dark"] .pp-badge--completed { background: rgba(5,150,105,.2); color: #6EE7B7; }
[data-theme="dark"] .pp-badge--pending   { background: rgba(217,119,6,.2); color: #FCD34D; }
[data-theme="dark"] .pp-badge--signed    { background: rgba(5,150,105,.2); color: #6EE7B7; }

/* ── Alert ───────────────────────────────────────────────── */
.pp-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.pp-alert--error   { background: var(--danger-light); color: var(--danger); border: 1px solid #FECACA; }
.pp-alert--success { background: var(--success-light); color: var(--success); border: 1px solid #6EE7B7; }
.pp-alert--info    { background: var(--brand-light); color: var(--brand-dark); border: 1px solid #B3C8E8; }
.pp-alert--warn    { background: var(--warning-light); color: var(--warning); border: 1px solid #FDE68A; }
[data-theme="dark"] .pp-alert--error   { border-color: #7F1D1D; }
[data-theme="dark"] .pp-alert--success { border-color: #064E3B; }
[data-theme="dark"] .pp-alert--info    { border-color: #0A1F44; }

/* ── Modal ───────────────────────────────────────────────── */
.pp-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: pp-fadein .15s ease;
}
.pp-modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 540px; box-shadow: var(--shadow-lg); }
.pp-modal--sm { max-width: 400px; }
.pp-modal--lg { max-width: 760px; }
.pp-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.pp-modal__title { font-size: 18px; font-weight: 700; }
.pp-modal__close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 24px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.pp-modal__close:hover { background: var(--surface-2); }
.pp-modal__body { padding: 20px 24px 24px; }
.pp-modal__footer { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }

/* ── Toast ───────────────────────────────────────────────── */
.pp-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--text); color: var(--surface);
  padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md); animation: pp-slidein .2s ease; max-width: 340px;
  display: flex; align-items: center; gap: 8px;
}
.pp-toast.success { background: var(--success); color: #fff; }
.pp-toast.error   { background: var(--danger);  color: #fff; }
@keyframes pp-slidein { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes pp-fadein  { from { opacity:0; } to { opacity:1; } }

/* ── Spinner ─────────────────────────────────────────────── */
.pp-spinner { width: 22px; height: 22px; border: 2.5px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: pp-spin .7s linear infinite; }
.pp-spinner--sm { width: 15px; height: 15px; border-width: 2px; }
.pp-spinner--lg { width: 36px; height: 36px; border-width: 3px; }
.pp-loading { display: flex; align-items: center; justify-content: center; padding: 60px; }
@keyframes pp-spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────────────── */
.pp-empty { text-align: center; padding: 56px 24px; }
.pp-empty__icon { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.pp-empty__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pp-empty__sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── Document editor ─────────────────────────────────────── */
.pp-editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; }
.pp-editor-btn { padding: 5px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-size: 13px; cursor: pointer; color: var(--text); font-family: inherit; }
.pp-editor-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
.pp-editor-area { border: 1px solid var(--border); border-radius: 0 0 8px 8px; min-height: 280px; padding: 16px; font-size: 14px; line-height: 1.8; outline: none; color: var(--text); background: var(--surface); overflow-y: auto; }
.pp-editor-area:focus { border-color: var(--brand); }
.pp-editor-area p { margin-bottom: 10px; }
.pp-editor-area h1,h2,h3 { margin: 16px 0 8px; }
.pp-token { display: inline-block; background: var(--brand-light); color: var(--brand); border-radius: 4px; padding: 1px 6px; font-size: 13px; white-space: nowrap; }
.pp-page-break { border: 0; border-top: 2px dashed var(--border); margin: 18px 0; }

.pp-field-inserter { position: relative; }
.pp-field-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 500; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 200px; padding: 6px; list-style: none; }
.pp-field-menu li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); text-align: left; }
.pp-field-menu li button:hover { background: var(--surface-2); color: var(--brand); }
.pp-field-menu__icon { font-size: 15px; width: 20px; text-align: center; }

/* ── Signer row ──────────────────────────────────────────── */
.pp-signer-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: "avatar info" "actions actions" "photo photo";
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.pp-signer-avatar { grid-area: avatar; width: 36px; height: 36px; background: var(--brand-light); color: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pp-signer-info { grid-area: info; min-width: 0; }
.pp-signer-name { font-weight: 600; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.pp-signer-email { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pp-signer-status { display: inline-flex; margin-right: auto; }
.pp-signer-actions { grid-area: actions; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pp-signer-photo { grid-area: photo; padding-top: 2px; border-top: 1px dashed var(--border); }
.pp-photo-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; padding-top: 8px; }
.pp-photo-toggle input { margin: 0; cursor: pointer; flex-shrink: 0; }
.pp-photo-tease { display: inline-block; background: none; border: 0; padding: 8px 0 0; font-size: 12px; color: var(--brand); cursor: pointer; opacity: 0.85; white-space: nowrap; }
.pp-photo-tease:hover { opacity: 1; text-decoration: underline; }
.pp-photo-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-light); border-radius: 999px; padding: 2px 8px; margin-top: 8px; }

/* ── Audit timeline ──────────────────────────────────────── */
.pp-timeline { list-style: none; padding: 0; }
.pp-timeline li { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.pp-timeline li::before { content:''; position:absolute; left:11px; top:24px; bottom:0; width:1px; background:var(--border); }
.pp-timeline li:last-child::before { display: none; }
.pp-timeline__dot { width: 24px; height: 24px; background: var(--brand-light); border: 2px solid var(--brand); border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.pp-timeline__label { font-weight: 600; font-size: 14px; color: var(--text); }
.pp-timeline__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Upgrade banner ──────────────────────────────────────── */
.pp-upgrade {
  background: linear-gradient(130deg, var(--brand) 0%, #1A4A8A 100%);
  color: #fff; border-radius: var(--radius); padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.pp-upgrade__title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pp-upgrade__sub { font-size: 13px; color: rgba(255,255,255,.8); }
.pp-upgrade__btn { background: #fff; color: var(--brand); padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; border: none; white-space: nowrap; flex-shrink: 0; }
.pp-upgrade__btn:hover { background: #F5F3FF; }

/* ── Doc type cards ──────────────────────────────────────── */
.pp-type-cards { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
.pp-type-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: all var(--transition); }
.pp-type-card.active { border-color: var(--brand); background: var(--brand-light); }
.pp-type-card__icon { font-size: 20px; margin-bottom: 4px; }
.pp-type-card__title { font-weight: 600; font-size: 13px; color: var(--text); }
.pp-type-card__desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pp-type-card--locked { opacity: 0.7; }
.pp-type-card--locked:hover { opacity: 1; border-color: var(--brand); }
.pp-tier-pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

/* ── Tabs ────────────────────────────────────────────────── */
.pp-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.pp-tab { padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none; transition: all var(--transition); }
.pp-tab:hover { color: var(--text); }
.pp-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ── Status filter pills ─────────────────────────────────── */
.pp-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pp-pill { padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--border); background: none; color: var(--muted); transition: all var(--transition); }
.pp-pill:hover { border-color: var(--brand); color: var(--brand); }
.pp-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Search bar ──────────────────────────────────────────── */
.pp-search { position: relative; }
.pp-search input { padding-left: 36px; }
.pp-search__icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .pp-sidebar { transform: translateX(-100%); width: 240px; }
  .pp-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .pp-main { margin-left: 0; }
  .pp-content { padding: 16px; }
  .pp-stats { grid-template-columns: 1fr 1fr; }
  .pp-type-cards { grid-template-columns: 1fr; }
  .pp-form-row { grid-template-columns: 1fr; }
  .pp-page-header { flex-direction: column; }
}
@media (max-width: 480px) {
  .pp-stats { grid-template-columns: 1fr; }
}

/* ── Utility ─────────────────────────────────────────────── */
.pp-flex { display: flex; }
.pp-flex-col { display: flex; flex-direction: column; }
.pp-gap-1 { gap: 4px; }
.pp-gap-2 { gap: 8px; }
.pp-gap-3 { gap: 12px; }
.pp-gap-4 { gap: 16px; }
.pp-items-center { align-items: center; }
.pp-justify-between { justify-content: space-between; }
.pp-mt-1 { margin-top: 4px; }
.pp-mt-2 { margin-top: 8px; }
.pp-mt-3 { margin-top: 12px; }
.pp-mt-4 { margin-top: 16px; }
.pp-mb-2 { margin-bottom: 8px; }
.pp-mb-4 { margin-bottom: 16px; }
.pp-text-muted { color: var(--muted); font-size: 13px; }
.pp-text-sm { font-size: 13px; }
.pp-text-xs { font-size: 12px; }
.pp-bold { font-weight: 600; }
.pp-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-hidden { display: none; }

/* ── Pigee brand banner ──────────────────────────────────── */
.pp-portal-banner {
  background: #0A1F44;
  color: rgba(255,255,255,.75);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 14px 28px;
  flex-shrink: 0;
}
.pp-portal-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.pp-portal-banner__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.pp-portal-banner__logo strong { color: #fff; }
.pp-portal-banner__links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.pp-portal-banner__links a { color: rgba(255,255,255,.7); text-decoration: none; }
.pp-portal-banner__links a:hover { color: #fff; text-decoration: underline; }
.pp-portal-banner__links span { color: rgba(255,255,255,.3); }
.pp-portal-banner__cta {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.pp-portal-banner__cta:hover { background: rgba(255,255,255,.22); }
@media (max-width: 768px) {
  .pp-portal-banner { padding: 12px 16px; }
  .pp-portal-banner__links { display: none; }
  .pp-portal-banner__inner { justify-content: space-between; }
}

/* ── Combined dashboard banner ───────────────────────────── */
.pp-combo-banner {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pp-combo-banner__half {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  color: #fff;
}
.pp-combo-banner__half.pp-combo-banner__upgrade {
  background: linear-gradient(130deg, var(--brand) 0%, #1A4A8A 100%);
}
.pp-combo-banner__half.pp-combo-banner__ship {
  background: linear-gradient(130deg, #2C3E50 0%, #0A1F44 100%);
}
.pp-combo-banner__icon {
  font-size: 24px;
  flex-shrink: 0;
}
.pp-combo-banner__text {
  flex: 1;
  min-width: 0;
}
.pp-combo-banner__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.pp-combo-banner__sub {
  font-size: 12px;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
}
.pp-combo-banner__btn {
  background: rgba(255,255,255,.95);
  color: var(--brand);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s;
}
.pp-combo-banner__btn:hover {
  background: #fff;
  text-decoration: none;
}
.pp-combo-banner__ship .pp-combo-banner__btn {
  color: #0A1F44;
}

/* ── Upgrade plan nav highlight ──────────────────────────── */
.pp-nav-item[data-route="/upgrade"] {
  color: #B8860B;
}
.pp-nav-item[data-route="/upgrade"]:not(.active):hover {
  background: #FFF8E1;
  color: #B8860B;
}
[data-theme="dark"] .pp-nav-item[data-route="/upgrade"] {
  color: #FCD34D;
}
[data-theme="dark"] .pp-nav-item[data-route="/upgrade"]:not(.active):hover {
  background: rgba(252,211,77,.1);
}
