:root {
  --rotary-blue: #17458f;
  --rotary-blue-dark: #102f61;
  --rotary-blue-soft: #eaf1fb;
  --rotary-gold: #f7a81b;
  --ink: #172033;
  --muted: #667085;
  --line: #dde5f0;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

html,
body {
  overflow-x: hidden;
}

body.admin-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(247, 168, 27, .12), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--rotary-blue); }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
}

.login-brand {
  padding: clamp(2rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.login-logo {
  width: min(320px, 82vw);
  height: auto;
}

.login-title h1 {
  max-width: 720px;
  margin: 0;
  color: var(--rotary-blue-dark);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 750;
  line-height: .96;
}

.login-title p {
  max-width: 540px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(255, 255, 255, .72);
  border-left: 1px solid rgba(23, 69, 143, .12);
  backdrop-filter: blur(18px);
}

.login-card {
  width: min(100%, 420px);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(23, 69, 143, .12);
}

.form-label {
  color: #344054;
  font-weight: 650;
}

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

.form-control:focus,
.form-select:focus {
  border-color: var(--rotary-blue);
  box-shadow: 0 0 0 .2rem rgba(23, 69, 143, .12);
}

.btn {
  border-radius: 8px;
  font-weight: 650;
}

.btn-primary {
  border-color: var(--rotary-blue);
  background: var(--rotary-blue);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--rotary-blue-dark);
  background: var(--rotary-blue-dark);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(1180px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-link span {
  white-space: nowrap;
}

.brand-link img {
  height: 44px;
  width: auto;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--rotary-blue-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  background: currentColor;
  border-radius: 999px;
  transition: transform .18s ease, opacity .18s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.main-nav a,
.nav-group-trigger {
  padding: .6rem .8rem;
  color: #344054;
  border-radius: 8px;
  font-weight: 650;
  text-decoration: none;
}

.nav-group-trigger {
  background: transparent;
  border: 0;
}

.main-nav a:hover,
.main-nav a.active,
.nav-group-trigger:hover,
.nav-group-trigger.active {
  color: var(--rotary-blue);
  background: var(--rotary-blue-soft);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  min-width: 190px;
  display: none;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 69, 143, .14);
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  display: grid;
  gap: .15rem;
}

.nav-menu a {
  display: block;
  white-space: nowrap;
}

.nav-separator {
  height: 1px;
  margin: .25rem .35rem;
  background: var(--line);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .92rem;
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--rotary-blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--rotary-blue-dark);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 780;
  line-height: 1.05;
}

.page-subtitle {
  max-width: 720px;
  margin: .65rem 0 0;
  color: var(--muted);
}

.stat-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card,
.panel,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 42px rgba(23, 69, 143, .08);
}

.stat-card { padding: 1rem; }

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.stat-value {
  margin: .35rem 0 0;
  color: var(--rotary-blue-dark);
  font-size: 1.8rem;
  font-weight: 780;
}

.module-card {
  min-height: 160px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(23, 69, 143, .12);
}

.module-card h2 {
  margin: 0;
  color: var(--rotary-blue-dark);
  font-size: 1.1rem;
  font-weight: 750;
}

.module-card p {
  margin: .45rem 0 1rem;
  color: var(--muted);
}

.module-action {
  color: var(--rotary-blue);
  font-weight: 750;
}

.birthday-notify {
  position: relative;
  align-self: flex-start;
}

.birthday-bell {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rotary-blue-dark);
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(23, 69, 143, .1);
}

.birthday-bell:hover,
.birthday-bell:focus,
.birthday-bell.is-open {
  color: #fff;
  background: var(--rotary-blue);
  border-color: var(--rotary-blue);
}

.birthday-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
  color: var(--rotary-blue-dark);
  background: var(--rotary-gold);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
}

.birthday-panel {
  position: absolute;
  top: calc(100% + .75rem);
  right: 0;
  z-index: 30;
  width: min(390px, calc(100vw - 2rem));
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 58px rgba(23, 69, 143, .16);
}

