:root {
  --app-bg: #e7eef6;
  --app-bg-strong: #d5e0ec;
  --app-surface: rgba(255, 255, 255, 0.92);
  --app-surface-solid: #ffffff;
  --app-surface-muted: #eef4fa;
  --app-border: rgba(42, 70, 107, 0.16);
  --app-border-strong: rgba(37, 69, 108, 0.26);
  --app-text: #203140;
  --app-muted: #62778d;
  --app-heading: #0c1725;
  --app-accent: #1177a2;
  --app-accent-soft: rgba(17, 119, 162, 0.16);
  --app-success: #11845a;
  --app-success-soft: rgba(17, 132, 90, 0.16);
  --app-warning: #bd7513;
  --app-warning-soft: rgba(189, 117, 19, 0.16);
  --app-danger: #bf3e46;
  --app-danger-soft: rgba(191, 62, 70, 0.16);
  --app-violet: #4d57c6;
  --app-violet-soft: rgba(77, 87, 198, 0.16);
  --app-dark: #0a1220;
  --app-dark-soft: rgba(10, 18, 32, 0.1);
  --app-shadow: 0 24px 56px rgba(16, 29, 47, 0.14);
  --app-shadow-soft: 0 14px 30px rgba(16, 29, 47, 0.1);
  --sidebar-width: 19.2rem;
  --topbar-height: 4.7rem;
  --bs-body-font-family: "IBM Plex Sans", sans-serif;
  --bs-body-font-size: 0.87rem;
  --bs-body-line-height: 1.45;
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-tertiary-bg: var(--app-surface-muted);
  --bs-border-color: var(--app-border);
  --bs-primary: var(--app-accent);
  --bs-link-color: var(--app-accent);
  --bs-link-hover-color: #104d63;
  --bs-border-radius: 0.9rem;
  --bs-border-radius-sm: 0.7rem;
  --bs-border-radius-lg: 1.1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
.app-sidebar-scroll,
.sidebar-flyout {
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 144, 184, 0.42) rgba(26, 48, 74, 0.04);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-sidebar-scroll::-webkit-scrollbar,
.sidebar-flyout::-webkit-scrollbar {
  width: 0.46rem;
  height: 0.46rem;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.app-sidebar-scroll::-webkit-scrollbar-track,
.sidebar-flyout::-webkit-scrollbar-track {
  margin: 0;
  border-radius: 999px;
  background: rgba(31, 58, 89, 0.05);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.app-sidebar-scroll::-webkit-scrollbar-thumb,
.sidebar-flyout::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(132, 182, 219, 0.56), rgba(110, 123, 212, 0.44)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.app-sidebar-scroll::-webkit-scrollbar-thumb:hover,
.sidebar-flyout::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(150, 197, 231, 0.66), rgba(120, 133, 220, 0.56)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)) border-box;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.app-sidebar-scroll::-webkit-scrollbar-corner,
.sidebar-flyout::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--app-text);
  background:
    radial-gradient(circle at top left, rgba(17, 119, 162, 0.24), transparent 24%),
    radial-gradient(circle at top right, rgba(77, 87, 198, 0.2), transparent 22%),
    radial-gradient(circle at bottom center, rgba(13, 155, 129, 0.12), transparent 30%),
    linear-gradient(180deg, #f3f7fb 0%, var(--app-bg) 44%, var(--app-bg-strong) 100%);
  letter-spacing: -0.01em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(17, 27, 36, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 36, 0.022) 1px, transparent 1px);
  background-size: 1.25rem 1.25rem;
  content: "";
  opacity: 0.38;
  pointer-events: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.small,
small {
  font-size: 0.75rem;
}

.display-6 {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.h4 {
  font-size: 1.15rem;
}

.h5 {
  font-size: 1rem;
}

.h6 {
  font-size: 0.88rem;
}

.text-mono {
  font-family: "IBM Plex Mono", monospace;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 1rem 0.12rem 0.2rem 1rem;
  background: rgba(11, 18, 25, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.86);
  overflow: visible;
  backdrop-filter: blur(16px);
  z-index: 1034;
}

.app-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
}

