@layer sl.base, sl.components;

@layer sl.base {
  .sl-app {
    min-height: 100vh;
    color: #243246;
    font-family: var(--sl-font-sans);
    background:
      radial-gradient(circle at top left, rgba(12, 76, 201, 0.14), transparent 26%),
      radial-gradient(circle at top right, rgba(255, 102, 0, 0.12), transparent 18%),
      url(../wm.svg),
      linear-gradient(180deg, #f4f1ec 0%, #efebe6 100%);
    background-size: auto, auto, min(84vw, 1280px), auto;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  .sl-app::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--sl-diffusion-bg);
    backdrop-filter: blur(var(--sl-diffusion-blur)) saturate(var(--sl-diffusion-saturate));
    z-index: -1;
    pointer-events: none;
  }

  body[data-theme="dark"] .sl-app {
    color: var(--sl-text-primary);
    background:
      radial-gradient(circle at top left, rgba(94, 138, 255, 0.18), transparent 28%),
      radial-gradient(circle at top right, rgba(255, 154, 79, 0.14), transparent 20%),
      linear-gradient(180deg, #0a0f1c 0%, #0d1222 100%);
    background-attachment: fixed;
  }

  body[data-theme="dark"] .sl-app::before {
    background: var(--sl-diffusion-bg);
    backdrop-filter: blur(var(--sl-diffusion-blur)) saturate(var(--sl-diffusion-saturate));
  }

  .sl-app a {
    color: inherit;
    text-decoration: none;
  }

  .sl-app .page-footer {
    margin-top: 0;
    color: rgba(64, 78, 101, 0.78);
    border-top: 1px solid rgba(162, 173, 189, 0.32);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(12px);
  }

  .sl-app .page-footer a {
    color: #1f4fd1;
  }
}

@layer sl.components {
  /* ---------- Keyframes ---------- */
  @keyframes sl-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes sl-pulse-glow {
    0%, 100% { box-shadow: 0 0 6px rgba(12, 76, 201, 0.3); }
    50%      { box-shadow: 0 0 12px rgba(12, 76, 201, 0.55); }
  }

  /* ---------- Topbar (navbar) ---------- */
  .sl-topbar {
    position: sticky;
    top: 0;
    z-index: var(--sl-z-navbar);
    padding: 0.5rem 1.25rem;
    background: transparent;
  }

  .sl-topbar-wrap {
    max-width: none;
    width: 100%;
    padding: 0;
  }

  .sl-topbar-shell {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4rem;
    padding: 0 1.25rem;
    border: 1px solid #e6e8ec;
    border-radius: 1rem;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: sl-fade-up 350ms var(--sl-ease-standard) both;
  }

  body[data-theme="dark"] .sl-topbar-shell {
    border-color: #232a36;
    background: #121821;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  /* Brandmark */
  .sl-brandmark {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    flex: 0 0 auto;
    height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid #e6e8ec;
    border-radius: 0.75rem;
    text-decoration: none;
    background: #ffffff;
  }

  body[data-theme="dark"] .sl-brandmark {
    border-color: #232a36;
    background: #121821;
  }

  .sl-brandmark-dots {
    display: grid;
    gap: 0.25rem;
  }

  .sl-brandmark-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
  }

  .sl-brandmark-dot--blue {
    background: #2563eb;
    animation: sl-pulse-glow 3s ease-in-out infinite;
  }

  .sl-brandmark-dot--orange {
    background: #ff7a00;
  }

  .sl-brandmark-word {
    color: #1f2937;
    font-size: 0.875rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    line-height: 1;
    font-weight: 700;
  }

  body[data-theme="dark"] .sl-brandmark-word {
    color: #e6edf3;
  }

  /* Toggle */
  .sl-topbar-toggle {
    border: 1px solid #e6e8ec;
    border-radius: 0.55rem;
    padding: 0.35rem 0.5rem;
    background: #ffffff;
    color: #6b7280;
  }

  body[data-theme="dark"] .sl-topbar-toggle {
    border-color: #232a36;
    background: #121821;
    color: #93a1b3;
  }

  .sl-topbar-toggle:focus {
    box-shadow: 0 0 0 2px #2563eb;
    outline: none;
  }

  body[data-theme="dark"] .sl-topbar-toggle:focus {
    box-shadow: 0 0 0 2px #2f6bff;
  }

  .sl-topbar-collapse {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    min-width: 0;
    width: 100%;
    justify-content: space-between;
  }

  .sl-topbar-nav {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
    margin-right: auto;
    overflow: visible;
  }

  .sl-topbar-item {
    position: relative;
    flex: 0 0 auto;
  }

  /* Nav links */
  .sl-topbar-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 0.5rem;
    line-height: 1;
    white-space: nowrap;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
  }

  .sl-topbar-link.dropdown-toggle::after {
    margin-left: 0.25rem;
    vertical-align: 0.08em;
  }

  body[data-theme="dark"] .sl-topbar-link {
    color: #93a1b3;
  }

  .sl-topbar-link ion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    min-width: 1.125rem;
    font-size: 1.125rem;
    color: #6b7280;
  }

  body[data-theme="dark"] .sl-topbar-link ion-icon {
    color: #7b8ca0;
  }

  .sl-topbar-link:hover,
  .sl-topbar-link:focus {
    color: #1f2937;
    background: #f3f6ff;
  }

  body[data-theme="dark"] .sl-topbar-link:hover,
  body[data-theme="dark"] .sl-topbar-link:focus {
    color: #e6edf3;
    background: rgba(47, 107, 255, 0.08);
  }

  .sl-topbar-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #2563eb;
    border-radius: 0.5rem;
  }

  body[data-theme="dark"] .sl-topbar-link:focus-visible {
    box-shadow: 0 0 0 2px #2f6bff;
  }

  /* Active nav item — pill treatment from guide */
  .sl-topbar-item.is-active > .sl-topbar-link {
    color: #2563eb;
    font-weight: 600;
    background: #e7f0ff;
  }

  body[data-theme="dark"] .sl-topbar-item.is-active > .sl-topbar-link {
    color: #2f6bff;
    background: rgba(47, 107, 255, 0.12);
  }

  .sl-topbar-item.is-active > .sl-topbar-link ion-icon {
    color: #2563eb;
  }

  body[data-theme="dark"] .sl-topbar-item.is-active > .sl-topbar-link ion-icon {
    color: #2f6bff;
  }

  .sl-topbar-item.is-active > .sl-topbar-link::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.15rem;
    height: 3px;
    border-radius: 999px;
    background: #2563eb;
  }

  body[data-theme="dark"] .sl-topbar-item.is-active > .sl-topbar-link::after {
    background: #2f6bff;
    box-shadow: 0 0 8px rgba(47, 107, 255, 0.4);
  }

  /* Dropdown menus */
  .sl-topbar-menu {
    position: relative;
    min-width: 15rem;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 1px solid #e6e8ec;
    border-radius: 0.875rem;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
    overflow: hidden;
  }

  .sl-topbar-menu::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    right: 1rem;
    width: 2.2rem;
    height: 0.45rem;
    background:
      linear-gradient(120deg, transparent 0 20%, #2563eb 20% 34%, transparent 34% 42%, #2563eb 42% 56%, transparent 56% 64%, #ff6600 64% 78%, transparent 78%);
    pointer-events: none;
  }

  body[data-theme="dark"] .sl-topbar-menu {
    border-color: #232a36;
    background: #121821;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }

  .sl-menu-section-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 1.5rem;
    padding: 0.25rem 3.7rem 0.4rem 0.75rem;
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sl-menu-section-label::after {
    content: "";
    display: block;
    flex: 1 1 auto;
    height: 1px;
    min-width: 2rem;
    background: #e6e8ec;
  }

  body[data-theme="dark"] .sl-menu-section-label {
    color: #93a1b3;
  }

  body[data-theme="dark"] .sl-menu-section-label::after {
    background: #232a36;
  }

  .sl-menu-divider {
    display: block;
    height: 1px;
    margin: 0.35rem 0.75rem;
    background: #eef1f4;
  }

  body[data-theme="dark"] .sl-menu-divider {
    background: #232a36;
  }

  .sl-topbar-menu .dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.625rem 0.75rem !important;
    border-radius: 0.625rem;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 120ms ease, color 120ms ease;
  }

  .sl-topbar-menu .dropdown-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sl-menu-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.125rem;
    min-width: 1.125rem;
    height: 1.125rem;
    font-size: 1.125rem;
    line-height: 1;
    color: #6b7280;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item {
    color: #93a1b3;
  }

  body[data-theme="dark"] .sl-menu-item-icon {
    color: #93a1b3;
  }

  .sl-topbar-menu .dropdown-item:hover,
  .sl-topbar-menu .dropdown-item:focus {
    background: #f3f6ff;
    color: #2563eb;
  }

  .sl-topbar-menu .dropdown-item:hover .sl-menu-item-icon,
  .sl-topbar-menu .dropdown-item:focus .sl-menu-item-icon {
    color: #2563eb;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item:hover,
  body[data-theme="dark"] .sl-topbar-menu .dropdown-item:focus {
    background: rgba(47, 107, 255, 0.08);
    color: #2f6bff;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item:hover .sl-menu-item-icon,
  body[data-theme="dark"] .sl-topbar-menu .dropdown-item:focus .sl-menu-item-icon {
    color: #2f6bff;
  }

  .sl-topbar-menu .dropdown-item.is-active {
    background: #e7f0ff;
    color: #2563eb;
    font-weight: 600;
  }

  .sl-topbar-menu .dropdown-item.is-active .sl-menu-item-icon {
    color: #2563eb;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item.is-active {
    background: rgba(47, 107, 255, 0.14);
    color: #2f6bff;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item.is-active .sl-menu-item-icon {
    color: #2f6bff;
  }

  .sl-topbar-menu .dropdown-item:active {
    background: #e7f0ff;
  }

  body[data-theme="dark"] .sl-topbar-menu .dropdown-item:active {
    background: rgba(47, 107, 255, 0.14);
  }

  .sl-topbar-dynamic {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  .sl-topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: fit-content;
  }

  .sl-env-pill {
    display: inline-flex;
    align-items: center;
    height: 1.75rem;
    padding: 0 0.625rem;
    border: 1px solid rgba(255, 122, 0, 0.3);
    border-radius: 999px;
    color: #ff7a00;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.6875rem;
    font-weight: 600;
  }

  body[data-theme="dark"] .sl-env-pill {
    border-color: rgba(255, 122, 0, 0.4);
    color: #ff7a00;
  }

  /* Icon button */
  .sl-icon-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #e6e8ec;
    border-radius: 999px;
    color: #6b7280;
    background: #ffffff;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  }

  body[data-theme="dark"] .sl-icon-button {
    border-color: #232a36;
    color: #93a1b3;
    background: #121821;
  }

  .sl-icon-button:hover {
    color: #1f2937;
    border-color: #c4c8d0;
    background: #f3f6ff;
  }

  body[data-theme="dark"] .sl-icon-button:hover {
    color: #e6edf3;
    border-color: #3a4555;
    background: rgba(47, 107, 255, 0.08);
  }

  .sl-icon-button ion-icon {
    font-size: 1.125rem;
  }

  /* Theme toggle: show the moon in light mode, the sun in dark mode. */
  .sl-theme-icon--sun {
    display: none;
  }
  body[data-theme="dark"] .sl-theme-icon--moon {
    display: none;
  }
  body[data-theme="dark"] .sl-theme-icon--sun {
    display: inline-flex;
  }

  .sl-icon-dot {
    position: absolute;
    top: 0.45rem;
    right: 0.5rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.2);
  }

  body[data-theme="dark"] .sl-icon-dot {
    background: #2f6bff;
    box-shadow: 0 0 0 0.15rem rgba(47, 107, 255, 0.25);
  }

  .sl-topbar-usernav {
    margin: 0;
  }

  .sl-user-pill {
    list-style: none;
  }

  /* User pill */
  .sl-user-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.35rem;
    border: 1px solid #e6e8ec;
    border-radius: 999px;
    color: #1f2937;
    background: #ffffff;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease;
  }

  body[data-theme="dark"] .sl-user-pill-link {
    border-color: #232a36;
    background: #121821;
    color: #e6edf3;
  }

  .sl-user-pill-link.dropdown-toggle::after {
    display: none !important;
  }

  .sl-user-caret {
    font-size: 0.55rem;
    color: var(--sl-text-muted);
    margin-left: 0.1rem;
  }

  .sl-user-avatar {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 1px solid #e6e8ec;
    background: linear-gradient(180deg, #e7f0ff, #d4e2f7);
    color: #2563eb;
    font-weight: 700;
    font-size: 0.625rem;
  }

  body[data-theme="dark"] .sl-user-avatar {
    border-color: #232a36;
    background: linear-gradient(180deg, rgba(47, 107, 255, 0.18), rgba(47, 107, 255, 0.08));
    color: #2f6bff;
  }

  .sl-user-copy {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
    line-height: 1.1;
  }

  .sl-user-copy strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
  }

  body[data-theme="dark"] .sl-user-copy strong {
    color: #e6edf3;
  }

  .sl-user-copy span {
    font-size: 0.6875rem;
    color: #6b7280;
  }

  body[data-theme="dark"] .sl-user-copy span {
    color: #7b8ca0;
  }

  /* Responsive */
  @media (max-width: 1535.98px) {
    .sl-brandmark-word {
      font-size: 0.8125rem;
      letter-spacing: 0.08rem;
    }

    .sl-topbar-link {
      padding-inline: 0.5rem;
      font-size: 0.8125rem;
    }
  }

  @media (max-width: 1023.98px) {
    .sl-topbar {
      padding: 0.35rem 0.75rem;
    }

    .sl-topbar-shell {
      align-items: flex-start;
      padding: 0.5rem 0.75rem;
    }

    .sl-topbar-collapse {
      width: 100%;
      align-items: stretch;
      flex-direction: column;
      padding-top: 0.75rem;
    }

    .sl-topbar-nav {
      width: 100%;
      flex-direction: column;
      gap: 0.15rem;
    }

    .sl-topbar-link {
      min-height: 2.75rem;
    }

    .sl-topbar-item.is-active > .sl-topbar-link::after {
      bottom: 0.2rem;
    }

    .sl-topbar-meta {
      width: 100%;
      justify-content: space-between;
      flex-wrap: nowrap;
      gap: 0.5rem;
      padding-top: 0.5rem;
      border-top: 1px solid #e6e8ec;
    }

    body[data-theme="dark"] .sl-topbar-meta {
      border-top-color: #232a36;
    }
  }

  @media (max-width: 767.98px) {
    .sl-topbar-shell {
      border-radius: 0.75rem;
    }

    .sl-brandmark {
      width: calc(100% - 4rem);
      justify-content: flex-start;
    }

    .sl-brandmark-word {
      font-size: 0.9375rem;
      letter-spacing: 0.1rem;
    }

    .sl-user-pill-link {
      width: 100%;
    }
  }

  /* ---------- Page shell ---------- */
  .sl-page-shell {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: var(--sl-space-4) var(--sl-space-4) var(--sl-space-5);
  }

  .sl-page-shell--wide {
    max-width: 100%;
  }

  .sl-page-surface {
    background: var(--sl-surface-overlay);
    border: 1px solid var(--sl-surface-overlay-border);
    border-radius: 0.875rem;
    padding: 1.25rem var(--sl-space-5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: sl-fade-up 400ms var(--sl-ease-standard) both;
  }

  body[data-theme="dark"] .sl-page-surface {
    background: var(--sl-surface-overlay);
    border-color: var(--sl-surface-overlay-border);
  }

  .sl-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sl-text-strong);
    margin: 0;
    letter-spacing: -0.01em;
  }

  .sl-landing-copy {
    margin: 0;
    color: var(--sl-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .sl-decal-stripe {
    height: 3px;
    width: 48px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sl-color-brand-500), var(--sl-color-accent-500));
    margin-top: var(--sl-space-2);
  }

  .sl-surface-header {
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-1);
    margin-bottom: var(--sl-space-4);
  }

  .sl-surface-subtitle {
    margin: 0;
    color: var(--sl-text-muted);
  }

  .sl-user-avatar-img {
    height: 5rem;
    border-radius: var(--sl-space-2);
  }

  .sl-min-w-0 {
    min-width: 0;
  }

  .sl-callout {
    background: var(--sl-surface-callout);
    border: 1px solid var(--sl-surface-overlay-border);
    border-radius: 0.75rem;
    padding: var(--sl-space-4) 1.25rem;
    transition: background 150ms ease;
    animation: sl-fade-up 400ms var(--sl-ease-standard) 120ms both;
  }

  .sl-callout:hover {
    background: var(--sl-surface-base);
  }

  body[data-theme="dark"] .sl-callout {
    background: var(--sl-surface-callout);
    border-color: var(--sl-surface-overlay-border);
  }

  body[data-theme="dark"] .sl-callout:hover {
    background: rgba(15, 22, 38, 0.75);
  }

  .sl-welcome-link {
    text-decoration: none;
    color: inherit;
    display: block;
  }

  /* ---------- Message board (landing welcome messages) ---------- */
  .sl-msg-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: var(--sl-space-4);
    align-items: start;
  }

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

  .sl-msg-meta {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    font-size: 0.8rem;
    color: var(--sl-text-muted);
  }

  .sl-msg-meta strong {
    color: var(--sl-text-primary);
    font-weight: 600;
  }

  .sl-msg-feature {
    background: var(--sl-surface-callout);
    border: 1px solid var(--sl-surface-overlay-border);
    border-radius: var(--sl-radius-sm);
    padding: var(--sl-space-5);
  }

  body[data-theme="dark"] .sl-msg-feature {
    background: var(--sl-surface-callout);
    border-color: var(--sl-surface-overlay-border);
  }

  .sl-msg-feature__head {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    margin-bottom: var(--sl-space-3);
  }

  .sl-msg-feature__head ion-icon {
    font-size: 1.25rem;
    color: var(--sl-color-brand-500);
  }

  body[data-theme="dark"] .sl-msg-feature__head ion-icon {
    color: var(--sl-color-brand-600);
  }

  .sl-msg-feature__body {
    max-height: 42vh;
    overflow-y: auto;
    color: var(--sl-text-primary);
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .sl-msg-feature__body > :first-child { margin-top: 0; }
  .sl-msg-feature__body > :last-child { margin-bottom: 0; }

  .sl-msg-feed {
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-2);
  }

  .sl-msg-feed__label {
    margin: 0 0 var(--sl-space-1);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sl-text-muted);
  }

  .sl-msg-item {
    display: block;
    padding: var(--sl-space-3);
    border: 1px solid var(--sl-surface-overlay-border);
    border-radius: var(--sl-radius-xs);
    background: var(--sl-surface-base);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--sl-motion-fast), background var(--sl-motion-fast);
  }

  .sl-msg-item:hover {
    border-color: var(--sl-color-brand-500);
    background: var(--sl-surface-elevated);
  }

  body[data-theme="dark"] .sl-msg-item {
    background: var(--sl-surface-base);
    border-color: var(--sl-surface-overlay-border);
  }

  body[data-theme="dark"] .sl-msg-item:hover {
    border-color: var(--sl-color-brand-600);
  }

  .sl-msg-item__snippet {
    margin-top: var(--sl-space-1);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--sl-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sl-msg-item__snippet > * { margin: 0; }

  .sl-msg-feed__more {
    margin-top: var(--sl-space-1);
    align-self: flex-end;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sl-color-brand-500);
    text-decoration: none;
  }

  body[data-theme="dark"] .sl-msg-feed__more {
    color: var(--sl-color-brand-600);
  }

  /* ---------- Landing / portal dashboard ---------- */
  .sl-landing-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sl-space-4);
    margin-bottom: var(--sl-space-6);
  }

  .sl-landing-title {
    font-size: 1.6rem;
  }

  .sl-landing-clock {
    text-align: right;
  }

  .sl-landing-clock__time {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--sl-text-strong);
    font-variant-numeric: tabular-nums;
  }

  .sl-landing-clock__meta {
    margin-top: var(--sl-space-1);
    font-size: 0.85rem;
    color: var(--sl-text-muted);
  }

  .sl-section-label {
    margin: 0 0 var(--sl-space-3);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sl-text-muted);
  }

  .sl-landing-section {
    margin-bottom: var(--sl-space-6);
  }

  .sl-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: var(--sl-space-3);
  }

  .sl-tile {
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-2);
    padding: var(--sl-space-4);
    border: 1px solid var(--sl-surface-overlay-border);
    border-radius: var(--sl-radius-sm);
    background: var(--sl-surface-base);
    color: var(--sl-text-primary);
    text-decoration: none;
    transition: transform var(--sl-motion-fast), box-shadow var(--sl-motion-fast), border-color var(--sl-motion-fast);
  }

  .sl-tile:hover {
    transform: translateY(-2px);
    border-color: var(--sl-color-brand-500);
    box-shadow: 0 8px 24px rgba(12, 76, 201, 0.12);
  }

  .sl-tile ion-icon {
    font-size: 1.6rem;
    color: var(--sl-color-brand-500);
  }

  .sl-tile__label {
    font-weight: 600;
    font-size: 0.95rem;
  }

  .sl-tile__desc {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--sl-text-muted);
  }

  body[data-theme="dark"] .sl-tile {
    background: var(--sl-surface-base);
    border-color: var(--sl-surface-overlay-border);
  }

  body[data-theme="dark"] .sl-tile:hover {
    border-color: var(--sl-color-brand-600);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  body[data-theme="dark"] .sl-tile ion-icon {
    color: var(--sl-color-brand-600);
  }

  .sl-cursor-pointer {
    cursor: pointer;
  }

  .sl-mono {
    font-family: var(--sl-font-mono);
    font-size: 0.85em;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }

  .sl-is-hidden {
    display: none !important;
  }

  .sl-footer-dimmed {
    backdrop-filter: brightness(50%);
  }

  /* ---------- Buttons ---------- */
  .sl-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-1);
    padding: 0.35rem var(--sl-space-3);
    border: 1px solid transparent;
    border-radius: var(--sl-radius-xs);
    font-family: var(--sl-font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: color var(--sl-motion-fast), background var(--sl-motion-fast), border-color var(--sl-motion-fast), box-shadow var(--sl-motion-fast);
  }

  .sl-btn--primary {
    color: #ffffff;
    background: var(--sl-color-brand-500);
  }
  .sl-btn--primary:hover { background: var(--sl-color-brand-600); }

  body[data-theme="dark"] .sl-btn--primary {
    background: var(--sl-color-brand-600);
  }
  body[data-theme="dark"] .sl-btn--primary:hover {
    background: var(--sl-color-brand-700);
  }

  .sl-btn--secondary {
    color: var(--sl-text-primary);
    background: var(--sl-surface-base);
    border-color: #e6e8ec;
  }
  .sl-btn--secondary:hover { background: #f5f7fa; }

  body[data-theme="dark"] .sl-btn--secondary {
    color: rgba(236, 243, 255, 0.9);
    background: #0f1621;
    border-color: #334155;
  }
  body[data-theme="dark"] .sl-btn--secondary:hover { background: #1a2538; }

  .sl-btn--danger {
    color: #ffffff;
    background: var(--sl-state-danger);
  }
  .sl-btn--danger:hover { background: #981e15; }

  .sl-btn--success {
    color: #ffffff;
    background: var(--sl-state-success);
  }
  .sl-btn--success:hover { background: #059b07; }

  .sl-btn--ghost {
    color: var(--sl-text-muted);
    background: transparent;
    border-color: transparent;
  }
  .sl-btn--ghost:hover {
    color: var(--sl-text-primary);
    background: rgba(0, 0, 0, 0.04);
  }

  body[data-theme="dark"] .sl-btn--ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
  }

  body[data-theme="dark"] .sl-btn--success {
    background: var(--sl-state-success);
  }
  body[data-theme="dark"] .sl-btn--success:hover { background: #04c907; }

  .sl-btn:disabled,
  .sl-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* ---------- Badges ---------- */
  .sl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
  }

  .sl-badge--brand {
    color: #ffffff;
    background: var(--sl-color-brand-500);
  }

  .sl-badge--success {
    color: #ffffff;
    background: var(--sl-state-success);
  }

  .sl-badge--warning {
    color: #ffffff;
    background: var(--sl-state-warning);
  }

  .sl-badge--danger {
    color: #ffffff;
    background: var(--sl-state-danger);
  }

  .sl-badge--info {
    color: #ffffff;
    background: var(--sl-state-info);
  }

  .sl-badge--muted {
    color: var(--sl-text-muted);
    background: rgba(0, 0, 0, 0.06);
  }

  body[data-theme="dark"] .sl-badge--muted {
    color: rgba(236, 243, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
  }

  .sl-status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
  }

  .sl-status-dot--success { background: var(--sl-state-success); }
  .sl-status-dot--warning { background: var(--sl-state-warning); }
  .sl-status-dot--danger  { background: var(--sl-state-danger); }
  .sl-status-dot--info    { background: var(--sl-state-info); }

  /* ---------- Inputs ---------- */
  .sl-input {
    display: block;
    width: 100%;
    padding: 0.4rem var(--sl-space-2);
    border: 1px solid #e6e8ec;
    border-radius: var(--sl-radius-xs);
    font-family: var(--sl-font-sans);
    font-size: 0.85rem;
    color: var(--sl-text-primary);
    background: var(--sl-surface-base);
    transition: border-color var(--sl-motion-fast), box-shadow var(--sl-motion-fast);
  }

  .sl-input:focus {
    outline: none;
    border-color: var(--sl-color-brand-500);
    box-shadow: 0 0 0 2px rgba(12, 76, 201, 0.15);
  }

  .sl-input::placeholder {
    color: var(--sl-text-muted);
    opacity: 0.7;
  }

  body[data-theme="dark"] .sl-input {
    color: rgba(236, 243, 255, 0.9);
    background: #0f1621;
    border-color: #334155;
  }

  body[data-theme="dark"] .sl-input:focus {
    border-color: var(--sl-color-brand-600);
    box-shadow: 0 0 0 2px rgba(94, 138, 255, 0.2);
  }

  .sl-label {
    display: block;
    margin-bottom: var(--sl-space-1);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--sl-text-muted);
  }

  .sl-field {
    margin-bottom: var(--sl-space-4);
  }

  .sl-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    align-items: end;
    gap: var(--sl-space-3);
    max-width: 54rem;
  }

  .sl-form-grid .sl-field {
    margin-bottom: 0;
  }

  .sl-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-2);
    margin-top: var(--sl-space-4);
  }

  .sl-notification-button[hidden] {
    display: none !important;
  }

  .rp-harmony-export-form {
    margin-top: var(--sl-space-5);
  }

  .rp-harmony-export-grid {
    display: grid;
    align-items: end;
    gap: var(--sl-space-3);
  }

  .rp-harmony-export-grid--primary {
    grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(6.25rem, 0.7fr) auto;
  }

  .rp-harmony-export-grid--summary {
    grid-template-columns: minmax(5rem, 0.6fr) minmax(6.25rem, 0.8fr) minmax(6.25rem, 0.8fr) auto;
    max-width: 39rem;
  }

  .rp-harmony-export-grid .sl-field {
    margin-bottom: 0;
  }

  .rp-harmony-export-action {
    display: flex;
    align-items: end;
  }

  .rp-harmony-export-action .sl-btn {
    min-height: 2.375rem;
    white-space: nowrap;
  }

  .rp-harmony-export-divider {
    border: 0;
    border-top: 1px solid var(--sl-surface-overlay-border);
    margin: var(--sl-space-5) 0 var(--sl-space-4);
  }

  @media (max-width: 760px) {
    .rp-harmony-export-grid,
    .rp-harmony-export-grid--primary,
    .rp-harmony-export-grid--summary {
      grid-template-columns: 1fr;
      max-width: none;
    }

    .rp-harmony-export-action .sl-btn {
      width: 100%;
    }
  }

  /* ---------- Tables ---------- */
  .sl-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--sl-radius-sm);
  }

  body[data-theme="dark"] .sl-table-wrap {
    border-color: rgba(99, 122, 164, 0.18);
  }

  .sl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }

  .sl-table th {
    padding: var(--sl-space-2) var(--sl-space-3);
    font-weight: 600;
    font-size: 0.75rem;
    text-align: left;
    letter-spacing: 0.02em;
    color: var(--sl-text-muted);
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  body[data-theme="dark"] .sl-table th {
    color: rgba(236, 243, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(99, 122, 164, 0.18);
  }

  .sl-table td {
    padding: var(--sl-space-2) var(--sl-space-3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--sl-text-primary);
  }

  body[data-theme="dark"] .sl-table td {
    border-bottom-color: rgba(99, 122, 164, 0.1);
    color: rgba(236, 243, 255, 0.85);
  }

  .sl-table tbody tr:hover {
    background: rgba(12, 76, 201, 0.1);
    box-shadow: inset 3px 0 0 var(--sl-color-brand-500);
  }

  body[data-theme="dark"] .sl-table tbody tr:hover {
    background: rgba(151, 181, 255, 0.16);
    box-shadow: inset 3px 0 0 var(--sl-color-brand-600);
  }

  .sl-table .sl-mono {
    font-size: 0.8rem;
  }

  /* ---------- KPI Strip ---------- */
  .sl-kpi-strip {
    display: flex;
    gap: var(--sl-space-3);
    flex-wrap: wrap;
  }

  .sl-kpi {
    flex: 1 1 120px;
    min-width: 0;
    padding: var(--sl-space-3) var(--sl-space-4);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--sl-radius-xs);
    background: var(--sl-surface-base);
  }

  body[data-theme="dark"] .sl-kpi {
    background: #0f1621;
    border-color: rgba(99, 122, 164, 0.18);
  }

  .sl-kpi__value {
    font-family: var(--sl-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sl-text-strong);
    line-height: 1.2;
  }

  .sl-kpi__label {
    font-size: 0.72rem;
    color: var(--sl-text-muted);
    margin-top: 0.15rem;
  }

  /* ---------- Notices ---------- */
  .sl-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--sl-space-2);
    padding: var(--sl-space-3) var(--sl-space-4);
    border-radius: var(--sl-radius-xs);
    font-size: 0.85rem;
    line-height: 1.45;
    border: 1px solid transparent;
  }

  .sl-notice--info {
    color: var(--sl-state-info);
    background: rgba(33, 101, 214, 0.08);
    border-color: rgba(33, 101, 214, 0.15);
  }

  .sl-notice--success {
    color: var(--sl-state-success);
    background: rgba(21, 115, 71, 0.08);
    border-color: rgba(21, 115, 71, 0.15);
  }

  .sl-notice--warning {
    color: var(--sl-state-warning);
    background: rgba(180, 105, 14, 0.08);
    border-color: rgba(180, 105, 14, 0.15);
  }

  .sl-notice--danger {
    color: var(--sl-state-danger);
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.15);
  }

  /* ---------- Pagination ---------- */
  .sl-pagination {
    display: flex;
    align-items: center;
    gap: var(--sl-space-1);
    list-style: none;
    padding: 0;
    margin: var(--sl-space-4) 0 0;
  }

  .sl-pagination li {
    display: inline-flex;
  }

  .sl-pagination a,
  .sl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 var(--sl-space-2);
    border: 1px solid transparent;
    border-radius: var(--sl-radius-xs);
    font-size: 0.8rem;
    color: var(--sl-text-muted);
    text-decoration: none;
    transition: background var(--sl-motion-fast), color var(--sl-motion-fast);
  }

  .sl-pagination a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--sl-text-primary);
  }

  body[data-theme="dark"] .sl-pagination a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
  }

  .sl-pagination .active span {
    color: #ffffff;
    background: var(--sl-color-brand-500);
    border-color: var(--sl-color-brand-500);
    font-weight: 600;
  }

  .sl-pagination .disabled span {
    opacity: 0.4;
    cursor: not-allowed;
  }

  /* ---------- Decal stripe variants ---------- */
  .sl-decal-stripe--wide {
    width: 72px;
    height: 4px;
  }

  .sl-decal-stripe--accent {
    background: linear-gradient(90deg, var(--sl-color-accent-500), var(--sl-color-accent-400));
  }

  .sl-decal-stripe--subtle {
    height: 2px;
    width: 36px;
    opacity: 0.5;
  }

  /* ---------- Title blocks ---------- */
  .sl-title-block {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sl-space-3);
    flex-wrap: wrap;
    margin-bottom: var(--sl-space-5);
  }

  .sl-title-block__actions {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
  }

  /* ---------- Drawer ---------- */
  .sl-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 90vw);
    z-index: var(--sl-z-drawer);
    background: var(--sl-surface-base);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform var(--sl-motion-medium) var(--sl-ease-standard);
    padding: var(--sl-space-5);
    overflow-y: auto;
  }

  body[data-theme="dark"] .sl-drawer {
    background: #0f1621;
    border-left-color: rgba(99, 122, 164, 0.18);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3);
  }

  .sl-drawer.is-open {
    transform: translateX(0);
  }

  .sl-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sl-space-5);
  }

  .sl-drawer__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sl-text-strong);
    margin: 0;
  }

  .sl-drawer__close {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid #e6e8ec;
    border-radius: 999px;
    color: var(--sl-text-muted);
    background: transparent;
    cursor: pointer;
  }

  body[data-theme="dark"] .sl-drawer__close {
    border-color: #334155;
    color: rgba(236, 243, 255, 0.7);
  }

  /* ---------- RP secondary pages ---------- */
  .rp-secondary-form {
    margin-bottom: var(--sl-space-5);
  }

  .rp-secondary-heading {
    margin: 0;
    color: var(--sl-text-strong);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 650;
    letter-spacing: -0.02em;
  }

  .rp-secondary-copy {
    margin: var(--sl-space-1) 0 0;
    color: var(--sl-text-muted);
    font-size: 0.86rem;
  }

  .rp-verifier-section {
    display: grid;
    gap: var(--sl-space-2);
    margin-top: var(--sl-space-5);
  }

  .rp-verifier-table {
    min-height: 3.2rem;
    background: rgba(255, 255, 255, 0.42);
  }

  .rp-verifier-table:empty::before {
    content: "Keine Daten geladen.";
    display: block;
    padding: var(--sl-space-3);
    color: var(--sl-text-muted);
    font-size: 0.86rem;
  }

  .rp-verifier-table .table {
    margin-bottom: 0;
    color: var(--sl-text-primary);
    font-size: 0.82rem;
  }

  .rp-verifier-table .table thead th {
    color: var(--sl-text-muted);
    background: rgba(0, 0, 0, 0.03);
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  body[data-theme="dark"] .rp-verifier-table {
    background: rgba(15, 22, 33, 0.46);
  }

  body[data-theme="dark"] .rp-verifier-table .table {
    color: rgba(236, 243, 255, 0.9);
  }

  body[data-theme="dark"] .rp-verifier-table .table thead th {
    color: rgba(236, 243, 255, 0.72);
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(99, 122, 164, 0.2);
  }

  .rp-seventies-panel {
    position: relative;
  }

  .billing-station-form,
  .billing-two-column,
  .billing-candidates-layout {
    display: grid;
    gap: var(--sl-space-4);
  }

  .billing-station-form {
    grid-template-columns: minmax(9rem, 12rem) minmax(8rem, 10rem) auto;
    align-items: end;
    max-width: 34rem;
    margin-top: var(--sl-space-4);
  }

  .billing-station-form .sl-field {
    margin-bottom: 0;
  }

  .billing-station-form .sl-btn {
    min-height: 2.375rem;
    white-space: nowrap;
  }

  .billing-two-column,
  .billing-candidates-layout {
    grid-template-columns: minmax(16rem, 0.85fr) minmax(24rem, 1.4fr);
    align-items: start;
  }

  .billing-control-panel,
  .billing-table-panel {
    display: grid;
    gap: var(--sl-space-3);
    min-width: 0;
  }

  .billing-control-panel form {
    display: grid;
    gap: var(--sl-space-3);
  }

  .billing-control-panel .mb-3,
  .billing-control-panel .form-group {
    margin-bottom: 0 !important;
  }

  .billing-control-panel .form-control,
  .billing-control-panel .form-select,
  .billing-control-panel select,
  .billing-control-panel input {
    min-height: 2.35rem;
    border-color: #e6e8ec;
    border-radius: var(--sl-radius-xs);
    color: var(--sl-text-primary);
    font-size: 0.9rem;
  }

  .billing-control-panel .btn,
  .billing-report-panel .btn {
    min-height: 2.375rem;
    border-radius: var(--sl-radius-xs);
  }

  .billing-table-panel .sl-table-wrap,
  .billing-table-panel .table {
    margin-bottom: 0;
  }

  .disappearing {
    transition: all 0.5s;
    animation: sl-collapse-row 1s ease-in forwards;
  }

  @keyframes sl-collapse-row {
    0% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(0); opacity: 0; }
  }

  .billing-report-panel {
    position: relative;
  }

  .billing-report-panel form {
    display: grid;
    gap: var(--sl-space-4);
  }

  .billing-report-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 14rem));
    gap: var(--sl-space-3);
    justify-content: start;
  }

  .billing-report-dates .mb-3,
  .billing-report-dates .form-group,
  .billing-report-stations .mb-3,
  .billing-report-stations .form-check {
    margin-bottom: 0 !important;
  }

  .billing-report-dates .form-control {
    min-height: 2.35rem;
    border-color: #e6e8ec;
    border-radius: var(--sl-radius-xs);
    color: var(--sl-text-primary);
    font-size: 0.9rem;
  }

  .billing-report-stations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: var(--sl-space-2) var(--sl-space-3);
    max-width: 42rem;
    margin-top: var(--sl-space-4);
  }

  .billing-report-stations .form-check {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--sl-radius-xs);
    background: rgba(255, 255, 255, 0.42);
  }

  .billing-report-stations .form-check-input {
    float: none;
    margin: 0;
  }

  .billing-report-stations .form-check-label {
    color: var(--sl-text-primary);
    font-size: 0.9rem;
    font-weight: 550;
  }

  .billing-report-loading {
    display: none;
    width: fit-content;
    min-width: 6rem;
    margin-top: var(--sl-space-3);
    padding: 0.35rem 0.7rem;
    border-radius: var(--sl-radius-xs);
    color: var(--sl-text-inverse);
    background: var(--sl-state-warning);
    animation: sl-pulse 1s infinite;
  }

  .billing-report-loading.loading_visible {
    display: inline-flex;
  }

  body[data-theme="dark"] .billing-control-panel .form-control,
  body[data-theme="dark"] .billing-control-panel .form-select,
  body[data-theme="dark"] .billing-control-panel select,
  body[data-theme="dark"] .billing-control-panel input,
  body[data-theme="dark"] .billing-report-dates .form-control {
    color: rgba(236, 243, 255, 0.9);
    background: #0f1621;
    border-color: #334155;
  }

  body[data-theme="dark"] .billing-report-stations .form-check {
    border-color: rgba(99, 122, 164, 0.2);
    background: rgba(15, 22, 33, 0.46);
  }

  body[data-theme="dark"] .billing-report-stations .form-check-label {
    color: rgba(236, 243, 255, 0.9);
  }

  .rp-seventies-panel form {
    display: grid;
    gap: var(--sl-space-4);
  }

  .rp-seventies-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 14rem));
    gap: var(--sl-space-3);
    justify-content: start;
  }

  .rp-seventies-dates .mb-3,
  .rp-seventies-stations .mb-3 {
    margin-bottom: 0 !important;
  }

  .rp-seventies-dates .form-control {
    min-height: 2.35rem;
    border-color: #e6e8ec;
    border-radius: var(--sl-radius-xs);
    color: var(--sl-text-primary);
    font-size: 0.9rem;
  }

  .rp-seventies-stations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: var(--sl-space-2) var(--sl-space-3);
    max-width: 42rem;
    margin-top: var(--sl-space-4);
  }

  .rp-seventies-stations .form-check {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--sl-radius-xs);
    background: rgba(255, 255, 255, 0.42);
  }

  .rp-seventies-stations .form-check-input {
    float: none;
    margin: 0;
  }

  .rp-seventies-stations .form-check-label {
    color: var(--sl-text-primary);
    font-size: 0.9rem;
    font-weight: 550;
  }

  .rp-seventies-panel #fullreport {
    width: fit-content;
  }

  .rp-seventies-loading {
    display: none;
    width: fit-content;
    min-width: 6rem;
    margin-top: var(--sl-space-3);
    padding: 0.35rem 0.7rem;
    border-radius: var(--sl-radius-xs);
    color: var(--sl-text-inverse);
    background: var(--sl-state-warning);
    animation: sl-pulse 1s infinite;
  }

  .rp-seventies-loading.loading_visible {
    display: inline-flex;
  }

  @keyframes sl-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
  }

  body[data-theme="dark"] .rp-seventies-dates .form-control {
    color: rgba(236, 243, 255, 0.9);
    background: #0f1621;
    border-color: #334155;
  }

  body[data-theme="dark"] .rp-seventies-stations .form-check {
    border-color: rgba(99, 122, 164, 0.2);
    background: rgba(15, 22, 33, 0.46);
  }

  body[data-theme="dark"] .rp-seventies-stations .form-check-label {
    color: rgba(236, 243, 255, 0.9);
  }

  @media (max-width: 640px) {
    .rp-seventies-dates {
      grid-template-columns: 1fr;
    }

    .billing-report-dates,
    .billing-station-form,
    .billing-two-column,
    .billing-candidates-layout {
      grid-template-columns: 1fr;
    }

    .billing-station-form .sl-btn {
      width: 100%;
    }
  }
}
