/* ========================================================================== 
   RANKHOUSE Control Center — Dashboard Redesign v7.1
   Global visual system for every dashboard and module page.
   ========================================================================== */

:root {
  --rh-bg: #09090c;
  --rh-bg-soft: #0d0d12;
  --rh-sidebar: #0d0d12;
  --rh-surface: #121218;
  --rh-surface-2: #17171f;
  --rh-surface-3: #1d1d27;
  --rh-input: #0e0e14;
  --rh-border: #292934;
  --rh-border-soft: #202029;
  --rh-text: #f4f4f7;
  --rh-text-soft: #d1d1d9;
  --rh-muted: #9292a1;
  --rh-muted-2: #6f6f7c;
  --rh-red: var(--rh-accent);
  --rh-red-2: var(--rh-accent-2);
  --rh-red-soft: rgba(var(--rh-accent-rgb), .12);
  --rh-green: #37d787;
  --rh-yellow: #f5b942;
  --rh-blue: #4d8dff;
  --rh-danger: #ff4d5f;
  --rh-radius-xs: 7px;
  --rh-radius-sm: 10px;
  --rh-radius: 13px;
  --rh-radius-lg: 18px;
  --rh-shadow: 0 16px 42px rgba(0, 0, 0, .24);
  --rh-shadow-soft: 0 8px 22px rgba(0, 0, 0, .18);
  --rh-sidebar-width: 280px;
  --rh-content-max: 1580px;
  --rh-control-height: 42px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #393945 transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #393945;
  background-clip: padding-box;
}

html {
  background: var(--rh-bg);
  scroll-behavior: smooth;
}

body.rankhouse-dashboard-v7 {
  min-width: 320px;
  color: var(--rh-text);
  background:
    radial-gradient(circle at 76% -20%, rgba(var(--rh-accent-rgb), .09), transparent 34rem),
    radial-gradient(circle at 26% 0%, rgba(101, 58, 255, .045), transparent 26rem),
    var(--rh-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.48;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.rankhouse-dashboard-v7 a {
  text-underline-offset: 3px;
}

body.rankhouse-dashboard-v7 ::selection {
  background: rgba(var(--rh-accent-rgb), .3);
  color: #fff;
}

/* App shell */
.app-shell {
  min-height: 100vh;
  align-items: stretch;
}

.main {
  width: min(100%, calc(var(--rh-content-max) + 48px));
  max-width: calc(var(--rh-content-max) + 48px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 24px 40px;
}

.main > .panel,
.main > .cards,
.main > .alert,
.main > .notice,
.main > form,
.main > .ticket-detail-grid,
.main > .ticket-kanban-board,
.main > .module-grid,
.main > .level-stat-grid,
.main > .analytics-summary-grid,
.main > .statistics-cards {
  animation: rh-rise .24s ease both;
}

@keyframes rh-rise {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 76px;
  margin: 0 -6px 18px;
  padding: 12px 6px;
  gap: 16px;
  background: linear-gradient(180deg, rgba(9, 9, 12, .98) 68%, rgba(9, 9, 12, .78) 88%, transparent);
  backdrop-filter: blur(14px);
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  color: var(--rh-text);
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.topbar p,
.panel-header p,
.muted {
  color: var(--rh-muted);
}

.topbar p {
  max-width: 880px;
  margin-top: 5px;
  font-size: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 5px !important;
  color: var(--rh-accent-bright) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--rh-accent);
  content: "";
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.server-badge {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-sm);
  padding: 8px 12px;
  background: linear-gradient(145deg, var(--rh-surface-2), #111117);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  color: var(--rh-text-soft);
  font-size: 12px;
  font-weight: 750;
}

/* User menu */
.user-menu {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 6px 7px 6px 8px;
  background: linear-gradient(145deg, var(--rh-surface-2), #121218);
  box-shadow: var(--rh-shadow-soft);
}

.user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #3b3b47;
  border-radius: 10px;
  object-fit: cover;
}

.user-avatar.fallback {
  display: grid;
  place-items: center;
  background: rgba(var(--rh-accent-rgb), .12);
  color: #fff;
  font-weight: 850;
}

.user-copy {
  min-width: 96px;
  display: grid;
  line-height: 1.12;
}

.user-copy strong {
  max-width: 180px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  margin-top: 3px;
  color: var(--rh-muted);
  font-size: 10px;
}

.logout-button {
  min-height: 32px;
  border: 1px solid #373744;
  border-radius: 8px;
  padding: 0 10px;
  background: #101016;
  color: var(--rh-text-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: .18s ease;
}

.logout-button:hover {
  border-color: rgba(var(--rh-accent-rgb), .55);
  background: rgba(var(--rh-accent-rgb), .12);
  color: #fff;
}

/* Sidebar */
.sidebar {
  position: sticky;
  z-index: 60;
  top: 0;
  width: var(--rh-sidebar-width);
  min-width: var(--rh-sidebar-width);
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--rh-border-soft);
  padding: 14px 12px 12px;
  background:
    linear-gradient(180deg, rgba(var(--rh-accent-rgb), .035), transparent 180px),
    var(--rh-sidebar);
  box-shadow: 14px 0 40px rgba(0, 0, 0, .14);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 13px;
}

.sidebar-brand {
  min-width: 0;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--rh-accent-rgb), .35);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(var(--rh-accent-rgb), .95), rgba(var(--rh-accent-rgb), .95));
  box-shadow: 0 8px 24px rgba(var(--rh-accent-rgb), .18), inset 0 1px rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -.08em;
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
}

.sidebar-brand-copy strong {
  color: #fff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .025em;
}

.sidebar-brand-copy strong span {
  color: var(--rh-accent);
}

.sidebar-brand-copy small {
  margin-top: 5px;
  color: var(--rh-muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sidebar-navigation {
  min-width: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 3px 3px 10px 0;
  overscroll-behavior: contain;
}

.sidebar-group {
  min-width: 0;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 11px;
  overflow: hidden;
}

.sidebar-group[open] {
  border-color: #23232d;
  background: rgba(255, 255, 255, .018);
}

.sidebar-group.group-active {
  border-color: rgba(var(--rh-accent-rgb), .15);
  background: linear-gradient(135deg, rgba(var(--rh-accent-rgb), .055), rgba(255, 255, 255, .012));
}

.sidebar-group-title {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  color: #b9b9c4;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: .18s ease;
}

.sidebar-group-title::-webkit-details-marker {
  display: none;
}

.sidebar-group-title:hover,
.sidebar-group.group-active > .sidebar-group-title {
  color: #fff;
  background: rgba(255, 255, 255, .035);
}

.sidebar-group-symbol {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #2a2a34;
  border-radius: 8px;
  background: #15151c;
  color: #a9a9b5;
  font-size: 13px;
}

.sidebar-group.group-active .sidebar-group-symbol {
  border-color: rgba(var(--rh-accent-rgb), .38);
  background: rgba(var(--rh-accent-rgb), .12);
  color: var(--rh-accent-bright);
}

.sidebar-group-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.22;
}

.sidebar-group-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .65;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.sidebar-group[open] .sidebar-group-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.sidebar-group-content {
  display: grid;
  gap: 2px;
  padding: 2px 6px 8px 43px;
}

.nav-link,
.nav-link-child {
  min-width: 0;
  display: flex;
  align-items: center;
  margin: 0;
  border-radius: 8px;
  padding: 8px 9px;
  color: #9f9fab;
  font-size: 11.5px;
  line-height: 1.28;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: .16s ease;
}

.nav-link::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: #41414d;
  content: "";
  transition: .16s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .04);
  color: #e5e5ea;
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(var(--rh-accent-rgb), .17), rgba(var(--rh-accent-rgb), .045));
  color: #fff;
  font-weight: 780;
}

