:root {
  --cabys-bg: #eef4fb;
  --cabys-card: #ffffff;
  --cabys-text: #1b2a3d;
  --cabys-border: #d7e2ef;
  --cabys-shadow: 0 14px 34px rgba(13, 53, 81, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  color: var(--cabys-text);
  background:
    radial-gradient(circle at 8% 12%, rgba(13, 110, 253, 0.14), transparent 24%),
    radial-gradient(circle at 92% 24%, rgba(25, 135, 84, 0.14), transparent 18%),
    linear-gradient(180deg, #f6faff 0%, var(--cabys-bg) 100%);
}

.cabys-page {
  min-height: calc(100vh - 72px);
  padding-top: 72px;
}

.logo-container {
  height: 38px;
  width: auto;
}

.cabys-logo-pill {
  background: linear-gradient(180deg, #ffffff 0%, #edf2f8 100%);
  border-radius: 999px;
  padding: 0.24rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.cabys-session-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(115, 255, 173, 0.6);
  background: rgba(19, 222, 120, 0.16);
  color: #dbffe8;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cabys-guest-usage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 107, 0.75);
  background: rgba(255, 193, 7, 0.2);
  color: #ffefc1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dashboard-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-language-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-language-btn:hover,
.dashboard-language-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  outline: 0;
}

.dashboard-language-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.dashboard-language-flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-size: cover;
  background-position: center;
  line-height: 1;
}

.dashboard-language-flag--es {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='3' height='2' fill='%23c60b1e'/%3E%3Crect y='0.5' width='3' height='1' fill='%23ffc400'/%3E%3C/svg%3E");
}

.dashboard-language-flag--gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0,0 v30 h60 v-30 z'/%3E%3C/clipPath%3E%3Cpath d='M0,0 v30 h60 v-30 z' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23a)' stroke='%23c8102e' stroke-width='4'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23c8102e' stroke-width='6'/%3E%3C/svg%3E");
}

.cabys-main {
  padding: 1.2rem 1rem 6rem;
}

.sscon-shell {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 70%);
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 45, 90, 0.06);
}

.sscon-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(90deg, #0d6efd, #2a88ff);
  color: #ffffff;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.sscon-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.18rem;
}

.sscon-title-icon {
  font-size: 1.05rem;
}

.cabys-filter-card {
  background: var(--cabys-card);
  border: 1px solid var(--cabys-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--cabys-shadow);
}

.cabys-mode-group .btn {
  padding: 0.28rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.cabys-search-btn {
  font-weight: 700;
}

.cabys-status {
  min-height: 24px;
  font-weight: 700;
  color: #24517a;
}

.cabys-grid-wrap {
  background: var(--cabys-card);
  border: 1px solid var(--cabys-border);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: var(--cabys-shadow);
}

.cabys-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.5rem 0.65rem;
}

.cabys-grid-toolbar-left,
.cabys-grid-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cabys-grid-summary {
  font-size: 0.9rem;
  color: #204466;
  font-weight: 700;
}

.cabys-page-size-select {
  width: 76px;
}

.cabys-quick-filter {
  width: 210px;
}

.cabys-table thead th {
  background: #edf5ff;
  color: #0f3e6d;
  border-bottom-width: 1px;
}

.cabys-sort-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
}

.cabys-sort-btn-end {
  justify-content: flex-end;
  width: 100%;
}

.cabys-sort-btn:hover {
  color: #0d6efd;
}

.cabys-sort-indicator::before {
  content: '\2195';
  font-size: 0.78rem;
  opacity: 0.55;
}

.cabys-sort-btn[data-sort-direction='asc'] .cabys-sort-indicator::before {
  content: '\25B2';
  opacity: 0.95;
}

.cabys-sort-btn[data-sort-direction='desc'] .cabys-sort-indicator::before {
  content: '\25BC';
  opacity: 0.95;
}

.cabys-table td,
.cabys-table th {
  font-size: 0.95rem;
}

.cabys-table th:nth-child(1),
.cabys-table td.cabys-code {
  white-space: nowrap;
}

.cabys-table th:nth-child(2),
.cabys-table td.cabys-description {
  min-width: 620px;
  white-space: normal;
  word-break: break-word;
}

