/* ── Design tokens ────────────────────────────────────────────────────── */
:root {
  --navy:      #F8FAFC;   /* page bg */
  --navy-2:    #FFFFFF;   /* surface / card bg */
  --navy-3:    #F1F5F9;   /* subtle secondary bg */
  --cyan:      #0EA5E9;   /* sky-500 — primary accent */
  --cyan-dim:  #E0F2FE;   /* sky-100 — accent tint */
  --orange:    #F97316;
  --green:     #16A34A;
  --yellow:    #CA8A04;
  --gray:      #94A3B8;
  --red:       #DC2626;
  --card-bg:   #FFFFFF;
  --border:    #E2E8F0;
  --text:      #0F172A;
  --text-dim:  #64748B;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.08);
  --transition: .15s ease;
}

/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--cyan); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--navy-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  line-height: 1;
}
button:hover, .btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
button:active { transform: translateY(1px); }
button.primary { background: var(--cyan); border-color: var(--cyan); color: #fff; font-weight: 700; }
button.primary:hover { background: #0284c7; border-color: #0284c7; color: #fff; background: #0284c7; }
button.danger { border-color: var(--red); color: var(--red); }
button.danger:hover { background: var(--red); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

input[type=file] { display: none; }

/* ── Form controls ────────────────────────────────────────────────────── */
input[type=text],
input[type=password],
input[type=email],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); }
input::placeholder, textarea::placeholder { color: #5c6c8a; }
textarea { resize: vertical; min-height: 80px; }
label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: 5px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
#app-header {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.header-title h1 {
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}
.header-title h1 span { color: var(--cyan); }
.header-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Presence (usuarios en línea) ─────────────────────────────────────── */
.presence {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
}
.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.presence-avatars {
  display: flex;
  margin-left: 4px;
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cyan-dim);
  border: 2px solid var(--navy-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  margin-left: -6px;
  cursor: default;
  position: relative;
}
.avatar:first-child { margin-left: 0; }
.avatar[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--text);
  pointer-events: none;
  z-index: 99;
}

/* ── Stats ring ───────────────────────────────────────────────────────── */
.stats { margin-top: 12px; }

.stats-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.stats-ring-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats-done-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.stats-total-label {
  font-size: 12px;
  color: var(--text-dim);
}
.stats-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
  line-height: 1;
}
.stat-chip-amber { background: #FAEEDA; color: #854F0B; border-color: transparent; }
.stat-chip-red   { background: #FDE8E8; color: #A32D2D; border-color: transparent; }

/* ── Tabs (legacy) ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.tab  { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; color: var(--text-dim); transition: all var(--transition); user-select: none; }
.tab:hover { border-color: var(--cyan); color: var(--text); }
.tab.active { background: var(--cyan); border-color: var(--cyan); color: #fff; font-weight: 700; }

/* ── Stepper row ──────────────────────────────────────────────────────── */
.stepper-row { margin-top: 14px; }
.stepper-row #tabs { width: 100%; }

.view-toggle {
  display: flex;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.view-btn {
  background: none;
  border: none;
  padding: 6px 11px;
  font-size: 15px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.view-btn + .view-btn { border-left: 1.5px solid var(--border); }
.view-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,.04); }
.view-btn.active { background: var(--cyan); color: #fff; }

/* ── Stepper de etapas ────────────────────────────────────────────────── */
.stepper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.stepper-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  background: var(--navy-2);
  transition: all var(--transition);
  user-select: none;
  position: relative;
  white-space: nowrap;
}
.stepper-pill:hover { border-color: var(--cyan); }
.stepper-pill.active {
  background: #111827;
  border-color: #111827;
}
.stepper-pill.active:hover { border-color: #111827; }
.stepper-pill.active .stepper-name { color: #fff; }
.stepper-pill.active .stepper-count { color: #fff; opacity: .65; }
.stepper-pill.active.cat-done { border-color: #111827; }
.stepper-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.stepper-count {
  font-size: 13px;
  font-weight: 400;
}
.stepper-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.stepper-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s ease;
  background: var(--cyan);
}

/* Category colour variants — blocked shows a dot, not a red border */
.stepper-pill.cat-done     { border-color: var(--green); }
.stepper-pill.cat-done     .stepper-fill { background: var(--green); }
.stepper-pill.cat-blocked  .stepper-fill { background: var(--red); }
.stepper-pill.cat-progress .stepper-fill { background: var(--cyan); }
.stepper-pill.cat-none     .stepper-fill { background: var(--border); }

/* Small red dot on blocked category pills */
.stepper-blocked-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E24B4A;
  border: 2px solid var(--navy);
  pointer-events: none;
  flex-shrink: 0;
}

/* Category color pill (replaces phase-tag on cards) */
.cat-pill {
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1.2;
}

/* Color swatches in category picker */
.color-swatch-row { display: flex; gap: 5px; flex-wrap: wrap; }
.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  transition: transform .12s, outline-color .12s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { outline-color: var(--text); transform: scale(1.15); }

/* ── Category bar: label row + pills ─────────────────────────────────── */
.stepper-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* "CATEGORÍAS" label on the left, view-toggle on the right */
.category-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-bar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 0 2px;
}

/* "+ Nueva" add button — matches pill shape */
.stepper-add-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px dashed var(--border);
  background: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.stepper-add-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* Collapsed empty-categories chip — matches pill shape */
.stepper-empty-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--navy-3);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  cursor: default;
  white-space: nowrap;
}
.stepper-add-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.stepper-add-input {
  width: 160px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--cyan);
  background: var(--navy-2);
  color: var(--text);
  outline: none;
}