.nav-link.active::before {
  background: var(--rh-accent);
  box-shadow: 0 0 0 3px rgba(var(--rh-accent-rgb), .13);
}

.nav-unread-badge,
.sidebar-group-badge {
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--rh-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  border: 1px solid #22222b;
  border-radius: 10px;
  padding: 9px 10px;
  background: #111117;
  color: var(--rh-muted);
}

.sidebar-footer-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--rh-green);
  box-shadow: 0 0 0 4px rgba(55, 215, 135, .1);
}

.sidebar-footer > span:last-child {
  display: grid;
}

.sidebar-footer strong {
  color: #cfcfd6;
  font-size: 10px;
}

.sidebar-footer small {
  margin-top: 1px;
  color: #666672;
  font-size: 9px;
}

.sidebar-close-button,
.sidebar-mobile-toggle,
.sidebar-backdrop {
  display: none;
}

/* Panels, cards and page density */
.panel,
.card,
.module-entry-card,
.module-card,
.template-card,
.category-card,
.routing-card,
.sla-setting-card,
.level-member-card,
.xp-event-card,
.season-card,
.profile-card,
.kanban-column,
.statistic-card,
.analytics-summary-card {
  border: 1px solid var(--rh-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 58%),
    var(--rh-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018), var(--rh-shadow-soft);
}

.panel {
  margin-bottom: 15px;
  border-radius: var(--rh-radius);
  padding: 17px 18px;
}

.panel + .panel {
  margin-top: 0;
}

.panel-header {
  min-height: 0;
  margin-bottom: 14px;
  gap: 14px;
  align-items: flex-start;
}

