/* MORE Lingua — Design System */
/* Minimal, clean. Matches the pipeline's professional character. */

:root {
  --navy:    #1A2F4A;
  --blue:    #1F5C8B;
  --midblue: #2E75B6;
  --ltblue:  #D6E8F7;
  --teal:    #0F6E56;
  --ltteal:  #E1F5EE;
  --amber:   #7A4A00;
  --ltamber: #FEF3DC;
  --coral:   #8B2A10;
  --ltcoral: #FAECE7;
  --gray:    #444441;
  --ltgray:  #F5F4F1;
  --dkgray:  #2C2C2A;
  --border:  #C5D8EC;
  --white:   #ffffff;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Courier New", monospace;
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--dkgray);
  background: var(--ltgray);
  min-height: 100vh;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

.topbar-title {
  color: white;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.main-content {
  padding: 1.5rem;
  overflow-y: auto;
}

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

.nav-section {
  padding: 0 1rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  margin-top: 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 1.25rem;
  font-size: 14px;
  color: var(--dkgray);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}

.nav-item:hover { background: var(--ltgray); }
.nav-item.active {
  background: var(--ltblue);
  border-left-color: var(--midblue);
  color: var(--navy);
  font-weight: 500;
}

.nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.nav-dot.done    { background: var(--teal); }
.nav-dot.active  { background: var(--midblue); }
.nav-dot.pending { background: var(--border); }
.nav-dot.error   { background: var(--coral); }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.card-subtitle {
  font-size: 13px;
  color: var(--gray);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dkgray);
  transition: background 0.12s, opacity 0.12s;
  text-decoration: none;
}

.btn:hover    { background: var(--ltgray); }
.btn:active   { opacity: 0.8; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--blue); border-color: var(--blue); }

.btn-success {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.btn-danger {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

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

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  color: var(--dkgray);
  background: var(--white);
  transition: border-color 0.12s;
}

.form-control:focus {
  outline: none;
  border-color: var(--midblue);
  box-shadow: 0 0 0 3px rgba(46,117,182,0.12);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* ── Status badges ──────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
}

.badge-pending  { background: var(--ltgray);   color: var(--gray); }
.badge-running  { background: var(--ltblue);   color: var(--blue); }
.badge-done     { background: var(--ltteal);   color: var(--teal); }
.badge-error    { background: var(--ltcoral);  color: var(--coral); }
.badge-flagged  { background: var(--ltamber);  color: var(--amber); }

/* ── Check results ──────────────────────────────────────────────────────── */

.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 2px 0;
}

.check-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.check-dot.pass { background: var(--teal); }
.check-dot.fail { background: var(--coral); }

.check-item.pass { color: var(--teal); }
.check-item.fail { color: var(--coral); }

/* ── Progress bar ───────────────────────────────────────────────────────── */

.progress-bar {
  height: 6px;
  background: var(--ltblue);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--midblue);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ── Image grid (Halt 4) ────────────────────────────────────────────────── */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.image-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  background: var(--white);
}

.image-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.image-card .image-meta {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--gray);
}

.image-card.approved { border-color: var(--teal); }
.image-card.rejected { border-color: var(--coral); opacity: 0.6; }
.image-card:hover    { border-color: var(--midblue); }

/* ── Utilities ──────────────────────────────────────────────────────────── */

.text-muted   { color: var(--gray); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; }
.font-mono    { font-family: var(--font-mono); }
.mt-1         { margin-top: 0.25rem; }
.mt-2         { margin-top: 0.5rem; }
.mt-4         { margin-top: 1rem; }
.mb-4         { margin-bottom: 1rem; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-2        { gap: 0.5rem; }
.gap-4        { gap: 1rem; }
.grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3       { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Mobile (iPhone PWA) ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 56px auto 1fr;
  }
  .sidebar {
    display: none;
    grid-row: 2;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar.open { display: block; }
  .main-content { padding: 1rem; }
  .check-list   { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .image-grid   { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}  50%       { opacity: 0.35; }
}

/* Pipeline nav animation */
@keyframes ml-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Pipeline nav ────────────────────────────────────────────────────────────── */
[v-cloak] { display: none; }
#pipeline-nav { width: 100%; }
@keyframes ml-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