/* ── Categories CRUD in project settings modal ────────────────────────── */
.modal-section-sep   { border-top: 1px solid var(--border); margin: 8px 0 6px; }
.modal-section-title { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px; }
.categories-empty    { font-size: 13px; color: var(--text-dim); font-style: italic; padding: 8px 0; }

.categories-crud-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
}
.categories-crud-row:last-child { border-bottom: none; }
.categories-crud-order  { display: flex; flex-direction: column; gap: 2px; }
.categories-crud-name   { font-size: 13px; }
.categories-crud-status { font-size: 12px; min-width: 110px; }
.btn-xs {
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--navy-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-xs:hover:not(:disabled) { border-color: var(--cyan); color: var(--text); }
.btn-xs:disabled { opacity: .35; cursor: default; }
.btn-xs.danger { border-color: var(--red); color: var(--red); }
.btn-xs.danger:hover { background: rgba(255,72,72,.1); }

/* ── Connectivity indicator ───────────────────────────────────────────── */
.conn-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.conn-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.conn-badge.connected .dot { background: var(--green); box-shadow: 0 0 4px var(--green); }
.conn-badge.connected { color: var(--green); border-color: var(--green); }

/* ── Board ────────────────────────────────────────────────────────────── */
main { padding: 20px 24px 60px; }

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .board { grid-template-columns: 1fr; } }

