@import url("/css/wa-api-dashboard.css");
@import url("/css/chat.css");
@import url("/css/wa-api-admin.css");
@import url("/css/wa-api-campaigns.css");
/* =========================================================
   Theme colors
   ========================================================= */
:root {
  --brand: #128c5a;
  --brand-dark: #08734a;
  --ink: #172b24;
  --muted: #63746c;
  --surface: #ffffff;
  --page: #f5f8f6;
  --line: #e5ece8;

  --warning-text: #603b08;
  --warning-accent: #9a6108;
  --warning-background: #fff4d6;
  --warning-border: #f1d58c;
}

/* =========================================================
   Page foundation
   ========================================================= */
html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

/* =========================================================
   Navigation bar
   ========================================================= */
.navbar {
  padding: 0.9rem 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.navbar-brand {
  color: var(--ink) !important;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-product {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.navbar .nav-link {
  padding: 0.6rem 0.8rem !important;
  color: #42564c !important;
  font-size: 0.94rem;
  font-weight: 550;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--brand) !important;
}

.navbar-toggler {
  border-color: var(--line);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(18, 140, 90, 0.15);
}

/* Navigation dropdown menus */
.dropdown-menu {
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(21, 48, 35, 0.1);
}

.dropdown-item {
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
}

/* =========================================================
   Primary buttons
   ========================================================= */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 9px;
  font-weight: 650;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-main:hover,
.btn-main:focus {
  color: #fff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(18, 140, 90, 0.18);
}

/* =========================================================
   Shared sections and cards
   ========================================================= */
.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 48, 35, 0.045);
}

/* =========================================================
   Subscription warning notices
   ========================================================= */
.subscription-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.9rem max(1rem, calc((100vw - 1140px) / 2));
  color: var(--warning-text);
  background: var(--warning-background);
  border-bottom: 1px solid var(--warning-border);
}

/* Free or expired account warning */
.subscription-notice--action {
  background: #fff4d6;
}

/* Subscription expiry warning */
.subscription-notice--expiring {
  background: #fff8e7;
}

/* Notice message and icon layout */
.subscription-notice__message {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.subscription-notice__icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--warning-accent);
  background: #ffe7a3;
  border-radius: 11px;
  font-size: 1rem;
}

/* Notice title and supporting text */
.subscription-notice__message strong,
.subscription-notice__message small {
  display: block;
}

.subscription-notice__message strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.subscription-notice__message small {
  margin-top: 0.18rem;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.9;
}

/* Notice action buttons */
.subscription-notice__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
}

.subscription-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.subscription-button:hover {
  transform: translateY(-1px);
}

/* Main pricing and renewal actions */
.subscription-button--primary,
.subscription-button--renew {
  flex: 0 0 auto;
  color: #fff;
  background: #a86608;
}

.subscription-button--primary:hover,
.subscription-button--renew:hover {
  color: #fff;
  background: #855205;
}

/* Secondary action for entering a license key */
.subscription-button--light {
  color: #76500d;
  background: rgba(255, 255, 255, 0.65);
  border-color: #dfc780;
}

.subscription-button--light:hover {
  color: var(--warning-text);
  background: #fff;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 3rem 0 1.25rem;
  color: #c4d2ca;
  background: #14271f;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: start;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 750;
  text-decoration: none;
}

.footer-logo img {
  object-fit: contain;
}

.footer-brand p,
.footer-location p {
  margin: 0.75rem 0 0;
  color: #a7b9ae;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #c4d2ca;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #7ce0ae;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  color: #91a59a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
}

/* =========================================================
   Notifications
   ========================================================= */
.notification-container {
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  transform: translate(-50%, -50%);
}

.notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 260px;
  max-width: 360px;
  padding: 0.85rem 1rem;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

.notification.success {
  background: #16834f;
}

.notification.error {
  background: #c74747;
}

.notification.warning {
  background: #c4841b;
}

.notification.info {
  background: #3267a8;
}

