:root {
  --gt-sidebar: #2a3f54;
  --gt-sidebar-dark: #172d44;
  --gt-green: #1abb9c;
  --gt-bg: #f7f7f7;
  --gt-border: #e6e9ed;
  --gt-text: #34495e;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--gt-bg);
  color: var(--gt-text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

.login-page {
  min-height: 100vh;
  background: var(--gt-sidebar);
}

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

.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 6px;
  padding: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.login-panel h1 {
  margin: 16px 0 4px;
  font-size: 28px;
}

.login-panel p {
  color: #73879c;
  margin-bottom: 24px;
}

.app-shell {
  padding: 0;
}

.sidebar-col {
  width: 260px;
  padding: 0;
  background: var(--gt-sidebar);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--gt-sidebar) 0%, var(--gt-sidebar-dark) 100%);
  color: #ecf0f1;
  padding: 18px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  padding: 4px 6px 20px;
}

.profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: 16px;
}

.profile-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
}

.profile-box small {
  display: block;
  color: #babdc0;
}

.profile-box strong {
  color: #fff;
}

.side-menu {
  display: grid;
  gap: 4px;
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e7e7e7;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 4px;
}

.side-menu a:hover,
.side-menu a.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-left: 4px solid var(--gt-green);
  padding-left: 8px;
}

.content-col {
  min-width: 0;
  padding: 0;
}

.topnav {
  min-height: 70px;
  background: #ededed;
  border-bottom: 1px solid #d9dee4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.topnav h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

.topnav p {
  margin: 2px 0 0;
  color: #73879c;
}

.content-body {
  padding: 24px;
}

.x_panel {
  background: #fff;
  border: 1px solid var(--gt-border);
  border-radius: 4px;
  padding: 16px;
  width: 100%;
}

.x_title {
  border-bottom: 2px solid #e6e9ed;
  margin-bottom: 16px;
  padding-bottom: 8px;
}

.x_title h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

.chart-box {
  position: relative;
  height: 185px;
}

.chart-box-sm {
  height: 155px;
}

.stat-tile {
  background: #fff;
  border: 1px solid var(--gt-border);
  border-radius: 4px;
  padding: 18px;
  min-height: 108px;
}

.stat-tile small {
  color: #73879c;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stat-tile strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  margin-top: 8px;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.lookup-form {
  display: flex;
  gap: 8px;
  width: min(420px, 100%);
}

.table {
  margin-bottom: 0;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.table-tools .search-control {
  width: min(320px, 100%);
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pagination {
  margin: 0;
}

.table th {
  color: #73879c;
  font-weight: 600;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.badge-soft {
  background: rgba(26, 187, 156, .12);
  color: #12856f;
  border: 1px solid rgba(26, 187, 156, .24);
}

.modal-content {
  border-radius: 4px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.relation-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.relation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--gt-border);
  border-radius: 4px;
  padding: 8px 10px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-heading h6 {
  margin: 0;
  font-weight: 600;
}

.document-manager {
  margin-top: 6px;
}

.document-manager .table td,
.document-manager .table th {
  vertical-align: middle;
}

@media (max-width: 900px) {
  .sidebar-col {
    width: 78px;
  }

  .brand span,
  .profile-box div,
  .side-menu span {
    display: none;
  }

  .profile-box {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
