
/* ==========================================================
   EMPIRE MODE WORKSPACE V1
   Loaded after all legacy workspace CSS.
   ========================================================== */


/* ==========================================================
   OUTER WORKSPACE
   ========================================================== */

.empire-mode-workspace {
  display: block !important;

  width: 100% !important;

  margin: 0 !important;
}


/* Old side-column shell is no longer the layout controller */
.empire-mode-workspace
> .phone-side-column {
  display: none !important;
}


/* ==========================================================
   KPI STRIP
   ========================================================== */

.empire-mode-kpis {
  display: grid !important;

  gap: 6px !important;

  width: 100% !important;

  margin-bottom: 10px !important;
}


.empire-mode-kpis
#power-dial-summary,

.empire-mode-kpis
#performance {
  width: 100% !important;

  margin: 0 !important;
}


/* Power-specific KPI row hidden in Preview */
.empire-mode-workspace
[data-noop] {
  display: initial;
}

body[data-empire-dial-layout="preview"]
#power-dial-summary {
  display: none !important;
}


/* ==========================================================
   THREE-COLUMN PRIMARY WORKSPACE
   ========================================================== */

.empire-mode-grid {
  display: grid !important;

  grid-template-columns:
    minmax(300px, .92fr)
    minmax(340px, 1.04fr)
    minmax(360px, 1.04fr) !important;

  gap: 12px !important;

  align-items: start !important;

  width: 100% !important;
}


.empire-mode-column {
  display: flex !important;

  flex-direction: column !important;

  gap: 10px !important;

  min-width: 0 !important;
}


/* Everything fills its column */
.empire-mode-column
> .panel,

.empire-mode-column
> section,

.empire-mode-column
> div {
  box-sizing: border-box !important;

  width: 100% !important;

  min-width: 0 !important;
}


/* ==========================================================
   CONTACT COLUMN
   ========================================================== */

.empire-mode-contact
#customer-card,

.empire-mode-contact
#disposition-center {
  margin: 0 !important;
}


.empire-mode-contact
#customer-card
.customer-grid {
  grid-template-columns:
    repeat(2, minmax(0,1fr)) !important;

  gap: 8px 12px !important;
}


/* ==========================================================
   KNOWLEDGE + SCRIPT COLUMN
   ========================================================== */

.empire-mode-knowledge
#campaign-workspace {
  box-sizing: border-box !important;

  width: 100% !important;

  margin: 0 !important;

  max-height: 620px !important;

  overflow-y: auto !important;

  overscroll-behavior: contain;
}


/* ==========================================================
   POWER / PREDICTIVE PHONE LIVE PREVIEW
   Directly underneath phone screen
   ========================================================== */

body[data-empire-dial-layout="preview"]
#power-dial-terminal {
  display: none !important;
}


body[data-empire-dial-layout="power"]
#power-dial-terminal,

body[data-empire-dial-layout="predictive"]
#power-dial-terminal {
  display: block !important;

  box-sizing: border-box !important;

  width: 100% !important;

  margin: 8px 0 !important;

  padding: 7px !important;

  border:
    1px solid rgba(212,175,55,.30) !important;

  border-radius: 8px !important;

  background:
    rgba(5,10,17,.72) !important;

  box-shadow: none !important;
}


body[data-empire-dial-layout="power"]
#power-dial-terminal
.power-terminal-head,

body[data-empire-dial-layout="predictive"]
#power-dial-terminal
.power-terminal-head {
  margin-bottom: 5px !important;
}


body[data-empire-dial-layout="power"]
#power-dial-terminal
.power-terminal-head strong,

body[data-empire-dial-layout="predictive"]
#power-dial-terminal
.power-terminal-head strong {
  font-size: 11px !important;

  letter-spacing: .08em !important;
}


/* Column labels unnecessary in compact phone version */
body[data-empire-dial-layout="power"]
#power-dial-terminal
.power-terminal-columns,

body[data-empire-dial-layout="predictive"]
#power-dial-terminal
.power-terminal-columns {
  display: none !important;
}


body[data-empire-dial-layout="power"]
#power-terminal-lines,

body[data-empire-dial-layout="predictive"]
#power-terminal-lines {
  max-height: 160px !important;

  overflow-y: auto !important;

  overscroll-behavior: contain;
}


body[data-empire-dial-layout="power"]
.power-terminal-line,

body[data-empire-dial-layout="predictive"]
.power-terminal-line {
  display: grid !important;

  grid-template-columns:
    24px
    minmax(0,1fr)
    68px
    42px !important;

  gap: 5px !important;

  align-items: center !important;

  min-height: 25px !important;

  padding: 4px 5px !important;

  font-size: 9px !important;
}


/* compact stream:
   LINE | NUMBER | STATUS | ELAPSED */
body[data-empire-dial-layout="power"]
.power-terminal-line > span,

body[data-empire-dial-layout="power"]
.power-terminal-line > small,

body[data-empire-dial-layout="predictive"]
.power-terminal-line > span,

body[data-empire-dial-layout="predictive"]
.power-terminal-line > small {
  display: none !important;
}


body[data-empire-dial-layout="power"]
.power-terminal-line code,

body[data-empire-dial-layout="predictive"]
.power-terminal-line code {
  overflow: hidden !important;

  text-overflow: ellipsis !important;

  white-space: nowrap !important;
}


/* ==========================================================
   LOWER ROW
   CALL LOGS | MESSAGES
   ========================================================== */

.empire-mode-lower {
  display: grid !important;

  grid-template-columns:
    minmax(0,1fr)
    minmax(0,1fr) !important;

  gap: 12px !important;

  align-items: start !important;

  width: 100% !important;

  margin-top: 12px !important;
}


.empire-mode-lower-left,
.empire-mode-lower-right {
  min-width: 0 !important;
}


/* ==========================================================
   CALL HISTORY COMPACT DRAWER
   ========================================================== */

#call-history.empire-call-history-drawer {
  box-sizing: border-box !important;

  width: 100% !important;

  margin: 0 !important;

  padding: 12px !important;

  overflow: hidden !important;
}


#call-history.empire-call-history-drawer
.section-title {
  position: relative !important;

  margin: 0 0 8px !important;

  padding-right: 100px !important;

  cursor: pointer !important;
}


#call-history.empire-call-history-drawer
.section-title h2 {
  margin-bottom: 0 !important;

  font-size: 18px !important;
}


#call-history.empire-call-history-drawer
.section-title p {
  display: none !important;
}


#call-history.empire-call-history-drawer
.section-title::after {
  content: "CLICK TO OPEN";

  position: absolute;

  top: 50%;
  right: 0;

  transform: translateY(-50%);

  color: rgba(255,255,255,.34);

  font-size: 9px;
  font-weight: 700;

  letter-spacing: .09em;
}


#call-history.empire-call-history-drawer.is-open
.section-title::after {
  content: "CLICK TO CLOSE";
}


#call-history.empire-call-history-drawer
.call-history-toolbar {
  position: static !important;

  display: grid !important;

  grid-template-columns:
    minmax(0,1fr)
    120px !important;

  gap: 7px !important;

  margin: 0 !important;
}


#call-history.empire-call-history-drawer
.call-history-toolbar input,

#call-history.empire-call-history-drawer
.call-history-toolbar select {
  min-width: 0 !important;

  height: 36px !important;

  margin: 0 !important;
}


.empire-call-history-results {
  max-height: 0 !important;

  margin-top: 0 !important;

  overflow: hidden !important;

  opacity: 0;

  transition:
    max-height .18s ease,
    opacity .15s ease,
    margin .15s ease;
}


#call-history.is-open
.empire-call-history-results {
  max-height: 250px !important;

  margin-top: 9px !important;

  overflow-y: auto !important;

  opacity: 1;

  overscroll-behavior: contain;
}


/* ==========================================================
   MESSAGES — LOWER RIGHT
   ========================================================== */

.empire-mode-lower-right
#advisor-messages {
  box-sizing: border-box !important;

  width: 100% !important;

  margin: 0 !important;
}


.empire-mode-lower-right
#advisor-messages[open]
.message-workspace {
  max-height: 250px !important;

  overflow-y: auto !important;
}


/* ==========================================================
   CAMPAIGN-LOCKED DIAL MODE
   Campaign chooses Preview / Power / Predictive
   ========================================================== */

body.empire-campaign-mode-locked
#dial-mode-panel {
  display: none !important;
}


/* ==========================================================
   MODE-SPECIFIC COLUMN BALANCE
   ========================================================== */

body[data-empire-dial-layout="preview"]
.empire-mode-grid {
  grid-template-columns:
    minmax(300px,.90fr)
    minmax(350px,1.06fr)
    minmax(370px,1.04fr) !important;
}


body[data-empire-dial-layout="power"]
.empire-mode-grid,

body[data-empire-dial-layout="predictive"]
.empire-mode-grid {
  grid-template-columns:
    minmax(320px,.96fr)
    minmax(350px,1.02fr)
    minmax(360px,1.02fr) !important;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1200px) {

  .empire-mode-grid {
    grid-template-columns:
      1fr 1fr !important;
  }

  .empire-mode-knowledge {
    grid-column:
      1 / -1 !important;
  }
}


