/**
 * ASTRYX COMPONENTS - BACKOFFICE INSTITUCIONAL AEALCEE
 */

/* App Header */
.astryx-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--astryx-border);
  position: relative;
  z-index: 40;
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 32px rgba(19, 19, 74, 0.06);
}

.astryx-header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.astryx-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 320px;
}

.astryx-brand-mark {
  width: 58px;
  height: 68px;
  flex: 0 0 58px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--astryx-font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.05em;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}
.astryx-brand-mark img {
  width: 140px;
  height: 198px;
  max-width: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.astryx-brand-title {
  font-family: var(--astryx-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--astryx-aealcee-navy);
  overflow-wrap: normal;
}

.astryx-brand-subtitle {
  font-size: 0.75rem;
  color: var(--astryx-text-muted);
  font-weight: 500;
}

/* Congress Switcher Pill */
.astryx-congress-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(244, 247, 250, 0.9);
  border: 1px solid var(--astryx-border);
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--astryx-text-primary);
  max-width: 100%;
  flex-wrap: nowrap;
}

.astryx-congress-switcher {
  flex: 1 1 360px;
  justify-content: center;
}

.astryx-congress-switcher .astryx-select {
  width: min(260px, 32vw);
}

.astryx-header-actions,
.astryx-header-public-links,
.astryx-admin-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.astryx-header-actions { flex: 0 0 auto; }
.astryx-header-public-links .astryx-btn { text-decoration: none; }

.astryx-admin-profile {
  padding: 6px 6px 6px 14px;
  border-left: 1px solid var(--astryx-border);
  border-radius: 12px;
}

.astryx-admin-profile-copy { text-align: right; }

/* Navigation Tabs */
.astryx-nav-tabs {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--astryx-border);
  padding: 9px 0;
  position: sticky;
  top: 0;
  z-index: 35;
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 8px 24px rgba(19, 19, 74, 0.055);
}

.astryx-admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.astryx-tab-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--astryx-text-secondary);
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: var(--astryx-transition);
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

.astryx-tab-item:hover {
  color: var(--astryx-aealcee-navy);
  background: rgba(19, 19, 74, 0.045);
}

.astryx-tab-item.active {
  color: var(--astryx-aealcee-navy);
  border-color: rgba(72, 209, 160, 0.65);
  background: linear-gradient(135deg, rgba(72, 209, 160, 0.18), rgba(72, 209, 160, 0.08));
  box-shadow: 0 4px 14px rgba(19, 19, 74, 0.07);
  font-weight: 700;
}

.astryx-modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--astryx-border);
  border-radius: 10px;
  background: var(--astryx-bg-subtle);
  color: var(--astryx-text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--astryx-transition);
}

.astryx-modal-close:hover {
  color: var(--astryx-rose);
  border-color: rgba(225, 29, 72, 0.25);
  background: var(--astryx-rose-subtle);
}

/* Main Container & Section Layouts */
.astryx-content-area {
  padding-top: 34px;
  padding-bottom: 50px;
}

/* White Clean Cards */
.astryx-card {
  background: var(--astryx-bg-surface);
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-lg);
  padding: 24px;
  box-shadow: var(--astryx-shadow-sm);
  transition: var(--astryx-transition);
}

.astryx-card:hover {
  box-shadow: var(--astryx-shadow-md);
  border-color: rgba(72, 209, 160, 0.48);
}

.astryx-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.astryx-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--astryx-text-primary);
}

.astryx-card-desc {
  font-size: 0.85rem;
  color: var(--astryx-text-secondary);
  margin-top: 2px;
}

/* Metric Cards */
.astryx-metric-card {
  background: var(--astryx-bg-surface);
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-md);
  padding: 18px 20px;
  box-shadow: var(--astryx-shadow-xs);
  position: relative;
  overflow: hidden;
}
.astryx-metric-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--astryx-aealcee-gold), var(--astryx-aealcee-navy));
}

.astryx-metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--astryx-text-muted);
  margin-bottom: 8px;
}

.astryx-metric-number {
  font-family: var(--astryx-font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--astryx-aealcee-navy);
  line-height: 1;
}

