/* BravoGram product shell. This layer intentionally overrides the legacy
   component CSS so existing screens keep their behavior while sharing a
   clearer, responsive navigation and visual system. */

:root {
  --rail: 224px;
  --bg-2: #f5f7fb;
  --surface-2: #f2f5fa;
  --surface-3: #eaf0f8;
  --line: #e3e8f1;
  --line-2: #d7deea;
  --text: #101828;
  --text-2: #475467;
  --muted: #7b8496;
  --accent: #2968f5;
  --accent-hover: #1f55d2;
  --accent-soft: #edf3ff;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(16, 24, 40, .04);
}

body {
  background: var(--bg-2);
}

.login-screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(97, 119, 255, .42), transparent 32%),
    radial-gradient(circle at 82% 75%, rgba(190, 70, 255, .28), transparent 34%),
    #111936;
}

.login-screen::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  transform: translate(55vw, -30vh);
}

.login-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 30px 80px rgba(4, 9, 30, .35);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #151d39;
}

.login-brand::before {
  content: "B";
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(145deg, #246bfe, #7656f6 56%, #bd4de5);
  box-shadow: 0 8px 20px rgba(73, 91, 235, .3);
}

.trusted-device-option {
  display:flex !important;
  align-items:center;
  gap:9px;
  margin:4px 0 6px;
  color:#344054;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
}
.trusted-device-option input { width:17px; height:17px; margin:0; accent-color:var(--accent); }
.trusted-device-hint { margin:0 0 16px; font-size:11px; line-height:1.45; }

.rail {
  align-items: stretch;
  padding: 18px 12px;
  gap: 8px;
  z-index: 30;
  box-shadow: 8px 0 30px rgba(16, 24, 40, .025);
}

.rail-logo {
  width: auto;
  height: 42px;
  justify-content: start;
  margin: 0 8px 10px;
  font-size: 0;
  font-family: inherit;
}

.rail-logo::before {
  content: "B";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 11px;
  color: #fff;
  font: 800 16px/1 system-ui, sans-serif;
  background: linear-gradient(145deg, #246bfe, #7656f6 56%, #bd4de5);
}

.rail-logo::after {
  content: "BravoGram";
  color: var(--text);
  font: 750 18px/1 system-ui, sans-serif;
  letter-spacing: -.45px;
}

.rail-avatar {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0 5px 12px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rail-avatar::after {
  content: "Workspace pessoal";
  margin-left: 10px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.rail-avatar .pro {
  left: 31px;
  transform: none;
}

.rail-nav {
  width: 100%;
  gap: 4px;
}

.rail-item {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  height: 43px;
  padding: 0 12px;
  gap: 12px;
  border-radius: 11px;
  font-weight: 620;
}

.rail-item::after {
  content: attr(data-label);
  position: static;
  transform: none;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 13.5px;
  opacity: 1;
  transition: none;
}

.rail-item.active {
  color: #194fcb;
  background: linear-gradient(90deg, #edf3ff, #f5f8ff);
  box-shadow: inset 3px 0 #2968f5;
}

.rail-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 18px;
}

.topbar select {
  min-width: 164px;
  background: #f8faff;
  border-color: var(--line);
  font-weight: 600;
}

.workarea {
  background:
    radial-gradient(circle at 95% 5%, rgba(73, 104, 245, .055), transparent 22%),
    var(--bg-2);
}

.page,
.subpage {
  width: 100%;
  max-width: 1840px;
  margin-inline: auto;
  padding: 30px;
}

.page.with-sub {
  max-width: none;
}

.greet {
  margin-bottom: 22px;
}

.greet h2 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
}

.card,
.metric,
.content-row,
.account-row,
.contact-list,
.chat-panel {
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.card {
  border-radius: 16px;
}

.metric {
  min-height: 104px;
  border-radius: 15px;
}

.metric .value {
  font-size: 28px;
}

.page-header h2 {
  font-size: clamp(26px, 2.3vw, 34px);
}

button.primary,
.btn-link {
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(41, 104, 245, .16);
}

input,
select,
textarea {
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7ea4ff;
  box-shadow: 0 0 0 3px rgba(41, 104, 245, .12);
  outline: 0;
}

.subnav {
  padding: 24px 14px;
  background: rgba(255, 255, 255, .72);
}

.subnav-item {
  min-height: 42px;
  border-radius: 10px;
}

.subnav-item.active {
  color: #194fcb;
  background: var(--accent-soft);
}

@media (max-width: 1120px) {
  :root { --rail: 74px; }

  .rail {
    align-items: center;
    padding-inline: 10px;
  }

  .rail-logo {
    margin-inline: 0;
    justify-content: center;
  }

  .rail-logo::before {
    margin: 0;
  }

  .rail-logo::after,
  .rail-avatar::after,
  .rail-item::after {
    display: none;
  }

  .rail-avatar {
    padding: 5px;
  }

  .rail-item {
    justify-content: center;
    padding: 0;
  }

  .page,
  .subpage {
    padding: 24px;
  }
}

@media (max-width: 720px) {
  :root { --rail: 0px; }

  .app {
    display: block;
    padding-bottom: 70px;
  }

  .rail {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 66px;
    flex-direction: row;
    justify-content: center;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-width: 1px 0 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }

  .rail-logo,
  .rail-avatar,
  .rail-foot {
    display: none;
  }

  .rail-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
    max-width: 520px;
    gap: 3px;
  }

  .rail-item {
    height: 50px;
  }

  .rail-item.active {
    box-shadow: inset 0 -3px #2968f5;
  }

  .topbar {
    height: auto;
    min-height: 62px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .topbar #who {
    display: none;
  }

  .topbar select {
    min-width: 126px;
    max-width: 46vw;
  }

  .page,
  .subpage {
    padding: 18px 14px;
  }

  .page.with-sub {
    display: block;
  }

  .subnav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .subnav-item {
    width: auto;
    white-space: nowrap;
  }

  .greet h2 {
    font-size: 30px;
  }

  .grid-2,
  .analytics-layout {
    grid-template-columns: 1fr !important;
  }
}