@media (max-width: 850px) {

  .empire-mode-grid,
  .empire-mode-lower {
    grid-template-columns:
      1fr !important;
  }

  .empire-mode-knowledge {
    grid-column:
      auto !important;
  }
}


/* ==========================================================
   EMPIRE MASON + NOTES LOWER ROW V1
   ========================================================== */

.empire-mode-tools-lower {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr) !important;

  gap: 12px !important;

  align-items: start !important;

  width: 100% !important;

  margin-top: 12px !important;
}


.empire-mode-mason-column,
.empire-mode-notes-column {
  min-width: 0 !important;
}


/* Existing modules fill their half */
.empire-mode-mason-column > *,
.empire-mode-notes-column > * {
  box-sizing: border-box !important;

  width: 100% !important;

  margin: 0 !important;
}


/* Keep Mason usable without taking over the page */
.empire-mode-mason-column #mason-ai {
  max-height: 320px !important;

  overflow-y: auto !important;

  overscroll-behavior: contain;
}


/* Notes should remain comfortably writable */
.empire-mode-notes-column #call-notes {
  width: 100% !important;

  min-height: 130px !important;
  max-height: 220px !important;

  resize: vertical !important;
}


@media (max-width: 850px) {

  .empire-mode-tools-lower {
    grid-template-columns:
      1fr !important;
  }

}


/* EMPIRE_FULL_WIDTH_ROOT_RESET_V3 */

#advisor-panel > .workspace-row[data-layout-section="phone"] {
  display: none !important;
}

#advisor-panel > #empire-mode-workspace-root {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-column: 1 / -1 !important;
}

#empire-mode-workspace-root > .empire-mode-kpis {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 10px !important;
}

#empire-mode-workspace-root > .empire-mode-grid {
  display: grid !important;
  grid-template-columns: minmax(300px,.85fr) minmax(350px,1fr) minmax(500px,1.35fr) !important;
  gap: 12px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#empire-mode-workspace-root .empire-mode-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#empire-mode-workspace-root .empire-mode-column > * {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#empire-mode-workspace-root > .empire-mode-lower,
#empire-mode-workspace-root > .empire-mode-tools-lower {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 12px 0 0 !important;
}

#empire-mode-workspace-root #campaign-workspace {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#empire-mode-workspace-root #customer-card,
#empire-mode-workspace-root #disposition-center {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#empire-mode-workspace-root #customer-card .customer-grid {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
}

#empire-mode-workspace-root #disposition-rail {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
}

@media (max-width: 1250px) {
  #empire-mode-workspace-root > .empire-mode-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }

  #empire-mode-workspace-root .empire-mode-knowledge {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 850px) {
  #empire-mode-workspace-root > .empire-mode-grid,
  #empire-mode-workspace-root > .empire-mode-lower,
  #empire-mode-workspace-root > .empire-mode-tools-lower {
    grid-template-columns: 1fr !important;
  }

  #empire-mode-workspace-root #campaign-workspace {
    grid-template-columns: 1fr !important;
  }
}
/* EMPIRE_THREE_COLUMN_WORKSPACE_V4 */

/* MAIN DESK:
   PHONE | CONTACT + DISPOSITIONS | CONVERSATION GUIDE + VACATION OPTIONS */
#empire-mode-workspace-root > .empire-mode-grid {
  grid-template-columns:
    minmax(300px, .82fr)
    minmax(460px, 1.28fr)
    minmax(390px, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

/* Give customer/contact area more room and let it grow naturally. */
#empire-mode-workspace-root .empire-mode-contact,
#empire-mode-workspace-root #customer-card,
#empire-mode-workspace-root #disposition-center {
  width: 100% !important;
  min-width: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

#empire-mode-workspace-root #customer-card .customer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
}

#empire-mode-workspace-root #customer-card .customer-grid > div {
  min-height: 72px !important;
}

/* THIRD COLUMN IS ONE COLUMN, NOT TWO:
   Conversation Guide first, Vacation Options second. */
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel {
  order: 1 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  order: 2 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .panel {
  width: 100% !important;
  min-width: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
}

/* PHONE:
   screen first, keypad below it, call/TO controls below keypad. */
#empire-mode-workspace-root .empire-mode-phone .phone-deck {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

#empire-mode-workspace-root .empire-mode-phone .dial-pad {
  width: 100% !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-action-stack {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  gap: 8px !important;
  width: 100% !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-action-stack > button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
}

/* Keep lower workspace as two rows of two. */
#empire-mode-workspace-root > .empire-mode-lower,
#empire-mode-workspace-root > .empire-mode-tools-lower {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 1250px) {
  #empire-mode-workspace-root > .empire-mode-grid {
    grid-template-columns:
      minmax(300px, .85fr)
      minmax(420px, 1.15fr) !important;
  }

  #empire-mode-workspace-root .empire-mode-knowledge {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 850px) {
  #empire-mode-workspace-root > .empire-mode-grid,
  #empire-mode-workspace-root > .empire-mode-lower,
  #empire-mode-workspace-root > .empire-mode-tools-lower {
    grid-template-columns: 1fr !important;
  }

  #empire-mode-workspace-root .empire-mode-knowledge {
    grid-column: auto !important;
  }
}
/* EMPIRE_ADVISOR_LAYOUT_VISUAL_V5 */

#empire-mode-workspace-root > .empire-mode-kpis{
  display:grid!important;gap:7px!important;width:100%!important;margin:0 0 10px!important
}
body[data-empire-dial-layout="preview"] #power-dial-summary,
#empire-mode-workspace-root #power-dial-summary{display:grid!important}
#empire-mode-workspace-root #power-dial-summary{
  grid-template-columns:repeat(10,minmax(0,1fr))!important;gap:6px!important;width:100%!important;margin:0!important
}
#empire-mode-workspace-root #power-dial-summary .power-dial-metric{
  min-width:0!important;min-height:49px!important;padding:7px 6px!important;
  border:1px solid rgba(212,175,55,.24)!important;border-radius:9px!important;
  background:#0d1826!important;text-align:center!important
}
#empire-mode-workspace-root #power-dial-summary .power-dial-metric span{
  display:block!important;overflow:hidden!important;color:#99a4b6!important;font-size:8px!important;
  font-weight:850!important;letter-spacing:.08em!important;text-overflow:ellipsis!important;white-space:nowrap!important
}
#empire-mode-workspace-root #power-dial-summary .power-dial-metric strong{
  display:block!important;margin-top:2px!important;color:#f7f8fb!important;font-size:14px!important
}
#empire-mode-workspace-root #performance{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:7px!important;width:100%!important;margin:0!important
}

#empire-mode-workspace-root > .empire-mode-grid{
  display:grid!important;
  grid-template-columns:minmax(300px,.78fr) minmax(470px,1.30fr) minmax(410px,1.02fr)!important;
  gap:12px!important;align-items:start!important;width:100%!important
}

#empire-mode-workspace-root .empire-mode-contact{
  display:flex!important;flex-direction:column!important;gap:10px!important
}
#empire-mode-workspace-root #customer-card{
  order:1!important;min-height:470px!important;max-height:none!important;
  margin:0!important;overflow:visible!important
}
#empire-mode-workspace-root #disposition-center{order:2!important;margin:0!important}
#empire-mode-workspace-root #customer-card .customer-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:1px!important;width:100%!important;margin-top:14px!important;overflow:hidden!important;
  border:1px solid rgba(212,175,55,.28)!important;border-radius:10px!important;background:rgba(212,175,55,.20)!important
}
#empire-mode-workspace-root #customer-card .customer-grid>div{
  min-width:0!important;min-height:64px!important;padding:10px 12px!important;background:#101a29!important
}
#empire-mode-workspace-root #customer-card .customer-grid strong{
  white-space:normal!important;overflow-wrap:anywhere!important
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace{
  display:flex!important;flex-direction:column!important;gap:10px!important;width:100%!important;
  margin:0!important;overflow:visible!important
}
#empire-mode-workspace-root #campaign-workspace>.script-panel{
  order:1!important;width:100%!important;max-height:none!important;overflow:visible!important;margin:0!important
}
#empire-mode-workspace-root #campaign-workspace>.package-panel{
  order:2!important;width:100%!important;max-height:none!important;overflow:visible!important;margin:0!important
}
#empire-mode-workspace-root .script-panel .section-title,
#empire-mode-workspace-root .package-panel .section-title{
  display:flex!important;position:static!important;visibility:visible!important;opacity:1!important
}
#empire-mode-workspace-root .script-panel .script-copy{
  max-height:none!important;overflow:visible!important
}
#empire-mode-workspace-root .package-panel .package-content{
  display:grid!important;grid-template-columns:1fr!important;gap:8px!important;
  max-height:none!important;overflow:visible!important
}
#empire-mode-workspace-root .package-panel .package-content[hidden]{display:none!important}