/* ── List view ────────────────────────────────────────────────────────── */
.list-view-wrap {
  overflow-x: auto;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.list-view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 680px;
}
.list-view-table thead th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}
.list-view-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.list-view-table th.sortable:hover  { color: var(--text); }
.list-view-table th.sort-active     { color: var(--cyan); }
.list-view-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
  color: var(--text);
}
.list-row { cursor: pointer; transition: background var(--transition); }
.list-row:hover { background: var(--cyan-dim); }
.list-row:last-child td { border-bottom: none; }
.td-title {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-time { white-space: nowrap; color: var(--text-dim); font-size: 11.5px; }
.list-empty { text-align: center; color: var(--text-dim); padding: 28px 0 !important; font-size: 13px; }
.status-lbl {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.inline-sel {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  cursor: pointer;
}
.inline-inp {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  width: 130px;
}
.inline-inp:focus, .inline-sel:focus {
  outline: none;
  border-color: var(--cyan);
}

.column {
  background: var(--navy-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  min-height: 120px;
  transition: outline var(--transition);
}
.column.dragover {
  outline: 2px dashed var(--cyan);
  outline-offset: -2px;
  background: var(--cyan-dim);
}
.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.column-head .count {
  background: var(--navy-2);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  color: var(--text);
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.card:hover { border-color: var(--cyan); box-shadow: 0 2px 16px rgba(14,165,233,.2); }
.card.dragging { opacity: .4; transform: rotate(1deg); cursor: grabbing; }
.card.just-updated {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(6,193,243,.35);
  animation: pulse-border .8s ease-out forwards;
}
@keyframes pulse-border {
  0%   { box-shadow: 0 0 0 4px rgba(6,193,243,.4); }
  100% { box-shadow: 0 0 0 0   rgba(6,193,243,0);  }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.badge-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .03em;
}
.badge-qw {
  font-size: 10px;
  background: var(--orange);
  color: #2a0f00;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.phase-tag {
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}
.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 8px;
  line-height: 1.35;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.Alta   { background: var(--orange); }
.dot.Media  { background: var(--yellow); }
.dot.Baja   { background: var(--gray);   }

.card-resp {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  margin-bottom: 8px;
}
.card-resp::placeholder { color: #5c6c8a; }

.card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.card-updated-by {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 6px;
  text-align: right;
  font-style: italic;
}

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 10px;
  backdrop-filter: blur(2px);
}
.modal-bg.open { display: flex; }

.modal {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  padding: 14px 20px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modal-in .18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.modal-title-block { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.modal h2 { font-size: 17px; color: var(--text); line-height: 1.35; margin: 0; }
.modal-field { margin-top: 8px; }
.modal-field > label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.modal-field .value { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.modal-grid-2 .modal-field { margin-top: 0; }
.modal-grid-3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-top: 10px; }
.modal-grid-3 .modal-field { margin-top: 0; }
@media (max-width: 540px) { .modal-grid-2, .modal-grid-3 { grid-template-columns: 1fr; } }
.evidence-block {
  background: var(--navy);
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  max-height: 90px;
  overflow-y: auto;
}
.effort-input-wrap {
  display: flex;
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
  width: 110px;
}
.effort-input-wrap:focus-within { border-color: var(--cyan); }
.effort-input-wrap input[type=number] {
  border: none;
  background: none;
  outline: none;
  padding: 7px 6px 7px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  -moz-appearance: textfield;
}
.effort-input-wrap input[type=number]::-webkit-inner-spin-button,
.effort-input-wrap input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.effort-input-unit {
  padding: 0 10px 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
  user-select: none;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; justify-content: center; }
.badges-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Activity log in modal ────────────────────────────────────────────── */
.activity-list {
  list-style: none;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 110px;
  overflow-y: auto;
}
.activity-list li {
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 8px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.activity-list .who { color: var(--cyan); font-weight: 600; }
.activity-list .when { float: right; font-size: 10px; opacity: .7; }

/* ── Admin panel modal ────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) { .admin-grid { grid-template-columns: 1fr; } }
.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  gap: 8px;
}
.user-row .role-badge {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.user-row .role-badge.admin { border-color: var(--cyan); color: var(--cyan); }

/* ── Toast notifications ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toast-in .25s ease, toast-out .3s ease 3.5s forwards;
  pointer-events: auto;
  max-width: 320px;
  line-height: 1.4;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.info    { border-left: 3px solid var(--cyan);  }
.toast.error   { border-left: 3px solid var(--red);   }
@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ── Biinyu wordmark ──────────────────────────────────────────────────── */
.biinyu-wordmark {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 12px;
  font-style: italic;
}
.biinyu-wordmark-sm {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cyan);
  font-style: italic;
  margin-bottom: 2px;
  opacity: .85;
}

/* ── Login page ───────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 20% 50%, rgba(6,193,243,.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(6,193,243,.04) 0%, transparent 50%),
              var(--navy);
}
.login-card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo h1 { font-size: 18px; color: var(--text); font-weight: 700; margin-bottom: 4px; }
.login-logo p  { font-size: 12px; color: var(--text-dim); }
.login-field { margin-bottom: 16px; }
.login-error {
  font-size: 13px;
  color: var(--red);
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 16px;
  display: none;
}
.login-error.visible { display: block; }
.login-submit { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  padding: 20px 24px 40px;
  color: var(--text-dim);
  font-size: 11.5px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.04);
  margin-top: 20px;
}

/* ── Skeleton loading ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--navy-2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  height: 14px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Columna Solicitudes (accent ámbar) ───────────────────────────────── */
.column[data-status="solicitud"] { border-color: rgba(234,179,8,.25); }
.column[data-status="solicitud"] .column-head { color: var(--yellow); }
.column[data-status="solicitud"].dragover { outline-color: var(--yellow); }

.column[data-status="rechazado"] { border-color: rgba(239,68,68,.18); opacity: .85; }
.column[data-status="rechazado"] .column-head { color: var(--red); }

/* Tarjeta solicitud */
.card.status-solicitud { border-color: rgba(234,179,8,.3); }
.card.status-solicitud:hover { border-color: var(--yellow); box-shadow: 0 2px 16px rgba(234,179,8,.12); }

/* Tarjeta rechazada */
.card.status-rechazado { opacity: .7; }

/* Tarjeta de cliente (propia) */
.card.own-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Review buttons (accept / reject) */
.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.btn-accept {
  flex: 1;
  justify-content: center;
  background: rgba(34,197,94,.1);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
}
.btn-accept:hover { background: var(--green); color: #001a09; }
.btn-reject {
  flex: 1;
  justify-content: center;
  background: rgba(239,68,68,.08);
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
  font-size: 12px;
}
.btn-reject:hover { background: var(--red); color: #fff; }

/* Badge de cliente en card */
.badge-cliente {
  font-size: 10px;
  background: rgba(6,193,243,.12);
  color: var(--cyan);
  border: 1px solid rgba(6,193,243,.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Nota de rechazo */
.rejection-note {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--red);
  line-height: 1.4;
}

/* ── Readonly card (cliente en columnas de gestión) ───────────────────── */
.card.readonly { cursor: default; }
.card.readonly:hover { border-color: var(--border); box-shadow: none; }

/* ── Project info panel ───────────────────────────────────────────────── */
.project-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 500px) { .project-info-grid { grid-template-columns: 1fr; } }
.info-block {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.info-block label { margin-bottom: 6px; }
.info-block .value { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.info-block.full, .project-info-grid .full { grid-column: 1 / -1; }

/* Category badges (in project info modal) */
.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.category-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--navy-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.category-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.category-input-row input { flex: 1; }

/* ── New req form ─────────────────────────────────────────────────────── */
.req-form-field { margin-bottom: 14px; }
.req-form-field:last-child { margin-bottom: 0; }

/* ── Role badge in users list ─────────────────────────────────────────── */
.role-badge.admin    { border-color: var(--cyan);   color: var(--cyan);   }
.role-badge.miembro  { border-color: var(--green);  color: var(--green);  }
.role-badge.cliente  { border-color: var(--yellow); color: var(--yellow); }

/* ════════════════════════════════════════════════════════════════════════
   MULTI-CLIENT PLATFORM STYLES
   ════════════════════════════════════════════════════════════════════════ */

/* ── Nav bar (shared across all pages) ───────────────────────────────── */
#app-nav {
  background: var(--navy-2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  gap: 16px;
}
.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-logo {
  display: inline-flex;
  align-items: center;
  background: #0A0E1A;
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
.nav-logo:hover { box-shadow: 0 0 0 1px var(--cyan), 0 2px 10px rgba(14,165,233,.25); }
.nav-logo:active { transform: translateY(1px); }
.nav-logo img {
  height: 22px;
  width: auto;
  image-rendering: pixelated;
  display: block;
}

.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.crumb-link  { color: var(--text-dim); text-decoration: none; transition: color var(--transition); }
.crumb-link:hover { color: var(--cyan); }
.crumb-sep   { color: var(--border); }
.crumb-current { color: var(--text); font-weight: 600; }
.nav-link { font-size: 13px; color: var(--text-dim); text-decoration: none; padding: 4px 10px; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--navy-3); }

/* ── Assignee avatars ─────────────────────────────────────────────────── */
.assignee-stack { display: flex; align-items: center; }
.avatar-sm {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  border: 2px solid var(--navy-2);
  margin-left: -5px; flex-shrink: 0;
  cursor: default;
}
.assignee-stack .avatar-sm:first-child { margin-left: 0; }
.avatar-more { background: var(--navy-3) !important; color: var(--text-dim) !important; border-color: var(--border) !important; font-size: 9px; }
.no-assignee { font-size: 11px; color: var(--text-dim); }

.assignee-area {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 2px 4px; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.assignee-area:hover { background: var(--navy-3); }

/* ── Assignee popover ─────────────────────────────────────────────────── */
.assignee-popover {
  position: absolute;
  z-index: 200;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  width: 220px;
  box-shadow: var(--shadow);
  animation: modal-in .14s ease;
}
.assignee-popover-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 8px; }

/* ── Assignee picker (modal & popover) ───────────────────────────────── */
.assignee-picker {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; max-height: 110px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--navy);
}
.assignee-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; margin: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--navy-2);
  cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 400;
  transition: background var(--transition), border-color var(--transition);
}
.assignee-item:hover { background: var(--navy-3); border-color: var(--border); }
.assignee-item:has(input:checked) { background: var(--cyan-dim); border-color: rgba(14,165,233,.3); }
.assignee-item .avatar-sm { margin-left: 0; width: 28px; height: 28px; font-size: 11px; }
.assignee-item input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--cyan); flex-shrink: 0; order: 2; margin-left: auto; }
.assignee-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.assignee-name { font-size: 13px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assignee-pos  { font-size: 11px; font-weight: 400; color: var(--text-dim); text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Equipo page ──────────────────────────────────────────────────────── */
.team-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.team-table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.team-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.team-table tr:last-child td { border-bottom: none; }
.team-table tr { transition: background var(--transition); }
.team-table tr:hover td { background: var(--navy-3); cursor: pointer; }
.team-table .inactive td { opacity: .5; }
.active-cards-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--navy); border: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--text); padding: 0 6px; }
.active-cards-badge.has-cards { background: rgba(14,165,233,.15); border-color: var(--cyan); color: var(--cyan); }
.toggle-active { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }
.toggle-active input { accent-color: var(--cyan); width: 15px; height: 15px; cursor: pointer; }

.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.role-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.role-dot.role-admin   { background: var(--cyan); box-shadow: 0 0 4px var(--cyan); }
.role-dot.role-miembro { background: var(--green); }
.role-dot.role-cliente { background: var(--yellow); }
.role-label { font-size: 10px; color: var(--text-dim); margin-left: 2px; }

/* Nav en pantallas pequeñas: nunca desborda el body */
@media (max-width: 640px) {
  .nav-inner { overflow-x: auto; scrollbar-width: none; }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-left, .nav-right { flex-shrink: 0; }
  .role-label { display: none; }
  .nav-user-badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.btn-sm { padding: 5px 11px; font-size: 12px; }

/* ── Standard reusable button variants ──────────────────────────────────── */
.btn-ghost {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

.btn-primary {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 8px;
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover { background: #0284c7; border-color: #0284c7; color: #fff; }

/* ── Status dot (active / inactive user) ─────────────────────────────── */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.status-dot.active   { background: #22c55e; }
.status-dot.inactive { background: var(--border); }

/* ── Avatar stack (overlapping avatars preview) ──────────────────────── */
.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-stack-item {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navy-2);
  margin-left: -8px;
  flex-shrink: 0;
}
.avatar-stack-item:first-child { margin-left: 0; }
.avatar-stack-extra { background: var(--navy-3); color: var(--text-dim); font-weight: 600; }

/* ── User context menu (⋯) ───────────────────────────────────────────── */
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}
.user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 0;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
}
.user-menu button:hover { background: var(--navy-3); color: var(--text); border-color: transparent; }
.user-menu button.danger-item { color: var(--red); }
.user-menu button.danger-item:hover { background: rgba(220,38,38,.1); }

/* ── Page layout ─────────────────────────────────────────────────────── */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title    { font-size: 24px; font-weight: 800; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* ── Documentación (wiki) ────────────────────────────────────────────── */
.docs-page #docsTocToggle { display: none; }

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

/* Índice lateral */
.docs-sidebar { position: sticky; top: 68px; align-self: start; }
.docs-toc { display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 6px; }
.docs-toc-group {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); margin: 14px 0 4px; padding-left: 10px;
}
.docs-toc-group:first-child { margin-top: 0; }
.docs-toc a {
  display: block; font-size: 13px; color: var(--text-dim);
  padding: 5px 10px; border-radius: var(--radius-sm);
  border-left: 2px solid transparent; text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.docs-toc a:hover { color: var(--text); background: var(--navy-3); }
.docs-toc a.active { color: var(--cyan); border-left-color: var(--cyan); background: var(--cyan-dim); font-weight: 600; }

/* Contenido */
.docs-content { min-width: 0; max-width: 820px; }
.docs-section {
  scroll-margin-top: 72px;
  padding-bottom: 28px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.docs-section:last-of-type { border-bottom: none; }
.docs-content h2 {
  font-size: 20px; font-weight: 800; color: var(--text);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--cyan); display: inline-block;
}
.docs-content p  { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 12px; }
.docs-content ul, .docs-content ol { margin: 0 0 12px 20px; }
.docs-content li { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 5px; }
.docs-content code {
  background: var(--navy-3); color: var(--text);
  padding: 1px 6px; border-radius: 5px; font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-content a { color: var(--cyan); }
.docs-content a:hover { text-decoration: underline; }

.docs-callout {
  background: var(--cyan-dim);
  border: 1px solid rgba(14,165,233,.3);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 12px 14px; font-size: 13.5px; line-height: 1.6; color: var(--text);
  margin: 4px 0 12px;
}

.docs-table { width: 100%; border-collapse: collapse; margin: 4px 0 14px; font-size: 13px; }
.docs-table th {
  text-align: left; padding: 9px 12px; background: var(--navy-3);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-dim); border-bottom: 1px solid var(--border);
}
.docs-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); line-height: 1.6; }
.docs-table tr:last-child td { border-bottom: none; }
.docs-table code { font-size: 12px; }

.docs-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--navy-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.docs-footnote { font-size: 12px; color: var(--text-dim); font-style: italic; margin-top: 8px; }

@media (max-width: 860px) {
  .docs-page #docsTocToggle { display: inline-flex; }
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-sidebar {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(0,0,0,.4);
    display: none; top: 0;
  }
  .docs-sidebar.open { display: block; }
  .docs-toc {
    background: var(--navy-2); width: 260px; height: 100%;
    max-height: none; padding: 18px 14px; overflow-y: auto;
    box-shadow: var(--shadow); animation: none;
  }
}

/* ── Search bar ──────────────────────────────────────────────────────── */
.search-bar { margin-bottom: 20px; }
.search-bar input { max-width: 360px; }

/* ── Clients grid ────────────────────────────────────────────────────── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.client-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.client-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 4px 24px rgba(6,193,243,.12);
  transform: translateY(-2px);
}
.client-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.client-card-meta h2 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.client-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-style: italic;
}
.client-avatar-lg {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-style: italic;
}
.client-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.client-card-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
  align-items: center;
  flex-wrap: wrap;
}
.client-card-stats b { color: var(--text); }
.client-web { color: var(--cyan); font-size: 11px; }

/* ── Tab bar (client detail) ─────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.tab-content    { min-height: 200px; }
.tab-loading    { color: var(--text-dim); font-size: 13px; padding: 24px 0; }

/* ── Section headers ─────────────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }

/* ── Detail grid (general tab) ───────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-block {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.detail-block.full { grid-column: 1 / -1; }
.detail-block label { margin-bottom: 6px; }
.detail-value { font-size: 14px; color: var(--text); line-height: 1.5; }
.detail-value .empty { color: var(--text-dim); font-style: italic; }
.detail-value a { color: var(--cyan); }

/* ── Contacts table ──────────────────────────────────────────────────── */
.contacts-table { overflow-x: auto; }
.contacts-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.contacts-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.contacts-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text);
  vertical-align: middle;
}
.contacts-table tr:hover td { background: rgba(255,255,255,.02); }
.contacts-table tr.primary-contact td { background: rgba(6,193,243,.04); }
.badge-primary {
  font-size: 10px;
  background: rgba(6,193,243,.15);
  color: var(--cyan);
  border: 1px solid rgba(6,193,243,.3);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ── Documents list ──────────────────────────────────────────────────── */
.docs-list { display: flex; flex-direction: column; gap: 10px; }
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.doc-icon { font-size: 22px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.doc-title a { color: var(--cyan); text-decoration: none; }
.doc-title a:hover { text-decoration: underline; }
.doc-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.doc-meta { font-size: 11px; color: var(--text-dim); }
.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Projects grid (inside client detail) ────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.project-card:hover { border-color: var(--cyan); box-shadow: 0 4px 20px rgba(6,193,243,.1); transform: translateY(-1px); }
.project-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.project-card-header h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.project-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-bottom: 10px; }
.project-card-stats { display: flex; gap: 10px; font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.project-card-stats b { color: var(--text); }
.categories-mini { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Status badges (project status) ─────────────────────────────────── */
.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.status-badge.status-activo      { background: rgba(34,197,94,.15);   color: var(--green); }
.status-badge.status-pausado     { background: rgba(234,179,8,.15);   color: var(--yellow); }
.status-badge.status-completado  { background: rgba(6,193,243,.15);   color: var(--cyan); }
.status-badge.status-archivado   { background: rgba(148,163,184,.1);  color: var(--gray); }

/* ── Access section ──────────────────────────────────────────────────── */
.access-section { background: var(--navy-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.access-section h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.users-list { display: flex; flex-direction: column; gap: 8px; }
.project-access-block { padding: 10px 0; border-bottom: 1px solid var(--border); }
.project-access-block:last-child { border-bottom: none; }
.project-access-header { display: flex; justify-content: space-between; align-items: center; }

/* ── Form helpers ────────────────────────────────────────────────────── */
.form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .form-row2 { grid-template-columns: 1fr; } }

/* ── Board header (project page) ─────────────────────────────────────── */
#board-header {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 52px;
  z-index: 20;
}
.board-header-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-actions    { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.project-status-badge { margin-bottom: 8px; }

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
  font-size: 14px;
}

/* ── Skeleton cards ──────────────────────────────────────────────────── */
.skeleton-card {
  height: 160px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--navy-2) 25%, var(--navy-3) 50%, var(--navy-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* ── Comments ─────────────────────────────────────────────────────────── */
/* ── Adjuntos ─────────────────────────────────────────────────────────── */
.card-attach-count { color: var(--text-dim); font-size: 11px; }

.attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding: 2px 0 6px;
}
.attach-loading,
.attach-empty { color: var(--text-dim); font-size: 12px; padding: 6px 0; }

.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--navy-2);
  transition: border-color var(--transition);
}
.attach-item:hover { border-color: var(--cyan); }

.attach-preview {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-3);
  overflow: hidden;
  text-decoration: none;
}
.attach-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-icon  { font-size: 20px; line-height: 1; }

.attach-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.attach-name:hover { color: var(--cyan); text-decoration: underline; }
.attach-sub { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.attach-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.attach-actions .btn-link { font-size: 14px; text-decoration: none; padding: 2px 4px; }
.attach-del:hover { color: var(--red); }

.attach-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.attach-upload input[type=file] { display: none; }
.attach-hint { font-size: 11px; color: var(--text-dim); }

/* ── Importación masiva ───────────────────────────────────────────────── */
.import-intro { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 14px; }
.import-intro code { background: var(--navy-3); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--text); }
.import-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.import-or { text-align: center; color: var(--text-dim); font-size: 12px; margin: 14px 0 10px; }
.import-paste {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; resize: vertical; box-sizing: border-box;
}
.import-summary-line { font-size: 13px; margin-bottom: 12px; }
.import-ok  { color: var(--green); font-weight: 600; }
.import-bad { color: var(--red); font-weight: 600; }

.import-opts {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  background: var(--navy-3); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px;
}
.import-opts label { font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.import-opts select { min-width: 160px; }
.import-opts .import-check { flex-direction: row; align-items: center; gap: 7px; }
.import-opts .import-check input { width: 15px; height: 15px; accent-color: var(--cyan); }

.import-preview-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.import-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.import-table th {
  position: sticky; top: 0; background: var(--navy-2);
  text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.import-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.import-table tr:last-child td { border-bottom: none; }
.import-table tr.invalid { background: rgba(220,38,38,.05); }
.import-more { padding: 8px 10px; font-size: 12px; color: var(--text-dim); text-align: center; }

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 130px;
  overflow-y: auto;
  padding: 2px 0 6px;
  margin-bottom: 8px;
}
.comments-loading,
.comments-empty {
  color: var(--text-dim);
  font-size: 12px;
  padding: 8px 0;
}
.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy-3);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.comment-body-wrap {
  flex: 1;
  min-width: 0;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  padding: 8px 12px;
}
.comment-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--text-dim);
}
.comment-meta strong {
  color: var(--text);
  font-size: 12.5px;
}
.comment-text {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.comment-text strong { color: var(--cyan); }
.btn-link {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
  margin-left: auto;
  opacity: .6;
  transition: opacity .15s;
}
.btn-link:hover { opacity: 1; color: var(--red); }

/* Comment input */
.comment-input-wrap {
  position: relative;
}
.comment-input-wrap textarea {
  width: 100%;
  resize: vertical;
  min-height: 60px;
}

/* Mention autocomplete dropdown */
.mention-dropdown {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  z-index: 200;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  min-width: 220px;
  max-width: 320px;
  overflow: hidden;
}
.mention-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background .1s;
}
.mention-item:hover { background: var(--navy-3); }
.mention-username { color: var(--text-dim); font-size: 12px; }

/* ── Category Manager Modal ───────────────────────────────────────────── */
.cat-mgr-modal {
  max-width: 640px;
  width: 96vw;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#catMgrList {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.cat-mgr-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--navy-2);
  overflow: hidden;
  transition: border-color .15s;
}
.cat-mgr-row:hover { border-color: var(--cyan); }

.cat-mgr-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.cat-mgr-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .15s;
}
.cat-mgr-swatch:hover { transform: scale(1.25); }