.cabys-code {
  font-family: 'Consolas', 'Courier New', monospace;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.copy-btn {
  border: 1px solid #bfd4ec;
  background: #fff;
  color: #12467a;
  border-radius: 8px;
  width: 36px;
  height: 36px;
}

.copy-btn:hover {
  background: #e8f1fb;
}

.cabys-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0.45rem 0.35rem;
}

.cabys-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cabys-page-number-btn {
  min-width: 34px;
  height: 32px;
  border: 1px solid #bfd4ec;
  background: #fff;
  color: #1c4d79;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.cabys-page-number-btn:hover {
  background: #eaf3ff;
}

.cabys-page-number-btn.is-active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.cabys-page-ellipsis {
  color: #4a6783;
  font-weight: 700;
  padding: 0 0.1rem;
}

.cabys-page-info {
  font-size: 0.9rem;
  font-weight: 700;
  color: #21486f;
  min-width: 120px;
  text-align: center;
}

#appFooter {
  margin-top: auto;
  padding: 0.75rem 0.9rem;
}

.app-footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  gap: 1rem;
  width: 100%;
}

.app-footer-left {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.app-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.15rem;
  min-width: 0;
}

.app-footer-brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #f4f7fb;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.app-footer-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-footer-site a {
  color: #ffe082;
  text-decoration: underline;
  font-size: 0.98rem;
  font-weight: 700;
}

.app-footer-location {
  color: #d8e6ee;
  font-size: 0.92rem;
}

.app-footer-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.app-footer-yummy-copy {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.yummy-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 2px solid #cfd5dd;
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #212529;
}

.yummy-cat-badge {
  font-size: 1.2rem;
}

.footer-contact-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
}

.footer-contact-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ── Yummy/Contact help modals ─────────────────────────────────────── */
.cabys-help-modal {
  display: none;
  position: fixed;
  z-index: 10020;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.cabys-help-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #b8c5d1;
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  animation: cabysHelpSlideIn 0.22s ease;
  position: relative;
}

.cabys-help-content::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 72px;
  height: 72px;
  background: #eceff1 url('https://web.sspymes.com/img/SSPyMes.png') no-repeat center / 72%;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

@keyframes cabysHelpSlideIn {
  from {
    transform: translateY(-36px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-yummy-content {
  max-width: 560px;
  padding-top: 38px;
}

.login-yummy-close,
.login-contact-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.login-yummy-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.login-yummy-header h2 {
  margin: 0 0 0.4rem;
  color: #0f4f7a;
  font-weight: 800;
  font-size: 1.5rem;
}

.login-yummy-header p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.login-yummy-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe9be 0%, #ffd166 100%);
  color: #6a4a00;
  font-size: 1.35rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.login-yummy-copy {
  color: #233649;
  line-height: 1.55;
}

.login-yummy-copy p {
  margin-bottom: 0.75rem;
}

.login-yummy-copy-closing {
  margin-bottom: 0;
  font-weight: 800;
  color: #0e3f64;
}

.login-contact-content {
  max-width: 520px;
  padding-top: 38px;
}

.login-contact-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 8px 0 0 0;
  min-height: 96px;
}

.login-contact-header-copy {
  margin-left: 104px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #edf6fa, #dfeef5);
}

.login-contact-header h2 {
  margin: 0 0 6px;
  text-align: left;
  color: #007eb0;
}

.login-contact-header p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.45;
}

.login-contact-header-icon {
  position: absolute;
  top: 38px;
  left: 22px;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eff7fb 0%, #dcecf4 100%);
  color: #2f5463;
  font-size: 24px;
  flex: 0 0 auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.login-contact-header-icon i {
  transform: rotate(-45deg);
}

.login-contact-list {
  display: grid;
  gap: 12px;
}

.contact-channels-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  color: #214455;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}

.contact-channels-item:nth-child(odd) {
  background: #ffffff;
}

.contact-channels-item:nth-child(even) {
  background: #eef2f5;
}

.contact-channels-item:hover,
.contact-channels-item:focus-visible {
  background: #e2edf2;
  color: #153544;
  transform: translateX(2px);
}

.contact-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dceef5, #f6fbfd);
  color: #2d6278;
  flex: 0 0 auto;
}

@media (max-width: 991.98px) {
  .cabys-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .cabys-grid-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cabys-grid-toolbar-right {
    flex-wrap: wrap;
  }

  .dashboard-language-switcher {
    gap: 0.25rem;
  }

  .dashboard-language-btn {
    width: 1.9rem;
    height: 1.9rem;
  }

  .cabys-session-badge {
    font-size: 0.68rem;
    padding: 0.16rem 0.45rem;
  }

  .cabys-quick-filter {
    width: 100%;
  }

  .cabys-help-content {
    margin: 10% auto;
    padding: 24px 18px;
  }

  .login-contact-header {
    min-height: auto;
    padding-top: 0;
  }

  .login-contact-header-copy {
    margin-left: 0;
    margin-top: 64px;
  }

  .login-contact-header-icon {
    top: 6px;
    left: 0;
  }

  .app-footer-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.65rem;
  }

  .app-footer-left,
  .app-footer-right {
    justify-content: center;
  }
}

