html {
  min-height: 100%;
  background: #080b16;
}

body:has(.dashboard-shell) {
  display: block;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(124, 58, 237, 0.16), transparent 28%),
    linear-gradient(145deg, #080b16 0%, #0b101a 100%);
  overflow-x: hidden;
}

.dashboard-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px);
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
}

.dashboard-flow {
  display: block;
}

.environment-selector,
.environment-panel {
  border: 1px solid #283041;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.environment-selector {
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.14), transparent 34%),
    linear-gradient(145deg, #11151f 0%, #0e121b 100%);
  border-color: #283041;
  width: min(100%, 1180px);
  min-height: auto;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 58px) clamp(26px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.environment-panel {
  display: none;
  width: min(100%, 1180px);
  min-height: 440px;
  box-sizing: border-box;
  margin: 24px auto 0;
  padding: clamp(30px, 4vw, 56px);
  background: linear-gradient(145deg, #11151f 0%, #0e121b 100%);
}

.dashboard-shell[data-active-env="production"] .environment-selector,
.dashboard-shell[data-active-env="staging"] .environment-selector,
.dashboard-shell[data-active-env="development"] .environment-selector {
  display: none;
}

.dashboard-shell[data-active-env="production"] [data-environment-panel="production"],
.dashboard-shell[data-active-env="staging"] [data-environment-panel="staging"],
.dashboard-shell[data-active-env="development"] [data-environment-panel="development"] {
  display: block;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto clamp(36px, 6vw, 66px);
  width: 100%;
}

.session-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0 0 44px;
}

.session-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #f8fafc;
}

.session-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.24);
  color: #c4b5fd;
  font-weight: 800;
}

.session-user small,
.session-user strong {
  display: block;
}

