:root {
  --blue-900: #084987;
  --blue-800: #0b4f91;
  --blue-700: #155b9d;
  --blue-100: #e8f0fa;
  --purple-500: #754a9b;
  --purple-100: #efe6f5;
  --text-900: #092d56;
  --text-600: #44566c;
  --text-400: #6f7f95;
  --border: #dfe6ef;
  --shadow: 0 14px 30px rgba(18, 32, 56, 0.12);
}

* {
  box-sizing: border-box;
}
html:not(.auth-ok) body {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-900);
  background: #f7f8fb;
  font-family: "Inter", sans-serif;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--blue-900);
  color: #fff;
  box-shadow: 10px 0 28px rgba(8, 73, 135, 0.14);
}

.brand {
  display: grid;
  place-items: center;
  height: 126px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand img {
  width: 96px;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 34px 16px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 7px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-back {
  display: flex;
  margin: auto 16px 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.sidebar-back-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.sidebar-back:hover .sidebar-back-button {
  background: rgba(255, 255, 255, 0.2);
}

.page {
  min-height: 100vh;
  margin-left: 250px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 128px;
  padding: 32px 64px;
  background: #fff;
  border-bottom: 1px solid #e9edf3;
}

.page-header h1 {
  margin: 0 0 10px;
  color: var(--blue-900);
  font-size: 26px;
  line-height: 1.15;
}

.page-header p {
  margin: 0;
  color: var(--text-400);
  font-size: 14px;
  font-weight: 700;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--blue-900);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.back-button:hover {
  background: var(--blue-800);
}

.back-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
}

.quick-access {
  padding: 36px 64px;
}

.quick-access h2 {
  margin: 0 0 22px;
  color: var(--text-900);
  font-size: 22px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1040px;
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: #cbd6e5;
  box-shadow: 0 18px 36px rgba(18, 32, 56, 0.18);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
}

.card-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.card-icon.rae {
  background: var(--blue-100);
}

.card-icon.rae img {
  width: 45px;
  height: 45px;
}

.card-icon.rtvcte {
  background: var(--purple-100);
}

.card-content {
  display: grid;
  gap: 10px;
}

.card-content strong {
  color: var(--text-900);
  font-size: 25px;
}

.card-content span {
  max-width: 42ch;
  color: var(--text-600);
  font-size: 16px;
  line-height: 1.45;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  min-height: 50px;
  padding: 0;
  border-radius: 14px;
  color: #000;
  font-size: 17px;
  transition:
    background 160ms ease,
    padding 160ms ease;
}

.card-action span {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  border-radius: 0;
  color: #000;
  background: transparent;
  font-size: 22px;
}

.card-icon.avaliacao {
  background: var(--blue-100);
}

.card-icon.avaliacao svg {
  width: 30px;
  height: 30px;
  color: var(--blue-900);
  stroke-width: 2.4;
}

.app-card:hover .card-action {
  padding: 0 14px;
  background: #e8f0fa;
}

.app-card:hover .card-action span {
  color: #000;
  background: transparent;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .brand {
    height: 86px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(3, max-content);
    overflow-x: auto;
    padding: 12px;
  }

  .page {
    margin-left: 0;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    min-height: auto;
    padding: 24px 18px;
  }

  .quick-access {
    padding: 24px 18px;
  }

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