#empire-mode-workspace-root>#customer-text-messages{
  box-sizing:border-box!important;width:100%!important;margin:12px 0 0!important;padding:15px 17px!important;
  border:1px solid rgba(212,175,55,.52)!important;border-radius:12px!important;
  background:linear-gradient(145deg,#121d2c,#0c1624)!important
}
.empire-customer-text-head{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important
}
.empire-customer-text-head h2{margin:3px 0 0!important;font-size:18px!important}
.empire-sms-state{
  padding:6px 9px!important;border:1px solid #785f27!important;border-radius:99px!important;
  background:#2b2415!important;color:#e0c570!important;font-size:8px!important;font-weight:900!important;letter-spacing:.09em!important
}
.empire-customer-text-body{
  display:grid!important;grid-template-columns:185px minmax(0,1fr) 125px!important;
  gap:10px!important;align-items:end!important;margin-top:10px!important
}
.empire-customer-text-recipient{
  min-width:0!important;padding:9px 11px!important;border:1px solid #34415a!important;
  border-radius:8px!important;background:#0b1421!important
}
.empire-customer-text-recipient small{
  display:block!important;color:#8e9aaf!important;font-size:8px!important;font-weight:850!important;letter-spacing:.10em!important
}
.empire-customer-text-recipient strong{
  display:block!important;margin-top:3px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important
}
#customer-text-input{
  box-sizing:border-box!important;width:100%!important;min-height:54px!important;margin:0!important;padding:10px 12px!important;
  resize:vertical!important;border:1px solid #35415d!important;border-radius:8px!important;background:#0b1220!important;color:#fff!important
}
#customer-text-send{min-height:54px!important}

#empire-mode-workspace-root>.empire-mode-lower{align-items:stretch!important}
#empire-mode-workspace-root #call-history,
#empire-mode-workspace-root #advisor-messages{
  box-sizing:border-box!important;min-height:118px!important;height:100%!important;margin:0!important;
  border:1px solid rgba(212,175,55,.52)!important;border-radius:12px!important;
  background:linear-gradient(145deg,#121d2c,#0c1624)!important;box-shadow:none!important
}
#empire-mode-workspace-root #call-history{padding:14px 16px!important}
#empire-mode-workspace-root #advisor-messages{padding:0!important}
#empire-mode-workspace-root #advisor-messages>summary{
  box-sizing:border-box!important;min-height:116px!important;padding:14px 16px!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important
}

@media(max-width:1250px){
  #empire-mode-workspace-root>.empire-mode-grid{
    grid-template-columns:minmax(300px,.80fr) minmax(450px,1.20fr)!important
  }
  #empire-mode-workspace-root .empire-mode-knowledge{grid-column:1/-1!important}
  #empire-mode-workspace-root #power-dial-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(max-width:850px){
  #empire-mode-workspace-root>.empire-mode-grid,
  #empire-mode-workspace-root>.empire-mode-lower,
  #empire-mode-workspace-root>.empire-mode-tools-lower{grid-template-columns:1fr!important}
  .empire-customer-text-body{grid-template-columns:1fr!important}
  #empire-mode-workspace-root #power-dial-summary,
  #empire-mode-workspace-root #performance{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ==========================================================
   EMPIRE_TWO_SHEET_CONTACT_ALERTS_VISUAL_V6
   ========================================================== */

#empire-mode-workspace-root
> .empire-mode-grid {
  align-items: start !important;
}

#empire-mode-workspace-root
.empire-mode-contact,

#empire-mode-workspace-root
.empire-mode-knowledge {
  box-sizing: border-box !important;
  height:
    var(--empire-primary-column-height, auto) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root
.empire-mode-contact {
  display: grid !important;
  grid-template-rows:
    minmax(0, 1fr)
    auto !important;
  gap: 10px !important;
}

#empire-mode-workspace-root
#customer-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding-bottom: 14px !important;
}

#empire-mode-workspace-root
#disposition-center {
  align-self: end !important;
  width: 100% !important;
  margin: 0 !important;
}

/* TWO SHEETS */

#empire-mode-workspace-root
#customer-grid.empire-customer-sheet-shell {
  position: relative !important;
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #0c1522 !important;
}

#empire-mode-workspace-root
.empire-customer-sheet-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border:
    1px solid rgba(212,175,55,.22);
  border-radius: 10px;
  background:
    linear-gradient(
      145deg,
      rgba(18,29,43,.96),
      rgba(8,16,26,.96)
    );
}

#empire-mode-workspace-root
.empire-customer-sheet-track {
  display: flex;
  width: 200%;
  height: 100%;
  min-height: 0;
  transform: translateX(0);
  transition:
    transform .46s
    cubic-bezier(.22,.78,.22,1);
}

#empire-mode-workspace-root
#customer-grid.show-secondary
.empire-customer-sheet-track {
  transform: translateX(-50%);
}

#empire-mode-workspace-root
.empire-customer-sheet {
  flex: 0 0 50%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0,1fr));
  grid-auto-rows:
    minmax(58px, auto);
  align-content: start;
  gap: 1px;
  width: 50%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 36px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #263146;
}

#empire-mode-workspace-root
.empire-customer-field {
  box-sizing: border-box;
  min-width: 0;
  padding: 10px 12px;
  background: #101a29;
}

#empire-mode-workspace-root
.empire-customer-field small {
  display: block;
  margin: 0 0 4px;
  color: #929caf;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .10em;
}

#empire-mode-workspace-root
.empire-customer-field strong {
  display: block;
  overflow: hidden;
  color: #f5f7fb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#empire-mode-workspace-root
.empire-customer-sheet-toggle {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform:
    translateY(-50%);
  border:
    1px solid rgba(241,211,122,.82);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      #f1d37a,
      #bf8f2f 55%,
      #60430d 100%
    );
  color: #111723;
  box-shadow:
    0 0 0 0 rgba(241,211,122,.55),
    0 8px 20px rgba(0,0,0,.38);
  font-size: 23px;
  font-weight: 900;
  cursor: pointer;
  animation:
    empireCustomerArrowPulse
    1.45s ease-in-out infinite;
}

#empire-mode-workspace-root
.empire-customer-sheet-toggle:hover {
  transform:
    translateY(-50%)
    scale(1.08);
}

#empire-mode-workspace-root
.empire-customer-sheet-page {
  position: absolute;
  z-index: 4;
  right: 9px;
  bottom: 7px;
  min-width: 37px;
  padding: 3px 5px;
  border-radius: 99px;
  background:
    rgba(4,9,16,.84);
  color: rgba(241,211,122,.82);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  text-align: center;
}

@keyframes empireCustomerArrowPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(241,211,122,.52),
      0 8px 20px rgba(0,0,0,.38);
  }

  50% {
    box-shadow:
      0 0 0 9px rgba(241,211,122,0),
      0 8px 25px rgba(191,143,47,.38);
  }
}

/* RIGHT COLUMN */

#empire-mode-workspace-root
.empire-mode-knowledge {
  display: block !important;
}

#empire-mode-workspace-root
.empire-mode-knowledge
#campaign-workspace {
  display: grid !important;
  grid-template-columns:
    1fr !important;
  grid-template-rows:
    minmax(220px, .78fr)
    minmax(190px, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root
.empire-mode-knowledge
#campaign-workspace
> .script-panel {
  order: 1 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
}

#empire-mode-workspace-root
.empire-mode-knowledge
#campaign-workspace
> .package-panel {
  order: 2 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

#empire-mode-workspace-root
.package-content {
  grid-template-columns:
    1fr !important;
  align-content: start !important;
}

/* PHONE ALERT CENTER */

#empire-mode-workspace-root
#dial-mode-panel.empire-dial-mode-control-store {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

#empire-mode-workspace-root
.empire-phone-alert-center {
  margin: 10px 0 8px;
  padding: 8px;
  border:
    1px solid rgba(212,175,55,.30);
  border-radius: 9px;
  background:
    linear-gradient(
      145deg,
      rgba(13,24,37,.96),
      rgba(7,14,23,.96)
    );
  box-shadow:
    inset 0 1px rgba(255,255,255,.03);
}

#empire-mode-workspace-root
.empire-phone-alert-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

#empire-mode-workspace-root
.empire-phone-alert-heading span {
  color: #e7c765;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

#empire-mode-workspace-root
.empire-phone-alert-heading small {
  color: #60d394;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .10em;
}

#empire-mode-workspace-root
.empire-phone-alert-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0,1fr));
  gap: 6px;
}

#empire-mode-workspace-root
.empire-phone-alert-tile {
  box-sizing: border-box;
  min-width: 0;
  min-height: 53px;
  padding: 7px 8px;
  border:
    1px solid #35425a;
  border-radius: 7px;
  background:
    #111b2a;
  color: #f4f6fa;
  text-align: left;
}

#empire-mode-workspace-root
.empire-phone-alert-button {
  width: 100%;
  cursor: pointer;
}

#empire-mode-workspace-root
.empire-phone-alert-tile span,
#empire-mode-workspace-root
.empire-phone-alert-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#empire-mode-workspace-root
.empire-phone-alert-tile span {
  color: #929caf;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .10em;
}

#empire-mode-workspace-root
.empire-phone-alert-tile strong {
  display: block;
  margin: 2px 0 1px;
  color: #f4f6fa;
  font-size: 11px;
  font-weight: 900;
}

