/* ═══════════════════════════════════════════════════════════════════════════
   ALBERA CLIENTES — Panel PM · Design System v3.0
   Hereda tokens de public.css cuando se cargan juntos.
   Palette unificada: mismos tokens --cu, --nv, --n* que el área cliente.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────────────────────── */
/* Sólo los tokens específicos del PM — los globales están en public.css */
:root {
  --pm-navy:    #0e2044;
  --pm-navy-2:  #162d5a;
  --pm-sidebar: 64px;   /* sidebar colapsada en mobile */
  --pm-full-sidebar: 240px;
  --pm-topbar:  58px;
  --pm-ease:    150ms cubic-bezier(.22,1,.36,1);
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
body.ac-pm-page {
  margin: 0; padding: 0;
  background: #f0f2f5;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: #0e2044;
  -webkit-font-smoothing: antialiased;
}

.ac-pm-root {
  display: grid;
  grid-template-columns: var(--pm-full-sidebar) 1fr;
  grid-template-rows: var(--pm-topbar) 1fr;
  min-height: 100vh;
}

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.ac-pm-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  height: var(--pm-topbar);
  padding: 0 20px;
  background: var(--pm-navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 20px rgba(14,32,68,.3);
}

.ac-pm-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
  margin-right: 20px;
  flex-shrink: 0;
}

.ac-pm-topbar__logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e8aa56, #b8721a);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff;
  box-shadow: 0 3px 10px rgba(184,114,26,.3);
  flex-shrink: 0;
}

.ac-pm-topbar__brand-text em { color: #e8aa56; font-style: italic; }
.ac-pm-topbar__brand-sub { display: none; }

/* Buscador/espacio central */
.ac-pm-topbar__space { flex: 1; }

/* Acciones a la derecha */
.ac-pm-topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ac-pm-topbar__user {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.75);
  font-size: .83rem;
  font-weight: 500;
}

.ac-pm-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.2);
}

.ac-pm-avatar img { width: 30px; height: 30px; object-fit: cover; }

.ac-pm-topbar__logout {
  color: rgba(255,255,255,.5) !important;
  text-decoration: none;
  font-size: .77rem;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 99px;
  transition: all var(--pm-ease);
  font-weight: 500;
}

.ac-pm-topbar__logout:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.3);
}

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.ac-pm-sidebar {
  grid-row: 2;
  grid-column: 1;
  background: var(--pm-navy);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--pm-topbar);
  height: calc(100vh - var(--pm-topbar));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 10px 20px;
  scrollbar-width: none;
}

.ac-pm-sidebar::-webkit-scrollbar { display: none; }

.ac-pm-nav-section {
  margin-top: 14px;
}

.ac-pm-nav-section__label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.28);
  padding: 8px 12px 5px;
}

.ac-pm-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--pm-ease);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}

.ac-pm-nav-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.88);
}

.ac-pm-nav-link.active {
  background: rgba(232,170,86,.13);
  color: #e8aa56;
  font-weight: 600;
}

.ac-pm-nav-link__icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}

.ac-pm-nav-link.active .ac-pm-nav-link__icon { opacity: 1; }

.ac-pm-nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: #b8721a;
  color: #fff;
  border-radius: 99px;
  font-size: .62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ac-pm-nav-badge--red { background: #dc2626; }

.ac-pm-sidebar__bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ─── MAIN ───────────────────────────────────────────────────────────────── */
.ac-pm-main {
  grid-row: 2;
  grid-column: 2;
  padding: 28px 32px 56px;
  min-width: 0;
  background: #f0f2f5;
}

/* ─── PAGE HEADER ────────────────────────────────────────────────────────── */
.ac-pm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ac-pm-page-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--pm-navy);
  line-height: 1.1;
}

.ac-pm-page-header p {
  margin: 4px 0 0;
  font-size: .83rem;
  color: #7a8fa6;
}

