:root {
  --brand-blue: #2563EB;
  --sky-blue:rgba(218, 235, 255, 1);
}
body {
  font-family: system-ui, sans-serif;
  margin: 2em;
  background: #f7f7f9;
  color: #222;
}

h2 {
  color: #333;
}

button {
  background: #0066cc;
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
}

label:not(.inline-label){display: block; padding-bottom: 5px;}
input:not([type="checkbox"]):not([type="radio"]){min-width: 100%; line-height: 35px !important; padding-left:10px !important; border: 1px solid silver; border-radius: 3px;}
input[aria-invalid="true"] {
  border-color: #dc2626 !important; /* Tailwind red-600 */
  border-width: 1px;
  background-color: #fef2f2;
  outline: none;
}
.errorlist li{color: #d50001 !important;}
.messages{margin-top: 10px;}
.helptext{font-size: 12px !important;}
.brand-blue{color:  var(--brand-blue);}

#profile-links{margin-top: 20px; color: var(--brand-blue);}
#profile-links li{width: fit-content; margin-bottom: 10px;}
#profile-links li a{display: flex; align-items: center;}
#profile-links li a svg{ margin-right:10px; }
#profile-links li a:hover{opacity: 0.8; text-decoration: underline;}

/* Dark mode global overrides — soften explicit gray text so it stays readable */
.dark body { background: #111827; color: #f3f4f6; }
.dark h2 { color: #e5e7eb; }
.dark .bg-white { background: transparent !important; }
.dark .bg-blue-600,
.dark .hover\:bg-blue-700:hover { background-color: transparent !important; color: #93c5fd !important; border: 1px solid #3b82f6 !important; }
.dark .text-white { color: #cbd5e1 !important; }
.dark .border-white { border-color: #475569 !important; }
.dark .divide-white > * { border-color: #475569 !important; }
.dark p, .dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
.dark td, .dark th, .dark li, .dark span, .dark label { color: #cbd5e1; }
.dark tr, .dark td, .dark th { border-color: #334155; }
.dark table { border-color: #334155; }
.dark thead { background-color: #1e3a5f !important; color: #e5e7eb; }
.dark .hover\:bg-gray-100:hover,
.dark .hover\:bg-gray-50:hover { background-color: #1f2937 !important; }
.dark .bg-gray-50 { background-color: #111827 !important; }
.dark .text-red-600 { color: #f87171 !important; }
.dark .bg-red-600 { background-color: #5c1a1a !important; color: #f1d0d0 !important; }
.dark .text-gray-900 { color: #f3f4f6 !important; }
.dark .text-gray-800 { color: #e5e7eb !important; }
.dark .text-gray-700 { color: #d1d5db !important; }
.dark .text-gray-600 { color: #9ca3af !important; }
.dark .text-gray-500 { color: #6b7280 !important; }
.dark input:not([type="checkbox"]):not([type="radio"]) {
  background: #1f2937;
  color: #f3f4f6;
  border-color: #4b5563;
}
.dark input[aria-invalid="true"] { background-color: #3b1f1f !important; }
.dark select { background: #1f2937; color: #f3f4f6; border-color: #4b5563; }

/* Calendar style overrides */

#calendar {
  --fc-today-bg-color: #d1f0ff63; /* light blue with alpha */
}

#calendar .fc-bg-event .fc-event-title{margin-right: 25px; word-wrap: anywhere; max-height: 100%; overflow: hidden;}

.fc-header-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* All chunks default to inline on desktop */
.fc-toolbar-chunk {
  display: flex;
  align-items: center;
}

/* Title is centered on desktop */
.fc-toolbar-chunk:nth-child(2) {
  flex: 1 1 auto;
  justify-content: center;
  margin: 0.5rem 0;
  order: 0; /* default desktop order */
}

/* Left and Right chunks */
.fc-toolbar-chunk:first-child {
  flex: 1 1 25%;
  justify-content: flex-start;
}
.fc-toolbar-chunk:last-child {
  flex: 1 1 25%;
  justify-content: flex-end;
}

/* MOBILE OVERRIDE */
@media (max-width: 768px) {
  .fc-toolbar-chunk:first-child,
  .fc-toolbar-chunk:last-child {
    flex: 1 1 50%;
  }

  .fc-toolbar-chunk:nth-child(2) {
    flex: 1 1 100%;
    order: 2; /* push it below */
    padding-top: 10px;
  }
}