
:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  color: #182026;
  background: #f4f7f8;
}
body { margin: 0; }
.top {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 14px 24px;
  background: #12343b;
  color: #fff;
}
.top nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; align-items: center; }
.top a { color: #d9f2f0; text-decoration: none; }
.navgroup {
  position: relative;
  display: inline-block;
}
.navsubgroup {
  position: relative;
  display: block;
}
.navtrigger {
  background: transparent;
  color: #d9f2f0;
  padding: 0;
  font-weight: 400;
}
.navtrigger::after {
  content: " v";
  font-size: 12px;
}
.navmenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  min-width: 230px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(24, 32, 38, 0.18);
}
.navsubmenu {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 30;
  display: none;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(24, 32, 38, 0.18);
}
.navmenu a,
.navitemtrigger {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #182026;
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  font-weight: 400;
  text-align: left;
  margin: 0;
}
.navitemtrigger::after {
  content: " >";
  float: right;
}
.navmenu a:hover,
.navmenu a:focus,
.navitemtrigger:hover,
.navitemtrigger:focus {
  background: #eaf1f2;
  color: #0f5f62;
}
.navgroup:hover .navmenu,
.navgroup:focus-within .navmenu {
  display: block;
}
.navsubgroup:hover .navsubmenu,
.navsubgroup:focus-within .navsubmenu {
  display: block;
}
.logout { margin: 0; }
.switcher { min-width: 260px; margin: 0; }
.switcher select { padding: 8px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px; }
h1 { font-size: 30px; margin: 0 0 18px; }
h2 { font-size: 20px; margin-top: 0; }
.panel, .vote {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 22px;
}
.narrow { max-width: 420px; }
.alert { background: #fff3f2; border: 1px solid #d28a82; padding: 12px; border-radius: 6px; }
.context { background: #eaf1f2; border: 1px solid #d8e2e4; border-radius: 6px; padding: 10px 12px; }
.muted { color: #667579; font-size: 13px; }
.badge { display: inline-block; padding: 6px 8px; border-radius: 6px; background: #eaf1f2; color: #0f5f62; font-weight: 700; }
.vote-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid #d8e2e4;
  box-shadow: 0 8px 20px rgba(24, 32, 38, 0.12);
}
.summary-spacer { height: 54px; }
.manual-votes { margin-bottom: 76px; }
.manual-row.saving { opacity: 0.65; }
[data-manual-sort] { cursor: pointer; user-select: none; }
.threshold {
  margin-left: auto;
  color: #7a2f00;
  font-weight: 800;
}
.has-history { background: #fffdf4; }
.history-owner { color: #8a5a20; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.calendar-toolbar h2 { margin: 0 auto 0 0; }
.calendar-jump {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}
.calendar-jump label { margin: 0; min-width: 120px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  overflow: visible;
  background: #d8e2e4;
  gap: 1px;
}
.calendar-panel { overflow: visible; }
.calendar-head {
  background: #eaf1f2;
  color: #0f5f62;
  font-weight: 800;
  padding: 9px;
  text-align: center;
}
.calendar-day {
  position: relative;
  min-height: 118px;
  padding: 8px;
  background: #fff;
}
.calendar-day.outside {
  background: #f3f6f7;
  color: #8a9699;
}
.calendar-day.today .calendar-date {
  background: #12343b;
  color: #fff;
}
.calendar-day.has-event {
  background: #fffaf0;
}
.calendar-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
}
.calendar-items {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.calendar-item {
  position: relative;
  z-index: 1;
  border-left: 4px solid #0f5f62;
  border-radius: 6px;
  background: #eaf1f2;
  padding: 6px 7px;
  font-size: 13px;
}
.calendar-item:hover,
.calendar-item:focus,
.calendar-item:focus-within {
  z-index: 120;
}
.calendar-item.done {
  border-left-color: #276749;
  background: #ecf8f1;
}
.calendar-item:not(.public) {
  border-left-color: #667579;
}
.calendar-item a {
  color: #12343b;
  font-weight: 800;
  text-decoration: none;
}
.calendar-tooltip {
  display: none;
  position: absolute;
  z-index: 999;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, 70vw);
  padding: 12px;
  background: #182026;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(24, 32, 38, 0.28);
  white-space: pre-wrap;
  font: inherit;
  pointer-events: none;
}
.calendar-item:hover .calendar-tooltip,
.calendar-item:focus .calendar-tooltip,
.calendar-item:focus-within .calendar-tooltip {
  display: block;
}
.calendar-form-panel {
  position: sticky;
  top: 16px;
}
.stats article {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 16px;
}
.stats span { display: block; font-size: 28px; font-weight: 700; margin-bottom: 6px; color: #0f5f62; }
.import-tiles article {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 12px;
}
.import-tiles strong { display: block; margin-bottom: 6px; color: #0f5f62; }
.import-tiles span { display: block; color: #526166; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.unit-accessories,
.unit-grouping {
  margin-top: 18px;
  border-top: 1px solid #d8e2e4;
  padding-top: 14px;
}
.accessory-rows { display: grid; gap: 10px; margin-bottom: 10px; }
.accessory-row {
  align-items: end;
  padding: 10px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #f7fafb;
}
label { display: grid; gap: 6px; margin: 8px 0; font-weight: 600; }
input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b8c7ca;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  background: #fff;
}
.file-drop {
  border: 2px dashed #9ab0b5;
  border-radius: 8px;
  padding: 16px;
  background: #f7fafb;
  cursor: pointer;
}
.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-drop.dragover {
  border-color: #0f5f62;
  background: #eaf1f2;
}
.file-drop span {
  color: #526166;
  font-weight: 500;
}
.file-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.file-list button {
  padding: 6px 10px;
  background: #667579;
}
.recipient-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 10px;
  background: #f7fafb;
}
.recipient-item {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
}
.recipient-item input { width: auto; margin-top: 3px; }
.recipient-item small {
  display: block;
  margin-top: 3px;
  color: #526166;
  font-weight: 500;
}
.editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.editor-toolbar button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 0;
  background: #0f5f62;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.icon-button.danger { background: #a33a2b; }
.rich-editor {
  min-height: 220px;
  border: 1px solid #b8c7ca;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}
.rich-editor:focus {
  outline: 2px solid #8fc9ca;
  outline-offset: 1px;
}
.mail-preview {
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 14px;
  background: #f7fafb;
}
progress {
  width: 100%;
  height: 22px;
}
.progress-log {
  max-height: 260px;
  overflow: auto;
  padding-left: 20px;
}
button {
  border: 0;
  border-radius: 6px;
  background: #0f5f62;
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
margin-bottom: 5px;
}
button.danger {
  background: #a33a2b;
}
button.secondary {
  background: #667579;
}
.button-link {
  display: inline-block;
  border-radius: 6px;
  background: #0f5f62;
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #d8e2e4;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid #e4ecee;
  text-align: left;
  vertical-align: top;
}
th { background: #eaf1f2; }
.filters th { padding: 6px; }
.filters input, .filters select {
  min-width: 120px;
  padding: 7px;
  font-size: 13px;
}
.filters button { padding: 7px 10px; margin-top: 6px; }
.hash { max-width: 260px; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 12px; }
.actions form { display: inline; }
.link-button {
  border: 0;
  background: transparent;
  color: #0f5f62;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}
.link-button:hover { color: #123c42; }
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0;
}
.pager a,
.pager .current,
.pager .disabled,
.pager .gap {
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 7px 10px;
  text-decoration: none;
}
.pager a {
  background: #fff;
  color: #0f5f62;
  font-weight: 800;
}
.pager a:hover {
  background: #eaf1f2;
}
.pager .current {
  background: #0f5f62;
  border-color: #0f5f62;
  color: #fff;
  font-weight: 800;
}
.pager .disabled {
  color: #87969a;
  font-weight: 700;
  background: #f3f6f7;
}
.pager .gap {
  border-color: transparent;
  min-width: 24px;
  padding-left: 4px;
  padding-right: 4px;
}
.pager-pages {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.details-row td {
  background: #f7fafb;
}
.details-box {
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.modal-open { overflow: hidden; }
.file-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.file-preview-backdrop[hidden] { display: none; }
.file-preview-box {
  width: min(1080px, 96vw);
  height: min(820px, 92vh);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.file-preview-box header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.file-preview-box iframe {
  border: 0;
  height: 100%;
  width: 100%;
  background: #f7fafb;
}
.kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 12px;
  margin: 0 0 14px;
}
.kv dt {
  font-weight: 700;
  color: #526166;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  background: #f7fafb;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 14px;
}
fieldset { border: 1px solid #d8e2e4; border-radius: 8px; margin: 16px 0; }
fieldset label, .check { display: block; font-weight: 500; }
fieldset input, .check input { width: auto; }
@media (max-width: 700px) {
  .top { align-items: flex-start; flex-direction: column; }
  main { padding: 16px; }
  table { display: block; overflow-x: auto; }
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-panel { overflow-x: auto; overflow-y: visible; }
  .calendar-grid { min-width: 720px; }
  .calendar-form-panel { position: static; }
  .calendar-jump { width: 100%; }
}
