:root {
  --bg: var(--pt-color-bg-canvas);
  --panel: var(--pt-color-bg-surface);
  --text: var(--pt-color-text-primary);
  --muted: var(--pt-color-text-secondary);
  --border: var(--pt-color-border-subtle);

  --sidebar-grad-1: #28439b;
  --sidebar-grad-2: #284bb0;
  --sidebar-grad-3: #2950c3;
  --sidebar-surface: rgba(255, 255, 255, 0.06);
  --sidebar-surface-hover: rgba(255, 255, 255, 0.09);
  --sidebar-surface-active: rgba(255, 255, 255, 0.12);
  --sidebar-border-soft: rgba(255, 255, 255, 0.1);
  --sidebar-border-strong: rgba(255, 255, 255, 0.14);
  --sidebar-text: #fff;
  --sidebar-text-soft: rgba(255, 255, 255, 0.8);
  --sidebar-text-muted: rgba(255, 255, 255, 0.72);
  --sidebar-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --sidebar-divider-color: rgba(255, 255, 255, 0.14);
}

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

body.dark {
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
}

body.has-app-shell {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

body.has-app-shell .app-shell {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 100vh;
}

body.has-app-shell .site-footer {
  display: none;
}

/* Sidebar styling source of truth: edit .app-sidebar rules in this file for global left-nav design. */
body.has-app-shell .app-sidebar {
  width: 264px;
  flex: 0 0 264px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-grad-1) 0%, var(--sidebar-grad-2) 48%, var(--sidebar-grad-3) 100%);
  color: var(--sidebar-text);
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: width 0.25s ease;
}

body.has-app-shell .app-sidebar .sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.has-app-shell .app-sidebar .app-logo {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2px 0 4px;
}


body.has-app-shell .app-sidebar .sidebar-logo-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 8px;
}

body.has-app-shell .app-sidebar .logo-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

body.has-app-shell .app-sidebar .sidebar-practice-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--sidebar-border-strong);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--sidebar-shadow-inset);
}

body.has-app-shell .app-sidebar .sidebar-practice {
  font-size: var(--pt-text-sm);
  opacity: 0.95;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.has-app-shell .app-sidebar .sidebar-practice strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 4px;
  font-weight: 700;
}

body.has-app-shell .app-sidebar .sidebar-practice-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--sidebar-text-soft);
}

body.has-app-shell .app-sidebar .nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.has-app-shell .app-sidebar .sidebar-divider {
  height: 1px;
  border: 0;
  background: var(--sidebar-divider-color);
  margin: 12px 2px;
  flex: 0 0 auto;
}

body.has-app-shell .app-sidebar .nav-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.has-app-shell .app-sidebar .nav-section + .nav-section {
  margin-top: 0;
}

body.has-app-shell .app-sidebar .nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--sidebar-text-soft);
  padding: 0 8px 4px;
}

