/* =========================================================
   INHOUSE — Overrides sobre /styles.css (root)
   Incluye:
   - Formulario
   - Canvas
   - Modal
   - Comments
   - Upload field
   - History
   ========================================================= */

/* =========================
   TOKENS AJUSTES
========================= */

:root{
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --subtle: #64748B;
  --line: #E5E7EB;
  --line-strong: rgba(15, 23, 42, 0.14);
  --ok: #0A7C3A;
  --danger: #B91C1C;
  --fbos-blue: #0A3D62;
  --fbos-blue-soft: #0E4F7A;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Helvetica Neue", Helvetica, sans-serif;
  --shadow-card: 0 18px 50px rgba(15, 23, 42, 0.08);
  --canvas-gap: 14px;
  --card-pad: 14px;
  --badge-radius: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(10, 61, 98, 0.08), transparent 34vw),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================
   LAYOUT BASE
========================= */

.wrap{
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* =========================
   NAV (Formulario / Canvas / Historial)
========================= */

.sd-nav{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}

.sd-nav__item{
  text-align: center;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.sd-nav__item:hover{
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.06);
}

.sd-nav__item.is-active{
  border-color: rgba(10, 61, 98, 0.28);
  background: rgba(10, 61, 98, 0.06);
  color: var(--fbos-blue);
}

/* =========================
   TOOLBAR
========================= */

.canvas-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 16px;
}

.canvas-title{
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.btn.btn-small{
  width: auto;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

/* =========================
   BOARD
========================= */

.board{
  display:flex;
  flex-direction:column;
  gap: 18px;
}

.state-section{
  padding-bottom: 2px;
}

.state-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 6px 2px 10px;
}

.state-title{
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.state-divider{
  height: 1px;
  background: var(--line);
  margin-top: 14px;
  border-radius: 999px;
}

.state-cards{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--canvas-gap);
}

.state-footer{
  margin-top: 10px;
}

.state-footer--dual{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.section-more-btn,
.section-history-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.section-more-btn:hover,
.section-history-btn:hover{
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.06);
}

/* =========================
   ACTION CARD
========================= */

.action-card{
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.action-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}

.action-title{
  margin: 12px 0 4px;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  font-weight: 900;
}

.action-desc{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 14px;
}

.action-card__bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 12px;
}

.action-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* =========================
   ACTION ID
========================= */

.action-id{
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.action-id-link{
  color: var(--muted);
  text-decoration: none;
}

.action-id-link:hover{
  color: var(--text);
  text-decoration: underline;
}

/* =========================
   BADGES
========================= */

.badges{
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
  justify-content:flex-end;
}

.badge{
  display:inline-flex;
  align-items:center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--badge-radius);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
}

/* =========================
   CANVAS EVIDENCE
========================= */

.action-evidence{
  margin-top: 10px;
}

.action-evidence__link{
  display:inline-block;
  text-decoration:none;
}

