/*
 * RingCraft Design V1 — Active Call Session
 * Final composition layer for the post-filter caller cockpit.
 * Presentation only: no data, queue, dialing, outcome, or logging behavior.
 */

#callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero {
  min-height: 76px !important;
  padding: 12px clamp(20px, 2.4vw, 36px) !important;
  align-items: center !important;
}
#callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-eyebrow,
#callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-subtitle {
  display: none !important;
}
#callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-title {
  font-size: clamp(23px, 2vw, 29px) !important;
}
#callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-toolbar {
  justify-content: flex-end !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px) !important;
  gap: 18px !important;
  width: min(1520px, 100%) !important;
  max-width: 1520px !important;
  padding: 18px clamp(16px, 2vw, 28px) 28px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .callmode-left {
  display: grid !important;
  gap: 12px !important;
  align-content: start !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right {
  position: sticky !important;
  top: 14px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  align-content: start !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-perf-bar:not(:empty) {
  margin: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-perf-bar {
  min-height: 44px !important;
  padding: 9px 12px !important;
  box-shadow: none !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-lead-card {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 20px 22px !important;
  overflow: visible !important;
  border-radius: 16px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-lead-card > div {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-name {
  font-size: clamp(20px, 1.8vw, 26px) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-score {
  color: var(--rc-blue) !important;
  font-size: 26px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-tier {
  color: var(--rc-muted) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-badges,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-fu-bar,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-dial-primary,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-badges {
  flex-wrap: wrap !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-fu-bar {
  align-items: center !important;
  margin-top: 10px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-dial-primary {
  min-height: 62px !important;
  margin-top: 12px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin-top: 10px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-cell {
  min-height: 50px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-value,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-value-sm,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-value-sm span {
  color: var(--rc-blue) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-cell:first-child .cm-info-value {
  color: var(--rc-ink) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called {
  align-items: center !important;
  gap: 5px !important;
  margin-top: 10px !important;
  color: var(--rc-muted) !important;
  font-size: 10px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr) !important;
  grid-template-rows: auto auto auto auto auto 1fr auto !important;
  column-gap: 18px !important;
  row-gap: 0 !important;
  margin: 0 !important;
  padding: 20px 22px !important;
  border-radius: 16px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 0 5px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint {
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 0 10px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
  grid-column: 1 !important;
  grid-row: 3 / span 4 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 8px !important;
  margin: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .outcome-btn {
  min-height: 40px !important;
  padding: 8px 10px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
  grid-column: 1 !important;
  grid-row: 7 !important;
  justify-content: flex-start !important;
  margin: 12px 0 0 !important;
  padding-top: 11px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
  grid-column: 2 !important;
  grid-row: 1 / span 3 !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-rows: auto minmax(146px, 1fr) !important;
  margin: 0 0 12px !important;
  padding: 14px !important;
  border: 1px solid color-mix(in srgb, var(--rc-blue) 20%, var(--rc-line)) !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--rc-blue-soft) 36%, var(--rc-surface)) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) > label {
  margin: 0 0 8px !important;
  color: var(--rc-ink) !important;
  font-size: 11px !important;
  font-weight: 720 !important;
  letter-spacing: .01em !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 146px !important;
  margin: 0 !important;
  padding: 12px 13px !important;
  resize: vertical !important;
  color: var(--rc-ink) !important;
  line-height: 1.55 !important;
  background: var(--rc-surface) !important;
  border-radius: 9px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
  grid-column: 2 !important;
  grid-row: 4 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, .8fr) !important;
  gap: 10px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group {
  grid-column: 2 !important;
  grid-row: 5 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
  grid-column: 2 !important;
  grid-row: 6 / span 2 !important;
  align-self: end !important;
  min-height: 44px !important;
  margin-top: 4px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right > .card {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  padding: 16px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-card {
  border-top: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rc-blue);
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-body {
  max-height: 390px !important;
  overflow: auto !important;
  padding-right: 5px !important;
  scrollbar-width: thin;
}
/* The call log already records notes in Call History. Keep one editable note
 * surface and one audit trail instead of repeating the same context twice. */
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes-card {
  display: none !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-history-card {
  min-height: 0 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-call-history {
  max-height: 340px !important;
  overflow: auto !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-history-empty {
  padding: 10px 0 !important;
}

@media (max-width: 1180px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 350px) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr) !important;
  }
}

@media (max-width: 980px) {
  #callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-toolbar {
    justify-content: space-between !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right {
    position: static !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-card {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 760px) {
  #callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero {
    min-height: 0 !important;
    padding: 12px !important;
  }
  #callmode-screen:has(.callmode-body:not(.cm-filter-active)) .cm-hero-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) {
    padding: 10px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-lead-card,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    padding: 15px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 0 !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes),
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
    margin-bottom: 14px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
    min-height: 0 !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
    min-height: 128px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-card {
    grid-column: auto !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
    order: 20;
    justify-content: stretch !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn button {
    width: 100% !important;
  }
}

@media (max-width: 420px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* Active-session polish — final cockpit hierarchy, 2026-08-06.
 * One audit rail, compact note entry, and disciplined vertical rhythm.
 * Cosmetic only; the original DOM and all handlers remain intact.
 */
#callmode-screen .callmode-body:not(.cm-filter-active) {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  gap: 16px !important;
  align-items: start !important;
}

/* Generic script is intentionally removed from the active cockpit. */
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-script-card,
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes-card {
  display: none !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-history-card {
  order: -1 !important;
  padding: 18px !important;
  border-top: 3px solid var(--rc-blue) !important;
  box-shadow: var(--rc-shadow-sm) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-history-card .card-header {
  margin: 0 0 14px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--rc-line) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-call-history {
  max-height: min(68vh, 620px) !important;
  overflow: auto !important;
}

/* Lead card: each band owns its space; nothing floats over the next card. */
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-lead-card {
  padding: 20px 22px 18px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid {
  position: static !important;
  width: 100% !important;
  margin: 12px 0 0 !important;
  gap: 8px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-cell {
  min-height: 54px !important;
  padding: 9px 12px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called {
  position: static !important;
  width: 100% !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid var(--rc-line) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions .btn,
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  margin: 0 !important;
}

/* Log card: compact decision matrix with a small, purposeful note box. */
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr) !important;
  grid-template-rows: auto auto auto auto auto auto !important;
  column-gap: 18px !important;
  row-gap: 10px !important;
  padding: 18px 22px 20px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--rc-line) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: end !important;
  margin: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
  grid-column: 1 !important;
  grid-row: 3 / span 3 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .outcome-btn {
  min-height: 42px !important;
  padding: 8px 10px !important;
  justify-content: center !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: start !important;
  display: grid !important;
  grid-template-rows: auto 92px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) > label {
  margin: 0 0 6px !important;
  color: var(--rc-muted) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
  height: 92px !important;
  min-height: 92px !important;
  max-height: 160px !important;
  padding: 11px 12px !important;
  border: 1px solid var(--rc-line) !important;
  border-radius: 10px !important;
  background: var(--rc-surface-muted) !important;
  resize: vertical !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes:focus {
  border-color: var(--rc-blue) !important;
  background: var(--rc-surface) !important;
  box-shadow: var(--rc-focus) !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
  grid-column: 2 !important;
  grid-row: 3 !important;
  margin: 0 !important;
  gap: 8px !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group {
  grid-column: 2 !important;
  grid-row: 4 !important;
  margin: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
  grid-column: 1 !important;
  grid-row: 6 !important;
  align-self: end !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
  grid-column: 2 !important;
  grid-row: 5 / span 2 !important;
  align-self: end !important;
  min-height: 44px !important;
  margin: 0 !important;
}

@media (max-width: 1100px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) {
    grid-template-columns: minmax(0, 1fr) 300px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) minmax(235px, .78fr) !important;
  }
}

@media (max-width: 980px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) .callmode-right {
    position: static !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-call-history {
    max-height: 360px !important;
  }
}

@media (max-width: 760px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes),
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
    height: 104px !important;
    min-height: 104px !important;
  }
}

@media (max-width: 440px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-info-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-lead-actions,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* Final active-session alignment — compact log transaction, 2026-08-06.
 * Keeps every outcome, note control, and submit action visible without changing DOM.
 */
#callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 28px !important;
  margin: 10px 0 0 !important;
  padding: 6px 10px !important;
  color: var(--rc-blue) !important;
  font-size: 11px !important;
  font-weight: 680 !important;
  line-height: 1.25 !important;
  border: 1px solid color-mix(in srgb, var(--rc-blue) 20%, var(--rc-line)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--rc-blue-soft) 62%, var(--rc-surface)) !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
  position: relative !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(285px, .88fr) !important;
  grid-template-rows: auto auto auto auto auto !important;
  column-gap: 20px !important;
  row-gap: 9px !important;
  align-items: start !important;
  padding: 18px 22px 20px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  min-height: 34px !important;
  margin: 0 0 2px !important;
  padding: 0 0 11px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: start !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  color: var(--rc-muted) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
  grid-column: 1 !important;
  grid-row: 3 / span 3 !important;
  align-self: start !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 40px !important;
  gap: 7px 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) .outcome-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 7px 10px !important;
  justify-content: flex-start !important;
  text-align: left !important;
  white-space: nowrap !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  grid-template-rows: auto 78px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 78px !important;
  min-height: 78px !important;
  max-height: 130px !important;
  padding: 10px 11px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 100% !important;
  margin: 0 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group {
  grid-column: 2 !important;
  grid-row: 4 !important;
  width: 100% !important;
  margin: 0 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
  grid-column: 2 !important;
  grid-row: 5 !important;
  align-self: end !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
  grid-column: 1 !important;
  grid-row: 6 !important;
  align-self: start !important;
  margin: 4px 0 0 !important;
}

@media (max-width: 1100px) and (min-width: 761px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) minmax(250px, .82fr) !important;
    column-gap: 14px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) .outcome-btn {
    padding-inline: 8px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 760px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called {
    width: 100% !important;
    justify-content: center !important;
    border-radius: 9px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes),
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
    margin-bottom: 4px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
    height: 96px !important;
    min-height: 96px !important;
  }
}

@media (max-width: 440px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: 44px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) .outcome-btn {
    height: 44px !important;
    min-height: 44px !important;
  }
}


/* Call logging alignment lock — 2026-08-06.
 * Outcomes and note controls begin on the same visual baseline.
 * This supersedes earlier experimental row spans without changing markup.
 */
#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr) !important;
  grid-template-rows: auto auto auto auto auto auto !important;
  column-gap: 20px !important;
  row-gap: 9px !important;
  align-items: start !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .cm-log-hint {
  display: none !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
  grid-column: 1 !important;
  grid-row: 2 / span 4 !important;
  align-self: start !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 40px !important;
  gap: 7px 8px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  grid-template-rows: auto 72px !important;
  align-self: start !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 120px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid {
  grid-column: 2 !important;
  grid-row: 3 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group {
  grid-column: 2 !important;
  grid-row: 4 !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary {
  grid-column: 2 !important;
  grid-row: 5 !important;
  align-self: stretch !important;
  min-height: 46px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
  grid-column: 1 !important;
  grid-row: 6 !important;
  align-self: start !important;
  margin-top: 3px !important;
}

#callmode-screen .callmode-body:not(.cm-filter-active) .cm-last-called {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--rc-blue) 10%, transparent) !important;
}

@media (max-width: 860px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .card-header,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes),
  #callmode-screen .callmode-body:not(.cm-filter-active) .cm-log-grid,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-email-group,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .btn-primary,
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-remove-btn {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
    margin-bottom: 4px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-log-section > .form-group:has(#cm-notes) {
    grid-template-rows: auto 84px !important;
  }

  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-notes {
    height: 84px !important;
    min-height: 84px !important;
  }
}

@media (max-width: 440px) {
  #callmode-screen .callmode-body:not(.cm-filter-active) #cm-outcome-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: 44px !important;
  }
}
