:root {
  --bg: #eff4fb;
  --bg-soft: #f7faff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --card: #ffffff;
  --text: #16314f;
  --text-strong: #10253d;
  --muted: #6d86a3;
  --border: rgba(34, 96, 170, 0.14);
  --border-strong: rgba(22, 93, 184, 0.22);
  --shadow: 0 18px 48px rgba(19, 67, 127, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 72, 145, 0.08);
  --radius: 20px;
  --gap: 16px;

  --brand-1: #07192f;
  --brand-2: #0a56ad;
  --brand-3: #1d8fff;
  --brand-4: #64baff;

  --ok: rgba(39, 179, 106, 0.12);
  --ok-border: rgba(39, 179, 106, 0.28);

  --warn: rgba(242, 184, 29, 0.14);
  --warn-border: rgba(242, 184, 29, 0.28);

  --orange: rgba(242, 138, 46, 0.14);
  --orange-border: rgba(242, 138, 46, 0.28);

  --bad: rgba(226, 76, 76, 0.12);
  --bad-border: rgba(226, 76, 76, 0.24);

  --info: rgba(29, 143, 255, 0.12);
  --info-border: rgba(29, 143, 255, 0.24);

  --header-grad:
    radial-gradient(circle at top left, rgba(100, 186, 255, 0.28), transparent 32%),
    radial-gradient(circle at top right, rgba(10, 86, 173, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.95));

  --board-max-width: 100vw;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 700px at 0% 0%, rgba(100, 186, 255, 0.20), transparent 48%),
    radial-gradient(900px 560px at 100% 0%, rgba(10, 86, 173, 0.12), transparent 45%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

.mobileMenuBtn {
  display: none;
}

.mobileDrawer {
  display: none;
}

.tagsModalCard {
  max-width: 680px;
}

.owner-hidden {
  display: none !important;
}

/* Header */

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  backdrop-filter: blur(18px);
  background: rgba(247, 250, 255, 0.76);
  border-bottom: 1px solid rgba(34, 96, 170, 0.10);
  box-shadow: 0 8px 26px rgba(16, 66, 126, 0.05);
}

.boardTop {
  flex: 0 0 auto;
}

.wrap {
  width: calc(100vw - 32px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0;
}

.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.brandBlock {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
}

.brandRow {
  flex: 0 0 auto;
}

.brandLogo {
  display: block;
  width: auto;
  max-height: 48px;
}

.controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pill {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pill input[type="number"],
.pill select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-strong);
  font-weight: 600;
}

.pill input[type="number"] {
  width: 72px;
}

.pill select {
  min-width: 112px;
}

.trialPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 360px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.trialPill:hover {
  transform: translateY(-1px);
}

/* Buttons */

.btn,
.btn2,
.xbtn,
.iconBtn,
.menuItem,
.sideItem,
.sideSubitem,
.field input,
.field select,
.field textarea,
.mobileMenuBtn {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.btn {
  border: 1px solid transparent;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(10, 86, 173, 0.14);
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
}

.btn:hover,
.btn2:hover,
.xbtn:hover,
.iconBtn:hover,
.mobileMenuBtn:hover,
.sideItem:hover,
.sideSubitem:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-strong);
  border-color: var(--border);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(135deg, #d94d4d, #f07272);
}

.btn:disabled,
.btn2:disabled,
.xbtn:disabled,
.iconBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* Status top */

.statusBar {
  margin-top: 8px;
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.statusBarLeft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.statusBar .sub {
  font-size: 13px;
  color: var(--muted);
}

.statusBar .iconBtn {
  flex: 0 0 auto;
}

.slaInline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}

.slaInline b {
  color: var(--text-strong);
  font-weight: 800;
}

.slaHelp {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--info-border);
  background: var(--info);
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 800;
  cursor: help;
  flex: 0 0 auto;
}

/* Error */

.err {
  position: fixed;
  top: 94px;
  left: 0;
  right: 0;
  z-index: 99999;
  display: none;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
}

