:root {
  --bg-1: #0b1420;
  --bg-2: #101b2a;
  --bg-3: #182b3b;
  --panel: rgba(17, 27, 38, 0.72);
  --panel-strong: rgba(21, 33, 46, 0.9);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(180, 206, 255, 0.12);
  --text: #edf4ff;
  --muted: #9db0ca;
  --primary: #69d2a6;
  --primary-deep: #2fb87d;
  --secondary: #8aceff;
  --gold: #f7c76d;
  --danger: #ff7a7a;
  --shadow: 0 22px 50px rgba(2, 7, 12, 0.34);
  --shadow-soft: 0 12px 24px rgba(10, 18, 24, 0.18);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(105, 210, 166, 0.15), transparent 35%),
    radial-gradient(circle at bottom right, rgba(116, 185, 255, 0.2), transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 40%, var(--bg-3));
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

img {
  max-width: 100%;
  display: block;
}

#app {
  min-height: 100vh;
  display: grid;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.auth-screen.hidden {
  display: none !important;
}

.glass-card {
  background: linear-gradient(180deg, rgba(21, 33, 46, 0.8), rgba(12, 19, 28, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
}

.auth-shell {
  width: min(1100px, calc(100% - 1.5rem));
  margin: auto;
  display: grid;
  gap: 1.25rem;
}

.brand-panel,
.auth-panel {
  padding: 1.4rem;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  justify-content: center;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.2), rgba(116, 185, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-logo-hero {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 28px rgba(105, 210, 166, 0.25);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-logo-hero:hover {
  transform: scale(1.04);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 35px rgba(105, 210, 166, 0.4);
}

.brand-mini-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  background: #fff;
  flex-shrink: 0;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.brand-panel h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing: -0.06em;
}

.brand-copy {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
  max-width: 320px;
}

.brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  color: var(--text);
}

.brand-features li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
}

.brand-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
}

.auth-panel {
  display: grid;
  gap: 1.2rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  transition: all 0.25s ease;
  font-weight: 600;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.25), rgba(116, 185, 255, 0.18));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-form {
  display: none;
  gap: 1rem;
}

.auth-form.active {
  display: grid;
}

.form-header {
  display: grid;
  gap: 0.35rem;
}

.form-header p {
  color: var(--muted);
}

label {
  display: grid;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
}

label span {
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 10, 17, 0.28);
  color: var(--text);
  color-scheme: dark;
  border-radius: 14px;
  padding: 0.88rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select {
  background-color: #0b1520 !important;
  color: #ffffff !important;
  color-scheme: dark !important;
}

select option,
optgroup {
  background-color: #0b1520 !important;
  color: #ffffff !important;
  color-scheme: dark !important;
  padding: 0.6rem 0.8rem;
  font-weight: 500;
}

select option:checked,
select option:hover {
  background-color: #1a324b !important;
  color: #a3e6cb !important;
}

input::placeholder {
  color: rgba(155, 174, 204, 0.8);
}

