:root {
  --adm-sidebar: #4a6550;
  --adm-bg: #f5f5f5;
  --adm-white: #ffffff;
  --adm-border: #e0e0e0;
  --adm-danger: #e74c3c;
  --adm-success: #27ae60;
  --adm-warning: #f39c12;
  --adm-info: #3498db;
  --adm-text: #2c2c2c;
  --adm-mid: #6b6b6b;
  --adm-radius: 12px;
  --adm-shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --adm-shadow-subtle: 0 4px 12px rgba(15, 23, 42, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* Layout */

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

/* Sidebar */

.adm-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--adm-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 20px;
  z-index: 40;
  transition: transform 0.25s ease-out;
}

.adm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.adm-sidebar-logo {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.adm-sidebar-logo span {
  font-weight: 700;
}

.adm-sidebar-nav {
  flex: 1;
  margin-top: 12px;
}

.adm-nav-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
  margin: 10px 8px;
}

.adm-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.adm-nav-item {
  margin-bottom: 4px;
}

.adm-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.18s ease-out, color 0.18s ease-out;
}

.adm-nav-link span.adm-nav-icon {
  width: 22px;
  text-align: center;
}

.adm-nav-link:hover {
  background: rgba(0, 0, 0, 0.08);
}

.adm-nav-link.adm-nav-active {
  background: rgba(0, 0, 0, 0.18);
}

.adm-sidebar-footer {
  font-size: 0.75rem;
  opacity: 0.7;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

/* Mobile sidebar */

.adm-sidebar-toggle {
  display: none;
}

@media (max-width: 768px) {
  .adm-sidebar {
    transform: translateX(-100%);
  }

  .adm-sidebar.adm-sidebar-open {
    transform: translateX(0);
  }

  .adm-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--adm-border);
    background: var(--adm-white);
    cursor: pointer;
  }
}

/* Top bar */

.adm-main {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.adm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--adm-white);
  box-shadow: var(--adm-shadow-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-topbar-title {
  font-size: 1rem;
  font-weight: 600;
}

.adm-topbar-subtitle {
  font-size: 0.8rem;
  color: var(--adm-mid);
}

.adm-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.adm-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--adm-bg);
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .adm-main {
    margin-left: 0;
  }
}

/* Content area */

.adm-content {
  padding: 24px 32px 40px;
}

@media (max-width: 768px) {
  .adm-content {
    padding: 20px 16px 32px;
  }
}

/* Headings & text */

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--adm-text);
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 0.6rem;
  color: var(--adm-mid);
}

/* Stat cards */

.adm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.adm-stat-card {
  background: var(--adm-white);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow-soft);
  border: 1px solid var(--adm-border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--adm-bg);
}

.adm-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--adm-mid);
}

.adm-stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--adm-text);
}

@media (max-width: 1024px) {
  .adm-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .adm-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tables */

.adm-card {
  background: var(--adm-white);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow-subtle);
  border: 1px solid var(--adm-border);
  padding: 14px 16px 16px;
  margin-bottom: 20px;
}

.adm-table-wrapper {
  margin-top: 10px;
  max-width: 100%;
  overflow-x: auto;
}

table.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.adm-table thead {
  position: sticky;
  top: 0;
  background: var(--adm-white);
  z-index: 1;
}

table.adm-table th,
table.adm-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--adm-border);
}

table.adm-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--adm-mid);
}

table.adm-table tbody tr:nth-child(odd) {
  background: #fafafa;
}

table.adm-table tbody tr:hover {
  background: #f2f7f2;
}

.adm-table-actions {
  display: flex;
  gap: 8px;
}

/* Badges / status chips */

.adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.adm-badge-new {
  background: rgba(52, 152, 219, 0.1);
  color: var(--adm-info);
}

.adm-badge-progress {
  background: rgba(243, 156, 18, 0.1);
  color: var(--adm-warning);
}

.adm-badge-completed {
  background: rgba(39, 174, 96, 0.1);
  color: var(--adm-success);
}

.adm-badge-draft {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

/* Toggles */

.adm-toggle {
  position: relative;
  width: 34px;
  height: 18px;
}

.adm-toggle input {
  position: absolute;
  opacity: 0;
}

.adm-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d5d5d5;
  transition: background 0.18s ease-out;
}

.adm-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease-out;
}

.adm-toggle input:checked + .adm-toggle-track {
  background: var(--adm-success);
}

.adm-toggle input:checked + .adm-toggle-track .adm-toggle-thumb {
  transform: translateX(16px);
}

/* Forms */

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

@media (max-width: 768px) {
  .adm-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--adm-text);
}

.adm-input,
.adm-select,
.adm-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--adm-border);
  padding: 7px 9px;
  font-size: 0.85rem;
  background: var(--adm-white);
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
  outline: none;
  border-color: var(--adm-sidebar);
  box-shadow: 0 0 0 1px rgba(74, 101, 80, 0.2);
}

.adm-textarea {
  min-height: 90px;
  resize: vertical;
}

.adm-error {
  font-size: 0.75rem;
  color: var(--adm-danger);
}

/* Buttons */

.btn-adm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: background 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out,
    box-shadow 0.18s ease-out, transform 0.1s ease-out;
}

.btn-adm-primary {
  background: var(--adm-sidebar);
  color: #ffffff;
  border-color: var(--adm-sidebar);
}

.btn-adm-primary:hover {
  background: #344638;
  border-color: #344638;
  box-shadow: var(--adm-shadow-subtle);
}

.btn-adm-danger {
  background: var(--adm-danger);
  color: #ffffff;
  border-color: var(--adm-danger);
}

.btn-adm-danger:hover {
  background: #c0392b;
  border-color: #c0392b;
  box-shadow: var(--adm-shadow-subtle);
}

.btn-adm-ghost {
  border-color: var(--adm-border);
  background: var(--adm-white);
  color: var(--adm-text);
}

.btn-adm-ghost:hover {
  border-color: var(--adm-sidebar);
}

.btn-adm-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-adm:active {
  transform: translateY(1px);
}

/* Search / filter row */

.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.adm-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-search {
  position: relative;
}

.adm-search input {
  padding-left: 26px;
}

.adm-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--adm-mid);
}

/* Slide-in modal */

.adm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: none;
  z-index: 60;
}

.adm-modal-overlay.adm-modal-open {
  display: block;
}

.adm-modal-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100%;
  height: 100vh;
  background: var(--adm-white);
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.36);
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  z-index: 61;
  display: flex;
  flex-direction: column;
}

.adm-modal-panel.adm-modal-open {
  transform: translateX(0);
}

.adm-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-modal-body {
  padding: 16px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.adm-modal-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--adm-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toasts */

.adm-toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

.adm-toast {
  min-width: 220px;
  max-width: 320px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--adm-white);
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow-subtle);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.adm-toast-success {
  border-color: rgba(39, 174, 96, 0.4);
}

.adm-toast-danger {
  border-color: rgba(231, 76, 60, 0.4);
}

.adm-toast-info {
  border-color: rgba(52, 152, 219, 0.4);
}

/* Utility */

.adm-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-mt-1 {
  margin-top: 8px;
}

.adm-mt-2 {
  margin-top: 16px;
}

.adm-text-muted {
  color: var(--adm-mid);
}

.adm-text-sm {
  font-size: 0.8rem;
}

