:root {
  --rk-green-950: #092f22;
  --rk-green-900: #0e3d2c;
  --rk-green-800: #11533a;
  --rk-green-700: #176b49;
  --rk-green-600: #21865b;
  --rk-green-100: #e8f4ed;
  --rk-green-50: #f4faf6;

  --rk-bg: #f3f6f4;
  --rk-card: #ffffff;
  --rk-border: #dbe5df;
  --rk-text: #16392d;
  --rk-muted: #718078;

  --rk-red: #a63b3b;
  --rk-red-bg: #fff0f0;

  --rk-amber: #9b6917;
  --rk-amber-bg: #fff7e5;

  --rk-sidebar: 252px;
  --rk-topbar: 68px;

  --rk-radius: 14px;
  --rk-shadow:
    0 8px 24px rgba(18, 61, 43, .06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--rk-bg);
  color: var(--rk-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

.rk-admin-shell {
  min-height: 100vh;
}

.rk-admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rk-sidebar);

  display: flex;
  flex-direction: column;

  background:
    linear-gradient(
      180deg,
      #0d3a2a 0%,
      #092f22 100%
    );

  color: white;
  z-index: 1000;
}

.rk-admin-brand {
  height: var(--rk-topbar);

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 0 20px;

  border-bottom:
    1px solid rgba(255,255,255,.10);
}

.rk-admin-brand-mark {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  background: white;
  color: var(--rk-green-800);

  font-weight: 900;
  font-size: 16px;
}

.rk-admin-brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: .2px;
}

.rk-admin-brand-copy span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255,255,255,.62);
}

.rk-admin-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px 24px;
}

.rk-nav-section {
  margin-top: 18px;
}

.rk-nav-section:first-child {
  margin-top: 0;
}

.rk-nav-label {
  padding: 0 12px 7px;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;

  color: rgba(255,255,255,.42);
}

.rk-nav-item {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 42px;
  padding: 0 12px;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: rgba(255,255,255,.75);

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
  text-align: left;
}

.rk-nav-item:hover {
  color: white;
  background: rgba(255,255,255,.07);
}

.rk-nav-item.active {
  background: white;
  color: var(--rk-green-900);
}

.rk-nav-icon {
  width: 22px;
  text-align: center;
  font-size: 15px;
}

.rk-admin-sidebar-footer {
  padding: 14px;

  border-top:
    1px solid rgba(255,255,255,.10);
}

.rk-sidebar-status {
  padding: 10px 11px;

  border-radius: 10px;
  background: rgba(255,255,255,.06);
}

.rk-sidebar-status strong {
  display: block;
  font-size: 11px;
}

.rk-sidebar-status span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: rgba(255,255,255,.55);
}

.rk-admin-main {
  margin-left: var(--rk-sidebar);
  min-height: 100vh;
}

.rk-admin-topbar {
  position: sticky;
  top: 0;
  z-index: 500;

  height: var(--rk-topbar);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 24px;

  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);

  border-bottom: 1px solid var(--rk-border);
}

.rk-admin-breadcrumb {
  font-size: 11px;
  color: var(--rk-muted);
}

.rk-admin-page-title {
  margin-top: 3px;

  font-size: 17px;
  font-weight: 800;

  color: var(--rk-text);
}

.rk-admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rk-admin-pill {
  min-height: 36px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  border: 1px solid var(--rk-border);
  border-radius: 9px;

  background: white;
  color: var(--rk-text);

  font-size: 11px;
  font-weight: 700;
}

.rk-admin-avatar {
  width: 35px;
  height: 35px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--rk-green-100);
  color: var(--rk-green-800);

  font-size: 11px;
  font-weight: 900;
}

.rk-admin-content {
  padding: 22px;
}

.rk-dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 18px;
}

.rk-dashboard-hero h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.4px;
}

.rk-dashboard-hero p {
  margin: 5px 0 0;
  color: var(--rk-muted);
  font-size: 12px;
}

.rk-dashboard-actions {
  display: flex;
  gap: 8px;
}

.rk-button {
  min-height: 38px;
  padding: 0 14px;

  border-radius: 9px;
  border: 1px solid var(--rk-border);

  background: white;
  color: var(--rk-text);

  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.rk-button.primary {
  border-color: var(--rk-green-700);
  background: var(--rk-green-700);
  color: white;
}

.rk-button:hover {
  transform: translateY(-1px);
}

.rk-kpi-grid {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 12px;
}

.rk-kpi {
  min-height: 112px;
  padding: 15px;

  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);

  background: var(--rk-card);
  box-shadow: var(--rk-shadow);
}

.rk-kpi.primary {
  background:
    linear-gradient(
      145deg,
      #176b49,
      #21865b
    );

  border-color: transparent;
  color: white;
}

.rk-kpi-label {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;

  color: var(--rk-muted);
}

.rk-kpi.primary .rk-kpi-label {
  color: rgba(255,255,255,.72);
}

.rk-kpi-icon {
  font-size: 15px;
}

.rk-kpi-value {
  margin-top: 13px;

  font-size: 21px;
  line-height: 1;
  font-weight: 900;
}

.rk-kpi-meta {
  margin-top: 10px;

  font-size: 9px;
  color: var(--rk-muted);
}

.rk-kpi.primary .rk-kpi-meta {
  color: rgba(255,255,255,.7);
}