input:focus,
select:focus {
  border-color: rgba(105, 210, 166, 0.85);
  box-shadow: 0 0 0 4px rgba(105, 210, 166, 0.14);
  background: rgba(10, 18, 27, 0.42);
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.visits-layout {
  display: grid;
  gap: 1rem;
}

.primary-btn,
.text-btn,
.icon-btn,
.nav-link,
.action-card,
.notification-trigger {
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #062014;
  font-weight: 800;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 12px 26px rgba(53, 181, 125, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.text-btn:hover,
.icon-btn:hover,
.nav-link:hover,
.action-card:hover,
.notification-trigger:hover {
  transform: translateY(-1px);
}

.form-status {
  min-height: 1.25rem;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1280px, calc(100% - 1.5rem));
  margin: 1rem auto 0;
  padding: 0.85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 18, 25, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(3, 8, 14, 0.18);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mini {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.28), rgba(116, 185, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.notification-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.badge {
  position: absolute;
  top: -0.25rem;
  right: -0.15rem;
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  background: linear-gradient(135deg, #ff7a7a, #ffb275);
  color: white;
  font-weight: 700;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.28), rgba(116, 185, 255, 0.2));
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.user-chip strong {
  display: block;
  font-size: 0.9rem;
}

.user-chip small {
  color: var(--muted);
}

.dashboard-layout {
  display: grid;
  gap: 1rem;
  width: min(1280px, calc(100% - 1.5rem));
  margin: auto;
  padding: 1rem 0 1.5rem;
}

.sidebar,
.content-panel {
  min-width: 0;
}

.sidebar {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  align-self: start;
  background: rgba(12, 18, 25, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 24px;
}

.quick-actions {
  display: grid;
  gap: 0.75rem;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 16px;
  padding: 0.9rem 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.action-card.active {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.17), rgba(116, 185, 255, 0.12));
  border-color: rgba(105, 210, 166, 0.3);
  box-shadow: 0 14px 26px rgba(53, 181, 125, 0.14);
}

.mini-card {
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.compact-status {
  margin-bottom: 0.25rem;
}

.compact-status .eyebrow {
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.success-pill {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--primary);
  font-size: 0.8rem;
}

.content-panel {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.content-section {
  display: none;
  gap: 1.2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.content-section.active {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-views-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-tab-view {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-tab-view.active {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.stats-grid,
.overview-grid {
  display: grid;
  gap: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.4rem;
}

.stat-card strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.1;
}

.stat-card p {
  color: var(--muted);
}

.accent-green {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.12), rgba(105, 210, 166, 0.04));
}

.accent-blue {
  background: linear-gradient(135deg, rgba(116, 185, 255, 0.12), rgba(116, 185, 255, 0.04));
}

.accent-gold {
  background: linear-gradient(135deg, rgba(247, 199, 109, 0.1), rgba(247, 199, 109, 0.04));
}

.panel-block,
.form-card,
.booking-card {
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(17, 28, 38, 0.82), rgba(10, 17, 24, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-heading,
.booking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.badge.soft {
  position: static;
  min-width: auto;
  padding: 0.3rem 0.6rem;
  background: rgba(105, 210, 166, 0.12);
  color: var(--primary);
}

.list-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.list-stack li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.list-stack small {
  color: var(--muted);
}

.list-stack li.news-card {
  display: block;
  align-items: unset;
  justify-content: unset;
  padding: 0 !important;
  background: rgba(15, 24, 33, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(5, 12, 20, 0.22);
}

.news-card {
  display: block;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: 0 !important;
  background: linear-gradient(180deg, rgba(16, 25, 35, 0.96), rgba(11, 18, 25, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 16px 28px rgba(5, 12, 20, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 32px rgba(5, 12, 20, 0.24);
  border-color: rgba(105, 210, 166, 0.22);
}

.news-card img {
  width: 100%;
  height: clamp(180px, 26vw, 240px);
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

.news-content {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 1.1rem;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  word-break: break-word;
  overflow-wrap: anywhere;
}

.news-content > * {
  color: inherit;
}

.news-category {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(105, 210, 166, 0.14);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.news-content strong {
  display: block;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.news-content small {
  color: var(--muted);
}

.news-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.96rem;
}

.news-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.news-layout {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.visit-panel {
  display: grid;
  gap: 1rem;
}

.visit-form {
  display: grid;
  gap: 1rem;
}

.visit-list-wrap {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.visit-list-wrap h5 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.visit-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.visit-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.visit-item-who {
  min-width: 0;
}

.visit-item strong {
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.visit-item small {
  color: var(--muted);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.visit-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.visit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.visit-meta span {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.visit-entry-time {
  font-size: 0.76rem;
  color: #a3e6cb;
  font-weight: 600;
}

.visit-exit-time {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.visit-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 85px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  white-space: nowrap;
}

.visit-status.confirmed {
  background: rgba(105, 210, 166, 0.12);
  color: var(--primary);
}

.visit-status.pending {
  background: rgba(247, 199, 109, 0.12);
  color: var(--gold);
}

.visit-status.neutral {
  background: rgba(116, 185, 255, 0.12);
  color: var(--secondary);
}

.visit-status.danger {
  background: rgba(255, 122, 122, 0.15);
  color: var(--danger);
}

/* Tarjeta detallada y responsive de visita en Control de Guardia */
.admin-visit-card {
  padding: 1.1rem 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.admin-visit-card:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(247, 199, 109, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.admin-visit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-visit-who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 220px;
}

.visitor-avatar {
  font-size: 1.45rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.visitor-fullname {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.visitor-badges-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.visitor-dni-badge,
.visitor-plate-badge {
  font-size: 0.76rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 600;
}

.visitor-plate-badge {
  color: var(--gold);
  background: rgba(247, 199, 109, 0.12);
  border: 1px solid rgba(247, 199, 109, 0.25);
}

.admin-visit-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
}

.visit-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  font-weight: 600;
}

.detail-value {
  font-size: 0.88rem;
  color: #f1f5f9;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.detail-value.highlight-green {
  color: var(--primary);
}

.detail-value.highlight-gold {
  color: var(--gold);
}

.detail-value.highlight-muted {
  color: var(--muted);
}

.detail-value.pending-text {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  font-weight: 400;
}

.detail-value.inside-text {
  color: var(--primary);
  font-weight: 700;
}

.full-width-detail {
  grid-column: 1 / -1;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.admin-visit-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
}

.admin-visit-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .admin-visit-card {
    padding: 0.9rem;
    gap: 0.65rem;
  }

  .admin-visit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .admin-visit-who {
    min-width: 0;
    width: 100%;
  }

  .admin-visit-details-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  .admin-visit-footer {
    width: 100%;
  }

  .admin-visit-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.4rem;
  }

  .admin-visit-actions button {
    width: 100% !important;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }
}

.small-btn {
  width: auto;
  justify-self: flex-start;
  padding-inline: 1.1rem;
}

.form-card form,
#visitForm {
  display: grid;
  gap: 1rem;
}

.booking-header {
  flex-wrap: wrap;
}

.booking-header strong {
  display: block;
}

.booking-header small {
  color: var(--muted);
}

.booking-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
}

.booking-filter {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-filter.active {
  background: rgba(105, 210, 166, 0.12);
  border-color: rgba(105, 210, 166, 0.28);
  color: var(--primary);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.dot.free {
  background: var(--primary);
}

.dot.booked {
  background: var(--danger);
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.booking-slot {
  position: relative;
  min-height: 76px;
  display: grid;
  align-content: center;
  text-align: center;
  gap: 0.3rem;
  padding: 0.8rem 0.7rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.booking-slot.free {
  background: rgba(105, 210, 166, 0.08);
  border-color: rgba(105, 210, 166, 0.28);
}

.booking-slot.booked {
  background: rgba(255, 122, 122, 0.08);
  border-color: rgba(255, 122, 122, 0.25);
  color: #ffe3e3;
}

.booking-slot:hover {
  transform: translateY(-1px);
}

.booking-slot small {
  color: var(--muted);
}

.booking-slot.booked small {
  color: rgba(255, 255, 255, 0.7);
}

/* Backdrop & Body Lock for Notifications */
.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 15, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 38;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.notification-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

body.modal-open,
body.notification-open {
  overflow: hidden;
  touch-action: none;
}

.notification-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: min(86vw, 420px);
  height: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  padding: 1.25rem 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  transform: translateX(115%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  visibility: hidden;
  pointer-events: none;
  z-index: 40;
  border-radius: 26px 0 0 26px;
  background: linear-gradient(180deg, rgba(13, 21, 29, 0.98), rgba(7, 12, 18, 0.97));
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -18px 0 36px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  overflow: hidden;
}

.notification-panel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.panel-top,
.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.panel-top {
  margin-bottom: 0.8rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.notification-toolbar {
  margin-bottom: 1rem;
}

.text-btn {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 0.4rem 0;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0 0.35rem 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.notification-item {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.notification-item.unread {
  border-color: rgba(105, 210, 166, 0.28);
  background: rgba(105, 210, 166, 0.06);
}

.notification-item strong {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.notification-item small {
  color: var(--muted);
}

.notification-item p {
  color: var(--muted);
  line-height: 1.5;
}

.notification-item.unread strong::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(140px);
  background: rgba(8, 16, 22, 0.92);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 35;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Banner de Notificación Entrante In-App */
.incoming-notif-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-140px);
  width: min(92vw, 440px);
  z-index: 9999;
  background: rgba(18, 30, 24, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(247, 199, 109, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(247, 199, 109, 0.18);
  border-radius: 16px;
  padding: 0.8rem 1rem;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
}

.incoming-notif-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.incoming-notif-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.incoming-notif-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}

.incoming-notif-appname {
  font-weight: 700;
  color: var(--gold);
}

.incoming-notif-time {
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.8;
}

.incoming-notif-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
}

.incoming-notif-close:hover {
  color: var(--text);
}

.incoming-notif-body strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.incoming-notif-body p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 700px) {
  .news-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .overview-grid,
  .visits-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visits-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .field-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1.05fr 1.15fr;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    padding: 1rem 1.2rem 1.8rem;
  }

  .content-panel {
    width: 100%;
    max-width: 100%;
  }

  .news-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1320px) {
  .news-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .brand-panel,
  .auth-panel {
    padding: 1.05rem;
  }

  .user-chip .user-details {
    display: none;
  }

  .user-chip {
    padding: 0.25rem 0.4rem;
  }

  .topbar {
    width: calc(100% - 1.4rem) !important;
    margin: 0.7rem auto 0 !important;
    box-sizing: border-box !important;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }

  .notification-panel {
    width: 100vw;
    width: 100%;
    border-radius: 0;
    border-left: none;
    padding: 1.25rem 1rem max(1.5rem, env(safe-area-inset-bottom, 1.5rem)) 1rem;
  }

  .modal-overlay {
    padding: 0.75rem 0.5rem;
    align-items: center;
  }

  .modal-card {
    padding: 1.1rem 0.9rem;
    border-radius: 18px;
    max-height: calc(100dvh - 1.5rem);
    width: 100%;
  }

  .qr-box {
    padding: 0.8rem;
  }

  .qr-box img {
    width: min(155px, 44vw);
    height: min(155px, 44vw);
  }

  .qr-message-banner {
    padding: 0.75rem 0.85rem;
    font-size: 0.88rem;
    border-radius: 12px;
  }

  .guest-summary-table {
    padding: 0.75rem 0.85rem;
    font-size: 0.84rem;
    gap: 0.45rem;
  }

  .guest-summary-table div {
    padding-bottom: 0.3rem;
  }

  .qr-modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .qr-modal-actions .primary-btn,
  .qr-modal-actions .text-btn {
    width: 100%;
    padding: 0.75rem 0.5rem;
  }

  .expenses-summary-card {
    padding: 0.85rem;
  }

  .bank-details-box {
    padding: 0.8rem;
  }

  .bank-details-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .bank-details-grid strong {
    font-size: 0.88rem;
  }

  .expense-action-row {
    width: 100%;
  }

  .expense-action-row .primary-btn {
    width: 100%;
    text-align: center;
  }
}

/* User chip & Logout */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logout-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 0.45rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 122, 122, 0.15);
  color: var(--danger);
  border-color: rgba(255, 122, 122, 0.3);
}

.badge-mini {
  background: var(--gold);
  color: #1a1200;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Booking Toolbar & Date Selector */
.booking-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 0.8rem 0 1.2rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.date-selector-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.date-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.booking-date-input {
  width: auto;
  min-width: 145px;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  border-radius: 10px;
  color-scheme: dark;
  color: var(--text);
  background: rgba(10, 18, 27, 0.65);
  border: 1px solid rgba(105, 210, 166, 0.35);
  transition: all 0.2s ease;
}

.booking-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(105, 210, 166, 0.2);
}

/* Icono del calendario en reserva de canchas y selector de fecha: verde esmeralda con realce blanco al pasar el cursor */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.95;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2369d2a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  filter: drop-shadow(0 0 2px rgba(105, 210, 166, 0.5));
  transition: transform 0.2s ease, opacity 0.2s ease, background-image 0.2s ease, filter 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
}

.date-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.date-chip.active {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.2), rgba(116, 185, 255, 0.15));
  border-color: rgba(105, 210, 166, 0.4);
  color: var(--primary);
}

.legend .dot.mine {
  background: #a78bfa;
}

.booking-slot.my-booking {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
  color: #ede9fe;
}

.booking-slot.past {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

.cancel-booking-btn {
  margin-top: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 122, 122, 0.2);
  border: 1px solid rgba(255, 122, 122, 0.4);
  color: #ffa1a1;
  transition: all 0.18s ease;
  cursor: pointer;
}

.cancel-booking-btn:hover {
  background: rgba(255, 122, 122, 0.35);
  color: #ffffff;
}

/* Admin Bottom Nav Container & Buttons (Modulo visible arriba, navegacion abajo) */
.admin-bottom-nav-container {
  margin-top: 2rem;
  padding: 1.25rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 16px);
}

.admin-bottom-nav-header {
  margin-bottom: 0.85rem;
}

.admin-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.admin-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav-btn.active {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.22), rgba(116, 185, 255, 0.16));
  color: #fff;
  border: 1px solid rgba(105, 210, 166, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.admin-nav-btn .mini-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  font-weight: 700;
  line-height: 1;
}

.admin-tab-view {
  display: none;
}

.admin-tab-view.active {
  display: block;
}

/* Subnav inside Padrón de Vecinos */
.vecinos-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.1rem 0;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vecinos-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vecinos-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.vecinos-subnav-btn.active {
  background: rgba(247, 199, 109, 0.16);
  color: var(--gold);
  border-color: rgba(247, 199, 109, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.vecinos-subpanel {
  display: none;
}

.vecinos-subpanel.active {
  display: block;
}

/* Admin Panels Grid */
.admin-panels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1rem;
}

@media (min-width: 960px) {
  .admin-panels-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.panel-subtext {
  color: var(--muted);
  font-size: 0.85rem;
  margin: -0.4rem 0 1rem;
  line-height: 1.4;
}

.pending-users-list {
  display: grid;
  gap: 0.85rem;
}

.pending-user-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.pending-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pending-user-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.pending-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

/* Admin Padrón de Usuarios - Active Users & 3-Dots Menu */
#adminTabVecinos .panel-block,
#adminTabVecinos .glass-card,
#adminActiveUsersSubpanel,
.vecinos-subpanel {
  overflow: visible !important;
}

.active-users-list {
  display: grid;
  gap: 0.85rem;
  overflow: visible !important;
}

.active-user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  z-index: 1;
}

.active-user-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

.active-user-card.menu-open,
.active-user-card:has(.user-menu-dropdown.show) {
  z-index: 9999 !important;
  position: relative !important;
}

.active-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.active-user-text {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.active-user-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.active-user-meta-row {
  display: flex;
  align-items: center;
  gap: 0.85rem 1.35rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.active-user-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  word-break: break-word;
}

.active-user-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

/* 3-Dots Action Menu */
.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 5;
}

.user-menu-wrapper.open {
  z-index: 10000 !important;
}

.user-menu-trigger {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  outline: none;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #17212e;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.88), 0 4px 12px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  min-width: 200px;
  padding: 0.45rem;
  z-index: 100000 !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
}

.user-menu-dropdown.show {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: fadeInDown 0.15s ease-out;
}

.user-menu-dropdown.drop-up {
  top: auto;
  bottom: calc(100% + 6px);
  animation: fadeInUp 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.83rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.user-menu-item.danger {
  color: #ff8080;
}

.user-menu-item.danger:hover {
  background: rgba(255, 100, 100, 0.16);
  color: #ffa3a3;
}

.user-menu-item.disabled {
  opacity: 0.6;
  cursor: default;
  font-size: 0.78rem;
}

.user-menu-item.disabled:hover {
  background: transparent;
  color: inherit;
}

.user-menu-icon {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}

.user-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.3rem 0;
}

.success-btn {
  background: rgba(105, 210, 166, 0.18);
  border: 1px solid rgba(105, 210, 166, 0.4);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.success-btn:hover {
  background: rgba(105, 210, 166, 0.32);
}

.danger-btn {
  background: rgba(255, 122, 122, 0.15);
  border: 1px solid rgba(255, 122, 122, 0.3);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: rgba(255, 122, 122, 0.28);
}

.visit-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.btn-inline-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inline-action:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.btn-inline-action.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 122, 122, 0.4);
  background: rgba(255, 122, 122, 0.15);
}

.btn-inline-action.success:hover {
  color: var(--primary);
  border-color: rgba(105, 210, 166, 0.4);
  background: rgba(105, 210, 166, 0.15);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 15, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  box-sizing: border-box;
}

.modal-card {
  width: min(580px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: auto;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(21, 33, 46, 0.98), rgba(12, 19, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.modal-form {
  display: grid;
  gap: 1rem;
}

.modal-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 10, 17, 0.28);
  color: var(--text);
  border-radius: 14px;
  padding: 0.88rem 0.9rem;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   Main Menu Hub - Big Stacked Action Buttons
   ============================================================ */
.home-hero {
  margin-bottom: 1.6rem;
  text-align: left;
}

.home-hero h3 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  letter-spacing: -0.04em;
  margin: 0.25rem 0 0.4rem;
  color: var(--text);
}

.home-subtitle {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.main-menu-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.menu-big-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 2rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(20, 32, 45, 0.85), rgba(12, 19, 28, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 30px rgba(3, 8, 14, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.menu-big-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: transparent;
  transition: background 0.25s ease;
}

.menu-big-btn:hover {
  transform: translateY(-3px) scale(1.006);
  box-shadow: 0 18px 42px rgba(3, 8, 14, 0.4);
  border-color: rgba(255, 255, 255, 0.22);
}

.menu-big-btn:active {
  transform: translateY(-1px) scale(1.002);
}

.menu-btn-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}

.menu-btn-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, background 0.25s ease;
}

.menu-big-btn:hover .menu-btn-icon {
  transform: scale(1.08);
}

.menu-btn-text {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.menu-btn-text h4 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.menu-btn-text p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.45;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.menu-btn-arrow {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
  color: var(--muted);
  transition: all 0.25s ease;
}

.menu-big-btn:hover .menu-btn-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: translateX(5px);
}

/* Themed accents for big buttons */
.menu-big-btn.btn-booking::before {
  background: var(--primary);
}
.menu-big-btn.btn-booking:hover {
  border-color: rgba(105, 210, 166, 0.4);
}
.menu-big-btn.btn-booking .menu-btn-icon {
  background: rgba(105, 210, 166, 0.12);
  border-color: rgba(105, 210, 166, 0.25);
}

.menu-big-btn.btn-visits::before {
  background: var(--secondary);
}
.menu-big-btn.btn-visits:hover {
  border-color: rgba(138, 206, 255, 0.4);
}
.menu-big-btn.btn-visits .menu-btn-icon {
  background: rgba(138, 206, 255, 0.12);
  border-color: rgba(138, 206, 255, 0.25);
}

.menu-big-btn.btn-expenses::before {
  background: #2dd4bf;
}
.menu-big-btn.btn-expenses:hover {
  border-color: rgba(45, 212, 191, 0.45);
}
.menu-big-btn.btn-expenses .menu-btn-icon {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.25);
}

.menu-big-btn.btn-news::before {
  background: var(--gold);
}
.menu-big-btn.btn-news:hover {
  border-color: rgba(247, 199, 109, 0.4);
}
.menu-big-btn.btn-news .menu-btn-icon {
  background: rgba(247, 199, 109, 0.12);
  border-color: rgba(247, 199, 109, 0.25);
}

.menu-big-btn.btn-guard-notices::before {
  background: #f59e0b;
}
.menu-big-btn.btn-guard-notices:hover {
  border-color: rgba(245, 158, 11, 0.45);
}
.menu-big-btn.btn-guard-notices .menu-btn-icon {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.menu-big-btn.btn-admin-notices::before {
  background: #38bdf8;
}
.menu-big-btn.btn-admin-notices:hover {
  border-color: rgba(56, 189, 248, 0.45);
}
.menu-big-btn.btn-admin-notices .menu-btn-icon {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

.menu-big-btn.btn-admin::before {
  background: #c084fc;
}
.menu-big-btn.btn-admin:hover {
  border-color: rgba(192, 132, 252, 0.4);
}
.menu-big-btn.btn-admin .menu-btn-icon {
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.25);
}

/* SuperAdmin Menu Buttons */
.menu-big-btn.btn-admin-padron::before {
  background: #3b82f6;
}
.menu-big-btn.btn-admin-padron:hover {
  border-color: rgba(59, 130, 246, 0.45);
}
.menu-big-btn.btn-admin-padron .menu-btn-icon {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}

.menu-big-btn.btn-admin-guardia::before {
  background: var(--primary);
}
.menu-big-btn.btn-admin-guardia:hover {
  border-color: rgba(105, 210, 166, 0.45);
}
.menu-big-btn.btn-admin-guardia .menu-btn-icon {
  background: rgba(105, 210, 166, 0.12);
  border-color: rgba(105, 210, 166, 0.25);
}

.menu-big-btn.btn-admin-expensas::before {
  background: #2dd4bf;
}
.menu-big-btn.btn-admin-expensas:hover {
  border-color: rgba(45, 212, 191, 0.45);
}
.menu-big-btn.btn-admin-expensas .menu-btn-icon {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.25);
}

.menu-big-btn.btn-admin-canchas::before {
  background: #a855f7;
}
.menu-big-btn.btn-admin-canchas:hover {
  border-color: rgba(168, 85, 247, 0.45);
}
.menu-big-btn.btn-admin-canchas .menu-btn-icon {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.25);
}

.menu-big-btn.btn-admin-alertas::before {
  background: var(--gold);
}
.menu-big-btn.btn-admin-alertas:hover {
  border-color: rgba(247, 199, 109, 0.45);
}
.menu-big-btn.btn-admin-alertas .menu-btn-icon {
  background: rgba(247, 199, 109, 0.12);
  border-color: rgba(247, 199, 109, 0.25);
}

.menu-big-btn.btn-admin-auditoria::before {
  background: #818cf8;
}
.menu-big-btn.btn-admin-auditoria:hover {
  border-color: rgba(129, 140, 248, 0.45);
}
.menu-big-btn.btn-admin-auditoria .menu-btn-icon {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.25);
}
.menu-big-btn.btn-admin-share::before {
  background: var(--primary);
}
.menu-big-btn.btn-admin-share:hover {
  border-color: rgba(105, 210, 166, 0.45);
}
.menu-big-btn.btn-admin-share .menu-btn-icon {
  background: rgba(105, 210, 166, 0.12);
  border-color: rgba(105, 210, 166, 0.25);
}

/* Back to menu button */
.section-top-nav {
  margin-bottom: 1rem;
}

.back-to-menu-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 12px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateX(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 699px) {
  .menu-big-btn {
    padding: 1.25rem 1.2rem;
    gap: 1rem;
    border-radius: 18px;
  }
  .menu-btn-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.5rem;
    border-radius: 14px;
  }
  .menu-btn-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.1rem;
  }
}

/* Expenses Section */
.expenses-layout {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .expenses-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.expenses-summary-card {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.expense-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
  min-width: 0;
}

.expense-highlight > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.expense-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.expense-amount {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  color: #2dd4bf;
  letter-spacing: -0.03em;
  word-break: break-word;
  line-height: 1.2;
}

.expense-dates-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--muted);
  width: 100%;
  min-width: 0;
}

.expense-dates-row span {
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (min-width: 600px) {
  .expense-dates-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

.expense-dates-row strong {
  color: var(--text);
}

.expense-action-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.2rem;
  width: 100%;
}

.bank-details-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.4rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.bank-details-box h5 {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  word-break: break-word;
}

.bank-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  font-size: 0.88rem;
  width: 100%;
  max-width: 100%;
}

.bank-details-grid > div {
  min-width: 0;
  overflow: hidden;
}

.bank-details-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

.bank-details-grid strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.copyable {
  cursor: pointer;
  user-select: all;
  color: var(--secondary) !important;
}

/* History items in expenses */
.expense-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.expense-item-info {
  flex: 1 1 180px;
  min-width: 0;
}

.expense-item-info strong {
  display: block;
  word-break: break-word;
  font-size: 0.95rem;
  color: var(--text);
}

.expense-item-info small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-word;
  line-height: 1.4;
  margin-top: 0.2rem;
}

/* ============================================================
   Guest Invitation Options (Gmail & WhatsApp)
   ============================================================ */
.invite-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.invite-method-card {
  border-radius: 20px;
  padding: 1.35rem 1.4rem;
  background: linear-gradient(145deg, rgba(21, 33, 47, 0.8), rgba(12, 20, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  box-shadow: 0 10px 28px rgba(3, 8, 14, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.invite-method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(3, 8, 14, 0.45);
}

.invite-method-card.manual-card {
  border-left: 4px solid var(--secondary);
}

.invite-method-card.manual-card:hover {
  border-color: rgba(138, 206, 255, 0.45);
}

.invite-method-card.whatsapp-card {
  border-left: 4px solid #25d366;
}

.invite-method-card.whatsapp-card:hover {
  border-color: rgba(37, 211, 102, 0.45);
}

.invite-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.invite-card-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.invite-card-icon.manual-icon {
  background: rgba(138, 206, 255, 0.15);
  border: 1px solid rgba(138, 206, 255, 0.3);
}

.invite-card-icon.whatsapp-icon {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.invite-card-header h5 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.invite-card-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.invite-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.invite-action-btn {
  flex: 1 1 160px;
  min-width: 160px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.8rem 1.2rem;
  box-sizing: border-box;
}

.invite-action-btn.manual-btn {
  background: linear-gradient(135deg, #2374ad, #174f76);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(35, 116, 173, 0.35);
}

.invite-action-btn.manual-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 8px 22px rgba(35, 116, 173, 0.5);
}

.invite-action-btn.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.invite-action-btn.whatsapp-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
}

.manual-visit-toggle-wrap {
  text-align: center;
  padding: 0.75rem 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  margin-top: 0.5rem;
}

.manual-visit-toggle-wrap .text-btn {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.manual-visit-toggle-wrap .text-btn:hover {
  text-decoration: underline;
}

/* QR Pass Modal and Banners */
.qr-modal-card {
  width: min(490px, 100%);
  text-align: center;
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.2rem 0.35rem 0.5rem 0.2rem;
  scrollbar-width: thin;
}

.qr-modal-body::-webkit-scrollbar {
  width: 5px;
}

.qr-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.qr-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.qr-message-banner {
  background: linear-gradient(135deg, rgba(105, 210, 166, 0.18), rgba(138, 206, 255, 0.14));
  border: 1px solid rgba(105, 210, 166, 0.38);
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
  color: #edf4ff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(53, 181, 125, 0.18);
  text-align: center;
  flex-shrink: 0;
}

.qr-box {
  background: #ffffff;
  padding: 1rem;
  border-radius: 18px;
  display: inline-block;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.qr-box img {
  width: min(180px, 46vw);
  height: min(180px, 46vw);
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.guest-summary-table {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  text-align: left;
  display: grid;
  gap: 0.55rem;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.guest-summary-table div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.35rem;
}

.guest-summary-table div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.guest-summary-table small {
  color: var(--muted);
}

.qr-modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
  padding-bottom: 0.4rem;
  flex-shrink: 0;
}

/* Digital Receipt Upload Dropzone */
.file-upload-section {
  display: grid;
  gap: 0.35rem;
}

.file-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgba(4, 10, 17, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(105, 210, 166, 0.08);
}

.dropzone-content {
  pointer-events: none;
}

.dropzone-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.preview-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.preview-thumbnail {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumbnail span {
  font-size: 1.4rem;
}

.preview-metadata {
  min-width: 0;
}

/* Receipt Modal & Viewer */
.receipt-modal-card {
  max-width: 760px;
  width: 100%;
}

.receipt-viewer-container {
  min-height: 240px;
  max-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem;
  overflow: auto;
  position: relative;
}

.receipt-viewer-img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.receipt-viewer-img.zoomed {
  max-height: none;
  cursor: zoom-out;
  transform: scale(1.4);
  transform-origin: center top;
}

.receipt-viewer-pdf {
  width: 100%;
  height: 58vh;
  min-height: 400px;
  border: none;
  border-radius: 10px;
  background: #fff;
}

.receipt-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.btn-inline-action.view-receipt-btn {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-inline-action.view-receipt-btn:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.6);
  color: #bfdbfe;
}

/* ============================================================
   GUARD DEDICATED PANEL (@guardia) — RESPONSIVE STYLES
   ============================================================ */

/* 1. Operator Header Card */
.guard-operator-card {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(21, 33, 47, 0.9), rgba(12, 19, 28, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.guard-operator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.guard-panel-title {
  margin: 0.15rem 0 0.35rem 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.guard-operator-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.guard-operator-subtitle strong {
  color: #fff;
}

.guard-operator-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.guard-shift-badge {
  background: rgba(105, 210, 166, 0.18);
  color: var(--primary);
  border: 1px solid rgba(105, 210, 166, 0.4);
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guard-shift-change-topbar-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: rgba(255, 122, 122, 0.12);
  border: 1px solid rgba(255, 122, 122, 0.35);
  color: var(--danger);
  transition: all 0.2s ease;
}

.guard-shift-change-topbar-btn:hover {
  background: rgba(255, 122, 122, 0.25);
  border-color: var(--danger);
}

/* 2. Main Action Buttons Grid (Guard Panel) */
.guard-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.guard-action-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 28, 40, 0.65);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.guard-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.guard-action-card:active {
  transform: translateY(-1px) scale(0.99);
}

/* Individual Card Themes */
#guardScanQrBtn {
  border-color: rgba(212, 163, 89, 0.35);
  background: rgba(212, 163, 89, 0.08);
}
#guardScanQrBtn:hover {
  border-color: var(--gold) !important;
  background: rgba(212, 163, 89, 0.16) !important;
  box-shadow: 0 8px 24px rgba(212, 163, 89, 0.25);
}
#guardScanQrBtn .guard-card-badge {
  background: rgba(212, 163, 89, 0.22);
  color: var(--gold);
}

#guardSearchPlateBtn {
  border-color: rgba(105, 210, 166, 0.45);
  background: rgba(105, 210, 166, 0.1);
}
#guardSearchPlateBtn:hover {
  border-color: var(--primary) !important;
  background: rgba(105, 210, 166, 0.18) !important;
  box-shadow: 0 8px 24px rgba(105, 210, 166, 0.25);
}
#guardSearchPlateBtn .guard-card-badge {
  background: rgba(105, 210, 166, 0.25);
  color: var(--primary);
}

#guardResidentNoticesBtn {
  border-color: rgba(247, 199, 109, 0.35);
  background: rgba(247, 199, 109, 0.08);
}
#guardResidentNoticesBtn:hover {
  border-color: var(--gold) !important;
  background: rgba(247, 199, 109, 0.16) !important;
  box-shadow: 0 8px 24px rgba(247, 199, 109, 0.25);
}
#guardResidentNoticesBtn .guard-card-badge {
  background: rgba(247, 199, 109, 0.22);
  color: var(--gold);
}

/* Active card styles for view selection in Guard */
#guardSearchPlateBtn.active {
  border-color: var(--primary) !important;
  background: rgba(105, 210, 166, 0.2) !important;
  box-shadow: 0 0 0 2px rgba(105, 210, 166, 0.45), 0 10px 24px rgba(0, 0, 0, 0.5) !important;
}

#guardResidentNoticesBtn.active {
  border-color: var(--gold) !important;
  background: rgba(247, 199, 109, 0.2) !important;
  box-shadow: 0 0 0 2px rgba(247, 199, 109, 0.45), 0 10px 24px rgba(0, 0, 0, 0.5) !important;
}

.guard-view-tab-btn {
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
}

.guard-view-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.guard-view-tab-btn.active[data-guard-tab="plates"] {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(105, 210, 166, 0.18);
  box-shadow: 0 2px 10px rgba(105, 210, 166, 0.2);
}

.guard-view-tab-btn.active[data-guard-tab="notices"] {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(247, 199, 109, 0.18);
  box-shadow: 0 2px 10px rgba(247, 199, 109, 0.2);
}


#guardNotificationsBtn {
  border-color: rgba(138, 206, 255, 0.35);
  background: rgba(138, 206, 255, 0.08);
}
#guardNotificationsBtn:hover {
  border-color: var(--secondary) !important;
  background: rgba(138, 206, 255, 0.16) !important;
  box-shadow: 0 8px 24px rgba(138, 206, 255, 0.25);
}
#guardNotificationsBtn .guard-card-badge {
  background: rgba(138, 206, 255, 0.22);
  color: var(--secondary);
}

#guardShiftChangeBtn {
  border-color: rgba(255, 122, 122, 0.4);
  background: rgba(255, 122, 122, 0.08);
}
#guardShiftChangeBtn:hover {
  border-color: var(--danger) !important;
  background: rgba(255, 122, 122, 0.16) !important;
  box-shadow: 0 8px 24px rgba(255, 122, 122, 0.25);
}
#guardShiftChangeBtn .guard-card-badge {
  background: rgba(255, 122, 122, 0.22);
  color: var(--danger);
}