.birthday-panel.is-open {
  display: block;
}

.birthday-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  color: var(--rotary-blue-dark);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.birthday-panel-header span {
  display: block;
  margin-top: .1rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}

.birthday-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.birthday-close:hover,
.birthday-close:focus {
  color: var(--rotary-blue-dark);
  background: var(--rotary-blue-soft);
}

.birthday-list {
  max-height: min(430px, calc(100vh - 190px));
  overflow: auto;
}

.birthday-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .9rem 1rem;
  border-bottom: 1px solid #edf1f7;
}

.birthday-item:last-child {
  border-bottom: 0;
}

.birthday-item-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .2rem;
  color: var(--rotary-blue-dark);
}

.birthday-item-top span {
  color: var(--rotary-gold);
  font-size: .82rem;
  font-weight: 800;
}

.birthday-item p {
  margin: 0;
  font-size: .92rem;
  font-weight: 650;
}

.birthday-item small {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
}

.birthday-message {
  flex: 0 0 auto;
}

.panel { overflow: hidden; }
.panel-body { padding: 1rem; }

.panel-title {
  margin: 0 0 .85rem;
  color: var(--rotary-blue-dark);
  font-size: 1.05rem;
  font-weight: 750;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 1rem;
}

.report-list {
  display: grid;
  gap: .6rem;
}

.report-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  padding: .75rem;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
}

.report-item > span {
  color: var(--rotary-gold);
  font-weight: 850;
}

.report-item strong {
  color: var(--rotary-blue-dark);
}

.report-item small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
}

.report-heading {
  margin-bottom: 1rem;
  text-align: center;
}

.report-heading h2 {
  margin: 0;
  color: var(--rotary-blue-dark);
  font-size: 1.25rem;
  font-weight: 780;
}

.report-heading p {
  margin: .35rem 0 0;
  color: var(--muted);
}

.signature-line {
  display: block;
  width: 100%;
  min-width: 150px;
  height: 1px;
  margin-top: 1.2rem;
  background: #98a2b3;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, .45fr) minmax(150px, .45fr) auto;
  gap: 1rem;
  align-items: end;
}

.filter-bar-compact {
  grid-template-columns: minmax(220px, 420px) auto;
}

.associados-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(145px, .35fr) minmax(145px, .35fr) minmax(180px, .45fr) auto;
}

.clone-bar {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.filter-actions {
  display: flex;
  gap: .5rem;
}

.table-modern { margin: 0; }

.table-modern thead th {
  padding: .8rem 1rem;
  color: #475467;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.table-modern tbody td {
  padding: .95rem 1rem;
  vertical-align: middle;
  border-color: #edf1f7;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .25rem .55rem;
  color: var(--rotary-blue-dark);
  background: var(--rotary-blue-soft);
  border: 1px solid #d3e2f5;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 750;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .45rem;
  color: #fff;
  background: var(--rotary-blue);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 750;
}

.status-toggle {
  min-width: 3.2rem;
  min-height: 30px;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 750;
}

.status-toggle.is-on {
  color: #05603a;
  background: #d1fadf;
  border: 1px solid #a6f4c5;
}

.status-toggle.is-off {
  color: #b42318;
  background: #fee4e2;
  border: 1px solid #fecdca;
}

.status-toggle:hover,
.status-toggle:focus {
  filter: brightness(.97);
}

.sections-sortable tbody tr {
  transition: background .15s ease, opacity .15s ease;
}

.sections-sortable tbody tr.is-dragging {
  opacity: .65;
  background: #edf4ff;
}

.drag-handle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #c9d5e6;
  border-radius: 8px;
  background: #fff;
  color: var(--rotary-blue);
  cursor: grab;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle span {
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.audit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.audit-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .2rem .45rem;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
}

.status-a {
  color: #05603a;
  background: #d1fadf;
  border: 1px solid #a6f4c5;
}

.status-b,
.status-x {
  color: #b42318;
  background: #fee4e2;
  border: 1px solid #fecdca;
}

.status-i {
  color: #6941c6;
  background: #ebe9fe;
  border: 1px solid #d9d6fe;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rotary-blue);
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  text-decoration: none;
}

.icon-button:hover,
.icon-button:focus {
  color: #fff;
  background: var(--rotary-blue);
  border-color: var(--rotary-blue);
}

.icon-button.danger {
  color: #b42318;
}

.icon-button.danger:hover,
.icon-button.danger:focus {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

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

.presence-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-wide {
  grid-column: 1 / -1;
}

.member-form {
  display: grid;
  gap: 1rem;
}

.form-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 42px rgba(23, 69, 143, .08);
}

.form-section h2,
.section-heading h2 {
  margin: 0 0 1rem;
  color: var(--rotary-blue-dark);
  font-size: 1.05rem;
  font-weight: 760;
}

.plano-month-grid {
  display: grid;
  gap: 1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
}

.member-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
}

.photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: .8rem;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fafc;
}

.photo-card img,
.photo-empty {
  width: 150px;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 650;
}

.check-tile {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 650;
}

.check-tile input {
  width: 18px;
  height: 18px;
  accent-color: var(--rotary-blue);
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .45rem;
  border: 1px solid #c9d5e6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.wysiwyg-toolbar button {
  min-width: 38px;
  min-height: 34px;
  padding: .35rem .55rem;
  border: 1px solid #c9d5e6;
  border-radius: 6px;
  background: #fff;
  color: var(--rotary-blue-dark);
  font-weight: 750;
}

.wysiwyg-toolbar select,
.wysiwyg-toolbar input[type="color"] {
  min-height: 34px;
  border: 1px solid #c9d5e6;
  border-radius: 6px;
  background: #fff;
  color: var(--rotary-blue-dark);
}

.wysiwyg-toolbar select {
  padding: .25rem .45rem;
}

.wysiwyg-toolbar input[type="color"] {
  width: 42px;
  padding: .15rem;
}

.wysiwyg-toolbar button:hover,
.wysiwyg-toolbar button:focus {
  border-color: var(--rotary-blue);
  background: #edf4ff;
}

.wysiwyg-editor {
  min-height: 260px;
  padding: .8rem;
  border: 1px solid #c9d5e6;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #1f2937;
  line-height: 1.5;
  outline: 0;
}

.wysiwyg-editor:focus {
  border-color: var(--rotary-blue);
  box-shadow: 0 0 0 3px rgba(23, 69, 143, .12);
}

.wysiwyg-editor img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.wysiwyg-editor img.is-selected {
  outline: 3px solid var(--rotary-gold);
  outline-offset: 3px;
}

.image-insert-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 110px;
  gap: .6rem;
}

.image-edit-tools {
  display: none;
  padding: .75rem;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fafc;
}

.image-edit-tools.is-visible {
  display: block;
}

.form-actions-sticky {
  position: sticky;
  bottom: .75rem;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 36px rgba(23, 69, 143, .14);
  backdrop-filter: blur(12px);
}

.relatives-table td {
  min-width: 150px;
}

.logo-upload {
  margin-top: .65rem;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
}

