:root {
  --exs-bg: #f4f7fb;
  --exs-surface: rgba(255, 255, 255, 0.94);
  --exs-border: rgba(15, 23, 42, 0.08);
  --exs-text: #162033;
  --exs-muted: #64748b;
  --exs-primary: #0f8f72;
  --exs-primary-dark: #096554;
  --exs-blue: #2f6fed;
  --exs-cyan: #14b8d4;
  --exs-orange: #ff9f1c;
  --exs-rose: #ef476f;
  --exs-violet: #7757ff;
  --exs-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  --exs-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.07);
  --exs-radius-xl: 28px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--exs-text);
  background:
    radial-gradient(circle at 10% 4%, rgba(20, 184, 212, 0.26), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(15, 143, 114, 0.22), transparent 25rem),
    radial-gradient(circle at 82% 38%, rgba(255, 159, 28, 0.14), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0%, var(--exs-bg) 52%, #f8fafc 100%) !important;
}

#content {
  background:
    linear-gradient(120deg, rgba(47, 111, 237, 0.055), transparent 34%),
    linear-gradient(300deg, rgba(255, 159, 28, 0.055), transparent 38%);
}

.page-content,
main.page-content {
  animation: exsPageIn 0.35s ease both;
}

@keyframes exsPageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 74px;
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
  backdrop-filter: blur(14px);
}

.navbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--exs-primary), var(--exs-cyan), var(--exs-orange), var(--exs-rose));
  opacity: 0.75;
}

.navbar-brand {
  letter-spacing: 0.02em;
  color: var(--exs-text) !important;
}

.navbar-brand::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--exs-orange), var(--exs-rose));
  box-shadow: 0 0 0 6px rgba(255, 159, 28, 0.16);
}

#sidebar {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 48%, #eaf8f5 100%) !important;
  border-right: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.06);
}

#sidebar .brand {
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

#sidebar .menu a,
#sidebar .menu button {
  position: relative;
  color: #334155 !important;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#sidebar .menu a:hover,
#sidebar .menu button:hover {
  color: var(--exs-primary-dark) !important;
  background: linear-gradient(135deg, rgba(15, 143, 114, 0.12), rgba(20, 184, 212, 0.10)) !important;
  box-shadow: inset 3px 0 0 var(--exs-primary);
  transform: translateX(2px);
}

#sidebar .menu i {
  color: var(--exs-primary);
}

#sidebar .brand img {
  filter: drop-shadow(0 10px 18px rgba(15, 143, 114, 0.15));
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--exs-primary), var(--exs-cyan));
  box-shadow: 0 12px 22px rgba(15, 143, 114, 0.20);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--exs-primary-dark), #0ea5b7);
  box-shadow: 0 14px 26px rgba(15, 143, 114, 0.26);
  transform: translateY(-1px);
}

.btn-outline-secondary,
.btn-outline-primary {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.74);
}

.card {
  border: 1px solid var(--exs-border) !important;
  border-radius: 22px !important;
  background: var(--exs-surface);
  box-shadow: var(--exs-shadow-soft) !important;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  border-color: rgba(20, 184, 212, 0.18) !important;
  box-shadow: var(--exs-shadow) !important;
}

.card-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 20px 20px 0 0 !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92)) !important;
}

.page-content > .container > .d-flex:first-child,
main.page-content.container > .d-flex:first-child,
.page-content .container > .d-flex:first-child {
  position: relative;
  overflow: hidden;
  padding: 1.55rem 1.55rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--exs-radius-xl);
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 159, 28, 0.18), transparent 11rem),
    radial-gradient(circle at 68% 0%, rgba(20, 184, 212, 0.14), transparent 15rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(239, 253, 250, 0.86));
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.09);
}

.page-content > .container > .d-flex:first-child::before,
main.page-content.container > .d-flex:first-child::before,
.page-content .container > .d-flex:first-child::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  top: -80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 143, 114, 0.16), rgba(20, 184, 212, 0.08));
}

.page-content > .container > .d-flex:first-child::after,
main.page-content.container > .d-flex:first-child::after,
.page-content .container > .d-flex:first-child::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: 88px;
  bottom: -38px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.20), rgba(239, 71, 111, 0.12));
  transform: rotate(18deg);
}