#errBox {
  max-width: var(--board-max-width);
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 242, 242, 0.95), rgba(255, 251, 251, 0.95));
  border: 1px solid rgba(226, 76, 76, 0.22);
  color: #9c2f2f;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(226, 76, 76, 0.08);
  pointer-events: auto;
}

/* Board */

.board {
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100vw - 32px);
  min-width: calc((320px * 4) + (var(--gap) * 3));
  max-width: none;
  margin: 0 auto 18px;
  padding: 4px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(320px, 1fr));
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: hidden;
}

.board::-webkit-scrollbar {
  height: 12px;
}

.board::-webkit-scrollbar-track {
  background: transparent;
}

.board::-webkit-scrollbar-thumb {
  background: rgba(34, 96, 170, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.col[data-col="green"] .colhead {
  background: linear-gradient(180deg, rgba(39, 179, 106, 0.12), rgba(255, 255, 255, 0.78));
}

.col[data-col="yellow"] .colhead {
  background: linear-gradient(180deg, rgba(242, 184, 29, 0.14), rgba(255, 255, 255, 0.78));
}

.col[data-col="orange"] .colhead {
  background: linear-gradient(180deg, rgba(242, 138, 46, 0.14), rgba(255, 255, 255, 0.78));
}

.col[data-col="red"] .colhead {
  background: linear-gradient(180deg, rgba(226, 76, 76, 0.12), rgba(255, 255, 255, 0.78));
}

.col[data-col="gray"] .colhead {
  background: linear-gradient(180deg, rgba(125, 143, 166, 0.12), rgba(255, 255, 255, 0.78));
}

.colhead {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(34, 96, 170, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(10px);
}

.coltitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  min-width: 0;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
  flex: 0 0 auto;
}

.count {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.list::-webkit-scrollbar {
  width: 10px;
}

.list::-webkit-scrollbar-track {
  background: transparent;
}

.list::-webkit-scrollbar-thumb {
  background: rgba(34, 96, 170, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Cards */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 253, 255, 0.92));
  border: 1px solid rgba(34, 96, 170, 0.10);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(17, 72, 145, 0.08);
}

.cardtop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  color: var(--text-strong);
  margin: 0;
  word-break: break-word;
}

.meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.45;
  word-break: break-word;
}

.msg {
  margin-top: 12px;
  font-size: 12px;
  color: #35506d;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 4.6em;
  overflow: hidden;
}

.cardTags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.tagChip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 140px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 99, 201, 0.18);
  background: rgba(13, 99, 201, 0.08);
  color: #0d3b78;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-strong);
  white-space: nowrap;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  flex: 0 0 auto;
}

.badge.pending {
  background: rgba(242, 184, 29, 0.10);
  border-color: rgba(242, 184, 29, 0.26);
  color: #8b6100;
}

.badge.success,
.badge.done {
  background: rgba(39, 179, 106, 0.10);
  border-color: rgba(39, 179, 106, 0.24);
  color: #1a7a46;
}

