:root {
  --relay-primary: #32b651;
  --relay-primary-dark: #238a3b;
  --relay-primary-soft: #e9f8ee;
  --relay-info: #0891b2;
  --relay-info-soft: #e6f7fb;
  --relay-warning: #b7791f;
  --relay-warning-soft: #fff7df;
  --relay-danger: #dc3545;
  --relay-danger-soft: #fff0f2;
  --relay-ink: #1d2433;
  --relay-muted: #6b7280;
  --relay-border: #e7eaef;
  --relay-surface: #ffffff;
  --relay-soft: #f6f8fb;
}

body {
  color: var(--relay-ink);
}

.main-btn,
.btn {
  border-radius: 8px;
  letter-spacing: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.main-btn:hover,
.btn:hover {
  transform: translateY(-1px);
}

.primary-btn,
.auth-submit,
.dataTables_wrapper .pagination .page-item.active .page-link {
  border-color: var(--relay-primary) !important;
  background: var(--relay-primary) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(50, 182, 81, 0.22);
}

.primary-btn:hover,
.primary-btn:focus,
.auth-submit:hover,
.auth-submit:focus {
  border-color: var(--relay-primary-dark) !important;
  background: var(--relay-primary-dark) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(35, 138, 59, 0.26);
}

.menu-toggle-action {
  width: 48px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.menu-toggle-action i {
  margin: 0;
  font-size: 18px;
}

.relay-sidebar.sidebar-nav-wrapper {
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 0 14px 18px;
  border-right: 1px solid var(--relay-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  box-shadow: 10px 0 30px rgba(29, 36, 51, 0.04);
}

.relay-sidebar .relay-sidebar-logo {
  height: auto;
  margin: 0 -14px 18px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--relay-border);
  justify-content: flex-start !important;
}

.relay-sidebar .relay-sidebar-logo a {
  display: inline-flex;
  align-items: center;
}

.relay-sidebar .relay-sidebar-logo img {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.relay-sidebar .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(50, 182, 81, 0.48) transparent;
  scrollbar-width: thin;
}

.relay-sidebar .sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.relay-sidebar .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.relay-sidebar .sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(50, 182, 81, 0.34);
}

.relay-sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(50, 182, 81, 0.62);
}

.relay-sidebar .sidebar-nav ul {
  padding: 0;
}

.relay-sidebar .sidebar-nav ul .nav-item {
  margin-bottom: 8px;
}

.relay-sidebar .sidebar-nav ul .nav-item a {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #667085;
  font-weight: 700;
  letter-spacing: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.relay-sidebar .sidebar-nav ul .nav-item a:hover {
  border-color: var(--relay-border);
  background: #fff;
  color: var(--relay-ink);
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(29, 36, 51, 0.05);
}

.relay-sidebar .sidebar-nav ul .nav-item a .icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 10px 0 0;
  border-radius: 8px;
  background: #f3f6f8;
  color: #667085;
}

.relay-sidebar .sidebar-nav ul .nav-item a .icon .material-icons-outlined {
  font-size: 20px;
  line-height: 1;
}

.relay-sidebar .sidebar-nav ul .nav-item a span.text {
  line-height: 1;
}

.relay-sidebar .sidebar-nav ul .nav-item.active > a,
.relay-sidebar .sidebar-nav ul .nav-item.active > a.collapsed {
  border-color: rgba(50, 182, 81, 0.18);
  background: var(--relay-primary-soft);
  color: var(--relay-primary-dark);
  box-shadow: 0 10px 24px rgba(50, 182, 81, 0.12);
}

