/* Admin sidebar */
.admin-sidebar-modern {
  background: #f8fafc !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08) !important;
}
.admin-sidebar-modern,
.admin-sidebar-modern .sidebar {
  border-radius: 0 !important;
}
.admin-sidebar-modern .admin-sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 5.5rem;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
.admin-sidebar-modern .admin-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 3.8rem;
  width: 3.8rem !important;
  height: 3.8rem !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}
.admin-sidebar-modern .brand-link .brand-image,
.admin-sidebar-modern .admin-brand-mark img {
  float: none !important;
  width: 3.2rem !important;
  height: 3.2rem !important;
  max-height: 3.2rem !important;
  margin: 0 !important;
  padding: 0.1rem !important;
  object-fit: contain;
  opacity: 1 !important;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
}
.admin-sidebar-modern .admin-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin-left: 0.75rem;
  line-height: 1.1;
}
.admin-sidebar-modern .admin-brand-name {
  color: #0f172a;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}
.admin-sidebar-modern .admin-brand-role {
  color: #64748b;
  font-size: 0.72rem !important;
  font-weight: 700;
  text-transform: uppercase;
}
.admin-sidebar-modern .admin-sidebar-body {
  padding: 0.8rem 0.75rem 1rem !important;
}
.admin-sidebar-modern .admin-sidebar-intro {
  padding: 0.75rem 0.8rem !important;
  margin-bottom: 0.55rem !important;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}
.admin-sidebar-modern .admin-sidebar-intro strong {
  display: block;
  color: #0f172a !important;
  font-size: 1rem !important;
  line-height: 1.15;
}
.admin-sidebar-modern .admin-sidebar-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: #0f766e;
  font-size: 0.68rem !important;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-sidebar-modern .nav-sidebar > .nav-header {
  margin: 1rem 0 0.4rem !important;
  padding: 0 0.65rem !important;
  color: #94a3b8 !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}
.admin-sidebar-modern .nav-sidebar > .nav-item {
  margin-bottom: 0.18rem !important;
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link {
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.5rem 0.65rem !important;
  color: #334155 !important;
  border-radius: 0.55rem !important;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link:hover {
  background: #eef6f5 !important;
  color: #0f172a !important;
  transform: translateX(2px);
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link > .nav-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2rem !important;
  height: 2rem !important;
  margin-right: 0.65rem !important;
  color: #0f766e !important;
  background: #e0f2f1;
  border-radius: 0.48rem !important;
  font-size: 0.9rem !important;
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link p {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  color: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.1;
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link.active {
  background: #0f766e !important;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.22);
}
.admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link.active > .nav-icon {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}
.admin-sidebar-modern .nav-sidebar .badge.right {
  position: static;
  margin-left: auto;
  padding: 0.22rem 0.42rem !important;
  border-radius: 999px !important;
  font-size: 0.68rem !important;
}
.admin-sidebar-modern .admin-sidebar-logout {
  margin-top: 1rem !important;
  padding-top: 0.7rem !important;
  border-top: 1px solid #e2e8f0;
}
.admin-sidebar-modern .admin-sidebar-logout > .nav-link {
  color: #b91c1c !important;
}
.admin-sidebar-modern .admin-sidebar-logout > .nav-link > .nav-icon {
  color: #b91c1c !important;
  background: #fee2e2 !important;
}
.sidebar-collapse .admin-sidebar-modern .admin-sidebar-intro,
.sidebar-collapse .admin-sidebar-modern .nav-header,
.sidebar-collapse .admin-sidebar-modern .admin-brand-copy {
  display: none !important;
}
.sidebar-collapse .admin-sidebar-modern .admin-sidebar-brand {
  justify-content: center;
  padding-right: 0.5rem !important;
  padding-left: 0.5rem !important;
}
.sidebar-collapse .admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link {
  justify-content: center;
  padding-right: 0.35rem !important;
  padding-left: 0.35rem !important;
}
.sidebar-collapse .admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link > .nav-icon {
  margin-right: 0 !important;
}

/* Dashboard */
.app-page,
.dashboard-page {
  background: #eef3f8;
  min-height: calc(100vh - 4rem);
}
.app-shell,
.dashboard-shell {
  padding: 1.25rem 0 2rem;
}
.app-hero,
.dashboard-hero {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  border-radius: 0.85rem !important;
}
.app-eyebrow,
.dashboard-eyebrow {
  display: block;
  color: #0f766e;
  font-size: 0.72rem !important;
  font-weight: 800;
  text-transform: uppercase;
}
.app-title,
.dashboard-title {
  margin: 0.15rem 0 0;
  color: #0f172a;
  font-size: 1.55rem !important;
  font-weight: 800;
  line-height: 1.15;
}
.app-subtitle,
.dashboard-subtitle {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.92rem !important;
}
.app-hero-meta,
.dashboard-date {
  min-width: 10.5rem;
  padding: 0.75rem 0.9rem;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  text-align: right;
  border-radius: 0.75rem !important;
}
.app-hero-meta strong,
.dashboard-date strong {
  display: block;
  color: #14532d !important;
  font-size: 1rem !important;
}
.app-hero-meta span,
.dashboard-date span {
  font-size: 0.75rem !important;
  font-weight: 700;
  text-transform: uppercase;
}
.app-panel,
.dashboard-panel {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-radius: 0.85rem !important;
  padding: 1rem;
  margin-bottom: 1rem;
}
.metric-card,
.stat-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 8.5rem;
  padding: 1.05rem 1rem 1rem;
  margin-bottom: 1rem;
  color: #0f172a !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0f766e;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-radius: 0.8rem !important;
}
.metric-card::after,
.stat-card::after {
  content: "";
  position: absolute;
  right: -2.25rem;
  top: -2.25rem;
  width: 5.5rem;
  height: 5.5rem;
  background: rgba(15, 118, 110, 0.08);
  border-radius: 999px !important;
}
.metric-card:hover,
.stat-card:hover {
  color: #0f172a !important;
  border-color: #0f766e;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transform: translateY(-3px);
}
.metric-card .metric-top,
.stat-card .stat-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.metric-card .metric-icon,
.stat-card .stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 0.7rem !important;
  font-size: 1rem !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}
.metric-card .metric-value,
.stat-card .stat-value {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0.2rem;
  color: #0f172a;
  font-size: 2.05rem !important;
  font-weight: 900;
  line-height: 1;
}
.metric-card .metric-label,
.stat-card .stat-label {
  color: #334155;
  font-size: 1.15rem !important;
  font-weight: 900;
  text-transform: uppercase;
}
.metric-card.metric-blue,
.stat-card.stat-blue {
  border-left-color: #1d4ed8;
}
.metric-card.metric-blue .metric-icon,
.stat-card.stat-blue .stat-icon {
  color: #1d4ed8;
  background: #dbeafe;
}
.metric-card.metric-blue::after,
.stat-card.stat-blue::after {
  background: rgba(29, 78, 216, 0.09);
}
.metric-card.metric-green,
.stat-card.stat-green {
  border-left-color: #15803d;
}
.metric-card.metric-green .metric-icon,
.stat-card.stat-green .stat-icon {
  color: #15803d;
  background: #dcfce7;
}
.metric-card.metric-green::after,
.stat-card.stat-green::after {
  background: rgba(21, 128, 61, 0.09);
}
.metric-card.metric-orange,
.stat-card.stat-orange {
  border-left-color: #c2410c;
}
.metric-card.metric-orange .metric-icon,
.stat-card.stat-orange .stat-icon {
  color: #c2410c;
  background: #ffedd5;
}
.metric-card.metric-orange::after,
.stat-card.stat-orange::after {
  background: rgba(194, 65, 12, 0.1);
}
.metric-card.metric-red,
.stat-card.stat-red {
  border-left-color: #b91c1c;
}
.metric-card.metric-red .metric-icon,
.stat-card.stat-red .stat-icon {
  color: #b91c1c;
  background: #fee2e2;
}
.metric-card.metric-red::after,
.stat-card.stat-red::after {
  background: rgba(185, 28, 28, 0.09);
}
.app-filter,
.filter-form {
  align-items: center;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  border-radius: 0.85rem !important;
}
.app-filter .form-control,
.filter-form .form-control {
  min-height: 2.65rem;
  border-color: #cbd5e1;
  border-radius: 0.55rem !important;
}
.app-filter .btn,
.filter-form .btn {
  min-height: 2.65rem;
  border-radius: 0.55rem !important;
  font-weight: 800;
}
.section-title,
.app-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.1rem 0 0.75rem;
  color: #0f172a;
  font-size: 1.05rem !important;
  font-weight: 800;
}
.record-card,
.data-list-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 12rem;
  padding: 1rem;
  margin-bottom: 1rem;
  color: inherit !important;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid #0f766e;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-radius: 0.8rem !important;
}
.record-card:hover,
.data-list-card:hover {
  border-color: #0f766e;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
  transform: translateY(-3px);
}
.record-meta,
.complaint-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.record-status,
.complaint-status {
  max-width: 50%;
  white-space: normal;
  line-height: 1.1;
  text-align: right;
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.record-label,
.complaint-label {
  display: block;
  color: #475569;
  font-size: 0.72rem !important;
  font-weight: 900;
  text-transform: uppercase;
}
.record-value,
.complaint-value {
  display: block;
  color: #0f172a !important;
  font-size: 1rem !important;
  font-weight: 900;
  line-height: 1.25;
}
.record-muted,
.complaint-address {
  display: block;
  margin-top: 0.25rem;
  color: #475569;
  font-size: 0.8rem !important;
  line-height: 1.25;
}
.record-detail-box {
  padding: 0.75rem;
  margin: 0.85rem 0 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem !important;
}
.app-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.app-toolbar .btn {
  flex: 0 0 auto;
}
.app-heading,
.app-sub-heading {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0f766e;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  padding: 0.65rem 0.8rem !important;
  border-radius: 0.65rem !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
}
.app-info-card,
.data-list {
  display: block;
  background: #ffffff !important;
  border: 1px solid #d6dee9;
  border-left: 4px solid #dbeafe;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.07) !important;
  padding: 0.75rem !important;
  margin-bottom: 0.65rem !important;
  border-radius: 0.65rem !important;
}
.app-info-card .text-grey,
.data-list .text-grey {
  color: #64748b !important;
  font-weight: 800 !important;
}
.app-info-card .bold,
.data-list .bold {
  color: #0f172a !important;
  font-weight: 900 !important;
}
.app-form-grid label {
  color: #334155;
  font-size: 0.78rem !important;
  font-weight: 900;
  text-transform: uppercase;
}
.app-form-grid .form-control {
  border-color: #cbd5e1;
  border-radius: 0.55rem !important;
}
.app-table {
  background: #ffffff;
  border: 1px solid #d6dee9;
  border-radius: 0.65rem !important;
  overflow: hidden;
}
.app-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d6dee9;
  background: #ffffff;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.07);
}
.app-table-wrap .table {
  margin-bottom: 0 !important;
  min-width: 820px;
}
.app-table-wrap.is-scrollable {
  max-height: 400px;
  overflow: auto;
}
.app-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
.app-table th {
  color: #475569;
  font-size: 0.75rem !important;
  font-weight: 900;
  text-transform: uppercase;
}
.app-table td {
  color: #0f172a;
  font-weight: 800;
}
.app-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.app-offer-card {
  padding: 0.85rem;
  margin-bottom: 0.35rem;
  background: #ffffff;
  border: 1px solid #d6dee9;
  border-left: 4px solid #1d4ed8;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  border-radius: 0.65rem !important;
}
.app-offer-card.is-disabled {
  opacity: 0.58;
  filter: grayscale(1);
  cursor: not-allowed;
}
.app-offer-icon {
  min-width: 40px;
}
.app-form-message {
  font-weight: 600;
}
.app-success-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #eef3f8;
  color: #0f172a;
  font-family: Arial, sans-serif;
  text-align: center;
}
.app-success-box {
  width: min(92vw, 420px);
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  border-radius: 1rem !important;
}
.app-success-box i {
  color: #15803d;
  font-size: 3rem;
}
.chat-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12) !important;
  border-radius: 0.85rem !important;
}
.chat-box .chat-area {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
}
.call-mini-btn {
  font-size: 0.6rem !important;
  margin-top: -1.4rem !important;
}
.chat-state {
  font-size: 1rem !important;
}
.chat-note {
  margin-top: 0.5rem !important;
}
.chat-time {
  font-size: 0.85rem !important;
}
.chat-message-own {
  background-color: #ecf5ff !important;
  margin-left: 3rem !important;
}
.chat-message-other {
  background-color: #ecfffb !important;
  margin-right: 3rem !important;
}
.send-again-btn {
  margin-top: -2.3rem !important;
}
.mb-reset {
  margin-bottom: 0 !important;
}
.pagination-wrapper {
  margin-top: 1rem;
}
.pagination {
  justify-content: center;
  flex-wrap: wrap;
}
.page-item.active .page-link {
  background-color: #0f766e;
  border-color: #0f766e;
}
.page-link {
  color: #0f766e;
  font-weight: 700;
}