.panel-header h2,
.panel h2 {
  color: var(--rh-text);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.panel-header h3,
.panel h3 {
  color: var(--rh-text);
  font-size: 15px;
}

.panel-header p {
  max-width: 900px;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.panel-header + form,
.panel-header + .table-wrap,
.panel-header + .module-card-list,
.panel-header + .empty-state {
  margin-top: 0;
}

.cards,
.level-stat-grid,
.analytics-summary-grid,
.statistics-cards,
.rating-summary-grid {
  gap: 12px;
  margin-bottom: 15px;
}

.card,
.level-stat-card,
.analytics-summary-card,
.statistic-card {
  min-height: 94px;
  border-radius: var(--rh-radius);
  padding: 15px 16px;
}

.card-label,
.level-stat-card span,
.analytics-summary-card span,
.statistic-card span {
  color: var(--rh-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.card-value,
.level-stat-card strong,
.analytics-summary-card strong,
.statistic-card strong {
  margin-top: 5px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.module-card-list,
.template-grid,
.category-grid,
.season-card-grid,
.xp-event-card-grid,
.level-member-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 12px;
}

.module-entry-card,
.module-card,
.template-card,
.category-card,
.routing-card,
.season-card,
.xp-event-card,
.level-member-card {
  min-width: 0;
  border-radius: 12px;
  padding: 15px;
}

.module-entry-header,
.module-card-top,
.season-card-header,
.xp-event-card-header,
.level-member-card-header {
  gap: 12px;
  margin-bottom: 12px;
}

.module-entry-header h3,
.module-card h3,
.template-card h3,
.category-card h3 {
  margin-top: 5px;
  font-size: 15px;
}

.module-entry-header p,
.module-card p,
.template-card p,
.category-card p {
  margin-top: 3px;
  color: var(--rh-muted);
  font-size: 11.5px;
}

.module-entry-id,
.count-badge,
.status-pill,
.status-badge,
.ticket-tag,
.ticket-sla-badge {
  border: 1px solid #33333e;
  border-radius: 999px;
  padding: 4px 8px;
  background: #181820;
  color: #c7c7cf;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.status-pill,
.status-badge.success,
.status.online {
  border-color: rgba(55, 215, 135, .25);
  background: rgba(55, 215, 135, .09);
  color: #79eab0;
}

.status.offline,
.status-badge.error,
.status-badge.danger {
  border-color: rgba(var(--rh-accent-rgb), .25);
  background: rgba(var(--rh-accent-rgb), .09);
  color: var(--rh-accent-bright);
}

.module-meta-grid,
.season-card-stats,
.xp-event-card-stats,
.level-member-card-stats,
.ticket-info {
  gap: 8px;
}

.module-meta-grid > div,
.season-card-stats > div,
.xp-event-card-stats > div,
.level-member-card-stats > div,
.ticket-info > div {
  border: 1px solid var(--rh-border-soft);
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, .12);
}

.module-meta-grid span,
.season-card-stats span,
.xp-event-card-stats span,
.level-member-card-stats span {
  color: var(--rh-muted);
  font-size: 10px;
}

.module-meta-grid strong,
.season-card-stats strong,
.xp-event-card-stats strong,
.level-member-card-stats strong {
  margin-top: 2px;
  font-size: 12px;
}

.module-info-panel,
.notice {
  border-color: rgba(77, 141, 255, .2);
  background: linear-gradient(135deg, rgba(77, 141, 255, .07), rgba(255, 255, 255, .012));
}

.module-error,
.welcome-error,
.blocked-reason {
  margin-top: 10px;
  border: 1px solid rgba(var(--rh-accent-rgb), .22);
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(var(--rh-accent-rgb), .07);
  color: var(--rh-accent-bright);
  font-size: 11px;
}

/* Forms */
form {
  min-width: 0;
}

.settings-grid,
.welcome-settings-grid,
.module-settings-grid,
.level-settings-grid,
.command-settings-grid,
.reward-settings-grid,
.birthday-settings-grid,
.decay-settings-grid,
.prestige-settings-grid,
.sla-settings-grid,
.inactivity-time-grid,
.ticket-tag-create-grid,
.ticket-tag-edit-grid,
.routing-options-grid,
.override-grid,
.automatic-role-grid,
.xp-event-form-grid,
.achievement-create-grid,
.multiplier-create-grid,
.reward-create-form,
.season-create-grid,
.application-field-builder {
  gap: 12px;
}

.module-settings-grid-2,
.settings-grid,
.welcome-settings-grid,
.level-settings-grid,
.reward-settings-grid,
.birthday-settings-grid,
.decay-settings-grid,
.prestige-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.module-settings-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-settings-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.field,
.compact-field {
  min-width: 0;
  gap: 6px;
}

.field > span,
.compact-field > span,
.field label,
label > span:first-child {
  color: #cfcfd6;
  font-size: 11.5px;
  font-weight: 700;
}

.field small,
.field-help,
.compact-field small {
  color: var(--rh-muted-2);
  font-size: 10px;
  line-height: 1.35;
}

body.rankhouse-dashboard-v7 input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
body.rankhouse-dashboard-v7 select,
body.rankhouse-dashboard-v7 textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #30303b;
  border-radius: var(--rh-radius-sm);
  outline: none;
  background: var(--rh-input);
  color: var(--rh-text);
  font: inherit;
  font-size: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.rankhouse-dashboard-v7 input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
body.rankhouse-dashboard-v7 select {
  height: var(--rh-control-height);
  padding: 0 11px;
}

body.rankhouse-dashboard-v7 textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.48;
}

body.rankhouse-dashboard-v7 input::placeholder,
body.rankhouse-dashboard-v7 textarea::placeholder {
  color: #5d5d69;
}

body.rankhouse-dashboard-v7 input:hover,
body.rankhouse-dashboard-v7 select:hover,
body.rankhouse-dashboard-v7 textarea:hover {
  border-color: #3b3b47;
}

body.rankhouse-dashboard-v7 input:focus,
body.rankhouse-dashboard-v7 select:focus,
body.rankhouse-dashboard-v7 textarea:focus {
  border-color: rgba(var(--rh-accent-rgb), .72);
  background: #111118;
  box-shadow: 0 0 0 3px rgba(var(--rh-accent-rgb), .09);
}

body.rankhouse-dashboard-v7 input:disabled,
body.rankhouse-dashboard-v7 select:disabled,
body.rankhouse-dashboard-v7 textarea:disabled {
  opacity: .62;
  cursor: not-allowed;
}

body.rankhouse-dashboard-v7 select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #777783 50%),
    linear-gradient(135deg, #777783 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

body.rankhouse-dashboard-v7 input[type="color"] {
  width: 100%;
  height: var(--rh-control-height);
  border: 1px solid #30303b;
  border-radius: var(--rh-radius-sm);
  padding: 5px;
  background: var(--rh-input);
  cursor: pointer;
}

body.rankhouse-dashboard-v7 input[type="checkbox"],
body.rankhouse-dashboard-v7 input[type="radio"] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--rh-accent);
}

.input-with-unit,
.input-with-addon {
  min-width: 0;
  border-radius: var(--rh-radius-sm);
}

.input-with-unit > span,
.input-with-addon > span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #30303b;
  border-left: 0;
  border-radius: 0 var(--rh-radius-sm) var(--rh-radius-sm) 0;
  padding: 0 10px;
  background: #17171f;
  color: var(--rh-muted);
  font-size: 10px;
}

.input-with-unit input,
.input-with-addon input {
  border-radius: var(--rh-radius-sm) 0 0 var(--rh-radius-sm) !important;
}

.check-row,
.module-toggle,
.toggle-setting,
.role-checkbox,
.ticket-tag-option,
.internal-note-option {
  min-width: 0;
  min-height: var(--rh-control-height);
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--rh-border-soft);
  border-radius: var(--rh-radius-sm);
  padding: 9px 10px;
  background: rgba(0, 0, 0, .13);
  cursor: pointer;
}

.check-row:hover,
.module-toggle:hover,
.toggle-setting:hover,
.role-checkbox:hover,
.ticket-tag-option:hover {
  border-color: #373743;
  background: rgba(255, 255, 255, .02);
}

.check-row > span,
.module-toggle > span,
.toggle-setting > span {
  min-width: 0;
  display: grid;
}

.check-row strong,
.module-toggle strong,
.toggle-setting strong {
  font-size: 11.5px;
}

.check-row small,
.module-toggle small,
.toggle-setting small {
  margin-top: 2px;
  color: var(--rh-muted);
  font-size: 9.5px;
}

.form-actions,
.module-action-row,
.template-actions,
.category-card-actions,
.season-actions,
.xp-event-actions,
.achievement-actions,
.reward-row-actions,
.multiplier-actions,
.prestige-reward-actions,
.birthday-row-actions,
.ticket-actions,
.ticket-settings-actions,
.filter-actions,
.left-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

/* Buttons */
.button,
.button-submit,
.neutral-button,
.danger-button,
.button-secondary,
.module-button,
.ticket-create-button,
.quick-status-button,
.table-delete-button,
.small-button,
.discord-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 13px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.button:hover,
.module-button:hover,
.ticket-create-button:hover,
.quick-status-button:hover,
.discord-button:hover {
  transform: translateY(-1px);
}

.button:active,
.module-button:active,
.ticket-create-button:active,
.quick-status-button:active {
  transform: translateY(0);
}