.guard-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.guard-card-icon {
  font-size: 2.2rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.guard-action-card:hover .guard-card-icon {
  transform: scale(1.1);
}

.guard-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.guard-card-title {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.guard-card-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.42;
}

/* 3. Search & Filter Bar */
.guard-search-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.85rem 0 1.1rem 0;
}

.guard-search-input {
  width: 100%;
  padding: 0.78rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1rem; /* 16px to prevent iOS Safari auto-zoom */
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.guard-search-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3.5px rgba(105, 210, 166, 0.22);
}

.guard-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.guard-filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.guard-subfilter-btn,
.guard-filter-tab,
.guard-notice-filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}

.guard-subfilter-btn:hover,
.guard-filter-tab:hover,
.guard-notice-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.guard-subfilter-btn.active,
.guard-filter-tab.active,
.guard-notice-filter-btn.active {
  background: rgba(212, 163, 89, 0.22) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(212, 163, 89, 0.2);
}

/* 4. Guard Visit Cards */
.guard-visit-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
  list-style: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.guard-visit-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.guard-visit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
  width: 100%;
}

.guard-visit-info {
  flex: 1 1 240px;
  min-width: 0;
}

.guard-visit-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.guard-plate-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(212, 163, 89, 0.2);
  color: var(--gold);
  border: 1px solid rgba(212, 163, 89, 0.5);
  padding: 0.25rem 0.65rem;
  letter-spacing: 0.05em;
  border-radius: 8px;
}

