:root {
  --color-primary-green: #00a54f;
  --color-accent-yellow: #fef200;
  --color-danger-red: #bf1e2e;

  --color-bg-main: #f4f6f8;
  --color-bg-elevated: #ffffff;
  --color-border-subtle: #e1e4ea;
  --color-border-strong: #c4cad7;
  --color-text-main: #151823;
  --color-text-muted: #6b7280;
  --color-text-soft: #9ca3af;

  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.08);

  --radius-card: 14px;
  --radius-pill: 999px;

  --top-bar-height: 64px;
  --sidebar-width: 260px;
}

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

* {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text-main);
  background: var(--color-bg-main);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font-family: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--top-bar-height) minmax(0, 1fr);
  grid-template-areas:
    "top-bar top-bar"
    "sidebar main";
  height: 100vh;
  overflow: hidden;
}

.top-bar {
  grid-area: top-bar;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 1.75rem;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border-subtle);
}

.top-bar__left,
.top-bar__center,
.top-bar__right {
  display: flex;
  align-items: center;
}

.top-bar__center {
  flex: 1;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
}

.top-bar__right {
  gap: 1rem;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: radial-gradient(circle at 0 0, #4ade80, var(--color-primary-green));
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-logo__text {
  display: flex;
  flex-direction: column;
}

.app-logo__name {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-logo__sub {
  font-size: 0.72rem;
  color: var(--color-text-soft);
}

.top-search {
  flex: 1;
}

.top-search__input {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: #f9fafb;
  font-size: 0.85rem;
  color: var(--color-text-main);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.top-search__input::placeholder {
  color: var(--color-text-soft);
}

.top-search__input:focus {
  background: #ffffff;
  border-color: var(--color-primary-green);
  box-shadow: 0 0 0 1px rgba(0, 165, 79, 0.2);
}

.top-filter__select {
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  padding: 0.5rem 1.9rem 0.5rem 0.85rem;
  font-size: 0.82rem;
  color: var(--color-text-main);
  background: #ffffff
    linear-gradient(45deg, transparent 50%, var(--color-text-soft) 50%),
    linear-gradient(135deg, var(--color-text-soft) 50%, transparent 50%),
    linear-gradient(to right, #ffffff, #ffffff);
  background-position:
    calc(100% - 14px) calc(1.05em),
    calc(100% - 9px) calc(1.05em),
    100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
  appearance: none;
}

.top-filter__select:focus {
  outline: none;
  border-color: var(--color-primary-green);
}

.top-icon-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.top-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-icon::before,
.top-icon::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: var(--color-text-soft);
}

.top-icon::before {
  width: 12px;
  height: 10px;
  border: 1.5px solid var(--color-text-soft);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-top: none;
  bottom: 11px;
}

.top-icon::after {
  width: 4px;
  height: 4px;
  bottom: 8px;
}

.top-icon--badge::after {
  background: var(--color-text-soft);
}

.top-icon--badge::before {
  border-color: var(--color-text-soft);
}

.top-icon--badge::marker {
  display: none;
}

.top-icon--badge::selection {
  background: none;
}

.top-icon--badge::shadow {
  display: none;
}

.top-icon--badge::part(badge) {
  display: none;
}

.top-icon--badge::backdrop {
  display: none;
}

.top-icon--badge::spacer {
  display: none;
}

.top-icon--badge::cue {
  display: none;
}

.top-icon--badge::slotted(*) {
  display: none;
}

.top-icon--badge::before,
.top-icon--badge::after {
  background: var(--color-text-soft);
}

.top-icon--badge::after {
  box-shadow: 8px -8px 0 0 var(--color-danger-red);
}

.top-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-user__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.top-user__name {
  font-size: 0.82rem;
  font-weight: 600;
}

.top-user__role {
  font-size: 0.72rem;
  color: var(--color-text-soft);
}

.top-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-primary-green);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar {
  grid-area: sidebar;
  background: radial-gradient(circle at top left, #f0fdf4 0, #d1fae5 18%, #f4f6f8 55%);
  border-right: 1px solid var(--color-border-subtle);
  padding: 1rem 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.sidebar__search {
  padding: 0 0.75rem 0.6rem;
}

.sidebar__search-input {
  width: 100%;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  color: var(--color-text-main);
  outline: none;
}

.sidebar__search-input::placeholder {
  color: var(--color-text-soft);
}

.sidebar__search-input:focus {
  border-color: var(--color-primary-green);
  box-shadow: 0 0 0 1px rgba(0, 165, 79, 0.18);
}

.sidebar__section {
  margin-bottom: 1.4rem;
  padding-bottom: 0.3rem;
}

.sidebar__section + .sidebar__section {
  margin-top: 0.5rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
  padding-top: 0.9rem;
}

.sidebar__section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  margin: 0.2rem 0.75rem 0.6rem;
}

.sidebar__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.9rem;
  margin-bottom: 0.12rem;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text-main);
}

.sidebar__item--active {
  background: #ffffff;
  color: var(--color-primary-green);
  font-weight: 600;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sidebar__item-bullet {
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

.sidebar__item--active .sidebar__item-bullet {
  background: var(--color-primary-green);
}

.sidebar__item--nested {
  padding-left: 1.75rem;
}

.sidebar__item-bullet--nested {
  width: 3px;
  height: 12px;
  background: rgba(148, 163, 184, 0.6);
}

.sidebar__item-text {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar__item--nested {
  font-size: 0.78rem;
  color: var(--color-text-soft);
}

.sidebar__item--nested:hover {
  color: var(--color-text-main);
}

.sidebar__item--nested::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.4),
    rgba(148, 163, 184, 0.05)
  );
}

.main {
  grid-area: main;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.main__inner {
  flex: 1;
  padding: 1.5rem 1.75rem 1.25rem;
  overflow-y: auto;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--color-text-soft);
  margin-bottom: 0.6rem;
}

.breadcrumb__item--root {
  color: var(--color-text-muted);
  font-weight: 500;
}

.breadcrumb__separator {
  color: rgba(148, 163, 184, 0.9);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-subtitle {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 520px;
}

.page-header__actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--color-primary-green);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 165, 79, 0.25);
}

