/* TaTasque — the Company box's details in the Fields sheet. Copyright Rapid Surveys Pty Ltd. App tokens only; namespace cbx-.
 * The page styles every <button> full-width + accent: inside .cbx each button says what it is. */
.cbx { flex: 1 1 100%; display: grid; gap: 8px; margin: 2px 0 4px 36px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.cbx button { width: auto; margin: 0; font: inherit; cursor: pointer; }
.cbx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cbx .cbx-tog { min-height: 44px; padding: 6px 4px; background: none; border: 0; color: var(--ink); font-weight: 700; font-size: 14px; }
.cbx .cbx-tog::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .15s ease; }
.cbx .cbx-tog[aria-expanded="true"]::before { transform: rotate(90deg); }
.cbx-state { font-size: 13px; font-weight: 600; color: var(--ok); }
.cbx-note { margin: 0; font-size: 12px; color: var(--muted); }
.cbx-list { display: grid; gap: 6px; }
.cbx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 48px; padding: 4px 8px 4px 2px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.cbx-dragging { opacity: .4; }
.cbx-dropb { box-shadow: 0 -3px 0 var(--accent); }
.cbx-dropa { box-shadow: 0 3px 0 var(--accent); }
.cbx .cbx-grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; min-height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: grab; touch-action: none; }
.cbx .cbx-grip:hover, .cbx .cbx-grip:focus-visible { color: var(--ink); background: var(--bg); }
.cbx-nogrip { width: 8px; min-height: 0; }
.cbx-nm { display: grid; gap: 0; flex: 1 1 9em; min-width: 0; }
.cbx-n { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.cbx-k { font-size: 12px; color: var(--muted); }
.cbx-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: auto; }
.cbx-req { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; font-size: 13px; cursor: pointer; }
.cbx-req input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cbx-sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); flex: none; transition: background-color .15s ease; }
.cbx-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.cbx-req input:checked + .cbx-sw { background: var(--accent); }
.cbx-req input:checked + .cbx-sw::after { transform: translateX(14px); }
.cbx-req input:focus-visible + .cbx-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.cbx-req input:disabled + .cbx-sw { opacity: .5; }
.cbx .cbx-x { min-width: 40px; min-height: 40px; padding: 4px 8px; border-radius: 8px; background: none; border: 1px solid transparent; color: var(--muted); }
.cbx .cbx-x:hover:not(:disabled) { color: var(--err); border-color: var(--line); }
.cbx .cbx-x:disabled { opacity: .35; cursor: not-allowed; }
.cbx-empty { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); }
.cbx .cbx-add { min-height: 44px; padding: 8px 16px; border-radius: 10px; font-weight: 600; background: var(--card); color: var(--accent); border: 1px dashed var(--accent); }
.cbx-panel, .cbx-new { display: grid; gap: 6px; }
.cbx-panel { padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.cbx-lbl { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.cbx-sel, .cbx-in { min-height: 44px; margin: 0; max-width: 100%; }
.cbx-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cbx .cbx-ok { min-height: 44px; padding: 8px 16px; border-radius: 10px; font-weight: 600; }
.cbx .cbx-ghost { min-height: 44px; padding: 6px 12px; border-radius: 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.cbx-err { margin: 0; font-size: 13px; color: var(--err); }
.cbx-err[hidden] { display: none; }
@media (max-width: 480px) { .cbx { margin-left: 0; } .cbx-ctl { flex: 1 1 100%; justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .cbx-sw, .cbx-sw::after, .cbx-tog::before { transition: none; } }