#empire-mode-workspace-root
.empire-phone-alert-tile small {
  color: #78859a;
  font-size: 8px;
}

#empire-mode-workspace-root
.empire-phone-alert-tile.is-alerting {
  border-color:
    rgba(241,211,122,.94);
  background:
    linear-gradient(
      135deg,
      #2e260f,
      #5a4512,
      #1c2430
    );
  animation:
    empireAdvisorAlertFlash
    1.05s ease-in-out infinite;
  box-shadow:
    0 0 15px rgba(212,175,55,.27);
}

#empire-mode-workspace-root
.empire-phone-alert-tile.is-alerting strong {
  color: #ffe499;
}

@keyframes empireAdvisorAlertFlash {
  0%,
  100% {
    filter: brightness(.88);
  }

  50% {
    filter: brightness(1.32);
  }
}

#empire-mode-workspace-root
.empire-phone-alert-footer {
  margin-top: 6px;
}

#empire-mode-workspace-root
.empire-phone-alert-footer
.last-call-toggle {
  width: 100% !important;
  margin: 0 !important;
  min-height: 28px !important;
  padding: 4px 7px !important;
  border:
    1px solid rgba(212,175,55,.20);
  border-radius: 6px;
  background:
    rgba(8,15,24,.74);
}

@media (max-width: 1250px) {
  #empire-mode-workspace-root
  .empire-mode-contact,

  #empire-mode-workspace-root
  .empire-mode-knowledge {
    height: auto !important;
    overflow: visible !important;
  }

  #empire-mode-workspace-root
  #customer-card {
    min-height: 420px !important;
  }

  #empire-mode-workspace-root
  .empire-mode-knowledge
  #campaign-workspace {
    height: auto !important;
    grid-template-rows:
      auto
      minmax(300px, 460px) !important;
  }
}

/* ==========================================================
   EMPIRE_COMPACT_CONTACT_ALERT_FIX_V7
   Compact two-sheet contact + aligned disposition + taller knowledge.
   ========================================================== */

#empire-mode-workspace-root .empire-mode-contact {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  height: var(--empire-primary-column-height, auto) !important;
  min-height: 0 !important;
}

#empire-mode-workspace-root #customer-card {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#empire-mode-workspace-root
#customer-grid.empire-customer-sheet-shell {
  flex: 0 0 356px !important;
  height: 356px !important;
  min-height: 356px !important;
  max-height: 356px !important;
}

#empire-mode-workspace-root
.empire-customer-sheet-viewport {
  height: 356px !important;
  min-height: 356px !important;
  max-height: 356px !important;
}

#empire-mode-workspace-root
.empire-customer-sheet-track {
  height: 356px !important;
}

#empire-mode-workspace-root
.empire-customer-sheet {
  height: 356px !important;
  max-height: 356px !important;
  overflow-y: auto !important;
}

#empire-mode-workspace-root #disposition-center {
  flex: 1 1 auto !important;
  align-self: stretch !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: auto !important;
}

/* Keep Conversation Guide above Vacation Options, but give
   Vacation Options roughly 30px more vertical room. */
#empire-mode-workspace-root
.empire-mode-knowledge
#campaign-workspace {
  grid-template-rows:
    minmax(190px, .68fr)
    minmax(250px, 1.12fr) !important;
}

/* A single alert center only. */
#empire-mode-workspace-root
#empire-phone-alert-center {
  display: block !important;
}

/* EMPIRE_CONTACT_SIDE_GAP_FIX_V8 */
#empire-mode-workspace-root .empire-customer-sheet {
  padding-right: 0 !important;
}

#empire-mode-workspace-root .empire-customer-sheet-toggle {
  right: 8px !important;
}

/* EMPIRE_CONTACT_ARROW_LANE_REMOVE_V9 */
#empire-mode-workspace-root .empire-customer-sheet {
  padding-right: 0 !important;
  width: 50% !important;
}

#empire-mode-workspace-root .empire-customer-sheet-viewport,
#empire-mode-workspace-root .empire-customer-sheet-track {
  background: #101a29 !important;
}

#empire-mode-workspace-root .empire-customer-sheet-toggle {
  right: 10px !important;
}

/* EMPIRE_CONTACT_ARROW_LANE_REMOVE_V9 */
#empire-mode-workspace-root .empire-customer-sheet {
  padding-right: 0 !important;
  width: 50% !important;
}

#empire-mode-workspace-root .empire-customer-sheet-viewport,
#empire-mode-workspace-root .empire-customer-sheet-track {
  background: #101a29 !important;
}

#empire-mode-workspace-root .empire-customer-sheet-toggle {
  right: 10px !important;
}

/* EMPIRE_COLUMN3_EQUAL_SPLIT_V10 */
#empire-mode-workspace-root .empire-mode-knowledge {
  height: var(--empire-primary-column-height, auto) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  min-height: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel {
  order: 1 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  order: 2 !important;
}

/* EMPIRE_FINAL_VISUAL_ALIGNMENT_V11 */
#empire-mode-workspace-root .empire-mode-contact {
  display:flex!important;
  flex-direction:column!important;
  height:var(--empire-primary-column-height,auto)!important;
  min-height:0!important;
  gap:10px!important;
}
#empire-mode-workspace-root #customer-card {
  order:1!important;
  flex:0 0 auto!important;
}
#empire-mode-workspace-root #disposition-center {
  order:2!important;
  flex:1 1 0!important;
  min-height:0!important;
  overflow:auto!important;
}
#empire-mode-workspace-root #customer-text-messages {
  order:3!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
}
#empire-mode-workspace-root .empire-customer-sheet {
  box-sizing:border-box!important;
  gap:6px!important;
  padding:6px!important;
  background:transparent!important;
}
#empire-mode-workspace-root .empire-customer-field {
  border:1px solid rgba(212,175,55,.18)!important;
  border-radius:9px!important;
  overflow:hidden!important;
}
#empire-mode-workspace-root > .empire-mode-grid {
  align-items:stretch!important;
}
#empire-mode-workspace-root .empire-mode-knowledge {
  height:var(--empire-primary-column-height,auto)!important;
  min-height:0!important;
  overflow:hidden!important;
}
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display:grid!important;
  grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
  height:100%!important;
  min-height:0!important;
  gap:10px!important;
  overflow:hidden!important;
}
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel { order:1!important; }
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel { order:2!important; }

/* EMPIRE_COLUMN3_PHONE_HEIGHT_LOCK_V12 */
#empire-mode-workspace-root .empire-mode-knowledge {
  height: var(--empire-primary-column-height, auto) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
  height: 100% !important;
  min-height: 0 !important;
  gap: 10px !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* EMPIRE_REMOVE_DISPOSITION_GAP_V13 */
#empire-mode-workspace-root #disposition-center {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

#empire-mode-workspace-root #customer-text-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

#empire-mode-workspace-root #customer-text-messages .empire-customer-text-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* EMPIRE_COLUMN3_FULH_HEIGHT_V14 */
#empire-mode-workspace-root .empire-mode-knowledge {
  height: var(--empire-primary-column-height, 900px) !important;
  min-height: var(--empire-primary-column-height, 900px) !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: grid !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  height: 100% !important;
  min-height: 0 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* EMPIRE_COLUMN3_FULH_HEIGHT_V14 */
#empire-mode-workspace-root .empire-mode-knowledge {
  height: var(--empire-primary-column-height, 900px) !important;
  min-height: var(--empire-primary-column-height, 900px) !important;
  overflow: hidden !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: grid !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  height: 100% !important;
  min-height: 0 !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}
/* EMPIRE_COLUMN3_FULL_HEIGHT_V14 */
#empire-mode-workspace-root .empire-mode-knowledge {
  height: var(--empire-primary-column-height, 900px) !important;
  min-height: var(--empire-primary-column-height, 900px) !important;
  overflow: hidden !important;
}
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  display: grid !important;
  grid-template-rows: minmax(0,1fr) minmax(0,1fr) !important;
  gap: 10px !important;
  height: 100% !important;
  min-height: 0 !important;
}
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel,
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .package-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  overflow-y: auto !important;
}

/* EMPIRE_BOTTOM_MODULE_UNIFORM_V19 */
#empire-mode-workspace-root > .empire-mode-lower .panel,
#empire-mode-workspace-root > .empire-mode-lower #call-history,
#empire-mode-workspace-root > .empire-mode-lower #advisor-messages,
#empire-mode-workspace-root > .empire-mode-tools-lower .panel,
#empire-mode-workspace-root > .empire-mode-tools-lower details,
#empire-mode-workspace-root [data-layout-section="notes-mason"] .panel {
  background:
    linear-gradient(
      145deg,
      #171f31 0%,
      #111827 100%
    ) !important;
  border-color: #2a344d !important;
  box-shadow: 0 14px 38px rgba(0,0,0,.20) !important;
}

#empire-mode-workspace-root #advisor-messages > summary {
  background: transparent !important;
}


/* EMPIRE_LOWER_MODULE_INDEPENDENT_HEIGHTS_V21 */

/* Never stretch neighboring lower modules to equal height */
#empire-mode-workspace-root > .empire-mode-lower,
#empire-mode-workspace-root > .empire-mode-tools-lower {
  align-items: start !important;
}