.btn--primary:hover {
  background: #049247;
}

.btn--outline {
  border-color: var(--color-border-strong);
  color: var(--color-text-main);
  background: #ffffff;
}

.btn--outline:hover {
  border-color: var(--color-primary-green);
}

.btn--ghost {
  border-color: transparent;
  color: var(--color-text-muted);
  background: transparent;
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--color-text-main);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: radial-gradient(circle at top left, #f0fdf4, #ffffff);
  border-radius: var(--radius-card);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-subtle);
}

.summary-card__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-soft);
  margin-bottom: 0.4rem;
}

.summary-card__value {
  font-size: 1.25rem;
  font-weight: 600;
}

.summary-card__value--accent {
  color: var(--color-primary-green);
}

.summary-card__value--danger {
  color: var(--color-danger-red);
}

.summary-card__meta {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-card__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 500;
}

.summary-card__pill--positive {
  background: rgba(22, 163, 74, 0.06);
  color: var(--color-primary-green);
}

.summary-card__pill--neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-muted);
}

.summary-card__pill--danger {
  background: rgba(191, 30, 46, 0.08);
  color: var(--color-danger-red);
}

.summary-card__hint {
  font-size: 0.72rem;
  color: var(--color-text-soft);
}

.grid-analytics-reporting {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.25rem;
  align-items: flex-start;
}