.astryx-metric-sub {
  font-size: 0.8rem;
  color: var(--astryx-text-secondary);
  margin-top: 6px;
}

/* Shared KPI layout used by Treasury and Diplomas. */
.astryx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.astryx-stat-card {
  min-width: 0;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-lg);
  box-shadow: var(--astryx-shadow-xs);
}

.astryx-stat-label {
  margin-bottom: 8px;
  color: var(--astryx-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.astryx-stat-value {
  color: var(--astryx-aealcee-navy);
  font-family: var(--astryx-font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.astryx-stat-sub {
  margin-top: 7px;
  color: var(--astryx-text-secondary);
  font-size: 0.8rem;
}

/* Badges */
.astryx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--astryx-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  text-align: center;
}

.badge-navy {
  background: var(--astryx-aealcee-navy-muted);
  color: var(--astryx-aealcee-navy);
}

.badge-gold {
  background: var(--astryx-aealcee-gold-light);
  color: var(--astryx-aealcee-gold-dark);
  border: 1px solid var(--astryx-aealcee-gold-border);
}

.badge-emerald {
  background: var(--astryx-emerald-subtle);
  color: var(--astryx-emerald);
}

.badge-amber {
  background: var(--astryx-amber-subtle);
  color: var(--astryx-amber);
}

.badge-muted {
  background: var(--astryx-bg-subtle);
  color: var(--astryx-text-secondary);
}

.badge-subtle {
  background: var(--astryx-bg-subtle);
  color: var(--astryx-text-secondary);
  border: 1px solid var(--astryx-border);
}

.badge-sky { background: var(--astryx-sky-subtle); color: var(--astryx-sky); }
.badge-rose { background: var(--astryx-rose-subtle); color: var(--astryx-rose); }

/* Buttons */
.astryx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--astryx-font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--astryx-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--astryx-transition);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  min-height: 38px;
  max-width: 100%;
}

.astryx-btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: var(--astryx-radius-sm);
}

.astryx-btn-navy {
  background: linear-gradient(135deg, var(--astryx-aealcee-navy-light), var(--astryx-aealcee-navy));
  color: #ffffff;
}
.astryx-btn-navy:hover {
  background: var(--astryx-aealcee-navy-light);
  color: #ffffff;
  transform: translateY(-1px);
}

.astryx-btn-gold {
  background: var(--astryx-aealcee-gold);
  color: #ffffff;
  border-color: var(--astryx-aealcee-gold-dark);
}
.astryx-btn-gold:hover {
  background: var(--astryx-aealcee-gold-dark);
  color: #ffffff;
}

.astryx-btn-subtle {
  background: var(--astryx-bg-subtle);
  color: var(--astryx-text-primary);
}
.astryx-btn-subtle:hover {
  background: var(--astryx-bg-hover);
}

.astryx-btn-outline {
  background: transparent;
  border-color: var(--astryx-border);
  color: var(--astryx-text-secondary);
}
.astryx-btn-outline:hover {
  background: var(--astryx-bg-subtle);
  color: var(--astryx-text-primary);
  border-color: var(--astryx-border-strong);
}

.astryx-btn-danger-subtle {
  background: var(--astryx-rose-subtle);
  color: var(--astryx-rose);
  border-color: transparent;
}
.astryx-btn-danger-subtle:hover {
  background: #ffe4e6;
}

/* Form Builder Question Item Cards */
.builder-category-block {
  background: var(--astryx-bg-surface);
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}

.builder-category-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--astryx-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--astryx-aealcee-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-question-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--astryx-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--astryx-transition);
}
.builder-question-row > :first-child { flex: 1 1 260px; }
.builder-question-row > :last-child { flex: 0 1 auto; }

.builder-question-row:last-child {
  border-bottom: none;
}

.builder-question-row:hover {
  background: var(--astryx-bg-canvas);
}

.builder-question-label {
  font-weight: 600;
  color: var(--astryx-text-primary);
  font-size: 0.925rem;
}

.builder-question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

/* Modal / Drawer */
.astryx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.astryx-modal-backdrop.open {
  display: flex;
}