.guard-visitor-name {
  font-size: 1.1rem;
  color: #fff;
  display: block;
  word-break: break-word;
}

.guard-visitor-dest {
  color: var(--muted);
  font-size: 0.84rem;
  display: block;
  margin-top: 0.2rem;
  word-break: break-word;
}

.guard-visitor-dest strong {
  color: rgba(255, 255, 255, 0.85);
}

.guard-visit-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.guard-confirm-entry-btn,
.guard-confirm-exit-btn,
.guard-view-qr-btn {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.52rem 1rem;
  border-radius: 10px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.guard-confirm-entry-btn {
  background: rgba(105, 210, 166, 0.16);
  border-color: rgba(105, 210, 166, 0.45);
  color: var(--primary);
}
.guard-confirm-entry-btn:hover {
  background: rgba(105, 210, 166, 0.28);
  border-color: var(--primary);
  color: #fff;
}

.guard-confirm-exit-btn {
  background: rgba(255, 122, 122, 0.16);
  border-color: rgba(255, 122, 122, 0.45);
  color: var(--danger);
}
.guard-confirm-exit-btn:hover {
  background: rgba(255, 122, 122, 0.28);
  border-color: var(--danger);
  color: #fff;
}

.guard-view-qr-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--muted);
}
.guard-view-qr-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.guard-visit-meta {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: var(--muted);
}

