:root {
  --sidebar-w: 292px;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --success-soft: #dcfce7;
  --warning-soft: #fef3c7;
  --danger-soft: #fee2e2;
  --shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #e5eefc;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 18px 0 40px rgba(2, 6, 23, 0.16);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 14px;
}

.sidebar-brand__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.sidebar-brand__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.sidebar-brand__subtitle {
  font-size: .82rem;
  color: rgba(226, 232, 240, 0.78);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 12px 14px;
}

.sidebar-user__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}

.sidebar-user__name {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-user__role {
  font-size: .82rem;
  color: rgba(226, 232, 240, 0.80);
}

.sidebar-company,
.sidebar-switcher {
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 12px 14px;
}

.sidebar-company__label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(226, 232, 240, 0.72);
  margin-bottom: 6px;
}

.sidebar-company__value {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: #fff;
  font-size: .92rem;
  font-weight: 600;
}

.company-pill {
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.26);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.form-label-sm {
  font-size: .8rem;
  color: rgba(226, 232, 240, 0.88);
}

.sidebar-switcher .form-select {
  background-color: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
}

.sidebar-switcher .form-select:focus {
  border-color: rgba(147, 197, 253, 0.60);
  box-shadow: 0 0 0 .25rem rgba(37, 99, 235, 0.18);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding-right: 4px;
}

.sidebar-nav__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav__label {
  color: rgba(226, 232, 240, 0.60);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #dbe7ff;
  transition: .18s ease;
  font-weight: 600;
  font-size: .93rem;
}

.sidebar-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(30, 64, 175, 0.88));
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-link--logout {
  background: rgba(255,255,255,0.05);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 24px 24px 30px;
}

.topbar {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar__eyebrow {
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 2px;
}

.topbar__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
}

.topbar__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: #1e293b;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
}

