:root {
  --app-color-default: #2f6f4f;
  --app-color-dark: #163328;
  --app-color-accent: #d6b36a;
  --app-color-cream: #f7f3ea;
  --app-color-surface: rgba(255, 255, 255, 0.82);
  --app-color-line: rgba(24, 51, 40, 0.12);
  --app-shadow-lg: 0 24px 60px rgba(22, 51, 40, 0.12);
  --app-shadow-md: 0 16px 40px rgba(22, 51, 40, 0.08);
}

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

body,
html {
  overflow-x: hidden;
  font-family: 'Source Sans 3', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 179, 106, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(47, 111, 79, 0.14), transparent 32%),
    linear-gradient(180deg, #f8f6f0 0%, #eef5ef 100%);
  color: #1d2d27;
}

h1, h2, h3, h4, h5, h6, .navbar-title, .section-title {
  font-family: 'Sora', sans-serif;
}

.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper {
  background: transparent;
}

.soft-panel,
.card,
.modal-content,
.login-box {
  background: var(--app-color-surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--app-color-line);
  box-shadow: var(--app-shadow-md);
  border-radius: 24px;
}

.sidebar-shell {
  background: linear-gradient(180deg, #17372b 0%, #204735 100%) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}

.sidebar-shell .menu-inner > .menu-item .menu-link,
.sidebar-shell .menu-icon,
.sidebar-shell .app-brand {
  color: rgba(255,255,255,0.92) !important;
}

.sidebar-shell .menu-inner > .menu-item.active > .menu-link {
  background: linear-gradient(90deg, rgba(214, 179, 106, 0.24), rgba(214, 179, 106, 0.08)) !important;
  color: #fff !important;
}

.sidebar-shell .menu-inner > .menu-item.active::before {
  background: var(--app-color-accent) !important;
}

.page-navbar {
  margin: 1.25rem 1.25rem 0;
  border-radius: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: #6e7d74;
}

.navbar-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--app-color-dark);
}

.container-p-y {
  padding-top: 1.5rem !important;
  padding-bottom: 2rem !important;
}

.flash-stack {
  padding-top: 1rem;
}

.action-button,
.action-button:hover,
.action-button:focus {
  background: linear-gradient(135deg, var(--app-color-default), #24563c);
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(47, 111, 79, 0.22);
}

.action-button span,
.action-button i {
  color: #fff;
}

.action-button--header {
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-card {
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: auto -4rem -5rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(214, 179, 106, 0.45), transparent 70%);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1.25rem;
  border-radius: 22px;
  border: 1px solid var(--app-color-line);
  background: rgba(255,255,255,0.9);
  min-height: 170px;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 111, 79, 0.1);
  color: var(--app-color-default);
  font-size: 1.3rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--app-color-dark);
  margin-top: 1rem;
}

.stat-label {
  color: #5b6a62;
  margin-top: 0.5rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.table-shell {
  padding: 1rem 1rem 1.25rem;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(47, 111, 79, 0.04);
}

.table thead th {
  border-bottom: 1px solid var(--app-color-line);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  color: #718178;
}

.table tbody td {
  vertical-align: middle;
  border-color: rgba(24, 51, 40, 0.08);
}

.page-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.action-menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(24, 51, 40, 0.12);
  background: rgba(255,255,255,0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--app-color-dark);
}

.action-menu-toggle i {
  font-size: 1.3rem;
}

.action-menu {
  min-width: 180px;
  padding: 0.4rem;
  border: 1px solid var(--app-color-line);
  border-radius: 16px;
  box-shadow: var(--app-shadow-md);
  background: rgba(255,255,255,0.96);
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.action-menu-item i {
  font-size: 1.05rem;
}

.action-menu-item-danger {
  color: #c0392b;
}

.action-menu-item-danger:hover,
.action-menu-item-danger:focus {
  color: #a93226;
}

.table td:last-child,
.table th:last-child {
  width: 1%;
  white-space: nowrap;
}

.status-pill,
.badge {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
}

.bg-label-success {
  background: rgba(47, 111, 79, 0.12) !important;
  color: #20543b !important;
}

.bg-label-warning {
  background: rgba(214, 179, 106, 0.18) !important;
  color: #7b5a14 !important;
}

.form-control,
.form-select {
  border-radius: 14px;
  border: 1px solid rgba(24, 51, 40, 0.12);
  min-height: 48px;
  background: rgba(255,255,255,0.84);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(47, 111, 79, 0.4);
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 79, 0.12);
}

.section-button-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--app-color-default);
  text-decoration: none;
  font-weight: 700;
}

.field-row .card-body,
.content-card {
  padding: 1.25rem;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #607168;
}

.alert {
  border: none;
  border-radius: 16px;
}

#login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(214, 179, 106, 0.18), transparent 30%),
    linear-gradient(160deg, #183328 0%, #254e3a 45%, #f3f1e8 45%, #faf9f5 100%);
}

.login-box {
  max-width: 520px;
  width: 100%;
  padding: 2rem;
}

.login-heading h3 {
  font-size: 1.55rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--app-color-line);
}

.news-card p {
  color: #5f6f66;
  margin: 0;
}

.metric-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.stack-grid {
  display: grid;
  gap: 1rem;
}

@media (max-width: 991px) {
  .metric-row {
    grid-template-columns: 1fr;
  }

  .page-navbar {
    margin: 1rem;
  }

  .page-tools {
    align-items: stretch;
  }

  .action-button--header {
    width: 100%;
  }
}