.relay-sidebar .sidebar-nav ul .nav-item.active > a .icon,
.relay-sidebar .sidebar-nav ul .nav-item.active > a.collapsed .icon {
  background: var(--relay-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(50, 182, 81, 0.24);
}

.relay-sidebar .sidebar-nav ul .nav-item:hover > a .icon,
.relay-sidebar .sidebar-nav ul .nav-item:hover > a.collapsed .icon {
  color: var(--relay-primary);
}

.relay-sidebar .sidebar-nav ul .nav-item.active:hover > a .icon,
.relay-sidebar .sidebar-nav ul .nav-item.active:hover > a.collapsed .icon {
  color: #fff;
}

.relay-sidebar-footer {
  min-height: 64px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--relay-border);
  border-radius: 8px;
  background: #fff;
  color: var(--relay-ink);
}

.relay-sidebar-footer > .material-icons-outlined {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--relay-primary-soft);
  color: var(--relay-primary-dark);
  font-size: 19px;
}

.relay-sidebar-footer strong,
.relay-sidebar-footer small {
  display: block;
  line-height: 1.2;
}

.relay-sidebar-footer strong {
  font-size: 13px;
  font-weight: 800;
}

.relay-sidebar-footer small {
  margin-top: 3px;
  color: var(--relay-muted);
  font-size: 12px;
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 15%, rgba(50, 182, 81, 0.18), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(73, 190, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #f8fbf8 0%, #eef7f1 48%, #f8fafc 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 16px;
}

.auth-panel {
  width: min(1060px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(29, 36, 51, 0.12);
}

.auth-brand {
  height: 100%;
  min-height: 560px;
  padding: 44px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(24, 95, 49, 0.94), rgba(50, 182, 81, 0.9)),
    url("../images/auth/signin-image.svg") center bottom 34px / 74% auto no-repeat;
}

.auth-logo {
  width: 160px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
}

.auth-brand h1 {
  max-width: 420px;
  margin-top: 56px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-brand p {
  max-width: 430px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.auth-card {
  padding: 48px;
}

.auth-card h2 {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 700;
}

.auth-card .form-label {
  color: #394150;
  font-weight: 600;
}

.auth-card .form-control {
  min-height: 48px;
  border-color: var(--relay-border);
  border-radius: 8px;
  color: var(--relay-ink);
}

.auth-card .form-control:focus {
  border-color: var(--relay-primary);
  box-shadow: 0 0 0 4px rgba(50, 182, 81, 0.14);
}

.auth-submit {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--relay-primary);
  font-weight: 700;
}

.auth-submit:hover,
.auth-submit:focus {
  background: var(--relay-primary-dark);
}

.auth-switch a {
  color: var(--relay-primary-dark);
  font-weight: 700;
}

.page-card {
  border: 1px solid var(--relay-border);
  border-radius: 8px;
  background: var(--relay-surface);
  box-shadow: 0 12px 36px rgba(29, 36, 51, 0.06);
}

.page-card-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--relay-border);
}

.page-card-body {
  padding: 24px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title-row h2 {
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 700;
}

.page-title-row p {
  margin: 0;
  color: var(--relay-muted);
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border: 1px solid var(--relay-border);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbf6 100%);
  box-shadow: 0 12px 32px rgba(29, 36, 51, 0.06);
}

.stat-card .icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(50, 182, 81, 0.12);
  color: var(--relay-primary);
  font-size: 26px;
}

.stat-card h3 {
  font-size: 34px;
  line-height: 1;
}

.relay-table {
  width: 100%;
  vertical-align: middle;
}

.relay-table thead th {
  border-bottom: 1px solid var(--relay-border) !important;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.relay-table tbody td {
  border-color: var(--relay-border);
}

.action-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.action-btn .material-icons-outlined {
  font-size: 19px;
  line-height: 1;
}

.action-btn-view {
  border-color: rgba(8, 145, 178, 0.18);
  background: var(--relay-info-soft);
  color: var(--relay-info);
}

.action-btn-view:hover,
.action-btn-view:focus {
  border-color: var(--relay-info);
  background: var(--relay-info);
  color: #fff;
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.2);
}