.cat-mgr-name-disp {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
}
.cat-mgr-name-disp:hover,
.cat-mgr-name-disp:focus { background: var(--navy-3); }

.cat-mgr-name-input {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  background: var(--navy-3);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text);
  outline: none;
}

.cat-mgr-count {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}

/* Color picker (hidden by default, toggled with .open) */
.cat-color-picker {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--navy-3);
}
.cat-color-picker.open { display: flex; }

/* Cards section (hidden by default) */
.cat-cards-section {
  display: none;
  flex-direction: column;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--navy-3);
  gap: 0;
}
.cat-cards-section.open { display: flex; }

.cat-cards-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-cards-empty {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 0;
}

.cat-card-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  padding: 5px 6px;
  border-radius: 5px;
  background: var(--navy-2);
  border: 1px solid var(--border);
}

.cat-card-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Delete confirm inline */
.cat-del-confirm {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--navy-3);
  font-size: 12px;
  color: var(--text);
}

.cat-del-confirm select {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  padding: 3px 6px;
}

/* New category form */
.cat-mgr-new-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

/* Bulk add checklist */
.cat-bulk-checklist {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  background: var(--navy-2);
  margin-top: 8px;
}

.cat-bulk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .1s;
}
.cat-bulk-item:hover { background: var(--navy-3); }
.cat-bulk-item input[type=checkbox] { flex-shrink: 0; accent-color: var(--cyan); }

