:root {
  color-scheme: dark;
  --bg: #08090b;
  --sidebar: #0d0e12;
  --panel: #13151a;
  --panel-2: #191c22;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f3ea;
  --muted: #a9a39a;
  --gold: #d8a84f;
  --gold-soft: rgba(216, 168, 79, 0.14);
  --purple: #8757d8;
  --ok: #45c979;
  --danger: #ff5b6b;
  --cyan: #28c5d8;
  --surface: #101216;
  --surface-2: #151820;
  --surface-3: rgba(255, 255, 255, 0.045);
  --line-soft: rgba(255, 255, 255, 0.085);
  --shadow-card: 0 1.1rem 2.8rem rgba(0, 0, 0, 0.24);
  --shadow-pop: 0 1.4rem 3.4rem rgba(0, 0, 0, 0.34);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(216, 168, 79, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(40, 197, 216, 0.055), transparent 30rem),
    linear-gradient(180deg, #08090b, #050608);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.admin-app {
  display: grid;
  grid-template-columns: 17rem 1fr;
  min-height: 100vh;
}

body.is-login .admin-app {
  grid-template-columns: 1fr;
}

body.is-login .admin-sidebar,
body.is-login .admin-main,
body.is-authenticated .login-panel {
  display: none !important;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18rem),
    var(--sidebar);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.6rem;
  padding: 0 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.admin-brand small,
.admin-topbar p,
.admin-sidebar-foot span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-crest {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: contain;
  background: #050506;
  box-shadow: 0 0.35rem 0.7rem rgba(0, 0, 0, 0.32);
}

.admin-menu {
  display: grid;
  gap: 0.38rem;
  padding: 1rem 0.7rem;
}

.admin-menu button,
.admin-sidebar-foot button,
.panel-head button,
.task-list button,
.row-actions button,
form button {
  min-height: 2.55rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  color: var(--text);
  background: transparent;
  text-align: left;
  padding: 0 0.8rem;
}

.admin-menu button:hover,
.admin-menu .is-active,
.task-list button:hover {
  color: #151009;
  background: var(--gold);
}

.admin-menu button {
  color: rgba(247, 243, 234, 0.86);
  font-weight: 750;
}

.admin-menu button:hover,
.admin-menu .is-active {
  box-shadow: 0 0.75rem 1.5rem rgba(216, 168, 79, 0.16);
}

.admin-sidebar-foot {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid var(--line-soft);
}

.admin-sidebar-foot button,
.panel-head button,
.row-actions button {
  border-color: var(--line-soft);
  text-align: center;
  background: var(--surface-3);
}

.row-actions .danger-action {
  border-color: rgba(255, 91, 107, 0.45);
  color: #ffdce1;
  background: rgba(255, 91, 107, 0.1);
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.6rem;
  padding: 0 1.35rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(16px);
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.45rem;
}

.admin-topbar p {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-user a {
  color: var(--gold);
  text-decoration: none;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 27rem);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 4rem);
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.98), rgba(8, 9, 11, 0.86) 48%, rgba(8, 9, 11, 0.72)),
    url("/assets/home/hero-contraataque.jpg") center / cover;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 28rem;
  align-self: start;
  color: var(--text);
}

.login-brand .admin-crest {
  width: 3rem;
  height: 3rem;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  font-size: 1.05rem;
}

.login-brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.login-panel form {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 26rem);
  margin-left: auto;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(19, 21, 26, 0.92);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.02;
}

.login-panel h2,
.login-panel p {
  margin: 0;
}

