:root {
  color-scheme: light;
  --sensei-bg: #edf3f5;
  --sensei-bg-strong: #dbe8ec;
  --sensei-surface: #ffffff;
  --sensei-surface-soft: #f8fafc;
  --sensei-surface-tint: #ecfeff;
  --sensei-border: #cfdee3;
  --sensei-border-strong: #9db1ba;
  --sensei-text: #13212b;
  --sensei-muted: #61717b;
  --sensei-link: #0891b2;
  --sensei-link-strong: #0e7490;
  --sensei-primary: #06b6d4;
  --sensei-primary-dark: #0891b2;
  --sensei-danger: #dc2626;
  --sensei-warning: #f59e0b;
  --sensei-success: #16a34a;
  --sensei-radius-sm: 10px;
  --sensei-radius: 14px;
  --sensei-radius-lg: 18px;
  --sensei-shadow-sm: 0 6px 16px rgba(19, 33, 43, 0.07);
  --sensei-shadow: 0 16px 38px rgba(19, 33, 43, 0.12);
  --sensei-shell: minmax(0, 1760px);
  --sensei-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sensei-header-height: 64px;
  --sensei-sidebar-width-expanded: 260px;
  --sensei-sidebar-width-collapsed: 64px;
  --sensei-sidebar-bg: #ffffff;
  --sensei-nav-active-bg: #e0f7fa;
  --sensei-nav-active-text: #0e7490;
  --sensei-nav-hover-bg: #f1f5f9;
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--sensei-bg);
}

body,
button,
input,
select,
textarea {
  font-family: var(--sensei-font);
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% -10%, rgba(20, 184, 166, 0.18), transparent 34rem), radial-gradient(circle at 100% 0%, rgba(163, 230, 53, 0.14), transparent 32rem), linear-gradient(135deg, #f8fbfa 0%, var(--sensei-bg) 48%, #dbe8ec 100%);
  color: var(--sensei-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-x: hidden;
}

a {
  color: var(--sensei-link);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--sensei-link-strong);
  text-decoration: none;
}

img {
  max-width: 100%;
}

#header,
.navbar.tabs,
#primary-application-pane,
#footer,
#flash {
  width: calc(100% - 40px);
  max-width: 1760px;
  margin-right: auto;
  margin-left: auto;
}

#header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: var(--sensei-header-height);
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius-lg);
  background: linear-gradient(135deg, rgba(12, 25, 34, 0.97), rgba(10, 64, 78, 0.94)), #0c1922;
  box-shadow: var(--sensei-shadow);
  backdrop-filter: blur(18px);
}

#header h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: #ffffff;
  font-size: 0;
  letter-spacing: -0.04em;
}

.mobile-messages-link {
  display: none;
}

#header h3 a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 0;
  font-weight: 850;
}

#header h3 a::before {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #14b8a6 54%, #a3e635);
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.42);
  color: #ffffff;
  content: "S";
  font-size: 20px;
  font-weight: 900;
}

#header h3 a::after {
  content: "Sensei CRM";
  font-size: 22px;
}

#welcome {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  justify-self: end;
  color: rgba(226, 244, 245, 0.76);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

#welcome a,
#welcome_username {
  color: #ffffff;
  font-weight: 700;
}

#jumper {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

#jumpbox {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: calc(100vw - 48px);
  max-width: 520px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--sensei-radius);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--sensei-shadow);
  text-align: left;
}

#jumpbox input,
#jumpbox .form-control {
  width: 100%;
  max-width: 100%;
}

#jumpbox .ui-autocomplete {
  right: 14px;
  left: 14px;
  width: auto;
  max-height: 280px;
  margin-top: 8px;
  overflow-y: auto;
}

#jumpbox .ui-menu-item-wrapper,
#jumpbox .ui-menu-item a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--sensei-radius-sm);
  color: var(--sensei-link);
}

#jumpbox .ui-state-active,
#jumpbox .ui-menu-item a:hover {
  border: 0;
  background: var(--sensei-surface-tint);
  color: var(--sensei-link-strong);
}

#jumpbox a {
  color: #dbeafe;
}

#jumpbox a.selected {
  color: #ffffff;
  font-weight: 800;
}

.navbar.tabs {
  position: sticky;
  top: calc(var(--sensei-header-height) + 8px);
  z-index: 20;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--sensei-shadow-sm);
  backdrop-filter: blur(18px);
}

.navbar .container-fluid,
.offcanvas-body,
.navbar-nav {
  display: flex;
  align-items: center;
  width: 100%;
}

.navbar .container-fluid,
.offcanvas-body {
  padding: 6px;
}

.navbar-nav {
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #4f626c;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.nav-link:hover,
.nav-link:focus {
  background: var(--sensei-nav-hover-bg);
  color: var(--sensei-link-strong);
}

.nav-link.active,
.nav-link.selected {
  background: var(--sensei-nav-active-bg);
  color: var(--sensei-nav-active-text);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.18);
}

.nav-link svg.lucide {
  width: 16px;
  height: 16px;
  vertical-align: text-top;
}

.navbar-toggler,
.offcanvas-header,
.btn-close,
.mobile-menu-toggle,
.mobile-menu-divider,
.mobile-user-menu {
  display: none;
}

#primary-application-pane {
  margin-top: 14px;
}

#primary-application-pane > .row {
  display: grid;
  grid-template-columns: var(--sensei-sidebar-width-expanded) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#sidebar,
.sidebar {
  position: sticky;
  top: calc(var(--sensei-header-height) + 8px);
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - var(--sensei-header-height) - 16px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius);
  background: var(--sensei-sidebar-bg);
  box-shadow: 0 6px 16px rgba(25, 38, 64, 0.04);
  transition: width 250ms ease;
}

body.admin #sidebar,
body.admin .sidebar {
  position: static;
  max-height: none;
  border: 1px solid #e0e6ef;
  border-radius: var(--sensei-radius);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(25, 38, 64, 0.04);
}

body.admin #sidebar .sidebar-header {
  display: none;
}

#sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#sidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -2px 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sensei-border);
}

#sidebar .sidebar-header .caption,
#sidebar .sidebar-header .panel-heading {
  margin: 0;
}

#sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--sensei-border);
  border-radius: 8px;
  background: var(--sensei-surface-soft);
  color: var(--sensei-muted);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

#sidebar-toggle:hover,
#sidebar-toggle:focus {
  background: var(--sensei-nav-hover-bg);
  color: var(--sensei-link-strong);
  border-color: var(--sensei-border-strong);
}

