/* Global app styling for smart-dashboard */
:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.15), transparent 24%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
  color: #e2e8f0;
  padding: 2rem;
}

body > div {
  width: min(560px, 100%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.45);
  padding: 2.25rem;
}

h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.95rem 1rem;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font: inherit;
}

input,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
  background: rgba(15, 23, 42, 0.95);
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 18px 32px rgba(56, 189, 248, 0.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(56, 189, 248, 0.28);
}

button:active {
  transform: translateY(0);
  opacity: 0.94;
}

/* Login page: two top-level sibling buttons inside the same div */
div > button:nth-of-type(1):nth-last-of-type(2),
div > button:nth-of-type(2):nth-last-of-type(1) {
  width: calc(50% - 0.5rem);
  display: inline-flex;
}

div > button:nth-of-type(2):nth-last-of-type(1) {
  margin-left: 1rem;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  div > button:nth-of-type(1):nth-last-of-type(2),
  div > button:nth-of-type(2):nth-last-of-type(1) {
    width: 100%;
    margin-left: 0;
  }

  body {
    padding: 1rem;
  }

  body > div {
    padding: 1.5rem;
  }
}