.topbar-chip i {
  color: var(--primary);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.page-head__desc {
  color: var(--muted);
  margin-top: 6px;
  max-width: 860px;
}

.page-head__side {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 18px;
}

.stat-card__label {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.stat-card__hint {
  color: var(--muted);
  font-size: .82rem;
  margin-top: 8px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.card-header-clean {
  padding: 18px 22px 0;
}

.card-title-clean {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.card-subtitle-clean {
  margin-top: 4px;
  color: var(--muted);
  font-size: .9rem;
}

.card-body-clean {
  padding: 18px 22px 22px;
}

.toolbar-card {
  padding: 16px 18px;
  margin-bottom: 14px;
}

.table-card {
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

.table {
  margin: 0;
  background: transparent;
}

.table > :not(caption) > * > * {
  padding: 13px 14px;
  border-bottom-color: #edf2f7;
  vertical-align: middle;
}

.table thead th {
  font-size: .79rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
  background: #f8fbff;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .76rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.badge-soft--primary {
  background: var(--primary-soft);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge-soft--success {
  background: var(--success-soft);
  color: #166534;
  border-color: #bbf7d0;
}

.badge-soft--warning {
  background: var(--warning-soft);
  color: #92400e;
  border-color: #fde68a;
}

.badge-soft--danger {
  background: var(--danger-soft);
  color: #b91c1c;
  border-color: #fecaca;
}

.badge-soft--secondary {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge-soft--dark {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.form-label {
  font-size: .88rem;
  font-weight: 700;
  color: #334155;
}

.form-control,
.form-select {
  border-radius: 14px;
  border-color: #d7dee8;
  min-height: 44px;
}

.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .25rem rgba(37, 99, 235, 0.14);
}

textarea.form-control {
  min-height: 110px;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
}

.btn-soft {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.btn-soft:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.empty-state {
  padding: 26px 14px;
  text-align: center;
  color: var(--muted);
}

.thumb-eq {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  overflow: hidden;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 800;
}

.thumb-eq img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form .form-select,
.inline-form .form-control {
  min-height: 38px;
  border-radius: 12px;
  font-size: .9rem;
}

.kv-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.kv-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
}

.kv-item__label {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  margin-bottom: 4px;
}

.kv-item__value {
  color: var(--text);
  font-size: .94rem;
  font-weight: 700;
}

.small-muted {
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  :root {
    --sidebar-w: 100%;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    border-radius: 0 0 24px 24px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    border-radius: 18px;
  }
}

@media (max-width: 767.98px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-head__title,
  .topbar__title {
    font-size: 1.25rem;
  }

  .kv-list {
    grid-template-columns: 1fr;
  }

  .table > :not(caption) > * > * {
    padding: 11px 10px;
  }
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-actions__meta {
  color: var(--muted);
  font-size: .9rem;
}

.section-actions .btn {
  min-width: 180px;
}

.list-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.table-card--clean .card-header-clean {
  padding-bottom: 14px;
}

.table-clean thead th {
  background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

.entity-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entity-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e0ecff, #dbeafe);
  border: 1px solid #c7dbff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 52px;
}

.entity-title {
  font-size: .98rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

.entity-subtitle {
  color: var(--muted);
  font-size: .86rem;
  margin-top: 4px;
}

.entity-meta-line {
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2px;
}

.row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-stat-chip {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  color: #334155;
  font-weight: 700;
}

.actions-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.actions-stack .btn,
.actions-stack form {
  margin: 0;
}

.equip-photo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #d7dee8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex: 0 0 68px;
}

.equip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card {
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,246,255,.9));
}

.form-panel {
  max-width: 980px;
}

.media-placeholder {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
}

.media-placeholder i {
  font-size: 2.6rem;
  color: #64748b;
}

.media-cover {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 16px 0 14px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-item {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.record-item__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.65fr) minmax(180px, 1fr) minmax(200px, 1fr) minmax(120px, .7fr) minmax(240px, 1.15fr);
  gap: 16px;
  align-items: center;
}

.record-item--empresa .record-item__grid,
.record-item--sucursal .record-item__grid,
.record-item--obra .record-item__grid,
.record-item--personal .record-item__grid {
  grid-template-columns: minmax(260px, 1.55fr) minmax(180px, .95fr) minmax(220px, 1fr) minmax(120px, .65fr) minmax(230px, .95fr);
}

.record-col {
  min-width: 0;
}

.record-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7b8aa1;
  font-weight: 800;
  margin-bottom: 8px;
}

.record-value {
  color: #0f172a;
  font-weight: 600;
}

.record-muted {
  color: #64748b;
  font-size: .88rem;
}

.entity-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.entity-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  font-weight: 800;
  flex: 0 0 54px;
}

.entity-avatar i {
  font-size: 1.1rem;
}

.entity-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.entity-subtitle {
  font-size: .9rem;
  color: #475569;
  margin-top: 2px;
}

.entity-meta-line {
  font-size: .84rem;
  color: #64748b;
  margin-top: 3px;
}

.record-inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-inline-stats .row-stat-chip {
  background: #f8fafc;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.action-group .btn,
.action-group form {
  margin: 0;
}

.action-group .btn,
.action-group form .btn {
  border-radius: 999px;
  font-weight: 700;
  padding: .45rem .9rem;
}

.btn-action-view {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

.btn-action-view:hover {
  background: #dbeafe;
  color: #1e40af;
}

.btn-action-edit {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-action-edit:hover {
  background: #eef2f7;
  color: #0f172a;
}

.btn-action-toggle {
  background: #fff;
  border: 1px solid #94a3b8;
  color: #334155;
}

.btn-action-toggle:hover {
  background: #f8fafc;
}

.equip-photo {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #d7dee8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex: 0 0 82px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.equip-photo i {
  font-size: 1.55rem;
}

.equip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.status-editor .form-select {
  min-width: 180px;
  border-radius: 14px;
}

.media-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}

@media (max-width: 1400px) {
  .record-item__grid,
  .record-item--empresa .record-item__grid,
  .record-item--sucursal .record-item__grid,
  .record-item--obra .record-item__grid,
  .record-item--personal .record-item__grid {
    grid-template-columns: 1.45fr 1fr 1fr .8fr 1fr;
  }
}

@media (max-width: 1100px) {
  .record-item__grid,
  .record-item--empresa .record-item__grid,
  .record-item--sucursal .record-item__grid,
  .record-item--obra .record-item__grid,
  .record-item--personal .record-item__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section-actions {
    justify-content: stretch;
  }

  .section-actions .btn {
    width: 100%;
  }

  .record-item {
    padding: 16px;
  }

  .record-item__grid,
  .record-item--empresa .record-item__grid,
  .record-item--sucursal .record-item__grid,
  .record-item--obra .record-item__grid,
  .record-item--personal .record-item__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .equip-photo {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
  }
}

/* ===== Ajustes v2 listados tipo tabla ===== */
.section-actions{
  justify-content:flex-start;
  margin-bottom:14px;
}

.table-card--pro{
  overflow:hidden;
}

.table-card--pro .table-wrap{
  padding:0 18px 18px;
}

.table-pro{
  width:100%;
  border-collapse:separate;
  border-spacing:0 12px;
}

.table-pro thead th{
  background:transparent !important;
  border:none !important;
  padding:0 14px 6px !important;
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
  color:#7b8aa1;
}

.table-pro tbody td{
  background:#fff;
  border-top:1px solid #e7eef7 !important;
  border-bottom:1px solid #e7eef7 !important;
  border-left:none !important;
  border-right:none !important;
  padding:16px 14px !important;
  vertical-align:middle;
}

.table-pro tbody tr td:first-child{
  border-left:1px solid #e7eef7 !important;
  border-top-left-radius:18px;
  border-bottom-left-radius:18px;
}

.table-pro tbody tr td:last-child{
  border-right:1px solid #e7eef7 !important;
  border-top-right-radius:18px;
  border-bottom-right-radius:18px;
}

.table-pro tbody tr:hover td{
  background:#fbfdff;
}

.table-entity{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}

.table-entity__media{
  width:76px;
  height:76px;
  flex:0 0 76px;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg,#f8fafc 0%,#e2e8f0 100%);
  border:1px solid #d7dee8;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}

.table-entity__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.table-entity__icon{
  font-size:1.35rem;
}

.table-entity__body{
  min-width:0;
}

.table-entity__title{
  font-size:1rem;
  font-weight:800;
  color:#0f172a;
  line-height:1.2;
  margin-bottom:4px;
}

.table-entity__subtitle{
  font-size:.9rem;
  font-weight:700;
  color:#334155;
  margin-bottom:3px;
}

.table-entity__meta,
.table-col__muted{
  color:#64748b;
  font-size:.86rem;
  line-height:1.45;
}

.table-col__title{
  font-size:.94rem;
  font-weight:700;
  color:#0f172a;
  margin-bottom:4px;
}

.table-stat-stack{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.table-stat-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:fit-content;
  padding:7px 10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:999px;
  color:#334155;
  font-size:.8rem;
  font-weight:700;
}

.table-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-start;
}

.table-actions__row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.table-actions .btn,
.table-actions form .btn{
  border-radius:999px;
  font-weight:700;
  min-width:88px;
}

.btn-pill-view{
  background:#eff6ff;
  border:1px solid #93c5fd;
  color:#1d4ed8;
}
.btn-pill-view:hover{background:#dbeafe;color:#1e40af;}

.btn-pill-edit{
  background:#f8fafc;
  border:1px solid #cbd5e1;
  color:#334155;
}
.btn-pill-edit:hover{background:#eef2f7;color:#0f172a;}

.btn-pill-toggle{
  background:#fff;
  border:1px solid #94a3b8;
  color:#334155;
}
.btn-pill-toggle:hover{background:#f8fafc;}

.status-stack{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:190px;
}

.status-stack .form-select{
  min-height:40px;
  border-radius:14px;
}

.status-stack .btn{
  align-self:flex-start;
}

.eq-state-badge{
  margin-top:8px;
}

.card-subtitle-clean--list{
  margin-top:2px;
}

/* ===== Detalle estético de equipo ===== */
.equipment-hero{
  display:grid;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
}

.equipment-hero__media{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border:1px solid #e5edf7;
  border-radius:24px;
  padding:14px;
  box-shadow:var(--shadow);
}

.equipment-hero__media .media-cover,
.equipment-hero__media .media-placeholder{
  margin:0;
  min-height:280px;
  height:100%;
}

.equipment-hero__body{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  border:1px solid #e5edf7;
  border-radius:24px;
  padding:18px 20px;
  box-shadow:var(--shadow);
}

.equipment-hero__header{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.equipment-hero__title{
  margin:0;
  font-size:1.35rem;
  font-weight:800;
  color:#0f172a;
}

.equipment-hero__subtitle{
  color:#64748b;
  font-size:.92rem;
  margin-top:4px;
}

.spec-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.spec-item{
  background:#f8fbff;
  border:1px solid #e5edf7;
  border-radius:18px;
  padding:12px 14px;
}

.spec-item--full{
  grid-column:1 / -1;
}

.spec-item__label{
  color:#7b8aa1;
  font-size:.75rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:4px;
}

.spec-item__value{
  color:#0f172a;
  font-size:.96rem;
  font-weight:700;
}

.spec-item__value--muted{
  color:#64748b;
  font-size:.9rem;
  font-weight:600;
}

@media (max-width: 1200px){
  .table-pro{border-spacing:0 10px;}
  .equipment-hero{grid-template-columns:1fr;}
}

@media (max-width: 991.98px){
  .table-pro,
  .table-pro thead,
  .table-pro tbody,
  .table-pro th,
  .table-pro td,
  .table-pro tr{display:block;}

  .table-pro thead{display:none;}

  .table-pro tbody tr{
    margin-bottom:14px;
  }

  .table-pro tbody td{
    border-left:1px solid #e7eef7 !important;
    border-right:1px solid #e7eef7 !important;
    border-radius:0 !important;
    padding:12px 14px !important;
  }

  .table-pro tbody tr td:first-child{
    border-top-left-radius:18px !important;
    border-top-right-radius:18px !important;
  }

  .table-pro tbody tr td:last-child{
    border-bottom-left-radius:18px !important;
    border-bottom-right-radius:18px !important;
  }

  .table-pro tbody td::before{
    content:attr(data-label);
    display:block;
    font-size:.72rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#7b8aa1;
    font-weight:800;
    margin-bottom:7px;
  }

  .spec-grid{grid-template-columns:1fr;}
}

/* ===== Formularios "nuevo" centrados ===== */
.form-page-wrap{
  width:min(100%, 1040px);
  margin:0 auto;
}
.form-page-wrap--wide{
  width:min(100%, 1220px);
  margin:0 auto;
}
.form-panel{
  width:100%;
  margin:0 auto;
}
.form-panel--narrow{max-width:920px;}
.form-panel--medium{max-width:1040px;}
.form-panel--wide{max-width:1220px;}
.form-panel .card-body-clean{padding-top:16px;}
.page-head--form{margin-bottom:18px;}
.page-head--form .page-head__desc{max-width:780px;}
.page-actions-back{display:inline-flex;align-items:center;gap:8px;}
.form-toolbar{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
.form-note{color:var(--muted);font-size:.88rem;}

/* ===== Inventario catálogo visual ===== */
.inventory-actions{display:flex;justify-content:flex-start;margin-bottom:14px;}
.inventory-toolbar{margin-bottom:14px;}
.inventory-card-grid{display:grid;grid-template-columns:1fr;gap:14px;}
.inventory-table .table-pro thead th{padding-bottom:8px !important;}
.inventory-ref-key{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;}
.inventory-ref-code{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#0f172a;color:#fff;font-size:.76rem;font-weight:800;}
.inventory-control-form{display:grid;grid-template-columns:repeat(2, minmax(110px, 1fr));gap:8px;min-width:300px;}
.inventory-control-form .form-control,
.inventory-control-form .form-select{min-height:40px;font-size:.88rem;}
.inventory-control-form__full{grid-column:1 / -1;}
.inventory-control-form__actions{grid-column:1 / -1;display:flex;justify-content:flex-end;}
.entry-doc{display:flex;flex-direction:column;gap:4px;}
.entry-doc__folio{font-size:1rem;font-weight:800;color:#0f172a;}
.entry-doc__meta{color:#64748b;font-size:.86rem;}
.entry-total{font-weight:800;color:#0f172a;}
.linea-table thead th{white-space:nowrap;}
.linea-row-remove{width:40px;height:40px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;}

@media (max-width: 991.98px){
  .form-page-wrap,
  .form-page-wrap--wide{width:100%;}
  .inventory-control-form{grid-template-columns:1fr;min-width:0;}
}

/* ===== Personal detail polish ===== */
.profile-hero{
  display:grid;
  grid-template-columns:minmax(280px, 360px) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
}

.profile-panel{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  border:1px solid #e5edf7;
  border-radius:24px;
  padding:22px;
  box-shadow:var(--shadow);
}

.profile-panel__header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.profile-avatar-lg{
  width:84px;
  height:84px;
  border-radius:26px;
  background:linear-gradient(135deg,#eff6ff,#dbeafe);
  border:1px solid #bfdbfe;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#1d4ed8;
  font-weight:900;
  font-size:1.85rem;
  box-shadow:0 14px 30px rgba(37,99,235,.12);
  flex:0 0 84px;
}

.profile-panel__title{
  font-size:1.35rem;
  font-weight:800;
  color:#0f172a;
  line-height:1.15;
}

.profile-panel__subtitle{
  color:#64748b;
  font-size:.92rem;
  margin-top:4px;
}

.profile-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0 18px;
}

.profile-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:999px;
  background:#f8fbff;
  border:1px solid #dbeafe;
  color:#1d4ed8;
  font-size:.82rem;
  font-weight:800;
}

.profile-kv{
  display:grid;
  gap:10px;
}

.profile-kv__item{
  padding:12px 14px;
  border-radius:18px;
  background:#f8fbff;
  border:1px solid #e5edf7;
}

.profile-kv__label{
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
  color:#7b8aa1;
  margin-bottom:5px;
}

.profile-kv__value{
  font-size:.96rem;
  font-weight:700;
  color:#0f172a;
}

.profile-kv__value--muted{
  font-weight:600;
  color:#64748b;
}

.profile-notes{
  margin-top:16px;
  padding:14px 16px;
  border-radius:20px;
  background:linear-gradient(180deg,#f8fafc 0%,#f3f7fb 100%);
  border:1px solid #e2e8f0;
}

.profile-notes__label{
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#7b8aa1;
  font-weight:800;
  margin-bottom:6px;
}

.profile-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.metric-card{
  background:#fff;
  border:1px solid #e5edf7;
  border-radius:22px;
  padding:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.metric-card__label{
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
  color:#7b8aa1;
  margin-bottom:8px;
}

.metric-card__value{
  font-size:2rem;
  font-weight:900;
  color:#0f172a;
  line-height:1;
}

.metric-card__hint{
  color:#64748b;
  font-size:.86rem;
  margin-top:8px;
}

.section-card{
  background:#fff;
  border:1px solid #e5edf7;
  border-radius:24px;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}

.section-card__head{
  padding:18px 20px 10px;
}

.section-card__title{
  margin:0;
  font-size:1.08rem;
  font-weight:800;
  color:#0f172a;
}

.section-card__sub{
  color:#64748b;
  font-size:.88rem;
  margin-top:4px;
}

@media (max-width: 1200px){
  .profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width: 991.98px){
  .profile-hero{grid-template-columns:1fr;}
}

@media (max-width: 768px){
  .profile-metrics{grid-template-columns:1fr;}
  .profile-panel{padding:18px;}
  .profile-panel__header{align-items:flex-start;}
}


/* ===== Dashboard KPI 2.0 ===== */
.dashboard-filter-card{
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
}

.dashboard-filter-presets{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.dashboard-summary-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
}

.kpi-card{
  position:relative;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border:1px solid var(--border);
  border-radius:24px;
  padding:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.kpi-card::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:4px;
  background:#cbd5e1;
}

.kpi-card--primary::before{background:#2563eb;}
.kpi-card--success::before{background:#16a34a;}
.kpi-card--warning::before{background:#f59e0b;}
.kpi-card--danger::before{background:#ef4444;}
.kpi-card--secondary::before{background:#6366f1;}

.kpi-card__label{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
  color:#7b8aa1;
  margin-bottom:10px;
}

.kpi-card__value{
  font-size:2rem;
  line-height:1;
  font-weight:900;
  color:#0f172a;
}

.kpi-card__hint{
  color:#64748b;
  font-size:.86rem;
  margin-top:10px;
  min-height:42px;
}

.kpi-card__link{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-top:10px;
  font-size:.84rem;
  font-weight:800;
  color:#1d4ed8;
}

.dashboard-hero-card{
  background:linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.88));
}

.dashboard-hero-card__head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.dashboard-hero-card__eyebrow{
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:#64748b;
  font-weight:800;
  margin-bottom:6px;
}

.dashboard-hero-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-start;
}

.dashboard-health-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.dashboard-health-item{
  background:rgba(255,255,255,.78);
  border:1px solid #e8eef7;
  border-radius:20px;
  padding:16px;
}

.dashboard-health-item__label{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
  color:#7b8aa1;
  margin-bottom:10px;
}

.dashboard-health-item__value{
  font-size:1.8rem;
  font-weight:900;
  line-height:1;
  color:#0f172a;
  margin-bottom:12px;
}

.dashboard-health-item__split{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  color:#334155;
  font-size:.92rem;
  font-weight:600;
}

.dashboard-health-item__note{
  font-size:.85rem;
  color:#64748b;
  margin-top:10px;
}

.dashboard-progress{
  height:10px;
  border-radius:999px;
  background:#e6eefc;
  overflow:hidden;
}

.dashboard-progress .progress-bar{
  background:linear-gradient(90deg,#2563eb,#16a34a);
}

.dashboard-dual-bar{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
}

.dashboard-dual-bar span{
  display:block;
  height:10px;
  border-radius:999px;
}

.dashboard-dual-bar span:first-child{background:#2563eb;}
.dashboard-dual-bar span:last-child{background:#f59e0b;}

.priority-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.priority-item{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:12px;
  padding:14px;
  border-radius:18px;
  border:1px solid #e5edf7;
  background:#fff;
}

.priority-item__icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
}

.priority-item--danger .priority-item__icon{background:#fee2e2;color:#b91c1c;}
.priority-item--warning .priority-item__icon{background:#fef3c7;color:#92400e;}
.priority-item--secondary .priority-item__icon{background:#eef2ff;color:#4338ca;}
.priority-item--success .priority-item__icon{background:#dcfce7;color:#166534;}
.priority-item--primary .priority-item__icon{background:#dbeafe;color:#1d4ed8;}

.priority-item__title{
  font-weight:800;
  color:#0f172a;
}

.priority-item__meta{
  color:#64748b;
  font-size:.88rem;
  margin-top:4px;
}

.dashboard-mini-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.dashboard-mini-card{
  background:#f8fbff;
  border:1px solid #e7eef7;
  border-radius:18px;
  padding:14px;
}

.dashboard-mini-card__label{
  color:#7b8aa1;
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
}

.dashboard-mini-card__value{
  color:#0f172a;
  font-size:1.65rem;
  font-weight:900;
  line-height:1;
  margin-top:10px;
}

.dashboard-distribution{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.distribution-row{
  display:grid;
  grid-template-columns:160px 1fr 56px;
  gap:12px;
  align-items:center;
}

.distribution-row__label{
  font-size:.9rem;
  color:#334155;
  font-weight:700;
}

.distribution-row__track{
  background:#edf2f7;
  border-radius:999px;
  height:10px;
  overflow:hidden;
}

.distribution-row__fill{
  display:block;
  height:100%;
  border-radius:999px;
}

.distribution-row__fill--primary{background:#2563eb;}
.distribution-row__fill--success{background:#16a34a;}
.distribution-row__fill--warning{background:#f59e0b;}
.distribution-row__fill--danger{background:#ef4444;}
.distribution-row__fill--secondary{background:#6366f1;}

.distribution-row__value{
  text-align:right;
  font-weight:800;
  color:#0f172a;
}

.dashboard-note-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dashboard-note-strip > div{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:999px;
  padding:8px 12px;
  font-size:.86rem;
  color:#334155;
}

.stack-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.stack-item{
  background:#fff;
  border:1px solid #e7eef7;
  border-radius:18px;
  padding:14px;
}

.stack-item__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.stack-item__title{
  font-weight:800;
  color:#0f172a;
}

.stack-item__sub{
  color:#64748b;
  font-size:.88rem;
  margin-top:4px;
}

.stack-item__meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
  color:#475569;
  font-size:.84rem;
}

.stack-item__meta span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.dashboard-timing-card{
  height:100%;
  background:linear-gradient(180deg,#f8fbff 0%, #eef5ff 100%);
  border:1px solid #dbe8fb;
  border-radius:20px;
  padding:16px;
}

.dashboard-timing-card__label{
  color:#7b8aa1;
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
}

.dashboard-timing-card__value{
  font-size:1.7rem;
  font-weight:900;
  color:#0f172a;
  margin-top:10px;
}

.dashboard-timing-card__sub{
  color:#64748b;
  font-size:.9rem;
  margin-top:8px;
}

.dashboard-table-wrap{
  border:1px solid #e7eef7;
  border-radius:18px;
}

@media (max-width: 1500px){
  .dashboard-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}

@media (max-width: 1200px){
  .dashboard-health-grid{grid-template-columns:1fr;}
  .dashboard-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width: 991.98px){
  .dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .distribution-row{grid-template-columns:1fr;}
  .distribution-row__value{text-align:left;}
}

@media (max-width: 767.98px){
  .dashboard-summary-grid{grid-template-columns:1fr;}
  .dashboard-mini-grid{grid-template-columns:1fr;}
  .stack-item__top{flex-direction:column;}
}

/* ===== Dashboard KPI 2.0 · Fase 5 ===== */
.dashboard-filter-card {
  position: sticky;
  top: 18px;
  z-index: 12;
}

.dashboard-module-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-module-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.dashboard-module-pill__label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.dashboard-module-pill__value {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.dashboard-module-pill__meta {
  margin-top: 8px;
  font-size: .86rem;
  color: var(--muted);
}

.dashboard-module-pill--warning {
  background: linear-gradient(180deg, #fffdf4 0%, #fff 100%);
}
.dashboard-module-pill--primary {
  background: linear-gradient(180deg, #f4f8ff 0%, #fff 100%);
}
.dashboard-module-pill--success {
  background: linear-gradient(180deg, #f5fff8 0%, #fff 100%);
}
.dashboard-module-pill--dark {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  transition: .18s ease;
}

.dashboard-quick-link:hover {
  border-color: rgba(29, 78, 216, .26);
  background: #eef5ff;
  color: var(--primary);
}

.dashboard-quick-link i {
  font-size: 1rem;
}

.priority-item {
  align-items: flex-start;
}

.priority-item__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.priority-item__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--primary);
}

.stack-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stack-item__actions .btn {
  border-radius: 12px;
}

.section-card {
  border-radius: 20px;
}

.card-body-clean {
  padding: 18px 20px 20px;
}

.dashboard-summary-grid {
  gap: 14px;
}

.kpi-card {
  min-height: 172px;
}

.stack-list {
  max-height: 470px;
  overflow: auto;
  padding-right: 4px;
}

.dashboard-table-wrap {
  max-height: 420px;
  overflow: auto;
}

@media (max-width: 1399.98px) {
  .dashboard-module-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .dashboard-filter-card {
    position: static;
  }

  .main {
    padding: 20px 20px 26px;
  }
}

@media (max-width: 767.98px) {
  .dashboard-module-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-quick-link {
    justify-content: center;
  }

  .page-head {
    gap: 12px;
  }

  .page-head__side {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .page-head__side .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .dashboard-quick-links,
  .page-head__side {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: auto;
  }
}


/* ===== Fase 6.3 alertas ===== */
.alert-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.alert-actions--stack{flex-direction:column;align-items:stretch;}
.alert-actions--stack .btn{justify-content:flex-start;}
.alert-context-list{display:flex;gap:8px;flex-wrap:wrap;}
.alert-shortcuts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.alert-shortcut{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid #dbe4f0;border-radius:16px;background:#f8fbff;color:#10233f;text-decoration:none;transition:.18s ease;}
.alert-shortcut:hover{transform:translateY(-1px);border-color:#93c5fd;color:#0f172a;box-shadow:0 10px 24px rgba(15,23,42,.08);}
.alert-shortcut strong{font-size:.95rem;}
.alert-shortcut span{font-size:.82rem;color:#5b6b84;}
.alert-module-card{border-radius:18px;padding:18px;background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff;box-shadow:0 18px 34px rgba(37,99,235,.18);display:flex;flex-direction:column;gap:12px;}
.alert-module-card__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.alert-module-card__label{font-size:.92rem;font-weight:700;letter-spacing:.01em;}
.alert-module-card__value{font-size:2rem;line-height:1;font-weight:800;}
.alert-module-card__meta{font-size:.82rem;color:rgba(255,255,255,.86);min-height:34px;}
.alert-module-card__actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;}
.alert-module-card .btn-light{background:#fff;border-color:#fff;color:#0f172a;}
.alert-module-card .btn-outline-light{border-color:rgba(255,255,255,.68);color:#fff;}
.alert-module-card .btn-outline-light:hover{background:rgba(255,255,255,.12);color:#fff;}
.alert-module-card--warning{background:linear-gradient(135deg,#b45309,#d97706);box-shadow:0 18px 34px rgba(217,119,6,.18);}
.alert-module-card--danger{background:linear-gradient(135deg,#b91c1c,#dc2626);box-shadow:0 18px 34px rgba(220,38,38,.18);}
.alert-module-card--secondary{background:linear-gradient(135deg,#334155,#475569);box-shadow:0 18px 34px rgba(71,85,105,.18);}
.alert-table td{vertical-align:top;}
.sidebar-link__badge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#dbeafe;color:#1d4ed8;display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:800;}
.sidebar-link__badge--danger{background:#fee2e2;color:#b91c1c;}
@media (max-width: 992px){
  .alert-shortcuts-grid{grid-template-columns:1fr;}
}
@media (max-width: 576px){
  .alert-actions{flex-direction:column;align-items:stretch;}
}

.sidebar-link__badge-stack {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.sidebar-link__badge--secondary {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.sidebar-link__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.18);
}

.sidebar-alert-brief {
  margin: .45rem .5rem .85rem;
  padding: .7rem .8rem;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.sidebar-alert-brief--warning {
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.22);
}

.sidebar-alert-brief--success {
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.18);
}

.sidebar-alert-brief__head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-alert-brief__meta {
  margin-top: .35rem;
  font-size: .76rem;
  color: rgba(255,255,255,.78);
}

.sidebar-alert-brief__link {
  display: inline-flex;
  margin-top: .45rem;
  font-size: .78rem;
  color: #fff;
  text-decoration: none;
}

.alert-center-strip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

.alert-center-strip__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.alert-center-strip__body {
  flex: 1 1 auto;
  min-width: 0;
}

.alert-center-strip__title {
  font-weight: 800;
  font-size: .98rem;
  margin-bottom: .2rem;
}

.alert-center-strip__text {
  color: #475569;
  font-size: .92rem;
}

.alert-center-strip__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .6rem;
}

.alert-center-strip__actions {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.alert-center-strip--danger {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
  border-color: #fecdd3;
}
.alert-center-strip--danger .alert-center-strip__icon { background: #fee2e2; color: #b91c1c; }

.alert-center-strip--warning {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: #fed7aa;
}
.alert-center-strip--warning .alert-center-strip__icon { background: #ffedd5; color: #c2410c; }

.alert-center-strip--success {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-color: #bbf7d0;
}
.alert-center-strip--success .alert-center-strip__icon { background: #dcfce7; color: #15803d; }

.alert-center-strip--primary {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border-color: #bfdbfe;
}
.alert-center-strip--primary .alert-center-strip__icon { background: #dbeafe; color: #1d4ed8; }

.sync-chip {
  display: inline-flex;
  align-items: center;
  padding: .38rem .72rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.sync-chip--success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.sync-chip--warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.sync-chip--danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.sync-chip--primary { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.sync-chip--secondary { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }
.sync-chip--light { background: rgba(255,255,255,.82); color: #334155; border-color: #e2e8f0; }

.alert-counter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.alert-counter-tile {
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15,23,42,.05);
}

.alert-counter-tile__label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  margin-bottom: .35rem;
}

.alert-counter-tile__value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.alert-counter-tile__meta {
  margin-top: .35rem;
  color: #64748b;
  font-size: .8rem;
}

.alert-counter-tile--danger { border-color: #fecaca; background: linear-gradient(180deg, #fff1f2 0%, #fff 100%); }
.alert-counter-tile--warning { border-color: #fde68a; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
.alert-counter-tile--success { border-color: #bbf7d0; background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); }
.alert-counter-tile--primary { border-color: #bfdbfe; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); }
.alert-counter-tile--secondary { border-color: #cbd5e1; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); }

@media (max-width: 1199.98px) {
  .alert-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .alert-center-strip {
    flex-direction: column;
  }

  .alert-center-strip__actions {
    width: 100%;
  }

  .alert-counter-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Fase 6.6 navegación contextual ===== */
.alert-feed{display:flex;flex-direction:column;gap:14px;}
.alert-feed-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:16px 16px 14px;box-shadow:0 12px 24px rgba(15,23,42,.05);display:flex;flex-direction:column;gap:12px;}
.alert-feed-card--danger{border-color:#fecaca;background:linear-gradient(180deg,#fff7f7 0%,#fff 100%);}
.alert-feed-card--warning{border-color:#fde68a;background:linear-gradient(180deg,#fffaf3 0%,#fff 100%);}
.alert-feed-card--primary{border-color:#bfdbfe;background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);}
.alert-feed-card--secondary{border-color:#dbe4f0;background:linear-gradient(180deg,#fafcff 0%,#fff 100%);}
.alert-feed-card__head{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:flex-start;}
.alert-feed-card__title-wrap{min-width:0;flex:1 1 360px;}
.alert-feed-card__title-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.alert-feed-card__title{margin:0;font-size:1rem;font-weight:800;color:#0f172a;}
.alert-feed-card__text{margin-top:4px;color:#475569;font-size:.92rem;line-height:1.55;}
.alert-feed-card__badges{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;}
.alert-feed-card__date{font-size:.8rem;color:#64748b;font-weight:700;}
.alert-context-chips{display:flex;flex-wrap:wrap;gap:8px;}
.alert-feed-card__footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;border-top:1px solid #edf2f7;padding-top:12px;}
.alert-nav-actions,.alert-state-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.alert-nav-actions__hint,.alert-state-actions--muted{font-size:.84rem;color:#64748b;font-weight:600;}
.alert-feed-card__meta-row{display:flex;gap:16px;flex-wrap:wrap;}
.alert-feed-card__note{font-size:.82rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;}
.dashboard-alert-summary{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:.35rem;}
.dashboard-alert-list{display:flex;flex-direction:column;gap:12px;}
.dashboard-alert-item{border:1px solid #e2e8f0;border-radius:16px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 20px rgba(15,23,42,.04);}
.dashboard-alert-item--danger{border-color:#fecaca;background:linear-gradient(180deg,#fff7f7 0%,#fff 100%);}
.dashboard-alert-item--warning{border-color:#fde68a;background:linear-gradient(180deg,#fffaf3 0%,#fff 100%);}
.dashboard-alert-item--primary{border-color:#bfdbfe;background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);}
.dashboard-alert-item--secondary{border-color:#dbe4f0;background:linear-gradient(180deg,#fafcff 0%,#fff 100%);}
.dashboard-alert-item__head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.dashboard-alert-item__title{font-size:.95rem;font-weight:800;color:#0f172a;}
.dashboard-alert-item__meta{margin-top:4px;font-size:.86rem;color:#64748b;line-height:1.45;}
.dashboard-alert-item__badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.dashboard-alert-item__chips{display:flex;gap:8px;flex-wrap:wrap;}
.dashboard-alert-item__footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;}
@media (max-width: 767.98px){
  .alert-feed-card__footer,.dashboard-alert-item__head,.dashboard-alert-item__footer{flex-direction:column;align-items:stretch;}
  .alert-feed-card__badges{justify-content:flex-start;}
}

/* === Fase 6.7.3 · productividad centro de alertas === */
.alert-operational-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.alert-view-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.alert-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  margin: 0;
}

.section-card__head--spaced {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.alert-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-bulk-bar {
  margin: 0 20px 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.78), rgba(255,255,255,0.96));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.alert-bulk-bar__summary {
  font-size: .95rem;
  color: var(--text);
}

.alert-bulk-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-feed--productive {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert-group-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 14px;
}

.alert-group-shell__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.alert-group-shell__toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alert-group-shell__children {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-feed-card__select {
  display: flex;
  align-items: center;
}

.alert-select-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

.alert-select-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.alert-select-checkbox span {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.38);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  display: inline-block;
  position: relative;
}

.alert-select-checkbox input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
}

.alert-select-checkbox input:checked + span::after,
.alert-select-checkbox input:indeterminate + span::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: #fff;
}

.alert-select-checkbox--group span {
  width: 20px;
  height: 20px;
}

.alert-feed-card--compact {
  padding: 14px 16px;
  border-radius: 16px;
}

.alert-feed-card--child {
  margin-left: 18px;
  border-left: 4px solid rgba(37, 99, 235, 0.16);
}

.alert-feed-card--compact .alert-feed-card__meta-row,
.alert-feed-card--compact .alert-feed-card__note {
  display: none;
}

.alert-feed-card--compact .alert-feed-card__text {
  font-size: .93rem;
}

.alert-feed-card__title-row {
  gap: 8px;
}

.alert-context-chips {
  margin-top: 10px;
}

@media (max-width: 991.98px) {
  .alert-group-shell,
  .alert-feed-card--child {
    margin-left: 0;
  }
}

@media (max-width: 767.98px) {
  .alert-bulk-bar {
    margin: 0 16px 14px;
    padding: 12px;
  }

  .alert-group-shell {
    padding: 12px;
  }

  .alert-feed-card--compact .alert-feed-card__footer,
  .alert-feed-card .alert-feed-card__footer {
    gap: 10px;
  }

  .alert-list-actions,
  .alert-bulk-bar__actions,
  .alert-view-toggles {
    width: 100%;
  }

  .alert-list-actions > .btn,
  .alert-bulk-bar__actions > .btn {
    flex: 1 1 auto;
  }
}

/* ===== Ajuste fino visual · módulos de alertas + drawer dashboard ===== */
.alert-modules-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.alert-module-card{
  position:relative;
  overflow:hidden;
  min-height:166px;
  padding:16px 16px 14px;
  border-radius:18px;
  border:1px solid #e2e8f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  color:#0f172a;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:12px;
  transition:.18s ease;
}

.alert-module-card::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:4px;
  background:#2563eb;
}

.alert-module-card:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 32px rgba(15,23,42,.10);
}

.alert-module-card__label{
  font-size:.88rem;
  font-weight:800;
  letter-spacing:.02em;
  color:#0f172a;
}

.alert-module-card__value{
  font-size:1.95rem;
  line-height:1;
  font-weight:800;
  color:#0f172a;
  margin-top:6px;
}

.alert-module-card__meta{
  min-height:auto;
  margin-top:6px;
  color:#64748b;
  font-size:.83rem;
}

.alert-module-card__actions{
  margin-top:auto;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.alert-module-card .btn-light,
.alert-module-card .btn-outline-light{
  border-radius:999px;
  font-weight:700;
}

.alert-module-card .btn-light{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1d4ed8;
}

.alert-module-card .btn-light:hover{
  background:#dbeafe;
  border-color:#93c5fd;
  color:#1e40af;
}

.alert-module-card .btn-outline-light{
  background:#fff;
  border-color:#cbd5e1;
  color:#334155;
}

.alert-module-card .btn-outline-light:hover{
  background:#f8fafc;
  border-color:#94a3b8;
  color:#0f172a;
}

.alert-module-card--primary{
  border-color:#bfdbfe;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
}
.alert-module-card--primary::before{background:#2563eb;}

.alert-module-card--warning{
  border-color:#fde68a;
  background:linear-gradient(180deg,#fffaf3 0%,#ffffff 100%);
  box-shadow:0 10px 24px rgba(217,119,6,.08);
}
.alert-module-card--warning::before{background:#d97706;}

.alert-module-card--danger{
  border-color:#fecaca;
  background:linear-gradient(180deg,#fff7f7 0%,#ffffff 100%);
  box-shadow:0 10px 24px rgba(220,38,38,.08);
}
.alert-module-card--danger::before{background:#dc2626;}

.alert-module-card--secondary{
  border-color:#cbd5e1;
  background:linear-gradient(180deg,#fafcff 0%,#ffffff 100%);
  box-shadow:0 10px 24px rgba(71,85,105,.08);
}
.alert-module-card--secondary::before{background:#475569;}

.dashboard-alert-drawer{
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
}

.dashboard-alert-drawer .section-card__head{
  border-bottom:1px solid #e8eef7;
}

.dashboard-alert-drawer .dashboard-alert-summary{
  justify-content:flex-end;
}

.dashboard-alert-drawer .card-body-clean{
  overflow:hidden;
}

.dashboard-alert-list--drawer{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(280px, 320px);
  gap:12px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  padding:2px 2px 8px;
  scroll-snap-type:x proximity;
}

.dashboard-alert-list--drawer .dashboard-alert-item{
  height:100%;
  min-height:194px;
  scroll-snap-align:start;
}

.dashboard-alert-list--drawer::-webkit-scrollbar{height:10px;}
.dashboard-alert-list--drawer::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
.dashboard-alert-list--drawer::-webkit-scrollbar-track{background:#eef2f7;border-radius:999px;}

.dashboard-alert-item{
  border-radius:18px;
  padding:14px 14px 12px;
  box-shadow:0 10px 20px rgba(15,23,42,.04);
}

.dashboard-alert-item__head{
  align-items:flex-start;
}

.dashboard-alert-item__title{
  font-size:.96rem;
  line-height:1.25;
}

.dashboard-alert-item__meta{
  min-height:42px;
}

.dashboard-alert-item__chips{
  gap:7px;
}

.dashboard-alert-item__chips .sync-chip{
  padding:.33rem .62rem;
  font-size:.75rem;
}

.dashboard-alert-item__footer{
  margin-top:auto;
}

@media (max-width: 1199.98px){
  .alert-modules-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .dashboard-alert-list--drawer{
    grid-auto-columns:minmax(260px, 78vw);
  }
}

@media (max-width: 767.98px){
  .alert-modules-grid{
    grid-template-columns:1fr;
  }

  .dashboard-alert-drawer .section-card__head{
    align-items:stretch !important;
  }

  .dashboard-alert-drawer .dashboard-alert-summary{
    justify-content:flex-start;
  }

  .dashboard-alert-list--drawer{
    grid-auto-columns:minmax(240px, 86vw);
  }
}


/* ===== Fase 6.8.3 · prioridad refinada ===== */
.priority-band{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  font-size:.76rem;
  font-weight:800;
  line-height:1;
  letter-spacing:.01em;
  border:1px solid transparent;
  white-space:nowrap;
}
.priority-band i{font-size:.82rem;}
.priority-band--compact{
  padding:5px 9px;
  font-size:.72rem;
}
.priority-band--danger{
  background:#fee2e2;
  color:#b91c1c;
  border-color:#fecaca;
}
.priority-band--warning{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}
.priority-band--primary{
  background:#dbeafe;
  color:#1d4ed8;
  border-color:#bfdbfe;
}
.priority-band--secondary{
  background:#eef2f7;
  color:#475569;
  border-color:#dbe3ee;
}

.alert-feed-card__title-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.alert-feed-card__title-row .priority-band{
  margin-left:2px;
}
.alert-group-shell__toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.alert-group-shell__toolbar-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.dashboard-alert-item__badges{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.dashboard-alert-item__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.alert-feed-card--child .priority-band{
  opacity:.92;
}
@media (max-width: 991.98px){
  .dashboard-alert-item__head{
    flex-direction:column;
  }
  .dashboard-alert-item__badges{
    justify-content:flex-start;
  }
}
@media (max-width: 767.98px){
  .priority-band{
    padding:5px 8px;
    font-size:.71rem;
  }
  .alert-group-shell__toolbar{
    align-items:flex-start;
  }
}


/* ===== Login / Acceso ===== */
body.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eff4fb 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, .95fr);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.auth-hero {
  position: relative;
  padding: 34px 34px 32px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.36), transparent 30%),
    linear-gradient(140deg, rgba(255,255,255,0.05), transparent 48%);
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-hero__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-hero__icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 34px rgba(37,99,235,.24);
}

.auth-hero__title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.auth-hero__subtitle {
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.92rem;
}

.auth-hero__content {
  max-width: 540px;
}

.auth-hero__headline {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.08;
  font-weight: 800;
}

.auth-hero__text {
  margin: 0 auto;
  max-width: 420px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
  text-wrap: balance;
}

.auth-hero__features {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.auth-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-feature i {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  font-size: 1rem;
  flex: 0 0 40px;
}

.auth-feature strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-feature span {
  display: block;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-card-wrap {
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.58) 0%, rgba(248,250,252,0.96) 100%);
}

.auth-card {
  width: min(460px, 100%);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.08) !important;
}

.auth-card__header {
  margin-bottom: 22px;
}

.auth-card__eyebrow {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.auth-card__title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.auth-card__subtitle {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.6;
}

.auth-form__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.auth-input {
  position: relative;
}

.auth-input i {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.96rem;
  pointer-events: none;
}

.auth-input .form-control {
  height: 50px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  padding-left: 42px;
  box-shadow: none;
}

.auth-input .form-control:focus {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 0.24rem rgba(37, 99, 235, 0.12);
}

.auth-submit {
  height: 50px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-top: 4px;
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.16);
}

.auth-card__footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

.auth-card__footer a {
  font-weight: 700;
}

.auth-card__footer > :only-child {
  margin-inline: auto;
}

.auth-card .alert {
  border-radius: 16px;
  border-width: 1px;
  margin-bottom: 18px;
}

@media (max-width: 991.98px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-card-wrap,
  .auth-hero {
    padding: 26px;
  }
}

@media (max-width: 575.98px) {
  .auth-shell {
    padding: 18px 12px;
  }

  .auth-layout {
    border-radius: 24px;
  }

  .auth-card,
  .auth-card-wrap,
  .auth-hero {
    padding: 22px;
  }

  .auth-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-hero__headline {
    font-size: 1.7rem;
  }
}
