/* ================================================================
   Personal Salud – Estilos principales
   Diseño: Institucional-moderno · Paleta azul sanitaria
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --ps-blue-900: #0d2240;
  --ps-blue-800: #1a3a5c;
  --ps-blue-600: #2563a8;
  --ps-blue-400: #4a90d9;
  --ps-blue-100: #e8f0fb;
  --ps-blue-50:  #f0f6ff;

  --ps-green-500: #16a34a;
  --ps-green-100: #dcfce7;
  --ps-orange-500:#ea580c;
  --ps-orange-100:#ffedd5;
  --ps-purple-500:#7c3aed;
  --ps-purple-100:#ede9fe;
  --ps-red-500:  #dc2626;
  --ps-red-100:  #fee2e2;

  --ps-gray-900: #111827;
  --ps-gray-700: #374151;
  --ps-gray-500: #6b7280;
  --ps-gray-300: #d1d5db;
  --ps-gray-100: #f3f4f6;
  --ps-gray-50:  #f9fafb;

  --ps-white: #ffffff;

  --ps-sidebar-w: 260px;
  --ps-radius:    12px;
  --ps-radius-sm: 8px;
  --ps-shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --ps-shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.12);

  --ps-font-body: 'DM Sans', sans-serif;
  --ps-font-head: 'Syne', sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--ps-font-body);
  background:  var(--ps-gray-100);
  color:       var(--ps-gray-900);
  font-size:   15px;
  line-height: 1.6;
  margin: 0;
}

/* ── Layout wrapper ────────────────────────────────────────────── */
.ps-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.ps-sidebar {
  width: var(--ps-sidebar-w);
  background: var(--ps-blue-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.ps-sidebar__brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ps-sidebar__logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--ps-blue-400), var(--ps-blue-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(74,144,217,.4);
}

.ps-sidebar__name {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.2;
}

.ps-sidebar__sub {
  font-size: .7rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Nav */
.ps-nav {
  list-style: none;
  padding: 1rem .75rem;
  margin: 0;
  flex: 1;
}

.ps-nav__divider {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  padding: 1.25rem .75rem .5rem;
}

.ps-nav__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .75rem;
  border-radius: var(--ps-radius-sm);
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .18s, color .18s;
}

.ps-nav__link i { font-size: 1rem; width: 20px; text-align: center; }

.ps-nav__link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.ps-nav__link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.ps-nav__link.active::before {
  content: '';
  position: absolute;
  left: .75rem;
  width: 3px; height: 20px;
  background: var(--ps-blue-400);
  border-radius: 4px;
}

.ps-nav__item { position: relative; }

/* Sidebar user */
.ps-sidebar__user {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.ps-sidebar__avatar {
  width: 34px; height: 34px;
  background: var(--ps-blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.ps-sidebar__username {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-sidebar__userrole {
  font-size: .68rem;
  color: rgba(255,255,255,.4);
}

.ps-sidebar__logout {
  margin-left: auto;
  color: rgba(255,255,255,.4);
  font-size: 1.1rem;
  transition: color .18s;
}
.ps-sidebar__logout:hover { color: var(--ps-red-500); }

/* ── MAIN ──────────────────────────────────────────────────────── */
.ps-main {
  margin-left: var(--ps-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ps-content {
  padding: 2rem;
  flex: 1;
}

/* ── TOP BAR (móvil) ───────────────────────────────────────────── */
.ps-topbar {
  background: var(--ps-blue-900);
  color: #fff;
  padding: .875rem 1rem;
  display: flex;
  align-items: center;
  gap: .875rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.ps-topbar__toggle {
  background: none; border: none;
  color: #fff; font-size: 1.4rem;
  padding: 0; cursor: pointer;
}

.ps-topbar__title {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 1rem;
}

/* ── PAGE HEADER ───────────────────────────────────────────────── */
.ps-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.ps-page-header__title {
  font-family: var(--ps-font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ps-blue-900);
  margin: 0;
  line-height: 1.2;
}

.ps-page-header__sub {
  color: var(--ps-gray-500);
  margin: .25rem 0 0;
  font-size: .875rem;
}

/* ── CARDS ─────────────────────────────────────────────────────── */
.ps-card {
  background: var(--ps-white);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
}

.ps-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--ps-gray-100);
}

.ps-card__title {
  font-family: var(--ps-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ps-blue-800);
  margin: 0;
}

.ps-card__body { padding: 1.5rem; }

.ps-link-sm {
  font-size: .8rem;
  color: var(--ps-blue-600);
  text-decoration: none;
  font-weight: 600;
}
.ps-link-sm:hover { text-decoration: underline; }

/* ── STAT CARDS ────────────────────────────────────────────────── */
.ps-stat-card {
  background: var(--ps-white);
  border-radius: var(--ps-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ps-shadow);
  display: flex;
  flex-direction: column;
  gap: .375rem;
  position: relative;
  overflow: hidden;
}

.ps-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.ps-stat-card--blue::before  { background: var(--ps-blue-600); }
.ps-stat-card--green::before { background: var(--ps-green-500); }
.ps-stat-card--orange::before{ background: var(--ps-orange-500); }
.ps-stat-card--purple::before{ background: var(--ps-purple-500); }

.ps-stat-card__icon {
  font-size: 1.5rem;
  opacity: .7;
}

.ps-stat-card--blue   .ps-stat-card__icon { color: var(--ps-blue-600); }
.ps-stat-card--green  .ps-stat-card__icon { color: var(--ps-green-500); }
.ps-stat-card--orange .ps-stat-card__icon { color: var(--ps-orange-500); }
.ps-stat-card--purple .ps-stat-card__icon { color: var(--ps-purple-500); }

.ps-stat-card__val {
  font-family: var(--ps-font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ps-gray-900);
  line-height: 1;
}

.ps-stat-card__label {
  font-size: .8rem;
  color: var(--ps-gray-500);
  font-weight: 500;
}

/* ── BUTTONS ───────────────────────────────────────────────────── */
.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1.125rem;
  border-radius: var(--ps-radius-sm);
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--ps-font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  border: none;
  white-space: nowrap;
}

.ps-btn--primary {
  background: var(--ps-blue-800);
  color: #fff;
}
.ps-btn--primary:hover { background: var(--ps-blue-900); color: #fff; }

.ps-btn--ghost {
  background: transparent;
  color: var(--ps-gray-700);
  border: 1.5px solid var(--ps-gray-300);
}
.ps-btn--ghost:hover { background: var(--ps-gray-100); color: var(--ps-gray-900); }

.ps-btn--danger-sm {
  background: transparent;
  color: var(--ps-red-500);
  border: 1.5px solid var(--ps-red-500);
  padding: .3rem .875rem;
  font-size: .8rem;
  border-radius: var(--ps-radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all .18s;
}
.ps-btn--danger-sm:hover { background: var(--ps-red-500); color: #fff; }

.ps-btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--ps-radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  transition: all .18s;
  background: transparent;
}

.ps-btn-icon--dl  { color: var(--ps-blue-600); }
.ps-btn-icon--dl:hover  { background: var(--ps-blue-100); }
.ps-btn-icon--del { color: var(--ps-red-500); }
.ps-btn-icon--del:hover { background: var(--ps-red-100); }
.ps-btn-icon--ok  { color: var(--ps-green-500); }
.ps-btn-icon--ok:hover  { background: var(--ps-green-100); }

/* ── FORM FIELDS ───────────────────────────────────────────────── */
.ps-field { margin-bottom: .875rem; }

.ps-field__label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ps-gray-700);
  margin-bottom: .375rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.ps-field__input {
  display: block;
  width: 100%;
  padding: .5625rem .875rem;
  background: var(--ps-white);
  border: 1.5px solid var(--ps-gray-300);
  border-radius: var(--ps-radius-sm);
  font-size: .875rem;
  font-family: var(--ps-font-body);
  color: var(--ps-gray-900);
  transition: border-color .18s, box-shadow .18s;
  appearance: none;
}

.ps-field__input:focus {
  outline: none;
  border-color: var(--ps-blue-400);
  box-shadow: 0 0 0 3px rgba(74,144,217,.15);
}

.ps-field__input--sm { padding: .375rem .625rem; font-size: .8rem; }

.ps-field__passgroup {
  position: relative;
}
.ps-field__passgroup .ps-field__input { padding-right: 2.5rem; }
.ps-field__eye {
  position: absolute;
  right: .625rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--ps-gray-500);
  cursor: pointer; font-size: .9rem;
}

/* ── SEARCH BAR ────────────────────────────────────────────────── */
.ps-search-bar__wrap {
  position: relative;
}
.ps-search-bar__icon {
  position: absolute;
  left: .75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--ps-gray-500);
  font-size: .85rem;
}
.ps-search-bar__input {
  width: 100%;
  padding: .5625rem .875rem .5625rem 2.25rem;
  border: 1.5px solid var(--ps-gray-300);
  border-radius: var(--ps-radius-sm);
  font-size: .875rem;
  font-family: var(--ps-font-body);
  background: var(--ps-white);
  transition: border-color .18s, box-shadow .18s;
}
.ps-search-bar__input:focus {
  outline: none;
  border-color: var(--ps-blue-400);
  box-shadow: 0 0 0 3px rgba(74,144,217,.15);
}

/* ── TABLE ─────────────────────────────────────────────────────── */
.ps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.ps-table thead th {
  background: var(--ps-gray-50);
  color: var(--ps-gray-700);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .75rem 1.25rem;
  border-bottom: 2px solid var(--ps-gray-200, #e5e7eb);
  text-align: left;
}
.ps-table tbody td {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--ps-gray-100);
  vertical-align: middle;
}
.ps-table tbody tr:hover { background: var(--ps-blue-50); }
.ps-table tbody tr:last-child td { border-bottom: none; }
.ps-table__row--inactive td { opacity: .55; }
.ps-table__doc-title { font-weight: 600; color: var(--ps-gray-900); }
.ps-table__doc-desc { font-size: .78rem; color: var(--ps-gray-500); margin-top: .15rem; }

/* ── BADGES ────────────────────────────────────────────────────── */
.ps-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1;
}
.ps-badge--dep    { background: var(--ps-blue-100);   color: var(--ps-blue-800); }
.ps-badge--cat    { background: var(--ps-orange-100); color: var(--ps-orange-500); }
.ps-badge--all    { background: var(--ps-green-100);  color: var(--ps-green-500); }
.ps-badge--active { background: var(--ps-green-100);  color: var(--ps-green-500); }
.ps-badge--inactive{ background: var(--ps-gray-100);  color: var(--ps-gray-500); }

/* ── DOC LIST (dashboard) ──────────────────────────────────────── */
.ps-doc-list { list-style: none; padding: 0; margin: 0; }
.ps-doc-list__item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--ps-gray-100);
  transition: background .15s;
}
.ps-doc-list__item:last-child { border-bottom: none; }
.ps-doc-list__item:hover { background: var(--ps-blue-50); }

.ps-doc-list__icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--ps-blue-100);
  color: var(--ps-blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ps-doc-list__info { flex: 1; min-width: 0; }
.ps-doc-list__title { font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-doc-list__meta  { display: flex; gap: .375rem; flex-wrap: wrap; margin-top: .2rem; align-items: center; }

.ps-doc-list__dl {
  color: var(--ps-blue-600);
  font-size: 1rem;
  padding: .375rem;
  border-radius: 6px;
  transition: background .15s;
  flex-shrink: 0;
}
.ps-doc-list__dl:hover { background: var(--ps-blue-100); }

/* ── ANNOUNCE LIST ─────────────────────────────────────────────── */
.ps-announce-list { list-style: none; padding: 0; margin: 0; }
.ps-announce-list__item {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--ps-gray-100);
}
.ps-announce-list__item:last-child { border-bottom: none; }
.ps-announce-list__title { font-weight: 600; font-size: .875rem; }
.ps-announce-list__date  { font-size: .75rem; color: var(--ps-gray-500); margin-top: .2rem; }

/* ── DEP GRID (dashboard) ──────────────────────────────────────── */
.ps-dep-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.ps-dep-chip {
  padding: .4rem .875rem;
  background: var(--ps-blue-50);
  color: var(--ps-blue-800);
  border: 1.5px solid var(--ps-blue-100);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .18s;
}
.ps-dep-chip:hover { background: var(--ps-blue-800); color: #fff; border-color: transparent; }

/* ── DROPZONE ──────────────────────────────────────────────────── */
.ps-dropzone {
  border: 2px dashed var(--ps-gray-300);
  border-radius: var(--ps-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--ps-gray-50);
}
.ps-dropzone:hover, .ps-dropzone--over {
  border-color: var(--ps-blue-400);
  background: var(--ps-blue-50);
}
.ps-dropzone--filled {
  border-color: var(--ps-green-500);
  background: var(--ps-green-100);
}
.ps-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.ps-dropzone__icon {
  font-size: 2.5rem;
  color: var(--ps-blue-400);
  display: block;
  margin-bottom: .75rem;
}
.ps-dropzone__icon--ok { color: var(--ps-green-500); }
.ps-dropzone__text {
  font-weight: 600;
  color: var(--ps-gray-700);
}
.ps-dropzone__text span { color: var(--ps-blue-600); }
.ps-dropzone__hint { font-size: .8rem; color: var(--ps-gray-500); margin-top: .25rem; }

/* ── COMMUNICADOS ──────────────────────────────────────────────── */
.ps-comm-card {
  background: var(--ps-white);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
  border-left: 4px solid var(--ps-blue-600);
}
.ps-comm-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--ps-gray-100);
  flex-wrap: wrap;
  gap: .75rem;
}
.ps-comm-card__title { font-family: var(--ps-font-head); font-size: 1.05rem; font-weight: 700; color: var(--ps-blue-900); margin: 0; }
.ps-comm-card__meta  { font-size: .78rem; color: var(--ps-gray-500); margin-top: .25rem; }
.ps-comm-card__badges { display: flex; gap: .375rem; flex-wrap: wrap; }
.ps-comm-card__body  { padding: 1.25rem 1.5rem; font-size: .875rem; color: var(--ps-gray-700); line-height: 1.7; }
.ps-comm-card__actions { padding: .875rem 1.5rem; border-top: 1px solid var(--ps-gray-100); background: var(--ps-gray-50); }

