/* RiverMeter - simple modern UI (no external deps) */

:root {
  --bg: #f6f1e8;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --text: rgba(15, 23, 42, 0.92);
  --muted: rgba(15, 23, 42, 0.70);
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  --brand: #0284c7;
  --brand-2: #0f766e;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1080px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 16px;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: none;
  background: rgba(246, 241, 232, 0.96);
  border-bottom: 1px solid var(--border);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__logo {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 820px) {
  .brand__logo { height: 38px; }
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 4px rgba(93, 214, 255, 0.15);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-form {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
}

.pill--muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  background: rgba(2, 132, 199, 0.06);
  text-decoration: none;
}

.btn--primary {
  border-color: rgba(2, 132, 199, 0.35);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.16), rgba(15, 118, 110, 0.12));
}

.btn--danger {
  border-color: rgba(220, 38, 38, 0.30);
  background: rgba(220, 38, 38, 0.08);
}

.link {
  padding: 8px 10px;
  border-radius: 10px;
}

.link--button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.link:hover {
  background: rgba(2, 132, 199, 0.08);
  text-decoration: none;
}

.hamburger {
  display: none;
}

.dropdown {
  display: none;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dropdown a {
  display: block;
  padding: 12px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dropdown a:first-child { border-top: 0; }
.dropdown a:hover { background: rgba(2, 132, 199, 0.08); text-decoration: none; }

.dropdown.is-open { display: block; }

.nav__dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown--floating {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 200px;
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .hamburger { display: inline-flex; }
}

/* Layout bits */
.hero {
  padding: 26px 0 12px;
}

.hero__title {
  font-size: clamp(28px, 3vw, 40px);
  margin: 0;
}

.hero__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

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

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card--action:hover {
  background: rgba(2, 132, 199, 0.05);
  text-decoration: none;
}

.card h2 {
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card__cta {
  display: inline-block;
  margin-top: 14px;
  color: var(--text);
  opacity: 0.92;
}

.page h1 { margin-top: 10px; }
.muted { color: var(--muted); }

/* Progress bar (determinate by width set on inner span) */
.rm-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.10);
  overflow: hidden;
}

.rm-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(93, 214, 255, 0.35), rgba(110, 231, 183, 0.85));
  transition: width 220ms ease;
}

/* Forms */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 22px 16px 36px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.auth-card h1 {
  margin: 0 0 6px;
}

.auth-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.field { margin-bottom: 12px; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

:where(
  input[type="email"],
  input[type="search"],
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="url"],
  input[type="datetime-local"],
  textarea,
  select
) {
  width: 100%;
  padding: 11px 12px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

:where(textarea) {
  min-height: 110px;
  line-height: 1.4;
  resize: vertical;
}

:where(select) {
  cursor: pointer;
  padding-right: 38px;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='rgba(15,23,42,0.65)' d='M5.6 7.6a1 1 0 0 1 1.4 0L10 10.6l3-3a1 1 0 1 1 1.4 1.4l-3.7 3.7a1 1 0 0 1-1.4 0L5.6 9a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(2,132,199,0.05), rgba(15,118,110,0.04));
  background-repeat: no-repeat, no-repeat;
  background-position: right 12px center, 0 0;
  background-size: 16px 16px, auto;
}

:where(input, textarea, select):focus {
  border-color: rgba(2, 132, 199, 0.55);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18);
  background: #ffffff;
}

:where(input, textarea, select)::placeholder {
  color: rgba(15, 23, 42, 0.45);
}

:where(input[type="checkbox"], input[type="radio"]) {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--brand);
}

:where(input[type="file"]) {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #ffffff;
  color: var(--muted);
}

.form-errors {
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0;
}

.form-errors ul { margin: 0; padding-left: 18px; }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.small { font-size: 0.92rem; color: var(--muted); }
