:root {
  --ink: #0f172a;
  --muted: #64748b;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --border: #cbd5e1;
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --accent-2: #f97316;
  --accent-2-soft: rgba(249, 115, 22, 0.12);
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --priority-high: #dc2626;
  --priority-normal: #0ea5e9;
  --priority-low: #94a3b8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 56px;
  --nav-w: 220px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(165deg, #e0f2fe 0%, #f8fafc 38%, #fff 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ——— Auth ——— */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #bae6fd, #e0f2fe 40%, #fff 100%);
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.auth-brand {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.auth-mark {
  flex-shrink: 0;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  box-sizing: border-box;
}

.auth-mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-form .field {
  display: block;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field-input,
.select,
.textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.field-input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

/* ——— App chrome ——— */
.app-frame {
  display: flex;
  min-height: 100vh;
}

.app-nav {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.app-nav .brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.nav-brand-mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nav-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-nav .brand-text {
  min-width: 0;
}

.app-nav .brand-block h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.app-nav .brand-block p {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent-soft);
  color: #0369a1;
}

.nav-link .nav-ico {
  opacity: 0.85;
  width: 1.25rem;
  text-align: center;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem 0 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
}

.search-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  background: var(--surface-2);
}

.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  pointer-events: none;
  font-size: 1rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.search-results.open {
  display: block;
}

.search-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-3);
}

.search-results button:hover {
  background: var(--surface-2);
}

.search-results .meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.user-pill {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.1rem;
}

.notif-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-2);
  color: #fff;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
}

.notif-btn .badge.show {
  display: flex;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 92vw);
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
}

.notif-panel.open {
  display: block;
}

.notif-item {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--surface-3);
  font-size: 0.88rem;
  cursor: pointer;
}

.notif-item.unread {
  background: var(--accent-soft);
}

.notif-wrap {
  position: relative;
}

.page-body {
  padding: 1.25rem 1.5rem 3rem;
  flex: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
  color: var(--ink);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-body {
  padding: 1rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ——— Kanban ——— */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .kanban {
    grid-template-columns: 1fr;
  }
}

.kanban-col {
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 200px;
  padding: 0.5rem;
}

.kanban-col h3 {
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kanban-col.drag-over {
  outline: 2px dashed var(--accent);
  background: var(--accent-soft);
}

.task-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.55;
}

.task-card .title {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.35rem;
  padding-right: 2rem;
}

.task-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  align-items: center;
}

.tag {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink);
}

.tag-priority-high {
  background: #fee2e2;
  color: #b91c1c;
}
.tag-priority-normal {
  background: #e0f2fe;
  color: #0369a1;
}
.tag-priority-low {
  background: var(--surface-3);
  color: var(--muted);
}

/* ——— Calendar ——— */
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cal-dow {
  background: var(--surface-2);
  padding: 0.4rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.cal-cell {
  background: var(--surface);
  min-height: 92px;
  padding: 0.25rem;
  font-size: 0.78rem;
}

.cal-cell.other-month {
  background: var(--surface-2);
  color: var(--muted);
}

.cal-cell.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.cal-day-num {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cal-event {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: var(--accent-soft);
  color: #0369a1;
  font-size: 0.68rem;
  padding: 0.15rem 0.25rem;
  margin-bottom: 2px;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
}

.cal-event:hover {
  background: #bae6fd;
}

/* ——— Drawer ——— */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 110;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.drawer-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-section {
  margin-bottom: 1.25rem;
}

.drawer-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ——— Table ——— */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
}

/* ——— Documents ——— */
.doc-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1rem;
  min-height: 360px;
}

@media (max-width: 700px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
}

.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-list button {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  cursor: pointer;
  margin-bottom: 2px;
}

.folder-list button.active {
  background: var(--accent-soft);
  color: #0369a1;
  font-weight: 600;
}

/* ——— Modal ——— */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.modal-foot {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.field {
  display: block;
  margin-bottom: 0.85rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 0.88rem;
}

.activity-list .time {
  font-size: 0.75rem;
  color: var(--muted);
}

.fab {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45);
  cursor: pointer;
  z-index: 40;
  align-items: center;
  justify-content: center;
}

