:root {
  --bg: #f3f7fd;
  --surface: #ffffff;
  --surface-2: #edf4ff;
  --text: #10233f;
  --muted: #5b6f8c;
  --line: #c9d9ee;
  --primary: #2563eb;
  --primary-dark: #164e9c;
  --primary-soft: #e3efff;
  --magenta: #0ea5e9;
  --danger: #b42318;
  --success: #087f5b;
  --shadow: 0 14px 34px rgba(22, 78, 156, .14);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body.has-site-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.has-site-footer > .page {
  flex: 1 0 auto;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.muted { color: var(--muted); }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 30px;
  margin-top: auto;
  padding: 7px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary-dark);
  font-size: .75rem;
  line-height: 1.2;
  text-align: center;
}
.site-footer-separator {
  width: 1px;
  height: 16px;
  background: var(--line);
}
.site-footer-version {
  color: var(--primary-dark);
  font-weight: 800;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--magenta));
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 78, 156, .24);
  flex-wrap: nowrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: max-content;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
}
.brand-mark.has-image {
  background: #fff;
  padding: 3px;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav a, .admin-summary, .user-menu, .year-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  border: 0;
  white-space: nowrap;
}
.topnav a.active, .topnav a:hover, .admin-dropdown[open] .admin-summary, .user-menu:hover {
  background: rgba(255,255,255,.17);
}
.year-picker {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
}
.year-select {
  padding: 6px 2px;
  min-height: 34px;
  color: #fff;
  outline: 0;
}
.year-select option { color: var(--text); }
.admin-dropdown { position: relative; flex: 0 0 auto; }
.admin-summary { cursor: pointer; list-style: none; }
.admin-summary::-webkit-details-marker { display: none; }
.admin-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 270px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.admin-menu a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
}
.admin-menu a:hover, .admin-menu a.active { background: var(--primary-soft); color: var(--primary-dark); }
.user-menu {
  flex: 0 0 auto;
  margin-left: 0;
}

.page {
  width: calc(100% - 32px);
  max-width: none;
  margin: 24px auto 48px;
}
.actas-page {
  width: calc(100% - 32px);
}
.actas-page .page-header {
  align-items: center;
}
.actas-page .quota-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  width: auto;
}
.actas-page .quota-toolbar input[type="search"] {
  width: min(520px, 100%);
  max-width: 520px;
}
.actas-page .quota-toolbar .btn {
  flex: 0 0 auto;
  min-width: 180px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
}
.title-with-icon i { color: var(--primary); }

.form-card, .table-wrap, .placeholder-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.form-card + .form-card, .form-card + .table-wrap, .table-wrap + .form-card { margin-top: 16px; }
.form-card h2, .placeholder-panel h2 { margin: 0 0 8px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field { display: grid; gap: 6px; }
label { font-weight: 700; font-size: .92rem; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(37, 99, 235, .20);
  border-color: var(--magenta);
}
.field-help { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }
.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
}
.checkbox-row input { width: auto; min-height: auto; }
.installment-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.installment-block h3 {
  margin: 0 0 12px;
  color: var(--primary-dark);
}
.installment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.installment-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.installment-card h4 {
  margin: 0;
  color: var(--primary-dark);
}
.password-field { display: grid; grid-template-columns: 1fr auto; }
.password-field input { border-radius: 8px 0 0 8px; }
.password-toggle {
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  color: var(--primary-dark);
  padding: 0 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--primary-soft); color: var(--primary-dark); border-color: #abc7ed; }
