/* ==================
   LEGACY DETAIL NAV (prev/next/back)
   ================== */

.detail-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; position: relative; }

/* Centered screen-name label in any topbar */
.screen-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  pointer-events: none;
  white-space: nowrap;
}
.detail-nav    { display: flex; align-items: center; gap: 0.5rem; }
.nav-counter   { font-size: 12px; color: #888; min-width: 3rem; text-align: center; }

.nav-btn {
  display: inline-block;
  color: #7c5cbf;
  text-decoration: none;
  font-size: var(--font-size-sm);
  padding: 0.2rem 0.6rem;
  border: 1px solid #c4b0e8;
  border-radius: 4px;
}

.nav-btn:hover      { background: #f3eeff; text-decoration: none; }
.nav-btn--disabled  { color: #bbb; border-color: #e0e0e0; cursor: default; }

.back-link       { display: inline-block; color: #7c5cbf; text-decoration: none; font-size: var(--font-size-sm); }
.back-link:hover { text-decoration: underline; }

/* ==================
   LEGACY COLLAPSIBLE DETAIL PANELS
   ================== */

.detail-panels       { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.detail-panels-left  { flex: 0 0 520px; min-width: 0; }
.detail-panels-right { flex: 1; min-width: 220px; }

.detail-panel {
  border: 1px solid #e5e5e0;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.detail-panel > summary {
  list-style: none;
  padding: 0.5rem 0.875rem;
  background: #f5f5f0;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.detail-panel > summary::-webkit-details-marker { display: none; }
.detail-panel > summary::after                  { content: "▾"; font-size: 14px; }
.detail-panel > summary:hover                   { background: #eeede8; }
.detail-panel[open] > summary::after            { content: "▴"; }

.detail-panel-body { padding: 0.75rem 0.875rem; }

.detail-dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.25rem 0.5rem;
  margin: 0;
  font-size: var(--font-size-sm);
}

.detail-dl dt { color: #888; font-weight: normal; }
.detail-dl dd { margin: 0; word-wrap: break-word; }

.detail-panel-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.75rem 0 0.4rem;
}

.detail-panel-subtitle:first-child { margin-top: 0; }

.detail-list         { margin: 0 0 0.5rem; padding-left: 1.2rem; font-size: var(--font-size-sm); }
.detail-list li      { margin-bottom: 0.35rem; }
.detail-list-meta    { margin-left: 1rem; }
.detail-list-markers { margin-left: 0.75rem; }
.detail-meta-footer  { font-size: 12px; color: #aaa; font-style: italic; margin-top: 0.5rem; }

.detail-footer {
  font-size: 11px;
  color: #aaa;
  padding: 8px 12px 80px; /* 80px clears mobile bottom nav */
}

/* ==================
   LEGACY DETAIL LAYOUT + TABLE
   ================== */

.detail-layout { display: flex; gap: 1.5rem; align-items: flex-start; }

.detail-table {
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e5e5e5;
}

.detail-table th { background: #f5f5f0; font-size: 12px; font-weight: 600; color: #666; padding: 0.5rem 0.875rem; text-align: right; white-space: nowrap; border-bottom: 1px solid #f0f0f0; }
.detail-table td { padding: 0.5rem 0.875rem; color: #333; border-bottom: 1px solid #f0f0f0; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

/* ==================
   SIDE BOX
   ================== */

.side-box {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  min-width: 220px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.side-box h2      { margin-bottom: 0.75rem; }
.side-box p       { margin: 0.4rem 0; font-size: var(--font-size-sm); }
.side-box a       { color: #7c5cbf; text-decoration: none; font-weight: 500; }
.side-box a:hover { text-decoration: underline; }
.side-box ul      { padding-left: 1.1rem; margin: 0.25rem 0; }
.side-box li      { margin: 0.3rem 0; font-size: var(--font-size-sm); }

/* ==================
   DETAIL HEADER (Bootstrap card redesign)
   ================== */

/* Sticky detail header — z-index 99, one below navbar (100); sticks at top:48px */
.detail-header {
  position: sticky;
  top: 48px;
  z-index: 99;
  background: #fff;
  border-bottom: 0.5px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-header-left  { min-width: 0; flex: 1; }
.detail-header-right { flex-shrink: 0; }

.detail-back-link {
  display: block;
  font-size: 12px;
  color: var(--cat-muted);
  text-decoration: none;
  line-height: 1.2;
  margin-bottom: 3px;
}

.detail-back-link:hover { color: var(--cat-text); }

.detail-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-seedkey    { font-size: 18px; font-weight: 600; color: var(--cat-green); font-family: var(--font-mono); }
.detail-name       { font-size: 16px; font-weight: 500; color: var(--cat-text); }
.detail-gen-badge  { font-size: 11px; }
.detail-grown-check { color: var(--cat-green); font-size: 14px; }

/* Prev/next button group — Bootstrap --bs-btn-* overrides scoped to this component only */
.detail-header-right .btn-outline-success {
  --bs-btn-color:              #2D6A4F;
  --bs-btn-border-color:       #2D6A4F;
  --bs-btn-hover-color:        #fff;
  --bs-btn-hover-bg:           #2D6A4F;
  --bs-btn-hover-border-color: #2D6A4F;
  --bs-btn-active-color:       #fff;
  --bs-btn-active-bg:          #2D6A4F;
  --bs-btn-font-size:          12px;
}

/* ==================
   MOBILE PREV/NEXT BAR
   ================== */

/* Fixed just above the bottom nav (60px) */
.prev-next-bar {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 0.5px solid rgba(0,0,0,0.10);
  z-index: 98;
}

.prev-next-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--cat-green);
  text-decoration: none;
  border-right: 0.5px solid rgba(0,0,0,0.08);
}

.prev-next-btn:last-child            { border-right: none; }
.prev-next-btn:hover                 { background: #f0faf5; text-decoration: none; color: var(--cat-green); }
.prev-next-btn--disabled             { color: var(--cat-muted); cursor: default; }

/* ==================
   PANELS GRID
   ================== */

.panels-grid {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 0 0 8px;
}

@media (max-width: 767.98px) {
  .panels-grid { flex-direction: column; padding: 8px; }
  .panels-right { order: -1; }
}

.panels-left  { flex: 0 0 380px; min-width: 0; }
.panels-right { flex: 1; min-width: 0; max-width: 780px; }

/* Card overrides — scoped to panels-grid, no global Bootstrap card bleed */
.panels-grid .card {
  border: 0.5px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  overflow: hidden;
}

.panels-grid .card-header {
  background: #f8f9fa;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  padding: 3px 10px;
}


/* Chevron rotates when panel is collapsed */
.panels-grid .panel-chevron                                                        { transition: transform 0.2s ease; }
.panels-grid [data-bs-toggle="collapse"][aria-expanded="false"] .panel-chevron    { transform: rotate(180deg); }

/* Always show collapse chevrons in card headers */
.panels-grid .card-header .icon-btn { opacity: 1; }

/* Table overrides — scoped to panels-grid cards */
.panels-grid .table                       { font-size: 12px; }
.panels-grid .table th {
  font-size: 11px;
  color: var(--cat-muted);
  font-weight: 500;
  border-bottom: 0.5px solid rgba(0,0,0,0.10);
  padding: 5px 8px;
  background: transparent;
}
.panels-grid .table td {
  padding: 5px 8px;
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  vertical-align: middle;
}
.panels-grid .table tbody tr:last-child td { border-bottom: none; }
.panels-grid .table a                      { color: var(--cat-green); text-decoration: none; font-weight: 500; }
.panels-grid .table a:hover                { text-decoration: underline; }

/* Nav-pills — scoped to panels-grid (Parent Progenies view tabs) */
.panels-grid .nav-pills .nav-link {
  font-size: 12px;
  padding: 4px 10px;
  color: var(--cat-green);
  border: 0.5px solid var(--cat-green);
  border-radius: 999px;
}
.panels-grid .nav-pills .nav-link.active          { background-color: var(--cat-green); border-color: var(--cat-green); color: #fff; }
.panels-grid .nav-pills .nav-link:hover:not(.active) { background: #E1F5EE; }

/* ==================
   PANEL TITLES + SUBTITLES
   ================== */

.panel-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cat-muted);
  text-transform: uppercase;
}

.panel-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0 4px;
}

/* ==================
   FIELD ROWS
   ================== */

.field-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px;
  padding: 5px 12px;
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  align-items: start;
  font-size: 13px;
}

.field-row:last-child { border-bottom: none; }

.field-label { color: var(--cat-muted); font-size: 12px; padding-top: 1px; }

.field-value             { color: var(--cat-text); word-break: break-word; }
.field-value.mono        { font-family: var(--font-mono); font-size: 12px; color: var(--cat-green); }
.field-value.muted       { color: #ccc; }
.field-value a           { color: var(--cat-green); text-decoration: none; font-weight: 500; }
.field-value a:hover     { text-decoration: underline; }

.field-value-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.field-value-wrap .field-value { flex: 1; min-width: 0; }

.field-value-wrap [data-inline-edit-target="form"] {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 100%;
  flex-wrap: wrap;
}

/* ==================
   ICON BUTTON (pencil visible on row hover)
   ================== */

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cat-muted);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.1s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.icon-btn:hover          { color: var(--cat-green); background: #E1F5EE; opacity: 1; }
.field-row:hover .icon-btn { opacity: 1; }

/* Always show on touch devices */
@media (max-width: 767.98px) { .icon-btn { opacity: 1 !important; } }

/* ==================
   PROGENY SECTION
   ================== */

.progeny-section { margin-top: 2rem; }

.progeny-section ul      { padding-left: 1.1rem; }
.progeny-section li      { margin: 0.35rem 0; font-size: var(--font-size-sm); }
.progeny-section a       { color: #7c5cbf; text-decoration: none; font-weight: 500; }
.progeny-section a:hover { text-decoration: underline; }

/* ==================
   GENERIC CARD + CARD TABLE
   ================== */

.card { background: #fff; border: 1px solid #e0e0da; border-radius: 8px; padding: 1.25rem; }
.card .table                     { width: 100%; border-collapse: collapse; }
.card .table th                  { text-align: left; padding: 0.5rem 1rem 0.5rem 0; color: #666; font-weight: 500; width: 30%; }
.card .table td                  { padding: 0.5rem 0; border-bottom: 1px solid #f0f0ea; }
.card .table tr:last-child td    { border-bottom: none; }

/* ==================
   TRIAL CARDS (mobile)
   ================== */

.trial-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 12px 0.5rem;
}

.trial-card {
  display: block;
  background: var(--cat-card-bg);
  border: 1px solid #e5e5e5;
  border-left: 3px solid var(--cat-green-mid);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--cat-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.12s, box-shadow 0.12s;
}

.trial-card--finished       { border-left-color: #ccc; }
.trial-card:hover           { background: #f4f4f0; box-shadow: 0 2px 5px rgba(0,0,0,0.09); text-decoration: none; color: var(--cat-text); }

.trial-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.trial-card-code   { font-size: var(--font-size-sm); font-weight: 600; color: var(--cat-green); font-family: var(--font-mono); }
.trial-card-name   { font-size: var(--font-size-base); font-weight: 500; margin-top: 0.2rem; }

.trial-card-status { font-size: 11px; border-radius: 4px; padding: 1px 7px; font-weight: 500; flex-shrink: 0; }
.trial-card-status--active   { background: #E1F5EE; color: #0F6E56; }
.trial-card-status--finished { background: #f0f0ec; color: #888; }

.trial-card-meta { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.35rem; }
.trial-card-tag  { font-size: 11px; background: #f0f0ec; color: #555; border-radius: 4px; padding: 1px 7px; }

/* ==================
   MOBILE TRIAL HEADER
   ================== */

.mobile-trial-header {
  background: var(--cat-green);
  color: var(--cat-white);
  padding: 10px 14px 8px;
}

.mobile-trial-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2px;
}

.mobile-trial-back {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  flex-shrink: 0;
}

.mobile-trial-back:hover { color: var(--cat-white); }

.mobile-trial-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--cat-white);
}

.mobile-trial-name {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================
   MOBILE VIEW TABS
   ================== */

.mobile-view-tabs {
  display: flex;
  gap: 4px;
}

.mobile-view-tab {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--cat-text);
  text-decoration: none;
  background: transparent;
  transition: background 0.12s;
}

.mobile-view-tab:hover            { background: rgba(0,0,0,0.05); color: var(--cat-text); text-decoration: none; }
.mobile-view-tab--active          { background: var(--cat-green); color: var(--cat-white); border-color: var(--cat-green); }

/* ==================
   FIELD ENTRY CARDS (mobile)
   ================== */

.field-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 4px 0.5rem;
}

.field-card {
  display: block;
  background: var(--cat-card-bg);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.65rem 0.875rem;
  text-decoration: none;
  color: var(--cat-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.12s, box-shadow 0.12s;
}

.field-card:hover { background: #f4f4f0; box-shadow: 0 2px 5px rgba(0,0,0,0.09); text-decoration: none; color: var(--cat-text); }

.field-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.field-card-plot-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  background: var(--cat-green);
  color: var(--cat-white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  flex-shrink: 0;
}

.field-card-code {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--cat-green);
  font-family: var(--font-mono);
}

.field-card-name {
  font-size: var(--font-size-base);
  font-weight: 500;
  margin-top: 0.15rem;
}

.field-card-gen {
  font-size: 11px;
  color: var(--cat-muted);
  margin-left: 0.3rem;
}

.field-card-has-plants {
  font-size: 16px;
  color: #3b82f6;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}

.field-card-parents {
  font-size: 12px;
  color: var(--cat-muted);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* parents inline in header row (plant cards) */
.field-card-parents-inline {
  font-size: 12px;
  color: var(--cat-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* assigned seedkey row */
.plant-card-seedkey {
  font-size: 12px;
  font-weight: 600;
  color: var(--cat-green);
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

/* two-column layout when photo is present */
.plant-card-layout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plant-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #e0e0e0;
}

.plant-card-text {
  flex: 1;
  min-width: 0;
}

.plant-card-seedkey {
  font-size: 11px;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  margin-top: 2px;
}

/* ==================
   MOBILE DETAIL PAGE
   ================== */

.mobile-detail-meta {
  padding: 6px 8px 4px;
  font-size: 12px;
  color: #555;
}

.mobile-detail-parents { margin-bottom: 2px; font-size: 12px; color: #555; }
.mobile-detail-loc     { font-size: 11px; color: #999; }

.mobile-detail-section {
  padding: 0 4px 12px;
}

.mobile-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
  padding: 6px 0 4px;
}

.mobile-photo-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.mobile-photo-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
}

.mobile-marker-list { display: flex; flex-direction: column; gap: 4px; }

.mobile-marker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 12px;
}

.mobile-marker-plant {
  font-weight: 600;
  min-width: 28px;
  color: var(--cat-text);
}

.mobile-marker-badges { display: flex; flex-wrap: wrap; gap: 3px; }

/* ==================
   PLANT DETAIL REDESIGN
   ================== */

.pl-title-row { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.pl-title-row h1 { margin: 0; }
.pl-new-seed { font-size: 1rem; font-weight: 500; color: #7c5cbf; }

.pl-resistances { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.5rem 0.75rem; background: #faf9f6; border: 1px solid #e8e5de; border-radius: 7px; }
.pl-resistances-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #bbb; margin-right: 0.25rem; }

.pl-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.pl-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }

/* Carousel */
.pl-carousel-main { width: 50%; aspect-ratio: 4/3; background: #f5f4f0; border-radius: 8px; border: 1px solid #e5e5e5; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; cursor: pointer; }
.pl-carousel-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-carousel-main-add { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #ccc; font-size: 3.5rem; font-weight: 200; transition: background 0.15s, color 0.15s; }
.pl-carousel-main-add:hover { background: #eeecea; color: #9b7de8; }
.pl-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.85); border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; padding: 0; }
.pl-carousel-nav:hover { background: #fff; }
.pl-carousel-nav--prev { left: 6px; }
.pl-carousel-nav--next { right: 6px; }

.pl-carousel-strip { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 2px; }
.pl-thumb { flex: 0 0 60px; height: 60px; border-radius: 5px; overflow: hidden; cursor: pointer; border: 2px solid transparent; position: relative; }
.pl-thumb:hover { border-color: #9b7de8; }
.pl-thumb.pl-thumb--active { border-color: #7c5cbf; }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-thumb-del { position: absolute; top: 1px; right: 1px; background: rgba(0,0,0,0.55); border: none; color: #fff; font-size: 10px; line-height: 1; width: 14px; height: 14px; border-radius: 2px; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; }
.pl-thumb:hover .pl-thumb-del { display: flex; }
.pl-thumb-add { flex: 0 0 60px; height: 60px; border-radius: 5px; border: 1.5px dashed #ccc; background: #fafaf8; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #ccc; font-size: 1.6rem; font-weight: 300; transition: border-color 0.15s, color 0.15s; }
.pl-thumb-add:hover { border-color: #9b7de8; color: #7c5cbf; }

/* Edit panel */
.pl-edit { display: flex; flex-direction: column; gap: 0.75rem; }
.pl-field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #999; display: block; margin-bottom: 3px; }
.pl-edit textarea { width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 0.45rem 0.6rem; font-size: 13px; font-family: inherit; resize: vertical; min-height: 72px; box-sizing: border-box; }
.pl-edit textarea:focus { outline: none; border-color: #9b7de8; }
.pl-edit select, .pl-edit input[type="text"] { width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 0.38rem 0.5rem; font-size: 13px; font-family: inherit; box-sizing: border-box; }
.pl-edit select:focus, .pl-edit input[type="text"]:focus { outline: none; border-color: #9b7de8; }
.pl-edit-row { display: flex; gap: 0.5rem; }
.pl-edit-row .pl-edit-field { flex: 1; min-width: 0; }
.pl-save-row { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; padding-top: 0.25rem; }
.pl-save-msg { font-size: 12px; color: #5a8a5a; }

/* Info panels */
.pl-panel { background: #faf9f6; border: 1px solid #e8e5de; border-radius: 8px; padding: 0.875rem 1rem; }
.pl-panel-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #bbb; margin-bottom: 0.6rem; }
.pl-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; font-size: 13px; margin: 0; }
.pl-panel dt { color: #999; white-space: nowrap; }
.pl-panel dd { margin: 0; word-break: break-word; }
.pl-parent-block + .pl-parent-block { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #ede9e0; }
.pl-parent-label { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.pl-parent-name { font-weight: 600; font-size: 14px; color: #333; }
.pl-parent-seedkey { font-size: 12px; color: #888; margin-left: 0.4rem; }
.pl-parent-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.pl-parent-remarks { font-size: 12px; color: #777; margin-top: 4px; font-style: italic; }

/* Prevent iOS Safari from leaving accordion buttons in a dark :active state after tap */
#pl-accordion .accordion-button {
  -webkit-tap-highlight-color: transparent;
  background-color: #fff;
}
#pl-accordion .accordion-button:not(.collapsed) {
  background-color: var(--bs-accordion-active-bg);
}

/* ==================
   FIELD LIST DETAIL
   ================== */

.fl-info-line { font-size: 13px; color: #444; line-height: 1.4; }
.fl-parents-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; font-size: 12px; color: #666; }
.fl-parents-text { margin-right: 0.25rem; }

/* Mobile Notes card: stretch near screen edges and minimise inner padding so
   the remarks/action textareas reclaim space on small screens.
   (Only rendered in field_list/show.html+mobile.erb, so no media query needed.) */
.fl-notes-card { margin-left: -0.7rem; margin-right: -0.7rem; }
.fl-notes-card .card-body { padding: 0.3rem; }
.fl-notes-card .form-control { padding: 0.3rem 0.4rem; }
.fl-notes-card .pl-field-label { margin-bottom: 1px; }
.fl-notes-card .mb-2 { margin-bottom: 0.3rem !important; }
