* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f6f9;
  --bg2: #ffffff;
  --card: #ffffff;
  --border: #e3e8ef;
  --text: #101828;
  --text2: #4b5768;
  --text3: #98a2b3;
  --primary: #186a60;
  --primary-hover: #0f4a43;
  --primary-light: #238a7d;
  --primary-bg: rgba(24, 106, 96, 0.09);
  --amber: #d97706;
  --amber-bg: rgba(217, 119, 6, 0.11);
  --sky: #0284c7;
  --sky-bg: rgba(2, 132, 199, 0.1);
  --green: #15803d;
  --green-bg: rgba(21, 128, 61, 0.1);
  --green-light: #22c55e;
  --red: #c0362c;
  --red-bg: rgba(192, 54, 44, 0.1);
  --purple: #6d28d9;
  --purple-bg: rgba(109, 40, 217, 0.1);
  --sidebar-width: 250px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.09), 0 12px 32px rgba(16, 24, 40, 0.07);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --display-font: 'Sora', var(--font-family);
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(24, 106, 96, 0.08), transparent 30rem),
    linear-gradient(135deg, #f7fafc 0%, var(--bg) 45%, #eef4f7 100%);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-name,
.display-6 {
  font-family: var(--display-font);
  letter-spacing: -0.035em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  inset: 0 auto 0 0;
  position: fixed;
  width: var(--sidebar-width);
  z-index: 20;
}

.sidebar-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 18px 16px;
}