.astryx-modal-box {
  background: #ffffff;
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-xl);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--astryx-shadow-lg);
  overflow: hidden;
  max-height: calc(100dvh - 32px);
}

/* Tesorería: facturación agrupada por facultad */
.treasury-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.treasury-intro h2 {
  margin: 2px 0 4px;
  color: var(--astryx-aealcee-navy);
}

.treasury-intro p:not(.treasury-eyebrow) {
  margin: 0;
  color: var(--astryx-text-secondary);
}

.treasury-eyebrow {
  margin: 0;
  color: var(--astryx-gold-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.treasury-bank-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 15px 18px;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 43, 73, 0.14);
  border-left: 4px solid var(--astryx-aealcee-navy);
  border-radius: var(--astryx-radius-lg);
  background: linear-gradient(100deg, #f7fafc, #ffffff);
}

.treasury-data-label {
  display: block;
  margin-bottom: 3px;
  color: var(--astryx-text-muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.treasury-data-value {
  color: var(--astryx-text-primary);
  font-size: 0.88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.treasury-faculty-list {
  display: grid;
  gap: 16px;
}

.treasury-faculty-card {
  overflow: hidden;
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-lg);
  background: #ffffff;
  box-shadow: var(--astryx-shadow-sm);
}

.treasury-faculty-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--astryx-border);
  background: #fafcff;
}

.treasury-faculty-name {
  color: var(--astryx-aealcee-navy);
  font-size: 1rem;
  font-weight: 760;
}

.treasury-faculty-meta {
  margin-top: 4px;
  color: var(--astryx-text-secondary);
  font-size: 0.82rem;
}

.treasury-faculty-total {
  color: var(--astryx-aealcee-navy);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.treasury-invoice-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.treasury-invoice-card {
  padding: 16px;
  border: 1px solid #dce5ee;
  border-radius: var(--astryx-radius-md);
  background: #ffffff;
}

.treasury-invoice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.treasury-invoice-title {
  color: var(--astryx-text-primary);
  font-size: 0.92rem;
  font-weight: 750;
}

.treasury-invoice-amount {
  color: var(--astryx-aealcee-navy);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.treasury-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.treasury-detail-grid .treasury-wide {
  grid-column: span 2;
}

.treasury-representatives {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.treasury-representative {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--astryx-bg-canvas);
}

.treasury-representative strong,
.treasury-representative span {
  display: block;
}

.treasury-representative span {
  margin-top: 2px;
  color: var(--astryx-text-secondary);
  font-size: 0.78rem;
}

.treasury-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--astryx-border);
  background: #fcfdff;
}

@media (max-width: 760px) {
  .treasury-intro,
  .treasury-faculty-header,
  .treasury-card-footer,
  .treasury-invoice-heading,
  .treasury-representative {
    align-items: flex-start;
    flex-direction: column;
  }

  .treasury-bank-summary,
  .treasury-detail-grid {
    grid-template-columns: 1fr;
  }

  .treasury-detail-grid .treasury-wide {
    grid-column: auto;
  }

  .treasury-faculty-total {
    text-align: left;
  }
}

.astryx-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--astryx-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.astryx-modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.astryx-modal-footer {
  padding: 16px 24px;
  background: var(--astryx-bg-canvas);
  border-top: 1px solid var(--astryx-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Inputs & Forms */
.astryx-form-group {
  margin-bottom: 16px;
}

.astryx-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--astryx-text-primary);
  margin-bottom: 6px;
}

.astryx-input, .astryx-select, .astryx-textarea {
  width: 100%;
  padding: 9px 13px;
  font-family: var(--astryx-font-sans);
  font-size: 0.9rem;
  color: var(--astryx-text-primary);
  background: #ffffff;
  border: 1px solid var(--astryx-border-strong);
  border-radius: var(--astryx-radius-md);
  outline: none;
  transition: var(--astryx-transition);
}

.astryx-textarea { resize: vertical; min-height: 96px; }
.astryx-select { text-overflow: ellipsis; }

.astryx-input:focus, .astryx-select:focus, .astryx-textarea:focus {
  border-color: var(--astryx-border-focus);
  box-shadow: 0 0 0 3px rgba(19, 19, 74, 0.1);
}

/* =========================================================================
   MÓDULO DE SECRETARÍA: BANDEJA, TABLA Y SPLIT-SCREEN PAdES
   ========================================================================= */

/* Filter Bar */
.astryx-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--astryx-bg-canvas);
  padding: 4px;
  border-radius: var(--astryx-radius-md);
  border: 1px solid var(--astryx-border);
}