#sidebar-toggle svg.lucide {
  width: 14px;
  height: 14px;
}

body.sidebar-collapsed:not(.admin) #primary-application-pane > .row {
  grid-template-columns: var(--sensei-sidebar-width-collapsed) minmax(0, 1fr);
}

body.sidebar-collapsed:not(.admin) #sidebar {
  width: var(--sensei-sidebar-width-collapsed);
  padding: 12px 6px;
}

body.sidebar-collapsed:not(.admin) #sidebar .sidebar-label,
body.sidebar-collapsed:not(.admin) #sidebar .caption,
body.sidebar-collapsed:not(.admin) #sidebar .panel-heading {
  display: none;
}

body.sidebar-collapsed:not(.admin) #sidebar .panel,
body.sidebar-collapsed:not(.admin) #sidebar .list,
body.sidebar-collapsed:not(.admin) #sidebar #recently,
body.sidebar-collapsed:not(.admin) #sidebar #filters {
  padding: 10px 6px;
}

body.sidebar-collapsed #sidebar-toggle svg[data-lucide=chevron-left],
body.sidebar-collapsed #sidebar-toggle svg[data-lucide=panel-left-close] {
  display: none;
}

#sidebar-toggle svg[data-lucide=chevron-right],
#sidebar-toggle svg[data-lucide=panel-left-open] {
  display: none;
}

body.sidebar-collapsed #sidebar-toggle svg[data-lucide=chevron-right],
body.sidebar-collapsed #sidebar-toggle svg[data-lucide=panel-left-open] {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  #sidebar,
  .nav-link,
  #sidebar-toggle,
  .mobile-messages-card {
    transition: none;
  }
}
#main,
.main,
#sidebar .panel,
#recently,
.panel,
.list,
.remote,
.section,
fieldset {
  border: 1px solid #e0e6ef;
  border-radius: var(--sensei-radius);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(25, 38, 64, 0.04);
}

#main,
.main {
  position: relative;
  min-width: 0;
  padding: 18px;
}

#main > .title,
.main > .title {
  max-width: calc(100% - 280px);
  margin: 2px 0 12px;
  color: #0f172a;
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 920;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

#main > .title:first-child,
.main > .title:first-child {
  margin-top: 0;
}

#main > .title span,
.main > .title span {
  display: inline-block;
}

#main > .title img,
.main > .title img,
img.spinner,
img#loading {
  display: none;
}

#sidebar .panel,
#recently,
.panel {
  padding: 12px;
  margin-bottom: 12px;
}

#filters {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e0e6ef;
  border-radius: var(--sensei-radius);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(25, 38, 64, 0.04);
}

#filters .check_box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 4px 0;
  border-bottom: 1px solid #edf1f7;
  color: #334155;
}

#filters .check_box:last-child {
  border-bottom: 0;
}

#filters .check_box div:first-child,
#filters .check_box b:first-child {
  grid-column: 3;
  grid-row: 1;
  color: #0f172a;
  font-weight: 850;
}

#filters input[type=checkbox] {
  grid-column: 1;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--sensei-primary);
}

#filters label,
#filters .check_box b:last-child {
  grid-column: 2;
  margin: 0;
  color: #475569;
}

.caption,
.subtitle,
legend,
.panel-heading {
  margin: -2px 0 12px;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#sidebar ul,
#sidebar li,
#recently li,
.list li,
ul,
li {
  list-style: none;
}

#sidebar ul,
.list ul,
ul {
  margin: 0;
  padding: 0;
}

#recently li,
.list li,
.panel li {
  padding: 9px 0;
  border-bottom: 1px solid #edf1f7;
}

#recently li:last-child,
.list li:last-child,
.panel li:last-child {
  border-bottom: 0;
}

#recently dt,
.list dt {
  font-weight: 800;
}

tt,
small,
.hint,
.empty,
.date,
.timeago {
  color: var(--sensei-muted);
  font-family: var(--sensei-font);
  font-size: 13px;
}

#menu,
.title_tools,
.tools,
.buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.subtitle_tools {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  float: right;
}

#menu,
.title_tools {
  justify-content: flex-end;
  margin-bottom: 12px;
}

#main > .title_tools,
.main > .title_tools {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  margin: 0;
}

#buttons:empty {
  display: none;
}

.format-buttons {
  display: none;
}

.create_asset {
  display: flex;
  justify-content: flex-end;
}

#menu a,
.title_tools a,
.subtitle_tools a,
.tools a,
.cancel,
input[type=submit],
button,
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--sensei-border);
  border-radius: 999px;
  background: var(--sensei-surface-soft);
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

#menu a:first-child,
input[type=submit],
button[type=submit],
.button.primary,
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--sensei-primary), #14b8a6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.24);
}

#menu a:hover,
.title_tools a:hover,
.subtitle_tools a:hover,
.tools a:hover,
input[type=submit]:hover,
button:hover,
.button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

#title,
h1,
h2,
h3,
h4 {
  color: #0f172a;
  letter-spacing: -0.035em;
}

#title,
h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 900;
  line-height: 1.08;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

#search {
  padding: 12px;
  margin: 8px 0 10px;
  border: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#search .tabs,
#search div:first-child {
  margin-bottom: 8px;
}

#search .tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#search .tabs ul {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
}

#search .tabs li {
  padding: 0;
  border: 0;
}

#search .tabs a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #315d65;
  font-size: 13px;
}

#search .tabs a.active,
#search .tabs a:hover {
  background: var(--sensei-primary);
  color: #ffffff;
}

#search_results_count {
  margin-left: auto;
  color: var(--sensei-muted);
  font-size: 13px;
}

#search a {
  font-weight: 750;
}

#search input[type=text],
#search input[type=search] {
  margin: 2px 0 4px;
}

#basic_search > div {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#basic_search input#query {
  grid-column: 1;
  grid-row: 1;
}

#basic_search .sorting_options {
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}

#accounts,
#leads,
#contacts,
#opportunities,
#campaigns,
#tasks {
  min-height: 46px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #ffffff;
}

#leads {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  border: 1px solid #cfdde3;
}

.lead-table__header,
#leads li.lead {
  display: grid;
  grid-template-columns: 18px minmax(96px, 120px) minmax(190px, 1.25fr) minmax(160px, 1fr) minmax(90px, 0.55fr) minmax(110px, 0.6fr) minmax(126px, 0.65fr) minmax(260px, 350px);
  gap: 12px;
  align-items: center;
  min-width: 1040px;
}

