:root {
  --alvus-primary-gold: #d4af37;
  --alvus-primary-gold-bright: #f1d592;
  --alvus-deep-obsidian: #020617;
  --alvus-sidebar-bg: #0f172a;
  --alvus-content-bg: #f8fafc;
  --alvus-card-white: #ffffff;
  --alvus-text-main: #1e293b;
  --alvus-btn-main: #d4af37;
  --alvus-btn-text: #111827;
  --alvus-icon-color: #0ea5e9;
  --alvus-text-sub: #64748b;
  --alvus-border-color: #e2e8f0;
  --alvus-success: #10b981;
  --alvus-danger: #ef4444;
  --alvus-warning: #f59e0b;
  --alvus-tech-blue: #0ea5e9;
  --alvus-radius: 8px;
  --alvus-sidebar-width: 280px;
  --alvus-sidebar-collapsed-width: 88px;
  --alvus-topbar-height: 82px;
  --alvus-footer-height: 58px;
  --alvus-transition-speed: 0.25s;
  --alvus-border-radius: 12px;

  /* Theme compatibility layer from layout/base.html */
  --primary-gold: var(--alvus-primary-gold);
  --primary-gold-bright: var(--alvus-primary-gold-bright);
  --deep-obsidian: var(--alvus-deep-obsidian);
  --sidebar-bg: var(--alvus-sidebar-bg);
  --content-bg: var(--alvus-content-bg);
  --card-white: var(--alvus-card-white);
  --text-main: var(--alvus-text-main);
  --text-sub: var(--alvus-text-sub);
  --border-color: var(--alvus-border-color);
  --success: var(--alvus-success);
  --danger: var(--alvus-danger);
  --warning: var(--alvus-warning);
  --topbar-height: var(--alvus-topbar-height);
  --footer-height: var(--alvus-footer-height);
  --sidebar-width: var(--alvus-sidebar-width);
  --sidebar-collapsed-width: var(--alvus-sidebar-collapsed-width);
  --transition-speed: var(--alvus-transition-speed);
  --border-radius: var(--alvus-border-radius);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.alvus-theme {
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--alvus-content-bg);
  color: var(--alvus-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.alvus-theme button,
body.alvus-theme input,
body.alvus-theme select,
body.alvus-theme textarea {
  font: inherit;
  color: inherit;
}

.alvus-internal {
  height: 100vh;
  overflow: hidden;
}

.alvus-theme .alvus-base-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.alvus-theme .topbar {
  height: var(--alvus-topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--alvus-border-color);
  display: grid;
  grid-template-columns: var(--alvus-sidebar-width) 1fr auto;
  align-items: center;
  transition: grid-template-columns 0.25s ease;
  flex-shrink: 0;
}

body.collapsed .topbar {
  grid-template-columns: var(--alvus-sidebar-collapsed-width) 1fr auto;
}

.alvus-theme .topbar-brand {
  height: 100%;
  background: var(--alvus-sidebar-bg);
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 16px;
  color: #ffffff;
  overflow: hidden;
}

.alvus-theme .brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--alvus-primary-gold), var(--alvus-primary-gold-bright));
  color: var(--alvus-deep-obsidian);
  font-weight: 900;
  flex: 0 0 auto;
}

.alvus-theme .brand-name {
  font-weight: 800;
  letter-spacing: 0;
}

body.collapsed .topbar-brand .brand-name {
  opacity: 0;
  width: 0;
}

.alvus-theme .search-container {
  padding: 0 24px;
}

.alvus-theme .search-wrapper {
  width: min(620px, 100%);
  height: 42px;
  background: #f8fafc;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
  overflow: visible;
}

.alvus-theme .search-icon {
  color: var(--alvus-primary-gold);
  font-weight: 900;
}

.alvus-theme .search-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--alvus-text-main);
}

.alvus-theme .topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}

.alvus-theme .action-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  background: #ffffff;
  color: var(--alvus-icon-color);
  cursor: pointer;
}

.alvus-theme .user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alvus-theme .user-info {
  display: grid;
  text-align: right;
}

.alvus-theme .user-name {
  font-weight: 800;
  font-size: 13px;
}

.alvus-theme .user-role {
  color: var(--alvus-text-sub);
  font-size: 11px;
}

.alvus-theme .avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--alvus-deep-obsidian);
  color: #ffffff;
  font-weight: 800;
}

.alvus-theme .main-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.alvus-theme #sidebar {
  width: var(--alvus-sidebar-width);
  background: var(--alvus-sidebar-bg);
  color: #ffffff;
  padding: 18px 14px;
  transition: width 0.25s ease;
  position: relative;
  flex: 0 0 auto;
}

body.collapsed #sidebar {
  width: var(--alvus-sidebar-collapsed-width);
}

.alvus-theme .sidebar-toggle {
  position: absolute;
  top: 18px;
  right: -16px;
  width: 32px;
  height: 32px;
  border: 3px solid var(--alvus-content-bg);
  border-radius: 8px;
  background: var(--alvus-primary-gold);
  color: var(--alvus-deep-obsidian);
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

.alvus-theme .nav-menu {
  display: grid;
  gap: 6px;
  margin-top: 42px;
}

.alvus-theme .nav-item {
  min-height: 44px;
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.alvus-theme .nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #475569;
  flex: 0 0 auto;
}

.alvus-theme .nav-item:hover,
.alvus-theme .nav-item.active {
  background: rgba(212, 175, 55, 0.14);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--alvus-primary-gold);
}

.alvus-theme .nav-item.active .nav-dot {
  background: var(--alvus-primary-gold);
}

body.collapsed .nav-label {
  display: none;
}

body.collapsed .nav-item {
  justify-content: center;
}

.alvus-theme .tooltip {
  display: none;
  position: absolute;
  left: 78px;
  background: #111827;
  color: #ffffff;
  padding: 7px 9px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 12px;
  z-index: 20;
}

body.collapsed .nav-item:hover .tooltip {
  display: block;
}

.alvus-theme .content-area {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--alvus-content-bg);
}

.alvus-theme .oc-main {
  padding: 24px;
}

.alvus-theme .oc-topbar {
  margin-bottom: 20px;
}

.alvus-theme .oc-kicker {
  color: var(--alvus-primary-gold);
}

.alvus-theme .oc-button-primary {
  background: var(--alvus-deep-obsidian);
  border-color: var(--alvus-deep-obsidian);
  color: #ffffff;
}

.alvus-theme .oc-button-secondary,
.alvus-theme .oc-icon-button {
  border-color: var(--alvus-border-color);
}

.alvus-theme .oc-button-primary:hover {
  background: #111827;
}

.alvus-theme .oc-metric,
.alvus-theme .oc-panel,
.alvus-theme .oc-help-panel {
  border-color: var(--alvus-border-color);
  border-radius: var(--alvus-radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.alvus-theme .oc-metric strong {
  color: var(--alvus-deep-obsidian);
}

.alvus-theme .oc-status-pill {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
  color: #8a6a12;
}

.alvus-theme .oc-kanban-column,
.alvus-theme .oc-chat-preview {
  background: #f1f5f9;
}

.alvus-theme .oc-empty-drop {
  border-color: #cbd5e1;
}

.alvus-theme .oc-message.system {
  background: #fff7df;
  color: #8a6a12;
}

.alvus-theme footer {
  min-height: var(--alvus-footer-height);
  border-top: 1px solid var(--alvus-border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  flex-shrink: 0;
}

.alvus-theme .footer-left,
.alvus-theme .footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alvus-theme .brand-highlight,
.alvus-theme footer strong {
  color: var(--alvus-primary-gold);
  font-weight: 900;
}

.alvus-theme .engine-badge,
.alvus-theme .secure-badge {
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--alvus-text-main);
}

.alvus-live-state {
  min-height: 220px;
  border: 1px dashed var(--alvus-border-color);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--alvus-text-sub);
  background: #ffffff;
  padding: 24px;
}

.alvus-live-blocked {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.alvus-live-loading {
  background: #f8fafc;
}

.alvus-crm-quality-checklist {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--alvus-text-main);
  background: #ffffff;
}

.alvus-crm-quality-checklist.is-info {
  border-color: #dbe4f0;
  background: #f8fbff;
  color: #334155;
}

.alvus-crm-quality-checklist.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.alvus-crm-quality-checklist.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.alvus-crm-modal-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #dbe4f0;
  background: #f8fbff;
  color: #334155;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.alvus-crm-modal-intro i {
  margin-top: 2px;
  color: #2563eb;
}

.alvus-crm-modal-intro strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.alvus-crm-modal-intro small {
  display: block;
  margin-top: 4px;
  color: #475569;
  font-size: 11px;
}