body.has-app-shell .app-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--pt-radius-md);
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(38, 72, 186, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

body.has-app-shell .app-sidebar .nav-item:hover {
  background: var(--sidebar-surface-hover);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body.has-app-shell .app-sidebar .nav-item:active {
  transform: translateY(0.5px);
}

body.has-app-shell .app-sidebar .nav-item.active,
body.has-app-shell .app-sidebar .nav-item[aria-current="page"] {
  background: var(--sidebar-surface-active);
  border-color: rgba(255, 255, 255, 0.1);
}

body.has-app-shell .app-sidebar .nav-icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.94;
  text-align: center;
  flex-shrink: 0;
  color: #93c5fd;
  transition: transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

body.has-app-shell .app-sidebar .nav-item svg,
body.has-app-shell .app-sidebar .nav-item i {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

body.has-app-shell .app-sidebar .nav-icon[data-icon="dashboard"] { color: #8ac5ff; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="calendar"] { color: #67e8f9; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="noticeboard"] { color: #93c5fd; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="forum"] { color: #c4b5fd; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="compliance"] { color: #86efac; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="messages"] { color: #f9a8d4; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="profile"] { color: #f5d0fe; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="settings"] { color: #cbd5e1; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="marketplace"] { color: #fcd34d; }
body.has-app-shell .app-sidebar .nav-icon[data-icon="subscriptions"] { color: #fdba74; }


body.has-app-shell .app-sidebar .nav-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.has-app-shell .app-sidebar .nav-item-row .nav-item {
  flex: 1;
}

body.has-app-shell .app-sidebar .pin-form {
  margin: 0;
}

body.has-app-shell .app-sidebar .pin-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

body.has-app-shell .app-sidebar .pin-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

body.has-app-shell .app-sidebar .nav-empty {
  margin: 0;
  padding: 0 8px;
  color: var(--sidebar-text-muted);
  font-size: 12px;
}

.dashboard-shortcuts-list {
  display: grid;
  gap: .65rem;
}

.dashboard-shortcut {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: .6rem;
}
body.has-app-shell .app-sidebar .nav-item:hover .nav-icon,
body.has-app-shell .app-sidebar .nav-item.active .nav-icon,
body.has-app-shell .app-sidebar .nav-item[aria-current="page"] .nav-icon {
  opacity: 1;
  transform: translateY(-0.5px);
  filter: saturate(1.1);
}

body.has-app-shell .app-sidebar .nav-item--unavailable {
  border-style: dashed;
}

body.has-app-shell .app-sidebar .badge--locked {
  background: rgba(250, 204, 21, 0.2);
  color: #fde68a;
}

body.has-app-shell .app-sidebar .badge--coming_soon {
  background: rgba(147, 197, 253, 0.2);
  color: #bfdbfe;
}

body.has-app-shell .app-sidebar .nav-text {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}

body.has-app-shell .app-shell .main {
  flex: 1;
  transition: margin-left 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

body.has-app-shell .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

body.has-app-shell .topbar-left,
body.has-app-shell .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.has-app-shell .muted {
  color: var(--muted);
}

body.has-app-shell .icon-btn,
body.has-app-shell .user-btn {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 85%, #dbeafe);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  min-width: 40px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.has-app-shell .icon-btn:hover,
body.has-app-shell .user-btn:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--panel) 75%, #bfdbfe);
}

body.has-app-shell .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1d4ed8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pt-type-tooltip);
}

body.has-app-shell .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fb7185;
  position: relative;
  top: -7px;
  right: -3px;
}

body.has-app-shell .dropdown {
  position: relative;
}

body.has-app-shell .dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--pt-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  min-width: 240px;
  display: none;
  z-index: 50;
  padding: 8px;
}

body.has-app-shell .dropdown.open .dropdown-menu {
  display: block;
}

body.has-app-shell .dropdown-menu a,
body.has-app-shell .dropdown-menu button,
body.has-app-shell .dropdown-empty {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font: inherit;
}

body.has-app-shell .dropdown-menu a:hover,
body.has-app-shell .dropdown-menu button:hover {
  background: color-mix(in srgb, var(--panel) 70%, #dbeafe);
}

body.has-app-shell .dropdown-empty {
  color: var(--muted);
}

body.has-app-shell .content-area {
  flex: 1 1 auto;
  padding: 28px;
}

body.has-app-shell .content-area .panel,
body.has-app-shell .content-area .card {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

body.sidebar-collapsed .app-sidebar {
  width: 84px;
  flex-basis: 84px;
}

body.sidebar-collapsed .app-sidebar .logo-text,
body.sidebar-collapsed .app-sidebar .sidebar-practice-card,
body.sidebar-collapsed .app-sidebar .nav-text,
body.sidebar-collapsed .app-sidebar .nav-section-title {
  display: none;
}

body.sidebar-collapsed .app-sidebar .nav-item {
  justify-content: center;
  padding: 10px;
}

body.sidebar-collapsed .app-sidebar .nav-icon {
  margin-right: 0;
}

body.sidebar-collapsed .app-shell .main {
  margin-left: 0;
}

@media (max-width: 1024px) {
  body.has-app-shell .app-shell {
    min-height: 100vh;
  }

  body.has-app-shell .app-sidebar {
    width: 84px;
    flex-basis: 84px;
  }

  body.has-app-shell .app-sidebar .logo-text,
  body.has-app-shell .app-sidebar .sidebar-practice-card,
  body.has-app-shell .app-sidebar .nav-text,
  body.has-app-shell .app-sidebar .nav-section-title {
    display: none;
  }

  body.has-app-shell .app-sidebar .nav-item {
    justify-content: center;
    padding: 10px;
  }

  body.has-app-shell .app-sidebar .nav-icon {
    margin-right: 0;
  }

  body.has-app-shell .app-shell .main {
    margin-left: 0;
  }
}

.hero {
  border-radius: 18px;
  padding: 34px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.16), rgba(30, 58, 138, 0.1));
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 34px;
  margin: 0 0 8px 0;
}

.hero p {
  color: var(--muted);
  margin: 0;
  font-size: var(--pt-text-md);
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--pt-text-xs);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-detail {
  margin-top: 8px !important;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.feature-card h2 {
  margin: 8px 0;
  font-size: 1.1rem;
}

.app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-icon svg {
  width: 100%;
  height: 100%;
}

.button-icon {
  width: 18px;
  height: 18px;
}

.module-icon,
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--pt-radius-md);
  background: #eaf3ff;
  color: #12467a;
  padding: 10px;
}

