:root {
  --bg: #0f1117;
  --surface: #181b24;
  --surface-2: #1f2430;
  --border: #2a3142;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.15);
  --success: #3ecf8e;
  --warn: #f0b429;
  --danger: #f07178;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  scrollbar-color: #3d4659 var(--surface-2);
  scrollbar-width: thin;
}

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

*::-webkit-scrollbar-track {
  background: var(--surface-2);
}

*::-webkit-scrollbar-thumb {
  background: #3d4659;
  border: 2px solid var(--surface-2);
  border-radius: 6px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

*::-webkit-scrollbar-corner {
  background: var(--surface-2);
}

.hidden {
  display: none !important;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(79, 140, 255, 0.25), transparent),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.login-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.login-card input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.error-text {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

/* Buttons */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
  line-height: 1.25;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-block {
  width: 100%;
}

/* Hero (landing-style header) */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(79, 140, 255, 0.08) 0%, transparent 50%),
    var(--surface);
}

.hero-sign-out {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 3;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-logo-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  line-height: 0;
  pointer-events: none;
}

.hero-copy {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.hero-logo {
  display: block;
  flex-shrink: 0;
  width: 84px;
  height: auto;
  margin: 0;
  padding: 0;
  object-fit: contain;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  margin: 0.75rem 0 0;
  max-width: none;
  color: var(--muted);
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.global-opp-search {
  position: relative;
  flex-shrink: 0;
}

.global-opp-search-input {
  width: min(220px, 28vw);
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

.global-opp-search-input::placeholder {
  color: var(--muted);
}

.global-opp-search-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.global-opp-search-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  right: 0;
  min-width: 100%;
  width: max(220px, 100%);
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.global-opp-search-results a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.global-opp-search-results a:last-child {
  border-bottom: none;
}

.global-opp-search-results a:hover,
.global-opp-search-results a:focus {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.global-opp-search-results .search-empty {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Toolbar */
.toolbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.toolbar-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.chip {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.chip-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  min-width: 8rem;
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.field-narrow input {
  width: 5.5rem;
}

.field-check {
  padding-bottom: 0.35rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.toolbar-meta {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.portal-label {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Kanban board */
.board {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  min-height: 420px;
  align-items: flex-start;
}

.column {
  flex: 0 0 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
}

.column-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
}

.column-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.column-title {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.column-body {
  padding: 0.65rem;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
}



.card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 2rem 1.65rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: default;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card-edit-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.card:hover .card-edit-btn,
.card-edit-btn:focus-visible {
  opacity: 1;
}

.card-edit-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.card-due {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.4rem;
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.card-due--overdue {
  color: var(--danger);
  font-weight: 600;
}

.card:hover {
  border-color: var(--muted);
}

.card-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 1rem;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card-value {
  color: var(--success);
  font-weight: 600;
}

.card-details {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.card-contact {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.card-description {
  margin: 0 0 0.35rem;
  color: var(--text);
}

.card-detail-line {
  margin: 0.15rem 0 0;
}

.card-detail-label {
  color: var(--muted);
  font-weight: 600;
}

.card-stage-pill {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-checklist-warn {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--danger);
}

.empty-column {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.board-loading,
.board-error {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
  width: 100%;
}

.board-error {
  color: var(--danger);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 360px;
  padding: 0.85rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  z-index: 100;
  animation: slide-in 0.25s ease;
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Multi-group layout */
.global-meta {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-collapse-tile {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

/* Fixed top row: notifications (left) + tasks (right) */
.dashboard-panel-row,
.dashboard-tiles-pinned {
  --panel-content-width: 75%;
}

.dashboard-panel-row {
  max-width: 1400px;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.dashboard-panel-row .panel-slot-left {
  order: 1;
}

.dashboard-panel-row .panel-slot-right {
  order: 2;
}

.dashboard-panel-row .dashboard-tile.panel-width-half {
  flex: 1 1 calc(50% - 0.625rem);
  min-width: 0;
  max-width: calc(50% - 0.625rem);
}

.dashboard-panel-row .dashboard-tile.panel-width-full {
  flex: 0 0 var(--panel-content-width);
  width: var(--panel-content-width);
  max-width: var(--panel-content-width);
}

.dashboard-panel-row.panel-row-has-full .dashboard-tile.panel-width-full {
  flex: 0 0 var(--panel-content-width);
}

.dashboard-panel-row.panel-row-has-full .dashboard-tile.panel-width-half {
  flex: 1 1 calc(50% - 0.625rem);
  max-width: calc(50% - 0.625rem);
}

/* Pinned row: collapsed panels — minimal height, same left/right slots */
.dashboard-tiles-pinned {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: stretch;
}

.dashboard-tiles-pinned:not(.hidden) {
  margin-bottom: 0.65rem;
}

.dashboard-tiles-pinned .dashboard-tile {
  min-height: 0;
  height: auto;
  align-self: start;
}

.dashboard-tiles-pinned .panel-slot-left {
  order: 1;
}

.dashboard-tiles-pinned .panel-slot-right {
  order: 2;
}

.dashboard-tiles-pinned .dashboard-tile.panel-width-half {
  flex: 1 1 calc(50% - 0.625rem);
  max-width: calc(50% - 0.625rem);
}

.dashboard-tiles-pinned .dashboard-tile.panel-width-full {
  flex: 0 0 var(--panel-content-width);
  width: var(--panel-content-width);
  max-width: var(--panel-content-width);
}

.dashboard-tiles-pinned .dashboard-tile.tile-body-collapsed {
  min-height: 0;
}

.dashboard-tiles-pinned .tile-toolbar {
  padding: 0.3rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

/* Dashboard tile grid — 2 columns; double height spans 2 rows */
.dashboard-tiles {
  --tile-row-height: 400px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 1.25rem;
  align-items: start;
}

.dashboard-tile {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: var(--tile-row-height);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.dashboard-tile.tile-half {
  grid-column: span 1;
}

.dashboard-tile.tile-double {
  grid-row: span 2;
  min-height: 0;
  height: auto;
  max-height: none;
}

.dashboard-tile.tile-double .feed-list,
.dashboard-tile.tile-double .tasks-by-user {
  max-height: none;
  flex: 1;
  min-height: 0;
}

.dashboard-tile.tile-double.board-group-tile {
  min-height: calc(var(--tile-row-height) * 2 + 1.25rem);
}

.dashboard-tile.tile-double.board-group-tile .board {
  flex: 1;
  min-height: calc(var(--tile-row-height) * 2 - 80px);
}

.dashboard-tile.tile-double.board-group-tile .column {
  max-height: calc(var(--tile-row-height) * 2 - 120px);
}

.dashboard-tile.tile-body-collapsed {
  min-height: 0;
  height: auto;
  grid-row: auto;
  align-self: start;
}

.dashboard-tile.tile-body-collapsed.tile-double {
  grid-row: auto;
}

.dashboard-tile.tile-body-collapsed > *:not(.tile-toolbar):not(.group-tile-bar) {
  display: none !important;
}

.dashboard-tile.dragging {
  opacity: 0.55;
  border-color: var(--accent);
}

.dashboard-tile.drag-over {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.tile-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  cursor: grab;
  user-select: none;
}

.tile-toolbar:active {
  cursor: grabbing;
}

.tile-drag-hint {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.tile-drag-hint.hidden {
  display: none;
}

.tile-toolbar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  white-space: nowrap;
}

.tile-toolbar-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: 0.15rem;
  flex-shrink: 0;
}

.group-tile-bar {
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.group-tile-name {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 280px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.group-tile-count {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.group-tile-templates {
  font: inherit;
  font-size: 0.72rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  max-width: 10rem;
}

.tile-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 0.5rem;
}

.tile-layout-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: auto;
}

.tile-btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.tile-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tile-btn-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.dashboard-tile.feed-panel,
.dashboard-tile.tasks-panel,
.dashboard-tile.panel-tile {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  align-self: start;
}

.dashboard-tile.feed-panel .panel-header,
.dashboard-tile.tasks-panel .panel-header {
  flex-shrink: 0;
  padding: 0.65rem 1rem 0;
  margin-bottom: 0.5rem;
  min-height: auto;
  align-items: center;
}

.panel-header-feed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.panel-header-feed .feed-keyword-filter {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin-left: 0;
}

.dashboard-tile.panel-tile .feed-list,
.dashboard-tile.panel-tile .tasks-by-user {
  list-style: none;
  margin: 0 1rem 1rem;
  padding: 0;
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: visible;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}

.dashboard-tile.panel-tile .feed-list {
  max-height: 280px;
  overflow-y: auto;
}

.dashboard-tile.panel-tile .tasks-by-user:not(.tasks-by-user-columns) {
  max-height: 280px;
  overflow-y: auto;
}

.dashboard-tile.tasks-panel.tasks-tile-full .tasks-by-user.tasks-by-user-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.25rem;
  align-items: start;
  max-height: none;
  overflow: visible;
}

.tasks-column {
  min-width: 0;
}

.tasks-column .task-row:first-of-type {
  border-top: none;
}

.dashboard-tiles-pinned .dashboard-tile.tile-body-collapsed {
  max-height: none;
}

.dashboard-tile .tasks-by-user .board-loading {
  padding: 0.65rem 0.85rem;
  margin: 0;
}

.dashboard-tile .tasks-user-block {
  padding: 0.65rem 0.85rem;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.dashboard-tile .tasks-user-block + .tasks-user-block {
  border-top: 1px solid var(--border);
}

.dashboard-tile.board-group-tile .board-group-header {
  border-top: none;
}

.dashboard-tile.board-group-tile .board {
  padding-bottom: 1rem;
}

/* Top panels */
.panel {
  max-width: 1400px;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35rem 1rem;
  margin-bottom: 0.65rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.panel-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.feed-range-hint {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.85;
}

.feed-keyword-filter {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 220px;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.feed-keyword-filter::placeholder {
  color: var(--muted);
}

.feed-keyword-filter:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.feed-list li {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.feed-item-hiding {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feed-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.feed-item-body {
  flex: 1;
  min-width: 0;
}

.feed-hide-btn {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.feed-hide-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.feed-list li:last-child {
  border-bottom: none;
}

.feed-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.feed-list a:hover {
  text-decoration: underline;
}

.feed-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.tasks-by-user {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tasks-user-block {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.65rem 0.85rem;
}

.tasks-user-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.task-row:first-of-type {
  border-top: none;
}

.task-row.done {
  opacity: 0.55;
}

.task-row label {
  flex: 1;
  cursor: pointer;
}

.tasks-filter-label {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 0.4rem;
}

.tasks-filter-label select {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.group-filter-summary {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Collapsible tag multiselect (matches select height/style) */
.multiselect {
  position: relative;
  min-width: 160px;
}

.multiselect-trigger {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.5rem 2rem 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b95a8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.multiselect-trigger:hover {
  border-color: var(--muted);
}

.multiselect-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 2px);
  left: 0;
  min-width: 100%;
  max-width: 280px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
}

.multiselect-panel label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.multiselect-panel label:hover {
  background: var(--accent-soft);
}

.checkbox-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 0;
  width: auto;
  min-width: 0;
}

.checkbox-filter input {
  accent-color: var(--accent);
}

.group-filters .field.field-checkbox {
  min-width: 0;
  flex: 0 1 auto;
  align-self: flex-end;
  padding-bottom: 0.35rem;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.card-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.dashboard-tile.board-group-tile.board-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.board-group {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.board-group-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.board-group.filters-collapsed .board-group-header {
  display: none;
}

.board-group.filters-collapsed .group-tile-bar .group-filter-summary-compact {
  display: inline;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-tile-bar .group-filter-summary-compact {
  display: none;
  font-size: 0.72rem;
  color: var(--muted);
}

.group-filters-panel {
  margin-top: 0.35rem;
}

.btn-toggle-filters {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.board-group-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.board-group-title-row input[type="text"] {
  flex: 1;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
}

.board-group-title-row input[type="text"]:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.board-group-count {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
}

.btn-danger:hover {
  border-color: var(--danger);
}

.group-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
}

.group-filters .field {
  min-width: 120px;
}



.contact-field {
  position: relative;
  min-width: 200px;
}

.contact-field input[type="search"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.contact-results {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.contact-results button:hover {
  background: var(--accent-soft);
}

.contact-selected {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

.contact-clear {
  font-size: 0.7rem;
  margin-left: 0.5rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
}

.board-group .board {
  padding: 1rem 1.25rem;
  max-width: none;
  margin: 0;
}

.column-empty .column-body {
  min-height: 72px;
  border: 1px dashed var(--border);
  margin: 0.65rem;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .dashboard-tiles {
    grid-template-columns: 1fr;
  }

  .dashboard-tile,
  .dashboard-tile.tile-half {
    grid-column: 1 / -1;
  }

  .dashboard-panel-row .dashboard-tile.panel-width-half,
  .dashboard-panel-row .dashboard-tile.panel-width-full,
  .dashboard-tiles-pinned .dashboard-tile.panel-width-half,
  .dashboard-tiles-pinned .dashboard-tile.panel-width-full {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }
}

/* Confirm modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.modal-message {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-card-form {
  width: min(480px, 92vw);
  max-height: min(90vh, 720px);
  overflow-y: auto;
}

.modal-form .field {
  margin-bottom: 0.85rem;
}

.modal-form .field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.modal-form .field input:not([type="checkbox"]),
.modal-form .field select,
.modal-form .field textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

.modal-form .field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.modal-checkbox {
  margin: 0.25rem 0 0.85rem;
}

.modal-error {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--danger);
}

.modal-card-deal-edit {
  max-width: 28rem;
}

.modal-card-create-opp {
  width: min(520px, 94vw);
  max-height: min(92vh, 800px);
}

.create-opp-legend {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.25rem;
}

.create-opp-field-heading {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.create-opp-user-fields-unavailable {
  margin: 0.35rem 0 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: var(--surface);
  cursor: help;
}

.create-opp-custom-fields .field {
  margin-bottom: 0.75rem;
}

.create-opp-custom-fields .checkbox-filter {
  margin: 0;
}

.deal-edit-modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.deal-edit-modal-head .modal-title {
  margin: 0;
}

.deal-edit-crm-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.deal-edit-crm-link:hover {
  text-decoration: underline;
}

.deal-edit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.5rem;
}

.deal-edit-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.deal-edit-tag-remove {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 0.1rem;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.7;
}

.deal-edit-tag-remove:hover {
  opacity: 1;
}

.deal-edit-tag-add {
  margin-top: 0.4rem;
}

.deal-edit-tag-add select {
  width: 100%;
  font-size: 0.85rem;
}

.deal-edit-note-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem 0.25rem;
  margin: 0.5rem 0 0;
}

.deal-edit-note-legend {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.25rem;
}

.field-optional {
  font-weight: 400;
  color: var(--muted);
}

/* Add tile modal */
.modal-card-add-tile {
  width: min(480px, 100%);
}

.add-tile-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.add-tile-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.add-tile-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.add-tile-option-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.add-tile-option-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.add-tile-calendar-form {
  margin-top: 0.5rem;
}

.add-tile-calendar-form .field input[type="url"] {
  width: 100%;
  font-size: 0.82rem;
}

/* Calendar tile (monthly) */
.dashboard-tile.calendar-tile {
  min-height: var(--tile-row-height);
}

.dashboard-tile.calendar-tile .calendar-month-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.85rem 1rem;
}

.dashboard-tile.calendar-tile.tile-double .calendar-month-body {
  max-height: none;
}

.dashboard-tile.calendar-tile.tile-double {
  min-height: calc(var(--tile-row-height) * 2 + 1.25rem);
}

.calendar-tile-bar .calendar-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
}

.calendar-tz-label {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  flex-shrink: 1;
  min-width: 0;
  max-width: 11rem;
}

.calendar-tz-select {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 100%;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.calendar-tz-select:hover,
.calendar-tz-select:focus {
  border-color: var(--accent);
  outline: none;
}

.calendar-month-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 7.5rem;
  text-align: center;
}

.btn-calendar-nav {
  padding: 0.15rem 0.45rem;
  font-size: 1.1rem;
  line-height: 1;
}

.calendar-month-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar-weekday {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  padding: 0.2rem 0;
}

.calendar-day {
  min-height: 4.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0.2rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.calendar-day-outside {
  opacity: 0.45;
}

.calendar-day-today .calendar-day-num {
  color: var(--accent);
  font-weight: 700;
}

.calendar-day-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.calendar-event-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
  font-family: inherit;
  font-weight: inherit;
  font-size: 0.62rem;
  line-height: 1.25;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--event-color) 22%, transparent);
  border-left: 3px solid var(--event-color);
  color: var(--text);
  min-width: 0;
  width: 100%;
  margin: 0;
  border-top: none;
  border-right: none;
  border-bottom: none;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.calendar-event-chip .calendar-event-label {
  font-size: inherit;
  line-height: inherit;
}

.calendar-event-chip:hover {
  background: color-mix(in srgb, var(--event-color) 35%, transparent);
}

.modal-card-calendar-event {
  width: min(520px, 100%);
}

.calendar-event-modal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.calendar-event-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
  max-height: min(60vh, 420px);
  overflow: auto;
}

.calendar-event-detail-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: start;
}

.calendar-event-detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.calendar-event-detail-value {
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-word;
}

.calendar-event-detail-value a {
  color: var(--accent);
}

.calendar-event-detail-desc-text {
  white-space: pre-wrap;
  line-height: 1.45;
}

.calendar-event-detail-empty {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

/* Notes / to-do tile */
.dashboard-tile.notes-tile {
  min-height: var(--tile-row-height);
}

.dashboard-tile.notes-tile .notes-tile-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.85rem 1rem;
  overflow: hidden;
}

.dashboard-tile.notes-tile.tile-double .notes-tile-body {
  min-height: calc(var(--tile-row-height) * 2 - 100px);
}

.notes-editor {
  flex: 1;
  min-height: 12rem;
  width: 100%;
  resize: vertical;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.notes-editor:focus {
  outline: none;
  border-color: var(--accent);
}

.notes-preview {
  flex: 1;
  min-height: 12rem;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88rem;
  line-height: 1.5;
}

.notes-preview.hidden,
.notes-editor.hidden {
  display: none !important;
}

.notes-md-h1,
.notes-md-h2,
.notes-md-h3 {
  margin: 0.5rem 0 0.35rem;
  line-height: 1.25;
}

.notes-md-h1 {
  font-size: 1.15rem;
}

.notes-md-h2 {
  font-size: 1rem;
}

.notes-md-h3 {
  font-size: 0.92rem;
}

.notes-preview p {
  margin: 0.35rem 0;
}

.notes-md-list {
  margin: 0.35rem 0 0.35rem 1.1rem;
  padding: 0;
}

.notes-md-quote {
  margin: 0.35rem 0;
  padding: 0.35rem 0.65rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.notes-preview code {
  font-size: 0.82em;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--bg);
}

.notes-preview a {
  color: var(--accent);
}

.notes-md-empty {
  color: var(--muted);
  font-style: italic;
}

.notes-tile-footer {
  flex-shrink: 0;
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  text-align: right;
}

.notes-updated-label {
  font-size: 0.65rem;
  color: var(--muted);
  cursor: default;
}

.notes-tile-footer:hover .notes-updated-label {
  color: var(--text);
}

.calendar-event-attendees {
  line-height: 1.4;
}

.calendar-event-detail-uid {
  margin: 0.75rem 0 0;
  font-size: 0.65rem;
  color: var(--muted);
  word-break: break-all;
}

.notes-tile-bar .btn-notes-copy {
  flex-shrink: 0;
}

.notes-tile-bar .btn-notes-mode.tile-btn-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.add-tile-notes-form {
  margin-top: 0.5rem;
}

.calendar-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--event-color);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.calendar-event-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.calendar-more-events {
  font-size: 0.6rem;
  color: var(--muted);
  padding-left: 0.15rem;
}

.calendar-loading-hint,
.calendar-error {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

.dashboard-tile.calendar-loading .calendar-month-body {
  opacity: 0.55;
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.deal-edit-attach-hint {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-style: italic;
  opacity: 0.85;
}

.modal-error.hidden {
  display: none;
}

.tile-toolbar .btn-new-task {
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  flex-shrink: 0;
}

.tile-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.35rem;
  line-height: 0;
  flex-shrink: 0;
}

.btn-tile-refresh {
  margin-left: 0.1rem;
  color: var(--muted);
}

.btn-tile-refresh:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-tile-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-tile-refresh.is-refreshing .tile-refresh-icon {
  animation: tile-refresh-spin 0.75s linear infinite;
}

.tile-layout-icon {
  display: block;
}

@keyframes tile-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.opportunity-picker-field {
  position: relative;
}

@media (max-width: 640px) {
  .hero-sign-out {
    top: 0.65rem;
    right: 1rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.55rem;
  }

  .hero-logo {
    width: 64px;
  }

  .hero-inner {
    padding: 1.5rem 1rem 1rem;
    padding-top: 2.75rem;
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
  }

  .global-opp-search {
    flex: 1 1 100%;
    order: -1;
  }

  .global-opp-search-input {
    width: 100%;
  }

  .global-opp-search-results {
    left: 0;
    right: 0;
    width: auto;
  }

  .dashboard-tiles {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .board-group .board {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .column {
    flex: 0 0 260px;
  }
}