/**
 * MIMO web — shared styles.
 *
 * Same design language as the app: navy and hi-vis amber, workwear rather than
 * SaaS pastel. Colour carries meaning (state, action), never decoration.
 */

:root {
  --navy: #16324f;
  --navy-deep: #0f2338;
  --amber: #c2620a;
  --amber-bright: #e8963c;

  --ink: #0f1b27;
  --ink-muted: #5a6b7c;
  --paper: #eef1f4;
  --surface: #ffffff;
  --border: #d8dee6;

  --success: #146b45;
  --danger: #b3261e;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(15, 27, 39, 0.06), 0 8px 24px rgba(15, 27, 39, 0.08);

  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 520px;
}

/* ---------------------------------------------------------------- header */

.masthead {
  background: var(--navy);
  color: #fff;
  padding: 20px 0;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: #fff;
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--amber);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.masthead nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.masthead nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.masthead nav a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------- hero */

.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 64px 0 76px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin: 0 0 18px;
  max-width: 18ch;
}

.hero p {
  font-size: clamp(17px, 2.2vw, 20px);
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 30px;
  max-width: 56ch;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--amber-bright);
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------- content */

section {
  padding: 60px 0;
}

section h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}

.lede {
  color: var(--ink-muted);
  font-size: 17px;
  margin: 0 0 34px;
  max-width: 62ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.card .spine {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--amber);
  margin-bottom: 14px;
}

.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

ul.plain {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-muted);
}

ul.plain li {
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 15px 26px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: filter 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--amber);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ---------------------------------------------------------------- auth pages */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.auth-card .logo {
  color: var(--ink);
  justify-content: center;
  margin-bottom: 26px;
}

.auth-card h1 {
  font-size: 25px;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
}

.auth-card p.message {
  color: var(--ink-muted);
  font-size: 16px;
  margin: 0 0 26px;
}

.status-icon {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 30px;
  line-height: 1;
}

.status-icon.ok {
  background: #e3f3ec;
  color: var(--success);
}

.status-icon.bad {
  background: #fbe9e7;
  color: var(--danger);
}

.status-icon.info {
  background: #fceedc;
  color: var(--amber);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 999px;
  margin: 0 auto 20px;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- forms */

.field {
  text-align: left;
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  padding: 14px 15px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.field input:focus {
  outline: none;
  border-color: var(--navy);
}

.field .hint {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.field .error {
  font-size: 13px;
  color: var(--danger);
  margin-top: 6px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- footer */

footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 34px 0;
  font-size: 14px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 640px) {
  .masthead nav {
    display: none;
  }

  .auth-card {
    padding: 32px 22px;
  }
}
