:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172b4d;
  --muted: #5e6c84;
  --border: #dfe1e6;
  --primary: #0052cc;
  --primary-strong: #f0f2f5;
  --cyan: #00b8d9;
  --green: #36b37e;
  --purple: #6554c0;
  --yellow: #ffab00;
  --shadow: 0 18px 50px rgba(9, 30, 66, 0.12);
  --bubble-shadow: 0 24px 60px rgba(9, 30, 66, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

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

select[multiple] {
  min-height: 108px;
  padding: 8px;
}

select[multiple] option {
  border-radius: 7px;
  padding: 6px 8px;
}



button,
.primary-button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #0c0c0c;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.secondary-button,
.danger-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
}

.secondary-button {
  background: #ebecf0;
  color: var(--text);
}

.danger-button {
  background: #ffebe6;
  color: #bf2600;
}

button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.secondary-button:hover {
  background: #dfe1e6;
}

.danger-button:hover {
  background: #ffbdad;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  line-height: 1.5;
  resize: vertical;
}

.sidebar {
  background: #0c1f3c;
  bottom: 0;
  color: #dfe7ff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  left: 0;
  padding: 22px 18px;
  position: fixed;
  top: 0;
  width: 250px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #2684ff, #00b8d9);
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  letter-spacing: -0.04em;
  width: 38px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand small {
  color: #9fb4d8;
  font-size: 11px;
}

.brand.compact {
  color: var(--text);
  margin-bottom: 16px;
}

.brand.compact strong {
  color: var(--text);
}

.nav-links {
  display: grid;
  gap: 6px;
}

.nav-link {
  border-radius: 9px;
  color: #dfe7ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 10px 11px;
  text-decoration: none;
}

.notes-link {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.notes-dot {
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  display: inline-flex;
  height: 14px;
  width: 14px;
}

.nav-link:hover,
.nav-cta {
  background: rgba(255, 255, 255, 0.12);
}

.notification-widget {
  position: relative;
}

.notification-widget summary {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 12px;
}

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

.bell-icon {
  align-items: center;
  background: linear-gradient(135deg, #ffab00, #ff5630);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.notification-badge {
  align-items: center;
  background: #ff5630;
  border: 2px solid #0c1f3c;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  margin-left: auto;
  min-width: 24px;
  padding: 0 7px;
}

.notification-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--bubble-shadow);
  color: var(--text);
  display: grid;
  gap: 10px;
  left: 18px;
  max-height: calc(100vh - 190px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  position: fixed;
  scrollbar-gutter: stable;
  top: 190px;
  width: 340px;
  z-index: 20;
}

.notification-panel::-webkit-scrollbar {
  width: 8px;
}

.notification-panel::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

.notification-panel::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
}

.notification-panel h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  margin: 4px 0;
  text-transform: uppercase;
}

.notification-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.notification-item,
.notification-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.note-notification {
  background: linear-gradient(135deg, #f5f3ff, #ecfeff);
}

.notification-item:hover,
.notification-row:hover {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: 0 16px 36px rgba(9, 30, 66, 0.14);
  transform: translateY(-2px);
}

.notification-item strong,
.notification-row strong {
  font-size: 14px;
  line-height: 1.3;
}

.notification-item small,
.notification-row small {
  color: var(--muted);
}

.notification-all {
  background: #deebff;
  border-radius: 10px;
  color: #0747a6;
  font-weight: 900;
  padding: 10px;
  text-align: center;
  text-decoration: none;
}

.notification-page-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notification-page-grid .content-panel {
  display: grid;
  gap: 12px;
}

.notes-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 420px minmax(0, 1fr);
}

.note-compose select[multiple] {
  min-height: 210px;
}

.notes-panel {
  display: grid;
  gap: 16px;
}

.notes-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.note-card-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(9, 30, 66, 0.08);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.note-card-item:hover {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: var(--bubble-shadow);
  transform: translateY(-5px) scale(1.01);
}

.note-card-item.unread-note {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border-color: #93c5fd;
}