.footer {
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed rgba(34, 96, 170, 0.12);
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn2 {
  font-size: 11px;
  padding: 8px 11px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.btn2.green {
  border-color: rgba(39, 179, 106, 0.24);
  background: rgba(39, 179, 106, 0.12);
  color: #1d7d49;
}

.btn2.ghost {
  border-color: rgba(34, 96, 170, 0.12);
  background: transparent;
  color: var(--brand-2);
}

.smallmuted {
  color: var(--muted);
}

/* Desktop sidepanel */

.desktopSidepanel {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10010;
  pointer-events: none;
}

.desktopSidepanelBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 25, 47, 0.30);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.desktopSidepanelPanel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 30px rgba(19, 67, 127, 0.16);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.desktopSidepanel.open {
  pointer-events: auto;
}

.desktopSidepanel.open .desktopSidepanelBackdrop {
  opacity: 1;
}

.desktopSidepanel.open .desktopSidepanelPanel {
  transform: translateX(0);
}

.desktopSidepanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.desktopSidepanelBody {
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sideGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sideGroupTitle,
.mobileSectionTitle {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sideItem,
.sideSubitem,
.menuItem {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-strong);
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.sideItem:hover,
.sideSubitem:hover,
.menuItem:hover {
  background: rgba(10, 86, 173, 0.08);
  border-color: rgba(34, 96, 170, 0.10);
}

.sideSubmenu {
  border-radius: 12px;
}

.sideSubmenu summary {
  list-style: none;
}

.sideSubmenu summary::-webkit-details-marker {
  display: none;
}

.sideSubmenuItems {
  padding-left: 10px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Old dropdown kept harmless */
.actionsMenuWrap {
  position: relative;
}

.actionsToggle {
  min-width: 110px;
  justify-content: center;
}

.actionsDropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(19, 67, 127, 0.16);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}

.actionsDropdown.open {
  display: flex;
}

/* Forms / modals */

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 47, 0.34);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.modal {
  width: min(560px, 92vw);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(34, 96, 170, 0.14);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(18, 65, 123, 0.18);
  overflow: hidden;
}

.termsModalCard,
.helpModalCard,
.teamModalCard {
  width: min(780px, 94vw);
}

.fiscalModalCard {
  width: min(720px, calc(100vw - 32px));
}

.teamModalCard {
  max-height: 88vh;
}

.teamModalBody,
.fiscalModalCard .modalBody {
  min-height: 0;
  overflow: auto;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(34, 96, 170, 0.08);
  background: linear-gradient(180deg, rgba(236, 245, 255, 0.72), rgba(255, 255, 255, 0.82));
  flex: 0 0 auto;
}

.modalTitle {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}

.modalBody {
  padding: 16px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.modalFooter {
  padding: 14px 16px;
  border-top: 1px solid rgba(34, 96, 170, 0.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: rgba(248, 251, 255, 0.82);
  flex: 0 0 auto;
}

.xbtn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-strong);
  cursor: pointer;
}

.iconBtn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 96, 170, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-strong);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.field textarea {
  min-height: 110px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.pill select:focus,
.pill input[type="number"]:focus {
  outline: none;
  border-color: rgba(29, 143, 255, 0.35);
  box-shadow:
    0 0 0 3px rgba(29, 143, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.docBox {
  max-height: 52vh;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 96, 170, 0.12);
  background: rgba(245, 249, 255, 0.86);
  font-size: 12px;
  color: #31506e;
  line-height: 1.5;
  white-space: pre-wrap;
}

.qrBox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.qrImg {
  width: 280px;
  max-width: 70vw;
  border-radius: 18px;
  border: 1px solid rgba(34, 96, 170, 0.14);
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(17, 72, 145, 0.08);
}

.rowBetween {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.tag.ok {
  border-color: var(--ok-border);
  background: var(--ok);
  color: #1d7d49;
}

.tag.bad {
  border-color: var(--bad-border);
  background: var(--bad);
  color: #9b3434;
}

.tag.mid {
  border-color: var(--info-border);
  background: var(--info);
  color: var(--brand-2);
}

.teamSearchField {
  margin-top: 12px;
  margin-bottom: 0;
}

.teamToolbar {
  margin-top: 10px;
  margin-bottom: 10px;
}

.teamListWrap {
  margin-top: 8px;
  border: 1px solid rgba(34, 96, 170, 0.12);
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.9);
  padding: 8px;
  max-height: 48vh;
  overflow-y: auto;
  min-height: 180px;
}

.teamList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teamItem {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 96, 170, 0.10);
  background: rgba(255, 255, 255, 0.92);
}

.teamItem input {
  margin-top: 3px;
}

.teamItem b {
  font-size: 12px;
  color: var(--text-strong);
}

.teamMeta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.teamEmpty {
  padding: 14px 10px;
  font-size: 12px;
  color: var(--muted);
}

.waDebug {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: 160px;
  overflow: auto;
  background: #f4f8fd;
  color: #41617f;
  border: 1px solid rgba(34, 96, 170, 0.10);
  border-radius: 14px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  display: none;
}

.wa-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 10px;
}

.wa-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(29, 143, 255, 0.14);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: waSpin 0.9s linear infinite;
}