/* ── CHECKBOX CARD ─────────────────────────────────────────────── */
.ps-check-card {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem .875rem;
  background: var(--ps-gray-50);
  border: 1.5px solid var(--ps-gray-300);
  border-radius: var(--ps-radius-sm);
  cursor: pointer;
  transition: all .18s;
  font-size: .875rem;
  font-weight: 500;
}
.ps-check-card:hover { border-color: var(--ps-blue-400); background: var(--ps-blue-50); }
.ps-check-card input:checked ~ .ps-check-card__label { color: var(--ps-blue-700, var(--ps-blue-800)); }
.ps-check-card input[type="checkbox"] { accent-color: var(--ps-blue-600); width: 16px; height: 16px; }

/* ── PAGINATION ────────────────────────────────────────────────── */
.ps-pagination {
  display: flex;
  gap: .25rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ps-gray-100);
}
.ps-pagination__page {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--ps-radius-sm);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ps-gray-700);
  transition: all .18s;
  border: 1.5px solid transparent;
}
.ps-pagination__page:hover { background: var(--ps-blue-50); border-color: var(--ps-blue-100); color: var(--ps-blue-800); }
.ps-pagination__page.active { background: var(--ps-blue-800); color: #fff; }

/* ── ADMIN LIST ────────────────────────────────────────────────── */
.ps-admin-list { list-style: none; padding: 0; margin: 0; }
.ps-admin-list__item {
  padding: .5rem .25rem;
  border-bottom: 1px solid var(--ps-gray-100);
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ps-admin-list__item:last-child { border-bottom: none; }
.ps-admin-list__item--inactive { color: var(--ps-gray-400, #9ca3af); }

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.ps-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .625rem;
  padding: 3rem 1.5rem;
  color: var(--ps-gray-400, #9ca3af);
}
.ps-empty i { font-size: 2.5rem; opacity: .5; }
.ps-empty span { font-size: .9rem; }

/* ── ALERT ─────────────────────────────────────────────────────── */
.ps-alert { border-radius: var(--ps-radius-sm); font-size: .875rem; }

/* ── FILTER BAR ────────────────────────────────────────────────── */
.ps-filter-bar {
  background: var(--ps-white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
}

/* ── LOGIN ─────────────────────────────────────────────────────── */
.ps-login-body {
  background: var(--ps-gray-100);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  margin: 0;
}

.ps-login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.ps-login-panel {
  background: var(--ps-blue-900);
  width: 42%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-login-panel__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.ps-login-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(37,99,168,.6) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 20%, rgba(74,144,217,.3) 0%, transparent 50%);
}

.ps-login-panel__icon {
  font-size: 3.5rem;
  color: rgba(255,255,255,.25);
  margin-bottom: 1rem;
}

.ps-login-panel__title {
  font-family: var(--ps-font-head);
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 .75rem;
}

.ps-login-panel__sub {
  color: rgba(255,255,255,.45);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.ps-login-panel__deco {
  width: 60px; height: 4px;
  background: var(--ps-blue-400);
  border-radius: 4px;
  margin: 1.5rem auto 0;
}

.ps-login-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.ps-login-form-card {
  width: 100%;
  max-width: 420px;
}

.ps-login-form-card__title {
  font-family: var(--ps-font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ps-blue-900);
  margin: 0 0 .375rem;
}

.ps-login-form-card__hint {
  color: var(--ps-gray-500);
  font-size: .875rem;
  margin-bottom: 1.75rem;
}

.ps-btn-login {
  width: 100%;
  padding: .75rem 1.5rem;
  background: var(--ps-blue-800);
  color: #fff;
  border: none;
  border-radius: var(--ps-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--ps-font-body);
  cursor: pointer;
  transition: background .18s;
  margin-top: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.ps-btn-login:hover { background: var(--ps-blue-900); }

.ps-login-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: .8rem;
  color: var(--ps-gray-500);
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ps-sidebar {
    transform: translateX(-100%);
  }
  .ps-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--ps-shadow-lg);
  }
  .ps-main { margin-left: 0; }
  .ps-content { padding: 1.25rem; }
  .ps-login-panel { display: none; }
}

@media (max-width: 575.98px) {
  .ps-page-header { flex-direction: column; }
  .ps-page-header__title { font-size: 1.4rem; }
  .ps-content { padding: 1rem; }
}

/* ============================================================
   v2 – Vigencia, permisos, agrupación por mes
   ============================================================ */

/* ── Badges de vigencia (solo lectura) ─────────────────────── */
.ps-vigencia-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ps-vigencia-badge--vigente  { background: #d1fae5; color: #065f46; }
.ps-vigencia-badge--caducado { background: #fee2e2; color: #991b1b; }

/* ── Botones interactivos de vigencia ───────────────────────── */
.ps-vigencia-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .22rem .6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.ps-vigencia-btn:hover { opacity: .8; }
.ps-vigencia-btn--vigente  { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.ps-vigencia-btn--caducado { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* ── Filas caducadas en tabla ───────────────────────────────── */
.ps-table__row--caducado td { opacity: .6; }
.ps-table__row--caducado .ps-table__doc-title { text-decoration: line-through; }

/* ── Tarjeta comunicado caducado ────────────────────────────── */
.ps-comm-card--caducado { border-left: 4px solid #f87171; opacity: .85; }

/* ── Botones de acción en comunicados ───────────────────────── */
.ps-btn--warning-sm {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .75rem; font-size: .8rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer;
  background: #fef3c7; color: #92400e; transition: opacity .15s;
}
.ps-btn--success-sm {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .75rem; font-size: .8rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer;
  background: #d1fae5; color: #065f46; transition: opacity .15s;
}
.ps-btn--warning-sm:hover,
.ps-btn--success-sm:hover { opacity: .8; }

/* ── Botones toggle de permisos ────────────────────────────── */
.ps-permiso-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  transition: opacity .15s;
}
.ps-permiso-btn:hover       { opacity: .75; }
.ps-permiso-btn--on  i      { color: #059669; }
.ps-permiso-btn--off i      { color: #9ca3af; }

/* ── Alerta de advertencia (confirmación eliminación) ──────── */
.ps-alert {
  padding: .85rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
}
.ps-alert--warning { background: #fef9c3; border: 1px solid #fde047; color: #713f12; }

/* ── Cabecera de sección mensual ───────────────────────────── */
.ps-mes-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ps-text, #1e293b);
  padding: .5rem 0 .4rem;
  border-bottom: 2px solid var(--ps-border, #e2e8f0);
  margin-bottom: .75rem;
}
.ps-mes-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 500;
  color: var(--ps-text-muted, #64748b);
}

/* ── Botón editar en listas de admin ────────────────────────── */
.ps-btn-icon--edit {
  background: none;
  border: none;
  padding: .25rem .4rem;
  border-radius: 6px;
  cursor: pointer;
  color: #2563eb;
  transition: background .15s;
}
.ps-btn-icon--edit:hover { background: #eff6ff; }

/* ── Formulario de edición inline en lista admin ─────────────── */
.ps-admin-edit-form {
  display: flex;
  padding: .4rem .5rem;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: .25rem;
}

/* ── Lista admin: items con flex para acciones ───────────────── */
.ps-admin-list__item {
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* ── Botón icono deshabilitado (documento caducado) ─────────── */
.ps-btn-icon--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: #cbd5e1;
  cursor: not-allowed;
  font-size: 1rem;
}


/* ============================================================
   Personal Salud v2 – Estilos adicionales
   Agregar al FINAL de public/css/app.css
   ============================================================ */

/* ── Sidebar: botón perfil ────────────────────────────────────── */
.ps-sidebar__perfil {
  color: rgba(255,255,255,.45);
  font-size: 1.1rem;
  transition: color .18s;
}
.ps-sidebar__perfil:hover { color: var(--ps-blue-400); }

/* ── Perfil: avatar grande ────────────────────────────────────── */
.ps-perfil__avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--ps-blue-400), var(--ps-blue-800));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(37,99,168,.35);
}

.ps-perfil__nombre {
  font-family: var(--ps-font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ps-blue-900);
  margin: 0;
}

.ps-perfil__email {
  font-size: .78rem;
  color: var(--ps-gray-500);
  margin: 4px 0 0;
  word-break: break-all;
}

.ps-perfil__meta { text-align: left; }

.ps-perfil__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--ps-gray-100);
  font-size: .82rem;
}
.ps-perfil__meta-row:last-child { border-bottom: none; }

.ps-perfil__meta-lbl {
  color: var(--ps-gray-500);
  font-weight: 500;
}

/* ── Días disponibles grid ────────────────────────────────────── */
.ps-dias-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .625rem;
}

.ps-dias-card {
  border-radius: var(--ps-radius-sm);
  padding: .875rem .625rem;
  text-align: center;
}

.ps-dias-card--verde {
  background: var(--ps-green-100);
  border: 1.5px solid rgba(22,163,74,.2);
}
.ps-dias-card--azul {
  background: var(--ps-blue-100);
  border: 1.5px solid rgba(37,99,168,.2);
}

.ps-dias-card__val {
  font-family: var(--ps-font-head);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ps-gray-900);
}

.ps-dias-card__lbl {
  font-size: .68rem;
  color: var(--ps-gray-500);
  margin-top: 4px;
  line-height: 1.3;
}

/* ── Info box (perfil read-only) ──────────────────────────────── */
.ps-info-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--ps-radius-sm);
  border: 1.5px solid transparent;
}
.ps-info-box--verde {
  background: var(--ps-green-100);
  border-color: rgba(22,163,74,.2);
}
.ps-info-box--azul {
  background: var(--ps-blue-100);
  border-color: rgba(37,99,168,.2);
}
.ps-info-box__val {
  font-family: var(--ps-font-head);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ps-gray-900);
}
.ps-info-box__lbl {
  font-size: .78rem;
  color: var(--ps-gray-500);
  font-weight: 500;
}

/* ── Decreto box ──────────────────────────────────────────────── */
.ps-decreto-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--ps-blue-50);
  border: 1.5px solid var(--ps-blue-100);
  border-radius: var(--ps-radius-sm);
  flex-wrap: wrap;
}

/* ── Avatar pequeño (tabla funcionarios) ──────────────────────── */
.ps-av-sm {
  width: 32px; height: 32px;
  background: var(--ps-blue-100);
  color: var(--ps-blue-800);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Utilitario fw-600 ────────────────────────────────────────── */
.fw-600 { font-weight: 600; }