.panel {
  background: var(--color-bg-elevated);
  border-radius: 16px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel__header {
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel__title {
  font-size: 0.98rem;
  font-weight: 600;
}

.panel__subtitle {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.panel__header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.panel__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #f9fafb;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.panel__chip--muted {
  background: transparent;
}

.panel__body {
  padding: 0.8rem 1rem 1rem;
}

.panel__body--analytics {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.8rem;
  grid-template-areas:
    "line bar"
    "line pie";
}

.chart-placeholder {
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: repeating-linear-gradient(
      -45deg,
      rgba(249, 250, 251, 0.9),
      rgba(249, 250, 251, 0.9) 6px,
      rgba(241, 245, 249, 0.9) 6px,
      rgba(241, 245, 249, 0.9) 12px
    );
  display: flex;
  flex-direction: column;
}

.chart-placeholder--line {
  grid-area: line;
}

.chart-placeholder--bar {
  grid-area: bar;
}

.chart-placeholder--pie {
  grid-area: pie;
}

.chart-placeholder__header {
  padding: 0.6rem 0.8rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.chart-placeholder__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-main);
}

.chart-placeholder__legend {
  font-size: 0.72rem;
  color: var(--color-text-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-dot--primary {
  background: var(--color-primary-green);
}

.legend-dot--secondary {
  background: #10b981;
}

.legend-dot--accent {
  background: var(--color-accent-yellow);
}

.chart-placeholder__canvas {
  flex: 1;
  min-height: 130px;
  padding: 0.2rem 0.6rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-placeholder__canvas--circle {
  padding: 0.6rem;
}

.chart-placeholder__canvas--circle::before {
  content: "";
  width: 78%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 6px solid rgba(148, 163, 184, 0.5);
  border-top-color: var(--color-primary-green);
  border-right-color: var(--color-accent-yellow);
  border-bottom-color: rgba(148, 163, 184, 0.4);
  opacity: 0.7;
}

.chart-placeholder__hint {
  position: absolute;
  font-size: 0.7rem;
  color: var(--color-text-soft);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.chart-placeholder__canvas {
  position: relative;
}

.panel__body--reporting {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reporting-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.reporting-toolbar__left,
.reporting-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reporting-toolbar__label {
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-soft);
}

.field-select {
  padding: 0.3rem 1.5rem 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: #ffffff
    linear-gradient(45deg, transparent 50%, var(--color-text-soft) 50%),
    linear-gradient(135deg, var(--color-text-soft) 50%, transparent 50%),
    linear-gradient(to right, #ffffff, #ffffff);
  background-position:
    calc(100% - 12px) calc(0.95em),
    calc(100% - 7px) calc(0.95em),
    100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
  appearance: none;
  font-size: 0.78rem;
  color: var(--color-text-main);
}

.field-select--status {
  border-color: rgba(191, 30, 46, 0.4);
}

.field-select:focus {
  outline: none;
  border-color: var(--color-primary-green);
}

.table-wrapper {
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.data-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.data-table tbody tr:nth-child(even) {
  background: #ffffff;
}

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

.data-table tbody tr:hover {
  background: #f1f5f9;
}

.cell-tenant {
  display: flex;
  flex-direction: column;
}

.cell-tenant__name {
  font-weight: 500;
  font-size: 0.8rem;
}

.cell-tenant__id {
  font-size: 0.7rem;
  color: var(--color-text-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 500;
}

.status-pill--healthy {
  background: rgba(22, 163, 74, 0.07);
  color: var(--color-primary-green);
}

.status-pill--degraded {
  background: rgba(234, 179, 8, 0.12);
  color: #92400e;
}

.status-pill--maintenance {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.cell-actions {
  text-align: right;
  font-size: 1.1rem;
  color: var(--color-text-soft);
}

.footer {
  padding: 0.5rem 1.75rem 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
  background: #ffffff;
}

.footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--color-text-soft);
}

.footer__app {
  font-weight: 500;
}
@media (max-width: 1200px) {
  :root {
    --sidebar-width: 240px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-analytics-reporting {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .top-bar__center {
    max-width: 420px;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header__actions {
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "top-bar"
      "main";
  }

  .sidebar {
    display: none;
  }

  .top-bar__center {
    display: none;
  }

  .main__inner {
    padding-inline: 1.1rem;
  }

  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