.module-icon--sm {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.module-icon--md {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
}

.module-icon--lg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
}

.feature-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
}

.trust-strip {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--panel) 86%, #dbeafe);
}

.status-pill {
  font-size: var(--pt-text-xs);
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid var(--border);
}

.status-core,
.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-locked,
.status-expired {
  background: #fee2e2;
  color: #991b1b;
}

.plan-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-row small {
  display: block;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.18), rgba(29, 78, 216, 0.08));
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.auth-tabs {
  display: flex;
  background: rgba(100, 116, 139, 0.1);
  border-radius: var(--pt-radius-md);
  padding: 6px;
  gap: 6px;
  margin: 14px 0 18px 0;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: var(--pt-text-sm);
}

.auth-tab.active {
  background: var(--panel);
  border: 1px solid var(--border);
}

.auth-brand {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
}

.auth-form input,
.auth-form select {
  width: 100%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, #f8fafc);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
}

.auth-errors,
.auth-form .errorlist {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  list-style: none;
}

.auth-submit {
  width: 100%;
  margin-top: 16px;
}

.auth-practice-picker {
  position: relative;
}

.practice-hidden-select {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.practice-suggestions {
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.practice-suggestion {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.practice-suggestion:hover,
.practice-suggestion.active {
  background: rgba(29, 78, 216, 0.12);
}


.auth-link-row {
  margin: 10px 0 0;
  text-align: right;
  font-size: var(--pt-text-sm);
}

.auth-info {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(14, 116, 144, 0.24);
  background: rgba(14, 116, 144, 0.08);
}

.auth-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.form-control,
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, #f8fafc);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

.form-control-textarea,
.settings-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.4;
}

.settings-form-grid {
  display: grid;
  gap: 1rem;
}

.settings-form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.form-switch-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
}

.form-switch-input {
  appearance: none;
  width: 42px;
  min-width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #bdc9d8;
  background: #dce6f3;
  position: relative;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.form-switch-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 120ms ease;
}

.form-switch-input:checked {
  background: #0b6fd8;
  border-color: #0a63bc;
}

.form-switch-input:checked::before {
  transform: translateX(18px);
}


.switch-sm .form-switch-input {
  width: 34px;
  min-width: 34px;
  height: 20px;
}

.switch-sm .form-switch-input::before {
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
}

.switch-sm .form-switch-input:checked {
  background-color: var(--nhs-blue);
  border-color: var(--nhs-blue-dark);
}

.switch-sm .form-switch-input:checked::before {
  transform: translateX(14px);
}

.dashboard-hero {
  margin-bottom: var(--pt-space-l);
  padding: var(--pt-space-l);
  border-radius: var(--pt-radius-md);
  border: 1px solid var(--pt-color-border-strong);
  background: color-mix(in srgb, var(--panel) 92%, var(--pt-color-bg-surface-alt));
  box-shadow: var(--pt-shadow-card);
}

.dashboard-hero h1 {
  color: var(--pt-color-primary-700);
  font-size: var(--pt-type-page-title);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.dashboard-hero .hero-kicker {
  color: var(--pt-color-primary-600);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.dashboard-hero .hero-detail {
  color: var(--pt-color-text-secondary);
  max-width: 60ch;
}

.dashboard-section {
  margin-bottom: var(--pt-space-l);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-main-column,
.dashboard-sidebar-column {
  min-width: 0;
}

.dashboard-sidebar-column {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-sidebar .feature-card {
  margin-bottom: 0;
}

.dashboard-card {
  padding: var(--pt-space-l);
  border-radius: var(--pt-radius-lg);
  box-shadow: var(--pt-shadow-card);
  border: 1px solid var(--pt-color-border-subtle);
  background: var(--pt-color-bg-surface);
}

.dashboard-card--accent {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, var(--pt-alert-low-bg)), var(--panel));
}

.dashboard-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  padding: var(--pt-space-s) var(--pt-space-s) var(--pt-space-m);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, #c8d9ee);
}

.dashboard-section__title {
  margin: 0;
  font-size: var(--pt-type-section-title);
  font-weight: 700;
  color: var(--pt-color-text-primary);
}

.dashboard-section__subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.91rem;
}

.dashboard-card__body {
  margin-top: var(--pt-space-m);
}

.dashboard-panel {
  border: 1px solid color-mix(in srgb, var(--border) 85%, #c7daef);
  border-radius: var(--pt-radius-md);
  background: color-mix(in srgb, var(--panel) 88%, #f3f8ff);
}

.dashboard-panel--inner {
  padding: 0.78rem 0.9rem;
}

.dashboard-empty-state {
  margin-top: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #d9e6f5);
  border-radius: var(--pt-radius-md);
  background: color-mix(in srgb, var(--panel) 88%, #f7faff);
  padding: var(--pt-space-l);
}

.dashboard-empty-state p {
  margin: 0;
}

.dashboard-alert-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 0.95rem;
}

.workforce-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.workforce-summary-card {
  display: grid;
  gap: 0.25rem;
  min-height: 132px;
  transition: transform 140ms ease, box-shadow 160ms ease;
}

.workforce-summary-card:hover,
.workforce-summary-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 52, 96, 0.12);
}

.dashboard-alert-card__label {
  margin: 0;
  color: var(--pt-color-primary-600);
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-alert-card__value {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--pt-color-primary-700);
  font-weight: 800;
}

.dashboard-alert-card__meta {
  margin: 0;
  color: var(--pt-color-text-secondary);
  font-size: 0.84rem;
}

.workforce-chart__track {
  position: relative;
  background: var(--pt-color-bg-surface-alt);
  border-radius: 999px;
  height: 12px;
}

.workforce-chart__bar {
  height: 12px;
  border-radius: 999px;
  background: var(--pt-color-primary-700);
}

.workforce-chart__track--inactive .workforce-chart__bar--inactive {
  background: #6b7280;
}

.workforce-tooltip {
  position: absolute;
  z-index: 1200;
  max-width: 290px;
  border-radius: 12px;
  border: 1px solid var(--pt-color-border-strong);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(12, 42, 87, 0.2);
  padding: 0.6rem 0.7rem;
  font-size: var(--pt-type-tooltip);
  color: var(--pt-color-text-primary);
  display: none;
}

.workforce-tooltip.is-visible {
  display: block;
}

.workforce-tooltip ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.workforce-tooltip li {
  margin: 0.15rem 0;
}

.workforce-tooltip__more {
  margin: 0.3rem 0 0;
  color: var(--pt-color-text-secondary);
  font-weight: 600;
}

.dashboard-alert-strip__empty {
  margin: 0;
}

.dashboard-alert-group {
  border-radius: 12px;
  border: 1px solid transparent;
  min-width: 0;
}

.dashboard-alert-group--urgent {
  background: #fdf0f0 !important;
  border-color: #f1bcbc !important;
}

.dashboard-alert-group--warning {
  background: #fff8dc !important;
  border-color: #edd58a !important;
}

.dashboard-alert-group--sickness {
  background: #fff2e5 !important;
  border-color: #efbf90 !important;
}

.dashboard-alert-group__title {
  font-weight: 700;
  margin: 0 0 6px;
  font-size: .89rem;
  line-height: 1.2;
}

.dashboard-alert-group__list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: .28rem;
}

