:root {
  --ec-orange: #f47b20;
  --ec-orange-hover: #d96512;
  --ec-bg: #f5f6f8;
  --ec-surface: #ffffff;
  --ec-surface-soft: #f0f2f5;
  --ec-text: #20242a;
  --ec-text-muted: #68717d;
  --ec-border: #e1e5ea;
  --ec-shadow: 0 10px 30px rgba(25, 30, 36, 0.08);
}

[data-theme="dark"] {
  --ec-bg: #111315;
  --ec-surface: #191c20;
  --ec-surface-soft: #22262b;
  --ec-text: #f4f5f6;
  --ec-text-muted: #a7afb9;
  --ec-border: #30353c;
  --ec-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

html, body {
  background: var(--ec-bg);
  color: var(--ec-text);
}

body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-card,
.panel,
.metric-card,
.resource-card,
.topbar,
.config-panel,
.status-banner {
  background: var(--ec-surface);
  color: var(--ec-text);
  border-color: var(--ec-border);
  box-shadow: var(--ec-shadow);
}

input,
textarea,
select {
  background: var(--ec-surface);
  color: var(--ec-text);
  border-color: var(--ec-border);
}

input::placeholder,
textarea::placeholder {
  color: var(--ec-text-muted);
}

button.primary,
#login-btn {
  background: var(--ec-orange);
  border-color: var(--ec-orange);
  color: #fff;
}

button.primary:hover,
#login-btn:hover {
  background: var(--ec-orange-hover);
  border-color: var(--ec-orange-hover);
}

button.secondary,
.nav-btn {
  background: var(--ec-surface-soft);
  color: var(--ec-text);
  border-color: var(--ec-border);
}

.nav-btn.active {
  background: var(--ec-orange);
  color: #fff;
  border-color: var(--ec-orange);
}

.eyebrow,
a {
  color: var(--ec-orange);
}

.meta,
.metric-foot,
.auth-help {
  color: var(--ec-text-muted);
}

/* Login */
.auth-screen {
  background:
    radial-gradient(circle at center, rgba(244, 123, 32, 0.07), transparent 38%),
    var(--ec-bg);
}

.auth-card {
  width: min(100%, 440px);
  padding: 2rem 2.1rem 1.7rem;
  border: 1px solid var(--ec-border);
  border-radius: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38), 0 0 45px rgba(244, 123, 32, 0.07);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.35rem;
}

.auth-logo {
  display: block;
  width: 180px;
  height: 78px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 0.35rem;
  content: url("../sources/electrocorp_icon.png");
}

/* The source artwork is the complete ElectroCorp mark, so don't duplicate its wordmark. */
.auth-brand-name {
  display: none;
}

.auth-tagline {
  margin-top: 0.2rem;
  color: var(--ec-text-muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.auth-heading {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-heading h2 {
  margin: 0 0 0.45rem;
}

.auth-heading .auth-help {
  margin: 0;
}

.auth-card label {
  text-align: left;
}

#login-btn {
  width: 100%;
  margin-top: 0.25rem;
  font-weight: 600;
}

#login-btn span {
  margin-left: 0.35rem;
  font-size: 1.05em;
}

.auth-error {
  text-align: center;
}

.auth-theme-switcher {
  margin: 0.8rem auto 0;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--ec-border);
  border-radius: 999px;
  background: var(--ec-surface-soft);
}

.theme-switcher button {
  min-width: 2.2rem;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ec-text-muted);
  cursor: pointer;
}

.theme-switcher button.active {
  background: var(--ec-orange);
  color: #fff;
}

.theme-switcher button:hover {
  color: var(--ec-text);
}

@media (max-width: 520px) {
  .auth-card {
    padding: 1.6rem 1.25rem 1.4rem;
  }

  .auth-logo {
    width: 155px;
    height: 70px;
  }
}
