:root {
  --nav: #061d35;
  --nav-dark: #02111f;
  --page: #f4f8fc;
  --panel: #ffffff;
  --ink: #102033;
  --muted: #65758a;
  --line: #dce6f2;
  --blue: #1466df;
  --cyan: #10b8cf;
  --green: #23ad6b;
  --amber: #f3a63b;
  --red: #ef4056;
  --violet: #8b5cf6;
  --shadow: 0 12px 32px rgba(16, 32, 51, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #d8e6f7;
  background:
    radial-gradient(circle at 0 0, rgba(0, 174, 202, .16), transparent 30%),
    linear-gradient(180deg, var(--nav), var(--nav-dark));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.brand strong {
  display: block;
  color: white;
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1;
}

.brand span {
  display: block;
  color: #c3d5eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 5px;
}

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

.nav a {
  min-height: 45px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #d7e5f8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.nav-logout {
  margin: 0;
}

.nav-logout button {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #d7e5f8;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.nav-logout button:hover {
  background: rgba(255, 255, 255, .06);
}

.nav a.active {
  color: white;
  background: linear-gradient(90deg, #135fc8, #0b4eaa);
}

.nav .count {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f04438;
  color: white;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.help {
  margin-top: auto;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(0, 174, 202, .32), rgba(8, 63, 93, .92));
  border: 1px solid rgba(105, 221, 237, .24);
}

.help strong {
  display: block;
  color: white;
  font-size: 14px;
  margin-bottom: 8px;
}

.help p {
  margin: 0 0 14px;
  color: #d8f7ff;
  font-size: 12px;
  line-height: 1.45;
}

.help button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, .06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.copyright {
  color: #8098b3;
  font-size: 11px;
  padding: 0 10px;
}

main {
  padding: 18px;
  overflow: hidden;
}

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

.title-row {
  display: flex;
  align-items: end;
  gap: 16px;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
}

.title-row p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.top-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tenant-switcher {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.tenant-switcher select {
  max-width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.bell {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #223b58;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
}

.bell span {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f04438;
  color: white;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid white;
}

.account {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #12233a;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #08294e;
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

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

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

  .sidebar {
    align-items: center;
    padding: 20px 12px;
  }

  .brand {
    padding: 0;
  }

  .brand div:not(.brand-mark),
  .nav span,
  .help,
  .copyright,
  .nav .count {
    display: none;
  }

  .nav a {
    width: 50px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .app {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    display: block;
  }

  .brand div:not(.brand-mark),
  .nav span {
    display: block;
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 14px;
  }

  .nav a {
    justify-content: center;
    padding: 0;
  }

  .nav span {
    display: none !important;
  }

  main {
    padding: 14px;
  }

  .topbar,
  .title-row,
  .top-actions,
  .actions {
    display: grid;
    align-items: start;
  }

  .top-actions,
  .actions {
    grid-template-columns: auto 1fr;
  }

  .account {
    justify-content: end;
  }
}