.dashboard-alert-group__item {
  margin: 0;
  color: var(--pt-color-text-primary);
  font-size: .9rem;
  line-height: 1.25;
}

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

.dashboard-table th,
.dashboard-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 88%, #ceddf0);
  text-align: left;
}

.dashboard-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.dashboard-next-assignment {
  margin: 0.8rem 0 0;
}

.dashboard-notice-list,
.dashboard-useful-links-list {
  display: grid;
  gap: .7rem;
}

.dashboard-notice {
  background: #fff;
}

.dashboard-notice--pinned {
  border-left: 4px solid #0b3460;
}

.dashboard-notice__title {
  margin: 0 0 .35rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.dashboard-notice__body,
.dashboard-notice__meta {
  margin: 0 0 .35rem;
}

.dashboard-notice__meta {
  margin-bottom: 0;
  font-size: .9rem;
}

.dashboard-stat-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.4rem;
}

.dashboard-metrics-stack {
  display: grid;
  gap: 0.75rem;
}

.dashboard-metric-copy {
  margin: 0 0 0.4rem;
}

.dashboard-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.dashboard-progress--leave {
  background: #e5eef8;
}

.dashboard-progress__used {
  background: #1f7a4d;
}

.dashboard-progress__remaining {
  background: #7fb3ff;
}