.astryx-filter-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--astryx-text-secondary);
  border-radius: var(--astryx-radius-sm);
  cursor: pointer;
  transition: var(--astryx-transition);
}

.astryx-filter-btn:hover {
  color: var(--astryx-text-primary);
}

.astryx-filter-btn.active {
  background: #ffffff;
  color: var(--astryx-aealcee-navy);
  box-shadow: var(--astryx-shadow-sm);
}

/* Institutional Table */
.astryx-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-lg);
  background: #ffffff;
  box-shadow: var(--astryx-shadow-sm);
}

.astryx-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.astryx-table th {
  padding: 12px 18px;
  background: #f8fafc;
  font-weight: 600;
  color: var(--astryx-text-secondary);
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--astryx-border);
}
.astryx-table th, .astryx-table td { max-width: 320px; }

.astryx-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--astryx-border-subtle);
  color: var(--astryx-text-primary);
  vertical-align: middle;
}

.astryx-table tbody tr {
  transition: var(--astryx-transition);
  cursor: pointer;
}

.astryx-table tbody tr:hover {
  background: rgba(19, 19, 74, 0.02);
}

.astryx-table tbody tr:last-child td {
  border-bottom: none;
}

.astryx-admin-users-table { min-width: 760px; }

/* Split-Screen Modal Container (Section 1.2 Specs) */
.astryx-modal-splitscreen {
  max-width: 1100px;
  width: 95vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
}

.astryx-split-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  flex: 1;
  overflow: hidden;
  background: var(--astryx-bg-canvas);
}

/* Left Panel: Credencial PDF Preview */
.astryx-pdf-preview-col {
  padding: 20px;
  overflow-y: auto;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.astryx-paper-document {
  background: #ffffff;
  width: 100%;
  max-width: 540px;
  min-height: 680px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 36px 32px;
  font-family: 'Times New Roman', Times, serif;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.08);
  position: relative;
}

.astryx-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #13134A;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.astryx-doc-crest {
  font-family: var(--astryx-font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  color: #13134A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.astryx-doc-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #13134A;
  margin-bottom: 12px;
}

.astryx-doc-text {
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: justify;
  margin-bottom: 16px;
}

.astryx-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--astryx-font-sans);
  font-size: 0.775rem;
  margin: 16px 0;
}

.astryx-doc-table th, .astryx-doc-table td {
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
}

.astryx-doc-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #13134A;
}

.astryx-doc-stamp-box {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 24px;
  border-top: 1px dashed #cbd5e1;
}

.astryx-pades-stamp {
  border: 2px dashed #059669;
  background: rgba(5, 150, 105, 0.04);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--astryx-font-mono);
  font-size: 0.68rem;
  color: #065f46;
  line-height: 1.35;
}