.lead-table__header {
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid #cfdde3;
  background: #d8e5ea;
  color: #253945;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#leads li.lead {
  min-height: 62px;
  padding: 10px 16px;
  border-bottom: 1px solid #e3eaf0;
  background: #ffffff;
}

.lead-table__checkbox {
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid #b6c7d0;
  border-radius: 4px;
  background: #ffffff;
}

#leads li.lead:last-child {
  border-bottom: 0;
}

#leads li.lead:hover {
  background: #f0fdfa;
}

#leads li.lead .strip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #c8d9df;
  border-radius: 999px;
  background: #eef6f7;
  color: #315461;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

#leads li.lead .strip.rejected {
  border-color: #d5e0e4;
  background: #f3f7f8;
  color: #60717b;
}

#leads li.lead .indent {
  min-width: 0;
}

#leads li.lead .indent > a {
  color: var(--sensei-link-strong);
  font-size: 14px;
  font-weight: 850;
}

#leads li.lead .indent tt {
  display: block;
  margin-top: 3px;
}

.lead-table__source,
.lead-table__company,
.lead-table__created,
.muted {
  color: var(--sensei-muted);
  font-size: 13px;
}

.lead-table__company,
.lead-table__source,
.lead-table__created {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-rating {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.lead-rating span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7e2e7;
}

.lead-rating span.active {
  background: #14b8a6;
}

#leads li.lead .tools {
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

#leads li.lead .tools li {
  padding: 0;
  border: 0;
}

#leads li.lead .tools a,
#leads li.lead .tools font {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #cbdce3;
  border-radius: 999px;
  background: #f8fbfb;
  color: #344955;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

#leads li.lead .tools font {
  border-color: transparent;
  background: transparent;
  color: #aab5bb !important;
}

#leads li.lead .tools a:hover {
  border-color: #8bd4e0;
  background: #ecfeff;
}

/* Task table styles */
#tasks {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  border: 1px solid #cfdde3;
}

.task-table__header,
#tasks li.task {
  display: grid;
  grid-template-columns: 36px minmax(100px, 130px) minmax(280px, 2fr) minmax(180px, 1fr) minmax(220px, 280px);
  gap: 12px;
  align-items: center;
  min-width: 880px;
}

.task-table__header {
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid #cfdde3;
  background: #d8e5ea;
  color: #253945;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.task-table__bucket-header {
  padding: 8px 16px;
  border-bottom: 1px solid #e3eaf0;
  background: #f0f4f6;
}

.task-table__bucket-header h4 {
  margin: 0;
  color: #315461;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

#tasks li.task {
  min-height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid #e3eaf0;
  background: #ffffff;
}

#tasks li.task:last-child {
  border-bottom: 0;
}

#tasks li.task:hover {
  background: #f0fdfa;
}

#tasks li.task .strip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #c8d9df;
  border-radius: 999px;
  background: #eef6f7;
  color: #315461;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

#tasks li.task .strip.other {
  border-color: #d5e0e4;
  background: #f3f7f8;
  color: #60717b;
}

.task-table__name a {
  color: var(--sensei-link-strong);
  font-size: 14px;
  font-weight: 850;
}

.task-related,
.task-assignee {
  display: block;
  margin-top: 2px;
  color: var(--sensei-muted);
  font-size: 12px;
}

.task-background {
  margin-top: 4px;
  color: var(--sensei-muted);
  font-size: 12px;
  font-style: italic;
}

.task-table__due {
  font-size: 13px;
}

.task-table__due .urgent {
  color: #ef4444;
  font-weight: 700;
}

.task-table__due .warn {
  color: #f59e0b;
  font-weight: 700;
}

.task-table__due .cool {
  color: #14b8a6;
}

/* Subtitle tools pipe separator - hide the raw pipe text, gap handles spacing */
.subtitle_tools {
  font-size: 0;
}

.subtitle_tools a {
  font-size: 13px;
}

/* Task log on entity show pages (lead, contact, etc) */
.log#tasks {
  padding: 16px;
  border: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(25, 38, 64, 0.04);
}

.log#tasks li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px solid #e3eaf0;
}

.log#tasks li:last-child {
  border-bottom: 0;
}

.log#tasks .tools a,
.log#tasks .tools font {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--sensei-border);
  border-radius: 999px;
  background: var(--sensei-surface-soft);
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.log#tasks .tools a:hover {
  background: #ecfeff;
  color: var(--sensei-link-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
}

.log#tasks .task-name {
  color: var(--sensei-link-strong);
  font-size: 14px;
  font-weight: 850;
}

.log#tasks .task-name a {
  color: var(--sensei-link-strong);
}

.log#tasks .task-meta {
  display: block;
  margin-top: 4px;
  color: var(--sensei-muted);
  font-size: 12px;
}

#tasks li.task .tools {
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

#tasks li.task .tools li {
  padding: 0;
  border: 0;
}

#tasks li.task .tools a,
#tasks li.task .tools font {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #cbdce3;
  border-radius: 999px;
  background: #f8fbfb;
  color: #344955;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

#tasks li.task .tools a:hover {
  border-color: #8bd4e0;
  background: #ecfeff;
}

#paginate,
#export {
  color: var(--sensei-muted);
  font-size: 13px;
}

#export {
  margin-top: 4px;
}

.dashboard-stack {
  display: grid;
  gap: 22px;
}

.dashboard-section {
  display: grid;
  gap: 10px;
}

.dashboard-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-section__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 920;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.dashboard-section__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--sensei-border);
  border-radius: 999px;
  background: var(--sensei-surface-soft);
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-section__link:hover,
.dashboard-section__link:focus {
  border-color: #8bd4e0;
  background: #ecfeff;
  color: var(--sensei-link-strong);
}

.dashboard-section__actions {
  margin: 0;
}

.dashboard-section__footer p {
  margin: 0;
  color: var(--sensei-muted);
  font-size: 13px;
}

.dashboard-table {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  border: 1px solid #cfdde3;
}

.dashboard-empty {
  padding: 18px;
  color: var(--sensei-muted);
  font-size: 14px;
}

.dashboard-table__body {
  margin: 0;
  padding: 0;
}

.dashboard-table__header,
.dashboard-table__row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.dashboard-table--tasks .dashboard-table__header,
.dashboard-table--tasks .dashboard-table__row {
  grid-template-columns: minmax(100px, 130px) minmax(280px, 2fr) minmax(180px, 1fr);
  min-width: 700px;
}