.button-submit,
.button.primary,
.module-button,
.ticket-create-button {
  border-color: var(--rh-accent);
  background: linear-gradient(180deg, var(--rh-accent), var(--rh-accent));
  box-shadow: 0 7px 18px rgba(var(--rh-accent-rgb), .17), inset 0 1px rgba(255, 255, 255, .16);
}

.button-submit:hover,
.button.primary:hover,
.module-button:hover,
.ticket-create-button:hover {
  background: linear-gradient(180deg, var(--rh-accent-bright), var(--rh-accent));
  box-shadow: 0 10px 24px rgba(var(--rh-accent-rgb), .23);
}

.neutral-button,
.button-secondary,
.button.neutral,
.small-button {
  border-color: #343440;
  background: #1a1a22;
  color: #d8d8df;
}

.neutral-button:hover,
.button-secondary:hover,
.button.neutral:hover,
.small-button:hover {
  border-color: #484856;
  background: #22222c;
}

.danger-button,
.button.danger,
.table-delete-button {
  border-color: rgba(var(--rh-accent-rgb), .36);
  background: rgba(var(--rh-accent-rgb), .1);
  color: var(--rh-accent-bright);
}

.danger-button:hover,
.button.danger:hover,
.table-delete-button:hover {
  border-color: rgba(var(--rh-accent-rgb), .58);
  background: rgba(var(--rh-accent-rgb), .17);
  color: #fff;
}

.button[disabled],
button[disabled] {
  opacity: .42;
  cursor: not-allowed;
  transform: none !important;
}

.full-button {
  width: 100%;
}

/* Alerts */
.alert,
.notice {
  position: relative;
  margin-bottom: 14px;
  border: 1px solid #30303a;
  border-radius: 11px;
  padding: 11px 42px 11px 13px;
  background: #15151c;
  color: #d4d4db;
  font-size: 11.5px;
  box-shadow: var(--rh-shadow-soft);
}

.success-alert,
.alert.success,
.module-success {
  border-color: rgba(55, 215, 135, .23);
  background: rgba(55, 215, 135, .075);
  color: #91edbd;
}

.error-alert,
.alert.error,
.alert.danger {
  border-color: rgba(var(--rh-accent-rgb), .25);
  background: rgba(var(--rh-accent-rgb), .075);
  color: var(--rh-accent-bright);
}

.warning-alert,
.alert.warning {
  border-color: rgba(245, 185, 66, .26);
  background: rgba(245, 185, 66, .075);
  color: #f6ce7c;
}

.alert-close {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font-size: 19px;
  opacity: .65;
  transform: translateY(-50%);
}

.alert-close:hover {
  background: rgba(255, 255, 255, .06);
  opacity: 1;
}

/* Tables */
.table-wrap,
.permission-table-wrap,
.statistics-table-wrap,
.analytics-chart-scroll {
  overflow: auto;
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  background: rgba(0, 0, 0, .1);
  outline: none;
}

.table-wrap:focus,
.permission-table-wrap:focus,
.statistics-table-wrap:focus {
  border-color: #3b3b47;
}

body.rankhouse-dashboard-v7 table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}

body.rankhouse-dashboard-v7 th,
body.rankhouse-dashboard-v7 td {
  height: 42px;
  border-bottom: 1px solid var(--rh-border-soft);
  padding: 8px 11px;
  vertical-align: middle;
}

body.rankhouse-dashboard-v7 th {
  position: sticky;
  z-index: 3;
  top: 0;
  background: #17171e;
  color: #858591;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.rankhouse-dashboard-v7 tbody tr:last-child td {
  border-bottom: 0;
}

body.rankhouse-dashboard-v7 tbody tr {
  transition: background .14s ease;
}

body.rankhouse-dashboard-v7 tbody tr:hover {
  background: rgba(255, 255, 255, .018);
}

.empty-state,
.role-empty,
.kanban-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  border: 1px dashed #2d2d37;
  border-radius: 10px;
  padding: 18px;
  background: rgba(0, 0, 0, .09);
  color: var(--rh-muted);
  font-size: 11.5px;
  text-align: center;
}

td.empty-state {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Special dashboard modules */
.lfg-fixed-banner {
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 10px;
  background: #0d0d12;
}

.lfg-fixed-banner img {
  width: 100%;
  max-height: 230px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.welcome-segment-list,
.reward-list,
.multiplier-list,
.achievement-list,
.prestige-reward-list,
.birthday-list,
.season-reward-list,
.rating-list,
.statistics-list,
.rule-list {
  display: grid;
  gap: 10px;
}

.welcome-segment-card,
.reward-row,
.multiplier-row,
.achievement-row,
.prestige-reward-row,
.birthday-row,
.season-reward-row,
.rating-list-item,
.statistics-list-item,
.rule-item {
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 13px;
  background: rgba(0, 0, 0, .12);
}

.welcome-segment-header,
.statistics-list-heading,
.rating-list-heading,
.ticket-participants-heading,
.ticket-tags-heading {
  margin-bottom: 10px;
}

.welcome-position,
.reward-order,
.level-rank,
.achievement-icon,
.prestige-star,
.season-reward-medal,
.birthday-date-badge {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(var(--rh-accent-rgb), .24);
  border-radius: 9px;
  background: rgba(var(--rh-accent-rgb), .12);
  color: var(--rh-accent-bright);
  font-weight: 850;
}

.welcome-position {
  width: 27px;
  height: 27px;
}

.welcome-add-segment {
  gap: 8px;
  margin-bottom: 12px;
}

.welcome-add-segment select {
  flex: 1;
}

.welcome-image-preview img,
.panel-preview-card img,
.discord-panel-preview img {
  max-width: 100%;
  border-radius: 9px;
}

.ticket-detail-grid {
  gap: 14px;
}

.ticket-conversation,
.ticket-sidebar > section,
.ticket-opening-message,
.conversation-message,
.ticket-rating-card,
.ticket-danger-zone,
.danger-panel {
  border: 1px solid var(--rh-border);
  border-radius: 12px;
  background: var(--rh-surface);
}

.conversation-message,
.ticket-opening-message {
  padding: 12px;
}

.ticket-message-header,
.conversation-message-header {
  margin-bottom: 7px;
  color: var(--rh-muted);
  font-size: 10px;
}

.conversation-message-body,
.ticket-message {
  color: var(--rh-text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.ticket-toolbar,
.ticket-filters,
.ticket-bulk-toolbar,
.statistics-toolbar,
.kanban-toolbar,
.log-filters,
.level-history-filter,
.level-member-search,
.analytics-filter-panel {
  gap: 8px;
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 10px;
  background: rgba(0, 0, 0, .1);
}

.ticket-view-tabs,
.statistics-period-buttons,
.analytics-period-tabs {
  gap: 5px;
  border-radius: 9px;
  padding: 4px;
  background: #0e0e13;
}

.ticket-kanban-board {
  gap: 11px;
}

.kanban-column {
  min-width: 280px;
  border-radius: 12px;
  padding: 11px;
}

.kanban-card {
  border: 1px solid var(--rh-border-soft);
  border-radius: 9px;
  padding: 10px;
  background: #17171f;
}

.progress,
.level-progress,
.statistics-progress,
.rating-progress,
.level-progress-wrap {
  overflow: hidden;
  border-radius: 999px;
  background: #24242d;
}

.level-progress > *,
.statistics-progress > *,
.rating-progress > * {
  background: linear-gradient(90deg, var(--rh-accent-2), var(--rh-accent));
}

.analytics-bar-chart,
.daily-chart {
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 12px;
  background: rgba(0, 0, 0, .11);
}

.analytics-bar,
.daily-chart-bar {
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--rh-accent-bright), var(--rh-accent));
}

.profile-header,
.member-profile-progress,
.active-season-banner,
.reward-sync-panel,
.managed-event-role-panel,
.inactivity-flow-preview,
.panel-preview-card,
.discord-panel-preview {
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 12px;
  background: rgba(0, 0, 0, .11);
}

.profile-avatar {
  border: 2px solid rgba(var(--rh-accent-rgb), .38);
  border-radius: 16px;
}

.section-divider,
.module-divider {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: var(--rh-border-soft);
}

.section-heading {
  margin: 16px 0 9px;
  color: #efeff3;
  font-size: 14px;
}

.pagination {
  gap: 6px;
  margin-top: 12px;
}

.pagination a,
.pagination span {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  background: var(--rh-surface);
  color: var(--rh-text-soft);
  font-size: 10px;
  text-decoration: none;
}

/* Standalone pages */
.standalone,
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 5%, rgba(var(--rh-accent-rgb), .12), transparent 28rem),
    var(--rh-bg);
}