.action-evidence__thumb{
  display:block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.action-evidence__file{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fbos-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.action-evidence__file:hover{
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.05);
}

/* =========================
   ACTION BUTTON (cards / canvas)
========================= */

.btn-action{
  border: 1px solid rgba(10, 61, 98, 0.16);
  background: rgba(10, 61, 98, 0.06);
  color: var(--fbos-blue);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.btn-action:hover{
  border-color: rgba(10,61,98,0.30);
  background: rgba(10,61,98,0.10);
  box-shadow: 0 0 0 4px rgba(10,61,98,0.08);
}

/* =========================
   MODAL
========================= */

.label-modal{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 9999;
}

.label-modal[aria-hidden="true"]{
  display: none;
}

.label-card{
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.label-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
  flex: 0 0 auto;
}

.label-head strong{
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.label-close{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.label-close:hover{
  background: rgba(10, 61, 98, 0.08);
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.08);
}

.label-body{
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.label-id{
  font-weight: 900;
  font-size: 18px;
}

.label-meta{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.label-grid{
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.label-desc{
  padding-top: 4px;
}

/* evidencia en modal */
.label-evidence{
  margin-top: 6px;
}

.label-evidence__content{
  margin-top: 8px;
}

#jobModalEvidenceLink{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fbos-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

#jobModalEvidenceLink:hover{
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.05);
}

#jobModalEvidenceImageWrap{
  margin-top: 8px;
}

#jobModalEvidenceImage{
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  cursor: zoom-in;
}

#jobModalEvidenceMeta{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.label-actions{
  display:flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}

.btn-secondary{
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn-secondary:hover{
  border-color: rgba(10, 61, 98, 0.35);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.08);
}

/* =========================
   COMMENTS
========================= */

.label-comments{
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.label-comments__title{
  font-weight: 800;
  margin-bottom: 12px;
}

.comments-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-item{
  background:#F8FAFC;
  border:1px solid var(--line);
  border-radius: 12px;
  padding:10px 12px;
  font-size: 14px;
}

.comment-meta{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.comments-composer{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.comments-textarea{
  min-height: 90px;
  resize: vertical;
}

.comments-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.comments-by{
  flex:1;
  height: 42px;
}

.inline-msg{
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
}

.inline-msg--error{
  color: #991B1B;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.25);
}

/* =========================
   FORM LAYOUT — INHOUSE
========================= */

.card{
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
}

.brand--demo{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.brand--demo h1{
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand--demo p{
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.fbos-logo-slot{
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
}

.intro-copy{
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.form-section{
  margin-top: 0;
}

.form-section + .form-section{
  margin-top: 28px;
}

.form-section__title{
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}

.field{
  margin-bottom: 18px;
}

.label{
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--text);
}

.field input,
.field select,
.field textarea{
  font-size: 16px;
}

.field textarea{
  min-height: 150px;
}

.field small{
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.form-section--confirm{
  margin-top: 24px;
}

.confirm-check{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-check input{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.confirm-check__box{
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  border: 2px solid #94a3b8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.confirm-check__icon{
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.2s ease;
}

.confirm-check__text{
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

/* Estado marcado (checkbox azul) */
.confirm-check input:checked + .confirm-check__box{
  border-color: #2563eb;
  background: #2563eb;
}

.confirm-check input:checked + .confirm-check__box .confirm-check__icon{
  opacity: 1;
  transform: scale(1);
}

/* Texto en estado activo */
.confirm-check:has(input:checked) .confirm-check__text{
  color: #065f46;
}

/* 🔥 Este es el highlight verde del contenedor */
.confirm-check:has(input:checked){
  border-color: #4ade80;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}
/* Focus accesible */
.confirm-check input:focus-visible + .confirm-check__box{
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}
/* CTA principal */
.btn{
  width: 100%;
  margin-top: 16px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 800;
  border-radius: 20px;
  border: none;
  background: linear-gradient(180deg, #0d3f66 0%, #0a3a5c 100%);
  color: #fff;
  box-shadow:
    0 8px 20px rgba(10, 61, 98, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow:
    0 12px 22px rgba(10, 61, 98, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn:active{
  transform: translateY(0);
  box-shadow:
    0 4px 10px rgba(10, 61, 98, 0.2),
    inset 0 2px 4px rgba(0,0,0,0.15);
}
.btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    0 4px 10px rgba(10, 61, 98, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.status{
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
}

.footer{
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
}

.footer small{
  font-size: 13px;
}

/* Input file refinado */
input[type="file"]{
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

/* =========================
   CUSTOM FILE FIELD
========================= */

.upload-field{
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

.upload-field:hover{
  border-color: rgba(10, 61, 98, 0.25);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.05);
}

.upload-field__button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(10, 61, 98, 0.08);
  color: var(--fbos-blue);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.upload-field__text{
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
   UPLOAD PREVIEW
========================= */

.upload-preview{
  margin-top: 12px;
}

.upload-preview img{
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

/* =========================
   HISTORY
========================= */

.history-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.history-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.history-search{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin:10px 0 14px;
}

.hint{
  font-size:12px;
  color:#64748b;
  line-height:1.35;
}

#countLabel{
  font-weight:900;
  font-size:18px;
  letter-spacing:-0.01em;
  color:var(--text);
}

#searchInput{
  width:100%;
  height:44px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  color:var(--text);
}

#searchInput::placeholder{
  color:#94a3b8;
  font-weight:700;
}

#searchInput:focus{
  outline:none;
  border-color: rgba(10, 61, 98, 0.45);
  box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.12);
}

.table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 30px rgba(15, 23, 42, 0.06);
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}

thead th{
  text-align:left;
  font-size:12px;
  color:#475569;
  background:#f8fafc;
  padding:12px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:1;
  letter-spacing:0.02em;
  text-transform:uppercase;
}

tbody td{
  padding:12px;
  border-bottom:1px solid #eef2f7;
  vertical-align:top;
  font-size:14px;
}

tbody tr:hover{
  background:#fbfdff;
}

.mono{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 900;
  color: #0b1f3a;
  letter-spacing: 0.01em;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.pill-muted{
  background:#f1f5f9;
  color:#475569;
  border-color:#cbd5e1;
}

.empty-box{
  padding:14px;
  border-radius:14px;
  background:rgba(15, 23, 42, 0.03);
  color:#64748b;
  font-weight:800;
  font-size:13px;
  border:1px solid rgba(148, 163, 184, 0.35);
}

/* =========================
   DESKTOP REFINEMENT
========================= */

@media (min-width: 900px){
  .card{
    padding: 28px;
  }
}

/* =========================
   MOBILE TUNING
========================= */

@media (max-width: 640px){
  .wrap{
    max-width: 100%;
  }

  .card{
    width: 100%;
    padding: 18px;
    border-radius: 22px;
  }

  .brand--demo{
    gap: 12px;
    margin-bottom: 16px;
  }

  .fbos-logo-slot{
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border-radius: 20px;
    font-size: 13px;
  }

  .brand--demo h1{
    font-size: 18px;
  }

  .brand--demo p{
    font-size: 13px;
  }

  .sd-nav{
    gap: 8px;
    margin-bottom: 16px;
  }

  .sd-nav__item{
    padding: 12px 8px;
    font-size: 13px;
    border-radius: 15px;
  }

  .intro-copy{
    font-size: 14px;
    margin-bottom: 16px;
  }

  .form-section + .form-section{
    margin-top: 20px;
  }

  .form-section__title{
    font-size: 16px;
    margin-bottom: 12px;
  }

  .label{
    font-size: 12px;
    margin-bottom: 7px;
  }

  .field{
    margin-bottom: 13px;
  }

  .field input,
  .field select,
  .field textarea{
    font-size: 16px;
  }

  .field textarea{
    min-height: 120px;
  }

  .btn{
    font-size: 16px;
    border-radius: 18px;
  }

  .footer small{
    font-size: 12px;
  }

  .upload-field{
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .upload-field__text{
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .action-card__bottom{
    flex-direction: column;
    align-items: flex-start;
  }

  .state-footer--dual{
    flex-direction: column;
    align-items: stretch;
  }

  .label-modal{
    padding: 12px;
  }

  .label-card{
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .label-body{
    padding: 14px;
  }

  .label-actions{
    flex-direction: column;
    padding: 12px 14px 14px;
  }

  #jobModalEvidenceImage{
    width: 96px;
    height: 96px;
  }

  .comments-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .history-top{
    flex-direction:column;
    align-items:stretch;
  }

  .history-actions{
    justify-content:flex-end;
  }

  .btn.btn-small#refreshBtn{
    width:100%;
  }
}
.history-id-btn{
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--text);
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.history-id-btn:hover{
  color: var(--fbos-blue);
  text-decoration: underline;
}
.fbos-logo-slot img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   APPLE-LIKE POLISH
========================= */

:root {
  --apple-radius-sm: 14px;
  --apple-radius-md: 18px;
  --apple-radius-lg: 28px;
  --apple-control-bg: rgba(255, 255, 255, 0.86);
  --apple-control-border: rgba(15, 23, 42, 0.10);
  --apple-control-shadow: 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 1px 1px rgba(15, 23, 42, 0.03);
  --apple-focus: rgba(10, 61, 98, 0.16);
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(10, 61, 98, 0.10), transparent 30vw),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.card {
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: var(--apple-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.70) inset;
}

.sd-nav__item,
.section-more-btn,
.section-history-btn,
.btn-secondary,
.btn-action {
  border-color: var(--apple-control-border);
  border-radius: var(--apple-radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--apple-control-shadow);
}

.sd-nav__item.is-active {
  background: rgba(10, 61, 98, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.70) inset,
    0 8px 22px rgba(10, 61, 98, 0.08);
}

.fbos-logo-slot {
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--apple-control-shadow);
}

.form-section {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.58);
}

.form-section + .form-section {
  margin-top: 18px;
}

.form-section__title {
  border-bottom-color: rgba(15, 23, 42, 0.07);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.field input,
.field select,
.field textarea,
#searchInput,
.comments-textarea,
.comments-by {
  border-color: var(--apple-control-border);
  border-radius: var(--apple-radius-md);
  background: var(--apple-control-bg);
  box-shadow: var(--apple-control-shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.field textarea {
  border-radius: 22px;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
#searchInput:hover,
.comments-textarea:hover,
.comments-by:hover,
.upload-field:hover {
  border-color: rgba(10, 61, 98, 0.22);
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
#searchInput:focus,
.comments-textarea:focus,
.comments-by:focus {
  outline: none;
  border-color: rgba(10, 61, 98, 0.36);
  background: #fff;
  box-shadow:
    0 0 0 5px var(--apple-focus),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.upload-field,
.confirm-check {
  border-color: var(--apple-control-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--apple-control-shadow);
}

.upload-field__button {
  border-radius: 16px;
  background: rgba(10, 61, 98, 0.08);
}

.confirm-check__box {
  border-radius: 9px;
}

.confirm-check:has(input:checked) {
  border-color: rgba(10, 124, 58, 0.28);
  background: rgba(240, 253, 244, 0.82);
  box-shadow:
    0 0 0 5px rgba(10, 124, 58, 0.10),
    var(--apple-control-shadow);
}

.btn {
  border-radius: 22px;
  background: linear-gradient(180deg, #114a73 0%, #0a3d62 100%);
  box-shadow:
    0 14px 34px rgba(10, 61, 98, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(10, 61, 98, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.status {
  min-height: 22px;
}

.upload-preview img,
.action-evidence__thumb,
#jobModalEvidenceImage {
  border-radius: 18px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 14px 12px 34px;
  }

  .card {
    border-radius: 24px;
  }

  .form-section {
    padding: 14px;
    border-radius: 22px;
  }

  .form-section__title {
    font-size: 19px;
  }
}

/* =========================
   FORM SPACING REFINEMENT
========================= */

#fbosForm {
  gap: 22px;
}

.form-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 24px;
}

.form-section + .form-section {
  margin-top: 0;
}

.form-section__title {
  margin: 0;
  padding-bottom: 14px;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0;
}

.field .label,
.label {
  margin: 0;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 15px 16px;
}

.field textarea {
  min-height: 150px;
  padding-top: 16px;
}

.field small,
.help-text {
  max-width: 62ch;
  margin: 2px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.upload-field {
  min-height: 62px;
  padding: 12px 14px;
}

.upload-preview {
  margin-top: 4px;
}

.form-section--confirm {
  padding: 20px;
}

.confirm-check {
  padding: 16px 18px;
}

.btn {
  margin-top: 2px;
  min-height: 56px;
}

@media (min-width: 720px) {
  .card {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  #fbosForm {
    gap: 18px;
  }

  .form-section {
    gap: 16px;
    padding: 18px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 52px;
    padding-inline: 15px;
  }

  .field small,
  .help-text {
    font-size: 12.5px;
  }
}