.dashboard-table--opportunities .dashboard-table__header,
.dashboard-table--opportunities .dashboard-table__row {
  grid-template-columns: minmax(100px, 130px) minmax(260px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  min-width: 820px;
}

.dashboard-table--accounts .dashboard-table__header,
.dashboard-table--accounts .dashboard-table__row {
  grid-template-columns: minmax(100px, 130px) minmax(220px, 1.8fr) minmax(220px, 1.1fr) minmax(180px, 1fr);
  min-width: 820px;
}

.dashboard-table--activities .dashboard-table__header,
.dashboard-table--activities .dashboard-table__row {
  grid-template-columns: minmax(140px, 180px) minmax(420px, 1fr);
  min-width: 620px;
}

.dashboard-table--admin-users .dashboard-table__header,
.dashboard-table--admin-users .dashboard-table__row {
  grid-template-columns: minmax(120px, 150px) minmax(260px, 1.2fr) minmax(320px, 1.5fr) minmax(240px, 1fr);
  gap: 0;
  min-width: 1080px;
  padding: 0;
}

.dashboard-table--admin-ingress-keys .dashboard-table__header,
.dashboard-table--admin-ingress-keys .dashboard-table__row {
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.7fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(260px, 1fr);
  min-width: 900px;
}

.dashboard-table--admin-ingresses .dashboard-table__header,
.dashboard-table--admin-ingresses .dashboard-table__row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(240px, 1.4fr) minmax(100px, 0.5fr) minmax(120px, 0.6fr) minmax(110px, 0.6fr) minmax(140px, 0.7fr) minmax(230px, 0.9fr);
  min-width: 1120px;
}

.dashboard-table--admin-ingress-bots .dashboard-table__header,
.dashboard-table--admin-ingress-bots .dashboard-table__row {
  grid-template-columns: minmax(420px, 1.8fr) minmax(100px, 0.6fr) minmax(130px, 0.7fr) minmax(180px, 0.8fr);
  min-width: 860px;
}

.dashboard-table--admin-llm-models .dashboard-table__header,
.dashboard-table--admin-llm-models .dashboard-table__row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(220px, 1.2fr) minmax(110px, 0.5fr) minmax(180px, 0.8fr);
  min-width: 780px;
}

.dashboard-table--admin-llm-models .dashboard-table__row--with-form {
  grid-template-columns: 1fr;
}

.dashboard-table--admin-llm-models .dashboard-table__row--with-form > .dashboard-table__cell {
  padding: 0;
}

.dashboard-table__row[hidden] {
  display: none;
}

.llm-model-edit-form {
  padding: 16px;
  background: #f6fbfc;
  border-top: 1px dashed #cfdde3;
}

.llm-model-edit-form .form-group {
  margin-bottom: 12px;
}

.llm-model-edit-form .form-group label {
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #60717b;
}

.dashboard-table--admin-users .dashboard-table__cell {
  min-width: 0;
  padding: 14px 16px;
}

.dashboard-table--admin-users .dashboard-table__header .dashboard-table__cell {
  padding-top: 15px;
  padding-bottom: 15px;
}

.dashboard-table__header {
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid #cfdde3;
  background: #d8e5ea;
  color: #253945;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dashboard-table__row {
  min-height: 62px;
  padding: 12px 16px;
  border-bottom: 1px solid #e3eaf0;
  background: #ffffff;
}

.dashboard-table__row:last-child {
  border-bottom: 0;
}

.dashboard-table__row:hover {
  background: #f0fdfa;
}

.dashboard-table .strip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #c8d9df;
  border-radius: 999px;
  background: #eef6f7;
  color: #315461;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-table .strip.other {
  border-color: #d5e0e4;
  background: #f3f7f8;
  color: #60717b;
}

.dashboard-table__primary {
  min-width: 0;
}

.dashboard-table__primary > a {
  color: var(--sensei-link-strong);
  font-size: 14px;
  font-weight: 850;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--sensei-border);
  border-radius: 999px;
  background: var(--sensei-surface-soft);
  color: #334155;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.btn-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.13);
}

.btn-icon svg.lucide {
  width: 16px;
  height: 16px;
}

.btn-icon--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--sensei-primary), #14b8a6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.24);
}

.btn-icon--success {
  background: #ecfdf5;
  border-color: #b9e2d8;
  color: #0f766e;
}

.btn-icon--success:hover {
  background: #d1fae5;
  border-color: #86d4be;
}

.btn-icon--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-icon--danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn-icon--muted {
  background: #eef6f7;
  border-color: #c8d9df;
  color: #315461;
}

.btn-icon--muted:hover {
  background: #dbe9ec;
  border-color: #aac1c9;
}

.btn-icon--warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.btn-icon--warn:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

.btn-icon[disabled],
.btn-icon[aria-disabled=true] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dashboard-table .tools {
  flex-wrap: nowrap;
}

.dashboard-table__cell--actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-table__cell--actions form {
  display: inline-flex;
  margin: 0;
}

.dashboard-table__cell--actions form.inline {
  display: inline-flex;
}

.dashboard-table__cell--actions .btn {
  font-size: 0;
}

.dashboard-table__cell--actions .btn[type=submit],
.dashboard-table__cell--actions button[type=submit] {
  font-size: 0;
  padding: 0;
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.dashboard-table__cell--actions .btn[type=submit] svg.lucide,
.dashboard-table__cell--actions button[type=submit] svg.lucide {
  width: 16px;
  height: 16px;
}

.dashboard-table__cell--status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.dashboard-table__row .dashboard-table__cell--toggle {
  background: #eef6f7;
}

.admin-screen {
  gap: 0;
}

.admin-section {
  gap: 14px;
}

.dashboard-tabs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius);
  background: var(--sensei-surface);
  box-shadow: var(--sensei-shadow-sm);
}

.dashboard-tab {
  display: inline-flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sensei-surface-soft);
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.dashboard-tab:hover {
  background: #ecfeff;
  border-color: rgba(8, 145, 178, 0.16);
}

.dashboard-tab.is-active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(20, 184, 166, 0.12));
  border-color: rgba(8, 145, 178, 0.28);
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.12);
}

.dashboard-tab__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.dashboard-tab__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.22);
}

.dashboard-tab.is-active .dashboard-tab__button {
  color: #0e7490;
}

.dashboard-tab__label {
  letter-spacing: -0.01em;
}

.dashboard-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7e3e8;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-tab.is-active .dashboard-tab__count {
  background: #0e7490;
  border-color: #0e7490;
  color: #ffffff;
}

.dashboard-tab__create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid rgba(8, 145, 178, 0.14);
  background: transparent;
  color: #0e7490;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}