.btn-danger { background: #fff1f0; color: var(--danger); border-color: #ffccc7; }
.btn:disabled {
  cursor: wait;
  opacity: .65;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 8px 0;
  cursor: pointer;
  font-weight: 800;
}
.icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  padding: 0;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid;
}
.alert-error { background: #fff1f0; border-color: #ffccc7; color: var(--danger); }
.alert-success { background: #effaf4; border-color: #b7ebc6; color: var(--success); }
[data-success-box] {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(390px, calc(100vw - 36px));
  margin: 0;
  box-shadow: 0 14px 35px rgba(16, 48, 92, .2);
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}
[data-success-box]::before {
  content: "✓";
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
}
[data-success-box]:not(.hidden) {
  animation: success-toast-enter .18s ease-out both;
}
@keyframes success-toast-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  [data-success-box] {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

.table-wrap { overflow-x: auto; padding: 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.data-table th, .data-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.3;
}
.data-table th {
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.2;
}
.data-table td {
  padding: 8px 12px;
}
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: .78rem;
}
.empty-state { color: var(--muted); text-align: center; padding: 18px !important; }

.quota-page {
  width: calc(100% - 32px);
}
.quota-table-wrap {
  border-radius: 8px;
}
.quota-table {
  min-width: 1120px;
  table-layout: fixed;
}
.quota-table th:nth-child(1), .quota-table td:nth-child(1) { width: 78px; }
.quota-table th:nth-child(2), .quota-table td:nth-child(2) { width: 110px; }
.quota-table th:nth-child(3), .quota-table td:nth-child(3) { width: 190px; }
.quota-table th:nth-child(4), .quota-table td:nth-child(4) { width: 110px; white-space: nowrap; }
.quota-table th:nth-child(5), .quota-table td:nth-child(5) { width: 80px; text-align: center; }
.quota-table th:nth-child(7), .quota-table td:nth-child(7) { width: 128px; }
.quota-table td {
  vertical-align: middle;
}
.quota-table .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}
.quota-installment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quota-installment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.quota-installment-pill strong {
  color: var(--primary-dark);
}
.member-quota-page {
  width: calc(100% - 32px);
}
.quota-page-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}
.quota-toolbar {
  display: grid;
  gap: 10px;
  width: 100%;
}
.quota-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.quota-toolbar input[type="search"] {
  flex: 1 1 320px;
  width: min(420px, 100%);
  max-width: 420px;
  margin: 0;
}
.lottery-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.quota-status-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.quota-search-row > .quota-status-filters {
  flex: 1 1 460px;
  min-width: 360px;
}
.quota-filter-button {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 800;
}
.quota-filter-button:last-child {
  border-right: 0;
}
.quota-filter-button:hover {
  background: var(--surface-2);
  color: var(--primary-dark);
}
.quota-filter-button.active {
  background: var(--primary);
  color: #fff;
}
.quota-filter-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(37, 99, 235, .25);
  outline-offset: -3px;
}
.quota-filter-button span {
  font-size: .85em;
}
.member-quota-table {
  min-width: 1180px;
}
.quota-groups {
  display: grid;
  gap: 16px;
}
.quota-type-section {
  display: grid;
  gap: 8px;
}
.quota-type-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quota-type-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.2rem;
}
.quota-type-heading > span {
  color: var(--muted);
  font-weight: 700;
}
.member-quota-table td {
  vertical-align: middle;
}
.quota-payment-heading {
  display: grid;
  gap: 3px;
}
.quota-payment-heading > span {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.overdue-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid #ffccc7;
  border-radius: 999px;
  background: #fff1f0;
  color: var(--danger);
  font-size: .66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
}
.quota-installment-overdue .quota-payment-heading strong {
  background: #fff1f0;
  color: var(--danger);
}
.quota-payment-heading strong {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: .8rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .86rem;
}
.payment-cell {
  display: grid;
  gap: 6px;
  min-width: 170px;
}
.payment-pending,
.payment-paid,
.payment-partial {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
}
.payment-pending {
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffccc7;
}
.payment-paid {
  background: #effaf4;
  color: var(--success);
  border: 1px solid #b7ebc6;
}
.payment-partial {
  background: #fff8e6;
  color: #9a6700;
  border: 1px solid #f2cc60;
}
.pending-amount { color: var(--danger); }
.paid-amount { color: var(--success); }
.payment-cell input {
  min-height: 36px;
  padding: 7px 9px;
}
.quota-detail-heading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.quota-detail-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.lottery-dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.lottery-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.lottery-summary span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}
.lottery-summary strong {
  color: var(--primary-dark);
  font-size: 1.2rem;
}
.lottery-movement-wrap {
  margin-top: 12px;
}
.quota-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quota-discount-dialog { width: min(560px, calc(100% - 24px)); }
.quota-discount-reason-field { margin-top: 14px; }
.quota-discount-reason-field textarea { resize: vertical; }
.quota-discounts-table { min-width: 620px; }
.quota-payments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.quota-payments-heading h3 {
  margin: 0;
}
.quota-payments-table {
  min-width: 520px;
}
.delete-payment-dialog {
  width: min(500px, calc(100% - 24px));
}
.delete-payment-dialog .dialog-header {
  background: #fff8f7;
}
.delete-payment-dialog .dialog-header h2,
.delete-payment-dialog .dialog-header h2 i {
  color: var(--danger);
}
.delete-payment-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.delete-payment-content p {
  margin: 0;
}
.delete-payment-help {
  margin-top: 6px !important;
  color: var(--muted) !important;
  font-size: .92rem !important;
}
.delete-payment-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #ffccc7;
  border-radius: 50%;
  background: #fff1f0;
  color: var(--danger);
  font-size: 1.3rem;
}
.delete-payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.delete-payment-summary span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.delete-payment-summary small {
  color: var(--muted);
  font-weight: 700;
}
.delete-payment-summary strong {
  color: var(--primary-dark);
  font-size: 1.05rem;
}
.delete-payment-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px !important;
  color: var(--danger) !important;
  font-size: .88rem !important;
}
.delete-payment-confirm {
  background: var(--danger);
  color: #fff;
}
.delete-payment-confirm:hover {
  background: #8f1c13;
}
.act-attendees-field {
  margin-top: 10px;
}
.act-content-field {
  margin-top: 10px;
}
#act-content-preview {
  min-height: 230px;
  resize: vertical;
}
.act-content-visual {
  min-height: 230px;
  max-height: 52vh;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}