.chat-container {
  height: calc(100vh - var(--alvus-topbar-height) - var(--alvus-footer-height) - 24px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 360px minmax(480px, 1fr);
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}

.chat-container.is-details-open {
  grid-template-columns: 360px minmax(480px, 1fr);
}

.chat-sidebar {
  border-right: 1px solid var(--alvus-border-color);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-sidebar-header {
  min-height: 62px;
  border-bottom: 1px solid var(--alvus-border-color);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.chat-sidebar-search {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.chat-sidebar-search i {
  color: var(--alvus-icon-color);
  font-size: 13px;
}

.chat-sidebar-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  font-size: 12px;
}

.action-btn-chat {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.action-btn-chat .icon-fallback,
.alvus-message-avatar .icon-fallback {
  display: none;
}

body.fa-unavailable .action-btn-chat i,
body.fa-unavailable .alvus-message-avatar i {
  display: none;
}

body.fa-unavailable .action-btn-chat .icon-fallback,
body.fa-unavailable .alvus-message-avatar .icon-fallback {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
}

.action-btn-chat:hover {
  color: var(--alvus-primary-gold);
  border-color: var(--alvus-primary-gold);
  background: #fffdf4;
}

.action-btn-chat.btn-create {
  background: #083344;
  color: var(--alvus-primary-gold);
  border-color: #083344;
}

.alvus-mobile-pane-btn,
.alvus-mobile-details-header {
  display: none;
}

.inbox-filter-wrap {
  position: relative;
}

.inbox-filter-dropdown {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  width: 190px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 20px -10px rgba(15, 23, 42, 0.28);
  z-index: 40;
  padding: 6px;
}

.inbox-filter-dropdown.is-open {
  display: block;
}

.inbox-filter-title {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 6px 8px;
}

.inbox-filter-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.inbox-filter-dropdown button:hover {
  background: #f8fafc;
}

.inbox-filter-dropdown button.is-active {
  background: rgba(8, 51, 68, 0.1);
  color: #083344;
  font-weight: 700;
}

.inbox-filter-input,
.inbox-filter-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d7e0ea;
  border-radius: 9px;
  padding: 0 10px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  margin: 2px 0 6px;
}

.inbox-filter-input:focus,
.inbox-filter-select:focus {
  outline: none;
  border-color: #7c9ab6;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.inbox-filter-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.inbox-filter-utility-btn {
  width: 100%;
  border: 1px solid #d7e0ea;
  background: #f8fafc;
  text-align: center;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 11px;
  color: #334155;
  cursor: pointer;
}

.inbox-filter-utility-btn:hover {
  background: #eef4fb;
  border-color: #bfd0e2;
}

.inbox-filter-utility-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.chat-tabs-container {
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--alvus-border-color);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  background: #f8fafc;
}

.tab-btn {
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  color: #64748b;
  border-radius: 9px;
  min-height: 33px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tab-btn-label {
  display: inline-block;
}

.tab-btn .badge-count {
  position: absolute;
  right: -6px;
  top: -8px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border: 2px solid #ffffff;
}

.tab-btn.is-active,
.tab-btn.active {
  background: #083344;
  border-color: #083344;
  color: #ffffff;
}

.alvus-conversation-filter {
  margin: 10px 12px 8px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.alvus-conversation-filter i {
  color: var(--alvus-icon-color);
  font-size: 13px;
}

.alvus-conversation-filter input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
}

.conversation-list {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-item {
  border: 0;
  border-left: 4px solid #cbd5e1;
  border-radius: 0 12px 12px 0;
  background: #fff;
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  position: relative;
}

.chat-item:hover {
  background: #f8fafc;
}

.chat-item.active {
  border-left-color: var(--alvus-primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.14);
}

.chat-item.status-active {
  background: #dcfce7;
  border-left-color: #10b981;
}
.chat-item.status-active:hover { background: #bbf7d0; }

.chat-item.status-pending {
  background: #f3e8ff;
  border-left-color: #a855f7;
}
.chat-item.status-pending:hover { background: #e9d5ff; }

.chat-item.status-waiting {
  background: #ffedd5;
  border-left-color: #f59e0b;
}
.chat-item.status-waiting:hover { background: #fed7aa; }

.chat-item.status-ialvus {
  background: #fef9c3;
  border-left-color: #facc15;
}
.chat-item.status-ialvus:hover { background: #fef08a; }

.chat-item.status-expired_24h {
  background: #fee2e2;
  border-left-color: #ef4444;
}
.chat-item.status-expired_24h:hover { background: #fecaca; }

.chat-item.status-closed {
  background: #e5e7eb;
  border-left-color: #64748b;
}
.chat-item.status-closed:hover { background: #d1d5db; }

.chat-item.is-new-conversation {
  background: #e0f2fe;
  border-left-color: #0ea5e9;
}
.chat-item.is-new-conversation:hover { background: #bae6fd; }

.status-indicator { display: none; }

.status-indicator.status-active { background: #10b981; }
.status-indicator.status-waiting { background: #f59e0b; }
.status-indicator.status-reception { background: #0ea5e9; }
.status-indicator.status-pending { background: #a855f7; }
.status-indicator.status-expired_24h { background: #ef4444; }
.status-indicator.status-ialvus { background: #facc15; }
.status-indicator.status-closed { background: #64748b; }

.chat-avatar-box {
  width: 46px;
  height: 46px;
  position: relative;
}

.chat-img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.chat-img-fallback {
  border: 1px solid var(--alvus-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  font-size: 16px;
}

.chat-channel-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: #0f172a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.chat-preview-box { min-width: 0; }

.chat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.chat-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-time {
  font-size: 11px;
  color: var(--alvus-text-sub);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-time-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.chat-status-text {
  font-size: 10px;
  color: #64748b;
  line-height: 1.15;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.chat-status-dot.status-active { background: #10b981; }
.chat-status-dot.status-waiting { background: #f59e0b; }
.chat-status-dot.status-reception { background: #0ea5e9; }
.chat-status-dot.status-pending { background: #a855f7; }
.chat-status-dot.status-expired_24h { background: #ef4444; }
.chat-status-dot.status-ialvus { background: #facc15; }
.chat-status-dot.status-closed { background: #64748b; }

.chat-last-msg {
  font-size: 12px;
  color: #475569;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-owner-line {
  display: grid;
  gap: 1px;
  margin-top: 4px;
}

.chat-owner-line span {
  font-size: 10px;
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-name.is-new,
.chat-last-msg.is-new {
  font-weight: 800;
  color: #0f172a;
}

.chat-new-pill {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 1px 6px;
}

.chat-view {
  border-right: 1px solid var(--alvus-border-color);
  background: #f1f5f9;
  padding: 0;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: minmax(84px, auto) 1fr auto;
  overflow: hidden;
}

.chat-view-header {
  border-bottom: 1px solid var(--alvus-border-color);
  background: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-view-header-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  min-width: 0;
}

.chat-view-header-main > * {
  min-width: 0;
}

.chat-view-header-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  position: relative;
}

.chat-view-header-actions .ai-toggle.is-off {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.chat-view-header-actions .ai-toggle.is-on {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.chat-view-header-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-contact-open-link {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-block;
  max-width: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-contact-open-link:hover {
  color: var(--alvus-primary-color);
  text-decoration: underline;
}

.action-btn-chat-subtle {
  opacity: 0.78;
}

.action-btn-chat-subtle:hover {
  opacity: 1;
}

.chat-view-header-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-title-inline-icon {
  color: var(--alvus-icon-color);
  font-size: 13px;
  flex: 0 0 auto;
}

.chat-meta-inline-icon {
  color: var(--alvus-icon-color);
  margin-right: 4px;
}

.chat-company-inline {
  color: #64748b;
  font-weight: 600;
}

.chat-view-body {
  overflow: auto;
  padding: 12px 42px 12px 12px;
  min-height: 0;
}

.chat-view-body.is-dragging-file {
  outline: 2px dashed var(--alvus-primary-gold);
  outline-offset: -8px;
  background: #fffbeb;
}

.chat-view-input {
  border-top: 1px solid var(--alvus-border-color);
  background: #ffffff;
  padding: 10px;
}

.chat-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #64748b;
  text-align: center;
}

.chat-empty-state i {
  font-size: 24px;
  color: #94a3b8;
}

.details-hover-zone {
  display: none;
}

.details-drawer-handle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 74px;
  border: 1px solid var(--alvus-border-color);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: #083344;
  color: var(--alvus-primary-gold);
  box-shadow: 8px 12px 20px -14px rgba(15, 23, 42, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: .94;
  pointer-events: auto;
  transition: background .2s ease, color .2s ease, transform .2s ease, opacity .18s ease;
}

.details-drawer-pin {
  position: absolute;
  top: 114px;
  right: 2px;
  width: 28px;
  height: 28px;
  border-radius: 8px 0 0 8px;
  border: 1px solid var(--alvus-border-color);
  border-right: 0;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: background .2s ease, color .2s ease;
}

.details-drawer-pin:hover {
  background: #f8fafc;
}

.details-drawer-pin.is-active {
  background: #083344;
  color: var(--alvus-primary-gold);
}

.details-drawer-handle:hover {
  filter: brightness(1.08);
}

.chat-container.is-details-open .details-drawer-handle i {
  transform: rotate(180deg);
}

.chat-container.is-details-open .details-drawer-handle {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #083344;
  opacity: 0;
  pointer-events: none;
}

.chat-container.is-details-open .details-drawer-handle:hover {
  background: #083344;
  color: var(--alvus-primary-gold);
}

.details-drawer-handle i {
  color: var(--alvus-primary-gold);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.45);
  line-height: 1;
  transform-origin: center;
  transition: transform .16s ease, color .16s ease;
}

.chat-container.is-details-open .details-drawer-handle i {
  color: #083344;
  text-shadow: none;
}

.details-sidebar {
  background: #f8fafc;
  overflow: auto;
  width: 340px;
  max-width: min(92vw, 380px);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  transition: transform .22s ease, opacity .18s ease;
  box-shadow: -10px 0 26px -16px rgba(15, 23, 42, 0.6);
  z-index: 4;
  border-left: 1px solid var(--alvus-border-color);
}

.details-sidebar > [data-conversation-side] {
  padding: 10px 10px 14px;
}

.chat-container.is-details-open .details-sidebar {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-container.is-details-pinned {
  grid-template-columns: 360px minmax(480px, 1fr) minmax(300px, 340px);
}

.chat-container.is-details-pinned .details-sidebar {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  width: auto;
  max-width: none;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  box-shadow: none;
  z-index: 2;
  border-left: 1px solid var(--alvus-border-color);
  background: #f8fafc;
}

.chat-container.is-details-pinned .details-drawer-handle {
  opacity: 0;
  pointer-events: none;
}

.details-user-header {
  padding: 22px 18px 16px;
  text-align: center;
  border: 1px solid var(--alvus-border-color);
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 10px;
}

.details-channel-badges {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.details-channel-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--alvus-border-color);
  background: #f8fafc;
  color: var(--alvus-icon-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.details-big-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 1px solid var(--alvus-border-color);
  background: #f8fafc;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.details-company-line {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.details-contact-line {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.details-info-section {
  padding: 16px 16px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 10px;
}

.details-routing-form {
  display: grid;
  gap: 8px;
}

.details-routing-form label {
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

.details-routing-form select {
  min-height: 36px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
}

.details-routing-form input[type="text"] {
  min-height: 36px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #0f172a;
}

.details-routing-form button {
  margin-top: 4px;
}

.details-routing-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.28);
  margin: 4px 0 2px;
}

.details-metadata-header {
  display: grid;
  gap: 4px;
}

.details-metadata-header small,
.details-field-hint {
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}

.details-attributes-grid {
  display: grid;
  gap: 8px;
}

.details-attribute-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 8px;
}

.alvus-form-actions-inline {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.alvus-form-actions-inline .oc-button {
  margin-top: 0;
}

.details-files-list [data-merge-pick].is-selected {
  border: 1px solid #16a34a;
  background: #dcfce7;
}

.details-files-list [data-merge-pick] .merge-pick-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.details-files-list [data-merge-pick] .merge-icon-default {
  display: inline-block;
}

.details-files-list [data-merge-pick] .merge-icon-selected {
  display: none;
}

.details-files-list [data-merge-pick].is-selected .merge-icon-default {
  display: none;
}

.details-files-list [data-merge-pick].is-selected .merge-icon-selected {
  display: inline-block;
  color: #14532d;
}

.details-contact-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.details-contact-open-btn {
  min-height: 26px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  line-height: 1;
  box-shadow: none;
}

.details-contact-open-btn.oc-button,
.details-contact-open-btn.alvus-btn {
  min-height: 26px !important;
  height: 26px;
  padding: 0 10px !important;
}

.details-contact-open-btn:hover {
  background: #eef2ff;
  border-color: #94a3b8;
  color: #1e293b;
  transform: none;
}

.details-contact-data-section {
  background: #ffffff;
}

.details-contact-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.details-contact-data-row {
  display: grid;
  gap: 2px;
  padding: 4px 0;
}

.details-contact-data-grid .info-label {
  margin-bottom: 2px;
}

.details-contact-data-grid .info-label i {
  margin-right: 6px;
  color: var(--alvus-icon-color);
}

.details-routing-form-section {
  background: #eef2f7;
  border-color: #cbd5e1;
}

.details-routing-form-section .info-label,
.details-routing-form-section label {
  color: #1e293b;
}

.details-routing-form-section select {
  background: #ffffff;
  border-color: #cbd5e1;
}

.details-routing-form-section input[type="text"] {
  background: #ffffff;
  border-color: #cbd5e1;
}

.details-crm-signals-section {
  background: #f8fafc;
  border-color: #dbe5f1;
}

.details-quality-sla-section {
  background: #f8fafc;
  border-color: #dbe5f1;
}

.details-operational-health-section {
  background: #f8fafc;
  border-color: #dbe5f1;
}

.details-crm-signals-section.is-loading {
  opacity: .92;
}

.details-operational-health-section.is-loading {
  opacity: .92;
}

.crm-signals-block {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.crm-signals-group {
  display: grid;
  gap: 7px;
}

.crm-signals-context-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d7e7f7;
  border-radius: 999px;
  background: #f4f8fd;
  color: #33506b;
  font-size: 11px;
  font-weight: 600;
}

.crm-signals-context-note i {
  color: #2563eb;
}

.crm-signals-summary {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #ffffff;
}

.crm-signals-summary-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .03em;
}

.crm-signals-summary strong {
  font-size: 12px;
  color: #0f172a;
}

.crm-signals-summary p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
}

.crm-signals-summary-next {
  font-size: 11px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 8px;
}

.crm-signals-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: .03em;
}

.crm-signals-deals {
  display: grid;
  gap: 6px;
}

.crm-signal-deal-row {
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 7px 9px;
  background: #ffffff;
  display: grid;
  gap: 2px;
}

.crm-signal-deal-row strong {
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
}

.crm-signal-deal-row small {
  font-size: 11px;
  color: #64748b;
}

.crm-signals-list {
  display: grid;
  gap: 8px;
}

.crm-signals-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.crm-signals-actions .oc-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.alvus-operational-health-block {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.alvus-operational-health-head {
  display: grid;
  gap: 6px;
}

.alvus-operational-health-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.alvus-operational-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1px solid #dbe5f1;
  background: #ffffff;
  color: #334155;
}

.alvus-operational-status.is-healthy {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.alvus-operational-status.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.alvus-operational-status.is-critical {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.alvus-operational-status.is-unavailable {
  border-color: #dbe5f1;
  background: #ffffff;
  color: #64748b;
}

.alvus-operational-meta {
  display: grid;
  gap: 6px;
}

.alvus-operational-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #ffffff;
}

.alvus-operational-meta-row strong {
  font-size: 11px;
  color: #475569;
}

.alvus-operational-meta-row span {
  font-size: 12px;
  color: #0f172a;
  text-align: right;
}

.alvus-quality-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.alvus-quality-pill {
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  gap: 4px;
}

.alvus-quality-pill i {
  color: var(--alvus-icon-color);
}

.alvus-quality-pill span {
  font-size: 11px;
  color: #64748b;
}

.alvus-quality-pill strong {
  font-size: 14px;
  color: #0f172a;
}

.alvus-quality-pill small {
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
}

.alvus-quality-pill.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.alvus-quality-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.alvus-quality-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: .03em;
}

.alvus-quality-sla-list {
  display: grid;
  gap: 7px;
}

.alvus-quality-sla-row {
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  display: grid;
  gap: 2px;
}

.alvus-quality-sla-row.is-overdue {
  border-color: #fecaca;
  background: #fff7f7;
}

.alvus-quality-sla-row strong {
  font-size: 12px;
  color: #0f172a;
}

.alvus-quality-sla-row small {
  font-size: 11px;
  color: #64748b;
}

.alvus-quality-csat-card {
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  gap: 6px;
}

.alvus-quality-csat-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alvus-quality-csat-score strong {
  font-size: 14px;
  color: #d97706;
}

.alvus-quality-csat-card p {
  margin: 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
}

.alvus-quality-actions {
  margin-top: 12px;
}

.alvus-csat-score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.alvus-csat-score-option {
  position: relative;
  display: flex;
}

.alvus-csat-score-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.alvus-csat-score-option span {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}

.alvus-csat-score-option input:checked + span,
.alvus-csat-score-option.is-active span {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #92400e;
}

.chat-tags-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.chat-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d6e1ec;
  color: #33506b;
  font-size: 10px;
  font-weight: 700;
}

.crm-signal-card {
  border: 1px solid #d8e1ef;
  border-left-width: 3px;
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  display: grid;
  gap: 5px;
}

.crm-signal-card.is-high {
  border-left-color: #dc2626;
}

.crm-signal-card.is-medium {
  border-left-color: #d97706;
}

.crm-signal-card.is-low {
  border-left-color: #2563eb;
}

.crm-signal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-signal-priority {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #d1dbe8;
  background: #f1f5f9;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
}

.crm-signal-card h4 {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #0f172a;
}

.crm-signal-card p {
  margin: 0;
  font-size: 11px;
  color: #334155;
  line-height: 1.4;
}

.crm-signal-evidence {
  display: grid;
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.crm-signal-evidence-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .03em;
}

.crm-signal-evidence-row {
  display: grid;
  gap: 2px;
}

.crm-signal-evidence-row strong {
  font-size: 10px;
  color: #1e293b;
}

.crm-signal-evidence-row span {
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
}

.crm-signal-next {
  font-size: 11px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 7px;
}

.alvus-crm-suggestion-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alvus-crm-suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #d7e7f7;
  border-radius: 999px;
  background: #f4f8fd;
  color: #33506b;
  font-size: 10px;
  font-weight: 700;
}

.alvus-crm-suggestion-chip i {
  color: #2563eb;
}

.alvus-crm-suggestion-evidence {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.alvus-crm-suggestion-evidence-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .03em;
}

.alvus-crm-suggestion-evidence-row {
  display: grid;
  gap: 2px;
}

.alvus-crm-suggestion-evidence-row strong {
  font-size: 10px;
  color: #1e293b;
}

.alvus-crm-suggestion-evidence-row span {
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
}

.crm-quick-deal-modal .alvus-modal-body {
  max-height: 70vh;
  overflow: auto;
}

.alvus-timeline-modal-nav {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alvus-timeline-nav-btn.oc-button,
.alvus-timeline-nav-btn.alvus-btn,
.alvus-pager-btn.oc-button,
.alvus-pager-btn.alvus-btn {
  min-height: 26px !important;
  height: 26px;
  min-width: 26px;
  width: 26px;
  padding: 0 !important;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}

.alvus-timeline-page-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.details-files-list,
.details-timeline-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.details-file-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
  position: relative;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}

.details-file-item > i {
  font-size: 16px;
}

.details-file-item:hover {
  background: #eef2f7;
  border-color: #8da2bd;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.9);
}

.details-file-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.details-file-meta a {
  color: #0f172a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-file-meta small {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-file-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  max-width: none;
}

.details-file-actions .alvus-btn {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.details-file-download {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity .2s ease, transform .2s ease;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.72));
  border-radius: 8px;
  text-decoration: none;
  overflow: hidden;
}

.details-file-download::before {
  content: '';
  position: absolute;
  top: -120%;
  left: -35%;
  width: 28%;
  height: 340%;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.36), rgba(255,255,255,0));
  transform: rotate(24deg);
  transition: left .35s ease;
}

.details-file-download-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 8px 22px -16px rgba(0, 0, 0, 0.8);
}

.details-file-download-pill i {
  color: #4ade80;
  font-size: 13px;
}

.details-file-item:hover .details-file-download {
  opacity: 1;
  transform: scale(1);
}

.details-file-item:hover .details-file-download::before {
  left: 122%;
}

.details-files-pagination {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.details-files-pagination span {
  min-width: 48px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
}

.details-timeline-item {
  display: grid;
  gap: 2px;
  border-left: 2px solid #cbd5e1;
  padding-left: 8px;
}

.details-timeline-item strong {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1e293b;
}

.details-timeline-item strong i {
  color: var(--alvus-icon-color);
}

.details-timeline-item span {
  color: #64748b;
  font-size: 11px;
}

.info-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.info-value {
  font-size: 13px;
  color: #0f172a;
}

@media (max-width: 1200px) {
  .chat-container {
    grid-template-columns: 320px 1fr;
  }

  .chat-container.is-details-open {
    grid-template-columns: 320px 1fr;
  }

  .details-sidebar {
    display: none;
  }

  .details-drawer-handle {
    display: none;
  }
}

@media (max-width: 980px) {
  .chat-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 620px;
  }

  .chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--alvus-border-color);
    max-height: 320px;
  }

  .chat-view {
    border-right: 0;
  }

  body[data-screen="inbox"] .chat-container {
    height: calc(100vh - var(--alvus-topbar-height) - var(--alvus-footer-height) - 8px);
    min-height: 0;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-sidebar,
  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view,
  body[data-screen="inbox"] .chat-container.is-mobile-mode .details-sidebar {
    display: none;
    min-height: 0;
    height: 100%;
    max-height: none;
    border: 0;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode.is-mobile-list .chat-sidebar {
    display: flex;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode.is-mobile-chat .chat-view {
    display: grid;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode.is-mobile-details .details-sidebar {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border-left: 0;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode.is-mobile-chat .chat-view,
  body[data-screen="inbox"] .chat-container.is-mobile-mode.is-mobile-details .details-sidebar {
    background: #f8fafc;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-sidebar {
    border-bottom: 0;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view {
    grid-template-rows: minmax(106px, auto) 1fr auto;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view-body {
    padding: 10px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view-input {
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view-header {
    padding: 10px 12px;
    min-height: 106px;
    gap: 10px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .chat-view-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .conversation-list {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-mobile-pane-btn {
    display: inline-flex;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .details-drawer-handle,
  body[data-screen="inbox"] .chat-container.is-mobile-mode .details-drawer-pin {
    display: none;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-mobile-details-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--alvus-border-color);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-mobile-details-header div {
    display: grid;
    gap: 2px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-mobile-details-header strong {
    font-size: 13px;
    color: #0f172a;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-mobile-details-header small {
    font-size: 11px;
    color: #64748b;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .details-sidebar > [data-conversation-side] {
    padding: 10px 10px calc(16px + env(safe-area-inset-bottom));
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-message-box textarea {
    min-height: 96px;
    height: 96px;
    max-height: 96px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-footer-left,
  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-footer-right,
  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-right-tools {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-footer-left {
    flex-wrap: wrap;
  }

  body[data-screen="inbox"] .chat-container.is-mobile-mode .alvus-composer-meta-separator {
    display: none;
  }
}

body[data-screen="inbox"] .oc-main {
  padding-top: 12px;
  padding-bottom: 12px;
}

.alvus-deal-card {
  display: grid;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.alvus-deal-card span {
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 10px 12px;
}

.alvus-conversation-header span {
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-message-stack {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 240px;
  max-height: none;
  overflow: auto;
  padding: 2px 0 6px;
}

.alvus-chat-system-line {
  display: grid;
  gap: 2px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font-size: 11px;
  text-align: center;
}

.alvus-chat-system-line-top {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.alvus-chat-system-line-bottom {
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}

.alvus-chat-system-line.is-internal-note {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.94));
}

.alvus-chat-system-line.is-internal-note .alvus-chat-system-line-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
}

.alvus-chat-system-line.is-internal-note .alvus-chat-system-line-bottom {
  color: #9a3412;
  font-size: 11px;
  line-height: 1.45;
}

.alvus-message-origin {
  display: block;
  color: var(--alvus-primary-gold);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.alvus-message-origin.is-system {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  margin: -10px -12px 6px;
}

.alvus-message-origin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.alvus-message-origin-chip i {
  color: var(--alvus-primary-gold);
  font-size: 11px;
}

.alvus-message-status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  font-size: 10px;
  color: var(--alvus-text-sub);
  background: #ffffff;
}

.alvus-message-meta-row {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.oc-message.inbound .alvus-message-meta-row {
  justify-content: flex-start;
}

.alvus-message-status i.is-read {
  color: #0ea5e9;
}

.alvus-message-status i.is-failed {
  color: #b91c1c;
}

.alvus-message-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alvus-message-wrap.inbound {
  justify-content: flex-start;
}

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

.alvus-message-bubble-wrap {
  display: grid;
  gap: 2px;
  max-width: min(600px, 80%);
}

.alvus-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--alvus-border-color);
  background: #f8fafc;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex: 0 0 40px;
}

.alvus-message-avatar.is-user {
  background: #334155;
  color: #ffffff;
  border-color: transparent;
}

.alvus-message-avatar.is-bot {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

.alvus-message-avatar.is-contact {
  background: #e2e8f0;
}

.oc-message {
  position: relative;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  max-width: 100%;
  display: grid;
  gap: 6px;
  box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.65);
}

.oc-message.inbound {
  justify-self: start;
  border-top-left-radius: 6px;
  background: #ffffff;
}

.oc-message.outbound {
  justify-self: end;
  border-top-right-radius: 6px;
  background: #fffbea;
  border-color: rgba(212, 175, 55, 0.34);
}

.oc-message.inbound::before,
.oc-message.outbound::before {
  content: "";
  position: absolute;
  top: 11px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.oc-message.inbound::before {
  left: -8px;
  border-right: 8px solid #ffffff;
}

.oc-message.outbound::before {
  right: -8px;
  border-left: 8px solid #fffbea;
}

.oc-message.is-system-origin {
  overflow: hidden;
  padding-top: 10px;
  border-color: rgba(15, 23, 42, 0.16);
}

.oc-message.is-system-origin.outbound::before {
  border-left-color: #fffbea;
}

.alvus-msg-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.alvus-msg-reply-ref {
  display: grid;
  gap: 2px;
  border-left: 3px solid var(--alvus-primary-gold);
  background: rgba(15, 23, 42, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
}

.alvus-msg-reply-ref strong {
  font-size: 11px;
  color: #334155;
  line-height: 1.2;
}

.alvus-msg-reply-ref span {
  font-size: 11px;
  color: #475569;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-msg-image {
  max-width: 280px;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--alvus-border-color);
}

.alvus-msg-audio audio,
.alvus-msg-video video {
  width: min(420px, 100%);
}

.alvus-msg-audio {
  display: grid;
  grid-template-columns: minmax(280px, 420px) auto;
  align-items: center;
  gap: 8px;
  width: min(480px, 100%);
  max-width: min(480px, calc(100vw - 64px));
}

.alvus-msg-audio audio {
  width: 100%;
  min-width: 280px;
  height: 38px;
}

.alvus-msg-audio-fallback {
  margin-top: 4px;
  font-size: 11px;
}

.alvus-msg-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  white-space: nowrap;
}

.alvus-msg-rate button {
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  min-width: 42px;
  padding: 4px 10px;
  cursor: pointer;
}

.alvus-msg-rate button.is-active {
  border-color: var(--alvus-primary-gold);
  color: #111827;
  background: #fffbea;
}

.alvus-msg-audio-fallback a {
  color: #334155;
}

.alvus-audio-transcription {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  gap: 4px;
}

.alvus-audio-transcription-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.alvus-audio-transcription-note {
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
}

.alvus-msg-contact-list,
.alvus-msg-location-card {
  display: grid;
  gap: 8px;
}

.alvus-msg-contact-card,
.alvus-msg-location-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 26px -24px rgba(15, 23, 42, 0.42);
}

.alvus-msg-contact-title,
.alvus-msg-location-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.alvus-msg-contact-subline,
.alvus-msg-location-line {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.alvus-msg-contact-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
}

.alvus-msg-contact-row i,
.alvus-msg-location-title i {
  color: var(--alvus-primary-gold);
  width: 14px;
  text-align: center;
  flex: 0 0 14px;
}

.alvus-msg-contact-row span {
  word-break: break-word;
}

.alvus-msg-location-actions {
  padding-top: 4px;
}

.alvus-msg-location-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
}

.alvus-msg-location-actions a:hover {
  color: #115e59;
  text-decoration: underline;
}

.alvus-audio-transcription-body {
  font-size: 12px;
  line-height: 1.55;
  color: #1e293b;
  white-space: pre-wrap;
}

.alvus-audio-transcription-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 2px;
}

.alvus-audio-transcription.is-pending .alvus-audio-transcription-body,
.alvus-audio-transcription.is-muted .alvus-audio-transcription-body {
  color: #475569;
}

.alvus-audio-transcription.is-error .alvus-audio-transcription-body {
  color: #991b1b;
}

.alvus-msg-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.alvus-msg-file a {
  color: #0f172a;
  font-weight: 600;
}

.alvus-msg-actions {
  position: absolute;
  right: 8px;
  top: -10px;
  display: none;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 3px 6px;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.6);
}

.oc-message:hover .alvus-msg-actions {
  display: inline-flex;
}

.alvus-msg-actions button,
.alvus-msg-actions a {
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  padding: 2px;
}

.alvus-msg-actions button:hover,
.alvus-msg-actions a:hover {
  color: #083344;
}

.alvus-msg-actions a[title="Baixar"] {
  color: #15803d;
}

[data-health-account-row] {
  transition: background-color 0.2s ease;
}

[data-health-account-row].is-active {
  background: rgba(15, 118, 110, 0.08);
}

.alvus-contacts-screen,
.alvus-automation-screen {
  display: grid;
  gap: 12px;
}

.alvus-contacts-toolbar,
.alvus-automation-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.alvus-contacts-search {
  min-width: min(480px, 100%);
  flex: 1 1 280px;
}

.alvus-contacts-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.alvus-contacts-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.alvus-page-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 12px;
  background: #fff;
}

.alvus-page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.alvus-page-btn:hover:not(:disabled) {
  border-color: var(--alvus-primary-gold);
  color: var(--alvus-primary-gold);
}

.alvus-page-btn.is-active {
  border-color: var(--alvus-primary-gold);
  background: rgba(212, 175, 55, 0.2);
  color: #7c5a06;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2) inset;
}

.alvus-page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 1600px) {
  .alvus-contacts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .alvus-contacts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 640px) {
  .alvus-contacts-grid {
    grid-template-columns: 1fr;
  }
  .alvus-page-wrap {
    gap: 6px;
    padding: 6px 8px;
  }
  .alvus-page-btn {
    min-width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

.alvus-contact-card {
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -22px rgba(15, 23, 42, 0.68);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.alvus-contact-card:hover {
  border-color: var(--alvus-primary-gold);
  box-shadow: 0 14px 26px -22px rgba(15, 23, 42, 0.82);
  transform: translateY(-3px);
}

.alvus-contact-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alvus-contact-card-identity {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.alvus-contact-card-avatar {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--alvus-sidebar-bg), #1e293b);
  color: var(--alvus-primary-gold);
  font-weight: 800;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.alvus-contact-card-avatar img,
.details-big-avatar img,
.chat-title-contact-avatar img,
.alvus-message-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.chat-title-contact-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--alvus-primary-gold) 14%, var(--alvus-theme-surface, #fff));
}

.alvus-contact-card-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.alvus-contact-card-name {
  font-size: 15px;
  line-height: 1.2;
  color: var(--alvus-deep-obsidian);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-contact-card-sub {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-contact-card-email {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-contact-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alvus-contact-card-tags span {
  border: 0;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-contact-card-tags .tag-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--alvus-success);
}

.alvus-contact-card-tags .tag-waiting {
  background: rgba(245, 158, 11, 0.1);
  color: var(--alvus-warning);
}

.alvus-contact-card-tags .tag-vip {
  background: rgba(212, 175, 55, 0.12);
  color: var(--alvus-primary-gold);
}

.alvus-contact-card-tags .tag-neutral {
  background: #f1f5f9;
  color: #475569;
}

.alvus-contact-card-line {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.alvus-contact-card-line i {
  width: 15px;
  color: var(--alvus-primary-gold);
  text-align: center;
}

.alvus-contact-card-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-contact-card-footer {
  border-top: 1px solid var(--alvus-border-color);
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.alvus-contact-channel-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--alvus-text-sub);
  font-size: 14px;
}

.alvus-contact-channel-icons i {
  transition: color 0.2s ease;
}

.alvus-contact-card:hover .alvus-contact-channel-icons i {
  color: var(--alvus-primary-gold);
}

.alvus-contact-open-btn {
  border: 0;
  background: transparent;
  color: var(--alvus-primary-gold);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.alvus-contact-open-btn i {
  color: var(--alvus-primary-gold);
}

.alvus-contact-card small {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-help-inline {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}

.alvus-automation-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alvus-automation-card {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.alvus-automation-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.alvus-section-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  background: linear-gradient(135deg, var(--alvus-primary-gold), var(--alvus-primary-gold-bright));
  color: var(--alvus-deep-obsidian);
  box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.8);
  flex: 0 0 auto;
}

.alvus-placeholder-map {
  display: grid;
  gap: 12px;
}

.alvus-placeholder-map-head,
.alvus-placeholder-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alvus-placeholder-map-head p {
  margin: 0 0 3px;
  color: var(--alvus-text-main);
  font-size: 13px;
  font-weight: 700;
}

.alvus-placeholder-map-head small {
  color: var(--alvus-text-sub);
  font-size: 11px;
}

.alvus-placeholder-map-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.alvus-placeholder-map-editor {
  min-width: 0;
}

.alvus-placeholder-rows {
  display: grid;
  gap: 8px;
}

.alvus-placeholder-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.alvus-placeholder-slot,
.alvus-placeholder-source {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.alvus-placeholder-slot span,
.alvus-placeholder-source span {
  color: var(--alvus-text-sub);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.alvus-placeholder-row select {
  width: 100%;
  height: 34px;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--alvus-text-main);
  font-size: 12px;
  outline: 0;
  padding: 0 9px;
}

.alvus-placeholder-row select:focus {
  border-color: var(--alvus-primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.13);
}

.alvus-placeholder-row .info-label {
  margin: 0;
  color: var(--alvus-text-sub);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-placeholder-reference {
  min-width: 0;
  border-left: 1px solid var(--alvus-border-color);
  padding-left: 14px;
}

.alvus-placeholder-reference header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.alvus-placeholder-reference header strong {
  color: var(--alvus-text-main);
  font-size: 12px;
}

.alvus-placeholder-reference header span {
  color: var(--alvus-text-sub);
  font-size: 11px;
}

.alvus-placeholder-reference-list {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.alvus-placeholder-reference-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.alvus-placeholder-reference-item i {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--alvus-tech-blue);
  font-size: 11px;
}

.alvus-placeholder-reference-item strong,
.alvus-placeholder-reference-item span,
.alvus-placeholder-reference-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-placeholder-reference-item strong {
  color: var(--alvus-text-main);
  font-size: 12px;
  white-space: nowrap;
}

.alvus-placeholder-reference-item span {
  color: var(--alvus-primary-gold);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.alvus-placeholder-reference-item small {
  color: var(--alvus-text-sub);
  font-size: 10px;
  line-height: 1.25;
}

.oc-button.oc-button-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.alvus-audio-recorder {
  display: grid;
  gap: 10px;
}

.alvus-audio-recorder-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alvus-audio-recorder-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alvus-audio-recorder-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  animation: recPulse 1.2s infinite;
}

.alvus-audio-recorder-time {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.alvus-audio-recorder-viz {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #f8fafc;
  padding: 6px;
  min-height: 82px;
  display: grid;
  place-items: center;
}

.alvus-audio-recorder-viz canvas {
  width: 100%;
  height: 68px;
  border-radius: 8px;
  display: block;
}

.alvus-audio-recorder-viz.is-recording {
  border-color: #fca5a5;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.alvus-audio-recorder-viz.is-paused {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

@keyframes recPulse {
  0% { opacity: 0.35; transform: scale(1); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.35; transform: scale(1); }
}

@media (max-width: 1100px) {
  .alvus-automation-grid {
    grid-template-columns: 1fr;
  }
}

.alvus-composer {
  position: relative;
  display: grid;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 8px;
}

.alvus-composer.is-placeholder {
  background: #f8fafc;
}

.alvus-composer textarea,
.alvus-composer select,
.alvus-composer input[type="url"] {
  width: 100%;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.alvus-composer-message-box {
  position: relative;
}

.alvus-composer-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--alvus-border-color);
  border-left: 3px solid var(--alvus-primary-gold);
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px 8px;
}

.alvus-reply-preview-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.alvus-reply-preview-copy strong {
  font-size: 11px;
  color: #334155;
}

.alvus-reply-preview-copy span {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-format-toolbar {
  position: absolute;
  left: 10px;
  top: -44px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.7);
  cursor: default;
  user-select: none;
  transition: top .08s ease, left .08s ease;
}

.alvus-format-toolbar[hidden] {
  display: none !important;
}

.alvus-format-toolbar .action-btn-chat {
  width: 30px;
  height: 30px;
}

.alvus-format-toolbar.is-dragging {
  cursor: default;
}

.alvus-composer-message-box textarea {
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  overflow-y: auto;
  resize: none;
  padding: 12px 62px 12px 12px;
}

.alvus-composer-send {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--alvus-btn-main);
  background: var(--alvus-btn-main);
  color: var(--alvus-btn-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.alvus-composer-send:hover {
  filter: brightness(0.96);
}

.alvus-composer-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alvus-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-composer-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.alvus-composer-footer-left .action-btn-chat {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  border-radius: 8px;
}

.alvus-composer-footer-left .action-btn-chat i {
  font-size: 14px;
  color: var(--alvus-icon-color);
  opacity: 1;
}

.alvus-composer-footer-left [data-preview-output] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-composer-enter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 4px;
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 540px) {
  .alvus-msg-audio {
    grid-template-columns: minmax(220px, 1fr) auto;
    width: 100%;
    max-width: calc(100vw - 48px);
  }

  .alvus-msg-audio audio {
    min-width: 220px;
  }
}

.alvus-composer-enter-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--alvus-btn-main);
}

.alvus-composer-meta-separator {
  color: #cbd5e1;
  font-weight: 700;
}

.alvus-composer-footer-right {
  display: inline-flex;
  align-items: center;
  min-width: 160px;
  max-width: 240px;
}

.alvus-composer-right-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.alvus-composer-footer-right select[name="template_id"] {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--alvus-text-main);
  font-size: 12px;
}

.alvus-emoji-picker {
  position: absolute;
  right: 68px;
  bottom: 48px;
  z-index: 32;
  width: 430px;
  max-width: calc(100% - 16px);
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.alvus-emoji-item {
  border: 1px solid transparent;
  background: #f8fafc;
  border-radius: 8px;
  min-height: 32px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.alvus-emoji-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  transform: translateY(-4px) scale(1.35);
  box-shadow: 0 10px 18px rgba(79, 70, 229, 0.22);
  z-index: 3;
}

.chat-window-24h {
  font-weight: 700;
  color: #047857;
}

.chat-window-24h.is-warning {
  color: #b91c1c;
}

.chat-window-24h.is-danger {
  color: #991b1b;
}

.alvus-attachment-drop {
  display: grid;
  gap: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.alvus-attachment-drop.is-dragging {
  border-color: var(--alvus-primary-gold);
  background: #fff7df;
}

.alvus-attachment-drop > span {
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-attachment-preview {
  display: grid;
  gap: 8px;
}

.alvus-modal.alvus-modal-no-scroll,
.alvus-modal.alvus-modal-no-scroll .alvus-modal-body,
.alvus-modal.alvus-modal-no-scroll .alvus-template-modal-layout,
.alvus-modal.alvus-modal-no-scroll .alvus-template-modal-form,
.alvus-modal.alvus-modal-no-scroll .alvus-form-grid {
  overflow: visible;
}

.alvus-contact-lookup-group {
  position: relative;
  z-index: 12;
}

.alvus-contact-lookup-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 24;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.alvus-contact-lookup-dropdown.is-open {
  display: grid;
  gap: 8px;
}

.alvus-contact-lookup-item {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.alvus-contact-lookup-item:hover {
  border-color: rgba(212, 175, 55, 0.42);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  background: #fffdfa;
  transform: translateY(-1px);
}

.alvus-contact-lookup-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.96);
  color: #475569;
  flex: 0 0 auto;
}

.alvus-contact-lookup-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.alvus-contact-lookup-copy strong {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
}

.alvus-contact-lookup-copy small {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.alvus-contact-lookup-state {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #475569;
  font-size: 13px;
}

.alvus-contact-lookup-state.is-error {
  color: #b42318;
}

.alvus-attachment-preview img,
.alvus-attachment-preview video {
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
}

.alvus-template-preview-box {
  border: 1px dashed var(--alvus-border-color);
  border-radius: 10px;
  background: #f8fafc;
  min-height: 84px;
  padding: 10px;
  font-size: 12px;
  color: var(--alvus-text-main);
  white-space: pre-wrap;
}

.alvus-template-modal-layout {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(260px, 320px);
  gap: 18px;
  align-items: start;
}

.alvus-template-modal-form {
  min-width: 0;
}

.alvus-template-modal-preview label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.alvus-template-phone-preview {
  border: 1px solid var(--alvus-border-color);
  border-radius: 16px;
  background: #e2e8f0;
  padding: 12px;
}

.alvus-template-phone-top {
  height: 26px;
  border-radius: 10px 10px 0 0;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .02em;
}

.alvus-template-phone-screen {
  min-height: 260px;
  background: linear-gradient(180deg, #dbeafe 0%, #e0f2fe 100%);
  border-radius: 0 0 12px 12px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
}

.alvus-template-phone-bubble {
  margin-left: auto;
  max-width: 94%;
  border-radius: 12px 12px 2px 12px;
  background: #dcf8c6;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.35;
  padding: 10px;
  white-space: pre-wrap;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.alvus-attachment-preview audio {
  width: 100%;
}

.alvus-document-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.alvus-composer-warning {
  display: inline-grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: min(520px, 100%);
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  border-radius: 10px;
  padding: 6px 10px 6px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 8px 18px -18px rgba(146, 64, 14, 0.75);
}

.alvus-composer-warning i {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 12px;
}

.alvus-composer-warning span {
  min-width: 0;
}

.alvus-composer-warning.is-soft {
  margin-top: 4px;
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
  border-left-color: #64748b;
  box-shadow: none;
}

.alvus-composer-warning.is-soft i {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.alvus-btn,
.oc-button {
  padding: 10px 14px;
}

.alvus-stored-files,
.alvus-timeline-events {
  display: grid;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.alvus-stored-file {
  color: #0f172a;
  font-size: 12px;
  text-decoration: none;
}

.alvus-stored-file:hover {
  text-decoration: underline;
}

.alvus-timeline-event {
  display: grid;
  gap: 2px;
}

.alvus-timeline-event span {
  color: var(--alvus-text-sub);
  font-size: 11px;
}

.alvus-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.alvus-modal-overlay.is-open {
  display: flex;
}

.alvus-modal {
  width: min(560px, 100%);
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.alvus-modal.alvus-modal-wide {
  width: min(860px, 100%);
}

.alvus-modal-body-scroll {
  max-height: 70vh;
  overflow-y: auto;
}

.alvus-form-grid-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.alvus-form-grid-2col .full-width {
  grid-column: 1 / -1;
}

.alvus-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.alvus-templates-list-scroll {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.alvus-automation-card .details-files-list,
.alvus-automation-card .details-timeline-list {
  overflow-x: hidden;
}

.alvus-modal-body-scroll .details-files-list {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

.alvus-modal-footer .oc-button {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alvus-runtime-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 12px;
}

.alvus-runtime-headline span {
  font-size: 12px;
  color: #334155;
}

.alvus-runtime-headline strong {
  color: #0f172a;
}

.alvus-runtime-headline .alvus-input {
  min-width: 220px;
  max-width: 320px;
  height: 34px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  color: #0f172a;
}

.details-timeline-list.is-modal {
  max-height: 62vh;
  overflow: auto;
  padding-right: 6px;
}

.alvus-modal-overlay.is-open .alvus-modal {
  transform: translateY(0);
}

.alvus-modal-header {
  background: linear-gradient(135deg, var(--deep-obsidian), #1e293b);
  color: #ffffff;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alvus-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.alvus-modal-body {
  padding: 22px;
}

.alvus-modal-footer {
  background: #f8fafc;
  border-top: 1px solid var(--alvus-border-color);
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.alvus-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
}

.alvus-modal-close:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.alvus-contact-view-body {
  display: grid;
  grid-template-columns: minmax(290px, 350px) 1fr;
  gap: 20px;
}

.alvus-contact-view-aside {
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
  min-height: 100%;
  overflow: hidden;
}

.alvus-contact-view-main {
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.alvus-contact-profile-head {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.alvus-contact-profile-avatar {
  border: 2px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(145deg, var(--alvus-sidebar-bg), #1e293b);
  color: var(--alvus-primary-gold);
  font-size: 26px;
  font-weight: 800;
}

.alvus-contact-profile-name {
  font-size: 16px;
  font-weight: 800;
}

.alvus-contact-profile-subtitle {
  font-size: 12px;
}

.alvus-contact-profile-lines {
  width: 100%;
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.alvus-contact-profile-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  background: #ffffff;
  color: var(--alvus-text-main);
}

.alvus-contact-profile-line i {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: var(--alvus-primary-gold);
  font-size: 12px;
}

.alvus-contact-profile-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.alvus-contact-profile-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alvus-contact-form-grid {
  align-content: start;
}

.alvus-contact-link-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.alvus-contact-link-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.alvus-contact-link-form-actions .oc-button {
  min-width: 190px;
}

.alvus-inline-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.alvus-contact-form-tabs {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.alvus-contact-tab {
  border: 1px solid var(--alvus-border-color);
  background: #f8fafc;
  color: #475569;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.alvus-contact-tab.is-active {
  color: var(--alvus-deep-obsidian);
  border-color: rgba(212, 175, 55, 0.52);
  background: rgba(212, 175, 55, 0.22);
}

@media (max-width: 980px) {
  .alvus-contact-view-body {
    grid-template-columns: 1fr;
  }

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

/* Standard form system from layout/5.contato-view.html */
.alvus-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 16px;
  width: 100%;
}

.alvus-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alvus-form-group.full-width {
  grid-column: 1 / -1;
}

.alvus-form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.alvus-form-group input,
.alvus-form-group select,
.alvus-form-group textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text-main);
  box-sizing: border-box;
}

.alvus-form-group input[type="color"] {
  width: 150px;
  height: 150px;
  min-height: 150px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  cursor: pointer;
}

.alvus-logo-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.alvus-logo-preview-box {
  width: 250px;
  height: 250px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-sub);
  font-size: 12px;
  flex: 0 0 250px;
}

.alvus-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.alvus-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  width: 100%;
}

.alvus-color-item {
  min-width: 0;
}

.alvus-org-section {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.alvus-org-section h3 {
  margin: 0;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alvus-org-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.alvus-org-grid-3 {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.alvus-form-grid.alvus-grid-holidays {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.alvus-form-grid.alvus-grid-vacations {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.alvus-form-grid.alvus-grid-holidays input,
.alvus-form-grid.alvus-grid-holidays select,
.alvus-form-grid.alvus-grid-vacations input,
.alvus-form-grid.alvus-grid-vacations select {
  min-height: 38px;
  padding: 8px 10px;
}

.alvus-form-group input[type="checkbox"],
.alvus-permission-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary-gold);
  vertical-align: middle;
}

.alvus-inline-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
  margin-top: 6px;
}

.alvus-inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-color, #1f2937);
}

.alvus-inline-checkbox input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
}

.alvus-input-soft-danger {
  background: #fff3f3 !important;
  border-color: #f3b7b7 !important;
}

.alvus-password-wrap {
  position: relative;
  width: 100%;
}

.alvus-password-wrap input[type="password"],
.alvus-password-wrap input[type="text"] {
  padding-right: 42px;
}

.alvus-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.alvus-password-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.field-container .alvus-password-wrap {
  width: 100%;
  display: block;
}

.alvus-form-group {
  min-width: 0;
}

.alvus-form-group > * {
  max-width: 100%;
}

@media (max-width: 840px) {
  .alvus-form-grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
}

.alvus-form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.alvus-form-group input:focus,
.alvus-form-group select:focus,
.alvus-form-group textarea:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
}

.alvus-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.alvus-btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

body.alvus-theme .alvus-btn-gold {
  background: var(--alvus-btn-main);
  color: var(--alvus-btn-text, #ffffff) !important;
}

body.alvus-theme .alvus-btn-gold i,
body.alvus-theme .alvus-btn-gold span {
  color: var(--alvus-btn-text, #ffffff) !important;
}

.alvus-auth-page,
.main-container.alvus-login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.65fr);
  background: var(--alvus-deep-obsidian);
  color: var(--alvus-text-main);
}

.alvus-auth-visual,
.alvus-login-layout .visual-engine {
  position: relative;
  display: grid;
  align-items: center;
  padding: 8vw;
  overflow: hidden;
}

.alvus-auth-visual::before,
.alvus-login-layout .visual-engine::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.22), transparent 28%),
    radial-gradient(circle at 80% 60%, rgba(14, 165, 233, 0.16), transparent 26%);
}

.alvus-auth-copy,
.alvus-login-layout .hero-content {
  position: relative;
  max-width: 660px;
  color: #ffffff;
}

.alvus-auth-copy h1,
.alvus-login-layout .hero-content h2 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: 0;
}

.alvus-auth-copy p,
.alvus-login-layout .typing-container {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.6;
}

.alvus-auth-panel,
.alvus-login-layout .auth-panel {
  background: rgba(255, 255, 255, 0.98);
  display: grid;
  align-items: center;
  padding: 32px;
}

.alvus-auth-card,
.alvus-login-layout .auth-card {
  width: min(440px, 100%);
  margin: 0 auto;
}

.alvus-auth-brand,
.alvus-login-layout .brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.alvus-auth-brand span:first-child,
.alvus-login-layout .brand-header .brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--alvus-primary-gold), var(--alvus-primary-gold-bright));
  color: var(--alvus-deep-obsidian);
  font-weight: 800;
}

.alvus-auth-card h2,
.alvus-login-layout .welcome-msg h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.alvus-auth-card p,
.alvus-login-layout .welcome-msg p {
  color: var(--alvus-text-sub);
  line-height: 1.5;
}

.alvus-field,
.alvus-login-layout .input-group {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.alvus-field label,
.alvus-login-layout .input-label {
  font-size: 12px;
  color: var(--alvus-text-sub);
  font-weight: 800;
  text-transform: uppercase;
}

.alvus-field input,
.alvus-field select,
.alvus-login-layout .field-input,
.alvus-login-layout .field-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--alvus-text-main);
}

.alvus-login-layout .field-container {
  width: 100%;
}

.alvus-auth-submit,
.alvus-login-layout .btn-portal {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  background: var(--alvus-deep-obsidian);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.alvus-auth-submit:hover,
.alvus-login-layout .btn-portal:hover {
  background: #111827;
}

.alvus-auth-meta,
.alvus-login-layout .card-footer {
  margin-top: 24px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 980px) {
  .alvus-auth-page,
  .main-container.alvus-login-layout {
    grid-template-columns: 1fr;
  }

  .alvus-auth-visual,
  .alvus-login-layout .visual-engine {
    display: none;
  }

  .alvus-auth-panel,
  .alvus-login-layout .auth-panel {
    min-height: 100vh;
  }
}

@media (max-width: 760px) {
  .alvus-theme .topbar {
    grid-template-columns: 88px 1fr auto;
  }

  .alvus-theme .search-container {
    padding: 0 10px;
  }

  .alvus-theme .user-info {
    display: none;
  }

  .alvus-theme #sidebar {
    width: 88px;
  }

  .alvus-theme .nav-label {
    display: none;
  }

  .alvus-theme footer {
    display: grid;
    height: auto;
    min-height: 72px;
    padding: 14px 16px;
  }

  .alvus-placeholder-map-head,
  .alvus-placeholder-map-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .alvus-placeholder-map-head .alvus-btn,
  .alvus-placeholder-map-footer .oc-button {
    width: 100%;
  }

  .alvus-placeholder-map-body {
    grid-template-columns: 1fr;
  }

  .alvus-placeholder-row {
    grid-template-columns: 86px minmax(0, 1fr) 36px;
  }

  .alvus-placeholder-reference {
    border-left: 0;
    border-top: 1px solid var(--alvus-border-color);
    padding-left: 0;
    padding-top: 12px;
  }
}

/* Base shell fidelity override (layout/base.html) */
.alvus-theme .topbar {
  z-index: 1100;
}

.alvus-theme .topbar-brand {
  transition: all 0.2s;
}

body.collapsed .topbar-brand .brand-name {
  display: none;
}

.alvus-theme .brand-icon {
  min-width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.3);
}

.alvus-theme .brand-name {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
  color: var(--text-sub);
}

.alvus-theme .brand-icon.has-logo {
  background: transparent;
  box-shadow: none;
  border: 0;
}

.alvus-theme .search-container {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.alvus-theme .search-wrapper {
  width: 100%;
  max-width: 520px;
  position: relative;
  border: 0;
  background: transparent;
  height: auto;
  display: block;
  padding: 0;
}

.alvus-theme .search-wrapper > i,
.alvus-theme .search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--alvus-icon-color);
  font-size: 15px;
}

.alvus-theme .search-input {
  width: 100%;
  padding: 12px 18px 12px 48px;
  border-radius: 40px;
  border: 1px solid var(--border-color);
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.alvus-global-search-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  z-index: 80;
}

.alvus-global-search-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--alvus-text-main);
  border-bottom: 1px solid #f1f5f9;
  min-width: 0;
}

.alvus-global-search-item:last-child {
  border-bottom: 0;
}

.alvus-global-search-item:hover {
  background: #f8fafc;
}

.alvus-global-search-item strong {
  font-size: 12px;
  min-width: 0;
}

.alvus-search-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.alvus-search-row-head strong {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.alvus-search-main-icon {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.alvus-search-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-search-channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--alvus-text-sub);
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.alvus-global-search-item i {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
}

.alvus-global-search-item .alvus-search-meta {
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-global-search-item small {
  display: block;
  font-size: 11px;
  color: var(--alvus-text-sub);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-global-search-item.is-muted {
  color: var(--alvus-text-sub);
}

.alvus-theme .search-input:focus {
  outline: none;
  border-color: var(--primary-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.alvus-theme .topbar-actions {
  gap: 20px;
  padding-right: 32px;
}

.alvus-theme .action-btn {
  color: var(--alvus-icon-color);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  background: transparent;
  border: 0;
  width: auto;
  height: auto;
}

.alvus-theme .action-btn:hover {
  filter: brightness(0.9);
}

.alvus-theme .action-btn .badge-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 9px;
  height: 9px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
  display: none;
}

.alvus-theme .action-btn .badge-dot.is-visible {
  display: block;
}

.alvus-theme .user-profile-trigger {
  gap: 14px;
  padding: 6px 12px;
  border-radius: 40px;
  cursor: pointer;
  position: relative;
  background: #f8fafc;
  transition: background 0.2s;
}

.alvus-theme .user-profile-trigger:hover {
  background: #f1f5f9;
}

.alvus-theme .user-info {
  text-align: right;
  line-height: 1.25;
}

.alvus-theme .user-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--deep-obsidian);
  white-space: nowrap;
}

.alvus-theme .user-role {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alvus-theme .avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--sidebar-bg), var(--deep-obsidian));
  color: var(--primary-gold);
  border: 2px solid var(--primary-gold);
  font-size: 18px;
}

.alvus-theme .dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.2s;
  overflow: hidden;
  z-index: 1300;
}

.alvus-theme .user-profile-trigger:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.alvus-theme .dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.alvus-theme .dropdown-item i {
  width: 20px;
  color: var(--alvus-icon-color);
}

.alvus-theme .dropdown-item:hover {
  background: #f8fafc;
}

.alvus-theme .dropdown-item.logout {
  color: var(--danger);
  border-top: 1px solid var(--border-color);
  font-weight: 600;
}

.alvus-theme .dropdown-item.logout i {
  color: var(--danger);
}

.alvus-theme .dropdown-divider {
  height: 1px;
  background: var(--border-color);
}

.alvus-theme #sidebar {
  padding: 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.alvus-theme .sidebar-toggle {
  top: 30px;
  right: -16px;
  border-radius: 50%;
  transition: transform 0.3s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.alvus-theme .sidebar-toggle:hover {
  background: var(--primary-gold-bright);
  transform: scale(1.05);
}

.alvus-theme .nav-menu {
  flex: 1;
  padding: 28px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  margin-top: 0;
}

.alvus-theme .nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #5b6e8c;
  margin: 28px 0 12px 12px;
  font-weight: 700;
  white-space: nowrap;
}

body.collapsed .nav-section-title {
  display: none;
}

.alvus-theme .nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #cbd5e6;
  text-decoration: none;
  border-radius: 14px;
  margin-bottom: 6px;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 500;
  gap: 16px;
  position: relative;
  white-space: nowrap;
  min-height: 0;
}

.alvus-theme .nav-item i {
  min-width: 24px;
  text-align: center;
  font-size: 20px;
  color: var(--alvus-icon-color);
}

.alvus-theme .nav-item:hover {
  background: rgba(212, 175, 55, 0.12);
  color: white;
  transform: none;
  box-shadow: none;
}

.alvus-theme .nav-item.active {
  background: var(--primary-gold);
  color: var(--deep-obsidian);
  font-weight: 700;
  box-shadow: 0 6px 12px -6px rgba(212, 175, 55, 0.4);
}

.alvus-theme .nav-item.active i {
  color: var(--deep-obsidian);
}

body.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.alvus-theme .tooltip {
  position: absolute;
  left: 100%;
  margin-left: 16px;
  background: var(--deep-obsidian);
  color: white;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s, transform 0.1s;
  pointer-events: none;
  z-index: 2000;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  transform: translateX(-4px);
  display: block;
}

body.collapsed .nav-item:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

body:not(.collapsed) .nav-item .tooltip {
  display: none;
}

.alvus-theme footer {
  height: var(--footer-height);
  min-height: var(--footer-height);
  background: var(--deep-obsidian);
  color: var(--text-sub);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 32px;
  font-size: 12px;
  font-weight: 500;
  flex-wrap: wrap;
  gap: 8px;
}

.alvus-theme .footer-left {
  gap: 20px;
}

.alvus-theme .brand-highlight {
  color: var(--primary-gold);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.alvus-theme .version-text {
  color: var(--text-sub);
  font-size: 11px;
  font-family: monospace;
}

.alvus-theme .footer-center {
  color: var(--text-sub);
  font-size: 12px;
  letter-spacing: 0.3px;
}

.alvus-theme .footer-right {
  gap: 20px;
}

.alvus-theme .engine-badge {
  background: rgba(212, 175, 55, 0.1);
  color: var(--primary-gold);
  border: 0;
  border-radius: 40px;
  padding: 4px 10px;
  font-weight: 500;
}

.alvus-theme .secure-badge {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 0;
  border-radius: 40px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 11px;
}

.alvus-theme .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.alvus-theme .dropdown-meta {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  gap: 3px;
}

.alvus-theme .dropdown-meta span {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.alvus-theme .dropdown-meta strong {
  font-size: 13px;
  color: var(--text-main);
}

.alvus-theme .dropdown-meta em {
  font-size: 12px;
  color: #475569;
  font-style: normal;
}

.alvus-theme .dropdown-meta small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.alvus-theme .dropdown-meta small i {
  color: var(--alvus-primary-gold);
  font-size: 10px;
}

.alvus-theme .topbar-brand-spacer {
  padding: 0;
  gap: 0;
}

.alvus-theme .topbar-brand-spacer .brand-icon,
.alvus-theme .topbar-brand-spacer .brand-name {
  display: none;
}

.alvus-theme .topbar-inline-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 22px -20px rgba(15, 23, 42, 0.62);
}

.alvus-theme .topbar-inline-brand .brand-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 15px;
}

.alvus-theme .topbar-inline-brand .brand-icon.has-logo {
  background: transparent;
  box-shadow: none;
  border: 0;
}

.alvus-theme .topbar-inline-brand .brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.alvus-theme .topbar-inline-brand .brand-name {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--alvus-text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.alvus-theme .search-container {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.alvus-theme .search-container .search-wrapper {
  max-width: 620px;
  flex: 1 1 420px;
}

.alvus-theme .session-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
}

.alvus-theme .session-timer i {
  color: var(--primary-gold);
}

.alvus-theme .session-timer span {
  display: block;
  font-size: 10px;
  color: var(--text-sub);
  line-height: 1.1;
}

.alvus-theme .session-timer strong {
  display: block;
  font-size: 18px;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: 0;
}

.alvus-users-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.alvus-users-list,
.alvus-users-form {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}

.alvus-user-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 12px;
  margin-bottom: 10px;
}

.alvus-users-scroll {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.alvus-user-row {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 10px;
  text-decoration: none;
  color: var(--text-main);
}

.alvus-user-row strong {
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-user-row span,
.alvus-user-row em {
  font-size: 12px;
  color: var(--text-sub);
  font-style: normal;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-user-row.is-active {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.12);
}

.alvus-users-pagination {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-sub);
}

.alvus-users-pagination-links {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.alvus-users-pagination-links a {
  color: #0f172a;
  text-decoration: none;
  font-size: 12px;
}

.alvus-users-form h3 {
  margin: 0 0 6px;
}

.alvus-users-form p {
  margin: 0 0 12px;
  color: var(--text-sub);
  font-size: 12px;
}

.alvus-user-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.alvus-theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alvus-user-tab {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.alvus-user-tab.is-active {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: #111827;
  font-weight: 700;
}

.alvus-user-tab-panel {
  display: none;
  grid-column: 1 / -1;
}

.alvus-user-tab-panel.is-active {
  display: contents;
}

.alvus-permission-grid {
  display: grid;
  gap: 10px;
}

.alvus-permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.alvus-setting-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.alvus-setting-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.alvus-setting-list-row span {
  font-size: 12px;
  color: var(--text-main);
}

.alvus-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.alvus-setting-list-row:hover .alvus-row-actions {
  opacity: 1;
  pointer-events: auto;
}

.alvus-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.alvus-icon-btn:hover {
  background: #f8fafc;
}

.alvus-icon-btn.danger {
  color: #b91c1c;
}

.alvus-form-group-btn-inline {
  max-width: 56px;
}

.alvus-btn-plus {
  min-height: 38px;
  width: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  justify-content: center;
}

.alvus-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.alvus-channel-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.alvus-channel-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alvus-channel-card p {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-sub);
}

.alvus-channel-construction {
  margin: 8px 0 10px;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  font-size: 11px;
  color: #334155;
}

.alvus-channel-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.alvus-channel-card.is-selected {
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.alvus-btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.alvus-channel-card.channel-whatsapp {
  border-color: #c8f1dc;
  background: #f4fcf8;
}

.alvus-channel-card.channel-whatsapp h4,
.alvus-channel-card.channel-whatsapp h4 i {
  color: #15803d;
}

.alvus-channel-card.channel-instagram {
  border-color: #ffd7db;
  background: #fff7f8;
}

.alvus-channel-card.channel-instagram h4,
.alvus-channel-card.channel-instagram h4 i {
  color: #be123c;
}

.alvus-channel-card.channel-messenger {
  border-color: #d7e5ff;
  background: #f6f9ff;
}

.alvus-channel-card.channel-messenger h4,
.alvus-channel-card.channel-messenger h4 i {
  color: #1d4ed8;
}

.alvus-channel-card.channel-facebook { border-color: #dbe7ff; background: #f8faff; }
.alvus-channel-card.channel-facebook h4, .alvus-channel-card.channel-facebook h4 i { color: #1e40af; }
.alvus-channel-card.channel-website { border-color: #e2e8f0; background: #fbfdff; }
.alvus-channel-card.channel-website h4, .alvus-channel-card.channel-website h4 i { color: #0f172a; }
.alvus-channel-card.channel-email { border-color: #fee2e2; background: #fffafa; }
.alvus-channel-card.channel-email h4, .alvus-channel-card.channel-email h4 i { color: #b91c1c; }
.alvus-channel-card.channel-telegram { border-color: #d8ecff; background: #f4faff; }
.alvus-channel-card.channel-telegram h4, .alvus-channel-card.channel-telegram h4 i { color: #0284c7; }
.alvus-channel-card.channel-line { border-color: #dcfce7; background: #f7fff9; }
.alvus-channel-card.channel-line h4, .alvus-channel-card.channel-line h4 i { color: #15803d; }
.alvus-channel-card.channel-sms { border-color: #e2e8f0; background: #fbfdff; }
.alvus-channel-card.channel-sms h4, .alvus-channel-card.channel-sms h4 i { color: #334155; }
.alvus-channel-card.channel-twilio { border-color: #ffe4e6; background: #fff8f8; }
.alvus-channel-card.channel-twilio h4, .alvus-channel-card.channel-twilio h4 i { color: #be123c; }
.alvus-channel-card.channel-tiktok { border-color: #e5e7eb; background: #fbfbfb; }
.alvus-channel-card.channel-tiktok h4, .alvus-channel-card.channel-tiktok h4 i { color: #111827; }
.alvus-channel-card.channel-twitter { border-color: #dbeafe; background: #f8fbff; }
.alvus-channel-card.channel-twitter h4, .alvus-channel-card.channel-twitter h4 i { color: #1d4ed8; }
.alvus-channel-card.channel-linkedin { border-color: #dbeafe; background: #f7fbff; }
.alvus-channel-card.channel-linkedin h4, .alvus-channel-card.channel-linkedin h4 i { color: #0a66c2; }
.alvus-channel-card.channel-api { border-color: #ede9fe; background: #faf9ff; }
.alvus-channel-card.channel-api h4, .alvus-channel-card.channel-api h4 i { color: #6d28d9; }
.alvus-channel-card.channel-voice { border-color: #ffedd5; background: #fff9f2; }
.alvus-channel-card.channel-voice h4, .alvus-channel-card.channel-voice h4 i { color: #c2410c; }

.alvus-channel-config-shell {
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 0;
  overflow: hidden;
}

.alvus-channel-config-menu {
  border-right: 1px solid var(--border-color);
  padding: 12px;
  background: #fbfdff;
}

.alvus-channel-config-menu h3 {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alvus-channel-config-content {
  padding: 14px;
}

.alvus-channel-config-content h3 {
  margin: 0 0 10px;
}

.alvus-channel-health-box {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.alvus-channel-health-box p {
  margin: 0 0 6px;
  font-size: 12px;
}

.alvus-channel-health-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-sub);
}

.alvus-channel-diagnostics-shell {
  margin-top: 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.alvus-channel-diagnostics-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.alvus-channel-diagnostics-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.alvus-channel-diagnostics-head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

.alvus-channel-diagnostics-empty {
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  color: var(--text-sub);
  background: #fbfdff;
  font-size: 13px;
}

.alvus-channel-diagnostics-empty.is-error {
  border-color: rgba(185, 28, 28, 0.25);
  background: #fff8f8;
  color: #991b1b;
}

.alvus-channel-diagnostics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.alvus-channel-diagnostic-kpi {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.alvus-channel-diagnostic-kpi small {
  display: block;
  margin-bottom: 3px;
  color: var(--text-sub);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.alvus-channel-diagnostic-kpi strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.alvus-channel-diagnostic-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--alvus-icon-color, #0f172a);
}

.alvus-channel-diagnostic-kpi.tone-healthy { border-color: #d9f6e5; background: #f7fdf9; }
.alvus-channel-diagnostic-kpi.tone-warning { border-color: #fde7bf; background: #fffdf7; }
.alvus-channel-diagnostic-kpi.tone-critical { border-color: #ffd8d8; background: #fff8f8; }
.alvus-channel-diagnostic-kpi.tone-planned { border-color: #e2e8f0; background: #fbfdff; }

.alvus-channel-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.alvus-channel-diagnostic-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.alvus-channel-diagnostic-card.tone-healthy { border-color: #d9f6e5; }
.alvus-channel-diagnostic-card.tone-warning { border-color: #fde7bf; }
.alvus-channel-diagnostic-card.tone-critical { border-color: #ffd8d8; }
.alvus-channel-diagnostic-card.tone-planned,
.alvus-channel-diagnostic-card.tone-inactive { border-color: #e2e8f0; }

.alvus-channel-diagnostic-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.alvus-channel-diagnostic-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alvus-channel-diagnostic-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: var(--alvus-icon-color, #0f172a);
}

.alvus-channel-diagnostic-title h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.alvus-channel-diagnostic-title p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.55;
}

.alvus-channel-diagnostic-meta,
.alvus-channel-diagnostic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--text-sub);
}

.alvus-channel-diagnostic-meta strong,
.alvus-channel-diagnostic-stats strong {
  color: var(--text-main);
  font-weight: 600;
}

.alvus-channel-diagnostic-block {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 10px;
}

.alvus-channel-diagnostic-block-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-sub);
}

.alvus-channel-diagnostic-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.6;
}

.alvus-channel-diagnostic-account-list {
  display: grid;
  gap: 8px;
}

.alvus-channel-diagnostic-account {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 10px 11px;
  background: #fbfdff;
}

.alvus-channel-diagnostic-account.tone-healthy { border-color: #d9f6e5; }
.alvus-channel-diagnostic-account.tone-warning { border-color: #fde7bf; }
.alvus-channel-diagnostic-account.tone-critical { border-color: #ffd8d8; }

.alvus-channel-diagnostic-account strong,
.alvus-channel-diagnostic-account small,
.alvus-channel-diagnostic-account p {
  display: block;
}

.alvus-channel-diagnostic-account small {
  margin-top: 3px;
  color: var(--text-sub);
  font-size: 11px;
}

.alvus-channel-diagnostic-account p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.5;
}

.alvus-channel-diagnostic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alvus-channel-diagnostic-action {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  font-size: 11px;
  color: var(--text-main);
}

.alvus-channel-diagnostics-timestamp {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-sub);
  text-align: right;
}

.alvus-modal.alvus-modal-lg {
  width: min(1120px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.alvus-modal.alvus-modal-xl {
  width: min(1280px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.alvus-modal.alvus-modal-lg .alvus-modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 170px);
}

.alvus-modal.alvus-modal-xl .alvus-modal-body {
  overflow-y: auto;
  max-height: calc(92vh - 170px);
}

.alvus-table-wrap {
  width: 100%;
  overflow: auto;
  max-height: 320px;
}

.alvus-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.alvus-mini-table th,
.alvus-mini-table td {
  border-bottom: 1px solid var(--border-color);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
}

.alvus-mini-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-sub);
}

.alvus-btn-full {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  text-decoration: none;
  display: inline-block;
}

.alvus-user-row {
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
  padding-right: 92px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.alvus-user-row-btn {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.alvus-user-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px -12px rgba(15, 23, 42, 0.45);
}

.alvus-user-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.alvus-user-row-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.alvus-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: #334155;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.alvus-settings-nav .alvus-user-row {
  padding-right: 12px;
}

.alvus-settings-nav .alvus-user-row-head {
  gap: 8px;
}

.alvus-settings-nav .alvus-user-avatar {
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.alvus-settings-nav .alvus-user-avatar i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: var(--alvus-icon-color);
}

.alvus-status-badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
}

.alvus-user-row .alvus-status-badge {
  position: absolute;
  right: 10px;
  top: 10px;
}

.alvus-status-badge.is-online {
  color: #166534;
  background: #dcfce7;
}

.alvus-status-badge.is-offline {
  color: #991b1b;
  background: #fee2e2;
}

.alvus-status-badge.is-warning {
  color: #92400e;
  background: #fef3c7;
}

.alvus-notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.alvus-notification-list {
  display: grid;
  gap: 10px;
  max-height: min(50vh, 460px);
  overflow: auto;
  padding-right: 4px;
}

.alvus-notification-item {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.alvus-notification-item.is-unread {
  border-color: #facc15;
  background: #fffbeb;
}

.alvus-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.alvus-notification-head time {
  font-size: 11px;
  color: #64748b;
}

.alvus-notification-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.alvus-notification-item p {
  margin: 0 0 8px;
  color: #334155;
  font-size: 13px;
}

.alvus-notification-detail-link {
  margin-bottom: 8px;
}

.alvus-notification-detail-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.alvus-notification-read-form {
  display: flex;
  justify-content: flex-end;
}

.alvus-notification-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--alvus-border-color);
  border-radius: 10px;
  color: #64748b;
  text-align: center;
}

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #64748b;
  margin-left: 6px;
  cursor: help;
  position: relative;
}

.field-help:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: normal;
  width: 260px;
  max-width: min(260px, 72vw);
  z-index: 20;
}

.alvus-users-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  flex-direction: row;
  flex-wrap: nowrap;
}

.alvus-btn-danger {
  background: #b91c1c;
  color: #ffffff !important;
  border: 1px solid #b91c1c;
}

.alvus-btn-success {
  background: #15803d;
  color: #ffffff !important;
  border: 1px solid #15803d;
}

.alvus-users-actions .alvus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.field-help-title {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

body[data-screen="inbox"] .oc-main {
  padding: 0;
  height: 100%;
  min-height: 0;
}

body[data-screen="inbox"] .oc-topbar {
  display: none;
}

body[data-screen="crm"] .oc-topbar {
  display: none;
}

body[data-screen="crm"] .oc-main {
  padding-top: 10px;
}

body[data-screen="inbox"] .oc-workspace {
  margin: 0;
  height: 100%;
  min-height: 0;
}

body[data-screen="inbox"] .oc-panel.oc-panel-large {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  height: 100%;
  min-height: 0;
}

body[data-screen="inbox"] [data-live-workspace] {
  height: 100%;
  min-height: 0;
}

body[data-screen="inbox"] .content-area {
  overflow: hidden;
  height: calc(100vh - var(--alvus-topbar-height) - var(--alvus-footer-height));
  min-height: 0;
}

body[data-screen="inbox"] .chat-container {
  height: 100%;
  min-height: 0;
}

body[data-screen="inbox"] .chat-view,
body[data-screen="inbox"] .chat-view-body,
body[data-screen="inbox"] .conversation-list,
body[data-screen="inbox"] .details-sidebar {
  min-height: 0;
}

.alvus-inbox-tab-manager {
  margin-top: 10px;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}

.alvus-inbox-tab-manager h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.alvus-inbox-tab-manager .alvus-setting-list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.alvus-drag-handle {
  cursor: grab;
  color: #64748b;
}

.alvus-drag-handle:active {
  cursor: grabbing;
}

.alvus-inbox-tab-manager .alvus-setting-list-row.is-drag-over {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.12);
}

.alvus-inbox-tab-row-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 160px) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.alvus-inbox-tab-row-form input,
.alvus-inbox-tab-row-form select {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 10px;
}

.alvus-inbox-tab-static {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.alvus-inbox-tab-static strong {
  color: var(--alvus-text-main);
  font-size: 13px;
}

.alvus-inbox-tab-static span {
  color: var(--alvus-text-sub);
  font-size: 11px;
  font-weight: 700;
}

.alvus-inbox-tab-create {
  margin-top: 10px;
  align-items: end;
}

.alvus-inbound-toast-stack {
  position: fixed;
  right: 18px;
  top: calc(var(--alvus-topbar-height) + 12px);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.alvus-inbound-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-left: 4px solid var(--alvus-tech-blue);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  padding: 10px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.alvus-inbound-toast.is-warning {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.alvus-inbound-toast.is-warning .alvus-inbound-toast-avatar {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.alvus-inbound-toast.is-waiting-warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.alvus-inbound-toast.is-waiting-warning .alvus-inbound-toast-avatar {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.alvus-inbound-toast.is-waiting-warning .alvus-toast-close,
.alvus-inbound-toast.is-waiting-warning .alvus-toast-tip {
  color: #92400e;
}

.alvus-inbound-toast.is-persistent {
  cursor: default;
}

.alvus-toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #7f1d1d;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.alvus-toast-tip {
  margin-top: 6px;
  font-size: 11px;
  color: #7f1d1d;
}

.alvus-toast-department {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: 0;
  text-transform: uppercase;
}

.alvus-toast-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #4b5563;
}

.alvus-inbound-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.alvus-inbound-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.alvus-inbound-toast-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.12);
  color: var(--alvus-tech-blue);
  font-size: 16px;
}

.alvus-inbound-toast-body {
  min-width: 0;
}

.alvus-inbound-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alvus-inbound-toast-head strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  color: var(--alvus-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-inbound-toast-head span {
  color: var(--alvus-text-sub);
  font-size: 14px;
}

.alvus-inbound-toast-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--alvus-text-sub);
  line-height: 1.35;
  word-break: break-word;
}

.alvus-system-toast-stack {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 6001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.alvus-system-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-left: 4px solid var(--alvus-tech-blue);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  padding: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.alvus-system-toast.is-success {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.alvus-system-toast.is-error {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.alvus-system-toast.is-info {
  border-left-color: #0ea5e9;
  background: #f0f9ff;
}

.alvus-system-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.alvus-system-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.alvus-system-toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.12);
  color: var(--alvus-tech-blue);
  font-size: 14px;
}

.alvus-system-toast.is-success .alvus-system-toast-icon {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.alvus-system-toast.is-error .alvus-system-toast-icon {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.alvus-system-toast-body {
  min-width: 0;
}

.alvus-system-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alvus-system-toast-head strong {
  font-size: 13px;
  color: var(--alvus-text-main);
}

.alvus-system-toast-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--alvus-text-sub);
  line-height: 1.35;
  word-break: break-word;
}

/* CRM V2 */
.alvus-crm-screen {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.alvus-crm-health-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
}

.alvus-crm-health-pill {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.alvus-crm-health-pill span {
  font-size: 11px;
  color: var(--alvus-text-sub);
}

.alvus-crm-health-pill strong {
  font-size: 13px;
  color: var(--alvus-text-main);
}

.alvus-crm-health-pill.is-warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.alvus-report-pill {
  padding: 12px 12px;
  gap: 6px;
  min-height: 260px;
  align-content: center;
  justify-items: start;
}

.alvus-report-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.alvus-report-pill strong {
  font-size: 40px;
  line-height: 1;
}

.alvus-report-pill.is-outbound {
  background: #ecfeff;
  border-color: #67e8f9;
}

.alvus-report-pill.is-inbound {
  background: #eff6ff;
  border-color: #93c5fd;
}

.alvus-report-pill.is-customers {
  background: #f0fdf4;
  border-color: #86efac;
}

.alvus-report-pill.is-response {
  background: #fffbeb;
  border-color: #fcd34d;
}

.alvus-crm-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.alvus-platform-screen {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.alvus-platform-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.alvus-platform-grid.is-access {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alvus-platform-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}

.alvus-platform-access-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.alvus-platform-access-feedback {
  min-width: 0;
  position: sticky;
  top: 16px;
}

.alvus-platform-card {
  min-width: 0;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  box-shadow: 0 12px 28px -26px rgba(15, 23, 42, 0.48);
}

.alvus-platform-card h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--alvus-text-main);
}

.alvus-platform-card.is-kpi {
  display: grid;
  align-content: center;
  gap: 4px;
}

.alvus-platform-card.is-kpi span,
.alvus-platform-card small,
.alvus-platform-toolbar label span {
  color: var(--alvus-text-sub);
  font-size: 11px;
  font-weight: 700;
}

.alvus-platform-card.is-kpi strong {
  color: var(--alvus-text-main);
  font-size: 38px;
  line-height: 1;
}

.alvus-platform-code-list {
  display: grid;
  gap: 8px;
}

.alvus-platform-code-list code,
.alvus-platform-output {
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  background: #f8fafc;
}

.alvus-platform-code-list code {
  padding: 7px 9px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-platform-toolbar,
.alvus-platform-form-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.alvus-platform-toolbar.is-compact {
  margin-top: 10px;
  align-items: center;
}

.alvus-platform-user-card {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.alvus-platform-user-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ffffff;
  color: var(--alvus-icon-color);
  border: 1px solid var(--alvus-border-color);
}

.alvus-platform-user-card div:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.alvus-platform-user-card strong,
.alvus-platform-user-card span,
.alvus-platform-user-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-platform-user-card strong {
  color: var(--alvus-text-main);
  font-size: 14px;
}

.alvus-platform-user-card span,
.alvus-platform-user-card small {
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-platform-toolbar label {
  display: grid;
  gap: 4px;
}

.alvus-platform-toolbar select,
.alvus-platform-form-row input,
.alvus-platform-form-row select {
  min-height: 38px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
}

.alvus-platform-toolbar select {
  min-width: 240px;
}

.alvus-platform-form-row input,
.alvus-platform-form-row select {
  flex: 1 1 180px;
  min-width: 0;
}

.alvus-platform-check {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 700;
}

.alvus-platform-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alvus-platform-actions {
  margin-top: 10px;
}

.alvus-platform-output {
  min-height: 90px;
  max-height: 300px;
  margin: 0;
  padding: 12px;
  color: #0f172a;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
}

.alvus-platform-access-feedback .alvus-platform-output {
  min-height: 220px;
  max-height: 520px;
}

@media (min-width: 1200px) {
  .alvus-report-pill {
    min-height: 300px;
  }
}

.alvus-crm-toolbar {
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.alvus-crm-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alvus-crm-toolbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.alvus-crm-inline-search {
  height: 36px;
  border: 1px solid var(--alvus-border-color);
  background: #fff;
  border-radius: 8px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, 100%);
}

.alvus-crm-inline-search i {
  color: var(--alvus-text-sub);
  font-size: 12px;
}

.alvus-crm-inline-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
}

.alvus-crm-toolbar-center select {
  height: 36px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.alvus-crm-toolbar-left strong {
  font-size: 13px;
  color: var(--alvus-text-main);
}

.alvus-crm-toolbar-left select {
  min-width: 240px;
  height: 36px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.alvus-crm-toolbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.alvus-crm-toolbar-actions-main,
.alvus-crm-toolbar-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.alvus-crm-more {
  position: relative;
}

.alvus-crm-more summary {
  list-style: none;
  user-select: none;
}

.alvus-crm-more summary::-webkit-details-marker {
  display: none;
}

.alvus-crm-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: none;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 36px -24px rgba(15, 23, 42, 0.52);
}

.alvus-crm-more-menu.is-open {
  display: grid;
  gap: 4px;
}

.alvus-crm-more[open] .alvus-crm-more-menu {
  display: grid;
  gap: 4px;
}

.alvus-crm-more-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--alvus-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.alvus-crm-more-menu button:hover {
  background: #f8fafc;
}

.alvus-crm-more-menu i {
  width: 16px;
  color: var(--alvus-icon-color);
}

.alvus-crm-suggestions-list {
  max-height: min(66vh, 540px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.alvus-table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #fff;
}

.alvus-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.alvus-table th,
.alvus-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  white-space: nowrap;
}

.alvus-crm-suggestion-item {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.alvus-crm-suggestion-item h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.alvus-crm-suggestion-item p {
  margin: 0 0 8px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  line-height: 1.4;
}

.alvus-crm-suggestion-item small {
  display: block;
  color: var(--alvus-text-sub);
  margin-bottom: 8px;
}

.alvus-crm-suggestion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.alvus-link-summary {
  border: 1px dashed var(--alvus-border-color);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--alvus-text-sub);
}

.alvus-crm-next-action {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 10px;
  padding: 10px;
}

.alvus-crm-next-action strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #92400e;
}

.alvus-crm-next-action p {
  margin: 6px 0 4px;
  font-size: 13px;
  color: var(--alvus-text-main);
}

.alvus-crm-next-action small {
  display: block;
  color: #6b7280;
  margin-bottom: 8px;
}

.alvus-crm-inline-create {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alvus-crm-inline-create input {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 8px;
  padding: 0 10px;
}

.alvus-crm-board-wrap {
  min-height: 0;
}

.alvus-crm-board {
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 12px;
  align-items: start;
  padding-bottom: 4px;
}

.alvus-crm-column {
  background: #ffffff;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  min-height: 220px;
  max-height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.alvus-crm-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--alvus-border-color);
}

.alvus-crm-column-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--alvus-text-main);
}

.alvus-crm-column-head span {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0b76a8;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.alvus-crm-column-value {
  padding: 8px 12px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  border-bottom: 1px solid var(--alvus-border-color);
}

.alvus-crm-column-cards {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.alvus-crm-card {
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.alvus-crm-card:active {
  cursor: grabbing;
}

.alvus-crm-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.alvus-crm-card.is-dragging {
  opacity: 0.7;
}

.alvus-crm-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.alvus-crm-card header strong {
  font-size: 13px;
  color: var(--alvus-text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alvus-crm-card-status {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--alvus-border-color);
  background: #f8fafc;
}

.alvus-crm-card-status.is-open { color: #0369a1; background: #e0f2fe; border-color: #bae6fd; }
.alvus-crm-card-status.is-pending { color: #7c3aed; background: #f3e8ff; border-color: #ddd6fe; }
.alvus-crm-card-status.is-won { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.alvus-crm-card-status.is-lost { color: #991b1b; background: #fee2e2; border-color: #fecaca; }

.alvus-crm-card p {
  margin: 0;
  font-size: 12px;
  color: var(--alvus-text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alvus-crm-card .alvus-crm-account {
  margin: -2px 0 0;
  font-size: 11px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.alvus-crm-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--alvus-text-main);
  font-weight: 600;
}

.alvus-crm-card-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alvus-crm-card-ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 6px;
}

.alvus-crm-quick-apply {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.alvus-priority-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--alvus-border-color);
  vertical-align: middle;
}

.alvus-priority-tag.is-alta {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.alvus-priority-tag.is-media {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.alvus-priority-tag.is-baixa {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.alvus-crm-empty {
  border: 1px dashed var(--alvus-border-color);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--alvus-text-sub);
  font-size: 12px;
  padding: 12px;
  text-align: center;
}

.alvus-crm-column.is-drag-over {
  border-color: var(--alvus-primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.alvus-crm-column.is-drop-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.alvus-crm-column.is-drop-loading::after {
  content: "Movendo...";
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 8px;
}

@media (max-width: 1100px) {
  .alvus-form-grid.alvus-grid-vacations {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .alvus-form-grid.alvus-grid-holidays {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .alvus-org-grid,
  .alvus-org-grid-3 {
    grid-template-columns: 1fr;
  }

  .alvus-color-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

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

  .alvus-channel-config-shell {
    grid-template-columns: 1fr;
  }

  .alvus-channel-config-menu {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .alvus-channel-diagnostics-head {
    flex-direction: column;
  }

  .alvus-theme .session-timer {
    display: none;
  }

  .alvus-inbox-tab-row-form {
    grid-template-columns: 1fr;
  }

  .alvus-crm-toolbar {
    flex-wrap: wrap;
  }

  .alvus-crm-health-row {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .alvus-crm-toolbar-left,
  .alvus-crm-toolbar-center,
  .alvus-crm-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .alvus-crm-toolbar-actions-main,
  .alvus-crm-toolbar-actions-secondary {
    justify-content: flex-start;
  }

  .alvus-crm-more-menu {
    left: 0;
    right: auto;
  }

  .alvus-platform-grid,
  .alvus-platform-grid.is-access,
  .alvus-platform-access-layout {
    grid-template-columns: 1fr;
  }

  .alvus-platform-access-feedback {
    position: static;
  }

  .alvus-crm-inline-search {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 680px) {
  .alvus-form-grid.alvus-grid-holidays,
  .alvus-form-grid.alvus-grid-vacations {
    grid-template-columns: 1fr;
  }

  .alvus-color-grid {
    grid-template-columns: 1fr;
  }

  .alvus-crm-health-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Global UX/UI Refinement Pack (Wave 1 - safe visual upgrade)
   ============================================================ */
:root {
  --alvus-shadow-sm: 0 8px 18px -16px rgba(15, 23, 42, 0.55);
  --alvus-shadow-md: 0 16px 34px -24px rgba(15, 23, 42, 0.62);
  --alvus-shadow-lg: 0 26px 50px -34px rgba(15, 23, 42, 0.7);
  --alvus-focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.2);
  --alvus-ease-standard: cubic-bezier(.2, .8, .2, 1);
}

body.alvus-theme {
  letter-spacing: 0;
}

.alvus-theme .oc-main section,
.alvus-theme .oc-panel,
.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-setting-card,
.alvus-theme .alvus-crm-column,
.alvus-theme .alvus-contact-card {
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-theme .oc-main h1,
.alvus-theme .oc-main h2,
.alvus-theme .oc-main h3 {
  letter-spacing: 0;
}

/* Buttons */
.alvus-btn,
.oc-button,
.action-btn,
.action-btn-chat,
.alvus-icon-btn {
  transition: transform .18s var(--alvus-ease-standard), box-shadow .18s var(--alvus-ease-standard), border-color .18s var(--alvus-ease-standard), background-color .18s var(--alvus-ease-standard), color .18s var(--alvus-ease-standard);
}

.alvus-btn,
.oc-button {
  border-radius: 10px;
  min-height: 34px;
  padding: 7px 12px;
  font-weight: 700;
}

.alvus-btn:hover:not(:disabled),
.oc-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-btn:active:not(:disabled),
.oc-button:active:not(:disabled) {
  transform: translateY(0);
}

.action-btn-chat,
.action-btn,
.alvus-icon-btn {
  border-radius: 10px;
}

.action-btn-chat:hover:not(:disabled),
.action-btn:hover:not(:disabled),
.alvus-icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-theme button:focus-visible,
.alvus-theme a:focus-visible,
.alvus-theme input:focus-visible,
.alvus-theme select:focus-visible,
.alvus-theme textarea:focus-visible {
  outline: none;
  box-shadow: var(--alvus-focus-ring);
}

/* Inputs and form rhythm */
.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.alvus-theme select,
.alvus-theme textarea {
  border-radius: 10px;
  min-height: 36px;
}

.alvus-form-group {
  gap: 6px;
}

.alvus-form-group label {
  font-weight: 700;
  font-size: 12px;
  color: #334155;
}

.alvus-form-actions,
.alvus-form-actions-inline,
.details-file-actions {
  gap: 8px;
}

/* Modal polish */
.alvus-modal {
  border-radius: 14px;
  box-shadow: var(--alvus-shadow-lg);
}

.alvus-modal-header {
  padding: 14px 18px;
}

.alvus-modal-body {
  padding: 16px 18px;
}

.alvus-modal-footer {
  padding: 12px 18px;
}

.alvus-modal-close {
  border-radius: 10px;
}

/* Lists and rows */
.details-file-item,
.details-timeline-item,
.alvus-setting-list-row {
  transition: background-color .18s var(--alvus-ease-standard), border-color .18s var(--alvus-ease-standard), transform .18s var(--alvus-ease-standard);
}

.details-timeline-item:hover,
.alvus-setting-list-row:hover {
  background: #f1f5f9;
}

/* Search and topbar controls */
.alvus-theme .search-wrapper,
.alvus-theme .chat-sidebar-search,
.alvus-theme .alvus-conversation-filter input {
  border-radius: 10px;
}

/* ============================================================
   Wave 2 - Screen-specific polish
   ============================================================ */

/* Omnichat */
body[data-screen="inbox"] .chat-container {
  border-radius: 16px;
  box-shadow: var(--alvus-shadow-md);
}

body[data-screen="inbox"] .chat-tabs-container {
  padding: 9px 10px;
  gap: 7px;
}

body[data-screen="inbox"] .tab-btn {
  min-height: 34px;
  border-radius: 10px;
}

body[data-screen="inbox"] .conversation-list {
  padding: 10px;
  gap: 9px;
}

body[data-screen="inbox"] .chat-item {
  border-radius: 0 13px 13px 0;
  box-shadow: 0 7px 20px -18px rgba(15, 23, 42, 0.7);
}

body[data-screen="inbox"] .chat-item:hover {
  transform: translateY(-1px);
}

body[data-screen="inbox"] .chat-view-header {
  padding: 10px 16px 11px;
  align-items: flex-start;
  min-height: 84px;
}

body[data-screen="inbox"] .chat-view-header-main {
  gap: 3px;
}

body[data-screen="inbox"] .details-sidebar > [data-conversation-side] {
  padding: 14px 12px;
  gap: 10px;
}

body[data-screen="inbox"] .details-info-section {
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e8edf4;
}

body[data-screen="inbox"] .details-contact-open-btn {
  min-height: 28px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

/* Contacts */
body[data-screen="contacts"] .alvus-contacts-toolbar {
  align-items: center;
  gap: 10px;
  padding-bottom: 2px;
}

body[data-screen="contacts"] .alvus-contacts-search {
  min-height: 40px;
}

body[data-screen="contacts"] .alvus-contact-card {
  border-radius: 14px;
  padding: 18px;
}

body[data-screen="contacts"] .alvus-contact-card-name {
  font-size: 14px;
  font-weight: 800;
}

body[data-screen="contacts"] .alvus-contact-card-tags span {
  padding: 4px 10px;
}

/* Users and Settings */
body[data-screen="users"] .alvus-users-layout,
.alvus-users-layout {
  gap: 14px;
}

/* Settings: remove outer panel "card" and keep emphasis on split blocks only */
body[data-screen="settings"] .oc-panel.oc-panel-large {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

body[data-screen="settings"] .oc-workspace,
body[data-screen="settings"] .oc-workspace.oc-workspace,
body[data-screen="settings"] .oc-main > section.oc-workspace {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-screen="settings"] .oc-workspace [data-live-workspace] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Settings modals: allow full-screen modal without clipping by right form container */
body[data-screen="settings"] .alvus-users-form {
  overflow: visible !important;
}

body[data-screen="settings"] .alvus-users-form .alvus-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 4000 !important;
}

/* Global: same floating composition for all screens (no outer container card) */
body.alvus-theme .oc-main > section.oc-workspace {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.alvus-theme .oc-main > section.oc-workspace > .oc-panel.oc-panel-large {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

body.alvus-theme .oc-main > section.oc-workspace > .oc-panel.oc-panel-large > [data-live-workspace] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.alvus-users-list,
.alvus-users-form,
.alvus-setting-card {
  border-radius: 14px;
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-users-scroll {
  padding-right: 4px;
}

.alvus-user-list-item,
.alvus-setting-list-row {
  border-radius: 10px;
}

.alvus-user-list-item:hover,
.alvus-setting-list-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -16px rgba(15, 23, 42, 0.62);
}

/* CRM */
body[data-screen="crm"] .alvus-crm-screen {
  gap: 12px;
}

body[data-screen="crm"] .alvus-crm-health-row {
  gap: 10px;
}

body[data-screen="crm"] .alvus-crm-health-pill {
  min-height: 102px;
  border-radius: 12px;
}

body[data-screen="crm"] .alvus-crm-toolbar {
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e7edf5;
  background: #ffffff;
}

body[data-screen="crm"] .alvus-crm-inline-search,
body[data-screen="crm"] .alvus-crm-toolbar select {
  min-height: 36px;
  border-radius: 10px;
}

body[data-screen="crm"] .alvus-crm-column {
  border-radius: 12px;
}

body[data-screen="crm"] .alvus-crm-column-head {
  padding-bottom: 8px;
}

body[data-screen="crm"] .alvus-crm-card {
  border-radius: 12px;
  box-shadow: 0 10px 20px -18px rgba(15, 23, 42, 0.7);
}

body[data-screen="crm"] .alvus-crm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -20px rgba(15, 23, 42, 0.75);
}

/* Modal refinement by density */
.alvus-modal .alvus-form-grid {
  gap: 12px 12px;
}

.alvus-modal .details-files-list,
.alvus-modal .details-timeline-list {
  border-radius: 10px;
}

/* ============================================================
   Wave 3 - Microinteractions, feedback and accessibility
   ============================================================ */

/* Loading shimmer */
.alvus-live-loading {
  position: relative;
  overflow: hidden;
}

.alvus-live-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0.58) 45%, rgba(255, 255, 255, 0) 72%);
  transform: translateX(-120%);
  animation: alvusShimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes alvusShimmer {
  100% { transform: translateX(120%); }
}

/* Scrollbar polish */
.conversation-list,
.chat-view-body,
.details-files-list,
.details-timeline-list,
.alvus-modal-body-scroll,
.alvus-users-scroll,
.alvus-templates-list-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.conversation-list::-webkit-scrollbar,
.chat-view-body::-webkit-scrollbar,
.details-files-list::-webkit-scrollbar,
.details-timeline-list::-webkit-scrollbar,
.alvus-modal-body-scroll::-webkit-scrollbar,
.alvus-users-scroll::-webkit-scrollbar,
.alvus-templates-list-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.conversation-list::-webkit-scrollbar-thumb,
.chat-view-body::-webkit-scrollbar-thumb,
.details-files-list::-webkit-scrollbar-thumb,
.details-timeline-list::-webkit-scrollbar-thumb,
.alvus-modal-body-scroll::-webkit-scrollbar-thumb,
.alvus-users-scroll::-webkit-scrollbar-thumb,
.alvus-templates-list-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.conversation-list::-webkit-scrollbar-thumb:hover,
.chat-view-body::-webkit-scrollbar-thumb:hover,
.details-files-list::-webkit-scrollbar-thumb:hover,
.details-timeline-list::-webkit-scrollbar-thumb:hover,
.alvus-modal-body-scroll::-webkit-scrollbar-thumb:hover,
.alvus-users-scroll::-webkit-scrollbar-thumb:hover,
.alvus-templates-list-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8, #64748b);
  background-clip: padding-box;
}

/* Toast auto-dismiss progress indicator */
.alvus-system-toast.is-auto-dismiss,
.alvus-inbound-toast.is-auto-dismiss {
  position: relative;
  overflow: hidden;
}

.alvus-system-toast.is-auto-dismiss::after,
.alvus-inbound-toast.is-auto-dismiss::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.95), rgba(2, 132, 199, 0.85));
  transform-origin: left center;
  animation: alvusToastCountdown var(--alvus-toast-duration, 4200ms) linear forwards;
}

.alvus-system-toast.is-success.is-auto-dismiss::after {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.alvus-system-toast.is-error.is-auto-dismiss::after {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

@keyframes alvusToastCountdown {
  to { transform: scaleX(0); }
}

/* Conversa nova: realce leve */
.chat-new-pill {
  animation: alvusPulseNew 1.5s ease-in-out infinite;
}

@keyframes alvusPulseNew {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.15); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.06); }
}

/* Button tactile feedback (subtle) */
.alvus-btn:active:not(:disabled),
.oc-button:active:not(:disabled),
.action-btn-chat:active:not(:disabled),
.action-btn:active:not(:disabled) {
  filter: saturate(1.05);
}

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

/* ============================================================
   Wave 4 - Ultra-fine polish (pixel-level)
   ============================================================ */

:root {
  --alvus-text-strong: #0f172a;
  --alvus-text-soft: #475569;
  --alvus-divider-soft: #e9eff6;
}

/* Typographic rhythm */
body.alvus-theme {
  line-height: 1.5;
}

.chat-name {
  line-height: 1.22;
}

.chat-last-msg,
.details-file-meta small,
.details-timeline-item span,
.details-timeline-item small {
  color: var(--alvus-text-soft);
  line-height: 1.35;
}

.details-timeline-item.is-internal-note {
  border-left-color: #f59e0b;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.78), rgba(255, 255, 255, 0.94));
}

.alvus-inline-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
}

.info-label {
  letter-spacing: .045em;
}

/* Omnichat alignment precision */
body[data-screen="inbox"] .chat-sidebar-header {
  padding: 10px 12px 9px;
}

body[data-screen="inbox"] .chat-sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px 9px;
  border-bottom: 1px solid var(--alvus-divider-soft);
  background: rgba(248, 250, 252, 0.88);
}

body[data-screen="inbox"] .chat-sync-strip small {
  color: var(--alvus-text-sub);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

body[data-screen="inbox"] .chat-presence-line {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

body[data-screen="inbox"] .chat-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #166534;
  font-size: 11px;
  font-weight: 600;
}

body[data-screen="inbox"] .chat-presence-pill i {
  font-size: 8px;
}

body[data-screen="inbox"] .chat-sidebar-search,
body[data-screen="inbox"] .alvus-conversation-filter {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-screen="inbox"] .chat-channel-badge {
  width: 19px;
  height: 19px;
  right: -5px;
  bottom: -5px;
}

body[data-screen="inbox"] .chat-time {
  font-variant-numeric: tabular-nums;
}

body[data-screen="inbox"] .chat-view-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* Subtle separators in dense areas */
body[data-screen="inbox"] .details-info-section + .details-info-section {
  margin-top: 2px;
}

.details-file-item,
.details-timeline-item,
.alvus-setting-list-row,
.alvus-user-list-item,
.alvus-crm-card {
  border-color: var(--alvus-divider-soft);
}

/* Buttons and icon harmony */
.alvus-btn i,
.oc-button i,
.action-btn-chat i,
.action-btn i {
  transform: translateY(-0.3px);
}

.alvus-btn,
.oc-button {
  letter-spacing: .005em;
}

.details-contact-open-btn i,
.details-file-download-pill i {
  transform: translateY(-0.25px);
}

/* Modal readability */
.alvus-modal-header h2 {
  letter-spacing: .01em;
}

.alvus-modal-body p,
.alvus-modal-body label,
.alvus-modal-body .info-value {
  color: var(--alvus-text-strong);
}

.alvus-modal-footer {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Contacts premium spacing */
body[data-screen="contacts"] .alvus-contact-card {
  gap: 14px;
}

body[data-screen="contacts"] .alvus-contact-card-footer {
  padding-top: 14px;
}

/* CRM legibility */
body[data-screen="crm"] .alvus-crm-column-head h3 {
  letter-spacing: .01em;
}

body[data-screen="crm"] .alvus-crm-card footer {
  border-top: 1px dashed #e6edf5;
  padding-top: 7px;
}

/* Toast polish */
.alvus-inbound-toast-head strong,
.alvus-system-toast-head strong {
  letter-spacing: .005em;
}

.alvus-toast-close {
  border-radius: 8px;
}

.alvus-toast-close:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* ============================================================
   Wave 5 - Premium / Glass Tech layer (visual-only, safe)
   ============================================================ */

:root {
  --alvus-glass-light: rgba(255, 255, 255, 0.8);
  --alvus-glass-light-strong: rgba(255, 255, 255, 0.9);
  --alvus-glass-dark: rgba(15, 23, 42, 0.78);
  --alvus-glass-border: rgba(100, 116, 139, 0.2);
  --alvus-neon-soft: rgba(212, 175, 55, 0.18);
}

body.alvus-theme.alvus-internal {
  background:
    radial-gradient(1100px 560px at 88% -14%, rgba(148, 163, 184, 0.09), transparent 60%),
    radial-gradient(980px 540px at -10% 114%, rgba(212, 175, 55, 0.1), transparent 57%),
    var(--alvus-content-bg);
}

.alvus-theme .topbar {
  background: var(--alvus-glass-light);
  backdrop-filter: blur(8px) saturate(1.02);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
}

.alvus-theme .topbar-brand {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.93), rgba(30, 41, 59, 0.9));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.alvus-theme .sidebar {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.alvus-theme .search-wrapper,
.alvus-theme .oc-panel,
.alvus-theme .chat-container,
.alvus-theme .alvus-users-list,
.alvus-theme .alvus-users-form,
.alvus-theme .alvus-setting-card,
.alvus-theme .alvus-crm-toolbar,
.alvus-theme .alvus-crm-column,
.alvus-theme .alvus-contact-card,
.alvus-theme .alvus-automation-card {
  background: var(--alvus-glass-light-strong);
  border-color: var(--alvus-glass-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.alvus-theme .chat-container,
.alvus-theme .oc-panel {
  box-shadow:
    0 22px 40px -32px rgba(15, 23, 42, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.36) inset;
}

.alvus-theme .chat-sidebar,
.alvus-theme .chat-view,
.alvus-theme .details-sidebar {
  background: rgba(255, 255, 255, 0.56);
}

.alvus-theme .chat-view-header,
.alvus-theme .chat-view-input,
.alvus-theme .chat-tabs-container,
.alvus-theme .chat-sidebar-header {
  background: rgba(255, 255, 255, 0.86);
}

.alvus-theme .tab-btn,
.alvus-theme .action-btn-chat,
.alvus-theme .alvus-page-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.28);
}

.alvus-theme .tab-btn.is-active,
.alvus-theme .tab-btn.active {
  background: linear-gradient(160deg, #0f172a, #1e293b);
  border-color: #334155;
  box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.82);
}

.alvus-theme .action-btn-chat:hover:not(:disabled),
.alvus-theme .action-btn:hover:not(:disabled),
.alvus-theme .alvus-page-btn:hover:not(:disabled) {
  box-shadow:
    0 10px 20px -16px rgba(15, 23, 42, 0.5),
    0 0 0 1px rgba(212, 175, 55, 0.22) inset;
}

.alvus-theme .alvus-btn-gold,
.alvus-theme .oc-button-primary {
  background: linear-gradient(130deg, #d4af37, #e7c96f);
  border-color: #b9942a;
  box-shadow: 0 10px 20px -16px rgba(171, 135, 24, 0.5);
}

.alvus-theme .alvus-btn-gold:hover:not(:disabled),
.alvus-theme .oc-button-primary:hover:not(:disabled) {
  filter: brightness(1.01) saturate(1.02);
  box-shadow: 0 14px 24px -18px rgba(171, 135, 24, 0.58);
}

.alvus-theme .oc-button-secondary,
.alvus-theme .alvus-btn-outline {
  background: rgba(255, 255, 255, 0.82);
}

.alvus-theme .chat-item {
  box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.72);
}

.alvus-theme .chat-item.active {
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.16),
    0 10px 22px -20px rgba(171, 135, 24, 0.45);
}

.alvus-theme .details-info-section {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.22);
}

.alvus-theme .alvus-modal-overlay {
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(9px) saturate(1.02);
  -webkit-backdrop-filter: blur(9px) saturate(1.02);
}

.alvus-theme .alvus-modal {
  background: rgba(255, 255, 255, 0.94);
  border: 0;
}

.alvus-theme .alvus-modal-header {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92));
}

.alvus-theme .alvus-inbound-toast,
.alvus-theme .alvus-system-toast {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 26px -20px rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.alvus-theme .alvus-crm-card {
  background: rgba(255, 255, 255, 0.92);
}

.alvus-theme .alvus-crm-health-pill {
  background: rgba(255, 255, 255, 0.9);
}

/* Omnichat header adaptive by breakpoint */
body[data-screen="inbox"] .chat-view-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  column-gap: 12px;
  row-gap: 8px;
  min-height: 92px;
  padding: 11px 16px 12px;
}

body[data-screen="inbox"] .chat-view {
  grid-template-rows: minmax(92px, auto) 1fr auto;
}

body[data-screen="inbox"] .chat-view-header-main {
  gap: 4px;
}

@media (max-width: 1360px) {
  body[data-screen="inbox"] .chat-view-header {
    min-height: 98px;
  }
  body[data-screen="inbox"] .chat-view {
    grid-template-rows: minmax(98px, auto) 1fr auto;
  }
}

@media (max-width: 1160px) {
  body[data-screen="inbox"] .chat-view-header {
    grid-template-columns: minmax(0, 1fr);
    min-height: 114px;
    row-gap: 10px;
  }
  body[data-screen="inbox"] .chat-view-header-actions {
    justify-self: start;
    flex-wrap: wrap;
  }
  body[data-screen="inbox"] .chat-view {
    grid-template-rows: minmax(114px, auto) 1fr auto;
  }
}

@media (max-width: 820px) {
  body[data-screen="inbox"] .chat-view-header {
    min-height: 122px;
    padding: 10px 12px 11px;
  }
  body[data-screen="inbox"] .chat-view {
    grid-template-rows: minmax(122px, auto) 1fr auto;
  }
}

/* UX polish for dense operational screens */
body[data-screen="ai-governance"] .oc-main,
body[data-screen="automation"] .oc-main,
body[data-screen="reports"] .oc-main {
  padding: 18px 22px;
}

.alvus-ai-governance-screen,
.alvus-automation-console,
.alvus-reports-screen {
  gap: 18px;
}

.alvus-ai-governance-screen .alvus-automation-toolbar,
.alvus-automation-console .alvus-automation-toolbar,
.alvus-reports-screen .alvus-automation-toolbar {
  padding: 12px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-ai-governance-screen .alvus-automation-grid,
.alvus-automation-console .alvus-automation-grid,
.alvus-reports-screen .alvus-automation-grid {
  gap: 16px;
}

.alvus-ai-governance-screen .alvus-automation-card,
.alvus-automation-console .alvus-automation-card,
.alvus-reports-screen .alvus-automation-card {
  border-radius: 12px;
  padding: 18px;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-ai-governance-screen .alvus-automation-card h3,
.alvus-automation-console .alvus-automation-card h3,
.alvus-reports-screen .alvus-automation-card h3 {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--alvus-text-main);
}

.alvus-ai-identity-card {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.alvus-ai-identity-form {
  display: grid;
  gap: 16px;
}

.alvus-ai-identity-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
}

.alvus-ai-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--alvus-sidebar-bg), var(--alvus-deep-obsidian));
  color: var(--alvus-primary-gold);
  font-size: 20px;
  box-shadow: 0 14px 26px -22px rgba(15, 23, 42, 0.86);
}

.alvus-ai-identity-summary span {
  display: block;
  color: var(--alvus-text-sub);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.alvus-ai-identity-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--alvus-text-main);
  font-size: 18px;
  font-weight: 900;
}

.alvus-ai-identity-summary small {
  display: block;
  margin-top: 3px;
  color: var(--alvus-text-sub);
  font-size: 12px;
  line-height: 1.35;
}

.alvus-ai-global-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  justify-self: end;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.alvus-ai-global-toggle input {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  accent-color: var(--alvus-primary-gold);
}

.alvus-ai-global-toggle span,
.alvus-ai-global-toggle small {
  text-transform: none;
  letter-spacing: 0;
}

.alvus-ai-identity-layout {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(360px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.alvus-ai-config-block {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
}

.alvus-ai-config-block h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--alvus-text-main);
  font-size: 13px;
  font-weight: 900;
}

.alvus-ai-limits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.alvus-ai-limits-grid .alvus-form-group {
  gap: 6px;
}

.alvus-ai-limits-grid .alvus-form-group small {
  color: var(--alvus-text-sub);
  font-size: 11px;
  font-weight: 700;
}

.alvus-ai-status-block {
  grid-column: 1 / -1;
}

.alvus-ai-status-block .alvus-inline-checkbox-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.alvus-ai-actions {
  justify-content: flex-end;
}

body[data-screen="dashboard"] .oc-main {
  padding: 18px;
}

body[data-screen="dashboard"] .topbar-inline-brand {
  display: none;
}

.alvus-dashboard-screen {
  display: grid;
  gap: 14px;
}

.alvus-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96)),
    #0f172a;
  box-shadow: var(--alvus-shadow-sm);
  color: #ffffff;
  overflow: hidden;
  animation: alvusDashRise 420ms ease both;
}

.alvus-dashboard-hero-compact {
  grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
  align-items: center;
  padding: 14px;
}

.alvus-dashboard-brand-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.alvus-dashboard-brand-logo {
  width: 92px;
  height: 76px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  color: #f8e7a0;
  font-size: 24px;
}

.alvus-dashboard-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  padding: 0;
}

.alvus-dashboard-brand-card span,
.alvus-dashboard-brand-card small {
  display: block;
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.alvus-dashboard-brand-card strong {
  display: block;
  margin: 4px 0;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
}

.alvus-dashboard-hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.alvus-dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: #f8e7a0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.alvus-dashboard-hero h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  color: #ffffff;
}

.alvus-dashboard-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.alvus-dashboard-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
}

.alvus-dashboard-hero-metrics > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.alvus-dashboard-hero-metrics span,
.alvus-dashboard-hero-metrics small {
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.alvus-dashboard-hero-metrics strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.alvus-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
}

.alvus-dashboard-kpi,
.alvus-dashboard-card {
  border: 1px solid var(--alvus-border-color);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--alvus-shadow-sm);
}

.alvus-dashboard-kpi {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 136px;
  padding: 15px;
  overflow: hidden;
  animation: alvusDashRise 420ms ease both;
}

.alvus-dashboard-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--dash-accent, #d4af37);
}

.alvus-dashboard-kpi.is-blue { --dash-accent: #2563eb; }
.alvus-dashboard-kpi.is-green { --dash-accent: #059669; }
.alvus-dashboard-kpi.is-gold { --dash-accent: #d4af37; }
.alvus-dashboard-kpi.is-purple { --dash-accent: #7c3aed; }
.alvus-dashboard-kpi.is-rose { --dash-accent: #e11d48; }
.alvus-dashboard-kpi.is-dark { --dash-accent: #0f172a; }

.alvus-dashboard-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--dash-accent, #d4af37);
}

.alvus-dashboard-kpi span {
  color: var(--alvus-text-sub);
  font-size: 12px;
  font-weight: 900;
}

.alvus-dashboard-kpi strong {
  color: var(--alvus-text-main);
  font-size: 30px;
  line-height: 1;
}

.alvus-dashboard-kpi small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.alvus-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.alvus-dashboard-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 260px;
  padding: 16px;
  animation: alvusDashRise 460ms ease both;
}

.alvus-dashboard-card-wide {
  grid-column: span 2;
}

.alvus-dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--alvus-border-color);
}

.alvus-dashboard-card-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--alvus-text-main);
  font-size: 15px;
  font-weight: 900;
}

.alvus-dashboard-card-head p {
  margin: 5px 0 0;
  color: var(--alvus-text-sub);
  font-size: 12px;
  font-weight: 700;
}

.alvus-dashboard-chart {
  min-width: 0;
}

.alvus-dashboard-trend svg {
  width: 100%;
  height: 220px;
  display: block;
}

.alvus-dashboard-axis {
  stroke: #e2e8f0;
  stroke-width: 2;
}

.alvus-dashboard-bar {
  fill: rgba(212, 175, 55, 0.24);
  transform-origin: bottom;
  transform-box: fill-box;
  animation: alvusDashBar 560ms ease both;
  animation-delay: var(--bar-delay, 0ms);
  transition: fill .16s ease, opacity .16s ease, transform .16s ease;
}

.alvus-dashboard-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  animation: alvusDashLine 950ms ease forwards 260ms;
}

.alvus-dashboard-dot {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 4;
  opacity: 0;
  animation: alvusDashDot 260ms ease forwards;
  animation-delay: var(--dot-delay, 0ms);
  transform-origin: center;
  transition: transform .16s ease, fill .16s ease, stroke .16s ease;
}

.alvus-dashboard-trend-labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: -8px;
}

.alvus-dashboard-trend-labels span {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.alvus-dashboard-trend-labels b {
  color: var(--alvus-text-main);
  font-size: 12px;
}

.alvus-dashboard-trend-labels small {
  color: var(--alvus-text-sub);
  font-size: 10px;
  font-weight: 800;
}

.alvus-dashboard-donut-wrap {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.alvus-dashboard-donut-ring {
  width: 172px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  animation: alvusDashSpin 680ms ease both;
  transition: transform .18s ease, box-shadow .18s ease;
}

.alvus-dashboard-donut-ring > div {
  width: 116px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.alvus-dashboard-donut-ring strong {
  color: var(--alvus-text-main);
  font-size: 24px;
  line-height: 1;
}

.alvus-dashboard-donut-ring span {
  color: var(--alvus-text-sub);
  font-size: 10px;
  font-weight: 900;
}

.alvus-dashboard-legend,
.alvus-dashboard-mini-bars,
.alvus-dashboard-funnel,
.alvus-dashboard-status-list,
.alvus-dashboard-insights {
  display: grid;
  gap: 9px;
}

.alvus-dashboard-legend-row,
.alvus-dashboard-status-row,
.alvus-dashboard-insight-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--alvus-border-color);
  border-radius: 10px;
  background: #f8fafc;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.alvus-dashboard-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.alvus-dashboard-legend-row span,
.alvus-dashboard-status-row strong,
.alvus-dashboard-insight-row strong {
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 900;
}

.alvus-dashboard-legend-row strong,
.alvus-dashboard-status-row span {
  color: var(--alvus-text-main);
  font-size: 13px;
  font-weight: 900;
}

.alvus-dashboard-mini-row {
  display: grid;
  gap: 8px;
}

.alvus-dashboard-mini-row > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 900;
}

.alvus-dashboard-mini-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.alvus-dashboard-mini-row span small {
  color: var(--alvus-text-sub);
  font-size: 10px;
  font-weight: 800;
}

.alvus-dashboard-mini-row i {
  color: #d4af37;
}

.alvus-dashboard-mini-row em,
.alvus-dashboard-funnel-row em {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  font-style: normal;
}

.alvus-dashboard-mini-row em b,
.alvus-dashboard-funnel-row em b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4af37, #2563eb);
  transform-origin: left;
  animation: alvusDashWidth 620ms ease both;
  animation-delay: var(--bar-delay, 0ms);
  transition: filter .16s ease, opacity .16s ease;
}

.alvus-dashboard-funnel-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}

.alvus-dashboard-funnel-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.alvus-dashboard-funnel-row strong {
  color: var(--alvus-text-main);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvus-dashboard-funnel-row small,
.alvus-dashboard-status-row small,
.alvus-dashboard-insight-row small {
  color: var(--alvus-text-sub);
  font-size: 10px;
  font-weight: 800;
}

.alvus-dashboard-funnel-row span {
  justify-self: end;
  color: var(--alvus-text-main);
  font-size: 13px;
  font-weight: 900;
}

.alvus-dashboard-insight-row {
  grid-template-columns: 30px minmax(0, 1fr);
}

.alvus-dashboard-insight-row i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.14);
  color: #9a7412;
}

.alvus-dashboard-empty {
  padding: 14px;
  border: 1px dashed var(--alvus-border-color);
  border-radius: 10px;
  color: var(--alvus-text-sub);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.alvus-dashboard-card:hover .alvus-dashboard-bar,
.alvus-dashboard-card:focus-within .alvus-dashboard-bar {
  fill: rgba(37, 99, 235, 0.28);
}

.alvus-dashboard-card:hover .alvus-dashboard-dot,
.alvus-dashboard-card:focus-within .alvus-dashboard-dot {
  transform: scale(1.12);
  fill: #dbeafe;
}

.alvus-dashboard-card:hover .alvus-dashboard-donut-ring,
.alvus-dashboard-card:focus-within .alvus-dashboard-donut-ring {
  transform: scale(1.015);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12), 0 18px 34px rgba(15, 23, 42, 0.08);
}

.alvus-dashboard-legend-row:hover,
.alvus-dashboard-status-row:hover,
.alvus-dashboard-insight-row:hover,
.alvus-dashboard-legend-row:focus-within,
.alvus-dashboard-status-row:focus-within,
.alvus-dashboard-insight-row:focus-within {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.alvus-dashboard-mini-row:hover em b,
.alvus-dashboard-funnel-row:hover em b,
.alvus-dashboard-mini-row:focus-within em b,
.alvus-dashboard-funnel-row:focus-within em b {
  filter: saturate(1.12) brightness(1.02);
}

.alvus-theme .alvus-dashboard-footer-note {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--alvus-text-sub);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: none;
}

.alvus-ai-governance-screen .details-timeline-list,
.alvus-automation-console .details-timeline-list,
.alvus-automation-console .details-files-list,
.alvus-reports-screen .details-files-list {
  gap: 9px;
}

.alvus-ai-governance-screen .details-timeline-item,
.alvus-automation-console .details-timeline-item,
.alvus-automation-console .details-file-item,
.alvus-reports-screen .details-file-item {
  border-radius: 10px;
  border: 1px solid var(--alvus-border-color);
  background: #ffffff;
  padding: 11px 12px;
}

.alvus-ai-governance-screen .details-timeline-item strong,
.alvus-automation-console .details-timeline-item strong,
.alvus-automation-console .details-file-meta a,
.alvus-reports-screen .details-file-meta a {
  color: var(--alvus-text-main);
  font-weight: 800;
}

.alvus-reports-card .alvus-automation-card-head {
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--alvus-border-color);
  margin-bottom: 16px;
}

.alvus-report-metrics {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.alvus-report-pill {
  position: relative;
  min-height: 138px;
  padding: 18px;
  align-content: start;
  justify-items: stretch;
  border-radius: 14px;
  overflow: hidden;
}

.alvus-report-pill::after {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.alvus-report-pill-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.alvus-report-pill span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.alvus-report-pill strong {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  color: #0f172a;
}

.alvus-report-pill small {
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

@media (min-width: 1200px) {
  .alvus-report-pill {
    min-height: 138px;
  }
}

@media (max-width: 1180px) {
  .alvus-dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

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

  .alvus-report-metrics {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-screen="ai-governance"] .oc-main,
  body[data-screen="automation"] .oc-main,
  body[data-screen="reports"] .oc-main,
  body[data-screen="dashboard"] .oc-main {
    padding: 12px;
  }

  .alvus-dashboard-hero,
  .alvus-dashboard-grid,
  .alvus-dashboard-card-wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .alvus-dashboard-hero-metrics,
  .alvus-dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .alvus-dashboard-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .alvus-dashboard-legend {
    width: 100%;
  }

  .alvus-dashboard-funnel-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .alvus-dashboard-funnel-row span {
    justify-self: start;
  }

  .alvus-report-metrics {
    grid-template-columns: 1fr;
  }

  .alvus-reports-card .alvus-automation-card-head {
    flex-direction: column;
  }
}

@keyframes alvusDashRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes alvusDashBar {
  from {
    transform: scaleY(0.08);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes alvusDashLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes alvusDashDot {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes alvusDashSpin {
  from {
    opacity: 0;
    transform: rotate(-12deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes alvusDashWidth {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 980px) {
  .alvus-ai-identity-summary,
  .alvus-ai-identity-layout {
    grid-template-columns: 1fr;
  }

  .alvus-ai-global-toggle {
    justify-self: stretch;
  }

  .alvus-ai-limits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .alvus-theme .topbar-inline-brand .brand-name {
    display: none;
  }

  .alvus-theme .topbar-inline-brand {
    padding-right: 6px;
  }

  .alvus-theme .search-container {
    gap: 8px;
  }
}

/* ============================================================
   Fase 19 - UX/UI global premium
   Camada final de padronizacao visual sem alterar contratos JS/PHP.
   ============================================================ */
:root {
  --alvus-product-surface: rgba(255, 255, 255, 0.94);
  --alvus-product-surface-strong: #ffffff;
  --alvus-product-surface-soft: #f8fafc;
  --alvus-product-border: rgba(148, 163, 184, 0.24);
  --alvus-product-border-strong: rgba(148, 163, 184, 0.36);
  --alvus-product-text: #0f172a;
  --alvus-product-muted: #64748b;
  --alvus-product-blue: #0ea5e9;
  --alvus-product-green: #10b981;
  --alvus-product-gold: #d4af37;
  --alvus-product-danger: #ef4444;
  --alvus-product-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.48);
  --alvus-product-shadow-hover: 0 22px 46px -32px rgba(15, 23, 42, 0.58);
  --alvus-product-ring: 0 0 0 3px rgba(14, 165, 233, 0.18);
  --alvus-product-radius: 12px;
}

body.alvus-theme {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(241, 245, 249, 0.92) 48%, rgba(250, 250, 249, 0.96)),
    var(--alvus-content-bg);
}

body.alvus-theme::selection {
  background: rgba(212, 175, 55, 0.28);
  color: #0f172a;
}

.alvus-theme .content-area {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(248, 250, 252, 0.78)),
    var(--alvus-content-bg);
}

.alvus-theme .oc-main {
  padding: 20px 24px;
}

.alvus-theme .topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 28px -30px rgba(15, 23, 42, 0.82);
}

.alvus-theme .search-container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.alvus-theme .topbar-inline-brand {
  min-height: 42px;
  padding: 0 12px 0 0;
  border-right: 1px solid rgba(148, 163, 184, 0.24);
}

.alvus-theme .topbar-inline-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.alvus-theme .topbar-inline-brand .brand-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #334155;
}

.alvus-theme .search-wrapper {
  height: 42px;
  border-color: var(--alvus-product-border);
  background: rgba(248, 250, 252, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.alvus-theme .search-wrapper:focus-within,
.alvus-theme .chat-sidebar-search:focus-within,
.alvus-theme .alvus-crm-inline-search:focus-within {
  border-color: rgba(14, 165, 233, 0.52);
  box-shadow: var(--alvus-product-ring), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.alvus-theme .search-wrapper .search-input,
.alvus-theme .chat-sidebar-search input,
.alvus-theme .alvus-crm-inline-search input,
.main-container.alvus-login-layout .field-container .field-input,
.main-container.alvus-login-layout .field-container .field-select,
.main-container.alvus-login-layout .field-container .alvus-password-wrap .field-input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0;
}

.alvus-theme .search-wrapper .search-input:focus,
.alvus-theme .chat-sidebar-search input:focus,
.alvus-theme .alvus-crm-inline-search input:focus,
.main-container.alvus-login-layout .field-container .field-input:focus,
.main-container.alvus-login-layout .field-container .field-select:focus,
.main-container.alvus-login-layout .field-container .alvus-password-wrap .field-input:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.alvus-theme #sidebar {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98)),
    var(--alvus-sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.alvus-theme .nav-section-title {
  color: rgba(226, 232, 240, 0.58);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  padding: 14px 12px 6px;
}

.alvus-theme .nav-item {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.84);
  transform: none !important;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.alvus-theme .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: none;
}

.alvus-theme .nav-item.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(14, 165, 233, 0.12));
  border-color: rgba(212, 175, 55, 0.28);
  color: #ffffff;
  box-shadow: 0 16px 28px -28px rgba(212, 175, 55, 0.82);
}

.alvus-theme .nav-item.active i {
  color: var(--alvus-product-gold);
}

.alvus-theme .nav-item i {
  transition: transform .14s ease, color .14s ease;
}

.alvus-theme .nav-item:hover i {
  transform: scale(1.08);
}

.alvus-theme .nav-item.active i {
  transform: scale(1.12);
  color: var(--alvus-product-gold);
}

.alvus-theme .sidebar-toggle {
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 14px 24px -18px rgba(15, 23, 42, 0.86);
}

.alvus-theme .sidebar-toggle i,
.alvus-theme .sidebar-toggle .fa-solid,
.alvus-theme .sidebar-toggle .fa-regular {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translateY(-.5px);
}

.alvus-theme .oc-topbar {
  align-items: center;
  margin-bottom: 16px;
}

.alvus-theme .oc-topbar h1 {
  font-size: 23px;
  line-height: 1.18;
  color: var(--alvus-product-text);
}

.alvus-theme .oc-topbar p {
  max-width: 780px;
  margin-top: 4px;
  color: var(--alvus-product-muted);
}

.alvus-theme .oc-workspace {
  min-width: 0;
}

.alvus-theme .oc-panel,
.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-setting-card,
.alvus-theme .alvus-users-list,
.alvus-theme .alvus-users-form,
.alvus-theme .alvus-contact-card,
.alvus-theme .alvus-platform-card,
.alvus-theme .alvus-dashboard-card,
.alvus-theme .alvus-dashboard-kpi,
.alvus-theme .alvus-crm-column,
.alvus-theme .alvus-crm-toolbar,
.alvus-theme .details-info-section {
  background: var(--alvus-product-surface);
  border: 1px solid var(--alvus-product-border);
  box-shadow: var(--alvus-product-shadow);
}

.alvus-theme .oc-panel:hover,
.alvus-theme .alvus-automation-card:hover,
.alvus-theme .alvus-setting-card:hover,
.alvus-theme .alvus-contact-card:hover,
.alvus-theme .alvus-dashboard-card:hover,
.alvus-theme .alvus-dashboard-kpi:hover,
.alvus-theme .alvus-crm-card:hover {
  box-shadow: var(--alvus-product-shadow-hover);
}

.alvus-theme .alvus-automation-card h3,
.alvus-theme .alvus-setting-card h3,
.alvus-theme .alvus-platform-card h3,
.alvus-theme .alvus-dashboard-card-head h3 {
  color: var(--alvus-product-text);
  font-weight: 850;
}

.alvus-theme .alvus-automation-card h3 i,
.alvus-theme .alvus-setting-card h3 i,
.alvus-theme .alvus-platform-card h3 i,
.alvus-theme .alvus-dashboard-card-head i {
  color: var(--alvus-product-gold);
}

.alvus-btn,
.oc-button {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--alvus-product-border-strong);
  background: rgba(255, 255, 255, 0.88);
  color: var(--alvus-product-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.alvus-btn i,
.oc-button i {
  font-size: 0.95em;
}

.alvus-theme .alvus-btn-gold,
.alvus-theme .oc-button-primary {
  background: linear-gradient(135deg, #d4af37, #f0d27b);
  border-color: rgba(154, 119, 18, 0.38);
  color: #111827;
}

.alvus-theme .alvus-btn-outline,
.alvus-theme .oc-button-secondary {
  background: rgba(255, 255, 255, 0.82);
}

.alvus-theme .alvus-btn-danger,
.alvus-theme .oc-button-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alvus-theme button:disabled,
.alvus-theme .alvus-btn:disabled,
.alvus-theme .oc-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

.alvus-theme .action-btn,
.alvus-theme .alvus-icon-btn,
.alvus-theme .oc-icon-button {
  border-color: var(--alvus-product-border);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
}

.alvus-theme .action-btn:hover,
.alvus-theme .alvus-icon-btn:hover,
.alvus-theme .oc-icon-button:hover {
  color: var(--alvus-product-blue);
  border-color: rgba(14, 165, 233, 0.34);
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.alvus-theme select,
.alvus-theme textarea,
.alvus-theme .field-input,
.alvus-theme .field-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--alvus-product-border-strong);
  background: rgba(255, 255, 255, 0.92);
  background-clip: padding-box;
  box-shadow: none;
  color: var(--alvus-product-text);
  transition: border-color .18s var(--alvus-ease-standard), box-shadow .18s var(--alvus-ease-standard), background-color .18s var(--alvus-ease-standard);
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):hover,
.alvus-theme select:hover,
.alvus-theme textarea:hover {
  border-color: rgba(100, 116, 139, 0.48);
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
.alvus-theme select:focus,
.alvus-theme textarea:focus,
.alvus-theme .field-input:focus,
.alvus-theme .field-select:focus {
  border-color: rgba(14, 165, 233, 0.62);
  background: #ffffff;
  box-shadow: var(--alvus-product-ring);
}

.alvus-theme .alvus-form-group {
  position: relative;
}

.alvus-theme .alvus-form-group small,
.alvus-theme .input-group small {
  color: var(--alvus-product-muted);
  line-height: 1.35;
}

.alvus-theme .alvus-form-group[data-filled="1"] label,
.alvus-theme .input-group[data-filled="1"] .input-label {
  color: #0f766e;
}

.alvus-theme .alvus-form-actions,
.alvus-theme .alvus-form-actions-inline,
.alvus-theme .alvus-modal-footer,
.alvus-theme .oc-top-actions {
  flex-wrap: wrap;
}

.alvus-theme .alvus-modal-overlay {
  background: rgba(2, 6, 23, 0.56);
}

.alvus-theme .alvus-modal {
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 16px;
  overflow: hidden;
}

.alvus-theme .alvus-modal-header {
  min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.alvus-theme .alvus-modal-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 850;
}

.alvus-theme .alvus-modal-body {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.62), rgba(255, 255, 255, 0.94)),
    #ffffff;
}

.alvus-theme .alvus-modal-footer {
  background: rgba(248, 250, 252, 0.96);
}

.alvus-theme .alvus-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.alvus-theme .alvus-live-state {
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.74);
  color: var(--alvus-product-muted);
}

.alvus-theme .alvus-live-loading {
  position: relative;
  overflow: hidden;
}

.alvus-theme .alvus-live-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  animation: alvusProductShimmer 1.35s infinite;
}

body[data-screen="dashboard"] .alvus-dashboard-screen,
body[data-screen="crm"] .alvus-crm-screen,
body[data-screen="contacts"] .alvus-contacts-screen,
body[data-screen="automation"] .alvus-automation-console,
body[data-screen="ai-governance"] .alvus-ai-governance-screen,
body[data-screen="reports"] .alvus-reports-screen,
body[data-screen="platform-access"] .alvus-platform-access-layout,
body[data-screen="platform"] .alvus-platform-screen {
  animation: alvusProductEnter .34s var(--alvus-ease-standard) both;
}

body[data-screen="crm"] .alvus-crm-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body[data-screen="crm"] .alvus-crm-health-row {
  gap: 10px;
}

body[data-screen="crm"] .alvus-crm-health-pill {
  border-radius: 12px;
  border-color: var(--alvus-product-border);
}

body[data-screen="crm"] .alvus-crm-card {
  border-left: 3px solid rgba(14, 165, 233, 0.32);
}

body[data-screen="crm"] .alvus-crm-card-status {
  border-radius: 999px;
  font-weight: 850;
}

body[data-screen="contacts"] .alvus-contact-card {
  transition: transform .18s var(--alvus-ease-standard), box-shadow .18s var(--alvus-ease-standard), border-color .18s var(--alvus-ease-standard);
}

body[data-screen="contacts"] .alvus-contact-card:hover {
  border-color: rgba(14, 165, 233, 0.28);
  transform: translateY(-1px);
}

body[data-screen="inbox"] .chat-container {
  border-color: var(--alvus-product-border);
}

body[data-screen="inbox"] .message-bubble,
body[data-screen="inbox"] .alvus-message-bubble {
  box-shadow: 0 12px 26px -22px rgba(15, 23, 42, 0.56);
}

body[data-screen="inbox"] .chat-view-input {
  border-top-color: rgba(148, 163, 184, 0.24);
}

.alvus-login-layout .auth-card {
  border-radius: 24px !important;
  box-shadow: 0 42px 86px -44px rgba(2, 6, 23, 0.72) !important;
}

.alvus-login-layout .field-input,
.alvus-login-layout .field-select {
  min-height: 48px;
  border-radius: 12px;
}

.alvus-login-layout .btn-portal {
  min-height: 50px;
  border-radius: 12px;
  transition: transform .18s var(--alvus-ease-standard), box-shadow .18s var(--alvus-ease-standard), filter .18s var(--alvus-ease-standard);
}

.alvus-login-layout .btn-portal:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

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

@keyframes alvusProductShimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1180px) {
  .alvus-theme .topbar {
    grid-template-columns: var(--alvus-sidebar-collapsed-width) minmax(0, 1fr) auto;
  }

  .alvus-theme .user-info {
    display: none;
  }
}

@media (max-width: 860px) {
  .alvus-theme .oc-main {
    padding: 14px;
  }

  .alvus-theme .topbar {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .alvus-theme .topbar-actions {
    gap: 8px;
    padding-right: 10px;
  }

  .alvus-theme .action-btn {
    width: 36px;
    height: 36px;
  }

  .alvus-theme .session-timer {
    min-width: 70px;
    padding: 0 8px;
  }

  .alvus-theme .search-wrapper {
    min-width: 0;
  }

  .alvus-theme .oc-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .alvus-theme .oc-top-actions {
    justify-content: flex-start;
  }

  .alvus-theme .alvus-form-grid,
  .alvus-theme .alvus-form-grid-2col,
  .alvus-theme .alvus-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .alvus-theme .topbar-inline-brand {
    display: none;
  }

  .alvus-theme .topbar-actions .action-btn[href="/contacts"] {
    display: none;
  }

  .alvus-theme .session-timer i {
    display: none;
  }

  .alvus-theme .alvus-modal-overlay {
    padding: 8px;
  }

  .alvus-theme .alvus-modal {
    max-height: calc(100vh - 16px);
  }

  .alvus-theme .alvus-modal-body {
    max-height: calc(100vh - 142px);
    overflow: auto;
  }

  .alvus-btn,
  .oc-button {
    white-space: normal;
  }
}

/* Fase 19.1 - Refinos de contraste e correcoes de regressao visual */
.alvus-theme .alvus-form-group[data-filled="1"] label,
.alvus-theme .input-group[data-filled="1"] .input-label {
  color: #334155;
}

.alvus-theme .alvus-form-group[data-filled="1"] label .field-help,
.alvus-theme .input-group[data-filled="1"] .input-label .field-help {
  color: var(--alvus-product-muted);
}

.alvus-theme .topbar-actions .action-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--alvus-icon-color);
  box-shadow: none;
  font-size: 19px;
}

.alvus-theme .topbar-actions .action-btn:hover {
  color: var(--alvus-primary-gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: none;
}

.alvus-ai-governance-screen .alvus-section-icon,
.alvus-automation-console .alvus-section-icon,
.alvus-reports-screen .alvus-section-icon {
  width: auto;
  height: auto;
  min-width: 18px;
  margin-right: 8px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--alvus-primary-gold);
}

.alvus-ai-governance-screen .alvus-section-icon i,
.alvus-automation-console .alvus-section-icon i,
.alvus-reports-screen .alvus-section-icon i {
  color: currentColor;
}

.alvus-theme .details-file-actions .alvus-btn,
.alvus-theme .details-timeline-item .alvus-btn,
.alvus-theme .alvus-templates-list-scroll .alvus-btn {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
}

.alvus-theme .details-file-actions .alvus-btn-outline,
.alvus-theme .alvus-templates-list-scroll .alvus-btn-outline {
  background: #ffffff;
  border-color: rgba(51, 65, 85, 0.26);
  color: #0f172a;
}

.alvus-theme .details-file-actions .alvus-btn-outline:hover,
.alvus-theme .alvus-templates-list-scroll .alvus-btn-outline:hover {
  border-color: rgba(14, 165, 233, 0.4);
  color: #075985;
}

.alvus-theme .alvus-btn-success,
.alvus-theme .details-file-actions .alvus-btn-success,
.alvus-theme .alvus-templates-list-scroll .alvus-btn-success {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff !important;
}

.alvus-theme .alvus-btn-success i,
.alvus-theme .alvus-btn-success span,
.alvus-theme .alvus-btn-danger i,
.alvus-theme .alvus-btn-danger span {
  color: #ffffff !important;
}

.alvus-theme .alvus-btn-danger,
.alvus-theme .details-file-actions .alvus-btn-danger,
.alvus-theme .alvus-templates-list-scroll .alvus-btn-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff !important;
}

.main-container.alvus-login-layout .field-container {
  position: relative;
  display: block;
  width: 100%;
}

.main-container.alvus-login-layout .field-container > i {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.main-container.alvus-login-layout .field-container .field-input,
.main-container.alvus-login-layout .field-container .field-select {
  min-height: 48px;
  padding: 0 14px 0 50px;
  line-height: 48px;
}

.main-container.alvus-login-layout .field-container .alvus-password-wrap {
  display: block;
  width: 100%;
}

.main-container.alvus-login-layout .field-container .alvus-password-wrap .field-input {
  padding-left: 50px;
  padding-right: 48px;
}

.main-container.alvus-login-layout .alvus-password-toggle {
  right: 10px;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
}

.main-container.alvus-login-layout .btn-portal {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  line-height: 1;
  text-align: center;
}

/* Fase 19.2 - Tipografia mais leve e dashboard refinado */
body.alvus-theme {
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

.alvus-theme strong,
.alvus-theme b {
  font-weight: 650;
}

.alvus-theme .oc-main h1,
.alvus-theme .oc-main h2,
.alvus-theme .oc-main h3,
.alvus-theme .alvus-automation-card h3,
.alvus-theme .alvus-setting-card h3,
.alvus-theme .alvus-platform-card h3,
.alvus-theme .alvus-dashboard-card-head h3,
.alvus-theme .alvus-crm-column-head h3 {
  font-weight: 680;
  letter-spacing: 0;
}

.alvus-theme .alvus-btn,
.alvus-theme .oc-button,
.alvus-theme .nav-item,
.alvus-theme .tab-btn,
.alvus-theme label,
.alvus-theme .input-label {
  font-weight: 600;
}

.alvus-theme .alvus-btn-gold,
.alvus-theme .oc-button-primary,
.alvus-theme .details-file-actions .alvus-btn,
.alvus-theme .details-timeline-item .alvus-btn,
.alvus-theme .alvus-templates-list-scroll .alvus-btn {
  font-weight: 650;
}

.alvus-theme .alvus-btn,
.alvus-theme .oc-button,
.alvus-theme .action-btn,
.alvus-theme .action-btn-chat,
.alvus-theme .alvus-icon-btn {
  transition-duration: .12s !important;
}

.alvus-theme .oc-button-primary,
.alvus-theme .oc-button-primary:hover:not(:disabled),
.alvus-theme .oc-button-primary:focus-visible,
.alvus-theme .alvus-btn-gold,
.alvus-theme .alvus-btn-gold:hover:not(:disabled),
.alvus-theme .alvus-btn-gold:focus-visible {
  color: #172033 !important;
}

.alvus-theme .alvus-btn-gold,
.alvus-theme .oc-button-primary {
  background: linear-gradient(135deg, #d4af37, #e6c766) !important;
  border-color: rgba(212, 175, 55, 0.42) !important;
}

.alvus-theme .alvus-btn-gold:hover:not(:disabled),
.alvus-theme .oc-button-primary:hover:not(:disabled),
.alvus-theme .alvus-btn-gold:focus-visible,
.alvus-theme .oc-button-primary:focus-visible {
  background: linear-gradient(135deg, #e1bf54, #efd57e) !important;
  border-color: rgba(212, 175, 55, 0.54) !important;
  color: #172033 !important;
  box-shadow: 0 14px 24px -22px rgba(212, 175, 55, 0.72);
}

.alvus-theme .oc-button-secondary,
.alvus-theme .oc-button-secondary:hover:not(:disabled) {
  color: #334155 !important;
}

.alvus-msg-file.is-processing {
  color: #475569;
}

.alvus-msg-file.is-processing i {
  color: #0f766e;
}

.alvus-productivity-modal .alvus-modal-body,
.alvus-productivity-save-modal .alvus-modal-body,
.alvus-productivity-note-modal .alvus-modal-body {
  display: grid;
  gap: 14px;
}

.alvus-productivity-hero {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.alvus-productivity-hero p {
  margin: 4px 0 0;
  color: var(--alvus-text-soft);
}

.alvus-productivity-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alvus-shortcut-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  color: var(--alvus-text-soft);
}

.alvus-shortcut-pill kbd {
  padding: 3px 7px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--alvus-text-main);
  font: inherit;
  font-weight: 700;
}

.alvus-productivity-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.alvus-productivity-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alvus-productivity-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
}

.alvus-productivity-row {
  padding: 12px;
  border-radius: 12px;
}

.alvus-productivity-note-banner {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.92));
  color: #92400e;
}

.alvus-productivity-note-banner i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.14);
}

.alvus-productivity-note-banner p {
  margin: 4px 0 0;
  color: #9a3412;
}

@media (max-width: 900px) {
  .alvus-productivity-toolbar {
    grid-template-columns: 1fr;
  }
}

.alvus-theme .user-name,
.alvus-theme .brand-name,
.alvus-theme .nav-section-title {
  font-weight: 650;
}

body[data-screen="dashboard"] .alvus-section-icon {
  width: auto;
  height: auto;
  min-width: 18px;
  margin-right: 8px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--alvus-primary-gold);
}

body[data-screen="dashboard"] .alvus-section-icon i {
  color: currentColor;
}

body[data-screen="dashboard"] .alvus-dashboard-kpi-icon {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--dash-accent, var(--alvus-primary-gold));
}

body[data-screen="dashboard"] .alvus-dashboard-brand-card span,
body[data-screen="dashboard"] .alvus-dashboard-brand-card small,
body[data-screen="dashboard"] .alvus-dashboard-eyebrow,
body[data-screen="dashboard"] .alvus-dashboard-kpi span,
body[data-screen="dashboard"] .alvus-dashboard-card-head p {
  font-weight: 500;
}

body[data-screen="dashboard"] .alvus-dashboard-brand-card strong,
body[data-screen="dashboard"] .alvus-dashboard-kpi strong,
body[data-screen="dashboard"] .alvus-dashboard-hero-metrics strong,
body[data-screen="dashboard"] .alvus-dashboard-donut-ring strong {
  font-weight: 700;
}

.alvus-theme .topbar-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}

.alvus-theme .topbar-actions .action-btn i {
  display: block;
  line-height: 1;
  transform: none;
}

/* ============================================================
   Fase 19.3 - Design system refinement
   Camada visual final: legibilidade, ritmo, consistencia e UX.
   ============================================================ */
:root {
  --alvus-ui-font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --alvus-theme-surface: var(--omni-surface, #f8fafc);
  --alvus-theme-text: var(--omni-text, #172033);
  --alvus-theme-muted: var(--alvus-text-sub, #536174);
  --alvus-sidebar-text: #ffffff;
  --alvus-ui-bg: color-mix(in srgb, var(--alvus-theme-surface) 92%, #e8edf3 8%);
  --alvus-ui-surface: color-mix(in srgb, var(--alvus-theme-surface) 18%, #ffffff 82%);
  --alvus-ui-surface-soft: color-mix(in srgb, var(--alvus-theme-surface) 88%, #ffffff 12%);
  --alvus-ui-text: var(--alvus-theme-text);
  --alvus-ui-text-soft: var(--alvus-theme-muted);
  --alvus-ui-text-muted: color-mix(in srgb, var(--alvus-theme-muted) 82%, #ffffff 18%);
  --alvus-ui-border: color-mix(in srgb, var(--alvus-theme-muted) 24%, #ffffff 76%);
  --alvus-ui-border-strong: color-mix(in srgb, var(--alvus-theme-muted) 38%, #ffffff 62%);
  --alvus-ui-focus: var(--omni-accent, #0e7490);
  --alvus-ui-focus-ring: 0 0 0 3px color-mix(in srgb, var(--omni-accent, #0e7490) 16%, transparent);
  --alvus-ui-shadow: 0 8px 24px -20px rgba(15, 23, 42, 0.52);
  --alvus-ui-shadow-raised: 0 14px 30px -24px rgba(15, 23, 42, 0.58);
  --alvus-ui-radius: 8px;
  --alvus-ui-control-height: 42px;
}

body.alvus-theme {
  font-family: var(--alvus-ui-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--alvus-ui-text);
  background: var(--alvus-ui-bg);
  font-variant-numeric: tabular-nums;
}

body.alvus-theme.alvus-internal {
  background: var(--alvus-ui-bg);
}

.alvus-theme .content-area {
  background: var(--alvus-ui-bg);
}

.alvus-theme p,
.alvus-theme small,
.alvus-theme .info-label,
.alvus-theme .oc-topbar p {
  color: var(--alvus-ui-text-soft);
}

.alvus-theme strong,
.alvus-theme b {
  font-weight: 650;
}

.alvus-theme .oc-main h1,
.alvus-theme .oc-main h2,
.alvus-theme .oc-main h3,
.alvus-theme .oc-main h4,
.alvus-theme .alvus-modal-header h2 {
  font-family: var(--alvus-ui-font);
  letter-spacing: 0;
  text-wrap: balance;
}

.alvus-theme .oc-main h1 {
  font-size: 24px;
  font-weight: 680;
  line-height: 1.25;
}

.alvus-theme .oc-main h2 {
  font-size: 19px;
  font-weight: 660;
  line-height: 1.3;
}

.alvus-theme .oc-main h3,
.alvus-theme .alvus-automation-card h3,
.alvus-theme .alvus-setting-card h3,
.alvus-theme .alvus-platform-card h3,
.alvus-theme .alvus-dashboard-card-head h3,
.alvus-theme .alvus-crm-column-head h3 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.alvus-theme .oc-main h4 {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.alvus-theme .oc-main {
  padding: 22px 26px 28px;
}

.alvus-theme .oc-topbar {
  gap: 18px;
  margin-bottom: 20px;
}

.alvus-theme .oc-topbar p {
  max-width: 860px;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.5;
}

.alvus-theme .topbar {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--alvus-ui-border);
  box-shadow: 0 6px 18px -18px rgba(15, 23, 42, 0.5);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.alvus-theme .search-wrapper {
  border-color: var(--alvus-ui-border);
  background: #f8fafc;
  box-shadow: none;
}

.alvus-theme .search-wrapper:focus-within,
.alvus-theme .chat-sidebar-search:focus-within,
.alvus-theme .alvus-crm-inline-search:focus-within {
  border-color: rgba(14, 116, 144, 0.58);
  background: #ffffff;
  box-shadow: var(--alvus-ui-focus-ring);
}

.alvus-theme .search-input::placeholder,
.alvus-theme input::placeholder,
.alvus-theme textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.alvus-theme #sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.alvus-theme .nav-menu {
  gap: 4px;
}

.alvus-theme .nav-item {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 540;
}

.alvus-theme .nav-item.active {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.2);
  box-shadow: inset 3px 0 0 var(--alvus-primary-gold);
}

.alvus-theme .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.alvus-theme .nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.alvus-theme .nav-item:hover i,
.alvus-theme .nav-item.active i {
  transform: scale(1.08);
}

.alvus-theme .nav-section-title {
  padding: 15px 12px 6px;
  color: rgba(226, 232, 240, 0.5);
  font-size: 10px;
  font-weight: 650;
}

.alvus-theme .sidebar-toggle {
  border-radius: 8px;
  box-shadow: 0 8px 18px -14px rgba(15, 23, 42, 0.72);
}

/* Surfaces and cards */
.alvus-theme .oc-panel,
.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-setting-card,
.alvus-theme .alvus-users-list,
.alvus-theme .alvus-users-form,
.alvus-theme .alvus-contact-card,
.alvus-theme .alvus-platform-card,
.alvus-theme .alvus-dashboard-card,
.alvus-theme .alvus-dashboard-kpi,
.alvus-theme .alvus-crm-column,
.alvus-theme .alvus-crm-toolbar,
.alvus-theme .details-info-section {
  border: 1px solid var(--alvus-ui-border);
  border-radius: var(--alvus-ui-radius);
  background: var(--alvus-ui-surface);
  box-shadow: var(--alvus-ui-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.alvus-theme .oc-panel:hover,
.alvus-theme .alvus-automation-card:hover,
.alvus-theme .alvus-setting-card:hover,
.alvus-theme .alvus-contact-card:hover,
.alvus-theme .alvus-dashboard-card:hover,
.alvus-theme .alvus-dashboard-kpi:hover {
  box-shadow: var(--alvus-ui-shadow-raised);
}

.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-setting-card,
.alvus-theme .alvus-platform-card,
.alvus-theme .alvus-dashboard-card {
  padding: 18px;
}

.alvus-theme .alvus-automation-grid,
.alvus-theme .alvus-dashboard-grid,
.alvus-theme .alvus-form-grid,
.alvus-theme .alvus-users-layout {
  gap: 18px;
}

.alvus-theme .alvus-ai-identity-layout,
.alvus-theme .alvus-ai-limits-grid {
  gap: 16px;
}

.alvus-theme .alvus-ai-config-block {
  border-color: var(--alvus-ui-border);
  border-radius: 8px;
  background: var(--alvus-ui-surface-soft);
  padding: 15px;
}

/* Forms */
.alvus-theme .alvus-form-grid {
  column-gap: 20px;
  row-gap: 18px;
}

.alvus-theme .alvus-form-group,
.alvus-theme .input-group {
  gap: 7px;
}

.alvus-theme .alvus-form-group label,
.alvus-theme .input-label {
  color: #344256;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
}

.alvus-theme .alvus-form-group small,
.alvus-theme .input-group small {
  color: var(--alvus-ui-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
.alvus-theme select,
.alvus-theme textarea,
.alvus-theme .field-input,
.alvus-theme .field-select {
  width: 100%;
  min-height: var(--alvus-ui-control-height);
  border: 1px solid var(--alvus-ui-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--alvus-ui-text);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.02);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
.alvus-theme select {
  padding: 9px 12px;
}

.alvus-theme select {
  appearance: auto;
  -webkit-appearance: auto;
}

.alvus-theme textarea {
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):hover,
.alvus-theme select:hover,
.alvus-theme textarea:hover {
  border-color: #aebaca;
}

.alvus-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):focus,
.alvus-theme select:focus,
.alvus-theme textarea:focus,
.alvus-theme .field-input:focus,
.alvus-theme .field-select:focus {
  outline: none;
  border-color: rgba(14, 116, 144, 0.68);
  background: #ffffff;
  box-shadow: var(--alvus-ui-focus-ring);
}

.alvus-theme input:disabled,
.alvus-theme select:disabled,
.alvus-theme textarea:disabled,
.alvus-theme input[readonly],
.alvus-theme textarea[readonly] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.alvus-theme .alvus-input-soft-danger,
.alvus-theme input.alvus-input-soft-danger {
  background: #fff7f7 !important;
  border-color: #f1b7bd !important;
  color: #7f1d1d;
}

.alvus-theme input[type="checkbox"],
.alvus-theme input[type="radio"] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: #b89227;
}

.alvus-theme .alvus-inline-checkbox,
.alvus-theme .alvus-composer-enter-toggle {
  gap: 8px;
  color: #344256;
  font-weight: 520;
}

.alvus-theme .alvus-form-actions,
.alvus-theme .alvus-form-actions-inline,
.alvus-theme .oc-top-actions,
.alvus-theme .details-file-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.alvus-theme .alvus-form-actions {
  padding-top: 4px;
}

/* Buttons */
.alvus-theme .alvus-btn,
.alvus-theme .oc-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--alvus-ui-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #263449;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.15;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.alvus-theme .alvus-btn:hover:not(:disabled),
.alvus-theme .oc-button:hover:not(:disabled) {
  transform: none;
  border-color: #aebaca;
  background: #f8fafc;
  box-shadow: 0 5px 14px -12px rgba(15, 23, 42, 0.5);
}

.alvus-theme .alvus-btn:active:not(:disabled),
.alvus-theme .oc-button:active:not(:disabled) {
  background: #f1f5f9;
  box-shadow: none;
}

.alvus-theme .alvus-btn-gold,
.alvus-theme .oc-button-primary {
  background: #d4af37 !important;
  border-color: #c29d2c !important;
  color: #172033 !important;
  box-shadow: 0 6px 16px -12px rgba(133, 99, 8, 0.75);
}

.alvus-theme .alvus-btn-gold:hover:not(:disabled),
.alvus-theme .oc-button-primary:hover:not(:disabled),
.alvus-theme .alvus-btn-gold:focus-visible,
.alvus-theme .oc-button-primary:focus-visible {
  background: #dfbd52 !important;
  border-color: #b89227 !important;
  color: #172033 !important;
}

.alvus-theme .alvus-btn-outline,
.alvus-theme .oc-button-secondary {
  background: #ffffff;
  color: #344256 !important;
}

.alvus-theme .alvus-btn-danger,
.alvus-theme .oc-button-danger {
  background: #fff5f5;
  border-color: #fecaca;
  color: #a11d2b !important;
}

.alvus-theme .alvus-btn-success {
  background: #147d4a;
  border-color: #147d4a;
  color: #ffffff !important;
}

.alvus-theme .alvus-btn-sm,
.alvus-theme .details-file-actions .alvus-btn,
.alvus-theme .details-timeline-item .alvus-btn,
.alvus-theme .alvus-templates-list-scroll .alvus-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.alvus-theme .action-btn,
.alvus-theme .action-btn-chat,
.alvus-theme .alvus-icon-btn,
.alvus-theme .oc-icon-button {
  border-radius: 8px;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.alvus-theme .action-btn:hover:not(:disabled),
.alvus-theme .action-btn-chat:hover:not(:disabled),
.alvus-theme .alvus-icon-btn:hover:not(:disabled),
.alvus-theme .oc-icon-button:hover:not(:disabled) {
  transform: none;
}

.alvus-theme button:focus-visible,
.alvus-theme a:focus-visible,
.alvus-theme [tabindex]:focus-visible {
  outline: 2px solid rgba(14, 116, 144, 0.76);
  outline-offset: 2px;
}

/* Tables and dense data */
.alvus-theme .alvus-table-wrap {
  border: 1px solid var(--alvus-ui-border);
  border-radius: 8px;
  background: #ffffff;
}

.alvus-theme .alvus-table,
.alvus-theme .alvus-mini-table,
.alvus-theme .oc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--alvus-ui-text);
}

.alvus-theme .alvus-table th,
.alvus-theme .alvus-mini-table th,
.alvus-theme .oc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--alvus-ui-border-strong);
  background: #f8fafc;
  color: #536174;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.alvus-theme .alvus-table td,
.alvus-theme .alvus-mini-table td,
.alvus-theme .oc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f6;
  color: #344256;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: middle;
}

.alvus-theme .alvus-table tbody tr:last-child td,
.alvus-theme .alvus-mini-table tbody tr:last-child td,
.alvus-theme .oc-table tbody tr:last-child td {
  border-bottom: 0;
}

.alvus-theme .alvus-table tbody tr:hover td,
.alvus-theme .alvus-mini-table tbody tr:hover td,
.alvus-theme .oc-table tbody tr:hover td {
  background: #f8fafc;
}

/* Lists, badges and feedback */
.alvus-theme .details-file-item,
.alvus-theme .details-timeline-item,
.alvus-theme .alvus-setting-list-row,
.alvus-theme .alvus-user-list-item,
.alvus-theme .alvus-user-row-btn {
  border: 1px solid #e6ebf1;
  border-radius: 8px;
  background: #ffffff;
}

.alvus-theme .details-timeline-item,
.alvus-theme .details-file-item {
  padding: 11px 12px;
}

.alvus-theme .details-timeline-item:hover,
.alvus-theme .details-file-item:hover,
.alvus-theme .alvus-setting-list-row:hover,
.alvus-theme .alvus-user-list-item:hover {
  transform: none;
  border-color: #d4dde8;
  background: #fafbfd;
}

.alvus-theme .alvus-status-badge,
.alvus-theme .alvus-crm-card-status,
.alvus-theme .chat-new-pill,
.alvus-theme .alvus-inline-chip {
  border-radius: 999px;
  font-weight: 620;
  letter-spacing: 0;
}

.alvus-theme .alvus-live-state {
  min-height: 82px;
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--alvus-ui-text-soft);
}

/* Modals */
.alvus-theme .alvus-modal-overlay {
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.alvus-theme .alvus-modal {
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 28px 64px -28px rgba(2, 6, 23, 0.62);
}

.alvus-theme .alvus-modal-header {
  min-height: 62px;
  padding: 16px 20px;
  background: #172033;
  border-bottom: 0;
}

.alvus-theme .alvus-modal-header h2 {
  font-size: 18px;
  font-weight: 650;
}

.alvus-theme .alvus-modal-body {
  padding: 20px;
  background: #ffffff;
}

.alvus-theme .alvus-modal-footer {
  min-height: 62px;
  padding: 12px 20px;
  border-top: 1px solid var(--alvus-ui-border);
  background: #f8fafc;
}

.alvus-theme .alvus-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.alvus-theme .alvus-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

/* Omnichat: preserve operational density */
body[data-screen="inbox"] .chat-container {
  border-radius: 8px;
  border-color: var(--alvus-ui-border);
  background: #ffffff;
  box-shadow: var(--alvus-ui-shadow-raised);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-screen="inbox"] .chat-sidebar,
body[data-screen="inbox"] .chat-view,
body[data-screen="inbox"] .details-sidebar,
body[data-screen="inbox"] .chat-view-header,
body[data-screen="inbox"] .chat-view-input,
body[data-screen="inbox"] .chat-tabs-container,
body[data-screen="inbox"] .chat-sidebar-header {
  background: #ffffff;
}

body[data-screen="inbox"] .tab-btn {
  border-radius: 8px;
  font-weight: 580;
}

body[data-screen="inbox"] .tab-btn.is-active,
body[data-screen="inbox"] .tab-btn.active {
  background: #172033;
  border-color: #172033;
  color: #ffffff;
}

body[data-screen="inbox"] .chat-item {
  border-radius: 0 8px 8px 0;
  box-shadow: none;
}

body[data-screen="inbox"] .chat-item:hover {
  transform: none;
  background: #f8fafc;
}

body[data-screen="inbox"] .details-info-section {
  padding: 12px;
  background: #ffffff;
}

body[data-screen="inbox"] .alvus-composer-message-box {
  border-color: var(--alvus-ui-border-strong);
  border-radius: 8px;
  background: #ffffff;
}

body[data-screen="inbox"] .alvus-message-bubble {
  box-shadow: 0 5px 14px -12px rgba(15, 23, 42, 0.48);
}

/* CRM and data-heavy screens */
body[data-screen="crm"] .alvus-crm-screen {
  gap: 16px;
}

body[data-screen="crm"] .alvus-crm-toolbar {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
}

body[data-screen="crm"] .alvus-crm-health-pill,
body[data-screen="crm"] .alvus-crm-column,
body[data-screen="crm"] .alvus-crm-card {
  border-radius: 8px;
}

body[data-screen="crm"] .alvus-crm-card {
  background: #ffffff;
  box-shadow: 0 6px 16px -14px rgba(15, 23, 42, 0.56);
}

body[data-screen="crm"] .alvus-crm-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -16px rgba(15, 23, 42, 0.62);
}

body[data-screen="contacts"] .alvus-contact-card {
  border-radius: 8px;
  padding: 17px;
}

body[data-screen="contacts"] .alvus-contact-card:hover {
  transform: none;
  border-color: #cbd5e1;
}

body[data-screen="ai-governance"] .alvus-automation-screen,
body[data-screen="automation"] .alvus-automation-screen,
body[data-screen="reports"] .alvus-reports-screen,
body[data-screen="dashboard"] .alvus-dashboard-screen,
body[data-screen="platform"] .alvus-platform-screen,
body[data-screen="platform-access"] .alvus-platform-access-layout {
  gap: 18px;
}

/* Login and public forms */
.main-container.alvus-login-layout .auth-card {
  width: min(420px, 100%);
  padding: 44px 42px 28px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 18px !important;
  box-shadow: 0 30px 70px -38px rgba(2, 6, 23, 0.58) !important;
}

.main-container.alvus-login-layout .welcome-msg h1 {
  font-family: var(--alvus-ui-font);
  font-size: 25px;
  font-weight: 680;
  line-height: 1.2;
  color: var(--alvus-ui-text);
}

.main-container.alvus-login-layout .welcome-msg p {
  color: var(--alvus-ui-text-soft);
  line-height: 1.55;
}

.main-container.alvus-login-layout .input-label {
  color: #536174;
  font-weight: 650;
  letter-spacing: .06em;
}

.main-container.alvus-login-layout .field-container {
  min-height: 48px;
  border: 1px solid var(--alvus-ui-border-strong);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color .14s ease, box-shadow .14s ease;
}

.main-container.alvus-login-layout .field-container:focus-within {
  border-color: rgba(14, 116, 144, 0.68);
  box-shadow: var(--alvus-ui-focus-ring);
}

.main-container.alvus-login-layout .field-container .field-input,
.main-container.alvus-login-layout .field-container .field-select,
.main-container.alvus-login-layout .field-container .alvus-password-wrap .field-input {
  min-height: 46px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
}

.main-container.alvus-login-layout .btn-portal {
  min-height: 50px;
  border-radius: 8px;
  font-family: var(--alvus-ui-font);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  box-shadow: 0 10px 22px -16px rgba(2, 6, 23, 0.72);
}

.main-container.alvus-login-layout .btn-portal:hover {
  transform: none;
  background: #172033;
}

/* Responsive rhythm */
@media (max-width: 1100px) {
  .alvus-theme .oc-main {
    padding: 18px 20px 24px;
  }

  .alvus-theme .alvus-automation-card,
  .alvus-theme .alvus-setting-card,
  .alvus-theme .alvus-platform-card,
  .alvus-theme .alvus-dashboard-card {
    padding: 16px;
  }
}

@media (max-width: 860px) {
  .alvus-theme .oc-main {
    padding: 14px;
  }

  .alvus-theme .oc-topbar {
    gap: 12px;
    margin-bottom: 16px;
  }

  .alvus-theme .oc-topbar h1 {
    font-size: 21px;
  }

  .alvus-theme .alvus-form-grid,
  .alvus-theme .alvus-form-grid-2col,
  .alvus-theme .alvus-checkbox-grid,
  .alvus-theme .alvus-org-grid,
  .alvus-theme .alvus-org-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .main-container.alvus-login-layout .auth-card {
    width: 100%;
    padding: 32px 24px 24px;
  }

  .main-container.alvus-login-layout .welcome-msg h1 {
    font-size: 23px;
  }

  .alvus-theme .oc-main {
    padding: 10px;
  }

  .alvus-theme .alvus-automation-card,
  .alvus-theme .alvus-setting-card,
  .alvus-theme .alvus-platform-card,
  .alvus-theme .alvus-dashboard-card {
    padding: 14px;
  }

  .alvus-theme .alvus-modal-overlay {
    padding: 6px;
  }

  .alvus-theme .alvus-modal {
    border-radius: 10px;
  }

  .alvus-theme .alvus-modal-header,
  .alvus-theme .alvus-modal-body,
  .alvus-theme .alvus-modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .alvus-theme .alvus-form-actions,
  .alvus-theme .alvus-modal-footer {
    align-items: stretch;
  }

  .alvus-theme .alvus-form-actions .alvus-btn,
  .alvus-theme .alvus-form-actions .oc-button,
  .alvus-theme .alvus-modal-footer .alvus-btn,
  .alvus-theme .alvus-modal-footer .oc-button {
    flex: 1 1 100%;
  }
}

/* ============================================================
   Fase 19.4 - Theme fidelity, responsive shell and rich media
   ============================================================ */
.alvus-theme .search-wrapper {
  background: var(--alvus-ui-surface-soft);
}

.alvus-theme .topbar,
.alvus-theme .content-area,
.alvus-theme .alvus-card,
.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-report-card,
.alvus-theme .alvus-platform-card,
.alvus-theme .alvus-contact-card,
.alvus-theme .alvus-modal {
  color: var(--alvus-ui-text);
}

.alvus-theme .topbar,
.alvus-theme .alvus-card,
.alvus-theme .alvus-automation-card,
.alvus-theme .alvus-report-card,
.alvus-theme .alvus-platform-card,
.alvus-theme .alvus-contact-card,
.alvus-theme .alvus-modal,
.alvus-theme .alvus-department-sort-item {
  background: var(--alvus-ui-surface);
  border-color: var(--alvus-ui-border);
}

.alvus-theme .search-wrapper > i,
.alvus-theme .search-wrapper > .search-icon {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  flex: 0 0 18px;
  width: 18px;
  margin: 0;
  text-align: center;
  color: var(--alvus-icon-color);
  pointer-events: none;
}

.alvus-theme .search-wrapper .search-input {
  min-width: 0;
  padding: 0 !important;
}

.alvus-theme #sidebar {
  color: var(--alvus-sidebar-text);
}

.alvus-theme .nav-item {
  color: color-mix(in srgb, var(--alvus-sidebar-text) 78%, transparent);
  border-bottom-color: color-mix(in srgb, var(--alvus-sidebar-text) 16%, transparent);
}

.alvus-theme .nav-item:hover,
.alvus-theme .nav-item.active {
  color: var(--alvus-sidebar-text);
}

.alvus-theme .nav-item:hover i,
.alvus-theme .nav-item.active i {
  color: var(--alvus-primary-gold);
}

.alvus-theme .nav-section-title {
  color: color-mix(in srgb, var(--alvus-sidebar-text) 52%, transparent);
}

.alvus-theme .oc-button-primary,
.alvus-theme .alvus-btn-primary,
.alvus-theme .alvus-btn-gold {
  background: var(--alvus-btn-main);
  border-color: var(--alvus-btn-main);
  color: var(--alvus-btn-text);
}

.alvus-theme .oc-button-secondary,
.alvus-theme .alvus-btn-secondary {
  color: var(--alvus-ui-text);
  border-color: var(--alvus-ui-border-strong);
}

body[data-screen="contacts"] .alvus-contact-card-tags {
  min-height: 24px;
  align-items: center;
  gap: 5px;
}

body[data-screen="contacts"] .alvus-contact-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: min(100%, 180px);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .02em;
}

body[data-screen="contacts"] .alvus-contact-channel-icons {
  min-height: 30px;
  gap: 7px;
}

body[data-screen="contacts"] .alvus-contact-channel-icons i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--alvus-ui-border);
  border-radius: 8px;
  background: var(--alvus-ui-surface-soft);
  color: var(--alvus-icon-color);
  font-size: 14px;
}

body[data-screen="contacts"] .alvus-contact-channel-icons .fa-whatsapp {
  color: #128c7e;
}

body[data-screen="contacts"] .alvus-contact-channel-icons .fa-envelope {
  color: var(--omni-accent, #0e7490);
}

.alvus-theme .alvus-msg-image,
.alvus-theme .alvus-msg-video video {
  display: block;
  width: min(360px, 100%);
  aspect-ratio: 16 / 10;
  max-height: 320px;
  border-radius: 8px;
  border: 1px solid var(--alvus-ui-border);
  background: #0f172a;
  object-fit: contain;
}

.alvus-theme .alvus-msg-media-trigger {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.alvus-theme .alvus-msg-video {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.alvus-theme .alvus-msg-media-expand {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  cursor: zoom-in;
}

.alvus-theme .alvus-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
}

.alvus-theme .alvus-media-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
}

.alvus-theme .alvus-media-lightbox-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
}

.alvus-theme .alvus-media-lightbox-stage {
  min-height: 0;
  display: grid;
  place-items: center;
}

.alvus-theme .alvus-media-lightbox-stage img,
.alvus-theme .alvus-media-lightbox-stage video {
  max-width: min(1180px, 94vw);
  max-height: calc(100vh - 92px);
  border-radius: 8px;
  object-fit: contain;
  background: #020617;
}

.alvus-theme .alvus-msg-contact-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 5px;
  min-width: min(310px, 100%);
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--alvus-ui-surface-soft);
}

.alvus-theme .alvus-msg-contact-avatar {
  grid-row: 1 / span 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--alvus-sidebar-bg);
  color: var(--alvus-primary-gold);
  font-size: 16px;
}

.alvus-theme .alvus-msg-contact-title,
.alvus-theme .alvus-msg-contact-subline,
.alvus-theme .alvus-msg-contact-row {
  grid-column: 2;
}

.alvus-theme .alvus-department-menu-editor {
  display: grid;
  gap: 16px;
}

.alvus-theme .alvus-department-menu-settings {
  padding: 14px;
  border: 1px solid var(--alvus-ui-border);
  border-radius: 8px;
  background: var(--alvus-ui-surface-soft);
}

.alvus-theme .alvus-department-sort-list {
  display: grid;
  gap: 8px;
}

.alvus-theme .alvus-department-sort-item {
  display: grid;
  grid-template-columns: 36px minmax(150px, .8fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--alvus-ui-border);
  border-radius: 8px;
  background: var(--alvus-ui-surface);
  box-shadow: var(--alvus-ui-shadow);
}

.alvus-theme .alvus-department-sort-item.is-dragging {
  opacity: .58;
  border-color: var(--alvus-primary-gold);
}

.alvus-theme .alvus-department-sort-handle {
  width: 32px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--alvus-ui-surface-soft);
  color: var(--alvus-ui-text-muted);
  cursor: grab;
}

.alvus-theme .alvus-department-sort-actions {
  display: grid;
  gap: 4px;
}

.alvus-theme .alvus-department-sort-actions button {
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--alvus-ui-surface-soft);
  color: var(--alvus-ui-text-muted);
  cursor: pointer;
}

.alvus-theme .alvus-department-sort-actions [data-department-move] {
  display: none;
}

.alvus-theme .alvus-department-sort-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.alvus-theme .alvus-department-sort-copy strong,
.alvus-theme .alvus-department-sort-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .alvus-theme .topbar {
    min-height: 62px;
    height: auto;
    padding: 8px 10px;
    gap: 8px;
  }

  .alvus-theme .topbar-brand,
  .alvus-theme .topbar-brand-spacer,
  .alvus-theme .topbar-inline-brand .brand-name,
  .alvus-theme .user-info,
  .alvus-theme .session-timer {
    display: none;
  }

  .alvus-theme .search-container {
    flex: 1 1 auto;
    padding: 0;
    gap: 8px;
  }

  .alvus-theme .topbar-inline-brand {
    min-width: 36px;
    padding: 0;
    border: 0;
  }

  .alvus-theme .search-wrapper {
    width: 100%;
    min-width: 0;
  }

  .alvus-theme .topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
    padding-right: 0;
  }

  .alvus-theme .topbar-actions .action-btn {
    width: 38px;
    height: 38px;
  }

  .alvus-theme footer {
    display: none;
  }

  .alvus-theme .main-wrapper,
  .alvus-theme .content-area {
    min-width: 0;
  }

  .alvus-theme .content-area {
    width: 100%;
    padding: 14px;
    overflow-x: hidden;
  }

  .alvus-theme .alvus-automation-grid,
  .alvus-theme .alvus-dashboard-grid,
  .alvus-theme .alvus-reports-grid,
  .alvus-theme .alvus-platform-grid,
  .alvus-theme .alvus-contacts-grid,
  .alvus-theme .alvus-form-grid.two,
  .alvus-theme .alvus-form-grid.three {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .alvus-theme .alvus-automation-grid > *,
  .alvus-theme .alvus-dashboard-grid > *,
  .alvus-theme .alvus-reports-grid > *,
  .alvus-theme .alvus-platform-grid > * {
    grid-column: 1 !important;
  }

  .alvus-theme .alvus-contacts-toolbar,
  .alvus-theme .alvus-automation-toolbar,
  .alvus-theme .alvus-report-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .alvus-theme .alvus-contacts-search {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .alvus-theme .alvus-department-sort-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .alvus-theme .alvus-department-sort-item > .alvus-form-group,
  .alvus-theme .alvus-department-sort-item > .alvus-switch {
    grid-column: 2;
  }

  .alvus-theme .alvus-department-sort-actions [data-department-move] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .alvus-theme .search-wrapper {
    height: 40px;
    padding: 0 10px;
  }

  .alvus-theme .search-input {
    font-size: 16px;
  }

  .alvus-theme .topbar-actions .action-btn:nth-of-type(2) {
    display: none;
  }

  .alvus-theme .alvus-message-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 12px;
  }

  .alvus-theme .alvus-message-wrap {
    gap: 5px;
  }

  .alvus-theme .alvus-message-bubble-wrap {
    max-width: calc(100% - 35px);
  }

  .alvus-theme .alvus-msg-image,
  .alvus-theme .alvus-msg-video video {
    width: min(300px, 100%);
    max-height: 250px;
  }

  .alvus-theme .alvus-media-lightbox {
    padding: 8px;
  }
}

/* Global search: single authoritative geometry after legacy theme layers. */
.alvus-theme .search-container {
  min-width: 0;
}

.alvus-theme .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  gap: 10px;
  overflow: visible;
  border: 1px solid var(--alvus-ui-border);
  border-radius: 10px;
  background: var(--alvus-ui-surface-soft);
}

.alvus-theme .search-wrapper > i,
.alvus-theme .search-wrapper > .search-icon {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  pointer-events: none;
}

.alvus-theme .search-wrapper .search-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 1.35;
}

.alvus-theme .alvus-global-search-panel {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(460px, calc(100vh - 96px));
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1500;
  border-color: var(--alvus-ui-border);
  background: var(--alvus-ui-surface);
}

.alvus-theme .alvus-global-search-item {
  min-width: 0;
}

.alvus-theme .alvus-search-row-head,
.alvus-theme .alvus-search-row-head strong,
.alvus-theme .alvus-search-title,
.alvus-theme .alvus-search-meta {
  min-width: 0;
}

.alvus-theme .alvus-older-messages {
  display: flex;
  justify-content: center;
  padding: 8px 12px 14px;
}

.alvus-theme .alvus-older-messages .oc-button {
  min-height: 34px;
  font-size: 12px;
}

@media (max-width: 620px) {
  .alvus-theme .search-wrapper {
    height: 40px;
    padding: 0 10px;
    border-radius: 9px;
  }

  .alvus-theme .search-wrapper .search-input {
    height: 38px;
  }

  .alvus-theme .alvus-global-search-panel {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 80px);
  }
}