.dashboard-tab__create:hover {
  background: rgba(8, 145, 178, 0.1);
  color: #0891b2;
}

.dashboard-tab__create.is-active {
  background: rgba(8, 145, 178, 0.16);
  color: #0e7490;
}

.dashboard-tab__create svg.lucide {
  width: 14px;
  height: 14px;
}

.dashboard-tab__create:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(8, 145, 178, 0.22);
}

.dashboard-tabs__panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-tab-panel[hidden] {
  display: none;
}

.dashboard-create-form {
  padding: 16px 18px;
  border: 1px dashed rgba(8, 145, 178, 0.32);
  border-radius: var(--sensei-radius);
  background: linear-gradient(180deg, #f4fbfd 0%, #ecfeff 100%);
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.06);
}

.dashboard-create-form[hidden] {
  display: none;
}

.dashboard-create-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-create-form__title {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  color: #0e7490;
}

.dashboard-create-form__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #c8d9df;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0;
  cursor: pointer;
}

.dashboard-create-form__close:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.dashboard-create-form__close svg.lucide {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .dashboard-tabs__nav {
    flex-direction: column;
  }
  .dashboard-tab {
    flex: 1 1 auto;
    min-width: 0;
  }
}
.admin-user__status,
.admin-user__actions {
  display: flex;
  align-items: center;
}

.admin-user__identity {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.admin-user__identity img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  flex-shrink: 0;
}

.admin-user__identity-copy {
  min-width: 0;
}

.admin-user__username {
  margin-left: 6px;
  color: var(--sensei-muted);
  font-size: 13px;
  font-weight: 600;
}

.admin-user__details {
  min-width: 0;
}

.admin-user__details .dashboard-meta,
.admin-user__details .dashboard-note {
  margin-top: 0;
}

.admin-user__details .dashboard-meta + .dashboard-meta,
.admin-user__details .dashboard-meta + .dashboard-note {
  margin-top: 4px;
}

.admin-user__actions .tools {
  justify-content: flex-start;
}

.admin-user__actions .grayed {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid #d7e0e7;
  border-radius: 999px;
  color: #9aa9b2;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-table--admin-users .strip.admin {
  border-color: #c7d7ff;
  background: #eef4ff;
  color: #3655a6;
}

.dashboard-table--admin-users .strip.active {
  border-color: #b9e2d8;
  background: #ecfdf5;
  color: #0f766e;
}

.dashboard-table--admin-users .admin-user__status .strip {
  min-width: 92px;
  justify-content: center;
  text-align: center;
}

.dashboard-table__secondary {
  color: var(--sensei-muted);
  font-size: 13px;
}

.dashboard-meta,
.dashboard-note {
  display: block;
  margin-top: 4px;
  color: var(--sensei-muted);
  font-size: 12px;
}

.dashboard-note {
  font-style: italic;
}

.dashboard-separator {
  display: inline-block;
  margin: 0 6px;
  color: #9aa9b2;
}

.dashboard-table .urgent {
  color: #ef4444;
  font-weight: 700;
}

.dashboard-table .warn {
  color: #f59e0b;
  font-weight: 700;
}

.dashboard-table .cool {
  color: #14b8a6;
}

.section,
.remote,
.list {
  padding: 16px;
  margin: 14px 0;
}

.label,
label {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=number],
input[type=search],
input[type=url],
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--sensei-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--sensei-text);
  font-size: 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

select.select2-hidden-accessible,
select.ts-hidden-accessible,
select.tomselected {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.select2-container,
.ts-wrapper {
  max-width: 100%;
  z-index: 1;
}

.ts-dropdown {
  z-index: 100 !important;
}

.section .select2-container,
.remote .select2-container,
.simple_form .select2-container,
.section .ts-wrapper,
.remote .ts-wrapper,
.simple_form .ts-wrapper {
  width: 100% !important;
}

.remote,
.simple_form {
  position: relative;
}

.remote > form > a.close,
.simple_form > a.close,
form > a.close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d6e7ef;
  border-radius: 999px;
  background: #ffffff;
  color: var(--sensei-primary-dark);
  font-size: 0;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 47, 63, 0.08);
}

.remote > form > a.close::before,
.simple_form > a.close::before,
form > a.close::before {
  content: "x";
  font-size: 13px;
  font-weight: 800;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 145, 178, 0.72);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.13);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #d6dde9;
  border-radius: var(--sensei-radius);
  background: #ffffff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e3e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  background: #d8e5ea;
  color: #253945;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #f0fdfa;
}

.gravatar,
img[src*=gravatar] {
  width: 42px;
  height: 42px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
}

#footer {
  margin-top: 28px;
  margin-bottom: 28px;
  color: var(--sensei-muted);
  font-size: 13px;
  text-align: center;
}

#flash:not(:empty) {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #a5f3fc;
  border-radius: var(--sensei-radius);
  background: #ecfeff;
  color: #164e63;
}

.tabless-page #header,
.tabless-page #flash,
.tabless-page #footer {
  max-width: 560px;
}

.tabless-page .tabless {
  padding-bottom: 24px;
}

.tabless-page .standalone {
  width: calc(100% - 40px);
  max-width: 560px;
  margin: 28px auto 0;
}

.tabless-page .standalone form {
  display: grid;
  gap: 16px;
}

.tabless-page .standalone .rslogin-form {
  margin-top: 16px;
}

.tabless-page .standalone > .title,
.tabless-page .standalone .title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 920;
  letter-spacing: -0.05em;
  line-height: 1;
}

.tabless-page .standalone .title_tools {
  justify-content: space-between;
  margin: 0;
  padding: 0 4px;
  color: var(--sensei-muted);
  font-size: 13px;
}

.tabless-page .standalone .section {
  margin: 0;
  padding: 22px;
}

.tabless-page .standalone .field-group + .field-group {
  margin-top: 16px;
}

.tabless-page .standalone .label {
  margin-bottom: 8px;
}

.tabless-page .standalone input[type=email],
.tabless-page .standalone input[type=password],
.tabless-page .standalone input[type=text] {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.tabless-page .standalone .login-actions {
  display: grid;
  gap: 14px;
}

.tabless-page .standalone .login-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 700;
}

.tabless-page .standalone .login-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--sensei-primary);
}

.tabless-page .standalone .form-control {
  width: 100%;
  min-height: 44px;
}

.tabless-page .standalone .login-secondary-action {
  border-color: rgba(8, 145, 178, 0.18);
  background: #ecfeff;
  color: var(--sensei-link-strong);
  box-shadow: none;
}

