/* FormWatch — shared styles */

:root {
  --ink: #101826;
  --ink-soft: #3a4657;
  --paper: #f7f8fa;
  --card: #ffffff;
  --line: #e2e6ec;
  --ok: #16803c;
  --ok-bg: #e8f5ec;
  --fail: #b42318;
  --fail-bg: #fdeceb;
  --pending: #b25e00;
  --pending-bg: #fdf1e2;
  --accent: #1c6e5c;
  --accent-hover: #17594a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 38, 0.06), 0 8px 24px rgba(16, 24, 38, 0.06);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.role-pill {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
}

.btn-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 30px 28px;
}

.auth-header {
  margin-bottom: 24px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}

label:first-of-type {
  margin-top: 0;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--card);
}

.btn-primary {
  width: 100%;
  margin-top: 22px;
  padding: 11px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.auth-toggle {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 0;
}

.message {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: none;
}

.message.show {
  display: block;
}

.message.error {
  background: var(--fail-bg);
  color: var(--fail);
}

.message.success {
  background: var(--ok-bg);
  color: var(--ok);
}

.main {
  flex: 1;
  padding: 32px 28px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

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

.panel h1 {
  font-size: 18px;
  margin: 0 0 4px;
}

.panel .subtitle {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 20px;
}

.loading-state {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 40px 0;
}

.site-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.site-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.site-row:first-child {
  padding-top: 0;
}

.site-row-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.site-row-meta {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  word-break: break-word;
}

.site-owner {
  color: var(--accent);
  font-weight: 600;
}

.site-row .delete-btn {
  flex-shrink: 0;
  color: var(--fail);
}

.site-row .delete-btn:hover {
  text-decoration: underline;
}

.site-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.test-now-btn {
  color: var(--accent);
}

.test-result {
  display: none;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  max-width: 420px;
}

.test-result.show {
  display: inline-block;
}

.test-result.pass {
  background: var(--ok-bg);
  color: var(--ok);
}

.test-result.fail {
  background: var(--fail-bg);
  color: var(--fail);
}

.test-result.pending {
  background: var(--pending-bg);
  color: var(--pending);
}