/* ——— Mobile ——— */
@media (max-width: 960px) {
  .app-nav {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }

  .app-nav.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .fab {
    display: flex;
  }

  .user-pill {
    display: none;
  }
}

@media (min-width: 961px) {
  .nav-backdrop {
    display: none !important;
  }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  z-index: 85;
  display: none;
}

.nav-backdrop.open {
  display: block;
}

.comment-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.comment-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 0.85rem;
}

.comment-list .who {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
}

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.toggle-group button {
  border: none;
  background: var(--surface);
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
}

.toggle-group button:last-child {
  border-right: none;
}

.toggle-group button.active {
  background: var(--accent-soft);
  color: #0369a1;
  font-weight: 600;
}

/* ——— Årshjul / säsongsplanering ——— */
.panel-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 52rem;
}

.field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.year-wheel-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 55%);
  border-color: rgba(14, 165, 233, 0.22);
}

.year-wheel-panel-head {
  align-items: flex-start;
}

.year-wheel-year-field {
  margin: 0;
  min-width: 7rem;
}

.year-wheel-body {
  padding: 1.25rem 1rem 1.5rem;
}

.year-wheel-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
}

.year-wheel-visual-wrap {
  flex: 0 0 auto;
  width: 570px;
  max-width: 100%;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.1));
}

.year-wheel-svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 1100px) {
  .year-wheel-visual-wrap {
    width: 480px;
  }
}

@media (max-width: 640px) {
  .year-wheel-visual-wrap {
    width: 100%;
  }
}

.year-wheel-slice {
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.year-wheel-slice:hover {
  filter: brightness(0.97);
}

.year-wheel-slice.is-selected {
  stroke: var(--accent) !important;
  stroke-width: 2.5px !important;
  filter: brightness(0.94);
}

.year-wheel-mo {
  pointer-events: none;
  font-family: var(--font);
  user-select: none;
}

.year-wheel-badge-n {
  font-family: var(--font);
  pointer-events: none;
  user-select: none;
}

.year-wheel-side {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 380px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
  max-height: min(70vh, 600px);
  overflow-y: auto;
}

.year-wheel-side-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.season-overview-panel .panel-head h2 {
  font-size: 1rem;
}

.season-overview-panel .panel-body {
  padding-top: 0.75rem;
  padding-bottom: 0.9rem;
}

.season-overview-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.season-overview-grid .field-hint {
  margin-top: 0.25rem;
  font-size: 0.72rem;
}

.season-overview-panel #season-notes {
  min-height: 4.5rem;
}

@media (max-width: 720px) {
  .season-overview-grid {
    grid-template-columns: 1fr;
  }
}

.year-wheel-month-block {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.year-wheel-month-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.year-wheel-month-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.year-wheel-month-head h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
}

.year-wheel-month-block > h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.year-wheel-task-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.year-wheel-task-ul li {
  margin-bottom: 0.35rem;
}

.year-wheel-task-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.year-wheel-task-link:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}

.yw-t-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.yw-t-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.year-wheel-unplanned {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.5;
}

.year-wheel-unplanned .btn {
  margin: 0.15rem 0.25rem 0.15rem 0;
  vertical-align: baseline;
}

.field-row-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}

.field-row-checkbox .field-label {
  margin: 0;
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 1.35;
}

.checkbox-input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* Uppgift kort: årshjul-knapp */
.task-year-wheel {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.task-year-wheel:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.task-year-wheel.is-on {
  background: var(--accent-soft);
  border-color: rgba(14, 165, 233, 0.55);
  color: #0369a1;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

/* Antal personer: väljare i uppgiftsmodalen */
.assignee-count-picker {
  display: inline-flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.assignee-count-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.assignee-count-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.assignee-count-btn.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.35);
}

/* Antal personer: en miniatyrgubbe per person */
.assignee-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: var(--accent-soft, #e0f2fe);
  color: #0369a1;
  line-height: 1;
  vertical-align: middle;
}

.assignee-badge .assignee-person {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assignee-badge .assignee-person + .assignee-person {
  margin-left: -0.35rem;
}

.assignee-badge .assignee-person circle {
  fill: currentColor;
  stroke: none;
}

.yw-t-title .assignee-badge {
  margin-left: 0.4rem;
}
