/* Final workspace theme. Portal, login, public monitoring and log iframe keep
   their own styles. Layout remains owned by the shell and business components. */
.console-frame,
.console-dialog {
  --ink: #253047;
  --text: #253047;
  --muted: #637087;
  --line: #dce1ec;
  --green: #6544cf;
  --primary: #6544cf;
  --mint: #f0ebfc;
  --control-border: #cdd5e3;
  --control-ring: #7455d5;
}
.console-frame { color: var(--ink); background: #f3f5fa; }
.console-frame .console-header,
.console-frame[data-console-role="agent"] .console-header {
  background: #fff;
  border-bottom-color: #e0e3ee;
  box-shadow: 0 1px 5px #24314b05;
}
.console-frame .app-layout .sidebar.console-sidebar {
  background: #f9f9fd;
  border-color: #e1e5ef;
}
.console-frame .app-layout .main { background: #f7f8fc; border-color: #e1e5ef; }
.console-frame .app-layout .nav-item {
  color: #4c5870;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.console-frame .app-layout .nav-item.active {
  background: #ede7fc;
  border-color: #ddd2f6;
  color: #5133aa;
  box-shadow: inset 3px 0 #7654d4;
  font-weight: 650;
}
.console-frame .console-nav-group h2 { color: #667188; }
.console-frame .page-heading h1 { color: #253047; font-weight: 700; }
.console-frame .page-heading p { color: #637087; }
.console-frame :is(.table-card, .workspace-panel, .workspace-summary-strip,
  .ticket-page-surface, .ticket-center-nav, .finance-workspace-navigation) {
  background: #fff;
  border-color: #dfe3ed;
  box-shadow: 0 2px 8px #29345404;
}
.console-frame .workspace-summary-strip.workspace-metrics { background: #fff; }
.console-frame .table-card thead { background: #f7f8fc; }
.console-frame .table-card th { color: #55617a; }
.console-frame :is(.workspace-task-copy small, .workspace-home-panels .workspace-task-copy small,
  .workspace-service-group > h3, .ticket-page-heading p, .ticket-center-heading p,
  .ticket-center-category-group > header small, .ticket-center-guide-note,
  .finance-workspace-context small, .card-batch-notes, .work-update-state) { color: #637087; }
.console-frame .workspace-home-panels .workspace-task-copy small { font-size: 12px; }
.console-frame :is(.ticket-center-guide-card li, .workspace-follow-up p) { color: #6d5d83; }
.console-frame :is(.ticket-center-tabs, .finance-workspace-navigation .finance-workspace-tabs) {
  background: #f0eef8;
  border-color: #ddd7ec;
}
.console-frame :is(.ticket-center-tab.selected, .finance-workspace-tab.selected) {
  color: #fff;
  background: #6544cf;
  border-color: #6544cf;
}
.console-frame .console-content-tabs.workspace-filters {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.console-frame :is(.btn:not(:where(.active, .selected, [aria-pressed="true"])), .input, .select),
.console-dialog :is(.btn:not(:where(.active, .selected, [aria-pressed="true"])), .input, .select) {
  border-color: var(--control-border);
  box-shadow: none;
}
.console-frame .btn:not(:where(.active, .selected, [aria-pressed="true"])),
.console-dialog .btn:not(:where(.active, .selected, [aria-pressed="true"])) {
  background: #fff;
  color: #42516b;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.console-frame .btn.primary,
.console-dialog .btn.primary {
  background: #6544cf;
  color: #fff;
  border-color: #6544cf;
  box-shadow: 0 2px 5px #6544cf1a;
}
.console-frame .btn.danger,
.console-dialog .btn.danger { background: #fff5f6; color: #a42c44; border-color: #e9c6cf; }
.console-frame .btn:disabled, .console-frame .btn:disabled:hover,
.console-dialog .btn:disabled, .console-dialog .btn:disabled:hover { background: #f0f2f7; color: #8993a5; border-color: #e1e5ee; box-shadow: none; }
.console-frame :is(.input, .select),
.console-dialog :is(.input, .select) { background: #fff; color: #344159; }
.console-frame .input::placeholder,
.console-dialog .input::placeholder { color: #637087; }
.console-frame :is(button, a, input, select, textarea):focus-visible,
.console-dialog :is(button, a, input, select, textarea):focus-visible,
.console-frame :is(.input, .select):focus-visible,
.console-dialog :is(.input, .select):focus-visible {
  outline: 2px solid #7455d5;
  outline-offset: 3px;
}
.console-frame .badge.green { color: #267251; background: #eaf6ef; }
.console-frame .badge.amber { color: #8b5c12; background: #fff3dc; }
.console-frame .badge.red { color: #a53649; background: #fdeef0; }
.console-frame .badge.blue:not(:where(.customer-group-badge)) { color: #6344a8; background: #f0ebfc; }
.console-frame .badge.muted:not(:where(.customer-group-badge)) { color: #59677e; background: #edf0f5; }
.console-frame .notice,
.console-dialog .notice { color: #54647e; background: #f5f7fc; border-color: #dde4ef; }
.console-frame .notice.amber,
.console-dialog .notice.amber { color: #875d20; background: #fff8e9; border-color: #eddcba; }
.console-frame .notice.error,
.console-dialog .notice.error { color: #a23748; background: #fff1f3; border-color: #ebcbd2; }
.console-dialog { background: #fff; border-color: #dce1ec; box-shadow: 0 20px 70px #202b4533; }
.console-dialog :is(.dialog-description, .field .hint) { color: #637087; }
.console-dialog .field label { color: #4a5871; }
.console-dialog::backdrop,
.dialog.financial-dialog.console-dialog::backdrop,
.console-mobile-menu::backdrop,
.console-search-dialog::backdrop {
  background: #23304d66;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.console-frame .console-profile-menu { background: #fff; }
.console-frame .console-profile-menu small { color: #637087; }
.console-mobile-account > div > span,
.console-mobile-menu-group h3 { color: #637087; }
.console-frame .work-tabs .btn.active { color: #fff; background: #6544cf; border-color: #6544cf; }

@media (hover: hover) and (pointer: fine) {
  .console-frame .app-layout .nav-item:not(.active):hover { background: #eeedf7; color: #513b88; }
  .console-frame .btn:not(:disabled):not(.primary):not(.danger):not(.active):not(.selected):not(.ghost):not([aria-pressed="true"]):hover,
  .console-dialog .btn:not(:disabled):not(.primary):not(.danger):not(.active):not(.selected):not(.ghost):not([aria-pressed="true"]):hover { background: #f5f2fc; border-color: #bba8e5; }
  .console-frame .btn.primary:not(:disabled):hover,
  .console-dialog .btn.primary:not(:disabled):hover,
  .console-frame :is(.ticket-center-tab.selected, .finance-workspace-tab.selected):hover { background: #5536b5; border-color: #5536b5; }
}
@media (pointer: coarse) {
  .console-frame .btn.primary:not(:disabled):hover,
  .console-dialog .btn.primary:not(:disabled):hover { background: #6544cf; border-color: #6544cf; }
  .console-frame .btn, .console-frame .btn.small,
  .console-dialog .btn, .console-dialog .btn.small,
  .console-frame .app-layout .nav-item,
  .console-frame :is(.ticket-center-category, .finance-workspace-tab),
  .console-frame :is(.input, .select), .console-dialog :is(.input, .select) { min-height: 44px; }
  .console-frame .input, .console-dialog .input { font-size: 16px; }
}
@media (max-width: 760px) {
  .console-frame .console-mobile-nav { background: #fff; border-top-color: #dfe3ee; }
  .console-frame .console-mobile-tab.active { color: #5938bb; background: #f0ebfc; }
  .console-frame .page-heading .heading-actions { gap: 8px; }
  .console-frame .table-card { background: #fff; }
  .console-frame .workspace-stat strong { font-variant-numeric: tabular-nums; }
}
@media (prefers-reduced-motion: reduce) {
  .console-frame *, .console-frame *::before, .console-frame *::after,
  .console-dialog *, .console-dialog *::before, .console-dialog *::after,
  .console-mobile-menu *, .console-search-dialog * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* One visible decision point when leaving unfinished work, on desktop and phone. */
dialog.draft-leave-dialog {
  box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-width: 520px;
  max-height: calc(100dvh - 32px); margin: auto; padding: 26px;
  overflow-y: auto; border: 1px solid #dfdcf2; border-radius: 22px;
  background: #fff; color: #283147; box-shadow: 0 24px 80px #29204c33;
}
dialog.draft-leave-dialog::backdrop { background: #1f23405c; backdrop-filter: blur(3px); }
.draft-leave-heading { display: flex; align-items: center; gap: 12px; }
.draft-leave-heading h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.5; }
.draft-leave-heading .icon-button { flex: 0 0 36px; height: 36px; }
.draft-leave-symbol { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; color: #a76a19; background: #fff3df; }
.draft-leave-symbol svg { width: 21px; height: 21px; }
.draft-leave-route { display: grid; grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); align-items: center; gap: 16px; margin: 22px 0 16px; padding: 16px; border: 1px solid #e8e5f6; border-radius: 14px; background: #f7f6fe; }
.draft-leave-route small { display: block; margin-bottom: 6px; font-size: 12px; color: #6f7589; }
.draft-leave-route strong { display: block; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.draft-leave-route svg { width: 20px; height: 20px; color: #8e80c5; }
.draft-leave-dialog #draft-leave-description { margin: 0; font-size: 13px; line-height: 1.8; color: #626d81; }
.draft-leave-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.draft-leave-actions .btn { min-height: 42px; padding: 10px 18px; border-radius: 11px; }
.draft-leave-actions .draft-discard { color: #a23b40; background: #fff; border-color: #eccfd3; }
.draft-leave-actions .btn:focus-visible { outline: 3px solid #a599eb; outline-offset: 3px; }
@media(max-width:540px) {
  dialog.draft-leave-dialog { padding: 20px; border-radius: 18px; }
  .draft-leave-heading h2 { font-size: 17px; }
  .draft-leave-route { gap: 10px; padding: 13px; }
  .draft-leave-actions { display: grid; grid-template-columns: 1fr; }
  .draft-leave-actions .btn { width: 100%; min-height: 46px; }
}
