/* mhico — main stylesheet */

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

body {
  font-family: 'Roboto', sans-serif;
  color: #111827;
  background-color: #f4f6f9;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.btn-primary {
  background-color: #030213;
  color: #fff;
}
.btn-primary:hover { background-color: #1e1b4b; }

.btn-blue {
  background-color: #2563eb;
  color: #fff;
}
.btn-blue:hover { background-color: #1d4ed8; }

.btn-indigo {
  background-color: #4f46e5;
  color: #fff;
}
.btn-indigo:hover { background-color: #4338ca; }

.btn-outline {
  background-color: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-outline:hover { background-color: #f9fafb; }

.btn-ghost {
  background-color: transparent;
  color: #4b5563;
  border: none;
}
.btn-ghost:hover { background-color: #f3f4f6; color: #111827; }

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* ── Inputs ─────────────────────────────────────── */
.input-field {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: 'Roboto', sans-serif;
  color: #111827;
  background-color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.input-field::placeholder { color: #9ca3af; }
textarea.input-field { resize: vertical; }

/* ── Cards ──────────────────────────────────────── */
.card {
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Card with colored top-accent strip (settings sections) */
.card-section {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
}
.card-section-body { padding: 1.5rem; }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-blue  { background-color: #dbeafe; color: #1d4ed8; }
.badge-green { background-color: #dcfce7; color: #15803d; }
.badge-amber { background-color: #fef3c7; color: #92400e; }
.badge-red   { background-color: #fee2e2; color: #991b1b; }
.badge-gray  { background-color: #f3f4f6; color: #374151; }

/* ── Progress bar ───────────────────────────────── */
.progress-bar {
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background-color: #2563eb;
  border-radius: 9999px;
  transition: width 0.3s;
}

/* ── Navbar (legacy — public pages) ────────────── */
.top-nav {
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── App nav (dashboard, dark navy) ────────────── */
.app-nav {
  background-color: #1a2744;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 3.5rem;
}
.app-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Sidebar ────────────────────────────────────── */
.app-sidebar {
  width: 16rem;
  background-color: #fff;
  border-right: 1px solid #e9ecf0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* Mobile: sidebar slides in from the left. Uses plain transform — no Tailwind CSS-variable dependency. */
@media (max-width: 767px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 200ms ease;
  }
  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #4b5563;
  transition: background-color 0.12s, color 0.12s;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-weight: 400;
}
.sidebar-item:hover { background-color: #f4f6f9; color: #111827; }
.sidebar-item.active {
  background-color: #1a2744;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(26,39,68,0.18);
}
.sidebar-item.active svg { color: #5eead4; } /* teal-300 */
.sidebar-item.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Dashboard tabs ─────────────────────────────── */
.dash-tabs {
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 4rem;
  z-index: 40;
}
.dash-tabs-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 400;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.dash-tab:hover { color: #111827; border-bottom-color: #d1d5db; }
.dash-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 500; }
.dash-tab svg { width: 1rem; height: 1rem; }

/* ── Flash messages ─────────────────────────────── */
/* container styles moved to Tailwind in base.html */
.flash-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  animation: slideIn 0.2s ease-out;
}
.flash-msg.success { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.flash-msg.error   { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash-msg.info    { background-color: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Upload zone ────────────────────────────────── */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.upload-zone:hover { border-color: #2563eb; background-color: #eff6ff; }
.upload-zone.dragging { border-color: #2563eb; background-color: #dbeafe; }

/* ── Step indicator ─────────────────────────────── */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.step-num.pending  { background-color: #f3f4f6; color: #6b7280; }
.step-num.active   { background-color: #2563eb; color: #fff; }
.step-num.complete { background-color: #22c55e; color: #fff; }

/* ── Spinner ────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── OTP digit input ────────────────────────────── */
.otp-digit {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border: 2px solid #d1d5db;
  border-radius: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
  background-color: #f9fafb;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  caret-color: transparent;
}
.otp-digit:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background-color: #eff6ff;
}
.otp-digit.otp-filled {
  border-color: #374151;
  background-color: #fff;
}

/* ── Utilities ──────────────────────────────────── */
.divider { border: none; border-top: 2px solid #e5e7eb; margin: 2rem 0; }
.label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; }
.help-text { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; }
.section-title { font-size: 1.875rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; }
.section-sub   { font-size: 1rem; color: #4b5563; }

/* ── Stat card ──────────────────────────────────── */
.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; }
.stat-label { font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.75rem; }
.stat-value { font-size: 1.875rem; font-weight: 700; color: #111827; margin-bottom: 0.25rem; }
.stat-sub   { font-size: 0.875rem; color: #6b7280; margin-bottom: 1rem; }
.stat-divider { border-top: 1px solid #e5e7eb; padding-top: 1rem; }
.stat-detail-label { font-size: 0.75rem; font-weight: 500; color: #374151; margin-bottom: 0.25rem; }
.stat-detail-value { font-size: 0.75rem; color: #6b7280; }

/* ── AI chat markdown ───────────────────────────── */
.ai-message p { margin: 0 0 0.6em; }
.ai-message p:last-child { margin-bottom: 0; }
.ai-message ul, .ai-message ol { margin: 0.4em 0 0.6em 1.25em; }
.ai-message ul { list-style-type: disc; }
.ai-message ol { list-style-type: decimal; }
.ai-message li { margin-bottom: 0.2em; }
.ai-message h1, .ai-message h2, .ai-message h3 {
  font-weight: 600; margin: 0.75em 0 0.35em; line-height: 1.3;
}
.ai-message h1 { font-size: 1.1em; }
.ai-message h2 { font-size: 1.05em; }
.ai-message h3 { font-size: 1em; }
.ai-message code {
  background: #f3f4f6; border-radius: 0.25rem;
  padding: 0.1em 0.35em; font-size: 0.85em; font-family: monospace;
}
.ai-message pre {
  background: #f3f4f6; border-radius: 0.5rem;
  padding: 0.75rem 1rem; overflow-x: auto; margin: 0.5em 0;
}
.ai-message pre code { background: none; padding: 0; }
.ai-message blockquote {
  border-left: 3px solid #d1d5db; padding-left: 0.75rem;
  color: #6b7280; margin: 0.5em 0;
}
.ai-message strong { font-weight: 600; }
.ai-message em { font-style: italic; }
.ai-message a { color: #2563eb; text-decoration: underline; }
.ai-message hr { border: none; border-top: 1px solid #e5e7eb; margin: 0.75em 0; }

/* ── Claim card ─────────────────────────────────── */
.claim-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; transition: box-shadow 0.15s; }
.claim-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