/* Right Panel: Cryptographic Inspector */
.astryx-crypto-col {
  padding: 24px;
  overflow-y: auto;
  background: #ffffff;
  border-left: 1px solid var(--astryx-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.astryx-crypto-card {
  background: #f8fafc;
  border: 1px solid var(--astryx-border);
  border-radius: var(--astryx-radius-md);
  padding: 14px 16px;
}

.astryx-crypto-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.825rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.astryx-crypto-row:last-child {
  border-bottom: none;
}

.astryx-crypto-label {
  font-weight: 600;
  color: var(--astryx-text-secondary);
  font-size: 0.775rem;
  min-width: 110px;
}

.astryx-crypto-val {
  font-weight: 500;
  color: var(--astryx-text-primary);
  text-align: right;
  word-break: break-all;
  font-family: var(--astryx-font-sans);
}

.astryx-crypto-hash {
  font-family: var(--astryx-font-mono);
  font-size: 0.72rem;
  background: #ffffff;
  border: 1px solid var(--astryx-border);
  padding: 4px 8px;
  border-radius: 4px;
  color: #334155;
}

/* Floating Actions in Modal Footer */
.astryx-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive hardening: long institutional names and generated content stay contained. */
@media (max-width: 1100px) {
  .astryx-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .astryx-header-inner { flex-wrap: wrap; }
  .astryx-header-inner > :last-child { margin-left: auto; flex-wrap: wrap; }
  .astryx-admin-topbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
  }
  .astryx-congress-switcher { grid-column: 1 / -1; grid-row: 2; }
  .astryx-header-actions { justify-self: end; }
  .astryx-admin-nav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .astryx-split-body { grid-template-columns: 1fr; overflow-y: auto; }
  .astryx-pdf-preview-col, .astryx-crypto-col { overflow: visible; }
  .astryx-crypto-col { border-left: 0; border-top: 1px solid var(--astryx-border); }
}

@media (max-width: 760px) {
  .astryx-header-inner { align-items: stretch; }
  .astryx-header-inner > * { width: 100%; }
  .astryx-header-inner > :last-child { margin-left: 0; justify-content: flex-start; }
  .astryx-admin-topbar { grid-template-columns: 1fr; align-items: stretch; }
  .astryx-admin-topbar > * { width: 100%; }
  .astryx-congress-switcher { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .astryx-header-actions { justify-self: stretch; justify-content: space-between; flex-wrap: wrap; }
  .astryx-header-public-links { flex: 1 1 auto; }
  .astryx-admin-profile { margin-left: auto; }
  .astryx-brand-subtitle { display: none; }
  .astryx-congress-pill { border-radius: var(--astryx-radius-md); }
  .astryx-congress-pill .astryx-select { flex: 1 1 160px; width: auto; }
  .astryx-nav-tabs { padding: 8px 0; }
  .astryx-admin-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .astryx-tab-item { min-height: 42px; padding: 8px 6px; }
  .astryx-content-area { padding-top: 24px; }
  .astryx-card { padding: 18px; }
  .astryx-card-header { align-items: flex-start; }
  .builder-question-row { align-items: flex-start; flex-wrap: wrap; }
  .astryx-modal-backdrop { padding: 8px; align-items: flex-end; }
  .astryx-modal-box { max-height: calc(100dvh - 16px); border-radius: 18px 18px 10px 10px; }
  .astryx-modal-header, .astryx-modal-body { padding: 18px; }
  .astryx-modal-footer { padding: 14px 18px; flex-wrap: wrap; }
  .astryx-modal-footer .astryx-btn { flex: 1 1 140px; }
  .astryx-modal-splitscreen { width: 100%; height: calc(100dvh - 16px); }
  .astryx-paper-document { min-height: 560px; padding: 24px 18px; }
  .astryx-crypto-row { flex-direction: column; gap: 4px; }
  .astryx-crypto-val { text-align: left; }
  #verify-form { flex-direction: column; }
  #verify-form .astryx-btn { width: 100%; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  #pdf-editor-modal .astryx-modal-body { flex-direction: column; overflow-y: auto !important; }
  #pdf-editor-modal .astryx-modal-body > :first-child { width: 100% !important; flex-shrink: 1 !important; }
}

@media (max-width: 420px) {
  .astryx-stats-grid { grid-template-columns: 1fr; }
  .astryx-btn { width: 100%; }
  .astryx-brand { flex-basis: auto; }
  .astryx-brand-title > span { display: none; }
  .astryx-header-public-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .astryx-admin-profile { width: 100%; margin-left: 0; justify-content: space-between; border-left: 0; border-top: 1px solid var(--astryx-border); padding: 10px 0 0; }
  .astryx-admin-profile .astryx-btn { width: auto; }
  .astryx-modal-close { width: 36px; }
  .astryx-filter-group { width: 100%; overflow-x: auto; }
  .astryx-filter-btn { flex: 0 0 auto; }
}