.rk-dashboard-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    minmax(300px, 1fr);

  gap: 14px;

  margin-top: 14px;
}

.rk-panel {
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);

  background: var(--rk-card);
  box-shadow: var(--rk-shadow);

  overflow: hidden;
}

.rk-panel-head {
  min-height: 57px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 12px 15px;

  border-bottom: 1px solid var(--rk-border);
}

.rk-panel-head h2 {
  margin: 0;

  font-size: 13px;
  font-weight: 850;
}

.rk-panel-head p {
  margin: 3px 0 0;

  font-size: 9px;
  color: var(--rk-muted);
}

.rk-panel-action {
  border: 0;
  background: transparent;

  color: var(--rk-green-700);

  font-size: 10px;
  font-weight: 800;

  cursor: pointer;
}

.rk-chart-placeholder {
  height: 260px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fbf9
    );
}

.rk-chart-bars {
  height: 180px;

  display: flex;
  align-items: end;
  gap: 10px;

  border-bottom: 1px solid var(--rk-border);
}

.rk-chart-bar {
  flex: 1;

  min-height: 10px;

  border-radius: 5px 5px 0 0;

  background:
    linear-gradient(
      180deg,
      #2c9568,
      #176b49
    );

  opacity: .9;
}

.rk-chart-labels {
  display: flex;
  justify-content: space-between;

  margin-top: 8px;

  font-size: 8px;
  color: var(--rk-muted);
}

.rk-live-list {
  padding: 6px 14px 14px;
}

.rk-live-row {
  display: grid;
  grid-template-columns:
    38px 1fr auto;

  align-items: center;
  gap: 10px;

  padding: 11px 0;

  border-bottom: 1px solid #edf2ef;
}

.rk-live-row:last-child {
  border-bottom: 0;
}

.rk-live-avatar {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: var(--rk-green-100);
  color: var(--rk-green-800);

  font-size: 10px;
  font-weight: 900;
}

.rk-live-name strong {
  display: block;
  font-size: 11px;
}

.rk-live-name span {
  display: block;
  margin-top: 2px;

  font-size: 8px;
  color: var(--rk-muted);
}

.rk-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 5px 8px;

  border-radius: 999px;

  background: var(--rk-green-100);
  color: var(--rk-green-700);

  font-size: 8px;
  font-weight: 900;
}

.rk-status.offline {
  background: #eff2f0;
  color: #7b8982;
}

.rk-wide-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(0, 1fr);

  gap: 14px;

  margin-top: 14px;
}

.rk-table-wrap {
  overflow-x: auto;
}

.rk-table {
  width: 100%;
  border-collapse: collapse;
}

.rk-table th {
  padding: 10px 13px;

  background: #f8faf9;

  border-bottom:
    1px solid var(--rk-border);

  color: var(--rk-muted);

  font-size: 8px;
  font-weight: 800;
  letter-spacing: .5px;
  text-align: left;
  text-transform: uppercase;
}

.rk-table td {
  padding: 11px 13px;

  border-bottom:
    1px solid #edf2ef;

  font-size: 10px;
}

.rk-table tr:last-child td {
  border-bottom: 0;
}

.rk-table strong {
  font-size: 10px;
}

.rk-muted {
  color: var(--rk-muted);
}

.rk-alert-list {
  padding: 5px 14px 14px;
}

.rk-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;

  padding: 11px 0;

  border-bottom:
    1px solid #edf2ef;
}

.rk-alert:last-child {
  border-bottom: 0;
}

.rk-alert-main strong {
  display: block;
  font-size: 10px;
}

.rk-alert-main span {
  display: block;
  margin-top: 3px;

  font-size: 8px;
  color: var(--rk-muted);
}

.rk-alert-badge {
  padding: 5px 8px;

  border-radius: 999px;

  font-size: 8px;
  font-weight: 900;
}

.rk-alert-badge.low {
  background: var(--rk-amber-bg);
  color: var(--rk-amber);
}

.rk-alert-badge.critical {
  background: var(--rk-red-bg);
  color: var(--rk-red);
}

.rk-workspace {
  display: none;
}

.rk-workspace.active {
  display: block;
}

.rk-module-placeholder {
  min-height: 520px;

  display: grid;
  place-items: center;

  padding: 40px;

  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);

  background: white;
}

.rk-module-placeholder-inner {
  max-width: 520px;
  text-align: center;
}

.rk-module-placeholder-icon {
  width: 54px;
  height: 54px;

  margin: 0 auto 15px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  background: var(--rk-green-100);
  color: var(--rk-green-700);

  font-size: 23px;
}

.rk-module-placeholder h2 {
  margin: 0;
  font-size: 18px;
}

.rk-module-placeholder p {
  margin: 9px 0 0;

  color: var(--rk-muted);

  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1250px) {

  .rk-kpi-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {

  :root {
    --rk-sidebar: 74px;
  }

  .rk-admin-brand-copy,
  .rk-nav-label,
  .rk-nav-item span:not(.rk-nav-icon),
  .rk-sidebar-status {
    display: none;
  }

  .rk-admin-brand {
    justify-content: center;
    padding: 0;
  }

  .rk-nav-item {
    justify-content: center;
  }

  .rk-dashboard-grid,
  .rk-wide-grid {
    grid-template-columns: 1fr;
  }
}