.act-content-visual > :first-child { margin-top: 0; }
.act-content-visual > :last-child { margin-bottom: 0; }
.act-content-visual h1,
.act-content-visual h2,
.act-content-visual h3,
.act-content-visual h4 {
  color: var(--primary-dark);
  line-height: 1.25;
}
.act-content-visual h1 { font-size: 1.75rem; }
.act-content-visual h2 { font-size: 1.4rem; }
.act-content-visual h3 { font-size: 1.18rem; }
.act-content-visual img {
  max-width: 100%;
  height: auto;
}
.act-content-visual table {
  width: 100%;
  border-collapse: collapse;
}
.act-content-visual th,
.act-content-visual td {
  padding: 8px 10px;
  border: 1px solid var(--line);
}
.act-content-visual blockquote {
  margin-inline: 0;
  padding: 10px 16px;
  border-left: 4px solid var(--primary);
  background: var(--surface-2);
  color: var(--muted);
}
.act-content-visual a {
  color: var(--primary);
  text-decoration: underline;
}
.act-content-empty {
  color: var(--muted);
  font-style: italic;
}
.attendee-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-height: 122px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.attendee-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 500;
}
.attendee-option input {
  width: auto;
  min-height: auto;
  margin: 0;
}
.attendee-option span {
  min-width: 0;
}
.attendee-option strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attendee-option small {
  color: var(--muted);
}
.attendee-picker.is-readonly {
  max-height: none;
  overflow: visible;
}
.attendee-picker.is-readonly .attendee-option {
  padding-block: 6px;
  background: var(--surface);
}
.attendee-picker.is-readonly .attendee-option input {
  display: none;
}
.attendee-picker.is-empty-readonly::before {
  content: "Sin asistentes";
  padding: 5px 7px;
  color: var(--muted);
  font-style: italic;
}
.rich-editor-dialog {
  width: calc(100vw - 32px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.rich-editor-dialog[open] {
  display: flex;
  flex-direction: column;
}
.rich-editor-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rich-editor-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.rich-editor-modes {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.rich-editor-modes button,
.rich-editor-toolbar button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}
.rich-editor-modes button.active {
  background: var(--surface);
  color: var(--primary);
}
.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.rich-editor-toolbar select {
  width: 160px;
  min-height: 36px;
}
.rich-editor-toolbar button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-dark);
}
.rich-toolbar-separator {
  width: 1px;
  height: 28px;
  background: var(--line);
}
.rich-color-control {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-dark);
  cursor: pointer;
}
.rich-color-control input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.rich-editor,
.rich-code-editor {
  width: 100%;
  min-height: 360px;
  max-height: 54vh;
  overflow: auto;
  border: 0;
  border-radius: 0;
  padding: 20px 24px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.55;
}
.rich-editor:focus,
.rich-code-editor:focus {
  outline: 3px solid rgba(37, 99, 235, .20);
  outline-offset: -3px;
}
.rich-code-editor {
  font-family: Consolas, "Courier New", monospace;
  resize: vertical;
}
.wizard-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.wizard-step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}
.wizard-step.is-active {
  background: var(--primary);
  color: #fff;
}
.exercise-dialog,
.quota-payment-dialog {
  width: min(940px, calc(100% - 24px));
}
.quota-payment-dialog {
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.quota-payment-dialog[open] {
  display: flex;
  flex-direction: column;
}
.quota-payment-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.act-dialog {
  width: calc(100vw - 32px);
  max-width: none;
  max-height: calc(100dvh - 24px);
}
.act-dialog .form-grid {
  gap: 10px;
}
.act-dialog .act-schedule-grid {
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr);
}
.act-summary-field {
  margin-top: 10px;
}
.act-dialog #act-date,
.act-dialog #act-start-time,
.act-dialog #act-end-time,
.act-dialog #act-summary {
  min-height: 38px;
  padding-block: 8px;
}
.act-dialog .act-content-visual {
  max-height: 58vh;
}
.act-dialog .dialog-actions {
  align-items: center;
  justify-content: space-between;
}
.act-document-actions,
.act-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.act-email-dialog {
  width: min(980px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.act-email-dialog[open] {
  display: flex;
  flex-direction: column;
}
.act-email-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  overscroll-behavior: contain;
}
.act-email-header {
  padding: 18px 22px;
  background: linear-gradient(135deg, #f7faff 0%, #eaf3ff 100%);
}
.act-email-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.act-email-heading-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
  color: #fff;
  font-size: 1.3rem;
}
.act-email-heading h2,
.act-email-selection-header h3 {
  margin: 0;
}
.act-email-heading p,
.act-email-selection-header p {
  margin: 4px 0 0;
  color: var(--muted);
}
.act-email-document {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 22px 0;
  padding: 14px 16px;
  border: 1px solid #bcd3f2;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf5ff, #f8fbff);
}
.act-email-document > i {
  color: #d9342b;
  font-size: 2rem;
}
.act-email-document div {
  display: grid;
  min-width: 0;
}
.act-email-document span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.act-email-document strong {
  overflow: hidden;
  margin-top: 2px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-email-selection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 12px;
}
.act-email-selection-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.act-email-selection-tools .btn {
  min-height: 36px;
  padding: 7px 11px;
  font-size: .82rem;
}
.act-email-recipients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(48vh, 470px);
  margin: 0 22px;
  padding: 2px 3px 4px;
  overflow-y: auto;
}
.act-email-recipient {
  position: relative;
  display: grid;
  grid-template-columns: 24px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.act-email-recipient:hover:not(.is-unavailable) {
  border-color: #9fbfe9;
  box-shadow: 0 7px 18px rgba(22, 78, 156, .09);
  transform: translateY(-1px);
}
.act-email-recipient.is-selected {
  border-color: #77a8ea;
  background: #f1f7ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}
.act-email-recipient.is-unavailable {
  background: #f7f8fa;
  cursor: not-allowed;
  opacity: .72;
}
.act-email-recipient input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.act-email-recipient:focus-within {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 1px;
}
.act-email-recipient-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #abc3df;
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-size: .8rem;
}
.act-email-recipient.is-selected .act-email-recipient-check {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.act-email-recipient-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #dceaff;
  color: var(--primary-dark);
  font-weight: 900;
  text-transform: uppercase;
}
.act-email-recipient-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.act-email-recipient-info strong,
.act-email-recipient-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-email-recipient-info small {
  color: var(--muted);
}
.act-email-recipient-state {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcf7e7;
  color: #08783f;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.act-email-recipient.is-unavailable .act-email-recipient-state {
  background: #eceff3;
  color: #65758a;
}
.act-email-feedback {
  margin: 14px 22px 0;
}
.act-email-actions {
  position: sticky;
  bottom: 0;
  margin: 18px 0 0;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}
.act-email-actions .btn {
  min-width: 150px;
}

dialog {
  width: min(720px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}
.role-dialog {
  width: min(1120px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.role-dialog[open] {
  display: flex;
  flex-direction: column;
}
.role-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.quota-dialog {
  width: min(920px, calc(100% - 24px));
}
.app-message-dialog {
  width: min(460px, calc(100% - 24px));
}
.app-message-dialog .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.app-message-dialog .dialog-header i {
  color: var(--primary);
}
.app-message-dialog p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}
dialog::backdrop { background: rgba(16, 35, 63, .48); }
.delete-payment-dialog[open] {
  animation: delete-payment-pop .16s ease-out;
}
@keyframes delete-payment-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 { margin: 0; }
.dialog-body { padding: 18px; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.dialog-close { border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.permission-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 18px 0 10px;
}
.permission-heading h3 {
  margin: 0;
}
.permission-sections {
  display: grid;
  gap: 14px;
}
.permission-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}
.permission-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 1.05rem;
}
.permission-section-title i {
  color: var(--primary);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.permission-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px 12px;
  background: #fff;
}
.permission-group legend {
  max-width: calc(100% - 12px);
  padding: 0 6px;
  color: var(--primary-dark);
  font-size: .86rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.permission-options {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex-wrap: wrap;
}
.permission-group label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
  margin: 5px 0;
  white-space: nowrap;
}
.permission-group input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--primary);
}
.users-page {
  width: calc(100% - 32px);
}
.users-table-wrap {
  padding: 10px;
}
.users-table {
  min-width: 1120px;
}
.users-table td {
  vertical-align: middle;
}
.users-table .badge {
  margin-left: 5px;
}
.user-row-actions {
  align-items: center;
  flex-wrap: nowrap;
}
.user-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}
.user-status.is-active {
  border-color: #b7ebc6;
  background: #effaf4;
  color: var(--success);
}
.user-status.is-inactive {
  border-color: #ffccc7;
  background: #fff1f0;
  color: var(--danger);
}
.user-protected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: .84rem;
  white-space: nowrap;
}
.user-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.user-dialog[open] {
  display: flex;
  flex-direction: column;
}
.user-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.user-dialog .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
}
.user-dialog .dialog-header h2 i {
  color: var(--primary);
}
.user-form-grid {
  display: grid;
  gap: 16px;
}
.user-active-field {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.user-active-field input {
  accent-color: var(--primary);
}
.user-dialog [data-user-dialog-error] {
  margin-bottom: 14px;
}

.task-config-page {
  width: calc(100% - 32px);
}
.task-config-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.task-config-filters {
  display: flex;
  align-items: center;
  flex: 1 1 560px;
  gap: 10px;
}
.task-config-toolbar input[type="search"] {
  width: min(430px, 100%);
}
.task-config-filters select {
  width: min(220px, 100%);
  flex: 0 1 220px;
}
.task-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.task-config-table {
  min-width: 1120px;
}
.task-config-table th:nth-child(1) { width: 7%; }
.task-config-table th:nth-child(2) { width: 18%; }
.task-config-table th:nth-child(3) { width: 29%; }
.task-config-table th:nth-child(4) { width: 13%; }
.task-config-table th:nth-child(5) { width: 13%; }
.task-config-table th:nth-child(6) { width: 8%; text-align: center; }
.task-config-table th:nth-child(7) { width: 12%; }
.task-config-table td:nth-child(6) { text-align: center; }
.task-config-table td {
  vertical-align: middle;
}
.task-config-table .row-actions {
  flex-wrap: nowrap;
}
.task-description-cell {
  display: -webkit-box;
  max-width: 560px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.unlimited-value {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}
.task-config-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.task-copy-dialog {
  width: min(650px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.task-copy-dialog[open] {
  display: flex;
  flex-direction: column;
}
.task-copy-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
}
.task-copy-dialog .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--primary-dark);
}
.task-copy-dialog .dialog-header h2 i {
  color: var(--primary);
}
.task-copy-help {
  margin: 0 0 16px;
  line-height: 1.5;
}
.task-config-dialog[open] {
  display: flex;
  flex-direction: column;
}
.task-config-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.task-config-dialog .dialog-header h2,
.delete-task-dialog .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.task-config-dialog .dialog-header h2 {
  color: var(--primary-dark);
}
.task-config-dialog .dialog-header h2 i {
  color: var(--primary);
}
.task-form-grid {
  display: grid;
  gap: 16px;
}
.task-main-fields {
  grid-template-columns: minmax(125px, .35fr) minmax(0, 1.65fr);
}
.task-form-grid > .form-grid > .field {
  align-content: start;
}
#task-max-people,
#task-deadline {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
}
.task-form-grid textarea {
  min-height: 126px;
  resize: vertical;
}
.task-active-field {
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.task-active-field input,
.task-table-active-check {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--primary);
}
.task-table-active-check:disabled {
  opacity: 1;
  cursor: default;
}
.task-config-dialog [data-task-dialog-error] {
  margin-bottom: 14px;
}
.task-config-dialog input:disabled,
.task-config-dialog textarea:disabled {
  opacity: 1;
  background: var(--surface-2);
  color: var(--text);
  cursor: default;
}
.delete-task-dialog .dialog-header {
  background: #fff8f7;
}
.delete-task-dialog .dialog-header h2,
.delete-task-dialog .dialog-header h2 i {
  color: var(--danger);
}

