/* ==========================================================================
 * File: portal.css
 * Version: 1.0.2
 * Last Modified: 2026-08-05
 * Modified By: Cursor + Claude Code
 * Change: Hero login button, true viewport centering.
 * Deploy: /home/dereksenbeck/public_html/assets/portal.css
 * ========================================================================== */

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-raised: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888888;
  --text-dim: #666666;
  --focus: #ffffff;
  --danger: #cccccc;
  --radius: 12px;
  --touch: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.shell-brand {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.shell-footer {
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.landing-only {
  display: grid;
  place-items: center;
  min-height: 100%;
  min-height: 100dvh;
  padding: 1.5rem;
  background: var(--bg);
}

.btn-login-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
  min-height: 3.25rem;
  padding: 0.875rem 2.75rem;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--bg);
  background: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-login-hero:hover,
.btn-login-hero:focus-visible {
  text-decoration: none;
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.45);
  outline: none;
}

.btn-login-hero:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.3);
}

.landing-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.shell-plain .shell-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  max-width: 360px;
}

.card-plain {
  border: none;
  background: transparent;
  padding: 0;
}

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 8rem);
  text-align: center;
  gap: 1.5rem;
}

.landing-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
}

.landing-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-copy {
  margin: 0;
  max-width: 20rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.card-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  min-height: var(--touch);
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--focus);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input-code {
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch);
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.88;
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--surface-raised);
  opacity: 1;
}

.btn-danger {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.btn-sm {
  min-height: 40px;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}

.btn svg,
.tool-link svg,
.device-row svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.alert-error {
  color: var(--text);
}

.alert-info {
  color: var(--text-muted);
}

.step-indicator {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.step-dot {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
}

.step-dot.is-active {
  background: var(--text);
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: var(--touch);
  padding: 0.875rem 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s ease;
}

.tool-link:hover,
.tool-link:focus-visible {
  background: var(--surface-raised);
  text-decoration: none;
}

.tool-link-body {
  flex: 1;
  min-width: 0;
}

.tool-link-title {
  display: block;
  font-weight: 500;
}

.tool-link-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.tool-link-chevron {
  width: 1rem;
  height: 1rem;
  color: var(--text-dim);
}

.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.device-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.device-row.is-current {
  border-color: var(--text-muted);
}

.device-row-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.device-row-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.device-row-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.device-row-meta {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.device-row-meta span {
  display: block;
}

.device-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  vertical-align: middle;
}

.device-actions {
  display: flex;
  gap: 0.5rem;
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-nav-link svg {
  width: 1rem;
  height: 1rem;
}

.section-heading {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.section-copy {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.inline-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 480px) {
  .shell-main {
    padding-top: 2rem;
  }

  .inline-actions {
    flex-direction: row;
  }

  .inline-actions .btn {
    flex: 1;
  }
}