/* 5. Activity Logs Stream */
.activity-logs-container {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
}

.activity-logs-container::-webkit-scrollbar {
  width: 6px;
}

.activity-logs-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.guard-log-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.guard-log-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.guard-log-info {
  flex: 1 1 auto;
  min-width: 0;
}

.guard-log-badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.guard-log-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.guard-log-detail {
  color: #fff;
  font-size: 0.83rem;
  word-break: break-word;
}

.guard-log-operator {
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
}

.guard-log-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Avisos a Guardia (Resident View & Guard Panel)
   ========================================================================== */

.guard-notice-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.notice-option-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.notice-option-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(247, 199, 109, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.notice-option-card.active {
  background: rgba(247, 199, 109, 0.12);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 24px rgba(212, 163, 89, 0.15);
}

.option-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.option-card-icon {
  font-size: 1.75rem;
}

.option-card-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.notice-option-card.active .option-card-tag {
  background: rgba(247, 199, 109, 0.2);
  color: var(--gold);
}

.option-card-title {
  font-size: 0.96rem;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.option-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.guard-notice-item-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.guard-notice-item-card.pending {
  border-left: 4px solid var(--gold);
}

.guard-notice-item-card.attended {
  border-left: 4px solid #10b981;
}

.guard-notice-item-card.exited {
  border-left: 4px solid rgba(255, 255, 255, 0.22);
}

.guard-notice-item-card.review {
  border-left: 4px solid var(--gold);
}

.guard-notice-item-card.danger {
  border-left: 4px solid #ff7a7a;
}

.notice-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.notice-item-who {
  min-width: 0;
  box-sizing: border-box;
}

.notice-item-who-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-visitor-name {
  font-size: 0.98rem;
  color: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-destination {
  font-size: 0.84rem;
  color: #fff;
  margin-top: 0.12rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-lot {
  color: var(--gold);
}

.notice-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-plate-row {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 0.1rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-plate-chip {
  font-family: monospace;
  font-size: 0.82rem;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: rgba(247, 199, 109, 0.15);
  border: 1px solid rgba(247, 199, 109, 0.3);
  color: var(--gold);
  display: inline-block;
}

.notice-item-details {
  font-size: 0.84rem;
  color: #fff;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.notice-item-times-row {
  display: flex;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  font-size: 0.83rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.notice-item-notes {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-response {
  font-size: 0.84rem;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice-item-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}

.guard-visit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-guard-actions-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   Configuración Avanzada del Sistema (Email & WhatsApp)
   ========================================================================== */

.config-status-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin: 1.1rem 0;
}

.config-service-badge-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  gap: 0.95rem;
  align-items: center;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.config-service-badge-card:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.config-badge-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.config-badge-info {
  flex: 1;
  min-width: 0;
}

.config-badge-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.config-badge-status {
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.config-badge-desc {
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-provider-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.config-provider-box {
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  padding: 0.95rem;
  height: 100%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.config-provider-box:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(105, 210, 166, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.config-provider-box.active {
  border-color: var(--primary);
  background: rgba(105, 210, 166, 0.1);
  box-shadow: 0 0 0 1px rgba(105, 210, 166, 0.45), 0 8px 24px rgba(105, 210, 166, 0.12);
}

.config-provider-box.active::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(105, 210, 166, 0.2);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.config-card-inner {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  box-sizing: border-box;
}

.config-card-inner.test-box {
  background: rgba(10, 20, 28, 0.6);
  border-color: rgba(105, 210, 166, 0.2);
}

.config-subpanel {
  display: none;
}

.config-subpanel.active {
  display: block;
  animation: fadeInSubpanel 0.22s ease-out;
}

@keyframes fadeInSubpanel {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#emailResidentsCheckboxesList label {
  transition: background 0.15s ease;
}

#emailResidentsCheckboxesList label:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* 6. Responsive Breakpoints for Guard Panel */

/* Tablet & Smaller Desktop Screens (<= 900px) */
@media (max-width: 900px) {
  .guard-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

/* Mobile Screens (<= 699px) */
@media (max-width: 699px) {
  .topbar {
    width: calc(100% - 1.2rem) !important;
    margin: 0.6rem auto 0 !important;
    padding: 0.65rem 0.85rem !important;
    box-sizing: border-box !important;
  }

  .dashboard-layout {
    width: calc(100% - 1.2rem) !important;
    max-width: calc(100% - 1.2rem) !important;
    margin: 0.65rem auto 1.5rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .content-panel,
  .content-section,
  .admin-views-container,
  .admin-tab-view,
  #homeSection,
  #adminSection,
  #guardSection,
  #visitsSection,
  #newsSection,
  #expensesSection,
  #bookingSection,
  #guardNoticesSection,
  #adminNoticesSection {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .guard-operator-card,
  .guard-buttons-grid,
  .guard-action-card,
  .panel-block,
  .glass-card,
  .visit-panel,
  #guardPlateSearchBlock,
  #guardResidentNoticesBlock,
  #guardShiftLogBlock {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .panel-block {
    padding: 0.95rem 0.9rem !important;
    border-radius: 16px !important;
  }

  .panel-heading {
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  .panel-heading h4 {
    word-break: break-word !important;
    font-size: clamp(0.95rem, 3.8vw, 1.15rem) !important;
  }

  /* Guard Operator Header */
  .guard-operator-card {
    padding: 1rem 1.1rem !important;
  }

  .guard-operator-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .guard-operator-status {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .guard-shift-change-topbar-btn {
    white-space: nowrap !important;
    padding: 0.55rem 0.9rem;
    font-size: 0.84rem;
  }

  .guard-buttons-grid {
    display: grid !important;
    grid-template-columns: 100% !important;
    gap: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .guard-action-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.05rem 1.15rem;
    gap: 0.45rem;
    border-radius: 16px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .guard-search-container,
  .guard-search-bar,
  .guard-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Filter tabs horizontal scroll */
  .guard-filter-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box !important;
  }

  .guard-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .guard-subfilter-btn,
  .guard-filter-tab,
  .guard-notice-filter-btn {
    flex-shrink: 0;
    padding: 0.42rem 0.85rem;
  }

  /* Propietarios / Mis Visitas - Invite Cards */
  .invite-methods-grid {
    grid-template-columns: 100% !important;
    gap: 0.85rem !important;
  }

  .invite-method-card {
    padding: 1.05rem 0.95rem !important;
    gap: 0.85rem !important;
    border-radius: 16px !important;
  }

  .invite-card-header {
    gap: 0.75rem !important;
  }

  .invite-card-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.5rem !important;
    border-radius: 12px !important;
  }

  .invite-card-actions {
    width: 100% !important;
  }

  .invite-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.88rem !important;
  }

  /* User Visits List & General Visit Item */
  .visit-item {
    padding: 0.75rem 0.85rem !important;
    gap: 0.5rem !important;
  }

  .visit-item-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .visit-item-who {
    width: 100% !important;
    min-width: 0 !important;
  }

  .visit-item .visit-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)) !important;
    gap: 0.4rem !important;
  }

  .visit-item .visit-actions button,
  .visit-item .visit-actions .badge {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0.45rem 0.6rem !important;
    box-sizing: border-box !important;
  }

  .visit-meta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
    padding-top: 0.45rem !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.07) !important;
    width: 100% !important;
  }

  .visit-status {
    align-self: flex-start !important;
  }

  /* Admin Control de Guardia & Garita Visit Cards */
  .guard-notice-item-card {
    padding: 0.65rem 0.8rem !important;
    gap: 0.35rem !important;
    border-radius: 12px !important;
  }

  .notice-item-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.25rem !important;
  }

  .notice-item-who {
    width: 100% !important;
    min-width: 0 !important;
  }

  .notice-item-meta {
    align-self: flex-start !important;
    font-size: 0.76rem !important;
  }

  .notice-item-plate-row {
    font-size: 0.8rem !important;
    margin-bottom: 0.05rem !important;
  }

  .notice-item-details {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.82rem !important;
  }

  .notice-item-times-row {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.35rem 1.25rem !important;
    justify-content: flex-start !important;
  }

  /* Visit Card Action Buttons on Mobile */
  .guard-visit-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
    margin-top: 0.45rem !important;
  }

  .guard-visit-actions button,
  .guard-confirm-entry-btn,
  .guard-confirm-exit-btn,
  .guard-view-qr-btn,
  .mark-ingreso-btn,
  .mark-egreso-btn,
  .admin-view-visit-qr-btn {
    width: 100% !important;
    min-height: 40px !important;
    padding: 0.55rem 0.45rem !important;
    font-size: 0.82rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* If only QR button exists, span full width */
  .guard-visit-actions > button:only-child {
    grid-column: 1 / -1 !important;
  }

  /* Admin Guard Top Action Buttons */
  .admin-guard-actions-row {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .admin-guard-actions-row button {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.55rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  /* Admin Padrón de Usuarios - Active User Cards */
  .active-user-card {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
  }

  .active-user-info {
    width: 100% !important;
    min-width: 0 !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .active-user-text {
    width: 100% !important;
    min-width: 0 !important;
    gap: 0.4rem !important;
  }

  .active-user-actions {
    width: auto !important;
    display: flex !important;
    flex-shrink: 0 !important;
  }

  /* Admin Auditoría Search & Filters */
  .audit-search-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .audit-search-controls input {
    width: 100% !important;
  }

  #adminAuditRoleFilters {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
  }

  #adminAuditRoleFilters button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.78rem !important;
  }

  /* Log items stacking on mobile */
  .guard-log-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
  }

  .guard-log-time {
    align-self: flex-end;
    font-size: 0.72rem;
    opacity: 0.85;
  }

  /* Scanner modal responsive constraint */
  #qrReaderContainer {
    min-height: 190px !important;
    max-height: 38vh !important;
  }

  #qrReader video {
    max-height: 38vh !important;
    object-fit: cover !important;
  }

  /* Admin Canchas & Avisos Toolbars */
  .admin-courts-toolbar {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .admin-courts-toolbar input[type="date"] {
    flex: 1 1 130px !important;
    min-width: 130px !important;
  }

  .admin-notices-toolbar {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)) !important;
    gap: 0.35rem !important;
  }

  .admin-notices-toolbar button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .admin-alerts-toolbar {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
  }

  .admin-alerts-toolbar button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 38px !important;
  }

  .notice-item-action-row {
    width: 100% !important;
  }

  .notice-item-action-row button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 40px !important;
  }

  /* Modal Actions on Mobile */
  .modal-actions {
    width: 100% !important;
    gap: 0.5rem !important;
  }

  /* Configuración Avanzada */
  .config-provider-selector {
    grid-template-columns: 1fr !important;
  }

  .config-status-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .config-card-inner {
    padding: 0.95rem !important;
  }
}