.ac-pm-page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── STAT CARDS ─────────────────────────────────────────────────────────── */
.ac-pm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ac-pm-stat {
  background: #fff;
  border: 1px solid rgba(14,32,68,.09);
  border-radius: 16px;
  padding: 20px 20px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,32,68,.06);
  transition: transform var(--pm-ease), box-shadow var(--pm-ease);
}

.ac-pm-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(14,32,68,.1);
}

.ac-pm-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.ac-pm-stat--blue::before   { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.ac-pm-stat--amber::before  { background: linear-gradient(90deg, #e8aa56, #b8721a); }
.ac-pm-stat--green::before  { background: linear-gradient(90deg, #4ade80, #16a34a); }
.ac-pm-stat--red::before    { background: linear-gradient(90deg, #f87171, #dc2626); }
.ac-pm-stat--purple::before { background: linear-gradient(90deg, #a78bfa, #7c3aed); }

.ac-pm-stat__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.ac-pm-stat__icon--blue   { background: #eff6ff; }
.ac-pm-stat__icon--amber  { background: #fef7ee; }
.ac-pm-stat__icon--green  { background: #f0fdf4; }
.ac-pm-stat__icon--red    { background: #fef2f2; }

.ac-pm-stat__num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--pm-navy);
  letter-spacing: -.05em;
  display: block;
  margin-bottom: 5px;
  font-feature-settings: 'tnum';
}

.ac-pm-stat__label {
  font-size: .69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7a8fa6;
}

/* ─── DASHBOARD GRID ─────────────────────────────────────────────────────── */
.ac-pm-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ─── CARDS PM ───────────────────────────────────────────────────────────── */
.ac-pm-card {
  background: #fff;
  border: 1px solid rgba(14,32,68,.09);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,32,68,.06);
  transition: box-shadow var(--pm-ease);
}

.ac-pm-card:hover { box-shadow: 0 4px 18px rgba(14,32,68,.1); }

.ac-pm-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(14,32,68,.07);
  background: #f8f9fb;
}

.ac-pm-card__head h2 {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #3d5166;
}

.ac-pm-card__head a {
  font-size: .8rem;
  color: #b8721a;
  text-decoration: none;
  font-weight: 600;
}

.ac-pm-card__head a:hover { text-decoration: underline; }

/* ─── TABLA PM ───────────────────────────────────────────────────────────── */
.ac-pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}

.ac-pm-table thead tr {
  border-bottom: 1px solid rgba(14,32,68,.09);
}

.ac-pm-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7a8fa6;
  background: #f8f9fb;
  white-space: nowrap;
}

.ac-pm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(14,32,68,.06);
  color: #2d3f55;
  vertical-align: middle;
}

.ac-pm-table tr:last-child td { border-bottom: none; }

.ac-pm-table tbody tr {
  transition: background var(--pm-ease);
}

.ac-pm-table tbody tr:hover td {
  background: rgba(184,114,26,.025);
}

.ac-pm-table td strong { color: #0e2044; }
.ac-pm-table td.mono   { font-family: 'SF Mono','Fira Code', monospace; font-size: .8rem; font-weight: 700; color: #b8721a; }
.ac-pm-table .ac-pm-table__empty { text-align: center; padding: 32px; color: #7a8fa6; font-style: italic; }

/* ─── BADGES PM ──────────────────────────────────────────────────────────── */
.ac-pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ac-pm-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.ac-pm-badge--abierta,
.ac-pm-badge--pendiente { background: #eff6ff; color: #2563eb; }
.ac-pm-badge--cerrada   { background: #f8fafc; color: #64748b; }
.ac-pm-badge--revision  { background: #fffbeb; color: #d97706; }
.ac-pm-badge--ofertado  { background: #f5f3ff; color: #7c3aed; }
.ac-pm-badge--aceptado  { background: #f0fdf4; color: #16a34a; }
.ac-pm-badge--rechazado { background: #fef2f2; color: #dc2626; }
.ac-pm-badge--emitida   { background: #eff6ff; color: #2563eb; }
.ac-pm-badge--pagada    { background: #f0fdf4; color: #16a34a; }
.ac-pm-badge--vencida   { background: #fef2f2; color: #dc2626; }
.ac-pm-badge--cancelada { background: #f8fafc; color: #64748b; }
.ac-pm-badge--borrador  { background: #f8fafc; color: #94a3b8; }

/* ─── CHAT PM ────────────────────────────────────────────────────────────── */
.ac-pm-chat-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  height: calc(100vh - var(--pm-topbar) - 80px);
  min-height: 500px;
  background: #fff;
  border: 1px solid rgba(14,32,68,.09);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(14,32,68,.08);
}

.ac-pm-conv-list {
  background: #f8f9fb;
  border-right: 1px solid rgba(14,32,68,.09);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ac-pm-conv-list__head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(14,32,68,.08);
  background: #fff;
  flex-shrink: 0;
}

.ac-pm-conv-list__head h3 {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #7a8fa6;
}

.ac-pm-conv-item {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(14,32,68,.07);
  text-decoration: none;
  color: #0e2044;
  transition: background var(--pm-ease);
  cursor: pointer;
}

.ac-pm-conv-item:hover { background: #fff; }

.ac-pm-conv-item.active {
  background: #fff;
  border-left: 3px solid #b8721a;
  padding-left: 13px;
}

.ac-pm-conv-item.unread .ac-pm-conv-item__subject { font-weight: 700; }

.ac-pm-conv-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 3px;
}

.ac-pm-conv-item__client {
  font-size: .78rem;
  font-weight: 700;
  color: #b8721a;
}

.ac-pm-conv-item__date {
  font-size: .68rem;
  color: #94a3b8;
  white-space: nowrap;
}

.ac-pm-conv-item__subject {
  font-size: .85rem;
  font-weight: 500;
  color: #0e2044;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-pm-conv-item__preview {
  font-size: .77rem;
  color: #7a8fa6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 2px;
}

.ac-pm-conv-item__badges {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  flex-wrap: wrap;
}

/* Chat area PM */
.ac-pm-chat-area {
  display: flex;
  flex-direction: column;
  background: #fff;
  min-width: 0;
}

.ac-pm-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(14,32,68,.08);
  background: #f8f9fb;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-pm-chat-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0e2044;
}

.ac-pm-chat-header__meta {
  font-size: .78rem;
  color: #7a8fa6;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ac-pm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f5f7fa;
}

.ac-pm-msg { display: flex; gap: 10px; align-items: flex-start; }
.ac-pm-msg--pm     { flex-direction: row-reverse; }
.ac-pm-msg--client { flex-direction: row; }

.ac-pm-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(14,32,68,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #3d5166;
}

.ac-pm-msg-avatar img { width: 32px; height: 32px; object-fit: cover; }

.ac-pm-msg-body { max-width: 70%; }

.ac-pm-msg--pm .ac-pm-msg-body {
  background: var(--pm-navy);
  border-radius: 14px 4px 14px 14px;
  padding: 10px 14px;
}

.ac-pm-msg--client .ac-pm-msg-body {
  background: #fff;
  border: 1px solid rgba(14,32,68,.1);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(14,32,68,.06);
}

.ac-pm-msg--pm .ac-pm-msg-text    { color: rgba(255,255,255,.9); font-size: .875rem; line-height: 1.6; }
.ac-pm-msg--pm .ac-pm-msg-meta    { color: rgba(255,255,255,.45); }
.ac-pm-msg--pm .ac-pm-msg-meta strong { color: rgba(255,255,255,.75); }
.ac-pm-msg--client .ac-pm-msg-text { color: #0e2044; font-size: .875rem; line-height: 1.6; }

.ac-pm-msg-meta {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.ac-pm-msg-meta strong { font-size: .73rem; font-weight: 700; }
.ac-pm-msg-meta span   { font-size: .68rem; color: #94a3b8; }

.ac-pm-reply-box {
  border-top: 1px solid rgba(14,32,68,.08);
  padding: 14px 16px;
  background: #fff;
  flex-shrink: 0;
}

.ac-pm-reply-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.ac-pm-reply-row textarea {
  flex: 1;
  border: 1.5px solid rgba(14,32,68,.15);
  padding: 10px 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  resize: none;
  border-radius: 10px;
  outline: none;
  background: #f5f7fa;
  color: #0e2044;
  transition: border-color var(--pm-ease), box-shadow var(--pm-ease);
  line-height: 1.55;
}

.ac-pm-reply-row textarea:focus {
  border-color: #b8721a;
  box-shadow: 0 0 0 3px rgba(184,114,26,.12);
  background: #fff;
}

/* ─── BOTONES PM ─────────────────────────────────────────────────────────── */
.ac-pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .83rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all var(--pm-ease);
  white-space: nowrap;
  letter-spacing: -.005em;
}

.ac-pm-btn--primary {
  background: #b8721a;
  color: #fff;
  border-color: #b8721a;
  box-shadow: 0 2px 10px rgba(184,114,26,.22);
}

.ac-pm-btn--primary:hover {
  background: #8a5213;
  border-color: #8a5213;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(184,114,26,.3);
}

.ac-pm-btn--navy {
  background: var(--pm-navy);
  color: #fff;
  border-color: var(--pm-navy);
}

.ac-pm-btn--navy:hover {
  background: var(--pm-navy-2);
  border-color: var(--pm-navy-2);
}

.ac-pm-btn--secondary {
  background: transparent;
  color: #3d5166;
  border-color: rgba(14,32,68,.18);
}

.ac-pm-btn--secondary:hover {
  background: #f0f2f5;
  border-color: rgba(14,32,68,.3);
  color: #0e2044;
}

.ac-pm-btn--success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.ac-pm-btn--success:hover { background: #15803d; }

.ac-pm-btn--danger {
  background: transparent;
  color: #dc2626;
  border-color: rgba(220,38,38,.25);
}

.ac-pm-btn--danger:hover {
  background: #dc2626;
  color: #fff;
}

.ac-pm-btn--sm { padding: 6px 13px; font-size: .78rem; }

/* ─── FORMULARIOS PM ─────────────────────────────────────────────────────── */
.ac-pm-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.ac-pm-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a8fa6;
}

.ac-pm-input,
.ac-pm-select,
.ac-pm-textarea {
  width: 100%;
  border: 1.5px solid rgba(14,32,68,.14);
  padding: 9px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9rem;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #0e2044;
  transition: border-color var(--pm-ease), box-shadow var(--pm-ease);
  appearance: none;
}

.ac-pm-input:focus,
.ac-pm-select:focus,
.ac-pm-textarea:focus {
  border-color: #b8721a;
  box-shadow: 0 0 0 3px rgba(184,114,26,.12);
}

/* ─── MODALES PM ─────────────────────────────────────────────────────────── */
.ac-pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,32,68,.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pmFadeIn .15s ease both;
}

.ac-pm-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(14,32,68,.3);
  animation: pmSlideUp .2s ease both;
}

.ac-pm-modal--wide { max-width: 760px; }

.ac-pm-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 16px;
  border-bottom: 1px solid rgba(14,32,68,.08);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 20px 20px 0 0;
}

.ac-pm-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0e2044;
  letter-spacing: -.025em;
}

.ac-pm-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: color var(--pm-ease), background var(--pm-ease);
}

.ac-pm-modal__close:hover { color: #0e2044; background: #f0f2f5; }

.ac-pm-modal__body {
  padding: 20px 24px 28px;
}

.ac-pm-modal__footer {
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(14,32,68,.07);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── NOTICES PM ─────────────────────────────────────────────────────────── */
.ac-pm-notice {
  padding: 11px 16px;
  border-radius: 10px;
  font-size: .85rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid transparent;
}

.ac-pm-notice--info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.ac-pm-notice--success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.ac-pm-notice--warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.ac-pm-notice--error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ─── TARJETA DE PRESUPUESTO PM ──────────────────────────────────────────── */
.ac-pm-pres-card {
  background: #fff;
  border: 1px solid rgba(14,32,68,.09);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: box-shadow var(--pm-ease), transform var(--pm-ease);
}

.ac-pm-pres-card:hover {
  box-shadow: 0 4px 16px rgba(14,32,68,.09);
  transform: translateY(-1px);
}

.ac-pm-pres-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ac-pm-pres-card__client {
  font-size: .78rem;
  font-weight: 700;
  color: #b8721a;
}

.ac-pm-pres-importe {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #0e2044;
  font-feature-settings: 'tnum';
}

/* ─── EMPTY STATE PM ─────────────────────────────────────────────────────── */
.ac-pm-empty {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}

.ac-pm-empty__icon {
  font-size: 2.5rem;
  opacity: .35;
  margin-bottom: 12px;
  display: block;
}

.ac-pm-empty__title {
  font-size: .95rem;
  font-weight: 600;
  color: #3d5166;
  margin-bottom: 6px;
}

.ac-pm-empty__sub { font-size: .84rem; }

/* ─── ANIMACIONES ────────────────────────────────────────────────────────── */
@keyframes pmFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmSlideUp  { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ─── TOPBAR NAV (modo topbar legacy) ────────────────────────────────────── */
.ac-pm-topbar__nav {
  display: none; /* reemplazado por sidebar — solo mostrar en print */
}

/* ─── SCROLLBAR PM ───────────────────────────────────────────────────────── */
.ac-pm-conv-list::-webkit-scrollbar,
.ac-pm-messages::-webkit-scrollbar { width: 4px; }
.ac-pm-conv-list::-webkit-scrollbar-track,
.ac-pm-messages::-webkit-scrollbar-track { background: transparent; }
.ac-pm-conv-list::-webkit-scrollbar-thumb,
.ac-pm-messages::-webkit-scrollbar-thumb { background: rgba(14,32,68,.14); border-radius: 2px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ac-pm-root {
    grid-template-columns: 56px 1fr;
  }
  .ac-pm-sidebar {
    padding: 12px 8px;
    overflow: visible;
  }
  .ac-pm-nav-section__label,
  .ac-pm-nav-link span,
  .ac-pm-sidebar__bottom .ac-pm-btn { display: none; }
  .ac-pm-nav-link {
    padding: 10px;
    justify-content: center;
    border-radius: 10px;
  }
  .ac-pm-nav-link__icon { width: auto; }
  .ac-pm-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ac-pm-root { grid-template-columns: 1fr; }
  .ac-pm-sidebar { display: none; }
  .ac-pm-main { padding: 20px 16px 40px; }
  .ac-pm-stats { grid-template-columns: 1fr 1fr; }
  .ac-pm-chat-layout { grid-template-columns: 1fr; height: auto; }
  .ac-pm-conv-list { height: 260px; border-right: none; border-bottom: 1px solid rgba(14,32,68,.08); }
}

@media (max-width: 480px) {
  .ac-pm-stats { grid-template-columns: 1fr; }
  .ac-pm-page-header h1 { font-size: 1.35rem; }
}

/* Premium polish */
.ac-pm-topbar {
  background: rgba(14,32,68,.94);
  backdrop-filter: blur(14px);
}

.ac-pm-sidebar {
  background:
    linear-gradient(180deg, rgba(14,32,68,.98), rgba(18,41,84,.98));
}

.ac-pm-main {
  position: relative;
}

.ac-pm-main::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 260px;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(232,170,86,.16), transparent 32%),
    radial-gradient(circle at top left, rgba(14,32,68,.09), transparent 24%);
}

.ac-pm-hero,
.ac-pm-section,
.ac-pm-card,
.ac-pm-stat {
  position: relative;
  z-index: 1;
}

.ac-pm-card,
.ac-pm-section,
.ac-pm-stat {
  box-shadow: 0 18px 34px rgba(15,23,42,.08), 0 2px 10px rgba(15,23,42,.05);
}

.ac-pm-card:hover,
.ac-pm-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(15,23,42,.1), 0 4px 14px rgba(15,23,42,.06);
}

.ac-pm-btn--primary {
  box-shadow: 0 14px 24px rgba(14,32,68,.22);
}
