/* Clearline LIMS demo — matches live UI structure */

body { background: #fff; color: #333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ============================================================ */
/* TOP TOOLBAR — dark bar, brand on left, view actions, user on right */
/* ============================================================ */
#clearline-toolbar {
  background-color: #293333 !important;
  padding: 0 16px;
  min-height: 48px;
  display: flex;
  align-items: stretch;
  border: none;
}
#clearline-toolbar .navbar-brand {
  font-weight: 700;
  letter-spacing: .14em;
  color: #fff !important;
  font-size: 16px;
  text-transform: uppercase;
  padding: 0 20px 0 0;
  margin: 0;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,.08);
}
#clearline-toolbar .navbar-brand .brand-mark {
  display: inline-block;
  width: 22px; height: 22px;
  background: #5db4b5;
  color: #293333;
  font-weight: 900;
  text-align: center;
  line-height: 22px;
  border-radius: 3px;
  margin-right: 8px;
  font-size: 13px;
}
#clearline-toolbar .content-views {
  display: flex;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
#clearline-toolbar .content-views > li > a {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.85);
  padding: 0 14px;
  font-size: 13px;
  text-decoration: none;
}
#clearline-toolbar .content-views > li > a:hover { background: rgba(255,255,255,.06); color: #fff; }
#clearline-toolbar .content-views > li.active > a { background: rgba(255,255,255,.10); color: #fff; }
#clearline-toolbar .right-actions { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
#clearline-toolbar .right-actions > li > a {
  color: rgba(255,255,255,.85);
  padding: 0 10px;
  display: flex;
  align-items: center;
  font-size: 14px;
  text-decoration: none;
  min-height: 48px;
}
#clearline-toolbar .right-actions > li > a:hover { color: #fff; }
#clearline-toolbar .state-badge-toolbar {
  background: #f0c14b;
  color: #293333;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================ */
