/* Methodical Security — shared app styling for the new tenant/auth pages.
   Keep small and presentational — no framework. */

:root {
  --navy: #0b1526;
  --navy-mid: #132140;
  --blue: #2463eb;
  --blue-hover: #1d50c8;
  --blue-light: #eff6ff;
  --accent: #38bdf8;
  --amber: #f59e0b;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #f8fafc;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 16px rgba(11, 21, 38, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { color: var(--muted); margin: 0 0 1em; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---- Top nav ---- */
.app-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 21, 38, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.app-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.app-nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.app-nav .brand-mark {
  width: 32px; height: 32px; border-radius: 7px; background: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900;
}
.app-nav-links { display: flex; gap: 28px; align-items: center; }
.app-nav-links a {
  color: rgba(255, 255, 255, .72);
  font-size: .9rem; font-weight: 500;
}
.app-nav-links a:hover { color: #fff; text-decoration: none; }
.app-nav-user {
  color: rgba(255, 255, 255, .72); font-size: .85rem;
}

/* ---- Hero (marketing) ---- */
.hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 60%, #1a2f5e 100%);
  color: #fff;
  padding: 88px 0 72px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(36, 99, 235, .25) 0%, transparent 70%),
    radial-gradient(ellipse 35% 55% at 10% 80%, rgba(56, 189, 248, .14) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; max-width: 760px;
  padding-left: 22px; border-left: 4px solid var(--accent);
}
.hero-inner .eyebrow {
  display: inline-block; color: var(--accent);
  font-size: .8rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-inner h1 { color: #fff; margin-bottom: 22px; }
.hero-inner > p {
  color: rgba(255, 255, 255, .82);
  font-size: 1.15rem; max-width: 620px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  font-size: .92rem; font-weight: 600;
  border-radius: var(--radius); border: none; cursor: pointer;
  transition: background .14s, transform .1s, box-shadow .14s;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 12px rgba(36, 99, 235, .3);
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline-light {
  background: transparent; color: #fff;
  border: 2px solid rgba(255, 255, 255, .4);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .7);
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--blue-light); border-color: #bfdbfe; color: var(--blue); }
.btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 8px 16px; font-size: .82rem; }

.cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

/* ---- Sections ---- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow {
  color: var(--blue); font-weight: 700;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 8px; display: block;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 24px;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.feature-card:hover {
  border-color: #bfdbfe; box-shadow: var(--shadow); transform: translateY(-2px);
}
.feature-card h3 { color: var(--navy); margin-bottom: 8px; }
.feature-card p { font-size: .9rem; margin: 0; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue-light); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 1.4rem; font-weight: 800;
}

/* ---- Pricing card ---- */
.pricing { background: var(--surface); }
.pricing-card {
  max-width: 480px; margin: 0 auto;
  background: #fff; border: 2px solid var(--blue);
  border-radius: var(--radius-lg); padding: 36px 32px;
  text-align: center; box-shadow: var(--shadow);
}
.pricing-card .price {
  font-size: 3rem; font-weight: 800; color: var(--navy);
  line-height: 1; margin: 8px 0 4px;
}
.pricing-card .price-period { color: var(--muted); font-size: .9rem; }
.pricing-card ul {
  text-align: left; margin: 24px 0; padding: 0;
  list-style: none;
}
.pricing-card li {
  padding: 8px 0 8px 28px; position: relative;
  color: var(--text); font-size: .95rem;
}
.pricing-card li::before {
  content: '✓'; position: absolute; left: 0; top: 8px;
  color: var(--blue); font-weight: 800;
}

/* ---- Forms / cards ---- */
.page-shell { padding: 56px 0; min-height: calc(100vh - 64px); background: var(--surface); }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.card-narrow { max-width: 460px; margin: 0 auto; }
.card-wide { max-width: 720px; margin: 0 auto; }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--navy); margin-bottom: 6px;
}
.field input, .field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: inherit; color: var(--text);
  background: #fff; transition: border-color .12s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-help { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.form-actions.between { justify-content: space-between; }

.alert {
  padding: 12px 16px; border-radius: var(--radius);
  border-left: 4px solid; font-size: .9rem;
  margin-bottom: 18px;
}
.alert-error    { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
.alert-success  { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.alert-info     { background: var(--blue-light); border-color: var(--blue); color: #1e3a8a; }

/* ---- Tables ---- */
table.simple {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
table.simple th, table.simple td {
  padding: 12px 16px; text-align: left; font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
table.simple th {
  background: var(--surface);
  font-weight: 700; color: var(--navy);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
}
table.simple tr:last-child td { border-bottom: none; }

/* ---- Tenant chip ---- */
.tenant-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--blue-light); color: var(--blue);
  font-size: .82rem; font-weight: 600;
  border: 1px solid #bfdbfe;
}

/* ---- Misc ---- */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono  { font-family: 'SF Mono', 'Fira Code', monospace; font-size: .85rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .app-nav-links { gap: 16px; }
}