.tasks-page {
  width: calc(100% - 32px);
}
.tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.tasks-toolbar input[type="search"] {
  width: min(430px, 100%);
}
.tasks-table {
  min-width: 1260px;
}
.tasks-table th:nth-child(1) { width: 16%; }
.tasks-table th:nth-child(2) { width: 22%; }
.tasks-table th:nth-child(3) { width: 12%; }
.tasks-table th:nth-child(4) { width: 12%; }
.tasks-table th:nth-child(5) { width: 16%; }
.tasks-table th:nth-child(6) { width: 9%; }
.tasks-table th:nth-child(7) { width: 13%; }
.tasks-table td {
  vertical-align: middle;
}
.task-operational-actions {
  flex-wrap: nowrap;
}
.task-join-button {
  border-color: #b7ebc6;
  background: #effaf4;
  color: var(--success);
}
.task-assign-button {
  border-color: #abc7ed;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.task-status-button {
  border-color: #ffd591;
  background: #fff7e6;
  color: #ad6800;
}
.task-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
.task-status-badge.is-pendiente {
  border-color: #ffc9c4;
  background: #fff1f0;
  color: var(--danger);
}
.task-status-badge.is-en_proceso {
  border-color: #ffd591;
  background: #fff7e6;
  color: #ad6800;
}
.task-status-badge.is-realizada {
  border-color: #b7ebc6;
  background: #effaf4;
  color: var(--success);
}
.task-assignee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.task-assignee-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #b7ebc6;
  border-radius: 999px;
  background: #effaf4;
  color: var(--success);
  font-size: .78rem;
  font-weight: 800;
}
.task-assignee-pill.is-assigned {
  border-color: #abc7ed;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.task-view-dialog,
.task-status-dialog,
.task-assignment-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.task-status-dialog {
  width: min(520px, calc(100% - 24px));
}
.task-view-dialog[open],
.task-status-dialog[open],
.task-assignment-dialog[open] {
  display: flex;
  flex-direction: column;
}
.task-view-dialog > .dialog-body,
.task-status-dialog > .dialog-body,
.task-assignment-dialog > .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.task-view-dialog .dialog-header h2,
.task-status-dialog .dialog-header h2,
.task-assignment-dialog .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--primary-dark);
}
.task-view-dialog .dialog-header h2 i,
.task-status-dialog .dialog-header h2 i,
.task-assignment-dialog .dialog-header h2 i {
  color: var(--primary);
}
.task-view-name {
  margin: 0 0 7px;
  color: var(--primary-dark);
  font-size: 1.3rem;
}
.task-view-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}
.task-view-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.task-view-summary span,
.task-assignment-heading > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.task-view-summary small,
.task-assignment-heading small {
  color: var(--muted);
  font-weight: 700;
}
.task-view-summary strong,
.task-assignment-heading strong {
  color: var(--primary-dark);
}
.task-view-assignees {
  display: grid;
  gap: 10px;
}
.task-view-assignees h4 {
  margin: 0;
}
.task-assignment-heading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.task-user-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.task-user-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.task-user-option:hover {
  border-color: var(--primary);
}
.task-user-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  padding: 0;
  accent-color: var(--primary);
}
.task-user-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.task-user-option strong {
  overflow-wrap: anywhere;
}
.task-user-option small {
  color: var(--muted);
}