.tabless-page .standalone .login-secondary-action:hover,
.tabless-page .standalone .login-secondary-action:focus {
  border-color: rgba(8, 145, 178, 0.4);
  background: #cffafe;
}

.tabless-page .standalone .section:last-child {
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ui-widget,
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
  font-family: var(--sensei-font);
}

.ui-dialog,
.ui-menu,
.ui-autocomplete,
#auto_complete_dropdown {
  border: 1px solid var(--sensei-border);
  border-radius: var(--sensei-radius);
  background: #ffffff;
  box-shadow: var(--sensei-shadow);
}

.ui-dialog-titlebar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--sensei-border);
  font-weight: 850;
}

.ui-dialog-content {
  padding: 16px;
}

.fade,
.slide,
.slideDown,
.slideToggle,
.fadeIn,
.fadeOut,
.ui-effects-wrapper,
.ui-animating {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 980px) {
  #header,
  .navbar.tabs,
  #primary-application-pane,
  #footer,
  #flash {
    width: calc(100% - 24px);
    max-width: 1760px;
  }
  .navbar.tabs {
    position: sticky;
    top: var(--sensei-header-height);
    bottom: auto;
    left: auto;
    margin-top: 10px;
    border: 1px solid #e7ebf2;
    border-radius: 18px;
    box-shadow: var(--sensei-shadow-sm);
  }
  .navbar .container-fluid,
  .offcanvas-body {
    height: auto;
    padding: 6px;
  }
  .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
  }
  #header {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #welcome {
    grid-column: 1;
    justify-self: stretch;
    text-align: left;
  }
  #primary-application-pane > .row {
    grid-template-columns: 1fr;
  }
  .tabless-page #header,
  .tabless-page #flash,
  .tabless-page #footer,
  .tabless-page .standalone {
    width: calc(100% - 24px);
  }
  .tabless-page .standalone {
    margin-top: 20px;
  }
  .tabless-page .standalone .title_tools {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .tabless-page .standalone .section {
    padding: 18px;
  }
  #sidebar {
    display: none;
    order: 2;
  }
  body.sidebar-collapsed #sidebar,
  #primary-application-pane > .row {
    grid-template-columns: 1fr;
  }
  #main {
    order: 1;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  #header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 20px;
  }
  #header h3 {
    order: 2;
    flex: 1;
    margin: 0;
    text-align: center;
  }
  .mobile-menu-toggle {
    order: 1;
  }
  .mobile-messages-link {
    order: 3;
  }
  #header h3 a::after {
    font-size: 21px;
  }
  #welcome {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
  }
  .mobile-messages-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
  }
  .mobile-messages-link svg {
    width: 20px;
    height: 20px;
  }
  .navbar.tabs {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .navbar .container-fluid {
    padding: 0;
  }
  .navbar-toggler {
    display: none;
  }
  .offcanvas-header,
  .btn-close,
  .mobile-menu-divider,
  .mobile-user-menu {
    display: block;
  }
  .offcanvas {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    width: 84vw;
    max-width: 320px;
    overflow-y: auto;
    background: var(--sensei-surface);
    border-right: 1px solid var(--sensei-border);
    box-shadow: var(--sensei-shadow);
    transform: translateX(-100%);
    transition: transform 180ms ease;
    visibility: hidden;
  }
  .offcanvas.showing,
  .offcanvas.show:not(.hiding) {
    transform: none;
    visibility: visible;
  }
  .offcanvas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.42);
  }
  .offcanvas-backdrop.fade {
    opacity: 0;
  }
  .offcanvas-backdrop.show {
    opacity: 1;
  }
  .section,
  .remote,
  .simple_form,
  fieldset {
    max-width: 100%;
    overflow-x: hidden;
  }
  .section table,
  .remote table,
  .simple_form table,
  .section tbody,
  .remote tbody,
  .simple_form tbody,
  .section tr,
  .remote tr,
  .simple_form tr {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .section td,
  .remote td,
  .simple_form td {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 0;
  }
  .section td:empty,
  .remote td:empty,
  .simple_form td:empty {
    display: none;
  }
  .section input,
  .remote input,
  .simple_form input,
  .section select,
  .remote select,
  .simple_form select,
  .section textarea,
  .remote textarea,
  .simple_form textarea,
  .section .select2-container,
  .remote .select2-container,
  .simple_form .select2-container,
  .section .ts-wrapper,
  .remote .ts-wrapper,
  .simple_form .ts-wrapper {
    max-width: 100% !important;
  }
  .section [style*=width],
  .remote [style*=width],
  .simple_form [style*=width] {
    width: 100% !important;
  }
  .offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--sensei-border);
  }
  .offcanvas-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--sensei-text);
  }
  .btn-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: var(--sensei-surface-soft);
    color: var(--sensei-muted);
    font-size: 18px;
    cursor: pointer;
  }
  .offcanvas-body {
    display: block;
    width: auto;
    padding: 16px;
  }
  .offcanvas-body .navbar-nav {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }
  .offcanvas-body .nav-link {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
  }
  .mobile-menu-divider {
    height: 1px;
    margin: 16px 0;
    border: none;
    background: var(--sensei-border);
  }
  .mobile-user-info {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--sensei-surface-soft);
    color: var(--sensei-muted);
    font-size: 13px;
  }
  .mobile-username {
    color: var(--sensei-text);
    font-weight: 700;
  }
  .mobile-user-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--sensei-text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 140ms ease;
  }
  .mobile-link:hover {
    background: var(--sensei-surface-soft);
    color: var(--sensei-link);
  }
  .mobile-messages-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid var(--sensei-border);
    border-radius: var(--sensei-radius-sm);
    background: var(--sensei-surface-tint);
    color: var(--sensei-link-strong);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease;
  }
  .mobile-messages-card svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .mobile-messages-card:hover {
    background: var(--sensei-surface-soft);
    border-color: var(--sensei-border-strong);
    color: var(--sensei-link-strong);
  }
  .navbar-nav {
    gap: 5px;
  }
  .nav-link {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }
  .task-selector .nav-link {
    padding: 5px 8px;
    font-size: 12px;
    min-height: 28px;
  }
  #main,
  .main,
  #sidebar .panel,
  #recently,
  .panel {
    padding: 14px;
    border-radius: 18px;
  }
  #title,
  h1 {
    font-size: 28px;
  }
  #main > .title_tools,
  .main > .title_tools {
    position: static;
    justify-content: flex-start;
    margin: 0 0 12px;
  }
  #main > #title,
  .main > .title {
    max-width: none;
    clear: both;
  }
  #tasks {
    border-radius: 10px;
  }
  .task-table__header,
  #tasks li.task {
    min-width: 720px;
    gap: 8px;
    padding: 8px 10px;
  }
  .task-table__bucket-header {
    padding: 6px 10px;
  }
  .dashboard-stack {
    gap: 18px;
  }
  .dashboard-section__title {
    font-size: 30px;
  }
  .dashboard-table__header,
  .dashboard-table__row {
    gap: 8px;
    padding: 8px 10px;
  }
  .dashboard-table--tasks .dashboard-table__header,
  .dashboard-table--tasks .dashboard-table__row {
    min-width: 620px;
  }
  .dashboard-table--opportunities .dashboard-table__header,
  .dashboard-table--opportunities .dashboard-table__row,
  .dashboard-table--accounts .dashboard-table__header,
  .dashboard-table--accounts .dashboard-table__row {
    min-width: 720px;
  }
  .dashboard-table--activities .dashboard-table__header,
  .dashboard-table--activities .dashboard-table__row {
    min-width: 520px;
  }
  .dashboard-table .strip {
    min-height: 22px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .dashboard-table__primary > a {
    font-size: 13px;
  }
  .dashboard-table__secondary,
  .dashboard-meta,
  .dashboard-note {
    font-size: 11px;
  }
  .task-table__category .strip {
    min-height: 22px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .task-table__name a {
    font-size: 13px;
  }
  .task-related,
  .task-assignee,
  .task-background {
    font-size: 11px;
  }
  #tasks li.task .tools a,
  #tasks li.task .tools font {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 11px;
  }
}
/* ---- Telegram-style chat window on lead page ---- */
.customer-messages-section {
  margin: 24px 0;
}