.login-panel p {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-copy {
  color: var(--muted);
  line-height: 1.45;
}

.login-panel a {
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.login-panel input:focus {
  outline: 2px solid rgba(216, 168, 79, 0.42);
  border-color: var(--gold);
}

.login-panel button:disabled {
  cursor: progress;
  opacity: 0.72;
}

label,
.editor-panel h2,
.panel h2,
.table-panel h2 {
  margin: 0;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.editor-panel label {
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.035);
}

.editor-panel label input,
.editor-panel label select,
.editor-panel label textarea {
  margin-top: 0.15rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  padding: 0 0.75rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(216, 168, 79, 0.28);
  border-color: rgba(216, 168, 79, 0.7);
}

option {
  color: var(--text);
  background: var(--panel);
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 243, 234, 0.48);
}

textarea {
  min-height: 5.5rem;
  padding-top: 0.7rem;
  resize: vertical;
}

form button {
  justify-content: center;
  color: #151009;
  background: var(--gold);
  text-align: center;
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 0.8rem 1.5rem rgba(216, 168, 79, 0.14);
}

.workspace {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem;
}

.toast {
  position: fixed;
  top: 5.2rem;
  right: 1.2rem;
  z-index: 10;
  max-width: 26rem;
  border: 1px solid rgba(216, 168, 79, 0.45);
  border-radius: 0.55rem;
  color: var(--text);
  background: #151107;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.module {
  display: none;
}

.module.is-active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.kpi-grid article,
.panel,
.table-panel,
.editor-panel {
  border: 1px solid var(--line-soft);
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.kpi-grid article {
  position: relative;
  overflow: hidden;
  padding: 1rem;
}

.kpi-grid article::after {
  content: "";
  position: absolute;
  right: -1.4rem;
  bottom: -1.8rem;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  background: rgba(216, 168, 79, 0.12);
}

.kpi-grid article:nth-child(2)::after {
  background: rgba(40, 197, 216, 0.12);
}

.kpi-grid article:nth-child(3)::after {
  background: rgba(135, 87, 216, 0.14);
}

.kpi-grid article:nth-child(4)::after {
  background: rgba(69, 201, 121, 0.12);
}

.kpi-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-grid strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.55rem;
  font-size: 2.05rem;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.panel,
.table-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.panel-head input {
  max-width: 18rem;
}

.table-titlebar small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.data-toolbar,
.bulk-bar,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
}

.data-toolbar input {
  flex: 1 1 18rem;
}

.data-toolbar select,
.bulk-bar select {
  width: auto;
  min-width: 11rem;
}

.data-toolbar input,
.data-toolbar select,
.bulk-bar select {
  min-height: 2.45rem;
  border-radius: 999px;
}

.bulk-bar {
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(216, 168, 79, 0.2), rgba(216, 168, 79, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.bulk-bar span {
  font-weight: 800;
}

.pagination {
  justify-content: flex-end;
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
}

.pagination span {
  color: var(--muted);
}

.pagination button,
.bulk-bar button,
.panel-head button {
  min-height: 2.25rem;
  border-radius: 999px;
  font-weight: 800;
}

.sort-button {
  min-height: auto;
  border: 0;
  color: var(--text);
  background: transparent;
  padding: 0;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: none;
}

.sort-button::after {
  content: " ↕";
  color: var(--muted);
}

.sort-button.is-asc::after {
  content: " ↑";
  color: var(--gold);
}

.sort-button.is-desc::after {
  content: " ↓";
  color: var(--gold);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(100%, 28rem);
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 16rem),
    var(--surface);
  box-shadow: -1rem 0 2.5rem rgba(0, 0, 0, 0.45);
}

.drawer form {
  display: grid;
  grid-template-rows: auto;
  align-content: start;
  gap: 0.8rem;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.drawer-head {
  position: sticky;
  top: -1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1rem -1rem 0;
  padding: 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 18, 22, 0.94);
  backdrop-filter: blur(16px);
}

.drawer-head p,
.drawer-head h2 {
  margin: 0;
}

.drawer-head p {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-head button {
  min-height: 2.35rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 0.8rem;
}

.drawer textarea {
  min-height: 7.5rem;
}

.drawer form > button[type="submit"] {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 2.8rem;
  margin: 0 -1rem calc(-1rem - env(safe-area-inset-bottom));
  border-radius: 0;
  box-shadow: 0 -0.8rem 1.6rem rgba(0, 0, 0, 0.32);
}

input[type="checkbox"] {
  width: 1rem;
  min-height: 1rem;
  accent-color: var(--gold);
}

.timeline,
.task-list {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.timeline article,
.task-list button {
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem;
}

.timeline article {
  color: var(--muted);
}

.timeline strong {
  display: block;
  color: var(--text);
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 21rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.module-grid > .editor-panel {
  position: sticky;
  top: 5.6rem;
}

.communications-grid {
  display: grid;
  gap: 1rem;
}

.communications-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  border: 0;
  background: transparent;
}

.communications-summary article {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    #101216;
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.22);
}

.communications-summary article::after {
  content: "";
  position: absolute;
  right: -1.2rem;
  bottom: -1.6rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(216, 168, 79, 0.12);
}

.communications-summary article:nth-child(2)::after {
  background: rgba(69, 201, 121, 0.13);
}

.communications-summary article:nth-child(3)::after {
  background: rgba(255, 91, 107, 0.13);
}

.communications-summary article:nth-child(4)::after {
  background: rgba(40, 197, 216, 0.13);
}

.communications-summary span,
.communication-body {
  color: var(--muted);
  font-size: 0.78rem;
}

.communications-summary strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
}

.communications-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  gap: 1rem;
  align-items: start;
}

.communications-table,
.communications-composer,
.communications-templates {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  background: #111318;
  box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.24);
}