/* danger button variant */
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: rgba(163,45,45,.15); }

/* ── Cotizaciones ─────────────────────────────────────────────────────── */
.quote-modal { max-width: 1040px; }

.quote-param-group { margin-top: 14px; }
.quote-param-group:first-child { margin-top: 10px; }
.quote-param-group-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); margin-bottom: 8px;
}

.quote-params-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 700px) { .quote-params-grid { grid-template-columns: repeat(2, 1fr); } }

.quote-param-card {
  background: var(--navy-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s;
}
.quote-param-card:hover { border-color: rgba(14,165,233,.4); }
.quote-param-card:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); background: var(--navy-2); }
.quote-param-card label {
  display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-dim); margin-bottom: 5px;
}
.quote-param-input-wrap { display: flex; align-items: baseline; gap: 2px; }
.quote-param-input-wrap input[type=number] {
  border: none; background: none; outline: none; padding: 0;
  font-size: 17px; font-weight: 700; color: var(--text); width: 100%;
  -moz-appearance: textfield;
}
.quote-param-input-wrap input[type=number]::-webkit-inner-spin-button,
.quote-param-input-wrap input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.quote-param-affix { font-size: 13px; font-weight: 700; color: var(--cyan); flex-shrink: 0; user-select: none; }

.quote-tax-hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .7; }
.quote-tax-note {
  font-size: 11.5px; color: var(--text-dim); line-height: 1.5;
  margin-top: 8px; padding: 8px 10px;
  background: var(--navy-3); border-radius: var(--radius-sm);
}