.customer-messages-section .subtitle {
  margin-bottom: 12px;
}

.chat-container {
  background: radial-gradient(circle at 14px 14px, rgba(8, 145, 178, 0.06) 0 2px, transparent 3px), linear-gradient(180deg, #edf3f6, #e8eef2);
  background-size: 28px 28px, auto;
  border: 1px solid #d8e5eb;
  border-radius: 16px;
  height: min(58vh, 620px);
  min-height: 360px;
  overflow-y: auto;
  padding: 18px;
  margin-bottom: 16px;
  container-type: inline-size;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: min(78%, 760px);
  padding: 9px 12px;
  border-radius: 16px;
  position: relative;
  word-wrap: break-word;
}

.chat-bubble--incoming {
  align-self: flex-start;
  background: #ffffff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(15, 47, 63, 0.08);
}

.chat-bubble--outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #12b3d0, #0891b2);
  border-bottom-right-radius: 4px;
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.22);
  color: #ffffff;
}

@container (min-width: 700px) {
  .chat-bubble--outgoing {
    align-self: flex-start;
    margin-left: 52px;
  }
}
.chat-bubble__header {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.chat-bubble__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.chat-bubble__sender {
  color: #0088cc;
  font-size: 12px;
  font-weight: 750;
}

.chat-bubble__date {
  color: #8d949e;
  font-size: 11px;
  white-space: nowrap;
}

.chat-bubble__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.chat-bubble--outgoing .chat-bubble__date,
.chat-bubble--outgoing .chat-bubble__status {
  color: rgba(255, 255, 255, 0.78);
}

.chat-bubble__header--outgoing,
.chat-bubble__footer--outgoing {
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 0;
}

.chat-bubble__status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-bubble__body {
  color: #1c1e21;
  font-size: 14px;
  line-height: 1.45;
}

.chat-bubble--outgoing .chat-bubble__body {
  color: #ffffff;
}

.chat-bubble__body p {
  margin: 0;
}

.chat-bubble__body p + p {
  margin-top: 4px;
}

/* Info button (i) */
.chat-bubble__extra {
  position: relative;
}

.chat-bubble__info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e4e6eb;
  color: #65676b;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  cursor: pointer;
  list-style: none;
  user-select: none;
  line-height: 1;
}

.chat-bubble__info-btn::-webkit-details-marker {
  display: none;
}

.chat-bubble__info-btn::marker {
  display: none;
  content: "";
}

.chat-bubble__extra[open] .chat-bubble__info-btn {
  background: #0088cc;
  color: #fff;
}

.telegram-message-details {
  position: absolute;
  right: 0;
  bottom: 28px;
  z-index: 3;
  min-width: 260px;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 12px;
  color: #444;
}

.telegram-message-details dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
}

.telegram-message-details dt {
  color: #65676b;
  font-weight: 600;
}

.telegram-message-details dd {
  margin: 0;
}

.telegram-message-details a {
  color: #0088cc;
  font-weight: 500;
}

/* Attachments in chat bubbles */
.chat-bubble__attachments {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.chat-bubble__attachments-label {
  color: #65676b;
  font-size: 11px;
  font-weight: 600;
  margin-right: 2px;
}

.chat-bubble__attachment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #dadde1;
  border-radius: 999px;
  background: #f0f2f5;
  color: #0088cc;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.chat-bubble__attachment:hover {
  background: #e4e6eb;
}

/* Telegram reply panel */
.telegram-reply-panel {
  background: #ffffff;
  border: 1px solid #d8e5eb;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 47, 63, 0.05);
}

.telegram-reply-panel .subtitle {
  margin-bottom: 10px;
}

.telegram-reply-form {
  display: grid;
  gap: 10px;
}

.telegram-reply-form textarea.form-control {
  min-height: 112px;
  resize: vertical;
}

.telegram-reply-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.telegram-reply-form__ai-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #f1f5f9;
}

.telegram-reply-form__ai-actions[hidden] {
  display: none;
}

.telegram-reply-form__thinking {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
}

.telegram-reply-form__thinking[hidden] {
  display: none;
}

.telegram-reply-form__thinking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.telegram-reply-form__thinking-label {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.telegram-reply-form__thinking-content {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #1e3a8a;
  font-size: 12px;
}

.telegram-reply-form__status {
  min-height: 18px;
  color: #61717b;
  font-size: 12px;
  font-weight: 700;
}

.telegram-reply-form__status[data-kind=success] {
  color: #15803d;
}

.telegram-reply-form__status[data-kind=error] {
  color: #b91c1c;
}

.telegram-reply-form__status[data-kind=pending] {
  color: #0e7490;
}

.telegram-chat-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: min(420px, 100vw - 32px);
  padding: 12px 14px;
  border: 1px solid rgba(8, 145, 178, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(19, 33, 43, 0.18);
  color: #13212b;
  font-size: 13px;
  font-weight: 750;
}

.telegram-chat-toast[hidden] {
  display: none;
}

.dashboard-table--telegram-conversations .dashboard-table__row,
.dashboard-table--telegram-groups .dashboard-table__row {
  display: grid;
  align-items: center;
}

.dashboard-table--telegram-conversations .dashboard-table__header,
.dashboard-table--telegram-conversations .dashboard-table__row {
  grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1fr) minmax(240px, 1.8fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr);
}

