:root {
  color-scheme: light;
  --page: #f6f7f2;
  --panel: #ffffff;
  --panel-soft: #eef4ea;
  --ink: #0b0f0c;
  --muted: #667067;
  --line: #dce5d8;
  --brand: #1fa600;
  --brand-2: #46c924;
  --violet: #7b1b83;
  --warn: #f0a600;
  --danger: #e23b45;
  --shadow: 0 24px 70px rgba(17, 31, 18, .12);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body.dark {
  color-scheme: dark;
  --page: #07110b;
  --panel: #101d13;
  --panel-soft: #172618;
  --ink: #f2fff3;
  --muted: #a2b3a5;
  --line: #2b3f2e;
  --brand: #43c925;
  --brand-2: #69df4b;
  --violet: #b35ac0;
  --warn: #ffd36a;
  --danger: #ff6d7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0, rgba(31, 166, 0, .12), transparent 32rem),
    radial-gradient(circle at 100% 8%, rgba(123, 27, 131, .12), transparent 30rem),
    var(--page);
  color: var(--ink);
  min-height: 100vh;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-card-minimal {
  width: min(420px, 100%);
  grid-template-columns: 1fr;
  padding: 34px;
  gap: 18px;
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 6px;
}

.login-card-minimal .cube {
  width: 34px;
  height: 34px;
}

.login-card-minimal .brand-name {
  font-size: 22px;
}

.theme-icon {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.login-tools {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.link-btn {
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 900;
}

.link-btn:hover {
  color: var(--violet);
}

.login-brand {
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(31, 166, 0, .14), transparent 42%),
    linear-gradient(160deg, transparent 58%, rgba(123, 27, 131, .12));
}

.logo-row,
.app-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cube {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, var(--violet) 0 45%, transparent 46%),
    linear-gradient(35deg, #5cd600 0 52%, #30ad00 53%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.brand-name {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  color: var(--violet);
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  margin: 42px 0 10px;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .94;
  letter-spacing: -.05em;
}

.login-copy {
  max-width: 560px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.login-form {
  padding: 48px;
  display: grid;
  align-content: center;
  gap: 18px;
  border-left: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.field-input {
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 166, 0, .12);
}

.btn {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 34px;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 13px;
}

.error {
  color: var(--danger);
  font-weight: 800;
  min-height: 18px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app-logo .brand-name {
  font-size: 20px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.nav button.active {
  color: var(--ink);
  background: rgba(31, 166, 0, .1);
  box-shadow: inset 4px 0 0 var(--brand);
}

.user-box {
  margin-top: auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
}

.user-box strong {
  display: block;
}

.main {
  padding: 28px 32px 60px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.title-block p {
  margin: 0;
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.title-block h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: .95;
  letter-spacing: -.055em;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search {
  min-width: 280px;
}

.section {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.cards {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

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

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

.card,
.panel,
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card {
  padding: 20px;
}

.metric-label,
.muted {
  color: var(--muted);
}

.metric-value {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.04em;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel h2,
.panel h3 {
  margin: 0;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.notification-card.unread {
  border-color: color-mix(in srgb, var(--brand) 46%, var(--line));
  box-shadow: inset 4px 0 0 var(--brand);
}

.notification-card .link-btn {
  margin-left: 10px;
  font-size: 12px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.item-title {
  font-weight: 950;
  font-size: 18px;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 166, 0, .12);
  color: var(--brand);
  font-weight: 900;
  font-size: 12px;
}

.badge.warn {
  background: rgba(240, 166, 0, .14);
  color: var(--warn);
}

.badge.danger {
  background: rgba(226, 59, 69, .13);
  color: var(--danger);
}

.table-card {
  overflow: hidden;
}

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

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

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

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

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

.empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 22px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-soft) 65%, transparent);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  background: var(--ink);
  color: var(--page);
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.mobile-menu {
  display: none;
}

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

  .sidebar {
    padding: 18px 10px;
  }

  .app-logo .brand-name,
  .app-logo .brand-sub,
  .nav span.label,
  .user-box .user-details {
    display: none;
  }

  .nav button {
    justify-content: center;
    padding: 13px 8px;
  }
}

@media (max-width: 900px) {
  .login-card,
  .two,
  .three,
  .cards {
    grid-template-columns: 1fr;
  }

  .login-form {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .nav span.label,
  .user-box .user-details {
    display: inline;
  }

  .main {
    padding: 22px 16px 44px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .search {
    width: 100%;
    min-width: 0;
  }

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