#board-title { cursor: pointer; padding: 7px 10px; border-radius: 7px; }
#board-title:hover { background: #ffffff20; }

/* Refined application theme */
:root {
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  color: #172b4d;
  background: #0b55c5;
}
body {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 8% 8%, #4aa3ff80 0, transparent 28%),
    radial-gradient(circle at 88% 16%, #6d5dfc55 0, transparent 30%),
    linear-gradient(145deg, #0747a6 0%, #0c66e4 48%, #1558c5 100%);
  background-attachment: fixed;
  cursor: url("normal.cur"), auto;
}
button:not(:disabled), a, select, .card, .add-list, .add-card, #board-title, .brand,
.client-check, .attachment, .user-row, .active-toggle, #user-servers label {
  cursor: url("attack.cur"), pointer !important;
}
input[type="checkbox"], input[type="radio"], input[type="file"] {
  cursor: url("attack.cur"), pointer;
}
input[type="text"], input[type="password"], input[type="date"], textarea {
  cursor: text;
}
button:disabled { cursor: url("normal.cur"), default; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(#ffffff12 1px, transparent 1px),
    linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
header {
  height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid #ffffff24;
  background: #073d8ad9;
  box-shadow: 0 8px 28px #031d4a35;
  backdrop-filter: blur(16px) saturate(135%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.6px;
  text-shadow: 0 2px 12px #001a4c70;
}
.brand::before {
  content: "";
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 7px;
  background: linear-gradient(135deg, #79c7ff, #7c5cff);
  box-shadow: inset 0 0 0 4px #ffffff30, 0 4px 12px #001b4d70;
  transform: rotate(-7deg);
}
.brand::before { display: none; }
.brand-logo {
  display: block;
  width: auto;
  height: 44px;
  max-width: 165px;
  object-fit: contain;
  filter: drop-shadow(0 3px 9px #00183f70);
}
.brand span { white-space: nowrap; }
header h1 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.server-picker label { color: #cfe4ff; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; }
.server-picker select {
  border: 1px solid #ffffff25;
  color: #102a52;
  background-color: #f7fbff;
  box-shadow: 0 3px 10px #001d5030;
  font-weight: 600;
}
.server-picker button {
  border: 1px solid #ffffff20;
  background: #ffffff18;
  font-weight: 650;
  backdrop-filter: blur(8px);
}
main { gap: 18px; padding: 22px; }
.list {
  border: 1px solid #ffffff65;
  background: #f4f6f9ed;
  box-shadow: 0 12px 28px #00265d2b, inset 0 1px #fff;
  backdrop-filter: blur(12px);
}
.list-heading h2 { color: #12284b; font-size: 15px; font-weight: 750; letter-spacing: -.1px; }
.list .cards {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 5px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: #9fadbc transparent;
}
.list .cards::-webkit-scrollbar { width: 8px; }
.list .cards::-webkit-scrollbar-track { background: transparent; }
.list .cards::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 10px; background: #9fadbc; background-clip: padding-box; }
.list .cards::-webkit-scrollbar-thumb:hover { background: #738496; background-clip: padding-box; }
.card {
  border: 1px solid #091e4214;
  box-shadow: 0 3px 8px #091e4217, 0 1px 2px #091e4225;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-1px); border-color: #579dff; box-shadow: 0 8px 18px #091e4225; outline: none; }
.add-list { border: 1px solid #ffffff30; background: #ffffff24; backdrop-filter: blur(10px); }
.activity-panel {
  border: 1px solid #ffffff60;
  background: #f4f6f9ed;
  box-shadow: 0 12px 28px #00265d2b, inset 0 1px #fff;
  backdrop-filter: blur(12px);
}
.activity-panel h2 { color: #12284b; font-weight: 750; }
.empty-board { width: min(520px,calc(100vw - 32px)); padding: 25px; border: 1px solid #ffffff60; border-radius: 14px; background: #f4f6f9ed; box-shadow: 0 12px 28px #00265d2b; }
.empty-board h2 { margin: 0 0 7px; }
.empty-board p { margin: 0; color: #626f86; }
.account-menu { display: flex; gap: 7px; margin-left: auto; }
.account-menu button { border: 1px solid #ffffff28; border-radius: 7px; padding: 8px 10px; background: #ffffff18; color: #fff; font-weight: 650; cursor: pointer; }
.account-menu button:hover { background: #ffffff2d; }
#unlock-editing:disabled { opacity: .9; cursor: default; }
#auth-dialog { width: min(430px,92vw); }
#auth-dialog h2 { margin: 0 0 5px; }
#auth-help { margin: 0 0 18px; color: #626f86; }
.dialog-actions.compact { grid-template-columns: 1fr 1fr auto auto; }
.users-dialog { width: min(920px,95vw); max-height: 90vh; }
.users-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; border-bottom: 1px solid #dcdfe4; padding-bottom: 14px; }
.users-header h2,.users-header p { margin: 0; }
.users-header p { margin-top: 4px; color: #626f86; font-size: 13px; }
.users-header button,.user-form-actions button { border: 0; border-radius: 7px; padding: 9px 12px; cursor: pointer; }
.users-layout { display: grid; grid-template-columns: minmax(230px,.8fr) minmax(320px,1.2fr); gap: 20px; padding-top: 18px; }
.users-list { max-height: 570px; overflow-y: auto; border-right: 1px solid #dcdfe4; padding-right: 14px; }
.user-row { display: grid; width: 100%; gap: 2px; padding: 11px; border: 0; border-radius: 8px; background: transparent; color: #172b4d; text-align: left; cursor: pointer; }
.user-row:hover { background: #f1f2f4; }
.user-row span,.user-row small { color: #626f86; }
.user-row.inactive { opacity: .55; }
.user-editor h3 { margin: 0 0 16px; }
.server-access { margin: 0 0 16px; border: 1px solid #b6c2cf; border-radius: 8px; padding: 10px; }
.server-access legend { padding: 0 5px; font-size: 13px; font-weight: 700; }
#user-servers { display: grid; grid-template-columns: 1fr 1fr; max-height: 150px; overflow-y: auto; gap: 4px 12px; }
#user-servers label,.active-toggle { display: flex; grid-template-columns: none; align-items: center; gap: 7px; margin: 0; padding: 5px; font-weight: 500; }
#user-servers input,.active-toggle input { width: 17px; height: 17px; }
.user-form-actions { display: flex; justify-content: space-between; gap: 10px; }
.user-form-actions button:last-child { background: #0c66e4; color: #fff; }
.server-picker { display: flex; align-items: center; gap: 7px; }
.server-picker label { margin: 0; color: #deebff; font-size: 12px; }
.server-picker select { width: auto; min-width: 150px; padding: 7px 28px 7px 9px; border: 0; }
.server-picker button { border: 0; border-radius: 7px; padding: 8px 10px; background: #ffffff22; color: white; cursor: pointer; }
.server-picker button:hover { background: #ffffff35; }
.locked-board { width: min(520px,calc(100vw - 30px)); padding: 18px; border-radius: 10px; background: #fff; color: #44546f; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-heading h2 { flex: 1; }
.list-actions { display: flex; gap: 3px; }
.list-actions button { display: grid; place-items: center; width: 30px; height: 30px; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: #44546f; cursor: pointer; }
.list-actions svg { width: 18px; height: 18px; fill: currentColor; }
.list-actions button:hover { background: #dcdfe4; color: #172b4d; }
.list-actions .delete-list:hover { background: #ffeceb; color: #ae2e24; }
.comments { border-top: 1px solid #dcdfe4; margin-top: 20px; padding-top: 14px; }
.comments h3 { margin: 0 0 12px; font-size: 16px; }
.comment { background: #f1f2f4; border-radius: 8px; margin-bottom: 9px; padding: 10px; }
.comment strong { font-size: 13px; }
.comment time { color: #626f86; float: right; font-size: 11px; }
.comment p { margin: 7px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.no-comments { color: #626f86; font-size: 13px; }
.comment-form { margin: 12px 0 18px; }
.comment-form input, .comment-form textarea { margin-bottom: 8px; }
.comment-form button { border: 0; border-radius: 7px; padding: 9px 13px; background: #0c66e4; color: white; cursor: pointer; }
.attachments { border-top: 1px solid #dcdfe4; margin-top: 18px; padding-top: 14px; }
.attachments h3 { margin: 0 0 12px; font-size: 16px; }
#attachment-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 10px; }
.attachment { color: #172b4d; font-size: 12px; overflow: hidden; text-decoration: none; }
.attachment img { width: 100%; height: 100px; display: block; object-fit: cover; border-radius: 8px; border: 1px solid #dcdfe4; }
.attachment span { display: block; padding-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-form { margin: 12px 0 18px; }
.upload-form input { margin-bottom: 8px; }
.upload-form button { border: 0; border-radius: 7px; padding: 9px 13px; background: #0c66e4; color: white; cursor: pointer; }
.upload-form button:disabled { opacity: .6; }
.card.test-passed { border-left: 5px solid #22a06b; background: #effff8; }
.card.test-failed { border-left: 5px solid #c9372c; background: #fff1f0; }
.card.test-retest { border-left: 5px solid #e56910; background: #fff7e8; }
.client-check { display: flex; align-items: center; gap: 7px; margin: 11px 0 0; padding-top: 9px; border-top: 1px solid #dcdfe4; font-size: 12px; cursor: pointer; }
.client-check select { width: auto; max-width: 145px; padding: 5px; font-size: 12px; }
.client-check span { font-weight: 600; color: #216e4e; }
.test-failed .client-check span { color: #ae2e24; }
.test-retest .client-check span { color: #a54800; }
.tested-at { margin-left: 25px; font-size: 10px !important; color: #626f86; }
.test-note { margin: 8px 0 0; padding: 8px; border-radius: 6px; background: #fff; color: #44546f; font-size: 12px; white-space: pre-wrap; }
.description-label { margin-bottom: 6px; }
.description-editor { margin-bottom: 16px; border: 1px solid #b6c2cf; border-radius: 8px; overflow: hidden; background: #fff; }
.format-toolbar { display: flex; align-items: center; gap: 3px; padding: 6px; border-bottom: 1px solid #dcdfe4; background: #f7f8f9; overflow-x: auto; }
.format-toolbar button { flex: none; min-width: 30px; height: 29px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: #44546f; cursor: pointer; font-size: 12px; }
.format-toolbar button:hover { background: #dcdfe4; color: #172b4d; }
.format-toolbar span { width: 1px; height: 19px; margin: 0 3px; background: #dcdfe4; }
.rich-description { display: block; min-height: 185px; max-height: 420px; padding: 11px; border: 0; outline: 0; overflow-y: auto; line-height: 1.45; }
.rich-description:focus { box-shadow: inset 0 0 0 2px #579dff; }
.rich-description:empty::before { content: attr(data-placeholder); color: #8590a2; pointer-events: none; }
.rich-description p { margin: 0 0 9px; }
.rich-description ul,.rich-description ol { margin: 5px 0 10px; padding-left: 25px; }
.format-help { display: block; padding: 5px 10px 8px; color: #626f86; font-size: 11px; }
.description-preview { min-height: 150px; padding: 10px 12px; overflow-wrap: anywhere; }
.description-preview p { margin: 5px 0 10px; }
.description-preview ul,.description-preview ol { margin: 6px 0 10px; padding-left: 24px; }
.description-preview a { color: #0c66e4; }
.md-check { display: flex; align-items: center; gap: 7px; margin: 7px 0; font-weight: 400; }
.md-check input { width: 17px; height: 17px; }
.board-area { display: flex; align-items: flex-start; gap: 14px; min-width: 0; overflow-x: auto; flex: 1; }
.activity-panel { width: 310px; max-height: calc(100vh - 90px); flex: none; position: sticky; right: 0; top: 20px; overflow-y: auto; padding: 14px; border-radius: 12px; background: #f1f2f4; box-shadow: 0 4px 12px #0002; }
.activity-panel h2 { margin: 2px 0 12px; font-size: 16px; }
.activity-item { padding: 10px 4px; border-bottom: 1px solid #dcdfe4; }
.activity-item strong { font-size: 13px; }
.activity-item p { margin: 4px 0; color: #44546f; font-size: 12px; }
.activity-item small { color: #626f86; font-size: 10px; }

@media (max-width: 700px) {
  header { height: auto; min-height: 60px; padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  .brand { font-size: 19px; }
  .brand-logo { height: 34px; max-width: 120px; }
  .server-picker { order: 3; width: 100%; }
  .server-picker label { display: none; }
  .server-picker select { flex: 1; min-width: 0; }
  .account-menu { margin-left: auto; }
  .account-menu button { padding: 7px 8px; font-size: 12px; }
  header h1 { margin: 0; font-size: 16px; }
  main { display: block; padding: 12px; overflow-x: visible; }
  .board-area { display: block; overflow-x: visible; }
  .board { display: block; width: 100%; }
  .list { width: 100%; margin-bottom: 12px; }
  .list .cards { max-height: 58vh; }
  .add-list { width: 100%; margin-bottom: 20px; }
  .activity-panel { width: 100%; max-height: 360px; position: static; margin-top: 8px; }
  .users-layout { grid-template-columns: 1fr; }
  .users-list { max-height: 210px; border-right: 0; border-bottom: 1px solid #dcdfe4; padding: 0 0 12px; }
  #user-servers { grid-template-columns: 1fr; }
  .card { padding: 14px; min-height: 46px; }
  dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 18px; overflow-y: auto; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions span { display: none; }
  .dialog-actions button { width: 100%; }
}
