:root {
  --brand-purple: #7c3aed;
  --brand-purple-dark: #7c3aed;
  --brand-purple-darker: #6d28d9;
  --brand-purple-soft: #ede9fe;
  --hero-gradient: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
  --bg-page: #eef0f4;
  --bg-soft: #f5f6f8;
  --ink: #1e1b4b;
  --muted: #5b5478;
  --border-light: #e8e4f5;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, 0.04), 0 2px 8px rgba(109, 40, 217, 0.05);
  --shadow-md: 0 4px 18px rgba(109, 40, 217, 0.08);
  --radius: 16px;
  --font-display: "Outfit", "Source Sans 3", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --sidebar-width: 260px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-body);
}

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

.gm-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.gm-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border-light);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gm-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
}

.gm-brand__marks img {
  height: 34px;
  width: auto;
  display: block;
}

.gm-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gm-brand__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--brand-purple-darker);
  line-height: 1.1;
}

.gm-brand__subtitle {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gm-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.gm-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.gm-nav a:hover,
.gm-nav a.is-active {
  background: var(--brand-purple-soft);
  color: var(--brand-purple-dark);
}

.gm-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.gm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.gm-topbar__brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gm-topbar__product {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand-purple-darker);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.gm-topbar__org {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.gm-topbar__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.gm-content {
  padding: 1.25rem 1.5rem 2rem;
}

.gm-hero {
  background: var(--hero-gradient);
  color: #fff;
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

.gm-hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.gm-hero p {
  margin: 0;
  opacity: 0.88;
  font-size: 0.92rem;
}

.gm-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.25rem;
}

.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.gm-btn--primary {
  background: var(--hero-gradient);
  color: #fff;
}

.gm-btn--ghost {
  background: transparent;
  color: var(--brand-purple-dark);
  border: 1px solid var(--border-light);
}

.gm-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.gm-hero__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gm-hero__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.gm-kpi {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.gm-kpi__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gm-kpi__value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--brand-purple-darker);
  margin-top: 0.25rem;
  line-height: 1.1;
}

.gm-kpi__hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.gm-filter-bar {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.gm-filter-bar__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.gm-filter {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 140px;
}

.gm-filter span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gm-filter input,
.gm-filter select {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg-soft);
}

.gm-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.gm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gm-table th,
.gm-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.gm-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg-soft);
}

.gm-table__empty {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 1rem !important;
}

.gm-drawer {
  border: none;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: transparent;
}

.gm-drawer::backdrop {
  background: rgba(35, 28, 61, 0.35);
}

.gm-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  margin: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  border: none;
}

.gm-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
}

.gm-drawer__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.gm-drawer__body {
  padding: 1.15rem;
  overflow: auto;
  flex: 1;
}

.gm-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gm-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.gm-section-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand-purple-darker);
}

@media (max-width: 900px) {
  .gm-shell {
    grid-template-columns: 1fr;
  }

  .gm-sidebar {
    height: auto;
    position: relative;
  }
}