/* ── Rate limit overlay ─────────────────────────────────────────────── */
.cabys-ratelimit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 25, 47, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.cabys-ratelimit-overlay.is-visible {
  display: flex;
}

.cabys-ratelimit-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 2.5rem 2.25rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.cabys-ratelimit-icon {
  font-size: 2.8rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.cabys-ratelimit-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1b2a3d;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.cabys-ratelimit-body {
  font-size: 0.92rem;
  color: #4a5568;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.cabys-ratelimit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.cabys-ratelimit-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(13, 110, 253, 0.45);
}

/* ── Guest limit overlay (12 consultas) ─────────────────────────────── */
.cabys-guestlimit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 18% 20%, rgba(13, 110, 253, 0.24), transparent 36%),
    radial-gradient(circle at 88% 80%, rgba(255, 193, 7, 0.24), transparent 32%),
    rgba(7, 18, 35, 0.9);
}

.cabys-guestlimit-card {
  width: min(980px, 100%);
  background: #ffffff;
  border-radius: 18px;
  border: 3px solid #1451b8;
  box-shadow:
    inset 0 0 0 3px #e0a810,
    0 28px 64px rgba(0, 0, 0, 0.35);
  padding: 1.4rem 1.3rem 1.2rem;
}

.cabys-guestlimit-topbrand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.cabys-guestlimit-topbrand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.cabys-guestlimit-topbrand-text {
  color: #0f3470;
  font-weight: 800;
  font-size: 1.02rem;
}

.cabys-guestlimit-title {
  margin: 0 0 0.8rem;
  text-align: center;
  color: #0f2d59;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
}

.cabys-guestlimit-text {
  margin: 0 0 0.78rem;
  text-align: center;
  color: #1f3552;
  font-size: 1rem;
  line-height: 1.55;
}

.cabys-guestlimit-text-strong {
  font-weight: 800;
  color: #153b74;
}

.cabys-guestlimit-actions {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.cabys-guestlimit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid #1451b8;
  border-radius: 999px;
  padding: 0.68rem 0.95rem;
  background: rgba(20, 81, 184, 0.03);
  color: #0d418f;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.cabys-guestlimit-btn:hover {
  color: #082952;
  background: rgba(224, 168, 16, 0.14);
  border-color: #c58f08;
  transform: translateY(-1px);
}

.cabys-guestlimit-return {
  margin: 0.72rem auto 0;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: #1e4d8f;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.cabys-guestlimit-return:hover {
  color: #0c2f5f;
}

.cabys-guestlimit-bottombrand {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cabys-guestlimit-bottombrand-logo {
  width: min(250px, 74%);
  height: auto;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .cabys-guestlimit-card {
    padding: 1rem 0.88rem;
    border-width: 2px;
    box-shadow:
      inset 0 0 0 2px #e0a810,
      0 18px 42px rgba(0, 0, 0, 0.3);
  }

  .cabys-guestlimit-title {
    font-size: 1.14rem;
  }

  .cabys-guestlimit-text {
    font-size: 0.94rem;
  }

  .cabys-guestlimit-actions {
    grid-template-columns: 1fr;
  }
}