.action-btn-edit {
  border-color: rgba(183, 121, 31, 0.18);
  background: var(--relay-warning-soft);
  color: var(--relay-warning);
}

.action-btn-edit:hover,
.action-btn-edit:focus {
  border-color: var(--relay-warning);
  background: var(--relay-warning);
  color: #fff;
  box-shadow: 0 8px 18px rgba(183, 121, 31, 0.2);
}

.action-btn-delete {
  border-color: rgba(220, 53, 69, 0.18);
  background: var(--relay-danger-soft);
  color: var(--relay-danger);
}

.action-btn-delete:hover,
.action-btn-delete:focus {
  border-color: var(--relay-danger);
  background: var(--relay-danger);
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 53, 69, 0.2);
}

.dataTables_wrapper .dataTables_paginate .pagination {
  gap: 6px;
}

.dataTables_wrapper .pagination .page-link {
  min-width: 36px;
  border: 1px solid var(--relay-border);
  border-radius: 8px !important;
  color: #475569;
  text-align: center;
}

.dataTables_wrapper .pagination .page-link:hover {
  border-color: var(--relay-primary);
  background: var(--relay-primary-soft);
  color: var(--relay-primary-dark);
}

.dataTables_wrapper .pagination .page-item.disabled .page-link {
  background: #f8fafc;
  color: #94a3b8;
}

.form-shell {
  max-width: 980px;
}

.form-shell .card,
.profile-shell .card {
  border: 1px solid var(--relay-border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(29, 36, 51, 0.06) !important;
}

.form-card {
  overflow: hidden;
  background: #fff;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--relay-border);
  background: linear-gradient(135deg, #ffffff 0%, #f3fbf5 100%);
  color: var(--relay-ink);
}

.form-card-header h5 {
  color: var(--relay-ink);
  font-size: 20px;
  font-weight: 700;
}

.form-card-header p {
  color: var(--relay-muted);
  font-size: 14px;
}

.form-header-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--relay-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(50, 182, 81, 0.24);
}

.form-header-icon .material-icons-outlined {
  font-size: 23px;
}

.form-card-body {
  padding: 28px 24px 24px;
}

.form-shell .form-label,
.profile-shell .form-label {
  margin-bottom: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.form-shell .form-control,
.form-shell .form-select,
.profile-shell .form-control {
  min-height: 48px;
  border-color: var(--relay-border);
  border-radius: 8px;
  color: var(--relay-ink);
  background-color: #fbfcfe;
  box-shadow: none;
}

.form-shell .form-control::placeholder {
  color: #98a2b3;
}

.form-shell .form-control:focus,
.form-shell .form-select:focus {
  border-color: var(--relay-primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(50, 182, 81, 0.12);
}

.profile-shell .form-control[readonly] {
  background-color: #f8fafc;
  color: #344054;
}

.form-shell input[type="file"].form-control {
  padding: 10px 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--relay-border);
}

.form-actions .main-btn,
.form-actions .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 700;
}

.form-actions .material-icons-outlined {
  font-size: 18px;
}

.btn-soft-secondary {
  border: 1px solid var(--relay-border);
  background: #fff;
  color: #475569;
}

.btn-soft-secondary:hover,
.btn-soft-secondary:focus {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--relay-ink);
}

.profile-image-preview {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 1px solid var(--relay-border);
  border-radius: 8px;
}

@media (max-width: 991.98px) {
  .relay-sidebar.sidebar-nav-wrapper {
    box-shadow: 16px 0 40px rgba(29, 36, 51, 0.14);
  }

  .auth-brand {
    min-height: auto;
    padding: 28px;
    background: linear-gradient(135deg, rgba(24, 95, 49, 0.96), rgba(50, 182, 81, 0.92));
  }

  .auth-brand h1 {
    margin-top: 28px;
  }

  .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 575.98px) {
  .auth-shell {
    padding: 16px;
  }

  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-card-header,
  .page-card-body {
    padding: 18px;
  }
}