.narrow,
.login-card {
  border: 1px solid var(--rh-border);
  border-radius: 18px;
  padding: 26px;
  background: rgba(18, 18, 24, .96);
  box-shadow: var(--rh-shadow);
}

.login-logo {
  color: #fff;
  letter-spacing: .03em;
}

.login-logo span {
  color: var(--rh-accent);
}

.error-code {
  color: var(--rh-accent);
  font-size: 68px;
  letter-spacing: -.06em;
}

/* Compact helpers */
.compact {
  gap: 8px !important;
}

.span-2,
.module-field-wide {
  grid-column: span 2;
}

.module-settings-grid-3 > [style*="grid-column:span 3"] {
  grid-column: 1 / -1 !important;
}

small {
  color: var(--rh-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rh-border-soft);
}

/* Responsive */
@media (max-width: 1260px) {
  :root { --rh-sidebar-width: 258px; }

  .module-settings-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .main {
    width: 100%;
    max-width: none;
    padding: 72px 14px 30px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(310px, calc(100vw - 42px));
    min-width: 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, .66);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(3px);
    transition: opacity .2s ease;
  }

  .sidebar-mobile-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-mobile-toggle {
    position: fixed;
    z-index: 50;
    top: 15px;
    left: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--rh-border);
    border-radius: 11px;
    background: rgba(18, 18, 24, .94);
    box-shadow: var(--rh-shadow-soft);
    cursor: pointer;
    backdrop-filter: blur(12px);
  }

  .sidebar-mobile-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: #e5e5ea;
  }

  .sidebar-close-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #30303a;
    border-radius: 9px;
    background: #15151c;
    color: #bcbcc5;
    cursor: pointer;
    font-size: 20px;
  }

  .topbar {
    position: relative;
    min-height: 0;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .topbar-actions,
  .topbar > .user-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-actions .user-menu,
  .topbar > .user-menu {
    margin-left: 0;
  }

  .module-settings-grid-5,
  .module-settings-grid-4,
  .module-settings-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .panel {
    border-radius: 11px;
    padding: 14px;
  }

  .panel-header {
    flex-direction: column;
  }

  .settings-grid,
  .welcome-settings-grid,
  .module-settings-grid,
  .module-settings-grid-2,
  .module-settings-grid-3,
  .module-settings-grid-4,
  .module-settings-grid-5,
  .level-settings-grid,
  .reward-settings-grid,
  .birthday-settings-grid,
  .decay-settings-grid,
  .prestige-settings-grid,
  .command-settings-grid,
  .season-create-grid,
  .xp-event-form-grid,
  .achievement-create-grid,
  .multiplier-create-grid,
  .application-field-builder,
  .override-grid,
  .automatic-role-grid {
    grid-template-columns: 1fr !important;
  }

  .span-2,
  .module-field-wide,
  [style*="grid-column"] {
    grid-column: auto !important;
  }

  .module-card-list,
  .template-grid,
  .category-grid,
  .season-card-grid,
  .xp-event-card-grid,
  .level-member-card-grid {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .module-action-row,
  .template-actions,
  .category-card-actions,
  .season-actions,
  .xp-event-actions {
    justify-content: stretch;
  }

  .form-actions .button,
  .module-action-row .button,
  .module-action-row form,
  .module-action-row form .button,
  .template-actions .button,
  .category-card-actions .button {
    width: 100%;
  }

  .user-menu {
    width: 100%;
  }

  .user-copy {
    flex: 1;
  }

  .server-badge {
    width: 100%;
  }

  body.rankhouse-dashboard-v7 th,
  body.rankhouse-dashboard-v7 td {
    padding: 8px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Dashboard start page */
.dashboard-status-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-status-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-card-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--rh-accent-rgb), .23);
  border-radius: 11px;
  background: rgba(var(--rh-accent-rgb), .12);
  color: var(--rh-accent-bright);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-card-icon.is-green {
  border-color: rgba(55, 215, 135, .23);
  background: rgba(55, 215, 135, .08);
  color: var(--rh-green);
}

.dashboard-version-value {
  font-size: 20px;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-quick-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--rh-border-soft);
  border-radius: 11px;
  padding: 11px;
  background: rgba(0, 0, 0, .12);
  color: inherit;
  text-decoration: none;
  transition: .17s ease;
}