.site-config-page {
  width: calc(100% - 32px);
}
.site-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--primary-dark);
}
.site-section-heading h2 i {
  color: var(--primary);
}
.site-section-heading p {
  margin: 7px 0 0;
}
.smtp-config-form {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.smtp-form-grid .smtp-full {
  grid-column: 1 / -1;
}
.smtp-password-status {
  line-height: 1.35;
}
.smtp-security-note {
  margin-top: -8px;
}
.smtp-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.exercise-create-form {
  display: grid;
  grid-template-columns: minmax(190px, 320px) auto;
  align-items: end;
  justify-content: start;
  gap: 12px;
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.exercise-table-wrap {
  box-shadow: none;
}
.exercise-table {
  min-width: 520px;
}
.exercise-table td {
  vertical-align: middle;
}
.exercise-year-value {
  display: inline-flex;
  min-width: 64px;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f3f7fd, #e4f1ff);
}
.auth-page::before {
  content: "";
  position: fixed;
  left: -96px;
  top: -170px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  pointer-events: none;
  background-color: #cfe4ff;
}
.auth-page.has-watermark::after {
  content: "";
  position: fixed;
  left: -96px;
  top: -170px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  pointer-events: none;
  background-image: var(--auth-watermark);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 76%;
  opacity: .16;
  filter: saturate(.9);
}
.auth-shell {
  width: min(440px, 100%);
  position: relative;
  z-index: 1;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  margin-top: 0;
}
.auth-logo {
  margin: 0 auto 18px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--magenta));
  font-size: 1.8rem;
  font-weight: 900;
}
.auth-logo.has-image {
  width: 92px;
  height: 92px;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}
.auth-logo img,
.auth-logo.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.auth-submit { width: 100%; margin-top: 14px; }

.asset-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.asset-preview a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--surface-2);
}

.section-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 34px;
  color: var(--primary-dark);
}
.section-title-with-icon i { color: var(--primary); }
.fila-images-section { padding: 18px 20px 20px; }
.fila-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.fila-image-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 386px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.fila-image-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.fila-image-preview {
  display: grid;
  place-items: center;
  height: 184px;
  border: 1px dashed #8cadd8;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.fila-image-preview img {
  display: block;
  max-width: 88%;
  max-height: 76%;
  object-fit: contain;
}
.fila-image-preview.is-empty::before {
  content: "Sin imagen";
  color: var(--muted);
  font-weight: 700;
}
.fila-image-preview.is-empty img { display: none; }
.watermark-preview img {
  max-width: 72%;
  max-height: 82%;
  opacity: .65;
}
.favicon-preview {
  height: 138px;
  margin-top: 14px;
  margin-bottom: 2px;
}
.favicon-preview img {
  max-width: 64px;
  max-height: 64px;
}
.fila-image-card input[type="file"] {
  padding: 7px 10px;
  min-height: 38px;
  background: #fff;
}