.modalBrandMini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(10, 86, 173, 0.08), rgba(100, 186, 255, 0.12));
  border: 1px solid rgba(34, 96, 170, 0.10);
  margin-bottom: 14px;
}

.modalBrandMini img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(34, 96, 170, 0.10);
}

.modalBrandMini div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modalBrandMini strong {
  color: var(--text-strong);
  font-size: 13px;
}

.modalBrandMini span {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 11px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 16px 32px rgba(10, 86, 173, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobileSection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobilePill {
  width: 100%;
  justify-content: space-between;
  border-radius: 16px;
}

.mobilePill select,
.mobilePill input[type="number"] {
  min-width: 0;
  width: auto;
  max-width: 48%;
  text-align: right;
}

@keyframes waSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Medium screens */

@media (max-width: 1400px) {
  .trialPill {
    max-width: 280px;
    font-size: 11px;
    padding: 7px 11px;
  }

  .brandLogo {
    max-height: 44px;
  }
}

@media (max-width: 1180px) {
  .top {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .brandBlock {
    min-width: 0;
  }

  .trialPill {
    max-width: 260px;
    font-size: 11px;
    padding: 7px 11px;
  }

  .statusBar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .statusBarLeft {
    max-width: 100%;
    width: auto;
  }

  .board {
    width: calc(100vw - 24px);
    min-width: calc((300px * 4) + (var(--gap) * 3));
    padding-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .col {
    min-height: 420px;
  }

  .list {
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* Mobile */

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .statusBar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .statusBarLeft,
  .slaInline {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }

  .slaHelp {
    flex: 0 0 auto;
  }

  .statusBar .sub {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desktopSidepanel {
    display: none;
  }

  .mobileDrawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
  }

  .mobileDrawerBackdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 25, 47, 0.34);
    opacity: 0;
    transition: opacity 0.18s ease;
  }

  .mobileDrawerPanel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(86vw, 360px);
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 30px rgba(19, 67, 127, 0.16);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
  }

  .mobileDrawer.open {
    pointer-events: auto;
  }

  .mobileDrawer.open .mobileDrawerBackdrop {
    opacity: 1;
  }

  .mobileDrawer.open .mobileDrawerPanel {
    transform: translateX(0);
  }

  .mobileDrawerHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .mobileDrawerBody {
    padding: 16px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .mobileMenuBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-strong);
    font-size: 18px;
    cursor: pointer;
  }

  .controls,
  .trialPill {
    display: none !important;
  }

  .wrap {
    width: calc(100vw - 20px);
    padding: 14px 0;
  }

  .siteHeader .top {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }

  .brandBlock {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: auto;
  }

  .brandRow {
    width: auto;
  }

  .brandLogo {
    width: 108px;
    max-height: none;
  }

  .board {
    flex: 1 1 auto;
    min-height: 0;
    width: 100vw;
    min-width: 0;
    margin: 0;
    padding: 8px 12px 14px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100vw - 24px);
    grid-template-columns: unset;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .board::-webkit-scrollbar {
    height: 0;
  }

  .col {
    min-height: 0;
    height: 100%;
    scroll-snap-align: start;
    border-radius: 20px;
  }

  .colhead {
    padding: 14px 14px 12px;
  }

  .list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .card {
    padding: 12px;
    border-radius: 16px;
  }

  .name {
    font-size: 13px;
  }

  .meta,
  .msg,
  .footer,
  .btn2,
  .badge {
    font-size: 11px;
  }

  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    justify-content: flex-start;
  }

  .pill {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }

  .pill select,
  .pill input[type="number"] {
    min-width: 0;
    width: auto;
    max-width: 48%;
    text-align: right;
  }

  .modal,
  .termsModalCard,
  .helpModalCard,
  .teamModalCard,
  .fiscalModalCard {
    width: min(100vw - 16px, 780px);
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  .modalBody,
  .fiscalModalCard .modalBody {
    max-height: none;
  }

  .modalFooter {
    justify-content: stretch;
  }

  .modalFooter .btn {
    width: 100%;
    justify-content: center;
  }

  .err {
    top: 78px;
    padding: 0 10px;
  }
}