/* Each module controls its own height */
#empire-mode-workspace-root > .empire-mode-lower > *,
#empire-mode-workspace-root > .empire-mode-tools-lower > * {
  align-self: start !important;
  min-height: 0 !important;
}

/* Call History and Messages must size independently */
#empire-mode-workspace-root #call-history,
#empire-mode-workspace-root #advisor-messages {
  height: auto !important;
  min-height: 0 !important;
}

/* CLOSED messages = header only */
#empire-mode-workspace-root
#advisor-messages:not([open])
.message-workspace {
  display: none !important;
}

/* OPEN messages = actual messaging workspace */
#empire-mode-workspace-root
#advisor-messages[open]
.message-workspace {
  display: grid !important;
  grid-template-columns: 190px minmax(0,1fr) !important;
  min-height: 340px !important;
  height: auto !important;
  max-height: none !important;
}

/* Do not let an open history drawer stretch Messages */
#empire-mode-workspace-root
.empire-mode-lower-right {
  align-self: start !important;
}

/* Do not let open Messages stretch History */
#empire-mode-workspace-root
.empire-mode-lower-left {
  align-self: start !important;
}



/* ==========================================================
   EMPIRE_UI_BATCH_V23
   ========================================================== */


/* LAST CALL — CHECKBOX COMPLETELY INVISIBLE */

#empire-mode-workspace-root
#last-call-checkbox {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}


#empire-mode-workspace-root
.empire-phone-alert-footer
.last-call-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  min-height: 38px !important;

  margin: 0 !important;
  padding: 8px 12px !important;

  border: 1px solid #f1d37a !important;
  border-radius: 7px !important;

  background:
    linear-gradient(
      145deg,
      #f3d77d 0%,
      #c29330 48%,
      #68470b 100%
    ) !important;

  color: #ffffff !important;

  cursor: pointer !important;

  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .10em !important;
  text-align: center !important;
  text-transform: uppercase !important;

  box-shadow:
    0 7px 18px rgba(194,147,48,.36),
    inset 0 1px rgba(255,255,255,.40)
    !important;
}


#empire-mode-workspace-root
.empire-phone-alert-footer
.last-call-toggle.is-active {
  border-color: #ff6573 !important;

  background:
    linear-gradient(
      145deg,
      #f34b5c 0%,
      #bb2339 48%,
      #66101f 100%
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 7px 19px rgba(226,43,66,.38),
    inset 0 1px rgba(255,255,255,.28)
    !important;
}


/* VOICEMAIL TILE */

#empire-alert-voicemail {
  cursor: pointer !important;
}

#empire-alert-voicemail:hover {
  border-color: #e7c765 !important;
  filter: brightness(1.12) !important;
}


/* READY / EXT 1003 STATUS PILL */

#empire-mode-workspace-root
#phone-status {
  padding-left: 16px !important;
  padding-right: 16px !important;
  min-width: max-content !important;
  white-space: nowrap !important;
}


/* EXTENSION PILL INSIDE PHONE */

#empire-mode-workspace-root
#phone-screen-extension {
  box-sizing: border-box !important;
  min-width: 78px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  text-align: center !important;
  white-space: nowrap !important;
}


/* WINDOWS / PC CAMPAIGN DROPDOWNS */

#advisor-custom-campaign-select,
#advisor-campaign-select {
  color-scheme: dark !important;
  background-color: #0b1220 !important;
  color: #ffffff !important;
}


#advisor-custom-campaign-select option,
#advisor-campaign-select option {
  color-scheme: dark !important;
  background-color: #0b1220 !important;
  color: #ffffff !important;
}


#advisor-custom-campaign-select option:checked,
#advisor-campaign-select option:checked {
  background-color: #26344d !important;
  color: #f1d37a !important;
}


/* PHONE — TO = GOLD */

#empire-mode-workspace-root
#to-button {
  border-color: #f1d37a !important;

  background:
    linear-gradient(
      145deg,
      #f3d77d 0%,
      #bd8c2d 48%,
      #654509 100%
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 7px 18px rgba(191,143,47,.38),
    inset 0 1px rgba(255,255,255,.42)
    !important;
}


/* PHONE — CALL = ELECTRIC GREEN */

#empire-mode-workspace-root
#call-button {
  border-color: #45ff9e !important;

  background:
    linear-gradient(
      145deg,
      #45ff9e 0%,
      #08ba65 48%,
      #035d37 100%
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 7px 20px rgba(28,235,137,.38),
    inset 0 1px rgba(255,255,255,.40)
    !important;
}


/* PHONE — END = DEEP RED */

#empire-mode-workspace-root
#hangup-button {
  border-color: #ed4758 !important;

  background:
    linear-gradient(
      145deg,
      #d83a49 0%,
      #991c30 48%,
      #4d0916 100%
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 7px 20px rgba(176,27,48,.38),
    inset 0 1px rgba(255,255,255,.28)
    !important;
}


/* PHONE — TRANSFER = ELECTRIC BLUE */

#empire-mode-workspace-root
#transfer-button {
  border-color: #51ceff !important;

  background:
    linear-gradient(
      145deg,
      #49d6ff 0%,
      #168fdb 48%,
      #064781 100%
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 7px 20px rgba(31,158,235,.38),
    inset 0 1px rgba(255,255,255,.38)
    !important;
}


/* KEEP COLORS VISIBLE WHILE BUTTON IS DISABLED */

#empire-mode-workspace-root
#to-button:disabled,

#empire-mode-workspace-root
#call-button:disabled,

#empire-mode-workspace-root
#hangup-button:disabled,

#empire-mode-workspace-root
#transfer-button:disabled {
  opacity: .78 !important;
  filter: none !important;
  -webkit-filter: none !important;
}


/* ==========================================================
   HISTORY / MESSAGES — TWO INDEPENDENT VERTICAL STACKS
   ========================================================== */

#empire-mode-workspace-root
> .empire-mode-lower {
  align-items: start !important;
}


#empire-mode-workspace-root
.empire-mode-lower-left,

#empire-mode-workspace-root
.empire-mode-lower-right {
  display: flex !important;
  flex-direction: column !important;

  align-items: stretch !important;

  gap: 12px !important;

  min-width: 0 !important;
  min-height: 0 !important;

  height: auto !important;

  align-self: start !important;
}


#empire-mode-workspace-root
.empire-mode-lower-left > *,

#empire-mode-workspace-root
.empire-mode-lower-right > * {
  flex: 0 0 auto !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;

  align-self: stretch !important;
}


/* OLD EMPTY SECOND LOWER ROW MUST RESERVE ZERO SPACE */

#empire-mode-workspace-root
> .empire-mode-tools-lower:empty,

#empire-mode-workspace-root
.notes-mason-grid:empty {
  display: none !important;
}


/* ==========================================================
   ADVISOR MESSAGES — REAL OPEN/CLOSE
   ========================================================== */

#empire-mode-workspace-root
#advisor-messages {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: hidden !important;
}


#empire-mode-workspace-root
#advisor-messages:not([open])
.message-workspace {
  display: none !important;
}


#empire-mode-workspace-root
#advisor-messages[open] {
  max-height: none !important;
  overflow: visible !important;
}


#empire-mode-workspace-root
#advisor-messages[open]
.message-workspace {
  display: grid !important;

  visibility: visible !important;
  opacity: 1 !important;

  grid-template-columns:
    190px minmax(0,1fr) !important;

  width: 100% !important;

  min-height: 340px !important;
  height: 340px !important;
  max-height: 340px !important;

  overflow: hidden !important;
}


#empire-mode-workspace-root
#advisor-messages[open]
.message-people {
  display: block !important;

  min-height: 340px !important;
  max-height: 340px !important;

  overflow-y: auto !important;
}


#empire-mode-workspace-root
#advisor-messages[open]
.message-conversation {
  display: grid !important;

  grid-template-rows:
    auto minmax(0,1fr) auto !important;

  min-height: 340px !important;
  max-height: 340px !important;

  overflow: hidden !important;
}


#empire-mode-workspace-root
#advisor-messages[open]
.message-thread {
  display: block !important;

  min-height: 200px !important;

  overflow-y: auto !important;
}


@media (max-width: 850px) {
  #empire-mode-workspace-root
  #advisor-messages[open]
  .message-workspace {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-height: none !important;
  }
}


/* EMPIRE_TO_PANEL_VISIBLE_V25 */

#empire-mode-workspace-root
.phone-action-stack {
  position: relative !important;
}

#empire-mode-workspace-root
#to-panel {
  position: absolute !important;

  left: 0 !important;
  right: 0 !important;
  top: 50px !important;

  width: 100% !important;
  max-width: none !important;

  box-sizing: border-box !important;

  z-index: 120 !important;

  padding: 14px !important;

  overflow: visible !important;
}

#empire-mode-workspace-root
#to-list {
  width: 100% !important;
  display: grid !important;
  gap: 8px !important;
}

#empire-mode-workspace-root
#to-list .to-person {
  width: 100% !important;

  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;

  align-items: center !important;

  gap: 12px !important;

  padding: 11px 13px !important;

  text-align: left !important;
}

