:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(226, 232, 240, 0.92);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.10);
  --accent-strong: #115e59;
  --warn: #d97706;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.10), 0 6px 14px rgba(15, 23, 42, 0.05);
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", "Aptos", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  background-attachment: fixed;
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border-radius: 999px;
}

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

.sidebar-link {
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
  border-radius: 0.875rem;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(15, 118, 110, 0.07);
  color: #0f766e;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0.06));
  color: #0f766e;
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #0f766e;
}

.soft-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.fade-in {
  animation: fadeIn 220ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.kpi-card {
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.45), transparent 60%);
  pointer-events: none;
}

.kpi-value {
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0f172a;
}

.kpi-accent-bar {
  height: 3px;
  border-radius: 999px;
  width: 3rem;
  background: linear-gradient(90deg, var(--accent), rgba(15, 118, 110, 0.22));
}

.chart-frame {
  min-height: 280px;
  position: relative;
}

.table-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.table-row {
  transition: background-color 120ms ease;
}

.table-row:hover {
  background: rgba(248, 250, 252, 0.82);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-planned {
  background: rgba(59, 130, 246, 0.09);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.status-working {
  background: rgba(245, 158, 11, 0.09);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.16);
}

.status-paused {
  background: rgba(139, 92, 246, 0.09);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.16);
}

.status-completed {
  background: rgba(16, 185, 129, 0.09);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.16);
}

.status-archived {
  background: rgba(100, 116, 139, 0.09);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.16);
}

.toast {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  animation: slideUp 180ms ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.control {
  border: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0.9rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  color: #0f172a;
  font-size: 0.875rem;
}

.control:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}

.control:hover:not(:focus) {
  border-color: rgba(148, 163, 184, 0.72);
}

.overlay {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(244, 247, 251, 0.96)),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(237, 242, 247, 0.96));
}

.priority-low {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.16);
}

.priority-medium {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.priority-high {
  color: #d97706;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.16);
}

.priority-critical {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.28), transparent);
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.working-ring {
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35);
  animation: workingPulse 2.2s ease-in-out infinite;
}

@keyframes workingPulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35); }
  60% { box-shadow: 0 0 0 7px rgba(15, 118, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
}

.ticket-mini-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  min-height: 100%;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.ticket-mini-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.ticket-mini-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ticket-mini-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.ticket-mini-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.75rem;
}

.live-timer-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.header-accent {
  height: 3px;
  width: 3rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #2563eb, transparent);
}

.brand-icon {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.nav-icon-active {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.kv-card {
  transition: background-color 140ms ease, border-color 140ms ease;
}

.kv-card:hover {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(203, 213, 225, 0.95);
}

.ticket-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 8.25rem;
  padding: 1rem;
}

.ticket-summary-card .section-label {
  margin-bottom: 0.125rem;
}

.ticket-summary-card .ticket-summary-value {
  line-height: 1.4;
}

.ticket-summary-card .ticket-mini-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.analytics-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 8.25rem;
  padding: 1rem;
}

.analytics-summary-card .section-label {
  margin-bottom: 0.05rem;
  font-size: 0.65rem;
  line-height: 1.25;
}

.analytics-summary-card .analytics-summary-value {
  font-size: 0.9rem;
  line-height: 1.35;
}

.analytics-summary-card .analytics-summary-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.export-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 8.25rem;
  padding: 1rem;
}

.export-summary-card .section-label {
  margin-bottom: 0.125rem;
}

.export-summary-card .export-summary-value {
  line-height: 1.4;
}

.import-drop-zone {
  min-height: 18rem;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.import-drop-zone:hover {
  border-color: rgba(45, 212, 191, 0.7);
  background: rgba(240, 253, 250, 0.84);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.import-drop-zone:focus-within {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.import-drop-icon {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.subtask-editor-row {
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.subtask-editor-row:hover {
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.subtask-checklist-item {
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.subtask-checklist-item:hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(248, 250, 252, 0.92);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.24);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: scale(0.985);
}

.tickets-view-toggle {
  padding: 0.55rem 0.9rem;
  border-radius: 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tickets-view-toggle:hover {
  background: rgba(15, 118, 110, 0.06);
  color: #0f766e;
}

.tickets-view-toggle.is-active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0.06));
  color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.16);
}

.kanban-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  align-items: start;
}

@media (min-width: 900px) {
  .kanban-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .kanban-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.kanban-column {
  min-height: 28rem;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.kanban-column:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.kanban-dropzone {
  min-height: 22rem;
  border-radius: 1.25rem;
  transition: background-color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.kanban-dropzone.is-drag-over {
  background: rgba(240, 253, 250, 0.72);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.22);
}

.kanban-card {
  cursor: grab;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 118, 110, 0.18);
}

.kanban-card:active {
  cursor: grabbing;
}

.sticky-notes-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 768px) {
  .sticky-notes-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .sticky-notes-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sticky-note-card {
  position: relative;
  min-height: 16rem;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  overflow: hidden;
}

.sticky-note-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 32%);
  pointer-events: none;
}

.sticky-note-card:hover {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.11);
}

.sticky-note-tilt-0 { transform: rotate(-0.8deg); }
.sticky-note-tilt-1 { transform: rotate(0.7deg); }
.sticky-note-tilt-2 { transform: rotate(-0.2deg); }

.sticky-note-card:hover.sticky-note-tilt-0,
.sticky-note-card:hover.sticky-note-tilt-1,
.sticky-note-card:hover.sticky-note-tilt-2 {
  transform: translateY(-2px) rotate(0deg);
}

.sticky-note-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.sticky-note-body {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  min-height: 7rem;
  white-space: pre-wrap;
}

.sticky-note-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sticky-note-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 118, 110, 0.18);
  color: #0f766e;
}

.sticky-note-color-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.sticky-note-color-choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.sticky-note-color-choice.is-selected {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.sticky-note-mint {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(220, 252, 231, 0.94));
}

.sticky-note-cream {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(254, 249, 195, 0.92));
}

.sticky-note-pink {
  background: linear-gradient(180deg, rgba(253, 242, 248, 0.96), rgba(252, 231, 243, 0.92));
}

.sticky-note-blue {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.92));
}

.sticky-note-lavender {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.96), rgba(237, 233, 254, 0.92));
}

.sticky-note-lemon {
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.92), rgba(250, 204, 21, 0.16));
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  width: max-content;
  min-width: 100%;
}

.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  transition: transform 100ms ease, opacity 100ms ease;
  cursor: default;
}

.heatmap-cell:hover {
  transform: scale(1.35);
  opacity: 0.85;
}

/* ── Badge shelf ── */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), rgba(204, 251, 241, 0.80));
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  transition: transform 140ms ease, box-shadow 140ms ease;
  cursor: default;
}

.badge-chip:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.14);
}

.badge-emoji {
  font-size: 1rem;
  line-height: 1;
}

.badge-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Badge progress rows ── */
.badge-progress-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.6rem 0.75rem;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.badge-earned {
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.90), rgba(204, 251, 241, 0.60));
  border-color: rgba(15, 118, 110, 0.16);
}

.badge-locked {
  background: rgba(248, 250, 252, 0.70);
  opacity: 0.72;
}

.badge-progress-emoji {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.badge-progress-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.badge-progress-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.1rem;
  line-height: 1.3;
}

.badge-check-icon {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f766e;
  flex-shrink: 0;
}

.badge-lock-icon {
  font-size: 0.8rem;
  flex-shrink: 0;
  opacity: 0.5;
}
