:root {
  --bg: #061010;
  --bg-strong: #020606;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --stroke: rgba(255, 255, 255, 0.16);
  --text: #f5fbf8;
  --muted: rgba(245, 251, 248, 0.68);
  --soft: rgba(245, 251, 248, 0.46);
  --green: #3ded97;
  --teal: #12bbc6;
  --amber: #f6c85f;
  --danger: #ff8f8f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-strong);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    "Inter Tight",
    "Uncut Sans",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    linear-gradient(132deg, rgba(2, 6, 6, 0.94), rgba(5, 38, 39, 0.9) 45%, rgba(6, 16, 16, 0.94)),
    url("https://www.vess-app.energy/wp-content/uploads/2025/02/Dashboard-vess.png") center / cover fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

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

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 150px;
  max-width: 42vw;
  height: auto;
  filter: drop-shadow(0 0 26px rgba(61, 237, 151, 0.16));
}

.session-actions {
  display: none;
  align-items: center;
  gap: 14px;
}

.session-actions[data-authenticated="true"] {
  display: flex;
}

.user-email {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-view,
.portal-view {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 54px 0 22px;
}

.login-view {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(32px, 7vw, 92px);
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.96;
  font-weight: 700;
}

h2 {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.08;
}

.lead {
  max-width: 620px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.signal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signal-grid span {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 251, 248, 0.78);
  font-size: 14px;
}

.auth-card {
  width: 100%;
  padding: 30px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(2, 8, 8, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-heading {
  margin-bottom: 26px;
}

.auth-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  height: 50px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.auth-card input:focus {
  border-color: rgba(61, 237, 151, 0.72);
  box-shadow: 0 0 0 3px rgba(61, 237, 151, 0.15);
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  gap: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #071211;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.google-button:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.google-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #1a73e8;
  font-family: Arial, sans-serif;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-divider span {
  height: 1px;
  background: var(--stroke);
}

.form-message {
  min-height: 22px;
  margin: 0 0 18px;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
}

.form-message.success {
  color: var(--green);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  gap: 12px;
  border-radius: 6px;
  background: var(--green);
  color: #031110;
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.app-card:hover {
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.auth-links button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 251, 248, 0.76);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.auth-links button:hover {
  color: var(--green);
}

.auth-links button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
}

.portal-view {
  align-content: center;
  gap: 32px;
}

.portal-view[hidden],
.login-view[hidden] {
  display: none;
}

.portal-heading {
  max-width: 780px;
}

.portal-heading p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)),
    rgba(2, 8, 8, 0.76);
  box-shadow: var(--shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.app-card:hover {
  border-color: rgba(61, 237, 151, 0.58);
  background:
    linear-gradient(150deg, rgba(18, 187, 198, 0.2), rgba(255, 255, 255, 0.05)),
    rgba(2, 8, 8, 0.82);
}

.accent-card:hover {
  border-color: rgba(246, 200, 95, 0.64);
}

.disabled-card {
  cursor: not-allowed;
  filter: grayscale(0.95);
  opacity: 0.56;
}

.disabled-card:hover {
  transform: none;
  border-color: var(--stroke);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)),
    rgba(2, 8, 8, 0.76);
}

.card-kicker {
  width: fit-content;
  margin-bottom: 24px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(61, 237, 151, 0.12);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.accent-card .card-kicker {
  background: rgba(246, 200, 95, 0.14);
  color: var(--amber);
}

.app-card h2 {
  position: relative;
  z-index: 1;
  font-size: 34px;
}

.app-card p {
  position: relative;
  z-index: 1;
  max-width: 460px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.availability-badge {
  width: fit-content;
  margin-top: auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 251, 248, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(2, 8, 8, 0.72);
  color: var(--muted);
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 28px, 680px);
    padding-top: 20px;
  }

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

  .login-view,
  .portal-view {
    min-height: auto;
    padding-top: 42px;
  }

  .login-view,
  .app-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 44px;
  }

  .lead {
    font-size: 18px;
  }

  .auth-card,
  .app-card {
    padding: 24px;
  }

  .app-card {
    min-height: 240px;
  }

  .user-email {
    display: none;
  }
}

@media (max-width: 460px) {
  .signal-grid span,
  .ghost-button {
    font-size: 13px;
  }

  h1 {
    font-size: 38px;
  }

  .app-card h2 {
    font-size: 28px;
  }
}