#empire-mode-workspace-root
#to-list .to-person > span {
  display: block !important;

  min-width: 0 !important;

  overflow: visible !important;

  white-space: normal !important;

  color: #ffffff !important;

  font-weight: 850 !important;

  text-align: left !important;
}

#empire-mode-workspace-root
#to-list .to-person > small {
  display: block !important;

  white-space: nowrap !important;

  text-align: right !important;
}


/* ==========================================================
   EMPIRE CALL HISTORY DETAIL MODAL V26
   ========================================================== */

dialog#call-history-detail.call-history-detail {
  box-sizing: border-box !important;

  width: min(760px, calc(100vw - 32px)) !important;
  max-width: 760px !important;

  margin: auto !important;
  padding: 0 !important;

  border: 2px solid #c99a35 !important;
  border-radius: 18px !important;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(66,182,221,.10),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #171f31 0%,
      #0e1626 55%,
      #0a101c 100%
    ) !important;

  color: #f7f8fb !important;

  box-shadow:
    0 30px 90px rgba(0,0,0,.78),
    0 0 0 1px rgba(241,211,122,.16),
    inset 0 1px rgba(255,255,255,.06)
    !important;

  overflow: hidden !important;
}


dialog#call-history-detail.call-history-detail::backdrop {
  background: rgba(2,5,12,.78) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}


/* TITLE */

dialog#call-history-detail.call-history-detail > h2 {
  margin: 0 !important;

  padding: 24px 28px 18px !important;

  border-bottom: 1px solid rgba(201,154,53,.45) !important;

  background:
    linear-gradient(
      180deg,
      rgba(35,47,72,.95),
      rgba(19,28,45,.95)
    ) !important;

  color: #f1d37a !important;

  font-size: 24px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
}


/* DATA GRID */

dialog#call-history-detail.call-history-detail
.call-history-detail-grid {
  display: grid !important;

  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;

  gap: 12px !important;

  padding: 24px 28px !important;
}


dialog#call-history-detail.call-history-detail
.call-history-detail-grid > div {
  box-sizing: border-box !important;

  min-width: 0 !important;

  padding: 14px 16px !important;

  border: 1px solid #2d3952 !important;
  border-radius: 10px !important;

  background:
    linear-gradient(
      145deg,
      #111a2a,
      #0b1220
    ) !important;
}


dialog#call-history-detail.call-history-detail
.call-history-detail-grid small {
  display: block !important;

  margin-bottom: 6px !important;

  color: #c69a3d !important;

  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}


dialog#call-history-detail.call-history-detail
.call-history-detail-grid strong {
  display: block !important;

  color: #ffffff !important;

  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;
}


/* NOTES / LAST FIELD CAN USE FULL WIDTH */

dialog#call-history-detail.call-history-detail
.call-history-detail-grid > div:last-child {
  grid-column: 1 / -1 !important;
}


/* FULL-WIDTH CLOSE BUTTON */

dialog#call-history-detail.call-history-detail > button {
  display: block !important;

  width: calc(100% - 56px) !important;

  min-height: 46px !important;

  margin: 0 28px 26px !important;
  padding: 12px 18px !important;

  border: 1px solid #f1d37a !important;
  border-radius: 9px !important;

  background:
    linear-gradient(
      145deg,
      #248bd1 0%,
      #145d9d 50%,
      #0a315b 100%
    ) !important;

  color: #ffffff !important;

  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;

  cursor: pointer !important;

  box-shadow:
    0 8px 20px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.20)
    !important;
}


dialog#call-history-detail.call-history-detail > button:hover {
  background:
    linear-gradient(
      145deg,
      #35a6ef 0%,
      #176db6 50%,
      #0b3c70 100%
    ) !important;

  box-shadow:
    0 10px 24px rgba(24,115,190,.30),
    0 0 0 1px rgba(241,211,122,.18)
    !important;
}


@media (max-width: 650px) {

  dialog#call-history-detail.call-history-detail
  .call-history-detail-grid {
    grid-template-columns: 1fr !important;

    padding: 18px !important;
  }

  dialog#call-history-detail.call-history-detail
  .call-history-detail-grid > div:last-child {
    grid-column: auto !important;
  }

  dialog#call-history-detail.call-history-detail > button {
    width: calc(100% - 36px) !important;

    margin:
      0 18px 20px !important;
  }
}


/* ==========================================================
   EMPIRE CALL HISTORY SCROLL NAV V27
   ========================================================== */

dialog#call-history-detail
.call-history-detail-nav {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  gap: 12px !important;

  width: calc(100% - 56px) !important;

  margin: 0 28px 14px !important;
  padding: 10px 14px !important;

  box-sizing: border-box !important;

  border: 1px solid rgba(201,154,53,.42) !important;
  border-radius: 9px !important;

  background:
    linear-gradient(
      145deg,
      #111a2a,
      #0a111e
    ) !important;
}


dialog#call-history-detail
.call-history-scroll-text {
  color: #f1d37a !important;

  font-size: 10px !important;
  font-weight: 950 !important;

  letter-spacing: .16em !important;

  text-transform: uppercase !important;
}


dialog#call-history-detail
.call-history-scroll-arrow {
  display: grid !important;

  place-items: center !important;

  width: 34px !important;
  height: 30px !important;

  padding: 0 !important;

  border: 1px solid #f1d37a !important;
  border-radius: 7px !important;

  background:
    linear-gradient(
      145deg,
      #248bd1,
      #0b4278
    ) !important;

  color: #ffffff !important;

  font-size: 18px !important;
  font-weight: 950 !important;

  cursor: pointer !important;

  box-shadow:
    0 5px 13px rgba(0,0,0,.28)
    !important;
}


dialog#call-history-detail
.call-history-scroll-arrow:hover:not(:disabled) {
  background:
    linear-gradient(
      145deg,
      #38aaf1,
      #1264a7
    ) !important;
}


dialog#call-history-detail
.call-history-scroll-arrow:disabled {
  opacity: .28 !important;
  cursor: default !important;
}


/* REMOVE 🚫 CURSOR FROM DISABLED TRANSFER BUTTON */

#empire-mode-workspace-root
#transfer-button:disabled {
  cursor: default !important;
}


/* SAME BEHAVIOR FOR OTHER PHONE CONTROLS */

#empire-mode-workspace-root
.phone-action-stack > button:disabled {
  cursor: default !important;
}


/* ==========================================================
   EMPIRE CALL HISTORY SCROLL NAV V27
   ========================================================== */

dialog#call-history-detail
.call-history-detail-nav {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  gap: 12px !important;

  width: calc(100% - 56px) !important;

  margin: 0 28px 14px !important;
  padding: 10px 14px !important;

  box-sizing: border-box !important;

  border: 1px solid rgba(201,154,53,.42) !important;
  border-radius: 9px !important;

  background:
    linear-gradient(
      145deg,
      #111a2a,
      #0a111e
    ) !important;
}


dialog#call-history-detail
.call-history-scroll-text {
  color: #f1d37a !important;

  font-size: 10px !important;
  font-weight: 950 !important;

  letter-spacing: .16em !important;

  text-transform: uppercase !important;
}


dialog#call-history-detail
.call-history-scroll-arrow {
  display: grid !important;

  place-items: center !important;

  width: 34px !important;
  height: 30px !important;

  padding: 0 !important;

  border: 1px solid #f1d37a !important;
  border-radius: 7px !important;

  background:
    linear-gradient(
      145deg,
      #248bd1,
      #0b4278
    ) !important;

  color: #ffffff !important;

  font-size: 18px !important;
  font-weight: 950 !important;

  cursor: pointer !important;

  box-shadow:
    0 5px 13px rgba(0,0,0,.28)
    !important;
}


dialog#call-history-detail
.call-history-scroll-arrow:hover:not(:disabled) {
  background:
    linear-gradient(
      145deg,
      #38aaf1,
      #1264a7
    ) !important;
}


dialog#call-history-detail
.call-history-scroll-arrow:disabled {
  opacity: .28 !important;
  cursor: default !important;
}


/* REMOVE 🚫 CURSOR FROM DISABLED TRANSFER BUTTON */

#empire-mode-workspace-root
#transfer-button:disabled {
  cursor: default !important;
}


/* SAME BEHAVIOR FOR OTHER PHONE CONTROLS */

#empire-mode-workspace-root
.phone-action-stack > button:disabled {
  cursor: default !important;
}


/* ==========================================================
   EMPIRE CALL HISTORY ACTION ROW V28
   ========================================================== */

dialog#call-history-detail
.call-history-detail-actions {
  box-sizing: border-box !important;

  display: grid !important;

  grid-template-columns:
    repeat(2, minmax(0,1fr))
    !important;

  gap: 12px !important;

  width: calc(100% - 56px) !important;

  margin:
    0 28px 26px !important;
}


dialog#call-history-detail
.call-history-detail-actions
button {
  width: 100% !important;

  min-width: 0 !important;
  min-height: 48px !important;

  margin: 0 !important;

  padding:
    12px 16px !important;

  border-radius:
    9px !important;

  font-size:
    11px !important;

  font-weight:
    950 !important;

  letter-spacing:
    .10em !important;

  text-transform:
    uppercase !important;

  cursor:
    pointer !important;
}