.quote-ai-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--navy-3);
}
.quote-ai-box textarea { width: 100%; box-sizing: border-box; }
.quote-ai-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

.quote-import-panel { margin-top: 10px; }
.quote-import-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quote-import-row select { flex: 1; min-width: 160px; }

.quote-items-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.quote-items-table th {
  text-align: left; padding: 7px 8px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.quote-items-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.quote-items-table input { width: 100%; box-sizing: border-box; font-size: 12.5px; padding: 5px 7px; }
.quote-items-empty { font-size: 12.5px; color: var(--text-dim); font-style: italic; padding: 10px 0; }
.quote-items-actions { display: flex; gap: 8px; margin-top: 10px; }

.quote-breakdown {
  background: var(--navy-3);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quote-bd-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text); }
.quote-bd-row.quote-bd-dim { color: var(--text-dim); font-size: 12px; }
.quote-bd-row.quote-bd-total { font-size: 15px; font-weight: 800; color: var(--text); padding-top: 4px; }
.quote-bd-sep { border-top: 1px dashed var(--border); margin: 4px 0; }

/* ── Vista imprimible ─────────────────────────────────────────────────── */
.quote-print-area { display: none; }

.quote-print-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.quote-print-header img { height: 40px; image-rendering: pixelated; }
.quote-print-header h1 { font-size: 20px; margin: 0; }
.quote-print-header p { font-size: 12px; color: #555; margin: 2px 0 0; }

.quote-print-about, .quote-print-project-desc, .quote-print-payment {
  margin-bottom: 18px; padding: 12px 14px;
  background: #f7f7f7; border-radius: 6px; border: 1px solid #e5e5e5;
}
.quote-print-about h3, .quote-print-project-desc h3, .quote-print-payment h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #666; margin: 0 0 6px;
}
.quote-print-about p, .quote-print-project-desc p, .quote-print-payment p {
  font-size: 12px; color: #333; line-height: 1.6; margin: 0; white-space: pre-wrap;
}
.quote-print-payment { background: #eef8fd; border-color: #cfe9f5; border-left: 3px solid #0EA5E9; }
.quote-print-payment h3 { color: #0284c7; }

.quote-print-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.quote-print-table th, .quote-print-table td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; font-size: 12px; }
.quote-print-table th { background: #f2f2f2; }

.quote-print-totals { max-width: 320px; margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.quote-print-totals div { display: flex; justify-content: space-between; font-size: 12px; }
.quote-print-total { font-size: 15px; font-weight: 800; border-top: 2px solid #333; padding-top: 6px; margin-top: 4px; }
.quote-print-retentions { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #bbb; display: flex; flex-direction: column; gap: 4px; }
.quote-print-retentions-note { max-width: 320px; margin: 6px 0 0 auto; font-size: 10px; color: #888; line-height: 1.5; text-align: right; }

.quote-print-notes { margin-top: 20px; font-size: 12px; color: #555; white-space: pre-wrap; }

.quote-print-author {
  margin-top: 24px; padding-top: 10px; border-top: 1px solid #ddd;
  display: flex; flex-direction: column; gap: 2px;
}
.quote-print-author-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #888; }
.quote-print-author span:last-child { font-size: 12px; color: #333; }

.quote-print-legal { margin-top: 18px; padding-top: 12px; border-top: 1px solid #ddd; }
.quote-print-legal h3 {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #888; margin: 0 0 6px;
}
.quote-print-legal ol { margin: 0; padding-left: 16px; }
.quote-print-legal li { font-size: 9.5px; color: #666; line-height: 1.5; margin-bottom: 4px; }
.quote-print-legal li:last-child { margin-bottom: 0; }

.quote-print-footer { margin-top: 30px; font-size: 10px; color: #999; text-align: center; }

@media print {
  body > *:not(#printArea) { display: none !important; }
  .quote-print-area { display: block !important; padding: 20px; }
}