.page-content h2,
.page-content h3 {
  color: var(--exs-text);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-content > .container > .d-flex:first-child > *,
main.page-content.container > .d-flex:first-child > *,
.page-content .container > .d-flex:first-child > * {
  position: relative;
  z-index: 1;
}

.text-muted {
  color: var(--exs-muted) !important;
}

.display-6 {
  color: var(--exs-text);
  line-height: 1;
}

.row.g-3.mb-4 > [class*="col-"] > .card,
#metricCards > [class*="col-"] > .card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.row.g-3.mb-4 > [class*="col-"] > .card .card-body,
#metricCards > [class*="col-"] > .card .card-body {
  position: relative;
  min-height: 118px;
}

.row.g-3.mb-4 > [class*="col-"] > .card .card-body::after,
#metricCards > [class*="col-"] > .card .card-body::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 20px;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 143, 114, 0.14), rgba(20, 184, 212, 0.22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(2) > .card .card-body::after,
#metricCards > [class*="col-"]:nth-child(2) > .card .card-body::after {
  background: linear-gradient(135deg, rgba(47, 111, 237, 0.14), rgba(119, 87, 255, 0.22));
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(3) > .card .card-body::after,
#metricCards > [class*="col-"]:nth-child(3) > .card .card-body::after {
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.20), rgba(239, 71, 111, 0.20));
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(4) > .card .card-body::after,
#metricCards > [class*="col-"]:nth-child(4) > .card .card-body::after {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(15, 143, 114, 0.24));
}

.row.g-3.mb-4 > [class*="col-"] > .card::before,
#metricCards > [class*="col-"] > .card::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--exs-primary), var(--exs-cyan));
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(2) > .card::before,
#metricCards > [class*="col-"]:nth-child(2) > .card::before {
  background: linear-gradient(90deg, var(--exs-blue), var(--exs-violet));
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(3) > .card::before,
#metricCards > [class*="col-"]:nth-child(3) > .card::before {
  background: linear-gradient(90deg, var(--exs-orange), var(--exs-rose));
}

.row.g-3.mb-4 > [class*="col-"]:nth-child(4) > .card::before,
#metricCards > [class*="col-"]:nth-child(4) > .card::before {
  background: linear-gradient(90deg, #22c55e, var(--exs-primary));
}

.row.g-3.mb-4 > [class*="col-"] > .card:hover,
#metricCards > [class*="col-"] > .card:hover {
  transform: translateY(-4px);
}

.progress {
  height: 13px;
  border-radius: 999px;
  background: #e6edf5;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.progress-bar {
  border-radius: 999px;
  transition: width 0.55s ease;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.24), rgba(255,255,255,0));
}

.table {
  --bs-table-bg: transparent;
  color: #233044;
}

.table thead,
.table-light {
  --bs-table-bg: #f8fbff;
  color: #0f172a;
}

.table th {
  border-bottom: 1px solid #dbe5ef !important;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.table td {
  border-color: rgba(226, 232, 240, 0.78);
}

.table-hover tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}

.table-hover tbody tr:hover {
  background: rgba(20, 184, 212, 0.07);
}

.table-responsive {
  border-radius: 18px;
}

.badge {
  border-radius: 999px;
  padding: 0.44rem 0.7rem;
  font-weight: 700;
}

.dropdown-menu {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: var(--exs-shadow);
}

.list-group-item {
  border-color: rgba(226, 232, 240, 0.78);
}

.alert {
  border: 0;
  border-radius: 16px;
  box-shadow: var(--exs-shadow-soft);
}

.form-control,
.form-select {
  border-color: rgba(148, 163, 184, 0.34);
  border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(15, 143, 114, 0.42);
  box-shadow: 0 0 0 0.22rem rgba(15, 143, 114, 0.13);
}

.mail-notes-box {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

.mail-batches-card,
.card.shadow-sm {
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08) !important;
}

#notificationList .border,
.border.rounded-3 {
  border-color: rgba(226, 232, 240, 0.86) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

#activityBody tr td:first-child,
.mail-subject,
td:first-child {
  font-weight: 650;
}

.app-footer {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(12px);
}

@media (max-width: 768px) {
  .navbar {
    min-height: 64px;
  }

  .page-content > .container > .d-flex:first-child,
  main.page-content.container > .d-flex:first-child,
  .page-content .container > .d-flex:first-child {
    padding: 1rem;
  }
}