.communications-table {
  overflow: hidden;
}

.communications-head {
  gap: 1rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 0;
}

.communications-head p {
  margin: 0 0 0.2rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.communications-filters {
  display: grid;
  gap: 0.65rem;
  padding: 0 1.1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.communications-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.communications-tabs button {
  min-height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 850;
}

.communications-tabs button:hover,
.communications-tabs button.is-selected {
  color: #151009;
  border-color: transparent;
  background: var(--gold);
}

.communications-tabs--channel button.is-selected {
  color: #041316;
  background: #28c5d8;
}

.communications-table table {
  min-width: 58rem;
  border-collapse: separate;
  border-spacing: 0 0.55rem;
  padding: 0 0.75rem 0.75rem;
}

.communications-table th {
  border: 0;
  color: rgba(247, 243, 234, 0.72);
  font-size: 0.68rem;
}

.communications-table td {
  position: relative;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
}

.communications-table tbody tr td:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  border-radius: 0.75rem 0 0 0.75rem;
  background: #28c5d8;
}

.communications-table tbody tr.is-archived td {
  background: rgba(255, 91, 107, 0.055);
}

.communications-table tbody tr.is-archived td:first-child::before {
  background: var(--danger);
}

.communications-table tbody tr td:first-child {
  width: 40%;
  border-radius: 0.75rem 0 0 0.75rem;
}

.communications-table tbody tr td:last-child {
  border-radius: 0 0.75rem 0.75rem 0;
}

.communications-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.065);
}

.communication-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.communication-main > div {
  min-width: 0;
}

.communication-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #28c5d8;
  box-shadow: 0 0 0 0.3rem rgba(40, 197, 216, 0.12);
}

.communication-dot.is-archived {
  background: var(--danger);
  box-shadow: 0 0 0 0.3rem rgba(255, 91, 107, 0.12);
}

.communication-title,
.communication-body {
  display: block;
  max-width: 42rem;
}