.session-user small {
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-user strong {
  max-width: 320px;
  overflow: hidden;
  color: #e2e8f0;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-logout {
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.12);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.session-logout:hover {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

.hero-icon,
.env-icon,
.project-logo,
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.hero-icon {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  background: linear-gradient(145deg, #a78bfa, #7c3aed);
  color: #050816;
  border: 1px solid rgba(221, 214, 254, 0.32);
  box-shadow: 0 22px 36px rgba(124, 58, 237, 0.24);
  font-size: 28px;
}

.dashboard-hero h1,
.panel-header h2,
.selector-copy h2 {
  margin: 0;
  color: #0f172a;
}

.environment-selector .dashboard-hero h1,
.environment-selector .selector-copy h2 {
  color: #f8fafc;
}

.dashboard-hero h1 {
  max-width: 420px;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.15;
}

.dashboard-hero p {
  max-width: 470px;
  font-size: clamp(16px, 2vw, 18px);
  color: #94a3b8;
}

.monitor-badge {
  margin-left: auto;
  align-self: flex-start;
  border: 1px solid #283041;
  border-radius: 999px;
  padding: 10px 16px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.monitor-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.75);
}

.dashboard-hero p,
.selector-copy p,
.panel-header p,
.project-header p,
.service-header p,
.service-row small {
  margin: 7px 0 0;
  color: #475569;
}

.selector-copy {
  width: 100%;
  margin: 0 auto 32px;
}

.selector-copy span {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.selector-copy h2 {
  font-size: 25px;
}

.selector-copy p {
  font-size: 16px;
  color: #94a3b8;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0 auto 36px;
}

.environment-card {
  min-height: 255px;
  border: 1px solid #273244;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 10px 14px;
  padding: clamp(22px, 3vw, 28px);
  text-decoration: none;
  background: linear-gradient(180deg, #151a24 0%, #111722 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.environment-card:hover,
.service-row:hover,
.open-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.environment-card.production { color: #a78bfa; }
.environment-card.staging { color: #60a5fa; }
.environment-card.development { color: #34d399; }

.environment-card:hover {
  border-color: currentColor;
}

.env-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 20px;
}

.production .env-icon,
.project-logo.production,
.service-icon.production {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.18);
}

.staging .env-icon,
.service-icon.staging {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.development .env-icon,
.service-icon.development {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.18);
}

.environment-card strong {
  grid-column: 1 / -1;
  margin-top: 14px;
  color: currentColor;
  font-size: 20px;
}

.environment-card small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 15px;
}

.health-pill {
  justify-self: end;
  align-self: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(52, 211, 153, 0.12);
  color: #5eead4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.health-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.sparkline {
  grid-column: 1 / -1;
  display: block;
  height: 46px;
  margin-top: 14px;
  border-bottom: 1px solid #242c3b;
  background:
    linear-gradient(currentColor, currentColor) 0 30px / 100% 2px no-repeat;
  clip-path: polygon(0 70%, 10% 70%, 14% 35%, 18% 86%, 23% 64%, 34% 70%, 38% 70%, 42% 30%, 47% 88%, 52% 66%, 62% 66%, 66% 34%, 70% 82%, 75% 66%, 100% 66%, 100% 100%, 0 100%);
  opacity: 0.9;
}

.environment-card.development .sparkline {
  clip-path: none;
  height: 31px;
  opacity: 0.75;
}

.env-stat {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid #242c3b;
  padding-bottom: 9px;
  color: #94a3b8;
}

.env-stat em {
  font-style: normal;
  letter-spacing: 0.06em;
}

.env-stat b {
  color: #f8fafc;
}

.selector-note {
  width: min(100%, 900px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px 24px;
  border: 1px solid #273244;
  border-radius: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(21, 26, 36, 0.86);
}

.selector-note span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.selector-note p {
  margin: 0;
  font-size: 16px;
}

.environment-panel.production { border-color: #e9d5ff; }
.environment-panel.staging { border-color: rgba(96, 165, 250, 0.28); }
.environment-panel.development { border-color: rgba(52, 211, 153, 0.28); }

.panel-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  margin: 0 auto 52px;
}

.back-button {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #273244;
  color: #94a3b8;
  background: #151b26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 22px;
}

.panel-header h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.15;
}

.panel-header p {
  color: #94a3b8;
  font-size: 17px;
}

.pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  vertical-align: middle;
}

.pill.production { background: #ede9fe; color: #7c3aed; }
.pill.staging { background: #dbeafe; color: #2563eb; }
.pill.development { background: #dcfce7; color: #15803d; }

.project-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  margin: 0 auto;
}

.project-card,
.service-card {
  overflow: hidden;
  background: #151b26;
  border: 1px solid #273244;
  border-radius: 16px;
  padding: 0;
  box-shadow: none;
}

.service-card {
  padding: 24px;
}

.project-header,
.service-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.project-header {
  padding: 24px;
  margin-bottom: 0;
}

.project-logo,
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 18px;
}

.project-header h3,
.service-header h3,
.service-row strong {
  margin: 0;
  font-size: 19px;
  color: #f8fafc;
}

.project-header p,
.service-header p,
.service-row small {
  color: #64748b;
}

.status {
  align-self: center;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #16a34a;
}

.service-row {
  min-height: 74px;
  border-top: 1px solid #273244;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  margin-top: 0;
  color: inherit;
  text-decoration: none;
  background: #151b26;
  transition: background 0.2s ease;
}

.service-row:hover {
  transform: none;
  box-shadow: none;
  background: #192131;
}

.service-row small {
  display: block;
  font-size: 13px;
}

.service-row em {
  color: #64748b;
  font-style: normal;
  font-size: 22px;
}

.open-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.open-button.staging {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
}

.open-button.development {
  color: #34d399;
  background: rgba(52, 211, 153, 0.14);
}

.open-button:hover {
  box-shadow: none;
  filter: brightness(1.1);
}

.dashboard-footer {
  margin: 24px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.dashboard-shell[data-active-env="production"] .dashboard-footer,
.dashboard-shell[data-active-env="staging"] .dashboard-footer,
.dashboard-shell[data-active-env="development"] .dashboard-footer {
  display: flex;
}

.dashboard-shell[data-active-env=""] .dashboard-footer {
  display: none;
}

.legend {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 20px;
  border: 1px solid #273244;
  border-radius: 12px;
  background: #151b26;
  color: #94a3b8;
  font-size: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.dot.production { background: #7c3aed; }
.dot.staging { background: #2563eb; }
.dot.development { background: #16a34a; }

.logout-link {
  color: #fca5a5;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.12);
  transition: background 0.2s ease, color 0.2s ease;
}

.logout-link:hover {
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

.login-prompt {
  max-width: 420px;
  margin: 120px auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
}

@media (max-width: 920px) {
  .environment-grid,
  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .monitor-badge {
    margin-left: 0;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .environment-selector {
    width: min(100%, 760px);
  }
}

@media (max-width: 640px) {
  .dashboard-shell {
    padding: 12px;
  }

  .environment-selector,
  .environment-panel {
    padding: 20px;
  }

  .dashboard-hero,
  .panel-header {
    gap: 14px;
  }

  .dashboard-hero h1,
  .panel-header h2 {
    font-size: 22px;
  }

  .project-header,
  .service-header {
    grid-template-columns: auto 1fr;
  }

  .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .legend {
    align-items: flex-start;
    flex-direction: column;
  }
}
body:has(.login-card) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.14), transparent 30%),
    linear-gradient(145deg, #080b16 0%, #0b101a 100%);
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.login-card {
  width: min(100% - 32px, 500px);
  box-sizing: border-box;
  padding: 44px;
  background: linear-gradient(180deg, #151a24 0%, #111722 100%);
  border: 1px solid #273244;
  border-top: 3px solid #8b5cf6;
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.login-brand {
  margin-bottom: 34px;
  text-align: center;
}

.login-brand span {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #a78bfa, #7c3aed);
  color: #050816;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 20px 36px rgba(124, 58, 237, 0.24);
}

.login-brand h1 {
  margin: 0;
  color: #f8fafc;
  font-size: 27px;
  line-height: 1.15;
}

.login-brand p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.login-card .field {
  margin-bottom: 22px;
}

.login-card label {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 800;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-shell {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #273244;
  border-radius: 13px;
  background: #0f141e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell:focus-within {
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.input-shell input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 16px;
  line-height: 54px;
}

.input-shell input::placeholder {
  color: #64748b;
}

.login-card .actions {
  margin-top: 30px;
}

.login-card input[type="submit"] {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 13px;
  background: #a78bfa;
  color: #050816;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.login-card input[type="submit"]:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-footnote {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid #273244;
  color: #64748b;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.login-footnote span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
}

body:has(.card-container) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #080b16;
  margin: 0;
  font-family: Arial, sans-serif;
}

.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  background-color: #151a24;
  padding: 40px;
  border-radius: 12px;
}

.card {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  border: 1px solid #273244;
  border-radius: 12px;
  background-color: #111722;
  text-align: center;
}

.card a {
  color: #a78bfa;
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
}

@media (max-width: 560px) {
  .login-card {
    padding: 32px 22px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