.sidebar-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  padding-right: 0.12rem;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, rgba(23, 107, 135, 1), rgba(68, 80, 168, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 30px rgba(23, 107, 135, 0.28);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy {
  flex: 1 1 auto;
}

.brand-title {
  margin: 0;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-section {
  margin-top: 1rem;
}

.sidebar-section-title {
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.72rem;
  margin-bottom: 0.24rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  color: rgba(255, 255, 255, 0.74);
  transition: 180ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(23, 107, 135, 0.2), rgba(68, 80, 168, 0.16));
  border-color: rgba(23, 107, 135, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.sidebar-link i {
  width: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.sidebar-link .link-copy {
  flex: 1 1 auto;
}

.sidebar-link .link-label {
  display: block;
  font-size: 0.79rem;
  font-weight: 500;
}

.sidebar-link .link-meta {
  display: block;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.67rem;
}

.sidebar-promo {
  margin-top: 1.1rem;
  padding: 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-promo .small-pill {
  margin-bottom: 0.6rem;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0.85rem 1.35rem;
  background: rgba(248, 250, 251, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(17, 27, 36, 0.06);
}

.topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-search {
  position: relative;
  width: min(22rem, 42vw);
}

.topbar-search i {
  position: absolute;
  top: 50%;
  left: 0.78rem;
  transform: translateY(-50%);
  color: var(--app-muted);
}

.topbar-search input {
  padding-left: 2.15rem;
}

.sidebar-toggle {
  display: none;
}

.page-content {
  padding: 1.1rem 1.35rem 1.35rem;
}

.page-header {
  margin-bottom: 1rem;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  color: var(--app-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--app-heading);
  font-size: 1.18rem;
  font-weight: 600;
}

.page-subtitle {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.breadcrumb-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-shell .breadcrumb {
  margin: 0;
  font-size: 0.72rem;
}

.card-surface,
.panel-card,
.metric-card,
.calendar-day,
.kanban-card,
.chat-panel,
.auth-card {
  border: 1px solid rgba(17, 27, 36, 0.06);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
  box-shadow: var(--app-shadow-soft);
}

.panel-card {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0;
}

.panel-title {
  margin: 0;
  color: var(--app-heading);
  font-size: 0.88rem;
  font-weight: 600;
}

.panel-subtitle {
  margin: 0.2rem 0 0;
  color: var(--app-muted);
  font-size: 0.74rem;
}

.panel-body {
  padding: 1rem;
}

.metric-card {
  padding: 0.9rem 0.95rem;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover,
.metric-card:focus-within,
.panel-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--app-shadow);
}

.metric-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-size: 0.95rem;
}

.metric-label {
  margin-top: 0.8rem;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.metric-value {
  margin-top: 0.32rem;
  color: var(--app-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
}

.metric-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
}

.status-chip,
.small-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.small-pill {
  background: var(--app-dark-soft);
  color: var(--app-heading);
}

.status-primary {
  background: var(--app-accent-soft);
  color: var(--app-accent);
}

.status-success {
  background: var(--app-success-soft);
  color: var(--app-success);
}

.status-warning {
  background: var(--app-warning-soft);
  color: var(--app-warning);
}

.status-danger {
  background: var(--app-danger-soft);
  color: var(--app-danger);
}

.status-violet {
  background: var(--app-violet-soft);
  color: var(--app-violet);
}

.kpi-bar {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(17, 27, 36, 0.06);
  overflow: hidden;
}

.kpi-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-accent), #4f8ba2);
  transition: width 600ms ease;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(17, 27, 36, 0.02);
  --bs-table-hover-bg: rgba(23, 107, 135, 0.05);
  margin-bottom: 0;
  font-size: 0.78rem;
}

.table thead th {
  color: var(--app-muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom-color: rgba(17, 27, 36, 0.08);
}

.table td,
.table th {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  vertical-align: middle;
}

.table tfoot td {
  color: var(--app-muted);
}

.table-nowrap td,
.table-nowrap th {
  white-space: nowrap;
}

.card-label {
  color: var(--app-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar,
.avatar-stack > span {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.avatar-sm {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.7rem;
  font-size: 0.68rem;
}

.avatar-lg {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  font-size: 1rem;
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack > span {
  margin-left: -0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.avatar-stack > span:first-child {
  margin-left: 0;
}

.tone-teal {
  background: linear-gradient(135deg, #176b87, #4b8ca0);
}

.tone-violet {
  background: linear-gradient(135deg, #4450a8, #7d86d6);
}

.tone-slate {
  background: linear-gradient(135deg, #425466, #687888);
}

.tone-green {
  background: linear-gradient(135deg, #1e7a46, #4faa77);
}

.tone-amber {
  background: linear-gradient(135deg, #ae6b11, #e3a049);
}

.list-tight > li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(17, 27, 36, 0.06);
}

.list-tight > li:last-child {
  border-bottom: 0;
}

.timeline {
  position: relative;
  padding-left: 1.1rem;
}

.timeline::before {
  position: absolute;
  top: 0.15rem;
  left: 0.28rem;
  bottom: 0.15rem;
  width: 1px;
  background: rgba(17, 27, 36, 0.1);
  content: "";
}

.timeline-item {
  position: relative;
  margin-bottom: 0.9rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0.22rem;
  left: -1.1rem;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--app-accent);
  box-shadow: 0 0 0 0.2rem rgba(23, 107, 135, 0.12);
}

.timeline-title {
  margin: 0;
  font-size: 0.79rem;
  font-weight: 600;
}

.timeline-copy {
  margin: 0.2rem 0 0;
  color: var(--app-muted);
  font-size: 0.74rem;
}

.kanban-column {
  min-height: 100%;
}

.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.kanban-card {
  padding: 0.9rem;
  margin-bottom: 0.8rem;
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
}

.calendar-day {
  min-height: 8.7rem;
  padding: 0.8rem;
}

.calendar-day.is-muted {
  opacity: 0.55;
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.event-pill {
  display: block;
  padding: 0.38rem 0.52rem;
  margin-bottom: 0.42rem;
  border-radius: 0.7rem;
  background: var(--app-surface-muted);
  color: var(--app-text);
  font-size: 0.72rem;
}

.event-pill.primary {
  background: var(--app-accent-soft);
  color: var(--app-accent);
}

.event-pill.success {
  background: var(--app-success-soft);
  color: var(--app-success);
}

.event-pill.warning {
  background: var(--app-warning-soft);
  color: var(--app-warning);
}

.chat-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1rem;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.95rem;
  color: inherit;
  transition: 180ms ease;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: var(--app-surface-muted);
}

.chat-panel {
  overflow: hidden;
}

.message-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.message-row.outbound {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 28rem;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: var(--app-surface-muted);
  font-size: 0.78rem;
}

.message-row.outbound .message-bubble {
  background: linear-gradient(135deg, rgba(23, 107, 135, 0.16), rgba(68, 80, 168, 0.12));
}

.form-control,
.form-select {
  min-height: calc(1.5em + 0.82rem + 2px);
  padding: 0.42rem 0.75rem;
  border-color: rgba(17, 27, 36, 0.12);
  border-radius: 0.8rem;
  background-color: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  font-size: 0.79rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(23, 107, 135, 0.45);
  box-shadow: 0 0 0 0.24rem rgba(23, 107, 135, 0.12);
}

.form-label {
  margin-bottom: 0.4rem;
  color: var(--app-heading);
  font-size: 0.75rem;
  font-weight: 600;
}

.form-check-label {
  font-size: 0.76rem;
}

.form-check-input,
.form-range {
  cursor: pointer;
}

.form-hint {
  margin-top: 0.35rem;
  color: var(--app-muted);
  font-size: 0.7rem;
}

.input-group-text {
  border-radius: 0.8rem;
  background: var(--app-surface-muted);
  border-color: rgba(17, 27, 36, 0.08);
  color: var(--app-muted);
  font-size: 0.76rem;
}

.dropzone-lite {
  padding: 1rem;
  border: 1px dashed rgba(17, 27, 36, 0.14);
  border-radius: 1rem;
  background: rgba(17, 27, 36, 0.015);
}

.code-shell {
  margin-bottom: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(53, 86, 125, 0.14);
  border-radius: 1rem;
  background:
    radial-gradient(circle at top right, rgba(88, 160, 232, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(25, 40, 62, 0.98), rgba(31, 49, 76, 0.96));
  color: #edf5ff;
  box-shadow: 0 18px 34px rgba(15, 29, 48, 0.14);
}

.code-shell:last-child {
  margin-bottom: 0;
}

.code-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid rgba(126, 170, 220, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.code-block-label {
  color: rgba(218, 233, 250, 0.62);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.code-shell pre {
  margin: 0;
  padding: 0.9rem;
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.65;
}

.code-shell code {
  color: inherit;
}

pre.editor-preview-pane {
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.65;
}

[data-media-frame] {
  transition: aspect-ratio 180ms ease;
}

[data-media-preview] {
  transition: filter 180ms ease, transform 180ms ease;
}

.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3rem + 2px);
  padding: 1rem 0.75rem 0.4rem;
}

.form-floating > label {
  padding: 0.82rem 0.75rem;
  color: var(--app-muted);
  font-size: 0.74rem;
}

.btn {
  border-radius: 0.8rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.82rem;
}

.btn-sm {
  border-radius: 0.7rem;
  font-size: 0.72rem;
}

.btn-primary {
  background: linear-gradient(135deg, #176b87, #2e819d);
  border-color: #176b87;
  box-shadow: 0 12px 24px rgba(23, 107, 135, 0.18);
}

.btn-outline-secondary,
.btn-light {
  color: var(--app-heading);
  border-color: rgba(17, 27, 36, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.btn-outline-secondary:hover,
.btn-light:hover {
  color: var(--app-heading);
  border-color: rgba(17, 27, 36, 0.14);
  background: #ffffff;
}

.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.82rem;
}

.accordion {
  --bs-accordion-btn-padding-x: 0.95rem;
  --bs-accordion-btn-padding-y: 0.82rem;
  --bs-accordion-body-padding-x: 0.95rem;
  --bs-accordion-body-padding-y: 0.9rem;
  --bs-accordion-border-color: rgba(17, 27, 36, 0.08);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.24rem rgba(23, 107, 135, 0.12);
  --bs-accordion-active-bg: rgba(23, 107, 135, 0.04);
  --bs-accordion-active-color: var(--app-heading);
}

.accordion-button {
  font-size: 0.79rem;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  box-shadow: none;
}

.alert {
  border: 0;
  border-radius: 0.95rem;
  padding: 0.78rem 0.95rem;
  font-size: 0.76rem;
  box-shadow: var(--app-shadow-soft);
}

.alert-primary {
  background: linear-gradient(135deg, rgba(23, 107, 135, 0.16), rgba(68, 80, 168, 0.12));
  color: #104d63;
}

.alert-success {
  background: rgba(30, 122, 70, 0.14);
  color: #14522f;
}

.alert-warning {
  background: rgba(174, 107, 17, 0.14);
  color: #75470b;
}

.alert-danger {
  background: rgba(176, 58, 58, 0.12);
  color: #7f2626;
}

.notification-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(17, 27, 36, 0.06);
}

.notification-item:last-child {
  border-bottom: 0;
}

.offcanvas {
  --bs-offcanvas-width: 24rem;
  border-left: 1px solid rgba(17, 27, 36, 0.08);
  background: rgba(249, 251, 252, 0.98);
  backdrop-filter: blur(14px);
}

.dropdown-menu {
  border: 1px solid rgba(17, 27, 36, 0.08);
  box-shadow: var(--app-shadow);
  border-radius: 1rem;
  padding: 0.45rem;
}

.dropdown-item {
  border-radius: 0.72rem;
  font-size: 0.76rem;
  padding: 0.5rem 0.72rem;
}

.progress {
  height: 0.46rem;
  border-radius: 999px;
  background: rgba(17, 27, 36, 0.08);
}

.progress-bar {
  background: linear-gradient(90deg, #176b87, #4b8ca0);
}

.quote-card {
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(17, 27, 36, 0.96), rgba(39, 52, 67, 0.92));
  color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--app-shadow);
}

.pricing-card {
  position: relative;
  overflow: hidden;
}

.pricing-card.featured::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 107, 135, 0.2);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1rem;
}

.feature-list {
  display: grid;
  gap: 0.6rem;
}

.feature-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.feature-item i {
  color: var(--app-accent);
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 4rem;
}

.mini-chart span {
  flex: 1 1 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(23, 107, 135, 0.92), rgba(23, 107, 135, 0.28));
  min-height: 0.9rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.carousel-item {
  padding: 0.2rem;
}

.carousel-panel {
  min-height: 16rem;
  padding: 1.2rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(15, 23, 32, 0.96), rgba(47, 66, 82, 0.88));
  color: rgba(255, 255, 255, 0.92);
  box-shadow: var(--app-shadow);
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.4rem;
}

.auth-layout {
  width: min(70rem, 100%);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  overflow: hidden;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 27, 36, 0.08);
  box-shadow: 0 28px 60px rgba(17, 27, 36, 0.12);
}

.auth-aside {
  padding: 2rem;
  background: linear-gradient(160deg, rgba(15, 23, 32, 0.98), rgba(29, 44, 58, 0.94));
  color: rgba(255, 255, 255, 0.88);
}

.auth-main {
  padding: 2rem;
}

.auth-card {
  padding: 1.35rem;
}

.auth-bullets {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.auth-bullet {
  display: flex;
  gap: 0.8rem;
}

.auth-bullet i {
  color: #9ad1df;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.auth-links a {
  padding: 0.36rem 0.62rem;
  border-radius: 999px;
  background: rgba(17, 27, 36, 0.05);
  color: var(--app-muted);
  font-size: 0.72rem;
}

.step-track {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.step-pill {
  flex: 1 1 0;
  padding: 0.65rem 0.78rem;
  border-radius: 0.85rem;
  background: var(--app-surface-muted);
  color: var(--app-muted);
  font-size: 0.72rem;
}

.step-pill.active {
  background: linear-gradient(135deg, rgba(23, 107, 135, 0.16), rgba(68, 80, 168, 0.12));
  color: var(--app-heading);
}

.data-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.grid-count {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.reveal {
  opacity: 0;
  transform: translateY(0.5rem);
  animation: reveal-up 520ms cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.subtle-divider {
  border-top: 1px solid rgba(17, 27, 36, 0.07);
}

.footer-note {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.dense-list {
  display: grid;
  gap: 0.6rem;
}

.dense-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.compact-badge {
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  background: rgba(17, 27, 36, 0.06);
  color: var(--app-muted);
  font-size: 0.67rem;
  font-weight: 600;
}

.bg-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 1rem 1rem;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-state i {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.toast-container {
  z-index: 1090;
}

.toast {
  border: 1px solid rgba(17, 27, 36, 0.08);
  border-radius: 1rem;
  box-shadow: var(--app-shadow);
}

body::after {
  position: fixed;
  inset: auto auto -10rem -6rem;
  width: 24rem;
  height: 24rem;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 87, 198, 0.18), transparent 68%);
  filter: blur(26px);
  content: "";
  pointer-events: none;
}

.app-sidebar {
  background:
    radial-gradient(circle at top left, rgba(88, 160, 232, 0.24), transparent 24%),
    radial-gradient(circle at bottom right, rgba(112, 94, 232, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(21, 34, 56, 0.96), rgba(28, 45, 72, 0.95) 58%, rgba(24, 39, 64, 0.97) 100%);
  border-right-color: rgba(194, 219, 244, 0.08);
  box-shadow: 18px 0 36px rgba(16, 31, 53, 0.18);
}

.sidebar-flyout-layer {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: calc(100% - 0.34rem);
  width: 0;
  pointer-events: none;
  z-index: 1100;
}

.sidebar-flyout {
  position: absolute;
  left: 0;
  width: 16.4rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid rgba(150, 210, 243, 0.18);
  border-radius: 1.05rem;
  background:
    radial-gradient(circle at top left, rgba(88, 160, 232, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(112, 94, 232, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(27, 42, 66, 0.985), rgba(35, 55, 86, 0.96));
  box-shadow: 0 24px 38px rgba(10, 21, 39, 0.22);
  opacity: 0;
  transform: translate3d(-0.3rem, 0, 0);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}

.sidebar-flyout.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.sidebar-flyout-header {
  padding: 0.45rem 0.55rem 0.6rem;
}

.sidebar-flyout-title {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.sidebar-flyout-meta {
  margin-top: 0.18rem;
  color: rgba(227, 239, 255, 0.58);
  font-size: 0.68rem;
}

.sidebar-flyout-links {
  display: grid;
  gap: 0.24rem;
}

.sidebar-section {
  margin-top: 1.15rem;
}

.sidebar-section-title {
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.69rem;
}

.sidebar-nav-group {
  margin-bottom: 0.55rem;
  padding: 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 20px rgba(13, 24, 42, 0.08);
  transition: 220ms ease;
}

.sidebar-nav-group.is-active,
.sidebar-nav-group:hover {
  border-color: rgba(126, 190, 233, 0.28);
  background: linear-gradient(180deg, rgba(56, 140, 209, 0.17), rgba(112, 98, 228, 0.1));
}

.sidebar-nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.56rem 0.68rem;
  border: 0;
  border-radius: 0.8rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  position: relative;
}

.sidebar-nav-icon {
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(72, 168, 235, 0.32), rgba(120, 106, 240, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 18px rgba(14, 29, 48, 0.1);
}

.sidebar-nav-title {
  display: block;
  font-size: 0.79rem;
  font-weight: 600;
}

.sidebar-nav-meta {
  display: block;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.67rem;
}

.sidebar-nav-chevron {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
  transition: transform 200ms ease;
}

.sidebar-nav-group.is-open .sidebar-nav-chevron {
  transform: rotate(180deg);
}

.sidebar-submenu {
  display: grid;
  gap: 0.22rem;
  padding: 0.15rem 0.1rem 0.05rem;
}

.sidebar-nav-group:not(.is-open) .sidebar-submenu {
  display: none;
}

.sidebar-link {
  position: relative;
  padding: 0.68rem 0.78rem 0.68rem 0.76rem;
  margin-bottom: 0;
  border-radius: 0.86rem;
}

.sidebar-link::before {
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.38rem;
  width: 0.16rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(108, 199, 237, 0.8), rgba(109, 96, 238, 0.2));
  content: "";
  opacity: 0;
  transform: scaleY(0.7);
  transition: 200ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(67, 157, 226, 0.28), rgba(119, 106, 239, 0.22));
  border-color: rgba(150, 210, 243, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 24px rgba(10, 21, 39, 0.18);
}

.sidebar-link.active::before,
.sidebar-link:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar-link .link-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.sidebar-link .link-meta {
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-promo {
  margin-top: 1.3rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top right, rgba(104, 180, 236, 0.26), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 30px rgba(12, 24, 43, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.app-topbar {
  padding: 0.95rem 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(92, 177, 228, 0.16), transparent 18%),
    radial-gradient(circle at top right, rgba(121, 121, 243, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 251, 0.88));
  border-bottom: 1px solid rgba(46, 82, 122, 0.12);
  box-shadow: 0 14px 28px rgba(19, 37, 60, 0.07);
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.16), rgba(77, 87, 198, 0.12));
  border: 1px solid rgba(17, 119, 162, 0.16);
  color: var(--app-heading);
  font-size: 0.72rem;
  font-weight: 700;
}

.topbar-route {
  min-width: 0;
}

.topbar-search input {
  min-height: 2.6rem;
  border-color: rgba(43, 77, 114, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 251, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 18px rgba(25, 47, 74, 0.06);
}

.page-content {
  padding: 1.35rem 1.5rem 1.6rem;
}

.page-header {
  margin-bottom: 1.4rem;
}

.page-hero {
  position: relative;
  padding: 1.35rem 1.45rem;
  overflow: hidden;
  border: 1px solid rgba(52, 90, 137, 0.15);
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at top left, rgba(114, 187, 228, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(100, 87, 221, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 252, 0.92) 55%, rgba(229, 237, 247, 0.9));
  box-shadow: 0 28px 52px rgba(16, 35, 58, 0.14);
  isolation: isolate;
}

.page-hero::before {
  position: absolute;
  inset: auto -3rem -5rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 99, 226, 0.22), transparent 70%);
  filter: blur(8px);
  content: "";
  animation: hero-float 10s ease-in-out infinite;
}

.page-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.18) 42%, transparent 64%);
  content: "";
  transform: translateX(-120%);
  animation: sheen-pass 8s ease-in-out infinite;
  pointer-events: none;
}

.page-eyebrow.page-eyebrow-hero {
  margin-bottom: 0.8rem;
  color: #30506e;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.page-icon-badge {
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #1388bb, #6270e7);
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 20px 34px rgba(19, 136, 187, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.page-title {
  font-size: 1.46rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin-top: 0.45rem;
  max-width: 52rem;
  color: #587089;
  font-size: 0.88rem;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.78rem;
  border: 1px solid rgba(46, 89, 135, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--app-heading);
  font-size: 0.73rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(18, 36, 58, 0.06);
  backdrop-filter: blur(10px);
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}

.page-hero-side {
  position: relative;
}

.hero-stat-card {
  padding: 0.78rem 0.82rem;
  border: 1px solid rgba(46, 89, 135, 0.12);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(240, 247, 252, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 22px rgba(17, 36, 59, 0.08);
}

.hero-stat-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--app-muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-stat-card strong {
  display: block;
  color: var(--app-heading);
  font-size: 0.86rem;
}

.page-actions-hero {
  justify-content: flex-start;
}

.card-surface,
.panel-card,
.metric-card,
.calendar-day,
.kanban-card,
.chat-panel,
.auth-card {
  position: relative;
  border: 1px solid rgba(41, 76, 118, 0.12);
  background:
    radial-gradient(circle at top right, rgba(92, 170, 214, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.92));
  box-shadow: 0 18px 40px rgba(17, 35, 58, 0.1);
  isolation: isolate;
}

.card-surface::before,
.panel-card::before,
.metric-card::before,
.calendar-day::before,
.kanban-card::before,
.chat-panel::before,
.auth-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 0.18rem;
  background: linear-gradient(90deg, rgba(19, 136, 187, 0.9), rgba(98, 112, 231, 0.9), rgba(13, 160, 136, 0.72));
  content: "";
  opacity: 0.94;
}

.panel-card:hover,
.metric-card:hover,
.metric-card:focus-within,
.calendar-day:hover,
.kanban-card:hover,
.chat-panel:hover {
  transform: translateY(-0.18rem);
  box-shadow: 0 24px 46px rgba(16, 32, 54, 0.14);
}

.panel-header {
  padding: 1.08rem 1.1rem 0;
}

.panel-title {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  font-size: 0.77rem;
}

.panel-body {
  padding: 1.1rem;
}

.metric-card {
  padding: 1.02rem 1.08rem;
}

.metric-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.92rem;
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.18), rgba(77, 87, 198, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.metric-label {
  margin-top: 0.92rem;
  color: #58708a;
  font-size: 0.74rem;
}

.metric-value {
  font-size: 1.38rem;
}

.status-chip,
.small-pill,
.compact-badge {
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.small-pill {
  background: linear-gradient(135deg, rgba(19, 33, 53, 0.08), rgba(19, 119, 162, 0.09));
  border-color: rgba(46, 89, 135, 0.1);
}

.sidebar-promo .small-pill,
.auth-aside .small-pill,
.quote-card .small-pill {
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, rgba(109, 184, 231, 0.22), rgba(102, 88, 228, 0.18));
  border-color: rgba(255, 255, 255, 0.12);
}

.status-primary {
  background: linear-gradient(135deg, rgba(19, 136, 187, 0.2), rgba(98, 112, 231, 0.14));
  border-color: rgba(19, 136, 187, 0.16);
}

.status-success {
  background: linear-gradient(135deg, rgba(17, 132, 90, 0.2), rgba(31, 189, 130, 0.14));
  border-color: rgba(17, 132, 90, 0.16);
}

.status-warning {
  background: linear-gradient(135deg, rgba(189, 117, 19, 0.2), rgba(242, 166, 74, 0.14));
  border-color: rgba(189, 117, 19, 0.16);
}

.status-danger {
  background: linear-gradient(135deg, rgba(191, 62, 70, 0.2), rgba(234, 115, 124, 0.14));
  border-color: rgba(191, 62, 70, 0.16);
}

.status-violet {
  background: linear-gradient(135deg, rgba(77, 87, 198, 0.2), rgba(132, 119, 241, 0.14));
  border-color: rgba(77, 87, 198, 0.16);
}

.kpi-bar {
  height: 0.48rem;
  background: rgba(29, 58, 91, 0.08);
}

.kpi-bar > span,
.progress-bar {
  background: linear-gradient(90deg, #1180b1, #5f6be0 58%, #0da088);
}

.table {
  font-size: 0.8rem;
}

.table thead th {
  color: #55708d;
  background: rgba(17, 119, 162, 0.035);
}

.table td,
.table th {
  padding-top: 0.88rem;
  padding-bottom: 0.88rem;
  border-bottom-color: rgba(38, 72, 112, 0.08);
}

.calendar-day {
  min-height: 9.2rem;
}

.message-bubble {
  padding: 0.92rem 1rem;
  background: linear-gradient(180deg, rgba(246, 250, 253, 0.98), rgba(233, 242, 249, 0.92));
  box-shadow: 0 10px 24px rgba(18, 35, 58, 0.08);
}

.message-row.outbound .message-bubble {
  background: linear-gradient(135deg, rgba(20, 136, 187, 0.18), rgba(98, 112, 231, 0.14));
}

.form-control,
.form-select {
  min-height: calc(1.5em + 1rem + 2px);
  padding: 0.52rem 0.82rem;
  border-color: rgba(43, 77, 114, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 253, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px rgba(21, 40, 63, 0.04);
  font-size: 0.81rem;
  transition: 180ms ease;
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(43, 77, 114, 0.2);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(17, 119, 162, 0.42);
  box-shadow: 0 0 0 0.26rem rgba(17, 119, 162, 0.12), 0 16px 28px rgba(21, 42, 67, 0.09);
}

.form-label {
  margin-bottom: 0.46rem;
  font-size: 0.77rem;
}

.input-group-text {
  background: linear-gradient(180deg, rgba(242, 247, 252, 0.98), rgba(231, 239, 247, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dropzone-lite {
  background:
    radial-gradient(circle at top right, rgba(17, 119, 162, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(247, 251, 254, 0.96), rgba(237, 244, 250, 0.9));
  border-color: rgba(43, 77, 114, 0.16);
}

.btn {
  padding: 0.56rem 0.92rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: linear-gradient(135deg, #1180b1, #5f6be0);
  border-color: rgba(17, 119, 162, 0.3);
  box-shadow: 0 16px 28px rgba(49, 82, 181, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #0d88be, #6b79ee);
  box-shadow: 0 20px 34px rgba(49, 82, 181, 0.26);
}

.btn-outline-secondary,
.btn-light {
  border-color: rgba(38, 72, 112, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 252, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 18px rgba(21, 40, 63, 0.05);
}

.btn-outline-secondary:hover,
.btn-light:hover {
  border-color: rgba(38, 72, 112, 0.2);
  background: linear-gradient(180deg, #ffffff, rgba(243, 249, 253, 0.96));
}

.alert {
  border: 1px solid rgba(40, 74, 114, 0.08);
  padding: 0.9rem 1rem;
}

.alert-primary {
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.18), rgba(77, 87, 198, 0.13));
}

.alert-success {
  background: linear-gradient(135deg, rgba(17, 132, 90, 0.18), rgba(31, 189, 130, 0.12));
}

.alert-warning {
  background: linear-gradient(135deg, rgba(189, 117, 19, 0.2), rgba(242, 166, 74, 0.12));
}

.alert-danger {
  background: linear-gradient(135deg, rgba(191, 62, 70, 0.18), rgba(234, 115, 124, 0.12));
}

.offcanvas {
  border-left: 1px solid rgba(39, 74, 115, 0.12);
  background:
    radial-gradient(circle at top right, rgba(17, 119, 162, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(238, 245, 251, 0.96));
  box-shadow: -24px 0 48px rgba(17, 35, 58, 0.12);
}

.dropdown-menu,
.toast {
  border-color: rgba(39, 74, 115, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.94));
}

.quote-card,
.carousel-panel {
  background:
    radial-gradient(circle at top right, rgba(101, 168, 221, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(10, 18, 32, 0.98), rgba(26, 39, 59, 0.94) 58%, rgba(31, 61, 108, 0.88));
}

.auth-layout {
  border: 1px solid rgba(43, 77, 114, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 252, 0.92));
  box-shadow: 0 34px 70px rgba(13, 28, 47, 0.16);
}

.auth-aside {
  background:
    radial-gradient(circle at top left, rgba(90, 170, 224, 0.22), transparent 26%),
    radial-gradient(circle at bottom right, rgba(92, 79, 210, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(10, 18, 32, 0.99), rgba(20, 31, 48, 0.96), rgba(18, 47, 82, 0.92));
}

.auth-card {
  padding: 1.5rem;
}

.auth-card-hero {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(43, 77, 114, 0.12);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(98, 112, 231, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 252, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 16px 30px rgba(17, 36, 58, 0.08);
}

.hero-chip-row-auth {
  margin-top: 0.9rem;
}

.auth-links a {
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.08), rgba(77, 87, 198, 0.07));
  border: 1px solid rgba(46, 89, 135, 0.1);
  color: #4f6580;
}

.step-pill {
  padding: 0.72rem 0.86rem;
  border: 1px solid rgba(46, 89, 135, 0.1);
  background: linear-gradient(180deg, rgba(246, 250, 253, 0.98), rgba(236, 244, 250, 0.92));
}

.step-pill.active {
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.18), rgba(77, 87, 198, 0.14));
  box-shadow: 0 12px 24px rgba(22, 44, 69, 0.08);
}

.compact-badge {
  background: linear-gradient(135deg, rgba(17, 119, 162, 0.12), rgba(77, 87, 198, 0.08));
  border-color: rgba(46, 89, 135, 0.1);
  color: #4b6580;
}

.footer-note {
  color: #667c94;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-0.6rem, -0.45rem, 0);
  }
}

@keyframes sheen-pass {
  0%,
  100% {
    transform: translateX(-120%);
  }
  42%,
  58% {
    transform: translateX(120%);
  }
}

.sidebar-toggle {
  display: inline-flex !important;
}

.app-topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  min-height: 0;
  margin: 0;
  padding: 0.95rem 1.5rem;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid rgba(194, 219, 244, 0.08);
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(88, 160, 232, 0.26), transparent 24%),
    radial-gradient(circle at bottom right, rgba(112, 94, 232, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(21, 34, 56, 0.96), rgba(28, 45, 72, 0.95) 58%, rgba(24, 39, 64, 0.97) 100%);
  box-shadow: 0 14px 28px rgba(16, 31, 53, 0.12);
  color: rgba(255, 255, 255, 0.86);
  isolation: auto;
}

.app-topbar::before {
  content: none;
}

.app-topbar::after {
  content: none;
}

.app-topbar .topbar-inner,
.app-topbar .topbar-group,
.app-topbar .breadcrumb-shell,
.app-topbar .dropdown,
.app-topbar .topbar-search {
  position: relative;
  z-index: 1;
}

.app-topbar .topbar-group {
  gap: 0.75rem;
}

.app-topbar .breadcrumb-shell {
  gap: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.app-topbar .page-eyebrow {
  color: rgba(221, 235, 252, 0.62);
}

.app-topbar .topbar-route .small,
.app-topbar .text-muted {
  color: rgba(235, 243, 255, 0.82) !important;
}

.topbar-badge {
  background: linear-gradient(135deg, rgba(67, 157, 226, 0.22), rgba(119, 106, 239, 0.16));
  border-color: rgba(150, 210, 243, 0.2);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.topbar-badge i {
  color: rgba(236, 245, 255, 0.94);
}

.app-topbar .topbar-search i {
  color: rgba(224, 236, 252, 0.66);
}

.topbar-search input {
  min-height: 2.6rem;
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar-search input::placeholder {
  color: rgba(219, 233, 250, 0.56);
}

.app-topbar .btn.btn-light,
.app-topbar .btn.btn-outline-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-topbar .btn.btn-light:hover,
.app-topbar .btn.btn-outline-secondary:hover {
  color: #ffffff;
  border-color: rgba(150, 210, 243, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.app-topbar .icon-button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.82rem;
}

.app-topbar .avatar {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.page-hero {
  border-color: rgba(83, 135, 198, 0.2);
  box-shadow: 0 30px 62px rgba(16, 35, 58, 0.13);
}

.widget-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.62rem;
  margin-bottom: 0.52rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(64, 193, 255, 0.18), rgba(117, 122, 255, 0.14), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(111, 185, 229, 0.24);
  color: #244768;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 8px 18px rgba(21, 40, 63, 0.06);
}

.widget-tag-metric {
  position: absolute;
  top: 0.88rem;
  right: 0.92rem;
  margin-bottom: 0;
  color: #234364;
  background: linear-gradient(135deg, rgba(65, 190, 255, 0.18), rgba(116, 124, 255, 0.12), rgba(255, 255, 255, 0.62));
}

.widget-tag-modal {
  color: #234363;
  background: linear-gradient(135deg, rgba(62, 194, 255, 0.18), rgba(119, 122, 255, 0.12), rgba(255, 255, 255, 0.72));
}

.panel-card {
  border-color: rgba(56, 93, 139, 0.15);
}

.panel-header {
  position: relative;
  padding: 1rem 1.1rem 0.95rem;
  background:
    radial-gradient(circle at top right, rgba(87, 152, 255, 0.18), transparent 28%),
    radial-gradient(circle at top left, rgba(121, 120, 244, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(251, 253, 255, 0.98), rgba(236, 244, 251, 0.95) 58%, rgba(225, 235, 246, 0.92));
  border-bottom: 1px solid rgba(97, 151, 216, 0.16);
}

.panel-header::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(49, 191, 255, 0.56), rgba(116, 128, 255, 0.28), transparent);
  content: "";
}

.panel-title {
  color: #18324b;
  font-size: 0.99rem;
}

.panel-subtitle {
  color: #607b93;
  font-size: 0.76rem;
}

.metric-card {
  border-color: rgba(57, 99, 150, 0.18);
  box-shadow: 0 18px 40px rgba(17, 35, 58, 0.11);
}

.metric-card .metric-label {
  padding-right: 5.6rem;
}

.premium-modal .modal-content {
  position: relative;
  z-index: 2062;
  overflow: hidden;
  border: 1px solid rgba(97, 151, 216, 0.2);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top right, rgba(58, 194, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(122, 118, 255, 0.12), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.985), rgba(239, 246, 252, 0.97) 58%, rgba(226, 238, 248, 0.94));
  box-shadow: 0 32px 62px rgba(12, 27, 46, 0.18);
}

.modal {
  z-index: 2060;
}

.modal-dialog {
  position: relative;
  z-index: 2061;
}

.premium-modal .modal-header {
  position: relative;
  padding: 1.15rem 1.2rem 0.2rem;
}

.premium-modal .modal-title {
  color: #19344d;
  font-size: 1.08rem;
}

.premium-modal .modal-body {
  padding: 0.9rem 1.2rem 0.65rem;
  color: #59748d;
}

.premium-modal .modal-footer {
  padding: 0.85rem 1.2rem 1.15rem;
}

.premium-modal .text-muted,
.premium-modal [data-confirm-modal-text] {
  color: #6a85a0 !important;
}

.premium-modal .btn-close {
  opacity: 0.68;
}

.modal-orb {
  position: absolute;
  top: -2.4rem;
  right: -2.4rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 194, 255, 0.26), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}

.modal-backdrop {
  z-index: 2050;
}

.modal-backdrop.show {
  opacity: 0.44;
}

.modal-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.modal-launch-card {
  min-height: 100%;
}

.modal-launch-card .btn {
  width: 100%;
}

.modal-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.15rem;
}

.modal-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(87, 142, 204, 0.16);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top right, rgba(63, 197, 255, 0.08), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(237, 245, 251, 0.88));
  opacity: 0.58;
  transition: 180ms ease;
}

.modal-step.is-active,
.modal-step.is-complete {
  opacity: 1;
}

.modal-step.is-active {
  border-color: rgba(81, 142, 218, 0.32);
  box-shadow: 0 16px 30px rgba(18, 37, 62, 0.12);
}

.modal-step.is-complete {
  border-color: rgba(77, 182, 172, 0.22);
}

.modal-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(49, 191, 255, 0.18), rgba(116, 128, 255, 0.2));
  color: #1d4464;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
  animation: fadeUp 180ms ease;
}

.modal-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.9fr);
  gap: 1rem;
}

.modal-gallery-preview,
.modal-target-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(84, 133, 190, 0.14);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top right, rgba(63, 197, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(246, 251, 255, 0.98), rgba(234, 243, 249, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 34px rgba(15, 32, 54, 0.08);
}

.modal-gallery-preview {
  aspect-ratio: 16 / 10;
}

.modal-gallery-preview img,
.modal-target-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.modal-gallery-thumb {
  border: 1px solid rgba(84, 133, 190, 0.12);
  border-radius: 1.1rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(236, 244, 250, 0.92));
  padding: 0.38rem;
  box-shadow: 0 14px 28px rgba(18, 37, 62, 0.08);
  transition: 180ms ease;
}

.modal-gallery-thumb:hover,
.modal-gallery-thumb.active {
  border-color: rgba(84, 143, 220, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(18, 37, 62, 0.12);
}

.modal-html-target > * {
  margin-bottom: 0;
}

.embed-shell {
  background:
    radial-gradient(circle at top right, rgba(63, 197, 255, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(245, 250, 255, 0.98), rgba(228, 238, 248, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 24px 38px rgba(15, 32, 54, 0.12);
}

.premium-toast {
  position: relative;
  overflow: hidden;
  min-width: 21rem;
  border: 1px solid rgba(88, 148, 214, 0.18);
  background:
    radial-gradient(circle at top right, rgba(58, 194, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(122, 118, 255, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.985), rgba(238, 245, 251, 0.96) 58%, rgba(225, 237, 248, 0.93));
  color: #1a344d;
  box-shadow: 0 24px 42px rgba(12, 27, 46, 0.16);
}

.toast-glow {
  position: absolute;
  inset: auto -3rem -3rem auto;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(118, 124, 255, 0.18), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
}

.premium-toast .toast-header {
  position: relative;
  background: transparent;
  border-bottom-color: rgba(109, 167, 228, 0.16);
  color: #19324b;
}

.premium-toast .toast-body {
  position: relative;
  color: #59738d;
}

.premium-toast .text-muted {
  color: #7088a0 !important;
}

.premium-toast .btn-close {
  opacity: 0.68;
}

.toast-badge {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.65rem;
  border-radius: 0.78rem;
  background: linear-gradient(135deg, rgba(39, 204, 137, 0.22), rgba(61, 191, 255, 0.24), rgba(119, 122, 255, 0.18));
  color: #17425c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.chart-widget {
  overflow: hidden;
}

.chart-widget .panel-header {
  background:
    radial-gradient(circle at top right, rgba(82, 159, 255, 0.2), transparent 24%),
    radial-gradient(circle at top left, rgba(116, 126, 255, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(249, 252, 255, 0.98), rgba(235, 243, 250, 0.96) 56%, rgba(222, 234, 245, 0.92));
}

.chart-widget .panel-body {
  padding: 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(53, 188, 255, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(116, 126, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(238, 245, 251, 0.96));
}

.chart-canvas {
  width: 100%;
  min-height: 17rem;
}

.editor-shell {
  display: grid;
  gap: 0.85rem;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(74, 118, 171, 0.14);
  border-radius: 1rem;
  background:
    radial-gradient(circle at top left, rgba(53, 188, 255, 0.1), transparent 24%),
    radial-gradient(circle at top right, rgba(120, 126, 255, 0.06), transparent 22%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(236, 244, 250, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 16px 28px rgba(15, 32, 54, 0.07);
}

.editor-toolbar-wrap {
  align-items: stretch;
}

.editor-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.editor-pane {
  min-width: 0;
}

.editor-pane-label {
  margin-bottom: 0.5rem;
  color: #587799;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editor-canvas,
.editor-preview-pane,
.editor-preview-frame,
.editor-code {
  width: 100%;
  min-height: 19rem;
  border: 1px solid rgba(67, 112, 166, 0.14);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at top right, rgba(66, 196, 255, 0.09), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(240, 246, 251, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 18px 32px rgba(15, 32, 54, 0.08);
}

.editor-canvas {
  padding: 1rem;
  overflow: auto;
  outline: none;
}

.editor-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.65;
  resize: vertical;
}

.editor-preview-pane {
  padding: 1rem;
  overflow: auto;
}

.editor-preview-frame {
  display: block;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(235, 243, 249, 0.94));
}

.snippet-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.54rem 0.8rem;
  border: 1px solid rgba(104, 169, 224, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(49, 191, 255, 0.18), rgba(116, 128, 255, 0.18));
  color: #eef7ff;
  font-size: 0.73rem;
  font-weight: 700;
  transition: 180ms ease;
}

.snippet-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 169, 224, 0.28);
  box-shadow: 0 12px 22px rgba(8, 19, 34, 0.22);
}

.app-shell.sidebar-collapsed .app-sidebar {
  width: 5.4rem;
  padding-left: 0.7rem;
  padding-right: 0.04rem;
}

.app-shell.sidebar-collapsed .app-main {
  margin-left: 5.4rem;
}

@media (max-width: 991.98px) {
  .modal-gallery-grid,
  .modal-stepper {
    grid-template-columns: 1fr;
  }
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .sidebar-section-title,
.app-shell.sidebar-collapsed .sidebar-nav-toggle .link-copy,
.app-shell.sidebar-collapsed .sidebar-nav-meta,
.app-shell.sidebar-collapsed .sidebar-link .link-copy,
.app-shell.sidebar-collapsed .sidebar-nav-chevron,
.app-shell.sidebar-collapsed .sidebar-promo {
  display: none;
}

.app-shell.sidebar-collapsed .app-sidebar-scroll {
  overflow-x: hidden;
  padding-right: 0;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-right: 0.04rem;
}

.app-shell.sidebar-collapsed .sidebar-nav-group {
  position: relative;
  margin-bottom: 0.42rem;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.app-shell.sidebar-collapsed .sidebar-nav-toggle {
  position: relative;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 18px rgba(11, 22, 39, 0.08);
}

.app-shell.sidebar-collapsed .sidebar-nav-toggle > .d-flex {
  width: 100%;
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-submenu {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.72rem;
}

.app-shell.sidebar-collapsed .sidebar-link::before {
  left: 0.2rem;
  opacity: 0;
}

.app-shell.sidebar-collapsed .sidebar-nav-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.88rem;
}

.app-shell.sidebar-collapsed .sidebar-nav-group.is-active .sidebar-nav-toggle,
.app-shell.sidebar-collapsed .sidebar-nav-group.is-flyout-active .sidebar-nav-toggle,
.app-shell.sidebar-collapsed .sidebar-nav-group:hover .sidebar-nav-toggle,
.app-shell.sidebar-collapsed .sidebar-link:hover,
.app-shell.sidebar-collapsed .sidebar-link:focus {
  border-color: rgba(150, 210, 243, 0.28);
  background: linear-gradient(135deg, rgba(67, 157, 226, 0.24), rgba(119, 106, 239, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 24px rgba(10, 21, 39, 0.16);
}

.app-shell.sidebar-collapsed .sidebar-nav-toggle::after,
.app-shell.sidebar-collapsed .sidebar-link::after {
  content: none;
}

.app-shell.sidebar-collapsed .sidebar-flyout .sidebar-link {
  justify-content: flex-start;
  padding: 0.72rem 0.78rem 0.72rem 0.76rem;
}

.app-shell.sidebar-collapsed .sidebar-flyout .sidebar-link .link-copy {
  display: block;
}

.app-shell.sidebar-collapsed .sidebar-flyout .sidebar-link::before {
  left: 0.38rem;
}

.app-shell.sidebar-collapsed .sidebar-flyout .sidebar-link:hover::before,
.app-shell.sidebar-collapsed .sidebar-flyout .sidebar-link.active::before {
  opacity: 1;
  transform: scaleY(1);
}

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

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

  .hero-grid,
  .chat-shell,
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

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

  .app-main {
    margin-left: 0;
  }

  .page-content,
  .app-topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-hero {
    padding: 1.2rem;
  }

  .hero-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 767.98px) {
  .topbar-search {
    display: none;
  }

  .app-topbar {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .page-title-row {
    gap: 0.8rem;
  }

  .page-icon-badge {
    width: 2.85rem;
    height: 2.85rem;
  }

  .page-title {
    font-size: 1.28rem;
  }

  .hero-stat-grid {
    grid-template-columns: 1fr;
  }

  .premium-toast {
    min-width: min(100vw - 1.5rem, 21rem);
  }

  .chart-canvas {
    min-height: 14rem;
  }

  .editor-split {
    grid-template-columns: 1fr;
  }

  .auth-aside,
  .auth-main {
    padding: 1.35rem;
  }
}