.dashboard-quick-link:hover {
  border-color: rgba(var(--rh-accent-rgb), .33);
  background: rgba(var(--rh-accent-rgb), .055);
  transform: translateY(-1px);
}

.dashboard-quick-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #1c1c24;
  color: var(--rh-accent-bright);
  font-weight: 850;
}

.dashboard-quick-link > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.dashboard-quick-link strong {
  font-size: 11.5px;
}

.dashboard-quick-link small {
  margin-top: 2px;
  color: var(--rh-muted);
  font-size: 9.5px;
}

.dashboard-quick-arrow {
  color: #6e6e79;
  font-size: 21px;
}

/* Module overview */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 12px;
}

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
}

.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #30303b;
  border-radius: 11px;
  background: #191921;
  font-size: 18px;
}

.module-category {
  margin: 2px 0 5px;
  color: var(--rh-accent-bright);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.module-card h2 {
  font-size: 16px;
}

.module-card > p {
  flex: 1;
  margin-top: 6px;
  color: var(--rh-muted);
  font-size: 11px;
  line-height: 1.5;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 10px;
  color: var(--rh-muted);
  font-size: 9px;
}

.development-badge {
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .04);
  color: #b8b8c0;
}

@media (max-width: 1180px) {
  .dashboard-status-cards,
  .dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dashboard-status-cards,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== 
   Sidebar navigation corrections — Dashboard v7.0.1
   Isolates the v7 navigation from legacy sidebar rules in app.css.
   ========================================================================== */
body.rankhouse-dashboard-v7 .sidebar-navigation {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 4px 3px 14px 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body.rankhouse-dashboard-v7 details.sidebar-group {
  display: block !important;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 4px 0;
  padding: 3px !important;
  overflow: visible !important;
  border: 1px solid transparent;
  border-radius: 12px;
}

body.rankhouse-dashboard-v7 details.sidebar-group[open] {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  border-color: #292934;
  background: rgba(255, 255, 255, .022);
}

body.rankhouse-dashboard-v7 details.sidebar-group.group-active {
  border-color: rgba(var(--rh-accent-rgb), .28);
  background: linear-gradient(135deg, rgba(var(--rh-accent-rgb), .075), rgba(255, 255, 255, .014));
}

body.rankhouse-dashboard-v7 details.sidebar-group > summary.sidebar-group-title {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  overflow: visible;
  color: #d0d0da;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.rankhouse-dashboard-v7 details.sidebar-group > summary.sidebar-group-title:hover,
body.rankhouse-dashboard-v7 details.sidebar-group[open] > summary.sidebar-group-title,
body.rankhouse-dashboard-v7 details.sidebar-group.group-active > summary.sidebar-group-title {
  color: #ffffff;
}

body.rankhouse-dashboard-v7 .sidebar-group-name {
  min-width: 0;
  overflow: visible;
  color: inherit;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  font-weight: 820;
}

body.rankhouse-dashboard-v7 .sidebar-group-symbol {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  color: #c4c4cf;
}

body.rankhouse-dashboard-v7 .sidebar-group.group-active .sidebar-group-symbol,
body.rankhouse-dashboard-v7 .sidebar-group[open] .sidebar-group-symbol {
  color: var(--rh-accent-bright);
}

body.rankhouse-dashboard-v7 .sidebar-group-chevron {
  margin-left: 2px;
}

body.rankhouse-dashboard-v7 details.sidebar-group[open] > .sidebar-group-content {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none !important;
  min-height: 0;
  display: grid !important;
  gap: 3px;
  padding: 4px 6px 8px 40px;
  overflow: visible !important;
  visibility: visible;
  opacity: 1;
  transform: none;
}

body.rankhouse-dashboard-v7 details.sidebar-group:not([open]) > .sidebar-group-content {
  display: none !important;
}

body.rankhouse-dashboard-v7 .sidebar-group-content .nav-link.nav-link-child {
  position: static;
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 9px 10px;
  overflow: visible;
  color: #c5c5cf;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

body.rankhouse-dashboard-v7 .sidebar-group-content .nav-link.nav-link-child::before {
  position: static;
  top: auto;
  left: auto;
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  margin: .48em 0 0;
  border-radius: 50%;
  background: #666674;
  box-shadow: none;
  transform: none;
}

body.rankhouse-dashboard-v7 .sidebar-group-content .nav-link.nav-link-child:hover {
  background: rgba(255, 255, 255, .055);
  color: #ffffff;
  transform: none;
}

body.rankhouse-dashboard-v7 .sidebar-group-content .nav-link.nav-link-child.active {
  background: linear-gradient(90deg, rgba(var(--rh-accent-rgb), .22), rgba(var(--rh-accent-rgb), .065));
  color: #ffffff;
  font-weight: 800;
}

body.rankhouse-dashboard-v7 .sidebar-group-content .nav-link.nav-link-child.active::before {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  margin-top: .38em;
  background: var(--rh-accent-bright);
  box-shadow: 0 0 0 3px rgba(var(--rh-accent-rgb), .14), 0 0 10px rgba(var(--rh-accent-rgb), .42);
}

body.rankhouse-dashboard-v7 .sidebar-footer strong {
  color: #e3e3e9;
}

body.rankhouse-dashboard-v7 .sidebar-footer small {
  color: #9999a6;
}


/* ========================================================================== 
   Module catalog & legal pages — Dashboard v7.2.0
   ========================================================================== */
.module-overview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.module-overview-summary > div {
  display: grid;
  gap: 2px;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-sm);
  padding: 12px 14px;
  background: var(--rh-surface);
}

.module-overview-summary strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.module-overview-summary span {
  color: var(--rh-muted);
  font-size: 10px;
}

.module-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: auto;
}

.module-card-actions .button {
  min-height: 38px;
  justify-content: center;
  padding-inline: 12px;
  font-size: 10px;
}

.module-settings-button {
  min-width: 96px;
}

.module-ready-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.module-ready-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 215, 135, .28);
  border-radius: 12px;
  background: rgba(55, 215, 135, .09);
  color: var(--rh-green);
  font-size: 20px;
  font-weight: 900;
}

