/* Minimal app styles - branding handled via DaisyUI + brand_config */

/*
 * Modal robustness. The board renders ~70 <dialog class="modal"> elements (one
 * per card/column). Those rely on DaisyUI's CDN CSS to (a) stay hidden when
 * closed and (b) give the panel a solid background. When that CDN styling loads
 * incompletely, every closed dialog leaks into the page as a transparent,
 * unreadable pile-up. These same-origin rules (always loaded, higher
 * specificity) restore the native-dialog behavior no matter what the CDN does.
 */
dialog.modal:not([open]) { display: none; }
dialog.modal[open] { display: grid; }
.modal-box { background-color: #ffffff; }

/*
 * Checkbox robustness — same story as the modal rules above. DaisyUI's .checkbox
 * sets `appearance: none` (which hides the browser's own checkmark) and then
 * paints its own tick from the CDN stylesheet. When that CDN styling doesn't
 * fully apply, a *checked* box looks identical to an unchecked one — so people
 * couldn't tell a selection had registered (reported on the Timesheets "Add
 * time" people picker: "it won't let me select the cleaner"). These same-origin,
 * higher-specificity rules draw the checked state ourselves, so a tick is always
 * visible no matter what the CDN does.
 */
input[type="checkbox"].checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  flex-shrink: 0;
  border: 2px solid var(--brand-primary, #2563EB);
  border-radius: 0.35rem;
  background-color: #ffffff;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
}
input[type="checkbox"].checkbox.checkbox-sm {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
}
input[type="checkbox"].checkbox:checked {
  background-color: var(--brand-primary, #2563EB);
  border-color: var(--brand-primary, #2563EB);
}
input[type="checkbox"].checkbox:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.3rem;
  height: 0.6rem;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

/*
 * Sidebar nav colors. DaisyUI's bg-primary/text-primary *utility* classes are
 * not generated in this CDN setup (they compute to transparent), so the active
 * "you are here" pill is drawn here with the reliable --brand-primary variable.
 */
.sidebar-link { color: rgba(20, 35, 51, 0.72); }
.sidebar-link:hover { background-color: rgba(0, 113, 175, 0.10); color: #0071af; }
.sidebar-link.is-active,
.sidebar-link.is-active:hover { background-color: var(--brand-primary); color: #ffffff; font-weight: 600; }
.sidebar-link.is-active i { color: #ffffff; }
