:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #080b12;
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(75, 99, 255, 0.16),
      transparent 34rem
    ),
    radial-gradient(
      circle at bottom right,
      rgba(27, 199, 160, 0.12),
      transparent 30rem
    ),
    #080b12;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.background-orb {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}

.orb-one {
  top: -9rem;
  right: 10%;
  background: #5d6cff;
}

.orb-two {
  bottom: -10rem;
  left: 7%;
  background: #20c997;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.login-card {
  width: min(460px, 100%);
  margin: 8vh auto 0;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: rgba(16, 20, 31, 0.88);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 30px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7180ff, #35d4ad);
  color: #07110e;
  font-size: 24px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 42px);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.eyebrow {
  margin-bottom: 8px;
  color: #8d9aff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.muted {
  color: #98a0b4;
  line-height: 1.65;
}

form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

label {
  display: grid;
  gap: 9px;
  color: #c8cedd;
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

input:focus {
  border-color: #7885ff;
  box-shadow: 0 0 0 4px rgba(120, 133, 255, 0.13);
}

button {
  padding: 13px 17px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #7885ff, #51d8b7);
  color: #07100e;
  font-weight: 850;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: #eef1f7;
}

.error-message,
.inline-message {
  min-height: 20px;
  margin: 0;
  color: #ff9898;
  font-size: 14px;
}

.inline-message.success {
  color: #67dbb9;
}

.topbar,
.topbar-actions,
.panel-heading,
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar-actions {
  justify-content: flex-end;
}

.user-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #cfd5e4;
  font-size: 14px;
}

.hero,
.panel-card,
.coming-next {
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(15, 19, 30, 0.82);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 34px;
  border-radius: 26px;
}

.status-badge {
  color: #79e0c1;
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #45ddb1;
  box-shadow: 0 0 0 6px rgba(69, 221, 177, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.stat-label {
  color: #8f98ad;
  font-size: 13px;
}

.stat-value {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 850;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel-card {
  padding: 24px;
  border-radius: 22px;
}

.project-list,
.provider-list,
.permission-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.project-item,
.provider-item,
.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
}

.item-title {
  margin: 0 0 5px;
  font-weight: 780;
}

.item-subtitle {
  margin: 0;
  color: #8f98ab;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.state {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.state.on {
  background: rgba(62, 214, 170, 0.13);
  color: #6be2c0;
}

.state.off {
  background: rgba(255, 154, 98, 0.12);
  color: #ffb186;
}

.permission-card,
.coming-next {
  margin-top: 20px;
}

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

.permission-item {
  justify-content: flex-start;
}

.permission-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.permission-dot.allowed {
  background: #4bd7ad;
}

.permission-dot.blocked {
  background: #ff9378;
}

.coming-next {
  padding: 24px;
  border-radius: 22px;
  border-style: dashed;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .permission-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .login-card,
  .hero,
  .panel-card {
    padding: 20px;
  }

  .topbar,
  .hero,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

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