.note-avatar-color,
.note-detail-avatar {
  align-items: center;
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.note-card-item strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.note-card-item p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.note-card-item small {
  color: var(--muted);
}

.note-detail-panel {
  display: grid;
  gap: 18px;
  grid-template-columns: 56px minmax(0, 1fr);
  max-width: 980px;
}

.note-detail-avatar {
  border-radius: 18px;
  height: 56px;
  width: 56px;
}

.logout-form {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.user-chip {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #fff;
  overflow: hidden;
  padding: 8px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell {
  margin-left: 250px;
  padding: 34px;
}

.login-shell {
  background: #fff;
  display: block;
  min-height: 100vh;
  padding: 0;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(420px, 47vw) minmax(420px, 1fr);
  min-height: 100vh;
  width: 100%;
}

.login-copy {
  background: radial-gradient(circle at 28% 22%, rgba(47, 96, 214, 0.38), transparent 34%), linear-gradient(155deg, #243f94 0%, #132b66 45%, #0b1734 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 48px 42px;
}

.login-brand-row {
  align-items: center;
  display: flex;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
}

.login-brand-box {
  background: #fff;
  border-radius: 7px;
  display: inline-flex;
  height: 36px;
  width: 130px;
}

.login-copy-center {
  margin: auto 0;
  max-width: 440px;
}

.login-copy h1 {
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -0.05em;
  line-height: 1.08;
  margin: 0 0 20px;
}

.login-copy h1 span {
  color: #00c7d9;
}

.login-copy p {
  color: #95a9d6;
  font-size: 15px;
  line-height: 1.65;
  max-width: 560px;
}

.login-copyright {
  color: #7890c7;
}

.login-card,
.create-card,
.content-panel,
.details-panel,
.filter-bar,
.stat-card,
.board-column,
.chart-card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card,
.create-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.login-card {
  align-self: center;
  border: 0;
  box-shadow: none;
  justify-self: center;
  max-width: 420px;
  padding: 0;
  width: min(420px, calc(100vw - 48px));
}

.login-card h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin: 0;
}

.login-help {
  color: var(--muted);
  margin: -8px 0 8px;
}

.login-options {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.login-options a {
  color: #24449b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.remember-device {
  align-items: center;
  display: flex;
  font-weight: 500;
  gap: 8px;
}

.remember-device input {
  min-height: auto;
  width: auto;
}

.login-card .primary-button {
  background: #24449b;
  box-shadow: 0 12px 24px rgba(36, 68, 155, 0.25);
  font-weight: 900;
  min-height: 48px;
}

.alert {
  background: #ffebe6;
  border: 1px solid #ffbdad;
  border-radius: 10px;
  color: #bf2600;
  padding: 12px;
}

.success {
  background: #e3fcef;
  border: 1px solid #abf5d1;
  border-radius: 10px;
  color: #006644;
  padding: 12px;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  border-bottom: 3px solid #2563eb;
  color: #1f2937;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  padding-bottom: 10px;
  text-transform: uppercase;
}

.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.layout-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  gap: 8px;
}

.layout-toggle:hover {
  background: #deebff;
  color: var(--primary);
}

.layout-toggle [data-lock-icon] {
  background: #0c1f3c;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 7px;
}

.hero-header {
  background: linear-gradient(135deg, #fff 0%, #e9f2ff 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow,
.issue-key {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-bar {
  align-items: start;
  background: #fff;
  border: 1px solid rgba(223, 225, 230, 0.9);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(9, 30, 66, 0.1);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.filter-bar > label {
  align-self: stretch;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.45rem;
  justify-content: flex-start;
  letter-spacing: 0.03em;
  line-height: 1.2;
  min-width: 0;
  text-transform: uppercase;
  width: 100%;
}

.filter-bar input,
.filter-bar select,
.filter-bar .ms-btn {
  border-radius: 12px;
  font-size: 0.875rem;
  height: 2.75rem;
  letter-spacing: normal;
  min-height: 2.75rem;
  min-width: 0;
  text-transform: none;
  width: 100%;
}

.filter-bar input,
.filter-bar select {
  padding: 0 0.85rem;
}

.filter-bar input:hover,
.filter-bar select:hover,
.filter-bar .ms-btn:hover {
  border-color: rgba(0, 82, 204, 0.36);
}

.filter-bar input:focus,
.filter-bar select:focus,
.filter-bar .ms-btn:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.14);
  outline: none;
}

.filter-actions {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  padding-top: 0.25rem;
  width: 100%;
}

.filter-actions > button,
.filter-actions > .secondary-button {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 800;
  height: 2.75rem;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 0;
  padding: 0 1.1rem;
  white-space: nowrap;
  width: 100%;
}

.filter-actions > button {
  color: #fff;
}

.ms-wrap {
  position: relative;
  width: 100%;
}

.ms-btn {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  gap: 0.5rem;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-btn:hover {
  border-color: #dfe1e6;
}

.ms-btn .ms-arrow {
  border: 4px solid transparent;
  border-top: 5px solid var(--muted);
  flex-shrink: 0;
  margin-left: 4px;
}

.ms-btn .ms-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-btn .ms-count {
  display: none;
}

.ms-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(9, 30, 66, 0.16);
  display: none;
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 0.35rem;
  padding: 0.35rem 0;
}

.ms-wrap.open .ms-panel {
  display: block;
}

.ms-panel label {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  padding: 4px 10px;
  transition: background 0.1s, color 0.1s;
}

.ms-panel label:hover {
  background: #fff;
  color: #000;
}

.ms-panel label:hover input[type="checkbox"] {
  accent-color: #fff;
  filter: brightness(0) invert(1);
}

.ms-panel input[type="checkbox"] {
  accent-color: var(--primary);
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin: 0;
}

.ms-panel label:has(input:checked) {
  background: #eef4ff;
  color: var(--primary);
  font-weight: 700;
}

.ms-wrap select[multiple] {
  display: none;
}

.stats-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, #159789, #13b8a6);
  border: 0;
  color: #fff;
  overflow: hidden;
  padding: 22px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover,
.chart-card:hover,
.board-column:hover,
.content-panel:hover,
.details-panel:hover,
.field-card:hover,
.attachment-card:hover {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: var(--bubble-shadow);
  transform: translateY(-5px) scale(1.01);
}

.stat-card::after {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  content: "";
  height: 132px;
  opacity: 0.12;
  position: absolute;
  right: -34px;
  top: -52px;
  width: 132px;
}

.stat-card::before {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  bottom: -36px;
  content: "";
  height: 96px;
  left: -22px;
  position: absolute;
  width: 96px;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.92);
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.stat-card strong {
  font-size: 38px;
  letter-spacing: -0.05em;
  position: relative;
  z-index: 1;
}

.accent-blue {
  background: linear-gradient(135deg, #34465c, #64748b);
}

.accent-purple {
  background: linear-gradient(135deg, #128da3, #24c7dd);
}

.accent-green {
  background: linear-gradient(135deg, #4a920c, #87c922);
}

.accent-red {
  background: linear-gradient(135deg, #9f2aa8, #d85ce7);
}

.board-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 24px;
}

.dashboard-chart-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 24px;
}

.dashboard-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  min-height: 390px;
  padding: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-unlocked .dashboard-chart-card {
  cursor: grab;
  overflow: auto;
  resize: both;
}

.dashboard-unlocked .dashboard-chart-card::after {
  background: linear-gradient(135deg, transparent 50%, rgba(0, 82, 204, 0.5) 50%);
  bottom: 10px;
  content: "";
  height: 18px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  width: 18px;
}

.dashboard-chart-card.dragging {
  cursor: grabbing;
  opacity: 0.62;
  transform: scale(0.98);
}

.dashboard-chart-card:hover {
  border-color: rgba(0, 82, 204, 0.28);
  box-shadow: var(--bubble-shadow);
  transform: translateY(-5px) scale(1.01);
}

.dashboard-chart-card h2 {
  color: #334155;
  font-size: 16px;
  margin: 0 0 14px;
}

.dashboard-chart-card.wide-card {
  grid-column: span 2;
}

.canvas-wrap {
  height: 300px;
  position: relative;
  width: 100%;
}

.canvas-wrap.short-chart {
  height: 255px;
}

.canvas-wrap canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.inline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin-top: 10px;
}

.inline-legend span {
  align-items: center;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}

.inline-legend strong {
  color: #172b4d;
}

.legend-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 9px;
  width: 26px;
}

.compact-legend-list {
  max-height: 62px;
  overflow: auto;
}

.chart-wide {
  grid-column: span 2;
}

.chart-card {
  box-shadow: none;
  padding: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.chart-card h2 {
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.bar-chart,
.horizontal-chart {
  display: grid;
  gap: 14px;
}

.chart-bar-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.chart-bar-item:hover,
.legend-row:hover,
.wave-bubble:hover,
.single-meter:hover {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: var(--bubble-shadow);
  transform: translateY(-4px) scale(1.015);
}

.chart-label {
  align-items: baseline;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  margin-bottom: 10px;
}

.chart-label span {
  color: var(--text);
  font-weight: 900;
}

.chart-label strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.chart-label small {
  color: var(--muted);
  font-weight: 800;
}

.chart-bar-track {
  background: #e5e7eb;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.chart-bar-fill {
  background: linear-gradient(90deg, #0052cc, #00b8d9);
  border-radius: inherit;
  height: 100%;
  min-width: 3px;
}

.status-fill-10 {
  background: linear-gradient(90deg, #6366f1, #c7d2fe);
}

.status-fill-20 {
  background: linear-gradient(90deg, #f59e0b, #fed7aa);
}

.status-fill-30 {
  background: linear-gradient(90deg, #2563eb, #bfdbfe);
}

.status-fill-40 {
  background: linear-gradient(90deg, #0d9488, #99f6e4);
}

.status-fill-50 {
  background: linear-gradient(90deg, #7c3aed, #c4b5fd);
}

.status-fill-60 {
  background: linear-gradient(90deg, #ea580c, #fed7aa);
}

.status-fill-70 {
  background: linear-gradient(90deg, #dc2626, #fecaca);
}

.status-fill-80 {
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.status-fill-90 {
  background: linear-gradient(90deg, #15803d, #4ade80);
}

.teal-fill {
  background: linear-gradient(90deg, #00a3bf, #36b37e);
}

.donut-layout {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.donut-chart {
  filter: drop-shadow(0 18px 30px rgba(9, 30, 66, 0.14));
  height: 190px;
  transform: rotate(-90deg);
  width: 190px;
}

.donut-hole {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 9;
}

.donut-segment {
  fill: none;
  stroke-linecap: round;
  stroke-width: 9;
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.donut-segment:hover {
  filter: brightness(1.08);
  stroke-width: 11;
}

.pie-chart .donut-segment {
  stroke-width: 32;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.legend-row span {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row small {
  color: var(--muted);
  font-weight: 800;
}

.compact-legend {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.wave-chart {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 260px;
}

.wave-bubble {
  align-items: center;
  animation: waveFloat 4s ease-in-out infinite;
  animation-delay: var(--delay);
  background: radial-gradient(circle at 30% 25%, #ffffff, #9ff5e7 45%, #00a3bf 100%);
  border: 1px solid rgba(0, 163, 191, 0.32);
  border-radius: 999px;
  color: #073b4c;
  display: flex;
  flex-direction: column;
  height: var(--size);
  justify-content: center;
  min-height: 54px;
  min-width: 54px;
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  width: var(--size);
}

.wave-bubble span {
  font-size: 12px;
  font-weight: 900;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-bubble strong {
  font-size: 24px;
  letter-spacing: -0.06em;
}

.wave-bubble small {
  font-size: 11px;
  font-weight: 800;
}

@keyframes waveFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.single-meter {
  background: linear-gradient(135deg, #f8fafc, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 22px;
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.meter-value strong,
.meter-value span,
.meter-value small {
  display: block;
}

.meter-value strong {
  font-size: 54px;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.meter-value span {
  font-weight: 900;
  margin-top: 6px;
}

.meter-value small {
  color: var(--muted);
  font-weight: 800;
  margin: 8px 0 16px;
}

.meter-track {
  background: #dbeafe;
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.meter-track div {
  background: linear-gradient(90deg, #0052cc, #00b8d9);
  border-radius: inherit;
  height: 100%;
}

.summary-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.summary-mini-card {
  border: 1px solid rgba(9, 30, 66, 0.08);
  border-radius: 18px;
  color: #172b4d;
  min-height: 128px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.summary-mini-card::after {
  background: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  content: "";
  height: 82px;
  position: absolute;
  right: -28px;
  top: -28px;
  width: 82px;
}

.summary-mini-card:hover {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: var(--bubble-shadow);
  transform: translateY(-7px) scale(1.035);
}

.summary-mini-card span,
.summary-mini-card small,
.summary-mini-card strong {
  display: block;
  position: relative;
  z-index: 1;
}

.summary-mini-card span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.summary-mini-card strong {
  font-size: 34px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.summary-mini-card small {
  color: rgba(23, 43, 77, 0.72);
  font-weight: 800;
  margin-top: 12px;
}

.status-summary-10 {
  background: linear-gradient(135deg, #eef2ff, #c7d2fe);
}

.status-summary-20 {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
}

.status-summary-30 {
  background: linear-gradient(135deg, #eff6ff, #bfdbfe);
}

.status-summary-40 {
  background: linear-gradient(135deg, #f0fdfa, #99f6e4);
}

.status-summary-50 {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
}

.status-summary-80 {
  background: linear-gradient(135deg, #ecfdf5, #86efac);
}

.status-summary-90 {
  background: linear-gradient(135deg, #dcfce7, #4ade80);
}

.priority-summary-10,
.priority-summary-20 {
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
}

.priority-summary-30 {
  background: linear-gradient(135deg, #ecfeff, #67e8f9);
}

.priority-summary-40 {
  background: linear-gradient(135deg, #fff7ed, #fdba74);
}

.priority-summary-50,
.priority-summary-60 {
  background: linear-gradient(135deg, #fef2f2, #fca5a5);
}

.custom-summary-card {
  background: linear-gradient(135deg, #f0fdfa, #a7f3d0);
}

.board-column {
  background: #f7f8f9;
  box-shadow: none;
  min-height: 420px;
  padding: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.board-column h2,
.content-panel h2,
.details-panel h2 {
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.overdue-flag {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  margin-left: 8px;
  padding: 0;
  position: relative;
  vertical-align: middle;
  width: 26px;
}

.overdue-flag::before {
  background: #991b1b;
  content: "";
  height: 17px;
  left: 7px;
  position: absolute;
  top: 5px;
  width: 2px;
}

.overdue-flag::after {
  content: "";
  border-bottom: 7px solid transparent;
  border-left: 11px solid #dc2626;
  border-top: 7px solid transparent;
  height: 0;
  left: 8px;
  position: absolute;
  top: 5px;
  width: 0;
}

.issue-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
}

.status-pill,
.priority-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.status-open {
  background: #e0e7ff;
  color: #3730a3;
}

.status-progress {
  background: #ede9fe;
  color: #5b21b6;
}

.status-fail-retested {
  background: #ffedd5;
  color: #9a3412;
}

.status-fail-immediately {
  background: #fee2e2;
  color: #991b1b;
}

.status-feedback {
  background: #fef3c7;
  color: #92400e;
}

.status-acknowledged {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-confirmed {
  background: #ccfbf1;
  color: #0f766e;
}

.status-done {
  background: #dcfce7;
  color: #166534;
}

.status-closed {
  background: #bbf7d0;
  color: #14532d;
}

.priority-pill {
  background: #fff7db;
  color: #7a4d00;
}

.avatar,
.note-avatar {
  align-items: center;
  background: #6554c0;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.issue-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.content-panel,
.details-panel {
  padding: 24px;
}

.rich-text,
.note-card p {
  line-height: 1.65;
  white-space: pre-wrap;
}

.details-panel {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 24px;
}

.details-panel form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.details-list {
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr);
  margin: 0;
}

.details-list.wide {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.details-list dt {
  color: var(--muted);
  font-weight: 800;
}

.details-list dd {
  margin: 0;
}

.activity-section {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 24px;
}

.note-card {
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  margin-bottom: 18px;
}

.note-card small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.note-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.create-card {
  max-width: 820px;
}

.config-editor {
  align-self: start;
  border: 1px solid rgba(0, 82, 204, 0.12);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(9, 30, 66, 0.11);
  position: sticky;
  top: 24px;
}

.config-editor.is-editing {
  border-color: rgba(0, 82, 204, 0.34);
  box-shadow: 0 22px 50px rgba(0, 82, 204, 0.14);
}

.config-editor-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.config-editor-head h2 {
  margin: 4px 0 6px;
}

.config-editor-head p,
.form-hint,
.panel-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.config-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 130px;
}

.config-list-panel {
  min-width: 0;
}

.issue-create-card {
  max-width: none;
  padding: 22px;
  width: 100%;
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.issue-create-card textarea {
  min-height: 130px;
}

.attachment-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  cursor: pointer;
  margin: 18px 0 22px;
  padding: 0;
  transition: border-color 0.2s, background 0.2s;
}

.attachment-zone:hover,
.attachment-zone.drag-over {
  background: #f0f7ff;
  border-color: var(--primary);
}

.attachment-zone.drag-over {
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}

.attachment-zone-inner {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px 20px;
  pointer-events: none;
}

.attachment-zone-icon {
  color: var(--muted);
  margin-bottom: 4px;
}

.attachment-zone-text {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

.attachment-zone-browse,
.attachment-zone-paste {
  color: var(--primary);
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
  text-decoration: underline;
}

.attachment-zone-hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.attachment-zone.has-files .attachment-zone-inner {
  padding-bottom: 10px;
}

.attachment-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 16px;
}

.attachment-preview-item {
  align-items: center;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 110px;
  overflow: hidden;
  padding: 6px;
  position: relative;
  width: 100px;
}

.attachment-preview-item img {
  border-radius: 6px;
  height: 68px;
  object-fit: cover;
  width: 100%;
}

.attachment-preview-icon {
  align-items: center;
  background: #e2e8f0;
  border-radius: 6px;
  color: #475569;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  height: 68px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 100%;
}

.attachment-preview-name {
  font-size: 10px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-remove {
  background: #ef4444;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  height: 20px;
  line-height: 20px;
  padding: 0;
  position: absolute;
  right: 4px;
  text-align: center;
  top: 4px;
  width: 20px;
}

.attachment-preview-remove:hover {
  background: #dc2626;
}

.issue-table-panel {
  margin-bottom: 24px;
  padding: 20px;
}

.section-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 0;
}

.section-title-row a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.list-controls {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.page-size-form label {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-size: 0.8rem;
  gap: 0.5rem;
  margin: 0;
}

.page-size-form select {
  border-radius: 10px;
  min-height: 2.25rem;
  padding: 0 0.65rem;
  width: auto;
}

.pagination-bar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(9, 30, 66, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px auto 0;
  max-width: max-content;
  padding: 12px 16px;
}

.pagination-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: inline-flex;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  padding: 0 10px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pagination-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.pagination-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pagination-nav {
  min-width: 58px;
}

.pagination-ellipsis {
  color: var(--muted);
  font-weight: 900;
  padding: 0 4px;
}

.pagination-bar span {
  color: var(--muted);
  font-size: 13px;
  margin-left: 10px;
}

.issue-table {
  border-collapse: separate;
  border-spacing: 0;
}

.issue-table thead th {
  background: #f1f5f9;
  color: #475569;
  position: sticky;
  top: 0;
}

.issue-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.issue-table tbody tr:hover {
  background: #f8fbff;
  box-shadow: inset 4px 0 0 var(--primary);
}

.issue-table tbody tr.overdue-row {
  background: #fff7f7;
}

.history-table td {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.history-table th:first-child,
.history-table td:first-child {
  min-width: 150px;
}

.table-title {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.table-title strong {
  line-height: 1.35;
}

.admin-grid {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 420px minmax(0, 1fr);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.table-action {
  background: #deebff;
  border-radius: 999px;
  color: #0747a6;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 12px;
  text-decoration: none;
}

.table-action:hover {
  background: #b3d4ff;
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-card {
  align-items: flex-start;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-card.active {
  background: #eef4ff;
  border-color: rgba(0, 82, 204, 0.45);
  box-shadow: inset 4px 0 0 var(--primary), 0 12px 30px rgba(0, 82, 204, 0.1);
}

.field-card-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-card-title span {
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.field-card p {
  color: var(--muted);
  margin: 6px 0 0;
}

.value-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.value-chip {
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.value-chip.muted {
  background: #f1f5f9;
  color: var(--muted);
}

.form-actions,
.field-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-actions {
  flex-shrink: 0;
}

.field-actions form {
  margin: 0;
}

.field-actions .secondary-button,
.field-actions .danger-button {
  min-height: 38px;
  padding: 8px 12px;
}

.attachment-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.attachment-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.attachment-card img {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.attachment-card small {
  color: var(--muted);
}

.file-icon {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #deebff, #eae6ff);
  border-radius: 10px;
  color: var(--primary);
  display: flex;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.12em;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-state {
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.error-state {
  margin: 80px auto;
  max-width: 640px;
}

@media (max-width: 980px) {
  .sidebar {
    bottom: auto;
    flex-direction: row;
    left: 0;
    overflow-x: auto;
    right: 0;
    width: auto;
  }

  .nav-links,
  .logout-form {
    align-items: center;
    display: flex;
  }

  .notification-panel {
    left: 12px;
    max-height: calc(100vh - 110px);
    right: 12px;
    top: 88px;
    width: auto;
  }

  .app-shell {
    margin-left: 0;
    padding: 118px 18px 24px;
  }

  .login-panel,
  .board-grid,
  .notification-page-grid,
  .notes-layout,
  .issue-layout,
  .stats-grid,
  .donut-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .chart-wide {
    grid-column: auto;
  }

  .dashboard-chart-card.wide-card {
    grid-column: span 2;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .details-panel {
    position: static;
  }

  .login-copy {
    min-height: 42vh;
    padding: 30px 24px;
  }

  .login-card {
    margin: 42px auto;
  }
}

@media (max-width: 620px) {
  .page-header {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .form-grid,
  .details-list {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    padding: 0;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-copy-center {
    margin: 60px 0;
  }

  .login-brand-box {
    width: 96px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-card {
    min-height: 310px;
    padding: 12px;
  }

  .dashboard-chart-card.wide-card {
    grid-column: span 2;
  }

  .canvas-wrap {
    height: 230px;
  }

  .dashboard-chart-card h2 {
    font-size: 14px;
  }
}

@media (max-width: 1439px) {
  .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-editor {
    position: static;
  }
}

@media (max-width: 767px) {
  .filter-bar {
    gap: 0.9rem;
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .filter-actions {
    grid-template-columns: 1fr;
  }

  .filter-actions > button,
  .filter-actions > .secondary-button {
    width: 100%;
  }

  .config-form-grid {
    grid-template-columns: 1fr;
  }

  .config-editor-head,
  .field-card {
    flex-direction: column;
  }

  .field-actions,
  .field-actions .secondary-button,
  .field-actions .danger-button,
  .field-actions form {
    width: 100%;
  }
}