@media (max-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    flex-wrap: initial;
  }
  .brand {
    min-width: 0;
  }
  .topnav {
    grid-column: 1 / -1;
    order: 4;
    padding-bottom: 2px;
  }
  .admin-dropdown { justify-self: end; }
  .topnav span { display: none; }
  .year-picker { justify-self: end; }
  .fila-image-grid { grid-template-columns: 1fr; }
  .attendee-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .user-menu span { display: none; }
}

@media (max-width: 820px) {
  .page {
    width: calc(100% - 12px);
    margin-top: 14px;
  }
  .actas-page {
    width: calc(100% - 12px);
  }
  .actas-page .quota-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .actas-page .quota-toolbar input[type="search"],
  .actas-page .quota-toolbar .btn {
    width: 100%;
    max-width: none;
  }
  .actas-page .quota-toolbar .btn {
    min-width: 0;
  }
  .page-header { align-items: stretch; flex-direction: column; }
  .form-card, .placeholder-panel { padding: 14px; }
  .form-grid, .permission-grid, .installment-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn, .page-header .btn { width: 100%; }
  .data-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 8px;
  }
  .data-table thead { display: none; }
  .data-table tr {
    display: grid;
    gap: 2px;
    margin: 0 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .data-table td {
    display: grid;
    grid-template-columns: minmax(102px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
    border: 0;
    padding: 3px 0;
    overflow-wrap: anywhere;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 800;
    color: var(--primary-dark);
    font-size: .78rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .02em;
  }
  .data-table td > * {
    min-width: 0;
  }
  .quota-table {
    min-width: 0;
    table-layout: auto;
  }
  .quota-table th,
  .quota-table td {
    width: auto !important;
    text-align: left !important;
    white-space: normal !important;
  }
  .quota-table .row-actions {
    justify-content: flex-start;
  }
  .member-quota-table {
    min-width: 0;
  }
  .member-quota-table .row-actions {
    justify-content: flex-start;
  }
  .users-table-wrap {
    padding: 0 0 8px;
  }
  .users-table tr {
    margin-inline: 8px;
  }
  .users-table td {
    grid-template-columns: 105px minmax(0, 1fr);
    overflow-wrap: anywhere;
  }
  .task-config-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .task-config-filters {
    align-items: stretch;
    flex-direction: column;
    flex-basis: auto;
  }
  .task-config-toolbar input[type="search"],
  .task-config-filters select,
  .task-config-toolbar .btn {
    width: 100%;
    max-width: none;
  }
  .task-config-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .task-config-table {
    min-width: 0;
  }
  .task-config-table tr {
    margin-inline: 8px;
  }
  .task-config-table td {
    grid-template-columns: 112px minmax(0, 1fr);
    overflow-wrap: anywhere;
  }
  .task-config-table .row-actions {
    flex-wrap: wrap;
  }
  .task-description-cell {
    max-width: none;
    -webkit-line-clamp: 4;
  }
  .user-row-actions {
    flex-wrap: wrap;
  }
  .user-dialog .dialog-actions {
    position: sticky;
    bottom: -14px;
    margin-inline: -14px;
    margin-bottom: -14px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .task-config-dialog .dialog-actions {
    position: sticky;
    bottom: -14px;
    margin-inline: -14px;
    margin-bottom: -14px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .tasks-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .tasks-toolbar input[type="search"] {
    width: 100%;
    max-width: none;
  }
  .tasks-table {
    min-width: 0;
  }
  .tasks-table tr {
    margin-inline: 8px;
  }
  .tasks-table td {
    grid-template-columns: 112px minmax(0, 1fr);
    overflow-wrap: anywhere;
  }
  .task-operational-actions {
    flex-wrap: wrap;
  }
  .task-view-summary,
  .task-assignment-heading,
  .task-user-picker {
    grid-template-columns: 1fr;
  }
  .task-view-dialog .dialog-actions,
  .task-status-dialog .dialog-actions,
  .task-assignment-dialog .dialog-actions {
    position: sticky;
    bottom: -14px;
    margin-inline: -14px;
    margin-bottom: -14px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .exercise-create-form {
    grid-template-columns: 1fr;
  }
  .exercise-create-form .btn {
    width: 100%;
  }
  .exercise-table {
    min-width: 0;
  }
  .payment-cell {
    min-width: 0;
  }
  .quota-toolbar {
    width: 100%;
  }
  .quota-search-row {
    align-items: stretch;
    flex-direction: column;
  }
  .quota-search-row > .quota-status-filters {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }
  .quota-toolbar input[type="search"] {
    width: 100%;
    max-width: none;
  }
  .lottery-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
    margin-left: 0;
  }
  .quota-filter-button {
    min-height: 44px;
    padding: 8px 4px;
    font-size: .84rem;
  }
  .quota-detail-heading {
    grid-template-columns: 1fr;
  }
  .lottery-summary {
    grid-template-columns: 1fr;
  }
  .quota-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .quota-summary span {
    min-width: 0;
    padding: 9px 7px;
    font-size: .76rem;
  }
  .quota-summary strong {
    overflow-wrap: anywhere;
    font-size: .95rem;
  }
  .quota-payments-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .quota-payments-table {
    min-width: 0;
  }
  .quota-payments-table tr {
    margin-inline: 0;
  }
  .quota-payments-table td {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .quota-payments-table .icon-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
  dialog,
  .app-message-dialog,
  .delete-payment-dialog,
  .quota-payment-dialog,
  .act-dialog,
  .rich-editor-dialog,
  .role-dialog,
  .task-config-dialog,
  .delete-task-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }
  .act-dialog .act-content-visual {
    min-height: 38vh;
    max-height: none;
    padding: 16px;
  }
  .act-dialog .act-schedule-grid {
    grid-template-columns: 1fr;
  }
  .rich-editor-dialog .rich-editor-modes button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 6px;
  }
  .rich-editor-dialog .rich-editor-toolbar {
    gap: 5px;
    padding: 8px;
  }
  .rich-editor-dialog .rich-editor-toolbar select {
    width: 100%;
  }
  .rich-editor-dialog .rich-editor,
  .rich-editor-dialog .rich-code-editor {
    min-height: 42vh;
    max-height: none;
    padding: 14px;
  }
  .act-dialog .dialog-actions,
  .rich-editor-dialog .dialog-actions {
    position: sticky;
    bottom: -14px;
    z-index: 2;
    margin-inline: -14px;
    margin-bottom: -14px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .act-dialog .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .act-document-actions,
  .act-form-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .act-document-actions .btn,
  .act-form-actions .btn {
    width: 100%;
  }
  .act-email-header {
    padding: 14px;
  }
  .act-email-heading-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .act-email-heading p {
    font-size: .82rem;
  }
  .act-email-document {
    margin: 14px 14px 0;
  }
  .act-email-selection-header {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 14px 10px;
  }
  .act-email-selection-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .act-email-selection-tools .btn {
    min-width: 0;
  }
  .act-email-recipients {
    grid-template-columns: 1fr;
    max-height: none;
    margin: 0 14px;
  }
  .act-email-recipient {
    grid-template-columns: 24px 38px minmax(0, 1fr);
  }
  .act-email-recipient-avatar {
    width: 38px;
    height: 38px;
  }
  .act-email-recipient-state {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .act-email-feedback {
    margin-inline: 14px;
  }
  .act-email-actions {
    margin-top: 14px;
    padding: 12px 14px 14px;
  }
  .act-email-actions .btn {
    width: 100%;
  }
  .permission-section {
    padding: 11px;
  }
  .permission-section-title {
    font-size: 1rem;
  }
  .permission-options {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }
  .permission-group label {
    min-height: 38px;
    margin: 0;
    white-space: normal;
  }
  .dialog-header {
    padding: 13px 14px;
  }
  .dialog-header h2 {
    font-size: 1.15rem;
  }
  .dialog-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
  .dialog-body {
    padding: 14px;
  }
  .delete-payment-content {
    gap: 10px;
  }
  .delete-payment-icon {
    width: 42px;
    height: 42px;
  }
  .delete-payment-summary {
    gap: 8px;
  }
  .delete-payment-summary span {
    padding: 10px;
  }
  .quota-installment-pill {
    white-space: normal;
  }
  .data-table td[data-label="Acciones"] {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
  }
  .data-table td[data-label="Acciones"] .row-actions {
    width: 100%;
  }
  .data-table .icon-btn {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex-basis: 42px;
  }
  .empty-state { display: block !important; }
}

@media (max-width: 560px) {
  .topbar {
    gap: 7px;
    padding-inline: 9px;
  }
  .admin-summary {
    width: 38px;
    padding-inline: 9px;
  }
  .admin-summary span,
  .admin-summary .bi-chevron-down {
    display: none;
  }
  .year-picker {
    padding-inline: 5px;
  }
  .year-select {
    padding-inline: 0;
  }
  .attendee-picker {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-success-box]:not(.hidden) {
    animation: none;
  }
  .delete-payment-dialog[open] {
    animation: none;
  }
}

/* Dashboard: diseño mobile-first */
.dashboard-page {
  display: grid;
  gap: 20px;
  max-width: 1180px;
}
.dashboard-page > .alert {
  margin: 0;
}
.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #123d7a 0%, var(--primary) 66%, #168cb8 100%);
  color: #fff;
  box-shadow: 0 18px 38px rgba(22, 78, 156, .22);
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border: 35px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}
.dashboard-eyebrow {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: .78rem;
  letter-spacing: .02em;
}
.dashboard-hero h1 {
  margin: 14px 0 5px;
  font-size: clamp(1.65rem, 7vw, 2.55rem);
  line-height: 1.1;
}
.dashboard-hero > div > p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .94rem;
}
.dashboard-updated {
  z-index: 1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  align-self: end;
  width: fit-content;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .78rem;
}
.dashboard-updated span {
  display: grid;
}
.dashboard-updated time {
  color: #fff;
  font-weight: 700;
}
.dashboard-section {
  display: grid;
  gap: 12px;
}
.dashboard-section-heading > div > span {
  color: var(--primary);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .11em;
}
.dashboard-section-heading h2 {
  margin: 3px 0 0;
  font-size: 1.28rem;
}
.dashboard-section-heading-row {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.dashboard-view-all {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  color: var(--primary-dark);
  font-size: .84rem;
  font-weight: 800;
}
.dashboard-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.dashboard-quick-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(22, 78, 156, .08);
}
.dashboard-quick-action > .bi:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.25rem;
}
.dashboard-quick-action > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dashboard-quick-action strong {
  font-size: .92rem;
}
.dashboard-quick-action small {
  overflow: hidden;
  color: var(--muted);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-quick-action > .bi-chevron-right {
  color: #8ba0bb;
}
.dashboard-quick-action.is-disabled {
  opacity: .58;
  box-shadow: none;
}
.dashboard-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.dashboard-status-card {
  overflow: hidden;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(22, 78, 156, .09);
}
.dashboard-card-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.dashboard-card-heading > div {
  min-width: 0;
}
.dashboard-card-heading > div small {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .09em;
}
.dashboard-card-heading h3 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: .98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #e8f7f0;
  color: var(--success);
  font-size: 1.25rem;
}
.dashboard-card-icon.is-lottery {
  background: #fff4de;
  color: #a15c00;
}
.dashboard-card-icon.is-task {
  background: var(--primary-soft);
  color: var(--primary);
}
.dashboard-state {
  grid-column: 1 / -1;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-self: start;
  min-height: 27px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .71rem;
  font-weight: 800;
}
.dashboard-state.is-success { background: #e5f7ef; color: #087452; }
.dashboard-state.is-warning { background: #fff1d2; color: #8b5200; }
.dashboard-state.is-danger { background: #fee9e7; color: var(--danger); }
.dashboard-state.is-info { background: var(--primary-soft); color: var(--primary-dark); }
.dashboard-state.is-neutral { background: #edf1f6; color: var(--muted); }
.dashboard-main-value {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}
.dashboard-main-value strong {
  font-size: clamp(1.75rem, 8vw, 2.3rem);
  line-height: 1;
}
.dashboard-main-value span {
  color: var(--muted);
  font-size: .78rem;
}
.dashboard-progress {
  overflow: hidden;
  height: 7px;
  margin-top: -7px;
  border-radius: 999px;
  background: #e4ebf5;
}
.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--magenta));
}
.dashboard-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dashboard-card-metrics-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-card-metrics > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border-radius: 9px;
  background: #f5f8fc;
}
.dashboard-card-metrics small {
  color: var(--muted);
  font-size: .67rem;
}
.dashboard-card-metrics strong {
  overflow-wrap: anywhere;
  font-size: .86rem;
}
.dashboard-card-empty {
  min-height: 70px;
  margin: 0;
  padding: 16px;
  border-radius: 9px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}
.dashboard-card-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: start;
  min-height: 36px;
  color: var(--primary-dark);
  font-size: .8rem;
  font-weight: 800;
}
.dashboard-task-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e2eaf4;
  border-radius: 10px;
  background: #e2eaf4;
}
.dashboard-task-list > a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  background: #fff;
}
.dashboard-task-list > a > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dashboard-task-list strong {
  overflow: hidden;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-task-list small {
  color: var(--muted);
  font-size: .69rem;
}
.dashboard-task-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.dashboard-task-check.is-realizada {
  background: #e5f7ef;
  color: var(--success);
}
.dashboard-task-list .task-status-badge {
  padding: 4px 6px;
  font-size: .62rem;
  white-space: nowrap;
}
.dashboard-act-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(22, 78, 156, .09);
}
.dashboard-act-item {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid #e4ebf5;
}
.dashboard-act-item:last-child {
  border-bottom: 0;
}
.dashboard-act-date {
  display: grid;
  place-items: center;
  align-content: center;
  width: 45px;
  height: 49px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.dashboard-act-date strong {
  font-size: 1.12rem;
  line-height: 1;
}
.dashboard-act-date small {
  margin-top: 3px;
  font-size: .58rem;
  font-weight: 900;
}
.dashboard-act-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.dashboard-act-info strong {
  overflow: hidden;
  font-size: .87rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-act-info small {
  color: var(--muted);
  font-size: .69rem;
}
.dashboard-act-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dashboard-act-actions a,
.dashboard-act-actions button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
  cursor: pointer;
}
.dashboard-act-actions button:disabled {
  opacity: .6;
  cursor: wait;
}
.dashboard-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  text-align: center;
}
.dashboard-empty i {
  color: var(--primary);
  font-size: 1.65rem;
}
.dashboard-empty strong { color: var(--text); }
.dashboard-empty span { font-size: .82rem; }
.dashboard-loading-card {
  display: grid;
  gap: 12px;
  min-height: 215px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.dashboard-loading-card span {
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf2f8 25%, #f7f9fc 50%, #edf2f8 75%);
  background-size: 200% 100%;
  animation: dashboard-shimmer 1.4s infinite;
}
.dashboard-loading-card span:nth-child(2) { height: 68px; }
.dashboard-loading-card span:nth-child(3) { width: 55%; }
@keyframes dashboard-shimmer {
  to { background-position: -200% 0; }
}

@media (min-width: 540px) {
  .dashboard-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-card-heading {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .dashboard-state {
    grid-column: auto;
    justify-self: end;
  }
  .dashboard-act-item {
    grid-template-columns: 45px minmax(0, 1fr) auto;
  }
  .dashboard-act-actions {
    grid-column: auto;
    display: flex;
  }
  .dashboard-act-actions a,
  .dashboard-act-actions button {
    min-width: 72px;
  }
}

@media (min-width: 760px) {
  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 28px 30px;
  }
  .dashboard-updated {
    justify-self: end;
  }
  .dashboard-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-task-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 980px) {
  .dashboard-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-quick-action {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .dashboard-quick-action > .bi-chevron-right {
    display: none;
  }
}

@media (max-width: 560px) {
  .topbar .brand span:last-child {
    display: none;
  }
}

@media (hover: hover) {
  .dashboard-quick-action:not(.is-disabled):hover,
  .dashboard-act-actions a:hover,
  .dashboard-act-actions button:hover {
    border-color: #9ab8e2;
    background: #f8fbff;
    transform: translateY(-1px);
  }
  .dashboard-card-link:hover,
  .dashboard-view-all:hover {
    color: var(--primary);
  }
  .dashboard-task-list > a:hover {
    background: #f8fbff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-loading-card span { animation: none; }
}