.logo-upload img,
.logo-upload span {
  width: 96px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  padding: .4rem;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 650;
  text-align: center;
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { padding-bottom: 0; }
  .login-panel {
    border-left: 0;
    background: transparent;
  }
  .topbar-inner {
    width: min(1180px, calc(100% - 1rem));
    min-height: 64px;
    padding: .8rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: .5rem;
  }

  .brand-link {
    min-width: 0;
    gap: .45rem;
    overflow: hidden;
  }

  .brand-link img {
    max-width: min(220px, calc(100vw - 110px));
    height: 40px;
    object-fit: contain;
  }

  .brand-link span {
    min-width: 0;
    overflow: hidden;
    font-size: .92rem;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
    flex: 0 0 auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    width: 100%;
    max-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: .15rem;
    overflow: hidden;
    padding: 0;
    transition: max-height .22s ease, padding .22s ease;
  }

  .main-nav.is-open {
    max-height: 900px;
    padding: .45rem 0 .15rem;
  }

  .main-nav a {
    width: 100%;
    min-height: 38px;
    padding: .45rem .5rem;
    display: flex;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
  }

  .nav-group {
    display: grid;
    gap: .1rem;
  }

  .nav-group-trigger {
    width: 100%;
    min-height: 38px;
    padding: .45rem .5rem;
    color: var(--rotary-blue-dark);
    background: #f8fafc;
    border: 0;
    border-radius: 6px;
    text-align: left;
  }

  .nav-menu {
    position: static;
    min-width: 0;
    display: grid;
    gap: .05rem;
    padding: .1rem 0 .25rem .75rem;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .user-chip {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin-top: .35rem;
    justify-content: space-between;
  }
  .page-header { flex-direction: column; }
  .stat-grid,
  .module-grid,
  .report-grid,
  .form-grid,
  .presence-form,
  .filter-bar { grid-template-columns: 1fr; }

  .form-wide {
    grid-column: auto;
  }

  .member-hero {
    grid-template-columns: 1fr;
  }

  .photo-card {
    align-items: flex-start;
  }

  .filter-actions {
    width: 100%;
  }

  .filter-actions .btn {
    flex: 1;
  }
}

@media print {
  .topbar,
  .page-header .btn,
  .filter-bar,
  .birthday-notify {
    display: none !important;
  }

  body.admin-body {
    background: #fff;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .panel,
  .stat-card,
  .module-card {
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  .login-card { padding: 1.3rem; }
  .page,
  .topbar-inner { width: min(100% - 1rem, 1180px); }
  .actions { justify-content: flex-start; }

  .table-responsive-cards {
    overflow: visible;
  }

  .table-responsive-cards table,
  .table-responsive-cards thead,
  .table-responsive-cards tbody,
  .table-responsive-cards th,
  .table-responsive-cards td,
  .table-responsive-cards tr {
    display: block;
  }

  .table-responsive-cards thead {
    display: none;
  }

  .table-responsive-cards tbody tr {
    margin: .75rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .table-modern.table-responsive-cards tbody td,
  .table-responsive-cards .table-modern tbody td {
    padding: .55rem 0;
    border: 0;
  }

  .table-responsive-cards td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    word-break: break-word;
  }

  .table-responsive-cards td::before {
    content: attr(data-label);
    flex: 0 0 84px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
  }

  .filter-bar {
    gap: .45rem;
  }

  .filter-bar .form-label {
    margin-bottom: .2rem;
    font-size: .78rem;
  }

  .filter-bar .form-control,
  .filter-bar .form-select {
    min-height: 38px;
    padding-top: .35rem;
    padding-bottom: .35rem;
    font-size: .9rem;
  }

  .filter-actions .btn {
    min-height: 38px;
    padding-top: .35rem;
    padding-bottom: .35rem;
  }

  .report-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .55rem;
    padding: .65rem;
  }

  .form-actions-sticky {
    bottom: .5rem;
    justify-content: stretch;
  }

  .form-actions-sticky .btn {
    flex: 1;
  }

  .logo-upload {
    grid-template-columns: 1fr;
  }

  .image-insert-grid {
    grid-template-columns: 1fr;
  }

  .birthday-notify {
    width: 100%;
  }

  .birthday-bell {
    margin-left: auto;
  }

  .birthday-panel {
    right: 0;
    width: calc(100vw - 1rem);
  }
}

@media (max-width: 420px) {
  .brand-link img {
    max-width: calc(100vw - 74px);
  }

  .brand-link span {
    display: none;
  }
}