.notification button {
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   Dashboard table and compact controls
   ========================================================= */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.agent-table-card .table-responsive table {
  min-width: 700px;
}
.table-sm th,
.table-sm td {
  padding: 3px 6px;
  font-size: 12px;
}

.btn-sm {
  padding: 2px 6px;
  font-size: 12px;
}

.small {
  font-size: 12px;
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes slideIn {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    transform: translateY(-8px);
    opacity: 0;
  }
}

/* =========================================================
   Shared responsive adjustments
   ========================================================= */
@media (max-width: 991px) {
  .navbar-nav {
    text-align: center;
  }

  .navbar .btn-main {
    margin: 0.4rem auto;
  }

  .section {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .agent-account {
    justify-content: center;
    margin: 0.5rem auto;
  }
}

@media (max-width: 767px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .subscription-notice {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .subscription-notice__actions {
    width: 100%;
    flex-wrap: wrap;
    padding-left: calc(38px + 0.8rem);
  }

  .subscription-button--renew {
    margin-left: calc(38px + 0.8rem);
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Signed-in agent name in the shared site navigation
   ========================================================= */
.agent-account {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.35rem 0.75rem 0.35rem 0;
  padding: 0.4rem 0.7rem;
  color: #315343;
  background: #edf7f1;
  border: 1px solid #dcece2;
  border-radius: 10px;
}

.agent-account > i {
  color: var(--brand);
  font-size: 1.2rem;
}

.agent-account small,
.agent-account strong {
  display: block;
}

.agent-account small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.agent-account strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Agent dashboard layout
   ========================================================= */
.agent-dashboard {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.agent-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.agent-welcome h1 {
  margin: 0;
  color: var(--ink, #172b24);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.agent-welcome p,
.agent-section__heading p {
  margin: 0.45rem 0 0;
  color: var(--muted, #63746c);
}

.agent-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  color: var(--brand, #128c5a);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.agent-logout,
.agent-open-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.agent-logout {
  min-height: 42px;
  padding: 0.6rem 0.9rem;
  color: #a23d3d;
  background: #fff;
  border: 1px solid #efdada;
}

.agent-logout:hover {
  color: #842f2f;
  background: #fff4f4;
  border-color: #e8caca;
}

/* =========================================================
   Agent profile card
   ========================================================= */
.agent-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1.15rem 1.3rem;
  background: #fff;
  border: 1px solid var(--line, #e5ece8);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 48, 35, 0.045);
}

.agent-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--brand, #128c5a);
  background: #eaf7ef;
  border-radius: 14px;
  font-size: 1.35rem;
}

.agent-profile__details {
  min-width: 0;
}

.agent-profile__label,
.agent-profile__details strong,
.agent-profile__email {
  display: block;
}

.agent-profile__label {
  color: var(--muted, #63746c);
  font-size: 0.73rem;
}

.agent-profile__details strong {
  overflow: hidden;
  color: var(--ink, #172b24);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-profile__email {
  margin-top: 0.1rem;
  color: var(--muted, #63746c);
  font-size: 0.82rem;
}

.agent-online {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.4rem 0.65rem;
  color: #26744c;
  background: #edf8f1;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}

.agent-online > span,
.agent-status > span {
  width: 7px;
  height: 7px;
  background: #28a568;
  border-radius: 50%;
}

/* =========================================================
   Dashboard sections
   ========================================================= */
.agent-section {
  margin-top: 2rem;
}

.agent-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.agent-section__heading .agent-eyebrow {
  margin-bottom: 0.3rem;
}

.agent-section__heading h2 {
  margin: 0;
  color: var(--ink, #172b24);
  font-size: 1.2rem;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.agent-section__heading p {
  font-size: 0.88rem;
}

.agent-count {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #26744c;
  background: #edf8f1;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 750;
}

/* Assigned phone numbers and chats cards */
.agent-number-card,
.agent-table-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #e5ece8);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 48, 35, 0.045);
}

.agent-number-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1.15rem;
}

.agent-number {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  color: #286143;
  background: #f0f8f3;
  border: 1px solid #dcece2;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 650;
}

.agent-number i {
  color: var(--brand, #128c5a);
  font-size: 1rem;
}

/* =========================================================
   Live chat table
   ========================================================= */
.agent-chat-table {
  --bs-table-bg: #fff;
  --bs-table-hover-bg: #f7faf8;
  margin: 0;
}

.agent-chat-table thead th {
  padding: 0.9rem 1rem;
  color: #6a7b72;
  background: #f7faf8;
  border-bottom: 1px solid var(--line, #e5ece8);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.agent-chat-table tbody td {
  padding: 0.9rem 1rem;
  border-color: #edf1ee;
  font-size: 0.86rem;
}

.agent-table-muted {
  color: #718078;
  font-size: 0.82rem;
}

.agent-customer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #263d31;
  font-weight: 650;
  text-decoration: none;
}

.agent-customer-link i {
  color: #8ba095;
  font-size: 1rem;
}

.agent-customer-link:hover {
  color: var(--brand, #128c5a);
}

.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  color: #52665a;
  background: #f1f5f2;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
}

.agent-status > span {
  width: 6px;
  height: 6px;
  background: #a0ada5;
}

.agent-open-chat {
  padding: 0.48rem 0.7rem;
  color: #18764e;
  background: #edf8f1;
}

.agent-open-chat:hover {
  color: #fff;
  background: var(--brand, #128c5a);
  transform: translateY(-1px);
}

/* =========================================================
   Empty states
   ========================================================= */
.agent-empty {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem 1rem;
  color: var(--muted, #63746c);
  text-align: center;
}

.agent-empty--compact {
  min-height: 90px;
  flex-direction: row;
  gap: 0.6rem;
  padding: 1rem;
  font-size: 0.88rem;
}

.agent-empty > i {
  margin-bottom: 0.7rem;
  color: #9aaca1;
  font-size: 1.4rem;
}

.agent-empty__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 0.8rem;
  color: #6f8979;
  background: #eef5f0;
  border-radius: 15px;
  font-size: 1.3rem;
}

.agent-empty strong {
  color: #344b3e;
  font-size: 0.95rem;
}

.agent-empty p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

/* =========================================================
   DataTables search, length, and pagination controls
   ========================================================= */
.agent-table-card .dataTables_wrapper {
  padding: 1rem;
}

.agent-table-card .dataTables_wrapper .dataTables_filter,
.agent-table-card .dataTables_wrapper .dataTables_length {
  margin-bottom: 1rem;
  color: #63746c;
  font-size: 0.84rem;
}

.agent-table-card .dataTables_wrapper .dataTables_filter input,
.agent-table-card .dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  margin-left: 0.4rem;
  padding: 0.4rem 0.7rem;
  color: #263d31;
  background: #fff;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  outline: none;
}

.agent-table-card .dataTables_wrapper .dataTables_filter input:focus,
.agent-table-card .dataTables_wrapper .dataTables_length select:focus {
  border-color: #128c5a;
  box-shadow: 0 0 0 3px rgba(18, 140, 90, 0.12);
}

.agent-table-card .dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 1rem !important;
}

.agent-table-card .dataTables_wrapper .dataTables_paginate .paginate_button {
  min-width: 36px;
  height: 36px;
  margin: 0 !important;
  padding: 0.45rem 0.7rem !important;
  color: #42564c !important;
  background: #fff !important;
  border: 1px solid #e2eae5 !important;
  border-radius: 8px !important;
  font-size: 0.82rem;
  line-height: 1.2;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.agent-table-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #08734a !important;
  background: #edf7f1 !important;
  border-color: #cce4d4 !important;
}

.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current,
.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current:hover {
  color: #fff !important;
  background: #128c5a !important;
  border-color: #128c5a !important;
}

.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled,
.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled:hover {
  color: #a3afa8 !important;
  background: #f7f9f8 !important;
  border-color: #edf1ee !important;
  cursor: default;
}

.agent-table-card .dataTables_wrapper .dataTables_info {
  padding-top: 1rem !important;
  color: #718078 !important;
  font-size: 0.8rem;
}

/* =========================================================
   Agent dashboard responsive adjustments
   ========================================================= */
@media (max-width: 767px) {
  .agent-dashboard {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .agent-welcome {
    align-items: flex-start;
  }

  .agent-welcome p {
    max-width: 34ch;
    font-size: 0.9rem;
  }

  .agent-section__heading {
    align-items: center;
  }

  .agent-chat-table thead th,
  .agent-chat-table tbody td {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}

@media (max-width: 575px) {
  .agent-table-card .dataTables_wrapper .dataTables_paginate {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .agent-welcome {
    flex-direction: column;
    gap: 1rem;
  }

  .agent-logout {
    min-height: 38px;
  }

  .agent-profile {
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .agent-online {
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
  }

  .agent-number-list {
    padding: 0.85rem;
  }

  .agent-table-card .dataTables_wrapper {
    padding: 0.75rem;
  }
}
/* Main navigation links */
.main-nav {
  gap: 0.25rem;
}

.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus,
.main-nav .nav-link.show {
  color: var(--brand) !important;
  background: #edf7f1;
}

.main-nav .nav-link i {
  color: #779083;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav .nav-link:hover i,
.main-nav .nav-link:focus i,
.main-nav .nav-link.show i {
  color: var(--brand);
}

/* Navigation dropdowns */
.main-nav .dropdown-menu {
  min-width: 220px;
  margin-top: 0.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(21, 48, 35, 0.12);
}

.main-nav .dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: #42564c;
  font-size: 0.9rem;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.main-nav .dropdown-item i {
  color: #779083;
}

.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
  color: var(--brand-dark);
  background: #edf7f1;
}

.main-nav .dropdown-item:hover i,
.main-nav .dropdown-item:focus i {
  color: var(--brand);
}

@media (max-width: 991px) {
  .main-nav {
    gap: 0.15rem;
  }

  .main-nav .nav-link {
    justify-content: center;
    padding: 0.7rem 0.8rem !important;
  }

  .main-nav .dropdown-menu {
    margin: 0.25rem auto 0.5rem;
    text-align: left;
  }
}
/* Right-side account navigation */
.account-nav {
  gap: 0.2rem;
}

.account-nav__link,
.account-nav__logout,
.account-nav__agent {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9px;
}

.account-nav__link:hover,
.account-nav__agent:hover {
  background: #edf7f1;
}

.account-nav__logout {
  margin-left: 0.25rem;
}

.account-nav__logout:hover {
  color: #a23d3d !important;
  background: #fff3f3;
}

.account-nav__logout i,
.account-nav__agent i {
  font-size: 0.95rem;
}

.account-nav__cta {
  min-height: 42px;
  padding: 0.65rem 1rem;
  white-space: nowrap;
}

@media (max-width: 991px) {
  .account-nav {
    align-items: stretch !important;
  }

  .account-nav__link,
  .account-nav__logout,
  .account-nav__agent {
    justify-content: center;
    padding: 0.7rem 0.8rem !important;
  }

  .account-nav__logout {
    margin-left: 0;
  }

  .account-nav__cta {
    width: 100%;
  }
}
/* Login form */

.login-form--compact {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  max-width: 390px;
  margin-right: auto;
  margin-left: auto;
}

.login-form--compact .login-form__field label {
  display: block;
  margin-bottom: 0.35rem;
  color: #344b3e;
  font-size: 0.82rem;
  font-weight: 650;
}

.login-form--compact .login-form__input-wrap {
  position: relative;
}

.login-form--compact .login-form__input-wrap > i {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  color: #829187;
  font-size: 0.9rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-form--compact .login-form__input-wrap .form-control {
  min-height: 42px;
  padding: 0.55rem 0.75rem 0.55rem 2.25rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  font-size: 0.88rem;
  box-shadow: 0 2px 5px rgba(25, 55, 38, 0.025);
}

.login-form--compact .login-form__input-wrap .form-control::placeholder {
  color: #a0aaa4;
}

.login-form--compact .login-form__input-wrap .form-control:focus {
  border-color: #69b58b;
  box-shadow: 0 0 0 3px rgba(18, 140, 90, 0.1);
}

.login-form--compact .login-form__submit {
  width: auto;
  min-height: 40px;
  justify-self: center;
  margin-top: 0.15rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

/* =========================================================
   Agents management page
   ========================================================= */
.agents-page {
  padding-bottom: 4rem;
}

.agents-page__heading {
  margin-bottom: 1.5rem;
}

.agents-page__heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.agents-page__heading p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.agents-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.agents-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 48, 35, 0.045);
}

.agents-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid #edf1ee;
}

.agents-card__header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 720;
}

.agents-card__header p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.agents-card__icon,
.agents-count {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--brand);
  background: #edf7f1;
  border-radius: 12px;
  font-size: 1.05rem;
}

.agents-count {
  font-size: 0.86rem;
  font-weight: 750;
}

.agents-card__body {
  padding: 1.35rem;
}

.agents-card .form-label {
  margin-bottom: 0.4rem;
  color: #40564a;
  font-size: 0.8rem;
  font-weight: 650;
}

.agents-card .form-control {
  min-height: 42px;
  border-color: #dfe8e2;
  border-radius: 8px;
  font-size: 0.88rem;
}

.agents-card .form-control:focus {
  border-color: #69b58b;
  box-shadow: 0 0 0 3px rgba(18, 140, 90, 0.1);
}

.agents-submit {
  min-height: 40px;
  border-radius: 8px;
  font-size: 0.86rem;
}

/* Agent name and email cell */
.agent-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 190px;
}

.agent-identity__avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--brand);
  background: #edf7f1;
  border-radius: 11px;
  font-size: 1rem;
}

.agent-identity__details strong,
.agent-identity__details small {
  display: block;
}

.agent-identity__details strong {
  color: #263d31;
  font-size: 0.86rem;
  font-weight: 650;
}

.agent-identity__details small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.77rem;
}

/* Agent status and assigned-number count */
.agent-state,
.agent-number-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.6rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 650;
  white-space: nowrap;
}

.agent-state > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.agent-state--active {
  color: #26744c;
  background: #edf8f1;
}

.agent-state--active > span {
  background: #28a568;
}

.agent-state--inactive {
  color: #69756e;
  background: #f0f2f1;
}

.agent-state--inactive > span {
  background: #9ca8a1;
}

.agent-number-count {
  color: #375b45;
  background: #f1f6f2;
}

/* Agents table */
.agents-table {
  --bs-table-bg: #fff;
  --bs-table-hover-bg: #f7faf8;
  min-width: 760px;
}

.agents-table thead th {
  padding: 0.8rem 1rem;
  color: #718078;
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.agents-table tbody td {
  padding: 0.8rem 1rem;
  border-color: #edf1ee;
  font-size: 0.84rem;
}

.agent-date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Agent row actions */
.agent-actions {
  display: inline-flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 300px;
}

.agent-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.35rem 0.55rem;
  background: #fff;
  border: 1px solid #e2eae5;
  border-radius: 7px;
  font-size: 0.73rem;
  font-weight: 650;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.agent-action--numbers,
.agent-action--edit {
  color: #286143;
}

.agent-action--numbers:hover,
.agent-action--edit:hover {
  color: #08734a;
  background: #edf7f1;
  border-color: #cce4d4;
}

.agent-action--toggle {
  color: #8a610e;
}

.agent-action--toggle:hover {
  color: #704b06;
  background: #fff8e7;
  border-color: #f1d58c;
}

.agent-action--delete {
  color: #a23d3d;
}

.agent-action--delete:hover {
  color: #842f2f;
  background: #fff3f3;
  border-color: #efdada;
}

/* Empty table state */
.agents-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  text-align: center;
}

.agents-empty__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 0.8rem;
  color: #6f8979;
  background: #eef5f0;
  border-radius: 15px;
  font-size: 1.25rem;
}

.agents-empty strong {
  color: #344b3e;
  font-size: 0.95rem;
}

.agents-empty p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Agent modals */
.agents-modal {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(20, 45, 31, 0.18);
}

.agents-modal .modal-header,
.agents-modal .modal-footer {
  padding: 1.15rem 1.35rem;
  border-color: #edf1ee;
}

.agents-modal .modal-title {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 720;
}

.agents-modal .modal-body {
  padding: 1.35rem;
}

.agents-modal .form-label {
  color: #40564a;
  font-size: 0.82rem;
  font-weight: 650;
}

.agents-modal__help {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.assigned-numbers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.assigned-number {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.75rem;
  color: #385544;
  background: #f8faf8;
  border: 1px solid #e5ece8;
  border-radius: 9px;
  font-size: 0.86rem;
  cursor: pointer;
}

.assigned-number:has(input:checked) {
  background: #edf7f1;
  border-color: #b9ddc7;
}

.assigned-number input {
  accent-color: var(--brand);
}

.assigned-number i {
  color: var(--brand);
}

.assigned-number span {
  overflow-wrap: anywhere;
}

.assigned-numbers-loading,
.assigned-numbers-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

/* DataTables search, length, and pagination controls */
.agent-table-card .dataTables_wrapper {
  padding: 1rem;
}

.agent-table-card .dataTables_wrapper .dataTables_filter,
.agent-table-card .dataTables_wrapper .dataTables_length {
  margin-bottom: 1rem;
  color: #63746c;
  font-size: 0.84rem;
}

.agent-table-card .dataTables_wrapper .dataTables_filter input,
.agent-table-card .dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  margin-left: 0.4rem;
  padding: 0.4rem 0.7rem;
  color: #263d31;
  background: #fff;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  outline: none;
}

.agent-table-card .dataTables_wrapper .dataTables_filter input:focus,
.agent-table-card .dataTables_wrapper .dataTables_length select:focus {
  border-color: #128c5a;
  box-shadow: 0 0 0 3px rgba(18, 140, 90, 0.12);
}

.agent-table-card .dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 1rem !important;
}

.agent-table-card .dataTables_wrapper .dataTables_paginate .paginate_button {
  min-width: 36px;
  height: 36px;
  margin: 0 !important;
  padding: 0.45rem 0.7rem !important;
  color: #42564c !important;
  background: #fff !important;
  border: 1px solid #e2eae5 !important;
  border-radius: 8px !important;
  font-size: 0.82rem;
  line-height: 1.2;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.agent-table-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #08734a !important;
  background: #edf7f1 !important;
  border-color: #cce4d4 !important;
}

.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current,
.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current:hover {
  color: #fff !important;
  background: #128c5a !important;
  border-color: #128c5a !important;
}

.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled,
.agent-table-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled:hover {
  color: #a3afa8 !important;
  background: #f7f9f8 !important;
  border-color: #edf1ee !important;
  cursor: default;
}

.agent-table-card .dataTables_wrapper .dataTables_info {
  padding-top: 1rem !important;
  color: #718078 !important;
  font-size: 0.8rem;
}

@media (max-width: 767px) {
  .agents-page {
    padding-bottom: 2.5rem;
  }

  .agents-card__header,
  .agents-card__body {
    padding: 1rem;
  }

  .agent-actions {
    min-width: 270px;
  }
}

@media (max-width: 575px) {
  .agent-table-card .dataTables_wrapper .dataTables_paginate {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
/* Dynamically loaded template rows */
#templatesTable tbody tr {
  transition: background-color 0.15s ease;
}

#templatesTable tbody tr:hover {
  background: #f7faf8;
}

#templatesTable .template-select-cell {
  width: 64px;
  text-align: center;
}

#templatesTable input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand, #128c5a);
  cursor: pointer;
}

#templatesTable input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.template-name {
  color: #263d31;
  font-weight: 650;
}

.template-meta,
.template-category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  color: #52665a;
  background: #f1f5f2;
  border-radius: 6px;
  font-size: 0.77rem;
  white-space: nowrap;
}

.template-preview {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  color: #687970;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.template-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
}

.template-status--approved {
  color: #26744c;
  background: #edf8f1;
}

.template-status--rejected {
  color: #a23d3d;
  background: #fff0f0;
}

.template-status--pending {
  color: #8a610e;
  background: #fff8e7;
}

.template-status--other {
  color: #607369;
  background: #f1f5f2;
}