/* CALL BACK — GOLD */

dialog#call-history-detail
.call-history-callback {
  border:
    1px solid #f1d37a !important;

  background:
    linear-gradient(
      145deg,
      #f1d37a 0%,
      #c2912e 48%,
      #68470a 100%
    ) !important;

  color:
    #ffffff !important;

  text-shadow:
    0 1px 2px rgba(0,0,0,.65)
    !important;

  box-shadow:
    0 8px 20px rgba(191,143,47,.28),
    inset 0 1px rgba(255,255,255,.38)
    !important;
}


dialog#call-history-detail
.call-history-callback:hover {
  filter:
    brightness(1.10) !important;
}


/* CLOSE — BLUE WITH GOLD TRIM */

dialog#call-history-detail
.call-history-detail-close {
  border:
    1px solid #f1d37a !important;

  background:
    linear-gradient(
      145deg,
      #248bd1 0%,
      #145d9d 50%,
      #0a315b 100%
    ) !important;

  color:
    #ffffff !important;

  box-shadow:
    0 8px 20px rgba(20,93,157,.28),
    inset 0 1px rgba(255,255,255,.22)
    !important;
}


dialog#call-history-detail
.call-history-detail-close:hover {
  background:
    linear-gradient(
      145deg,
      #35a6ef,
      #176db6 50%,
      #0b3c70
    ) !important;
}


@media (max-width: 520px) {

  dialog#call-history-detail
  .call-history-detail-actions {
    width:
      calc(100% - 36px)
      !important;

    margin:
      0 18px 20px
      !important;

    gap:
      8px !important;
  }
}



/* ==========================================================
   EMPIRE POWER DIALER — FULL WIDTH CONSOLE V29
   ========================================================== */


/*
 * Preview mode remains clean.
 */

body[data-empire-dial-layout="preview"]
#empire-mode-workspace-root
> #power-dial-terminal {
  display: none !important;
}


/*
 * Full-width console immediately beneath KPI rows.
 */

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal {

  display: block !important;

  box-sizing: border-box !important;

  width: 100% !important;
  min-width: 0 !important;

  margin:
    4px 0 14px !important;

  padding:
    0 0 8px !important;

  overflow: hidden !important;

  border:
    1px solid rgba(212,175,55,.38)
    !important;

  border-radius:
    15px !important;

  background:
    linear-gradient(
      160deg,
      rgba(15,27,44,.98) 0%,
      rgba(8,17,30,.99) 52%,
      rgba(5,11,20,.99) 100%
    ) !important;

  box-shadow:
    0 18px 48px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.035)
    !important;
}


/* HEADER */

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-head {

  display: flex !important;

  align-items: center !important;
  justify-content: space-between !important;

  gap: 18px !important;

  min-height: 58px !important;

  margin: 0 !important;

  padding:
    14px 18px !important;

  border-bottom:
    1px solid rgba(212,175,55,.20)
    !important;

  background:
    linear-gradient(
      90deg,
      rgba(19,38,61,.96),
      rgba(10,22,38,.96)
    ) !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-head strong {

  color:
    #f4d477 !important;

  font-size:
    18px !important;

  line-height:
    1.1 !important;

  font-weight:
    950 !important;

  letter-spacing:
    .095em !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
#power-terminal-batch {

  display:
    inline-flex !important;

  align-items:
    center !important;

  min-height:
    30px !important;

  padding:
    5px 10px !important;

  border:
    1px solid rgba(212,175,55,.25)
    !important;

  border-radius:
    999px !important;

  background:
    rgba(4,12,22,.78) !important;

  color:
    #c8d2df !important;

  font-size:
    9px !important;

  font-weight:
    900 !important;

  letter-spacing:
    .09em !important;
}


/* ==========================================================
   HERO KPI CARDS
   ========================================================== */

#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-hero-kpis {

  display:
    grid !important;

  grid-template-columns:
    repeat(2,minmax(0,1fr))
    !important;

  gap:
    10px !important;

  padding:
    12px 14px 10px !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-hero-card {

  min-width:
    0 !important;

  padding:
    15px 18px !important;

  border:
    1px solid rgba(212,175,55,.24)
    !important;

  border-radius:
    12px !important;

  background:
    linear-gradient(
      145deg,
      rgba(22,41,64,.94),
      rgba(10,22,37,.96)
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 8px 22px rgba(0,0,0,.18)
    !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-hero-card > span {

  display:
    block !important;

  color:
    #aab6c7 !important;

  font-size:
    9px !important;

  font-weight:
    900 !important;

  letter-spacing:
    .12em !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-hero-card > strong {

  display:
    block !important;

  margin-top:
    3px !important;

  color:
    #ffffff !important;

  font-size:
    clamp(25px,2.3vw,38px)
    !important;

  line-height:
    1.05 !important;

  font-weight:
    950 !important;

  letter-spacing:
    -.035em !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-hero-card > small {

  display:
    block !important;

  margin-top:
    5px !important;

  color:
    #d5b85a !important;

  font-size:
    8px !important;

  font-weight:
    850 !important;

  letter-spacing:
    .08em !important;
}


/* ==========================================================
   COLUMN HEADER
   ========================================================== */

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-columns,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-columns {

  display:
    grid !important;

  grid-template-columns:
    56px
    minmax(130px,.85fr)
    minmax(150px,1fr)
    minmax(105px,.65fr)
    86px
    minmax(180px,1.25fr)
    !important;

  gap:
    8px !important;

  align-items:
    center !important;

  margin:
    0 12px !important;

  padding:
    8px 10px !important;

  border:
    1px solid rgba(255,255,255,.055)
    !important;

  border-radius:
    8px 8px 0 0 !important;

  background:
    rgba(4,11,20,.92) !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-columns span {

  color:
    #8795a9 !important;

  font-size:
    8px !important;

  font-weight:
    950 !important;

  letter-spacing:
    .11em !important;

  white-space:
    nowrap !important;
}


/* ==========================================================
   RESIZABLE / SCROLLABLE LIVE STREAM
   ========================================================== */

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal
#power-terminal-lines,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal
#power-terminal-lines {

  box-sizing:
    border-box !important;

  display:
    block !important;

  width:
    auto !important;

  height:
    230px;

  min-height:
    120px !important;

  max-height:
    700px !important;

  margin:
    0 12px !important;

  padding:
    5px !important;

  overflow-x:
    auto !important;

  overflow-y:
    auto !important;

  overscroll-behavior:
    contain !important;

  resize:
    vertical !important;

  border:
    1px solid rgba(255,255,255,.055)
    !important;

  border-top:
    0 !important;

  border-radius:
    0 0 10px 10px !important;

  background:
    rgba(2,8,15,.72) !important;

  scrollbar-width:
    thin;
}


/* CALL ROW */

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line {

  display:
    grid !important;

  grid-template-columns:
    56px
    minmax(130px,.85fr)
    minmax(150px,1fr)
    minmax(105px,.65fr)
    86px
    minmax(180px,1.25fr)
    !important;

  gap:
    8px !important;

  align-items:
    center !important;

  min-width:
    780px !important;

  min-height:
    34px !important;

  margin:
    0 0 4px !important;

  padding:
    6px 10px !important;

  border:
    1px solid rgba(255,255,255,.045)
    !important;

  border-radius:
    7px !important;

  background:
    rgba(12,23,38,.75) !important;

  font-size:
    10px !important;

  line-height:
    1.2 !important;

  transition:
    background .16s ease,
    border-color .16s ease,
    transform .16s ease
    !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line:hover {

  background:
    rgba(20,36,57,.92)
    !important;

  border-color:
    rgba(212,175,55,.18)
    !important;
}


/* Restore CUSTOMER + DETAIL fields hidden by compact version */

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > span,

body[data-empire-dial-layout="power"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > small,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > span,

body[data-empire-dial-layout="predictive"]
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > small {

  display:
    block !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > b {

  color:
    #e5c25d !important;

  font-size:
    10px !important;

  font-weight:
    950 !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > code {

  overflow:
    hidden !important;

  text-overflow:
    ellipsis !important;

  white-space:
    nowrap !important;

  color:
    #dce5ef !important;

  font-size:
    10px !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > span {

  overflow:
    hidden !important;

  text-overflow:
    ellipsis !important;

  white-space:
    nowrap !important;

  color:
    #f3f6fa !important;

  font-size:
    10px !important;

  font-weight:
    780 !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > strong {

  overflow:
    hidden !important;

  text-overflow:
    ellipsis !important;

  white-space:
    nowrap !important;

  color:
    #aeb9c8 !important;

  font-size:
    9px !important;

  font-weight:
    950 !important;

  letter-spacing:
    .055em !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > time {

  color:
    #dce4ee !important;

  font-size:
    9px !important;

  font-variant-numeric:
    tabular-nums !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line > small {

  overflow:
    hidden !important;

  text-overflow:
    ellipsis !important;

  white-space:
    nowrap !important;

  color:
    #8594a8 !important;

  font-size:
    9px !important;
}


/* Current activity emphasis */

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line.dialing,

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line.ringing,

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line.amd {

  border-color:
    rgba(53,139,210,.30)
    !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line.human,

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-line.connected {

  border-color:
    rgba(51,215,133,.48)
    !important;

  background:
    rgba(13,60,45,.34)
    !important;
}


/* RESIZE HINT */

#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-resize-hint {

  padding:
    7px 14px 0 !important;

  color:
    #657489 !important;

  font-size:
    8px !important;

  font-weight:
    850 !important;

  letter-spacing:
    .09em !important;

  text-align:
    right !important;

  user-select:
    none !important;
}


#empire-mode-workspace-root
> #power-dial-terminal
.empire-power-resize-hint span {

  color:
    #d4af37 !important;

  font-size:
    11px !important;
}


/* Responsive */

@media(max-width:850px) {

  #empire-mode-workspace-root
  > #power-dial-terminal
  .empire-power-hero-kpis {

    grid-template-columns:
      1fr !important;
  }
}

/* Customer text composer: readable recipient, presets, and full-width draft. */
#empire-mode-workspace-root #customer-text-messages .empire-customer-text-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 12px !important;
}

#empire-mode-workspace-root #customer-text-messages .empire-customer-text-recipient,
#empire-mode-workspace-root #customer-text-messages .empire-customer-text-presets,
#empire-mode-workspace-root #customer-text-messages #customer-text-input,
#empire-mode-workspace-root #customer-text-messages #customer-text-send {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#empire-mode-workspace-root #customer-text-messages .empire-customer-text-recipient {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-height: 58px !important;
}

#empire-mode-workspace-root #customer-text-messages .empire-customer-text-recipient strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

#empire-mode-workspace-root #customer-text-messages .empire-customer-text-presets {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  margin: 0 !important;
  color: #8e9aaf !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: .1em !important;
}

#empire-mode-workspace-root #customer-text-messages #customer-text-preset {
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  font-size: 13px !important;
  letter-spacing: normal !important;
}

#empire-mode-workspace-root #customer-text-messages #customer-text-input {
  min-height: 96px !important;
  margin: 0 !important;
  resize: vertical !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

#empire-mode-workspace-root #customer-text-messages #customer-text-send {
  min-height: 52px !important;
  margin: 0 !important;
}

/* Compact Conversation Guide: keep the script useful without making the
   whole knowledge column feel like a deep scrolling panel. */
#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
  grid-template-rows: minmax(270px, 320px) minmax(0, 1fr) !important;
  align-content: start !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel {
  height: 320px !important;
  min-height: 0 !important;
  max-height: 320px !important;
  overflow: hidden !important;
  align-self: start !important;
}

#empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel .script-copy {
  max-height: 222px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

@media (max-width: 850px) {
  #empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace {
    grid-template-rows: minmax(260px, 310px) minmax(0, 1fr) !important;
  }

  #empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel {
    height: 310px !important;
    max-height: 310px !important;
  }

  #empire-mode-workspace-root .empire-mode-knowledge #campaign-workspace > .script-panel .script-copy {
    max-height: 212px !important;
  }
}

/* Keep the full disposition rail available when needed, but let advisors
   collapse the deep detail panel to its compact heading. */
#empire-mode-workspace-root #disposition-center {
  position: relative !important;
}

#empire-mode-workspace-root #disposition-center .disposition-collapse-toggle {
  min-width: 96px !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  border: 1px solid #465372 !important;
  border-radius: 8px !important;
  background: #151c2b !important;
  color: #d9deeb !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

#empire-mode-workspace-root #disposition-center .disposition-collapse-toggle:hover {
  border-color: #c8a449 !important;
  color: #f1d37a !important;
}

#empire-mode-workspace-root #disposition-center.is-collapsed > :not(.section-title) {
  display: none !important;
}

#empire-mode-workspace-root #disposition-center.is-collapsed .section-title {
  margin-bottom: 0 !important;
}

@media (max-width: 700px) {
  #empire-mode-workspace-root #disposition-center .section-title {
    align-items: stretch !important;
  }

  #empire-mode-workspace-root #disposition-center .disposition-collapse-toggle {
    width: 100% !important;
  }
}