/* Small Screens (<= 480px) */
@media (max-width: 480px) {
  .modal-actions {
    flex-direction: column-reverse !important;
  }

  .modal-actions button {
    width: 100% !important;
    justify-content: center !important;
  }

  .date-selector-group {
    width: 100% !important;
  }

  .date-selector-group input[type="date"] {
    width: 100% !important;
  }

  .booking-filters {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .booking-filters button {
    width: 100% !important;
    text-align: center !important;
    padding: 0.45rem 0.2rem !important;
    font-size: 0.78rem !important;
  }
}

/* Extra Small Screens (<= 380px) */
@media (max-width: 380px) {
  .dashboard-layout {
    width: calc(100% - 0.75rem) !important;
    max-width: calc(100% - 0.75rem) !important;
    margin: 0.4rem auto 1.25rem !important;
    padding: 0 !important;
  }

  .topbar {
    width: calc(100% - 0.75rem) !important;
    margin: 0.4rem auto 0 !important;
    padding: 0.5rem 0.65rem !important;
  }

  .panel-block {
    padding: 0.75rem 0.65rem !important;
    border-radius: 14px !important;
  }

  .guard-action-card {
    padding: 0.85rem 0.9rem;
  }

  .guard-card-title {
    font-size: 1rem;
  }

  .admin-guard-actions-row {
    grid-template-columns: 1fr !important;
  }

  .guard-visit-actions {
    grid-template-columns: 1fr !important;
  }

  .visit-item .visit-actions {
    grid-template-columns: 1fr !important;
  }

  .active-user-actions {
    width: auto !important;
    display: flex !important;
  }

  .booking-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-courts-toolbar {
    grid-template-columns: 1fr !important;
  }
}