.communication-meta,
.communication-date {
  display: block;
  margin-top: 0.18rem;
  color: rgba(169, 163, 154, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
}

.communication-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-body {
  display: -webkit-box;
  margin-top: 0.26rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.communication-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid rgba(216, 168, 79, 0.22);
  border-radius: 999px;
  padding: 0 0.7rem;
  color: #f8d98f;
  background: rgba(216, 168, 79, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
}

.communications-side {
  position: sticky;
  top: 5.6rem;
  display: grid;
  gap: 1rem;
}

.communications-composer {
  gap: 0.85rem;
  padding: 1rem;
}

.communications-composer label {
  min-height: 2.7rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.communications-composer h2,
.communications-templates h2 {
  margin: 0;
}

.communications-composer input,
.communications-composer select,
.communications-composer textarea,
.table-tools input,
.table-tools select {
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.045);
}

.communications-composer textarea {
  min-height: 8.2rem;
}

.communication-preview {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 1px solid rgba(216, 168, 79, 0.2);
  border-radius: 0.85rem;
  padding: 0.9rem;
  background:
    linear-gradient(135deg, rgba(216, 168, 79, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.communication-preview span {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.communication-preview strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-preview p {
  display: -webkit-box;
  min-height: 2.6rem;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.communication-preview small {
  color: rgba(247, 217, 143, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
}

.communications-composer button[type="submit"] {
  min-height: 3rem;
  border-radius: 999px;
  color: #151009;
  background: var(--gold);
  text-align: center;
}

.communications-templates {
  overflow: hidden;
}

.communications-templates table {
  min-width: 0;
}

.communications-templates thead {
  display: none;
}

.communications-templates td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1rem;
}

.communications-templates tbody tr:hover td {
  background: rgba(255, 255, 255, 0.045);
}

.communications-templates td:first-child {
  width: 100%;
}

.ghost-action {
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

.communications-table .row-actions {
  justify-content: flex-end;
}

.communications-table .row-actions button,
.communications-templates button {
  min-height: 2.15rem;
  border-radius: 999px;
  padding: 0 0.75rem;
  font-size: 0.76rem;
}

.members-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.members-summary article {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 0.9rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.members-summary article::after {
  content: "";
  position: absolute;
  right: -1.2rem;
  bottom: -1.6rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(216, 168, 79, 0.12);
}

.members-summary article:nth-child(2)::after {
  background: rgba(69, 201, 121, 0.13);
}

.members-summary article:nth-child(3)::after {
  background: rgba(40, 197, 216, 0.13);
}

.members-summary article:nth-child(4)::after {
  background: rgba(135, 87, 216, 0.14);
}

.members-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.members-summary strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
}

.members-admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
}

.members-admin-grid > .editor-panel {
  grid-column: 2;
  grid-row: 1;
}

.members-table {
  grid-column: 1;
  grid-row: 1;
}

.members-table .table-titlebar p {
  margin: 0 0 0.2rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.members-table table {
  min-width: 62rem;
}

.member-row td:first-child {
  position: relative;
}

.member-row td:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  border-radius: 0.75rem 0 0 0.75rem;
  background: var(--cyan);
}

.member-row.is-archived td {
  background: rgba(255, 91, 107, 0.055);
}

.member-row.is-archived td:first-child::before {
  background: var(--danger);
}

.member-identity {
  display: grid;
  gap: 0.16rem;
}

.member-number {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid rgba(216, 168, 79, 0.22);
  border-radius: 999px;
  padding: 0 0.7rem;
  color: #f8d98f;
  background: rgba(216, 168, 79, 0.1);
  font-size: 0.75rem;
  font-weight: 850;
}

.member-composer,
#memberForm {
  gap: 0.85rem;
}

.member-preview {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 1px solid rgba(40, 197, 216, 0.2);
  border-radius: 0.85rem;
  padding: 0.9rem;
  background:
    linear-gradient(135deg, rgba(40, 197, 216, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.member-preview span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.member-preview strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.member-preview small {
  color: rgba(127, 230, 242, 0.9);
  font-size: 0.72rem;
  font-weight: 850;
}

.operations-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.operations-summary article {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 0.9rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.operations-summary article::after {
  content: "";
  position: absolute;
  right: -1.2rem;
  bottom: -1.6rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(216, 168, 79, 0.12);
}

.operations-summary article:nth-child(2)::after {
  background: rgba(69, 201, 121, 0.13);
}

.operations-summary article:nth-child(3)::after {
  background: rgba(255, 91, 107, 0.13);
}

.operations-summary article:nth-child(4)::after {
  background: rgba(40, 197, 216, 0.13);
}

.operations-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.operations-summary strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
}

.events-admin-grid,
.tickets-admin-grid,
.travels-admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
}

.events-admin-grid > .editor-panel,
.tickets-admin-grid > .editor-panel,
.travels-admin-grid > .editor-panel {
  grid-column: 2;
  grid-row: 1;
}

.events-admin-grid > .table-panel,
.tickets-admin-grid > .stacked-tables,
.travels-admin-grid > .table-panel {
  grid-column: 1;
  grid-row: 1;
}

.operation-row td:first-child {
  position: relative;
}

.operation-row td:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  border-radius: 0.75rem 0 0 0.75rem;
  background: var(--cyan);
}

.operation-row.is-archived td {
  background: rgba(255, 91, 107, 0.055);
}

.operation-row.is-archived td:first-child::before {
  background: var(--danger);
}

.operation-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid rgba(216, 168, 79, 0.22);
  border-radius: 999px;
  padding: 0 0.7rem;
  color: #f8d98f;
  background: rgba(216, 168, 79, 0.1);
  font-size: 0.75rem;
  font-weight: 850;
}

.admin-preview {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 1px solid rgba(216, 168, 79, 0.2);
  border-radius: 0.85rem;
  padding: 0.9rem;
  background:
    linear-gradient(135deg, rgba(216, 168, 79, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.admin-preview span {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-preview strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.admin-preview small {
  color: rgba(247, 217, 143, 0.9);
  font-size: 0.72rem;
  font-weight: 850;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.table-tools input,
.table-tools select {
  min-width: 12rem;
}

.empty-state {
  display: block;
  padding: 1rem 0;
  color: var(--muted);
  text-align: center;
}

.stacked-tables {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.memberships-grid {
  grid-template-columns: 18rem minmax(22rem, 1fr);
  align-items: start;
}

.memberships-grid .stacked-tables {
  grid-column: 1 / -1;
}

.memberships-grid table {
  min-width: 48rem;
}

.store-grid {
  grid-template-columns: 20rem minmax(22rem, 1fr);
  align-items: start;
}

.store-grid .stacked-tables {
  grid-column: 1 / -1;
}

.store-grid table {
  min-width: 52rem;
}

.squad-admin-grid {
  grid-template-columns: 22rem minmax(0, 1fr);
  align-items: start;
}

.squad-admin-grid table {
  min-width: 58rem;
}

.editor-panel {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: 1rem;
}

.editor-panel h2 {
  color: var(--text);
  font-size: 1.05rem;
}

.table-panel.full {
  width: 100%;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.45rem;
  padding: 0 0.75rem 0.75rem;
}

th,
td {
  padding: 0.78rem 0.9rem;
  border-bottom: 0;
  color: var(--muted);
  text-align: left;
  vertical-align: middle;
}

th {
  color: rgba(247, 243, 234, 0.72);
  font-size: 0.68rem;
  text-transform: uppercase;
}

tbody td {
  background: rgba(255, 255, 255, 0.038);
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

tbody td:first-child {
  border-radius: 0.75rem 0 0 0.75rem;
}

tbody td:last-child {
  border-radius: 0 0.75rem 0.75rem 0;
}

td strong,
td b {
  color: var(--text);
}

td small {
  display: block;
  margin-top: 0.18rem;
  color: rgba(169, 163, 154, 0.84);
  line-height: 1.35;
}

.status {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border-radius: 999px;
  padding: 0 0.65rem;
  color: #151009;
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}

.status.ok {
  color: #07150c;
  background: var(--ok);
}

.status.bad {
  color: white;
  background: var(--danger);
}

.status.wait {
  color: white;
  background: var(--purple);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.row-actions button,
.row-actions select {
  border-radius: 999px;
}

.row-actions button {
  min-height: 2.15rem;
  padding: 0 0.75rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.identity-cell {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}

.avatar-thumb {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.avatar-thumb.empty {
  display: inline-block;
}

.media-count {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 3.4rem;
  align-items: center;
  margin-top: -0.2rem;
  padding: 0.55rem;
  border: 1px dashed var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.035);
}

.media-preview-item {
  display: grid;
  gap: 0.3rem;
  width: 5.4rem;
}

.media-preview img {
  display: block;
  width: 5.4rem;
  height: 3.4rem;
  border-radius: 0.45rem;
  object-fit: cover;
}

.media-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
}

.media-actions button {
  min-height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0;
  font-size: 0.62rem;
  text-align: center;
}

.media-actions button:disabled {
  color: #151009;
  background: var(--gold);
}

.media-actions .danger-action {
  border-color: rgba(255, 91, 107, 0.45);
  color: #ffdce1;
  background: rgba(255, 91, 107, 0.1);
}

.media-preview span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.module-toggles label {
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  text-transform: none;
}

.module-toggles input {
  width: auto;
  min-height: auto;
}

.home-image-settings-grid,
.instagram-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.8rem;
}

.feature-grid legend {
  color: var(--gold);
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-grid label {
  display: flex;
  min-height: 2.2rem;
  align-items: center;
  gap: 0.45rem;
  text-transform: none;
}

.feature-grid input {
  width: auto;
  min-height: auto;
}

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

.stripe-settings-grid fieldset {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.8rem;
}

.stripe-settings-grid legend {
  color: var(--gold);
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.row-actions select {
  min-width: 9.5rem;
}

.checkin-panel {
  max-width: 52rem;
  padding: 1rem;
}

.checkin-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  margin: 1rem 0;
}

pre {
  min-height: 9rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #050609;
  color: var(--text);
  padding: 1rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .admin-app {
    grid-template-columns: 13rem 1fr;
  }

  .module-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .members-admin-grid > .editor-panel,
  .members-table,
  .events-admin-grid > .editor-panel,
  .tickets-admin-grid > .editor-panel,
  .travels-admin-grid > .editor-panel,
  .events-admin-grid > .table-panel,
  .tickets-admin-grid > .stacked-tables,
  .travels-admin-grid > .table-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .module-grid > .editor-panel {
    position: static;
  }

  .communications-side {
    position: static;
  }

  .communications-workbench {
    grid-template-columns: 1fr;
  }

  .communications-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .members-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-app {
    display: block;
  }

  body.is-login .admin-app {
    display: grid;
  }

  .login-panel {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 100dvh;
    padding: 1rem;
    background:
      linear-gradient(180deg, rgba(8, 9, 11, 0.92), rgba(8, 9, 11, 0.98)),
      url("/assets/home/hero-contraataque.jpg") center / cover;
  }

  .login-brand {
    align-self: auto;
    justify-self: center;
    justify-content: center;
    text-align: left;
  }

  .login-panel form {
    width: 100%;
    margin: 0;
  }

  .login-panel h1 {
    font-size: 1.75rem;
  }

  .admin-sidebar {
    position: sticky;
    z-index: 20;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-brand {
    min-height: 4rem;
  }

  .admin-menu {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.65rem;
  }

  .admin-menu button {
    flex: 0 0 auto;
    min-height: 2.4rem;
    white-space: nowrap;
  }

  .admin-sidebar-foot {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.65rem;
  }

  .admin-topbar {
    position: static;
    min-height: auto;
    align-items: flex-start;
    padding: 0.9rem;
  }

  .admin-user {
    display: grid;
    justify-items: end;
    gap: 0.25rem;
  }

  .workspace {
    padding: 0.75rem;
  }

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

  .kpi-grid article {
    padding: 0.8rem;
  }

  .kpi-grid strong {
    font-size: 1.5rem;
  }

  .panel-head,
  .data-toolbar,
  .bulk-bar,
  .pagination {
    align-items: stretch;
  }

  .panel-head {
    display: grid;
  }

  .panel-head input,
  .data-toolbar input,
  .data-toolbar select,
  .bulk-bar select,
  .bulk-bar button {
    max-width: none;
    width: 100%;
  }

  .table-panel {
    overflow-x: auto;
  }

  .stripe-settings-grid,
  .home-image-settings-grid,
  .instagram-settings-grid {
    grid-template-columns: 1fr;
  }

  .communications-summary,
  .members-summary,
  .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .communications-summary article,
  .members-summary article,
  .operations-summary article {
    padding: 0.85rem;
  }

  .table-tools {
    justify-content: stretch;
  }

  .table-tools input,
  .table-tools select {
    width: 100%;
  }

  table {
    min-width: 46rem;
  }

  .row-actions {
    flex-wrap: wrap;
  }

  .row-actions select,
  .row-actions button {
    flex: 1 1 9rem;
  }

  .drawer {
    inset: 0;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .kpi-grid,
  .communications-summary,
  .members-summary,
  .operations-summary {
    grid-template-columns: 1fr;
  }
}
