/* ============================================================
   Reportworq Support Diagnostics — Global Styles
   Brand palette:
     Navy      #082868
     Teal      #08594A
     Lt Teal   #37A686
     Orange    #F55E31
   Fonts: Trebuchet MS (headings) + Roboto (body)
   ============================================================ */

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

:root {
  --navy:        #082868;
  --teal:        #08594A;
  --teal-light:  #37A686;
  --orange:      #F55E31;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --border:      #dde3ee;
  --text:        #1a2033;
  --text-muted:  #6b7a99;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(8, 40, 104, 0.10);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--off-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Navigation ─────────────────────────────────────────── */

.nav {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  box-shadow: 0 2px 8px rgba(8,40,104,0.18);
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.nav-logo img,
.nav-logo-img {
  height: 28px;
  display: block;
  /* Invert the black logo to white so it shows on the dark navy nav */
  filter: brightness(0) invert(1);
}

.nav-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.25);
  margin: 0 16px;
}

.nav-product-name {
  display: block;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.nav-product-sub {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-tag {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.logout-btn {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 4px 12px;
  transition: background 0.15s, color 0.15s;
}
.logout-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  text-decoration: none;
}

/* ── Accent bar ─────────────────────────────────────────── */

.accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 60%, var(--orange) 100%);
  flex-shrink: 0;
}

/* ── Layout ─────────────────────────────────────────────── */

.page {
  flex: 1;
  padding: 36px 0 60px;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Page header ────────────────────────────────────────── */

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Card ───────────────────────────────────────────────── */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.card-title {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── Form ───────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.field label .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(55,166,134,0.15);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input[type="file"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--off-white);
  cursor: pointer;
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.row .field {
  min-width: 180px;
}

/* ── Submit button ──────────────────────────────────────── */

.btn-submit {
  margin-top: 20px;
  padding: 11px 32px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-submit:hover {
  background: var(--teal-light);
}
.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Spinner ────────────────────────────────────────────── */

.spinner {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.spin {
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* ── Results card ───────────────────────────────────────── */

.results-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--navy);
}

.results-header-title {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.btn-copy {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 4px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-copy:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}
.btn-copy.copied {
  border-color: var(--teal-light);
  color: var(--teal-light);
}

.results-body {
  padding: 24px 28px;
  line-height: 1.7;
}

/* ── Markdown rendering in results ─────────────────────── */

.results-body h3 {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 20px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.results-body h3:first-child {
  margin-top: 0;
}

.results-body p {
  margin-bottom: 10px;
  font-size: 14px;
}

.results-body ul, .results-body ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.results-body li {
  font-size: 14px;
  margin-bottom: 4px;
}

.results-body strong {
  color: var(--text);
}

.results-body code {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.results-body pre {
  background: #1a2033;
  color: #d0d9f0;
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  margin-bottom: 12px;
}
.results-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
}

/* ── Error message ──────────────────────────────────────── */

.error-msg {
  color: #c0392b;
  background: #fdf0ee;
  border: 1px solid #f5c2bb;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
}

/* ── Login page ─────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  padding: 24px;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  height: 36px;
  margin-bottom: 8px;
}

.login-app-name {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.login-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s, border-color 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-google:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  border-color: #bbb;
  text-decoration: none;
}

.btn-google svg {
  flex-shrink: 0;
}

.login-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fdf0ee;
  border: 1px solid #f5c2bb;
  border-radius: var(--radius);
  color: #c0392b;
  font-size: 13px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
  .nav {
    padding: 0 16px;
  }
  .container {
    padding: 0 16px;
  }
  .card {
    padding: 20px 16px;
  }
  .results-body {
    padding: 18px 16px;
  }
  .row {
    flex-direction: column;
  }
  .login-card {
    padding: 28px 20px;
  }
}