.dashboard-table--telegram-groups .dashboard-table__header,
.dashboard-table--telegram-groups .dashboard-table__row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.dashboard-table--telegram-conversations .dashboard-table__primary,
.dashboard-table--telegram-groups .dashboard-table__primary {
  font-weight: 850;
}

.dashboard-table--telegram-conversations .dashboard-table__secondary,
.dashboard-table--telegram-groups .dashboard-table__secondary {
  color: #61717b;
  font-size: 12px;
}

.dashboard-table--telegram-conversations .tools,
.dashboard-table--telegram-groups .tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 700px) {
  .chat-container {
    height: 52vh;
    min-height: 300px;
    padding: 12px;
  }
  .chat-bubble {
    max-width: 92%;
  }
  .telegram-reply-form__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .telegram-reply-form__ai-actions {
    grid-template-columns: 1fr;
  }
  .dashboard-table--telegram-conversations .dashboard-table__header,
  .dashboard-table--telegram-conversations .dashboard-table__row,
  .dashboard-table--telegram-groups .dashboard-table__header,
  .dashboard-table--telegram-groups .dashboard-table__row {
    display: block;
  }
}
.profile-form {
  border-color: #d8e7ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
}

.profile-form .grid {
  gap: 14px 18px;
}

.profile-form__subtitle {
  margin: 18px 0 8px;
  color: #0f2f3f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-form__section {
  margin-top: 8px;
  padding: 16px;
  border-color: #d8e7ef;
  box-shadow: 0 10px 24px rgba(15, 47, 63, 0.05);
}

.profile-form__notifications {
  display: grid;
  gap: 10px;
}

.profile-form__check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.profile-form__check input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--sensei-primary);
}

.profile-form__check label {
  margin: 0;
}

#advanced_search form.ransack_search {
  display: grid;
  gap: 14px;
}

#advanced_search .fields.well {
  padding: 14px;
  border: 1px solid #d8e7ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 47, 63, 0.04);
}

#advanced_search .fields.condition {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(160px, 220px) minmax(160px, 240px);
  gap: 10px;
  align-items: center;
}

#advanced_search .fields.condition > .fields,
#advanced_search .fields.condition > .fields.value {
  min-width: 0;
}

#advanced_search .ransack_query {
  width: 100% !important;
}

#advanced_search .remove_fields {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f1f7f9;
}

#advanced_search .filters > a,
#advanced_search form.ransack_search > a {
  color: var(--sensei-primary-dark);
  font-weight: 850;
}

#advanced_search .submit-search {
  justify-self: end;
}

@media (max-width: 900px) {
  #advanced_search .fields.condition {
    grid-template-columns: 1fr;
  }
  #advanced_search .remove_fields {
    justify-self: start;
  }
}
/* Comment layout fixes */
.comment {
  overflow: hidden;
}

.comment .body {
  display: block;
}

.comment .body::after {
  content: "";
  display: table;
  clear: both;
}

.comment .gravatar {
  float: left;
  margin: 3px 10px 3px 3px;
}

.comment .body .tools {
  float: right;
  margin: 0 0 0 0;
  padding: 0;
}

.comment .body .tools li {
  padding: 0;
  border: 0;
}

.new_comment .tools {
  float: right;
}

.new_comment > a:first-child {
  float: left;
  margin-right: 10px;
}

.new_comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  clear: both;
  overflow: visible;
}

.new_comment > a:first-child {
  grid-row: 1/span 2;
  grid-column: 1;
  float: none;
  margin: 0;
}

.new_comment .tools {
  grid-column: 2;
  justify-self: end;
  float: none;
  margin: 0;
}

.new_comment > div[id$=_ask],
.new_comment > div[id$=_post] {
  grid-column: 2;
  min-width: 0;
}

.new_comment input[type=text],
.new_comment textarea {
  display: block;
  width: 100%;
}

.new_comment textarea {
  min-height: 112px;
}

@media (max-width: 640px) {
  .new_comment {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 10px;
  }
  .new_comment .tools {
    justify-self: stretch;
    justify-content: flex-end;
  }
}
/* VCF / web presence icons layout */
.web-presence-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.web-presence-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 6px;
  border: 1px solid var(--sensei-border);
  border-radius: 999px;
  background: var(--sensei-surface-soft);
  color: #334155;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.web-presence-icons a:hover {
  background: #ecfeff;
  color: var(--sensei-link-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
}

/* Task log layout fixes on entity show pages */
.log#tasks {
  display: grid;
  gap: 10px;
}

.log#tasks > li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  min-width: 0;
}

.log#tasks li .strip {
  float: none;
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 120px;
  margin: 0;
  font-size: 12px;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
}

.log#tasks li .tools {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  order: 3;
  float: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.log#tasks li input[type=checkbox] {
  flex: 0 0 auto;
  margin: 0;
}

.log#tasks li > div:not(.tools),
.log#tasks li .indent,
.log#tasks li .indentwide,
.log#tasks li .indentslim,
.log#tasks li .indentfull {
  flex: 1 1 220px;
  min-width: 0;
  margin-left: 0;
  overflow-wrap: anywhere;
}

.log#tasks li label {
  margin: 0;
}

.log#tasks li tt {
  display: inline;
  white-space: normal;
}

.log#tasks li .tools a,
.log#tasks li .tools font {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

.log#tasks li .tools li {
  padding: 0;
  border: 0;
}

.log#tasks li .indent,
.log#tasks li .indentwide,
.log#tasks li .indentslim,
.log#tasks li .indentfull {
  overflow: hidden;
}

@media (max-width: 640px) {
  .log#tasks > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .log#tasks li .strip,
  .log#tasks li .tools,
  .log#tasks li input[type=checkbox],
  .log#tasks li > div:not(.tools),
  .log#tasks li .indent,
  .log#tasks li .indentwide,
  .log#tasks li .indentslim,
  .log#tasks li .indentfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
  .log#tasks li .tools {
    justify-content: flex-start;
  }
}
