/* Link Car Care admin-aligned theme */
:root {
  --lcc-bg: #f8f9fb;
  --lcc-surface: #ffffff;
  --lcc-border: #e5e7eb;
  --lcc-border-strong: #d1d5db;
  --lcc-navy: #1a2b4b;
  --lcc-navy-hover: #152238;
  --lcc-text: #374151;
  --lcc-text-muted: #6b7280;
  --lcc-heading: #1a2b4b;
  --lcc-red: #dc3545;
  --lcc-red-hover: #c82333;
  --lcc-green: #28a745;
  --lcc-orange: #f59e0b;
  --lcc-radius: 12px;
  --lcc-radius-sm: 8px;
  --lcc-shadow: 0 1px 3px rgba(26, 43, 75, 0.08), 0 4px 12px rgba(26, 43, 75, 0.06);
  --lcc-focus-ring: rgba(26, 43, 75, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: var(--lcc-text);
  background: var(--lcc-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--lcc-heading);
  font-weight: 700;
}

.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.page-stack {
  flex-direction: column;
  gap: 8px;
}

.page-stack .site-footer {
  margin-top: 0;
  padding-top: 0;
}

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

.login-card {
  width: 100%;
  max-width: 460px;
  padding: 28px 28px 24px;
}

.login-card form,
.login-card label,
.login-card .error {
  text-align: left;
}

.brand {
  text-align: center;
  margin-bottom: 22px;
}

.brand--row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 0;
}

.brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand--row img {
  width: 52px;
  height: 52px;
}

.brand h1 {
  margin: 10px 0 4px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.brand--row h1,
.brand--row .page-title {
  margin: 0 0 2px;
  font-size: 1.2rem;
}

.brand p {
  margin: 0;
  color: var(--lcc-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--lcc-heading);
}

/* Include inputs without an explicit type (defaults to text in HTML). */
.lcc-card input:not([type="submit"]):not([type="button"]):not([type="hidden"]),
input[type="email"],
input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--lcc-border-strong);
  background: var(--lcc-surface);
  color: var(--lcc-text);
  border-radius: var(--lcc-radius-sm);
  padding: 11px 12px;
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--lcc-navy);
  box-shadow: 0 0 0 3px var(--lcc-focus-ring);
}

input.email-locked {
  background: #f3f4f6;
  color: var(--lcc-text-muted);
  cursor: not-allowed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--lcc-radius-sm);
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    opacity 0.15s ease;
}

.btn-block {
  width: 100%;
  margin-top: 10px;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--lcc-navy-hover);
}

.btn-outline {
  background: var(--lcc-surface);
  color: var(--lcc-navy);
  border: 1px solid var(--lcc-border-strong);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--lcc-navy);
  background: #f3f4f6;
}

.btn-logout {
  background: var(--lcc-red);
  color: #fff;
  white-space: nowrap;
}

.btn-logout:hover {
  background: var(--lcc-red-hover);
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error {
  margin-top: 12px;
  color: var(--lcc-red);
  font-size: 0.9rem;
  min-height: 20px;
}

.container {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.container .site-footer {
  display: flex;
  justify-content: center;
  width: 100%;
}

.page-title {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lcc-heading);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--lcc-surface);
  border: 1px solid var(--lcc-border);
  border-radius: var(--lcc-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--lcc-shadow);
}

.section-card {
  padding: 20px;
  margin-bottom: 16px;
}

.section-card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.small {
  color: var(--lcc-text-muted);
  margin: 10px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

pre {
  margin: 0;
  background: #f3f4f6;
  border: 1px solid var(--lcc-border);
  border-radius: var(--lcc-radius-sm);
  padding: 12px;
  overflow: auto;
  color: var(--lcc-text);
  font-size: 0.8rem;
}

#cardExisting,
#cardResponse {
  display: none !important;
}

.app-loading-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--lcc-text-muted);
  font-size: 1rem;
  background: var(--lcc-bg);
}

.app-loading-shell.is-dismissed {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#appMainShell.is-visible {
  display: block !important;
  visibility: visible !important;
}

.site-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 16px;
  color: var(--lcc-text-muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.page-stack > .site-footer {
  align-self: center;
}

.site-footer img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.lcc-debug-panel {
  position: fixed;
  bottom: 8px;
  left: 8px;
  right: 8px;
  max-height: 40vh;
  overflow: auto;
  z-index: 99999;
  background: var(--lcc-surface);
  color: var(--lcc-text);
  font:
    12px/1.4 ui-monospace,
    monospace;
  padding: 10px;
  border-radius: var(--lcc-radius-sm);
  border: 1px solid var(--lcc-border-strong);
  box-shadow: var(--lcc-shadow);
  white-space: pre-wrap;
  word-break: break-all;
}

.complete-card {
  width: 100%;
  max-width: 520px;
  padding: 28px 24px;
  text-align: center;
}

.complete-card p {
  margin: 0 0 12px;
  color: var(--lcc-text-muted);
  font-size: 1rem;
  line-height: 1.55;
  text-align: left;
}

.complete-card p:last-of-type {
  margin-bottom: 22px;
}

.complete-card h1 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.35;
  text-align: center;
}
