:root {
  --ijeser-green: #12683a;
  --ijeser-green-dark: #0a4026;
  --ijeser-gold: #c7972f;
  --ijeser-ink: #17211c;
  --ijeser-muted: #66736c;
  --ijeser-bg: #f4f7f5;
  --sidebar-width: 282px;
  --sidebar-collapsed: 82px;
}

* {
  letter-spacing: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ijeser-ink);
  background: var(--ijeser-bg);
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(199, 151, 47, 0.35) !important;
  outline-offset: 2px;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5faf7 0%, #e8f2ed 55%, #f9f4e7 100%);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 460px);
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 22px 60px rgba(18, 104, 58, 0.14);
}

.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.auth-brand img,
.navbar-title img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
}

.auth-brand strong {
  display: block;
  color: var(--ijeser-green-dark);
  font-size: 1.25rem;
}

.auth-brand span {
  display: block;
  color: var(--ijeser-muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.auth-title {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.dashboard-shell {
  min-height: 100vh;
  display: flex;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: #0d3b27;
  color: #fff;
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease;
}

.dashboard-shell.sidebar-collapsed .dashboard-sidebar {
  width: var(--sidebar-collapsed);
  flex-basis: var(--sidebar-collapsed);
}

.sidebar-inner {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-brand,
.sidebar-link,
.sidebar-sublink {
  color: #edf8f2;
  text-decoration: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: 1.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 3px 0;
  text-align: left;
}

.sidebar-link:hover,
.sidebar-link.active,
.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-sublink {
  display: block;
  margin-left: 35px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.92rem;
}

.dashboard-shell.sidebar-collapsed .sidebar-link span,
.dashboard-shell.sidebar-collapsed .sidebar-brand span,
.dashboard-shell.sidebar-collapsed .sidebar-sublink,
.dashboard-shell.sidebar-collapsed .sidebar-toggle .bi-chevron-down {
  display: none;
}

.dashboard-main {
  min-width: 0;
  flex: 1;
}

.dashboard-navbar {
  min-height: 68px;
  background: #fff;
  border-bottom: 1px solid #dfe8e2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #d9e5de;
  background: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-title {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.dashboard-content {
  padding: 28px;
}

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

.page-heading h1 {
  margin: 0;
  font-size: 1.8rem;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--ijeser-green);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 16px;
}

.stat-card,
.panel {
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--ijeser-muted);
  font-size: 0.9rem;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: var(--ijeser-green-dark);
}

.panel {
  padding: 20px;
}

.panel-header {
  margin-bottom: 12px;
}

.panel-header h2 {
  font-size: 1.05rem;
  margin: 0;
}

.form-panel {
  max-width: 900px;
}

.article-form-card {
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 18px;
}

.article-form-card__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf3ef;
}

.article-form-card__header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ijeser-green-dark);
}

.article-form-card__header p {
  margin: 3px 0 0;
  color: var(--ijeser-muted);
  font-size: 0.92rem;
}

.article-form-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #eaf5ef;
  color: var(--ijeser-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.current-file {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ijeser-muted);
  background: #f7faf8;
  border: 1px solid #e3ece6;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.slug-control {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.slug-control input {
  min-width: 0;
  flex: 1 1 auto;
}

.slug-control .btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.article-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 2px;
  background: linear-gradient(180deg, rgba(244, 247, 245, 0), var(--ijeser-bg) 28%);
}

.author-formset {
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  overflow: hidden;
}

.author-formset__head,
.author-row {
  display: grid;
  grid-template-columns: 44px minmax(92px, 110px) minmax(180px, 1.1fr) minmax(240px, 1.4fr) minmax(132px, 150px) minmax(112px, 132px);
  gap: 12px;
  align-items: start;
}

.author-formset__head {
  padding: 12px 14px;
  background: #f4f8f6;
  color: var(--ijeser-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.author-row {
  padding: 14px;
  background: #fff;
  border-top: 1px solid #edf3ef;
}

.author-row.is-pending-delete {
  background: #fff8f7;
  opacity: 0.78;
}

.author-row.is-pending-delete .author-row__field {
  text-decoration: line-through;
}

.author-row__number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--ijeser-green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-row .form-label {
  display: none;
}

.author-row__order input {
  min-width: 0;
}

.author-extra-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.author-extra-fields .form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ijeser-muted);
  margin-bottom: 3px;
}

.author-row__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.author-row__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.author-row__errors {
  grid-column: 1 / -1;
  color: #b42318;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px 160px auto;
  gap: 10px;
  margin-bottom: 16px;
}

.audit-filter {
  grid-template-columns: repeat(7, minmax(130px, 1fr)) auto;
}

.article-filter {
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 1fr)) auto;
}

.table-title {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
}

.action-cell {
  min-width: 260px;
}

.empty-state {
  padding: 22px;
  margin: 0;
  color: var(--ijeser-muted);
  background: #f7faf8;
  border-radius: 8px;
  text-align: center;
}

.status-list,
.detail-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 16px;
}

.status-list dt,
.detail-grid dt {
  color: var(--ijeser-muted);
}

.audit-mini a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eef3f0;
  text-decoration: none;
  color: var(--ijeser-ink);
}

.audit-json {
  background: #102018;
  color: #e8fff2;
  border-radius: 8px;
  padding: 14px;
  white-space: pre-wrap;
}

.mobile-sidebar {
  background: #0d3b27;
  color: #fff;
}

.mobile-sidebar .btn-close {
  filter: invert(1);
}

@media (max-width: 991.98px) {
  .dashboard-content {
    padding: 18px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar,
  .audit-filter {
    grid-template-columns: 1fr;
  }

  .user-menu > span:first-child,
  .navbar-title span {
    display: none;
  }

  .article-form-card {
    padding: 16px;
  }

  .slug-control {
    flex-direction: column;
  }

  .author-formset {
    border: 0;
    overflow: visible;
  }

  .author-formset__head {
    display: none;
  }

  .author-row {
    grid-template-columns: 34px 1fr;
    gap: 12px;
    border: 1px solid #dfe8e2;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .author-row .form-label {
    display: block;
  }

  .author-row__number {
    grid-column: 1;
  }

  .author-row__field,
  .author-row__actions,
  .author-row__errors {
    grid-column: 1 / -1;
  }

  .author-extra-fields {
    grid-template-columns: 1fr;
  }

  .article-form-actions {
    position: static;
    flex-direction: column-reverse;
  }
}

@media (min-width: 992px) {
  .mobile-sidebar {
    display: none !important;
  }
}

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

  .status-list,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