.brand-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.brand-icon {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(24, 106, 96, 0.2);
  color: #fff;
  display: flex;
  font-family: var(--display-font);
  font-size: 13px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand-name {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.brand-name span {
  color: var(--primary);
}

.brand-tag {
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 4px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.sidebar-nav::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.nav-group-title {
  color: var(--text3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 14px 10px 7px;
  text-transform: uppercase;
}

.nav-item {
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--text2);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
  margin-bottom: 2px;
  padding: 10px 12px;
  transition: all 0.16s ease;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 800;
}

.nav-ico {
  align-items: center;
  color: currentColor;
  display: inline-flex;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  opacity: 0.78;
  width: 18px;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.user-card {
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

.user-av {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  border-radius: 10px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.user-role {
  color: var(--text3);
  font-size: 11px;
}

.live-dot {
  animation: livepulse 2s infinite;
  background: var(--green-light);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  height: 8px;
  width: 8px;
}

@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.1); }
}

.main-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h2 {
  font-size: 18px;
  margin: 0;
}

.topbar-breadcrumb {
  color: var(--text3);
  font-size: 12px;
  margin-top: 2px;
}

.content-area {
  flex: 1;
  padding: 26px 28px;
}

.breadcrumbbar {
  margin-bottom: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
  color: var(--text3);
  font-size: 12px;
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text3);
  content: "/";
  padding: 0 8px;
}

.breadcrumb-item.active {
  color: var(--primary);
}

.page-title,
.h3 {
  font-size: 25px;
  font-weight: 800;
}

.h4 {
  font-size: 18px;
}

.h5 {
  font-size: 15px;
}

.display-6 {
  color: var(--primary);
  font-size: 34px;
  font-weight: 800;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.card-body {
  flex: 1 1 auto;
  padding: 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

[class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
  position: relative;
  width: 100%;
}

.g-2 { row-gap: 10px; }
.g-3 { row-gap: 20px; }
.g-4 { row-gap: 24px; }

.col-auto { flex: 0 0 auto; width: auto; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }
.col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }

.form-label {
  color: var(--text2);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-control,
.form-select,
textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  display: block;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
  outline: none;
}

.form-check {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.form-check-input {
  accent-color: var(--primary);
  height: 16px;
  width: 16px;
}

.form-check-label {
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
}

.btn {
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.4;
  padding: 9px 16px;
  text-align: center;
  transition: all 0.15s ease;
  vertical-align: middle;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary,
.btn.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(24, 106, 96, 0.18);
  color: #fff;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-success,
.btn.btn-success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn-danger,
.btn.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-light,
.btn.btn-light,
.btn-outline-secondary,
.btn-outline-success {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text2);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-outline-danger {
  border-color: var(--red);
  color: var(--red);
}

.btn-outline-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-sm {
  border-radius: 7px;
  font-size: 12px;
  padding: 6px 10px;
}

.btn-close {
  background: transparent;
  border: 0;
  color: var(--text2);
  cursor: pointer;
  font-size: 0;
  height: 28px;
  position: relative;
  width: 28px;
}

.btn-close::before {
  content: "x";
  font-size: 18px;
  line-height: 1;
}

.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-responsive {
  overflow-x: auto;
}

.table,
table {
  border-collapse: collapse;
  color: var(--text);
  margin-bottom: 0;
  width: 100%;
}

.table th,
.table td,
th,
td {
  border-bottom: 1px solid rgba(127, 127, 127, 0.1);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th,
th {
  background: #fbfcfd;
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: transparent;
}

.table tbody tr:hover td {
  background: var(--primary-bg);
}

.table td.text-end,
.table th.text-end,
.text-end {
  text-align: right !important;
}

.badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 10px;
}

.bg-primary,
.b-primary {
  background: var(--primary-bg) !important;
  color: var(--primary) !important;
}

.bg-success,
.b-green {
  background: var(--green-bg) !important;
  color: var(--green) !important;
}

.bg-warning,
.b-amber,
.b-yellow {
  background: var(--amber-bg) !important;
  color: var(--amber) !important;
}

.bg-info,
.b-sky {
  background: var(--sky-bg) !important;
  color: var(--sky) !important;
}

.bg-danger,
.b-red {
  background: var(--red-bg) !important;
  color: var(--red) !important;
}

.bg-secondary {
  background: var(--bg) !important;
  color: var(--text2) !important;
}

.alert {
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 14px 16px;
}

.alert-success {
  background: var(--green-bg);
  border-color: rgba(21, 128, 61, 0.18);
  color: var(--green);
}

.alert-danger {
  background: var(--red-bg);
  border-color: rgba(192, 54, 44, 0.18);
  color: var(--red);
}

.list-group {
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding-left: 0;
}

.list-group-item {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  display: block;
  padding: 12px 16px;
}

.list-group-item-action:hover {
  background: var(--primary-bg);
}

.auth-wrapper {
  align-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(24, 106, 96, 0.18), transparent 26rem),
    linear-gradient(135deg, #f7fafc 0%, #eef4f7 100%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-wrapper .card {
  max-width: 420px;
  width: 100%;
}

.border,
.rounded {
  border-color: var(--border) !important;
  border-radius: var(--radius-sm) !important;
}

.bg-light { background: var(--bg) !important; }
.bg-white { background: var(--card) !important; }
.border-start { border-left: 1px solid var(--border) !important; }
.border-3 { border-left-width: 4px !important; }
.border-primary { border-left-color: var(--primary) !important; }
.border-success { border-left-color: var(--green) !important; }
.border-warning { border-left-color: var(--amber) !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.text-muted { color: var(--text3) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--green) !important; }
.text-warning { color: var(--amber) !important; }
.text-danger { color: var(--red) !important; }
.text-dark { color: var(--text) !important; }
.text-center { text-align: center !important; }
.fw-semibold { font-weight: 700 !important; }
.fw-bold { font-weight: 800 !important; }
.small { font-size: 12px !important; }
.tracking-wider { letter-spacing: 0.06em; }
.shadow-sm { box-shadow: var(--shadow) !important; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-4 { gap: 1.5rem !important; }
.d-block { display: block !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.m-b-30 { margin-bottom: 30px !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-6 { margin-top: 2rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.mx-6 { margin-left: 2rem !important; margin-right: 2rem !important; }
.ml-0 { margin-left: 0 !important; }
.ml-4 { margin-left: 1.5rem !important; }
.mr-1 { margin-right: 0.25rem !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-6 { padding: 2rem !important; }
.p-8 { padding: 3rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-6 { padding-left: 2rem !important; padding-right: 2rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pl-0 { padding-left: 0 !important; }

.close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 1.4rem;
  opacity: 0.55;
  position: absolute;
  right: 12px;
  top: 10px;
}

.media {
  align-items: flex-start;
  display: flex;
}

.media-body {
  flex: 1;
}

@media (max-width: 1100px) {
  .col-md-2,
  .col-md-3,
  .col-md-4,
  .col-md-5,
  .col-md-6,
  .col-md-8,
  .col-md-9,
  .col-lg-4,
  .col-lg-7,
  .col-lg-8,
  .col-lg-10 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .app-wrapper {
    display: block;
  }

  .sidebar {
    min-height: auto;
    position: static;
    width: 100%;
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
  }

  .nav-group-title,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    margin-bottom: 0;
    white-space: nowrap;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .content-area {
    padding: 18px 16px;
  }
}