.dashboard-progress--sickness {
  background: #f4d4d4;
}

.dashboard-progress--sickness .dashboard-progress__value {
  background: #b42318;
}

.dashboard-progress--year {
  background: #e7eaef;
}

.dashboard-progress--year .dashboard-progress__value {
  background: #005eb8;
}

.dashboard-useful-link {
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(18, 70, 122, 0.06);
}

.dashboard-useful-link strong,
.dashboard-useful-link span {
  display: block;
}

.dashboard-useful-link span {
  margin-top: .15rem;
}

@media (max-width: 980px) {
  .dashboard-hero {
    padding: .9rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar-column {
    position: static;
  }

  .dashboard-sidebar {
    gap: .75rem;
  }

  .dashboard-card__header {
    flex-wrap: wrap;
  }

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

@media (max-width: 700px) {
  .dashboard-alert-strip__grid,
  .dashboard-insights-grid {
    grid-template-columns: 1fr;
  }

  .settings-form-row-2 {
    grid-template-columns: 1fr;
  }
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.settings-table th,
.settings-table td {
  text-align: left;
  padding: .65rem .55rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.settings-table thead th {
  font-size: .9rem;
  color: var(--text-muted);
}

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

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.badge--success {
  background: #e7f9ee;
  border-color: #a9e2be;
  color: #0c6b34;
}

.checkbox-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: .45rem;
}

.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 95%, #f8fafc);
}

.reminder-toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  width: min(340px, calc(100vw - 2rem));
}

.reminder-toast {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  border-left: 5px solid var(--nhs-blue);
  border-radius: 12px;
  padding: .85rem 2rem .8rem .8rem;
  position: relative;
  animation: reminder-in .18s ease-out;
}

.reminder-toast--exit {
  opacity: 0;
  transform: translateY(10px);
  transition: all .2s ease;
}

.reminder-toast__title {
  margin: 0 0 .2rem;
  font-weight: 700;
}

.reminder-toast__message {
  margin: 0 0 .4rem;
  color: var(--text-muted);
}

.reminder-toast__time {
  margin: 0;
  font-size: .82rem;
  color: var(--text-muted);
}

.reminder-toast__close {
  position: absolute;
  top: .25rem;
  right: .35rem;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

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

body.has-app-shell .app-sidebar {
  min-height: 100vh;
}

.dashboard-stat-list--wrap li {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.calendar-workspace { padding: var(--pt-space-l); }
.calendar-add-panel { padding:1rem; margin-top:1rem; }
.calendar-form { display:grid; gap:.55rem; }
.calendar-form label { margin:.2rem 0 .1rem; font-weight:600; color:#12385e; }
.calendar-form input,
.calendar-form textarea { width:100%; border:1px solid #cfdcec; border-radius:10px; padding:.68rem .72rem; font:inherit; background:#fff; }
.calendar-form textarea { min-height:118px; line-height:1.45; resize:vertical; }
.calendar-form input::placeholder,
.calendar-form textarea::placeholder { color:#6b7f93; }
.calendar-form input:focus,
.calendar-form textarea:focus { border-color:#7ea8d6; box-shadow:0 0 0 3px rgba(0,94,184,.14); outline:none; }
.calendar-form .btn { justify-self:start; margin-top:.35rem; }
.calendar-form .im-inline-toggle { margin-top:.2rem; }

.dashboard-useful-link{transition:transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;}
.dashboard-useful-link:hover,.dashboard-useful-link:focus-visible{transform:translateY(-2px);box-shadow:0 10px 20px rgba(18,70,122,.14);border-color:#b7cae2;}


.priority-action-card {
  border-left: 3px solid var(--pt-alert-low-border);
  background: var(--pt-alert-low-bg);
}

.priority-action-card--critical {
  border-left-color: var(--pt-color-status-critical);
  background: var(--pt-alert-critical-bg);
}

.priority-action-card--high {
  border-left-color: var(--pt-color-status-warning);
  background: var(--pt-alert-high-bg);
}

.priority-action-card--medium {
  border-left-color: var(--pt-color-status-info);
  background: var(--pt-alert-medium-bg);
}

.priority-action-card--low {
  border-left-color: #7e9bbb;
  background: var(--pt-alert-low-bg);
}

.summary-metric-card .dashboard-alert-card__value {
  font-size: 1.75rem;
}

.dashboard-feed-list {
  display: grid;
  gap: .55rem;
}

.activity-feed-card {
  background: color-mix(in srgb, var(--panel) 92%, #f7fbff);
  box-shadow: none;
}

.activity-feed-card__title {
  margin: 0 0 .2rem;
  font-weight: 700;
  color: #184f91;
}

.activity-feed-card__timestamp {
  margin: .3rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

.dashboard-insights-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card {
  background: color-mix(in srgb, var(--panel) 90%, #f8fbff);
  border-color: color-mix(in srgb, var(--border) 82%, #d7e3f1);
}

.assistant-guidance-panel {
  background: var(--pt-color-bg-assistant);
  border: 1px solid var(--pt-color-border-strong);
}

.assistant-guidance-panel__actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

@media (min-width: 1280px) {
  .dashboard-alert-strip__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.module-landing-hero { margin-bottom: var(--pt-space-xl); }
.module-landing-grid { display: grid; gap: var(--pt-space-l); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: var(--pt-space-xl); }
.module-landing-summary { margin-bottom: var(--pt-space-xl); }
.module-landing-assistant { margin-top: var(--pt-space-l); }


.dashboard-copy { margin: 0 0 var(--pt-space-m); }
.dashboard-copy--flush { margin: 0; }
.dashboard-empty-state--narrow { max-width: 980px; margin-bottom: var(--pt-space-l); }
.dashboard-action-row { display: flex; gap: var(--pt-space-s); margin-top: var(--pt-space-s); flex-wrap: wrap; }
.insight-card__label { margin: var(--pt-space-xs) 0 var(--pt-space-s); }
.insight-card__meta { margin: var(--pt-space-s) 0 0; }
.activity-feed-card__icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: text-bottom; color: var(--pt-color-text-secondary); }