/* SIDEBAR — narrow icon-only strip */
/* ============================================================ */
.demo-sidebar {
  width: 44px;
  background: #fff;
  border-right: 1px solid #e1e4e8;
  padding: 8px 0 0;
  flex-shrink: 0;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.demo-sidebar .sidebar-main { flex: 1; }
.demo-sidebar .sidebar-demo-nav {
  border-top: 1px solid #e1e4e8;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #f8f9fa;
  position: sticky;
  bottom: 0;
}
.demo-sidebar .demo-nav-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5db4b5;
  border: 1px solid #cfe5e5;
  border-radius: 3px;
  background: #fff;
  font-size: 11px;
  text-decoration: none;
}
.demo-sidebar .demo-nav-btn:hover { background: #5db4b5; color: #fff; border-color: #5db4b5; }
.demo-sidebar .demo-nav-btn.disabled { opacity: 0.25; pointer-events: none; }
.demo-sidebar .demo-nav-btn.demo-nav-index { font-size: 10px; color: #6c757d; border-color: #dee2e6; }
.demo-sidebar .demo-nav-btn.demo-nav-index:hover { background: #6c757d; color: #fff; border-color: #6c757d; }
.demo-sidebar a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 36px;
  color: #6c757d;
  font-size: 15px;
  text-decoration: none;
  position: relative;
}
.demo-sidebar a:hover { color: #293333; background: #f6f7f8; }
.demo-sidebar a.active {
  color: #f0a020;  /* highlight color for the active section icon */
}
.demo-sidebar a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #f0a020;
}
.demo-sidebar .sidebar-divider {
  height: 1px;
  background: #e1e4e8;
  margin: 6px 8px;
}

/* ============================================================ */
/* MAIN LAYOUT */
/* ============================================================ */
.demo-wrapper { display: flex; min-height: calc(100vh - 48px); }
.demo-main { flex: 1; min-width: 0; background: #fff; }

/* Breadcrumb strip */
.crumb-bar {
  background: #f5f5f5;
  border-bottom: 1px solid #e1e4e8;
  padding: 12px 24px;
}
.crumb-bar .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #6c757d;
  list-style: none;
  display: flex;
  gap: 6px;
}
.crumb-bar .breadcrumb-item { display: inline-block; }
.crumb-bar .breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding-right: 6px;
  color: #adb5bd;
}
.crumb-bar .breadcrumb-item a { color: #0a8b8c; text-decoration: none; }
.crumb-bar .breadcrumb-item a:hover { text-decoration: underline; }
.crumb-bar .breadcrumb-item + .breadcrumb-item::before { color: #adb5bd; }
.crumb-bar .breadcrumb-item.active { color: #6c757d; }

/* Page content area */
.page-content { padding: 18px 24px 24px; }

/* Page title row (big title + icon + count + add button) */
.page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.page-title-row .page-icon {
  font-size: 28px;
  color: #293333;
}
.page-title-row .page-title {
  font-size: 2rem;
  font-weight: 400;
  color: #293333;
  margin: 0;
}
.page-title-row .count-badge {
  background: #e9ecef;
  color: #495057;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}
.page-title-row .add-btn {
  background: #fff;
  border: 1px solid #ced4da;
  color: #495057;
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.page-title-row .add-btn:hover { background: #f4f5f6; color: #293333; text-decoration: none; }
.page-title-row .right-icons { margin-left: auto; display: flex; gap: 8px; }
.page-title-row .right-icons a { color: #6c757d; font-size: 18px; padding: 6px; border: 1px solid #ced4da; border-radius: 3px; text-decoration: none; }

/* State filter pill bar + search */
.filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-block;
  padding: 5px 12px;
  font-size: 13px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  color: #495057;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
}
.filter-pill:hover { background: #f4f5f6; color: #293333; text-decoration: none; }
.filter-pill.active { background: #495057; color: #fff; border-color: #495057; }
.filter-pill.action-icon {
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}
.filter-row .search-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.filter-row .search-area input {
  border: 2px solid #5db4b5;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 3px;
  width: 240px;
}
.filter-row .search-area .icon-btn {
  background: #fff;
  border: 1px solid #ced4da;
  padding: 4px 8px;
  border-radius: 3px;
  color: #6c757d;
  font-size: 13px;
  text-decoration: none;
}

/* Tiny dots above table (column toggle) */
.col-toggle {
  color: #5db4b5;
  font-size: 18px;
  padding: 4px 0;
  line-height: 1;
  cursor: pointer;
}

/* ============================================================ */
/* LISTING TABLE */
/* ============================================================ */
.listing-table { border-top: 1px solid #e1e4e8; }
.listing-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.listing-table thead th {
  background: #e9ecef;
  font-weight: 600;
  font-size: 13px;
  color: #495057;
  padding: 8px 12px;
  border-bottom: 1px solid #ced4da;
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
}
.listing-table thead th .sort-arrow { color: #6c757d; margin-left: 4px; }
.listing-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #e1e4e8;
  vertical-align: middle;
}
.listing-table tbody tr:hover { background: #f8f9fa; }
.listing-table .id-link { color: #0a8b8c; text-decoration: none; font-weight: 500; }
.listing-table .id-link:hover { text-decoration: underline; }
.listing-table .row-checkbox { width: 30px; }
.listing-table .progress-cell { width: 110px; }
.listing-table .progress-cell .progress-bar-bg {
  background: #e9ecef;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}
.listing-table .progress-cell .progress-bar-fill {
  height: 100%;
  background: #6c757d;
}

/* Pagination/export row */
.list-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 13px;
}
.list-footer .pager {
  background: #e9ecef;
  padding: 4px 12px;
  border-radius: 3px;
  color: #495057;
  border: 1px solid #ced4da;
}
.list-footer .export-btn {
  background: #fff;
  border: 1px solid #ced4da;
  padding: 4px 14px;
  border-radius: 3px;
  color: #495057;
  text-decoration: none;
}
.list-footer .export-btn:hover { background: #f4f5f6; }

/* State text in cells (NOT badges in the live UI — just plain text) */
.state-cell { color: #495057; }

/* ============================================================ */
/* SAMPLE DETAIL — grid of fields */
/* ============================================================ */
.detail-toolbar { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.detail-toolbar .btn-soft {
  background: #f4f5f6;
  border: 1px solid #ced4da;
  color: #495057;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 3px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.detail-toolbar .btn-soft:hover { background: #e9ecef; color: #293333; text-decoration: none; }
.detail-toolbar .right-controls { margin-left: auto; display: flex; gap: 8px; }
.detail-toolbar .right-controls a { color: #5db4b5; font-size: 14px; padding: 4px 8px; }

/* LIMS-style field grid: left label, right input */
.field-grid {
  border: 1px solid #dee2e6;
  border-radius: 3px;
  overflow: hidden;
}
.field-grid .field-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid #e9ecef;
}
.field-grid .field-row:last-child { border-bottom: none; }
.field-grid .field-row .field-label {
  background: #fff;
  padding: 10px 14px;
  font-size: 13px;
  color: #495057;
  border-right: 1px solid #e9ecef;
  font-weight: 500;
}
.field-grid .field-row .field-value {
  padding: 10px 14px;
  font-size: 13px;
  color: #212529;
}
.field-grid .field-value .pill-value {
  display: inline-block;
  background: #e7f4f4;
  color: #0a8b8c;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 13px;
}

/* Three-column row of cards/fields for inline layout */
.field-cols-3 .field-row {
  display: grid;
  grid-template-columns: 140px 1fr 140px 1fr 140px 1fr;
}
.field-cols-3 .field-row .field-label,
.field-cols-3 .field-row .field-value { border-right: 1px solid #e9ecef; }

/* Result flags */
.flag-letter { font-weight: 700; padding: 1px 6px; border-radius: 2px; }
.flag-e { background: #f8d7da; color: #721c24; }
.flag-d { background: #d1ecf1; color: #0c5460; }
.flag-j { background: #fff3cd; color: #856404; }
.row-superseded { background: #fef9f9; color: #6c757d; }
.row-superseded td { text-decoration: line-through; opacity: 0.6; }
.row-reanalysis { background: #eef9f7; }

/* Inline alert above table */
.inline-alert {
  background: #fff3cd;
  border: 1px solid #f1d97e;
  border-left: 3px solid #f0a020;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 3px;
  margin-bottom: 14px;
  color: #6c5d2a;
}
.inline-alert .alert-icon { color: #f0a020; margin-right: 4px; }
.inline-alert a { color: #0a8b8c; }

/* ============================================================ */
/* REPORT FRAME (publish preview) */
/* ============================================================ */
.report-frame {
  background: #fff;
  border: 1px solid #ced4da;
  margin: 16px 0;
}
.report-frame .report-head {
  background: #293333; color: #fff; padding: 18px 26px;
  display: flex; align-items: center; justify-content: space-between;
}
.report-frame .report-head h2 { margin: 0; font-size: 1.3rem; font-weight: 500; }
.report-frame .report-head .meta { font-size: 12px; opacity: .85; }
.report-frame .report-body { padding: 22px 26px; }
.report-frame .report-section { margin-bottom: 22px; }
.report-frame .report-section h3 {
  font-size: 1rem;
  color: #293333;
  border-bottom: 2px solid #5db4b5;
  padding-bottom: 6px;
  margin: 0 0 10px;
  font-weight: 600;
}
.report-frame .brand-pill {
  display: inline-block; background: #5db4b5; color: #fff; padding: 4px 10px;
  border-radius: 3px; font-weight: 700; letter-spacing: .12em; font-size: 12px;
}
.report-frame table { width: 100%; border-collapse: collapse; font-size: 12px; }
.report-frame table th,
.report-frame table td { padding: 6px 10px; border: 1px solid #dee2e6; text-align: left; }
.report-frame table th { background: #f4f5f6; font-weight: 600; }
.report-frame .legend { font-size: 11px; color: #6c757d; margin-top: 6px; }

/* ============================================================ */
/* CARDS (for dashboard) */
/* ============================================================ */
.kpi-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  padding: 16px;
  text-align: center;
  border-radius: 3px;
}
.kpi-card .kpi-label { font-size: 12px; text-transform: uppercase; color: #6c757d; letter-spacing: .3px; margin-bottom: 4px; }
.kpi-card .kpi-value { font-size: 1.9rem; font-weight: 600; color: #5db4b5; line-height: 1; }
.kpi-card .kpi-sub { font-size: 11px; color: #6c757d; margin-top: 4px; }

/* ============================================================ */
/* FOOTER */
/* ============================================================ */
.site-footer {
  border-top: 1px solid #e1e4e8;
  padding: 14px 24px;
  color: #6c757d;
  font-size: 13px;
  display: flex;
  align-items: center;
  background: #fff;
}
.site-footer a { color: #0a8b8c; text-decoration: none; }
.site-footer .footer-icons { margin-left: auto; }
.site-footer .footer-icons a { color: #5db4b5; margin-left: 16px; font-size: 16px; }

/* ============================================================ */
/* INDEX / WALKTHROUGH PAGE */
/* ============================================================ */
.step-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.step-card {
  background: #fff; border: 1px solid #e1e4e8; border-radius: 3px;
  padding: 16px; text-decoration: none; color: #293333;
  transition: all .15s; display: block;
}
.step-card:hover {
  border-color: #5db4b5;
  box-shadow: 0 2px 8px rgba(93,180,181,.12);
  text-decoration: none;
  color: #293333;
}
.step-card .step-num { font-size: 11px; color: #5db4b5; font-weight: 700; letter-spacing: 1px; }
.step-card .step-label { font-size: 15px; font-weight: 600; margin-top: 4px; }
.step-card .step-detail { font-size: 12px; color: #6c757d; margin-top: 3px; }

/* ============================================================ */
/* Misc */
/* ============================================================ */
code.small { font-size: 11px; color: #495057; background: #f4f5f6; padding: 1px 4px; border-radius: 2px; }
.text-muted-sm { color: #6c757d; font-size: 12px; }

@media print {
  .demo-sidebar, .site-footer, #clearline-toolbar { display: none !important; }
  .demo-main { padding: 0; }
}