.module-ready-panel h2,
.module-ready-panel p {
  margin: 0;
}

.module-ready-panel p {
  margin-top: 3px;
  color: var(--rh-muted);
}

.dashboard-legal-footer {
  position: relative;
  z-index: 20;
  margin-left: var(--rh-sidebar-width);
  border-top: 1px solid rgba(255, 255, 255, .055);
  background: rgba(9, 9, 12, .78);
  color: var(--rh-muted);
}

.dashboard-legal-footer-inner {
  width: min(100%, calc(var(--rh-content-max) + 48px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 15px 24px 18px;
  font-size: 11px;
}

.dashboard-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.dashboard-legal-footer a {
  color: #bdbdc7;
  text-decoration: none;
}

.dashboard-legal-footer a:hover {
  color: #fff;
}

.login-page + .dashboard-legal-footer,
.legal-page + .dashboard-legal-footer {
  margin-left: 0;
}

.legal-settings-panel {
  margin-top: 12px;
}

.legal-settings-grid .field-span-2 {
  grid-column: span 2;
}

.legal-preview-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.legal-preview-links a {
  color: var(--rh-accent-bright);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.legal-settings-warning {
  margin-bottom: 14px;
}

.legal-disclaimer,
.legal-note {
  border: 1px solid rgba(245, 185, 66, .2);
  border-radius: 10px;
  padding: 11px 13px;
  background: rgba(245, 185, 66, .06);
  color: #d9c38e;
  font-size: 11px;
  line-height: 1.55;
}

.settings-save-actions {
  margin-top: 12px;
}

.legal-page {
  width: min(calc(100% - 32px), 1060px);
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: 28px 0 42px;
}

.legal-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-lg);
  padding: 20px 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(var(--rh-accent-rgb), .14), transparent 22rem),
    var(--rh-surface);
  box-shadow: var(--rh-shadow-soft);
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.legal-brand > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--rh-accent-rgb), .45);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--rh-accent), var(--rh-accent-deep));
  font-size: 26px;
  font-weight: 950;
}

.legal-brand strong {
  display: none;
  letter-spacing: -.035em;
}

.legal-brand strong span {
  color: var(--rh-accent);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -.045em;
}

.legal-hero p:last-child {
  margin: 5px 0 0;
  color: var(--rh-muted);
}

.legal-document {
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-lg);
  padding: clamp(18px, 4vw, 38px);
  background: var(--rh-surface);
  box-shadow: var(--rh-shadow-soft);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.legal-meta span {
  border: 1px solid var(--rh-border);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--rh-surface-2);
  color: var(--rh-muted);
  font-size: 10px;
}

.legal-document section {
  padding: 20px 0;
  border-top: 1px solid var(--rh-border-soft);
}

.legal-document section:first-of-type {
  border-top: 0;
}

.legal-document h2 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 17px;
}

.legal-document p,
.legal-document li {
  color: var(--rh-text-soft);
  line-height: 1.72;
}

.legal-document p {
  margin: 0 0 9px;
}

.legal-document p:last-child {
  margin-bottom: 0;
}

.legal-document ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.legal-document code {
  border: 1px solid #30303a;
  border-radius: 5px;
  padding: 2px 5px;
  background: #0d0d12;
  color: var(--rh-accent-bright);
}

.legal-contact-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.legal-contact-list > div {
  display: grid;
  grid-template-columns: minmax(130px, .32fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--rh-border-soft);
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .015);
}

.legal-contact-list dt {
  color: var(--rh-muted);
  font-size: 11px;
  font-weight: 750;
}

.legal-contact-list dd {
  margin: 0;
  color: var(--rh-text-soft);
}

.legal-contact-list a,
.legal-document a {
  color: var(--rh-accent-bright);
}

.preserve-lines {
  white-space: pre-line;
}