@media (min-width: 992px) {
  .admin-sidebar-modern {
    width: 260px !important;
  }
  body:not(.sidebar-collapse) .content-wrapper,
  body:not(.sidebar-collapse) .main-footer,
  body:not(.sidebar-collapse) .main-header {
    margin-left: 260px !important;
  }
  .sidebar-collapse .admin-sidebar-modern {
    width: 4.6rem !important;
  }
  .sidebar-collapse .admin-sidebar-modern:hover {
    width: 260px !important;
  }
  .sidebar-collapse .admin-sidebar-modern:hover .admin-sidebar-intro,
  .sidebar-collapse .admin-sidebar-modern:hover .nav-header,
  .sidebar-collapse .admin-sidebar-modern:hover .admin-brand-copy {
    display: block !important;
  }
  .sidebar-collapse .admin-sidebar-modern:hover .admin-sidebar-brand {
    justify-content: flex-start;
    padding-right: 0.95rem !important;
    padding-left: 0.95rem !important;
  }
  .sidebar-collapse .admin-sidebar-modern:hover .nav-sidebar > .nav-item > .nav-link {
    justify-content: flex-start;
    padding-right: 0.65rem !important;
    padding-left: 0.65rem !important;
  }
  .sidebar-collapse .admin-sidebar-modern:hover .nav-sidebar > .nav-item > .nav-link > .nav-icon {
    margin-right: 0.65rem !important;
  }
}
@media (max-width: 991.98px) {
  .main-header,
  .content-wrapper,
  .main-footer {
    margin-left: 0 !important;
  }
  .admin-sidebar-modern {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(86vw, 290px) !important;
    max-width: 290px;
    transform: translateX(-105%);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    z-index: 1045 !important;
  }
  .sidebar-open .admin-sidebar-modern {
    transform: translateX(0);
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18) !important;
  }
  .admin-sidebar-modern .admin-sidebar-brand {
    min-height: 4rem;
  }
  .admin-sidebar-modern .admin-sidebar-body {
    height: calc(100vh - 4rem);
    overflow-y: auto;
    padding-bottom: 1.25rem !important;
  }
  .admin-sidebar-modern .nav-sidebar > .nav-header {
    margin-top: 0.8rem !important;
  }
  .admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link {
    min-height: 2.55rem;
  }
  .sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 1040;
    pointer-events: none;
  }
}
@media (max-width: 768px) {
  .content {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  .container-fluid {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  .app-panel,
  .dashboard-panel {
    padding: 0.55rem !important;
  }
  .record-card,
  .data-list-card,
  .app-info-card,
  .data-list {
    padding: 0.65rem !important;
  }
  .app-filter,
  .filter-form {
    padding: 0.65rem !important;
  }
  .row {
    margin-left: -0.35rem !important;
    margin-right: -0.35rem !important;
  }
  .row > [class*="col-"] {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  .dashboard-shell {
    padding-top: 0.75rem;
  }
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }
  .dashboard-date {
    width: 100%;
    text-align: left;
  }
  .filter-form .col-md-5,
  .filter-form .col-md-2,
  .app-filter [class*="col-"] {
    margin-bottom: 10px;
  }
}
@media (max-width: 576px) {
  .content,
  .container-fluid {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  .app-panel,
  .dashboard-panel {
    padding: 0.4rem !important;
  }
  .record-card,
  .data-list-card,
  .app-info-card,
  .data-list {
    padding: 0.55rem !important;
    margin-bottom: 0.55rem !important;
  }
  .metric-card {
    min-height: 7.5rem;
  }
  .metric-card .metric-value {
    font-size: 1.6rem !important;
  }
  .pagination .page-link {
    padding: 0.38rem 0.5rem;
    font-size: 0.8rem !important;
  }
}
@media (max-width: 360px) {
  .admin-sidebar-modern {
    width: 90vw !important;
  }
  .admin-sidebar-modern .admin-brand-name,
  .admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link p {
    font-size: 0.84rem !important;
  }
  .admin-sidebar-modern .nav-sidebar > .nav-item > .nav-link > .nav-icon {
    width: 1.85rem !important;
    height: 1.85rem !important;
    margin-right: 0.5rem !important;
  }
}
