.checkline {
    display: inline-flex;
    align-items: center;
    gap: .25rem;           /* tighter spacing */
  }
  .checkline input[type="checkbox"] {
    margin: 0;             /* remove browser default margin */
    vertical-align: middle;
  }

  /* Inline add styles */
  .ia-grid{display:grid;gap:.75rem;grid-template-columns:repeat(2,minmax(0,1fr));}
  .ia-grid label{display:block;font-size:.9rem}
  .ia-grid input[type="text"],
  .ia-grid input[type="date"],
  .ia-grid input[type="time"],
  .ia-grid input[type="number"],
  .ia-grid input[type="url"],
  .ia-grid select,
  .ia-grid textarea{width:100%;padding:.5rem;border:1px solid #e5e7eb;border-radius:8px;}
  .ia-grid .ia-span{grid-column:1 / -1;}
  .ia-actions{
  grid-column: 1 / -1;       /* span full width of the grid */
  display:flex;
  gap:.5rem;
  justify-content:flex-start; /* left align (was right) */
  margin-top:.75rem;
}
.ia-grid .ia-actions{
  grid-column: 1 / -1;
  display: flex;
  gap: .5rem;
  justify-content: flex-start;  /* left */
  align-items: center;
  margin-top: .75rem;
  text-align: left !important;  /* defeat any inherited right-align */
}

/* Buttons (unchanged from before) */
.ia-submit{
  background:#0d6efd;
  border:1px solid #0d6efd;
  color:#fff;
  padding:.5rem .9rem;
  border-radius:8px;
  cursor:pointer;
}
.ia-cancel{
  background:#e5e7eb;          /* a bit darker than off-white */
  border:1px solid #cbd5e1;
  color:#111 !important;        /* force dark text so it can't inherit white */
  padding:.5rem .9rem;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}
.ia-cancel:hover{ background:#dbe2e8; }
.ia-cancel:active{ background:#cfd6dc; }

.ia-cancel:focus-visible{
  outline:2px solid #0d6efd;
  outline-offset:2px;
}

@media (prefers-color-scheme: dark){
  .ia-cancel{
    background:#374151;
    border-color:#4b5563;
    color:#f9fafb !important;
  }
  .ia-cancel:hover{ background:#334155; }
  .ia-cancel:active{ background:#283245; }
}

  /* Greyed-out readonly fields */
  .ia-readonly[readonly]{
    background:#f3f4f6 !important;
    color:#6b7280 !important;
    cursor:not-allowed;
  }

  /* Flyer modal */
  .flyer-modal{position:fixed;inset:0;background:rgba(0,0,0,.7);display:none;z-index:10000;}
  .flyer-modal.open{display:block;}
  .flyer-dialog{
    position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
    width:min(95vw,1000px);height:min(90vh,800px);
    background:#fff;color:#111;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.4);
    padding:16px;display:flex;flex-direction:column;
  }
  .flyer-content{flex:1;overflow:auto;border-radius:6px;}
  .flyer-close{
    position:absolute;top:8px;right:12px;font-size:28px;background:none;border:none;
    cursor:pointer;line-height:1;color:#444;padding:4px;
  }
  .flyer-close:hover{color:#000;}
  @media (prefers-color-scheme: dark){
    .flyer-dialog{background:#111;color:#eee;}
    .flyer-close{color:#ccc;}
    .flyer-close:hover{color:#fff;}
  }
  .ia-checkrow{
  display:flex;
  align-items:center;
  gap:.35rem;           /* tight spacing */
  justify-self:start;   /* inside CSS grid: keep it left */
  width:auto;           /* avoid stretching full column */
}
.ia-checkrow input[type="checkbox"]{ margin:0; }
.ia-checkrow label{ margin:0; line-height:1.2; }

.ia-toggle-btn{
  background:#0d6efd;
  color:#fff;
  border:1px solid #0d6efd;
  padding:.55rem .9rem;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
}
.ia-toggle-btn:hover{ filter:brightness(.95); }
@media (prefers-color-scheme: dark){
  .ia-toggle-btn{ background:#2563eb; border-color:#2563eb; }
}

.ia-flyer-preview{
  display:flex; gap:.75rem; align-items:flex-start;
  border:1px dashed #cbd5e1; border-radius:8px; padding:.6rem .8rem; margin-top:.4rem;
}
.ia-flyer-thumb img{
  width: min(100%, 360px);   /* was 180px */
  height: auto;
  border-radius: 8px;
  display: block;
}
.ia-flyer-meta{ font-size:.9rem; color:#334155; }