@media (max-width: 980px) {
  .dashboard-legal-footer {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .module-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-card-actions,
  .module-ready-panel {
    grid-template-columns: 1fr;
  }

  .module-settings-button {
    min-width: 0;
  }

  .dashboard-legal-footer-inner,
  .legal-hero {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .dashboard-legal-footer-inner {
    flex-direction: column;
  }

  .dashboard-legal-footer nav {
    justify-content: flex-start;
  }

  .legal-settings-grid .field-span-2 {
    grid-column: auto;
  }

  .legal-contact-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 460px) {
  .module-overview-summary {
    grid-template-columns: 1fr;
  }
}


/* v7.2.0 module additions */
.module-grid-span-2 { grid-column: span 2; }
.module-grid-span-3 { grid-column: span 3; }
.module-nested-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.table-subline {
  display: block;
  margin-top: 3px;
  color: var(--text-muted, #9aa0ad);
  font-size: 0.76rem;
}
@media (max-width: 900px) {
  .module-grid-span-2,
  .module-grid-span-3 { grid-column: 1 / -1; }
}

/* v7.3.0 module additions */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}
.stats-grid > div {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  background: linear-gradient(145deg, rgba(255,255,255,.018), transparent 58%), var(--rh-surface);
  box-shadow: inset 0 1px rgba(255,255,255,.018), var(--rh-shadow-soft);
}
.stats-grid strong { color: #fff; font-size: 24px; line-height: 1; }
.stats-grid span { color: var(--rh-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.table-scroll { width: 100%; overflow-x: auto; }
.table-scroll table { min-width: 650px; }
.module-long-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--rh-text); }

/* v7.4.0 branding and start page */
.sidebar-brand-image{display:grid!important;gap:5px;padding:2px 0!important;min-width:0}.sidebar-brand-image img{display:block;width:100%;max-width:214px;height:auto;object-fit:contain}.sidebar-brand-image small{padding-left:49px;color:#9fa2ad;font-size:9px;font-weight:750;letter-spacing:.16em;text-transform:uppercase}.dashboard-brand-hero{display:grid;grid-template-columns:minmax(260px,420px) 1fr;align-items:center;gap:28px;margin-bottom:16px;padding:20px 24px;border:1px solid var(--rh-border);border-radius:var(--rh-radius-lg);background:radial-gradient(circle at 15% 50%,rgba(var(--rh-accent-rgb), .12),transparent 42%),linear-gradient(135deg,#101016,#0b0b10);box-shadow:var(--rh-shadow-soft);overflow:hidden}.dashboard-brand-hero img{width:100%;max-width:410px}.dashboard-brand-hero div{display:grid;gap:7px}.dashboard-brand-hero span{color:var(--rh-accent-bright);font-size:10px;font-weight:800;letter-spacing:.17em;text-transform:uppercase}.dashboard-brand-hero strong{color:#fff;font-size:23px}.dashboard-brand-hero p{margin:0;color:var(--rh-muted);line-height:1.55}.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}.dashboard-kpi-grid article{display:flex;align-items:center;gap:12px;min-width:0;padding:14px;border:1px solid var(--rh-border);border-radius:var(--rh-radius);background:var(--rh-surface);box-shadow:var(--rh-shadow-soft)}.kpi-icon{display:grid;place-items:center;flex:0 0 34px;height:34px;border:1px solid #34343e;border-radius:9px;background:#17171e;color:var(--rh-accent-bright)}.kpi-icon.is-online{color:#45d483}.dashboard-kpi-grid article div{display:grid;min-width:0}.dashboard-kpi-grid small{color:var(--rh-muted);font-size:10px;font-weight:750;text-transform:uppercase}.dashboard-kpi-grid strong{color:#fff;font-size:20px;line-height:1.25}.dashboard-kpi-grid em{overflow:hidden;color:#8f929e;font-size:10px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.dashboard-two-column{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:14px;margin-bottom:14px}.dashboard-task-list{display:grid;gap:8px}.dashboard-task-list a{display:flex;align-items:center;justify-content:space-between;padding:12px 13px;border:1px solid var(--rh-border-soft);border-radius:9px;background:rgba(255,255,255,.015);color:var(--rh-text);text-decoration:none}.dashboard-task-list a:hover{border-color:rgba(var(--rh-accent-rgb), .5)}.dashboard-task-list strong{display:grid;place-items:center;min-width:30px;height:26px;border-radius:8px;background:rgba(var(--rh-accent-rgb), .12);color:var(--rh-accent-bright)}.system-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}.system-health-grid div{display:grid;gap:4px;padding:11px;border:1px solid var(--rh-border-soft);border-radius:8px;background:rgba(255,255,255,.012)}.system-health-grid span{color:var(--rh-muted);font-size:9px;font-weight:800;text-transform:uppercase}.system-health-grid strong{overflow:hidden;color:#fff;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.compact-table table{font-size:12px}.activity-feed{display:grid}.activity-feed>div{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:start;padding:11px 0;border-bottom:1px solid var(--rh-border-soft)}.activity-feed>div:last-child{border-bottom:0}.activity-dot{width:7px;height:7px;margin-top:5px;border-radius:50%;background:var(--rh-accent);box-shadow:0 0 0 4px rgba(var(--rh-accent-rgb), .1)}.activity-feed strong{color:#fff;font-size:12px}.activity-feed p{margin:3px 0 0;color:var(--rh-muted);font-size:10px}.activity-feed time{color:#767985;font-size:9px;white-space:nowrap}
@media(max-width:1350px){.dashboard-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:950px){.dashboard-brand-hero,.dashboard-two-column{grid-template-columns:1fr}.dashboard-brand-hero img{max-width:360px}.system-health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-brand-hero{padding:16px}.dashboard-brand-hero strong{font-size:19px}.system-health-grid{grid-template-columns:1fr}.sidebar-brand-image img{max-width:195px}}

/* v7.8 module switches */
.module-switch-form { margin: 0; }
.switch-control { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch-control input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 42px; height: 23px; border: 1px solid #3a3a45; border-radius: 999px; background: #202028; box-shadow: inset 0 1px 2px rgba(0,0,0,.45); transition: .18s ease; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #8f8f99; box-shadow: 0 2px 5px rgba(0,0,0,.45); transition: .18s ease; }
.switch-control input:checked + .switch-track { border-color: rgba(var(--rh-accent-rgb), .72); background: rgba(var(--rh-accent-rgb), .3); }
.switch-control input:checked + .switch-track::after { left: 22px; background: var(--rh-accent-bright); }
.switch-control input:focus-visible + .switch-track { outline: 2px solid #fff; outline-offset: 3px; }
.switch-control input:disabled + .switch-track { opacity: .55; cursor: not-allowed; }
.switch-control-large .switch-track { width: 50px; height: 27px; }
.switch-control-large .switch-track::after { width: 19px; height: 19px; }
.switch-control-large input:checked + .switch-track::after { left: 27px; }
.button-disabled { opacity: .48; cursor: not-allowed; pointer-events: none; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:9px; margin:12px 0; }
.detail-grid > div { display:grid; gap:4px; padding:10px 12px; border:1px solid #2c2c35; border-radius:9px; background:#121218; }
.detail-grid strong { font-size:10px; color:#fff; }
.detail-grid span { color:var(--rh-muted); font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.inline-filter-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.inline-filter-form input, .inline-filter-form select { flex:1 1 240px; }
.compact-grid { margin-top:10px; }
td small { display:block; color:var(--rh-muted); margin-top:2px; }

/* Theme switcher ---------------------------------------------------------- */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 6px 8px;
  background: linear-gradient(145deg, var(--rh-surface-2), #121218);
  box-shadow: var(--rh-shadow-soft);
}

.theme-switcher-label {
  color: var(--rh-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.theme-switcher-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 0;
  background: linear-gradient(145deg, var(--swatch-color), rgba(var(--swatch-color-rgb), .45));
  box-shadow: inset 0 1px rgba(255, 255, 255, .25), 0 4px 14px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.theme-swatch:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255, 255, 255, .34);
}

.theme-swatch.is-active {
  border-color: rgba(var(--swatch-color-rgb), .92);
  box-shadow: 0 0 0 3px rgba(var(--swatch-color-rgb), .16), 0 6px 16px rgba(0, 0, 0, .3);
}

.theme-switcher-form button {
  appearance: none;
}

/* v8.3.0: account tools stay together on every legacy module page. */
.account-toolbar {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  margin-left: auto;
}

.topbar > .account-toolbar {
  align-self: center;
}

/* Inhaltstragende Trenner dürfen keine Höhe von nur einem Pixel erzwingen. */
.section-divider:not(:empty) {
  height: auto;
  margin: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--rh-border-soft);
  padding-top: 18px;
  background: transparent;
}