/* Rounded, elevated performance modules */
#empire-mode-workspace-root #power-dial-summary,
#empire-mode-workspace-root #performance {
  border: 1px solid rgba(120, 143, 181, .28) !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #0b1522, #07101b) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

#empire-mode-workspace-root #power-dial-summary .power-dial-metric,
#empire-mode-workspace-root #performance .power-dial-metric {
  border-radius: 14px !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .055) !important;
}

/* ==========================================================
   SINGLE PREDICTIVE CONSOLE V1
   KPI rows first, followed by one call-preview console. The campaign
   context stays in the header and Start/End controls align to the right.
   ========================================================== */

#empire-live-preview {
  display: none !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-head {
  display: grid !important;
  grid-template-columns: minmax(190px, .7fr) minmax(420px, 1.55fr) auto auto !important;
  align-items: center !important;
  gap: 14px !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
#empire-preview-live-status {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 4px 9px !important;
  border: 1px solid rgba(57, 255, 136, .38) !important;
  border-radius: 999px !important;
  background: rgba(20, 124, 74, .18) !important;
  color: #8cf0b5 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-context {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr 1fr !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-context > span {
  min-width: 0 !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(212, 175, 55, .22) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, .035) !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-context small {
  display: block !important;
  margin-bottom: 3px !important;
  color: #c9a95b !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  letter-spacing: .09em !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-context strong {
  display: block !important;
  overflow: hidden !important;
  color: #fff !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 270px !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-actions #empire-start-preview,
#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-actions #empire-end-preview {
  width: auto !important;
  min-width: 128px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  white-space: nowrap !important;
}

#empire-mode-workspace-root
> #power-dial-terminal
.power-terminal-batch-state {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
}

@media (max-width: 1250px) {
  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-context {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-batch-state {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }
}

@media (max-width: 700px) {
  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-head {
    grid-template-columns: 1fr !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  :is(.power-terminal-title, .power-terminal-context, .power-terminal-actions, .power-terminal-batch-state) {
    grid-column: 1 !important;
    width: 100% !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-title { grid-row: 1 !important; }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-context {
    grid-row: 2 !important;
    grid-template-columns: 1fr !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-actions {
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    min-width: 0 !important;
  }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-batch-state { grid-row: 4 !important; }

  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-actions #empire-start-preview,
  #empire-mode-workspace-root
  > #power-dial-terminal
  .power-terminal-actions #empire-end-preview {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* EMPIREOS FINAL MODULE BACKGROUND AUTHORITY V4
   This stylesheet loads after the historical workspace skins, so every
   advisor module resolves to the approved Lead Engine charcoal gradient. */
#advisor-panel #empire-mode-workspace-root :is(
  .panel,
  #empire-live-preview,
  #power-dial-terminal,
  #empire-phone-alert-center,
  #call-history,
  #advisor-messages,
  #mason-ai,
  #empireos-lead-engine-panel
){
  border-color:rgba(215,225,238,.22)!important;
  background:linear-gradient(145deg,#353c47 0%,#181d25 100%)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.42)!important;
}

/* Comfortable phone controls: larger touch targets and calmer spacing while
   preserving the compact two-column phone layout. */
#empire-mode-workspace-root .empire-mode-phone .phone-action-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-action-stack > button {
  min-height: 54px !important;
  padding: 9px 10px !important;
  border-radius: 11px !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
  touch-action: manipulation !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-action-stack > button span {
  display: block !important;
  margin: 5px 0 0 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-action-stack > button:focus-visible {
  outline: 3px solid #f1d37a !important;
  outline-offset: 3px !important;
}

@media (max-width: 520px) {
  #empire-mode-workspace-root .empire-mode-phone .phone-action-stack {
    gap: 8px !important;
  }

  #empire-mode-workspace-root .empire-mode-phone .phone-action-stack > button {
    min-height: 50px !important;
    padding: 8px 7px !important;
  }
}

/* The entire dialer body can collapse while the live status stays visible. */
#empire-mode-workspace-root .empire-mode-phone .phone-panel-heading-actions {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-dialer-collapse-toggle {
  min-width: 96px !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  border: 1px solid #465372 !important;
  border-radius: 8px !important;
  background: #151c2b !important;
  color: #d9deeb !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-dialer-collapse-toggle:hover {
  border-color: #c8a449 !important;
  color: #f1d37a !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-panel.is-collapsed > #phone-dialer-body {
  display: none !important;
}

#empire-mode-workspace-root .empire-mode-phone .phone-panel.is-collapsed .panel-heading {
  margin-bottom: 0 !important;
}

@media (max-width: 700px) {
  #empire-mode-workspace-root .empire-mode-phone .phone-panel-heading-actions {
    width: 100% !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  #empire-mode-workspace-root .empire-mode-phone .phone-panel-heading-actions > * {
    flex: 1 1 auto !important;
  }

  #empire-mode-workspace-root .empire-mode-phone .phone-dialer-collapse-toggle {
    min-width: 0 !important;
  }
}
