:root {
  --yc-600: #7f56d9;
  --yc-700: #6941c6;

  --ink: #101426;
  --muted: #667085;
  --line: #eceff6;

  --ok: #22c55e;
  --wait: #f59e0b;
  --bad: #ef4444;
  --unk: #c7cada;

  --bg: #f6f7ff;
  --card: #ffffff;

  --shadow: 0 18px 44px rgba(17, 8, 41, .08);
  --shadow-sm: 0 10px 22px rgba(17, 8, 41, .06);

  --radius: 14px;
  --radius-sm: 10px;

  --ring: 0 0 0 4px rgba(127, 86, 217, .14);

  --ui-shadow: 0 16px 40px rgba(17, 8, 41, .06);
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
small,
strong,
em,
span,
a,
label,
input,
textarea,
button,
select,
option {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Arial, sans-serif !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 14% 0%, rgba(127, 86, 217, .10), transparent 58%),
    radial-gradient(900px 380px at 86% 0%, rgba(105, 65, 198, .10), transparent 58%),
    var(--bg);
  overflow-x: hidden;
}

.container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px;
  overflow: visible;
}

.btn,
.ctrl {
  height: 38px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 18px;
  border: 1px solid rgba(127, 86, 217, .18);
  border-radius: 12px;
  background: #fff;
  color: #3a356b;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.ctrl {
  width: 100%;
  font-weight: 600;
  color: #202541;
  background: rgba(255, 255, 255, .92);
}

.ctrl:focus {
  outline: none;
  border-color: rgba(127, 86, 217, .50);
  box-shadow: var(--ring);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 86, 217, .30);
  background: #fbfbff;
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(180deg, var(--yc-600), var(--yc-700));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(105, 65, 198, .18);
}

.btn.primary:hover {
  box-shadow: 0 14px 30px rgba(105, 65, 198, .22);
  filter: saturate(1.02);
}

.btn-ctrl {
  height: 38px;
}

.app-shell--topnav {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(236, 239, 246, .9);
}

.topnav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.topnav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav__menu {
  justify-self: center;
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(236, 239, 246, .95);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.topnav__item {
  height: 38px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #4b4f66;
  font-weight: 800;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
  position: relative;
  border-radius: 0;
}

.topnav__item:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.topnav__item:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.topnav__item.is-active:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.topnav__item.is-active:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.topnav__item+.topnav__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(236, 239, 246, .95);
}

.topnav__item.is-active+.topnav__item::before {
  opacity: 0;
}

.topnav__item+.topnav__item.is-active::before {
  opacity: 0;
}

.topnav__item:hover {
  background: rgba(127, 86, 217, .08);
  color: #2b2f46;
}

.topnav__item.is-active {
  background: rgba(127, 86, 217, .14);
  color: #2c2f48;
  box-shadow: inset 0 0 0 1px rgba(127, 86, 217, .25);
}

.topnav__ico {
  width: 18px;
  display: inline-flex;
  justify-content: center;
  opacity: .9;
  color: #6f61a8;
}

.topnav__item.is-active .topnav__ico {
  color: #3a2f8c;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand__text {
  min-width: 0;
}

.brand__title {
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 14px;
  line-height: 1.1;
  color: #0f1428;
}

.brand__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.app-content {
  flex: 1;
  min-width: 0;
}

.views {
  flex: 1;
  min-width: 0;
  padding-bottom: 40px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.page {
  padding: 14px 0 60px;
}

.page-head {
  padding: 10px 4px 14px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: #0f1428;
}

.page-head .subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.page-head--with-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-head__right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.card-unified {
  padding: 14px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 8px;
}

h2 {
  margin: 0;
  font-size: 15px;
  color: #0f132a;
  font-weight: 800;
}

.muted {
  color: #7a7f95;
  font-size: 12px;
}

.filters {
  margin: 10px 0 14px;
}

.filters__bar {
  position: relative;
  z-index: 120;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(236, 239, 246, .95);
  box-shadow: var(--ui-shadow);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filters__search {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.filters__search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
  pointer-events: none;
}

.filters__search-input {
  width: 100%;
  padding-left: 40px !important;
}

.filters__select {
  width: 190px;
  max-width: 240px;
}

.filters__more {
  position: relative;
  z-index: 121;
}

.filters__more>summary {
  list-style: none;
}

.filters__more>summary::-webkit-details-marker {
  display: none;
}

.filters__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filters__more-ico {
  display: inline-flex;
  opacity: .8;
}

.filters__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 360px;
  max-width: min(92vw, 420px);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
  z-index: 10000;
}

.filters__panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ui-label {
  font-size: 12px;
  font-weight: 600;
  opacity: .75;
  margin-bottom: 6px;
}

.filters__panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.table-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(236, 239, 246, .95);
  background: rgba(255, 255, 255, .92);
}

.table-wrap--plain {
  border-radius: 16px;
  box-shadow: var(--shadow);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(246, 247, 255, .9);
  backdrop-filter: blur(10px);
  color: #6e7390;
  font-weight: 800;
  font-size: 12px;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(236, 239, 246, .95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(240, 241, 246, .95);
  vertical-align: middle;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table tbody tr:hover {
  background: rgba(127, 86, 217, .04);
}

.table thead th.op-th {
  text-align: center;
}

.table td.op-cell {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(236, 239, 246, .95);
  background: #fff;
}

.table td.col-agent,
.table td.col-brand {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.table td.col-id {
  white-space: normal;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.th-has-filter .th-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}

.th-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-filter-btn {
  border: 1px solid rgba(236, 239, 246, .95);
  background: #fff;
  color: #6f61a8;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease, border-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}

.th-has-filter:hover .th-filter-btn {
  opacity: .98;
}

.th-filter-btn:hover {
  border-color: rgba(127, 86, 217, .35);
  box-shadow: var(--ring);
}

.dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--unk);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .06);
}

.dot.ok {
  background: var(--ok);
}

.dot.wait {
  background: var(--wait);
}

.dot.bad {
  background: var(--bad);
}

.dot.unk {
  background: var(--unk);
}

.tooltip {
  position: fixed;
  display: none;
  z-index: 9999;
  background: #fff;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  color: #1d2030;
  min-width: 200px;
  max-width: 280px;
  font-size: 12.5px;
}

.tooltip .title {
  font-weight: 900;
  margin-bottom: 6px;
}

.tooltip .legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.popover {
  position: fixed;
  z-index: 10000;
  background: #fff;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 340px;
  overflow: hidden;
}

.popover__body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.popover__footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(236, 239, 246, .95);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(246, 247, 255, .55);
}

.loader {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #d7d9e6;
  border-top-color: var(--yc-600);
  animation: spin .8s linear infinite;
  margin: 14px auto;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(17, 20, 40, .45);
  backdrop-filter: blur(2px);
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal__box {
  width: min(860px, 94vw);
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(17, 8, 41, .22);
  overflow: hidden;
}

.modal__head,
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(236, 239, 246, .95);
  background: rgba(255, 255, 255, .96);
}

.modal__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.modal__body {
  padding: 14px;
  background: rgba(255, 255, 255, .96);
}

.modal__foot {
  border-top: 1px solid rgba(236, 239, 246, .95);
  border-bottom: 0;
  gap: 10px;
  background: rgba(246, 247, 255, .55);
}

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #3a3f57;
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 8px;
  line-height: 1;
  font-size: 16px;
}

.icon-btn:hover {
  background: rgba(127, 86, 217, .06);
  border-color: rgba(127, 86, 217, .18);
  box-shadow: var(--ring);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal .seg {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.ta {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid rgba(127, 86, 217, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  font-size: 13px;
  line-height: 1.4;
  outline: none;
}

.ta:focus {
  border-color: rgba(127, 86, 217, .50);
  box-shadow: var(--ring);
}

.ta-xl {
  min-height: 150px;
}

.ta-lg {
  min-height: 200px;
}

hr.sep {
  border: 0;
  border-top: 1px solid rgba(236, 239, 246, .95);
  margin: 12px 0;
}

.summary {
  border: 1px dashed rgba(127, 86, 217, .25);
  border-radius: 14px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  background: rgba(255, 255, 255, .92);
  font-size: 12.5px;
  margin-top: 6px;
}

.file-uploader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  height: 36px;
  font-size: 12px;
  border: 1px dashed rgba(127, 86, 217, .35);
  border-radius: 14px;
  background: rgba(127, 86, 217, .06);
  color: #3a356b;
  cursor: pointer;
  font-weight: 800;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}

.file-uploader:hover {
  background: rgba(127, 86, 217, .10);
  border-color: rgba(127, 86, 217, .50);
  transform: translateY(-1px);
}

#sm-files,
#sup-files {
  display: none;
}

.email-preview {
  margin-top: 10px;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .92);
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
}

.email-preview .meta {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.email-preview .meta .label {
  font-weight: 900;
}

.att {
  margin-top: 8px;
  margin-bottom: 6px;
}

.att-chips {
  margin: 8px 0 10px;
}

.att-chips .file-chip-wrap,
#mail-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 34px 6px 10px;
  border: 1px solid rgba(127, 86, 217, .18);
  border-radius: 999px;
  background: rgba(127, 86, 217, .06);
  color: #2f2b55;
  font-size: 12px;
  line-height: 1.2;
  max-width: 100%;
}

.file-chip .file-name {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip .file-size {
  font-size: 11px;
  color: #7b7ea3;
}

.file-chip .file-remove {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(127, 86, 217, .20);
  background: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(17, 8, 41, .10);
}

.file-chip:hover .file-remove {
  display: flex;
}

.seg-radio {
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.seg-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-radio .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(127, 86, 217, .18);
  border-radius: 999px;
  background: #fff;
  color: #3a356b;
  font-weight: 800;
  cursor: pointer;
}

.seg-radio input[type="radio"]:checked+.chip {
  background: linear-gradient(180deg, var(--yc-600), var(--yc-700));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(105, 65, 198, .18);
}

.gm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gm-card {
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, .92);
}

.gm-title {
  font-size: 13px;
  font-weight: 900;
  color: #2f3450;
  margin-bottom: 10px;
}

.gm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gm-list .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(127, 86, 217, .06);
  border: 1px solid rgba(127, 86, 217, .18);
  color: #3a356b;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.mail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
  align-items: start;
}

.mail-card,
.mail-preview {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mail-card {
  padding: 14px;
}

.mail-preview {
  padding: 14px;
}

.preview-empty {
  padding: 14px;
}

.mail-preview__title {
  font-size: 13px;
  font-weight: 800;
  color: #2f3450;
  margin-bottom: 10px;
}

.mail-preview__body {
  background: rgba(246, 247, 255, .55);
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  padding: 12px;
  max-height: 520px;
  overflow-y: auto;
}

#mail-preview .preview-meta {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
}

#mail-preview .preview-meta .row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  font-size: 12.5px;
}

#mail-preview .preview-meta .k {
  font-weight: 700;
  color: #6e7390;
}

#mail-preview .preview-meta .v {
  font-weight: 600;
  color: #1d2030;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#mail-preview .preview-body {
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-top: 10px;
}

.lbl {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #2f3450;
  margin-bottom: 8px;
}

.lbl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.lbl-row--right {
  align-items: center;
}

.dropzone {
  position: relative;
  border: 1px dashed rgba(127, 86, 217, .35);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 247, 255, .55));
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.dropzone:hover {
  border-color: rgba(127, 86, 217, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 247, 255, .75));
}

.dropzone.dragover {
  border-color: rgba(127, 86, 217, .75);
  background: rgba(127, 86, 217, .08);
  transform: translateY(-1px);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dz-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dz-ico {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(127, 86, 217, .10);
  border: 1px solid rgba(127, 86, 217, .18);
  font-size: 18px;
}

.dz-title {
  font-weight: 900;
  color: #1b2140;
  font-size: 13px;
}

.dz-sub {
  color: #6e7390;
  font-size: 12px;
  margin-top: 2px;
}

.dz-btn {
  white-space: nowrap;
}

.dz-btn--hide-desktop {
  display: none;
}

.csv-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-mini {
  height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 14px;
}

.recipients-panel {
  margin-top: 10px;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
}

.recipients-panel summary {
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  color: #3a3f57;
}

.recipients-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.rec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 14px;
  background: rgba(246, 247, 255, .55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.mail-actions {
  position: sticky;
  bottom: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mail-actions .status {
  font-size: 12px;
  color: #6e7390;
  min-height: 18px;
}

.mail-actions .actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uploader-right {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

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

col.colw-ctrl {
  width: 120px !important;
}

col.colw-op {
  width: 54px !important;
}

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

@media (max-width: 980px) {
  .topnav__inner {
    grid-template-columns: 1fr;
  }

  .topnav__actions {
    justify-self: start;
  }

  .topnav__menu {
    justify-self: start;
    width: 100%;
    justify-content: space-between;
  }

  .page-head--with-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head__right {
    justify-content: flex-start;
  }

  .filters__select {
    width: 100%;
    max-width: none;
  }

  .filters__panel {
    right: auto;
    left: 0;
  }
}

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

  .gm-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dz-btn--hide-desktop {
    display: inline-flex;
  }

  .topnav__item {
    flex: 1;
    justify-content: center;
  }

  .topnav__menu {
    width: 100%;
  }
}

.filters-drawer {
  position: relative;
}

.filters-drawer>summary {
  list-style: none;
}

.filters-drawer>summary::-webkit-details-marker {
  display: none;
}

.filters-drawer__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  width: 520px;
  max-width: min(96vw, 620px);

  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(236, 239, 246, .95);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(17, 8, 41, .10);
  padding: 16px;

  z-index: 95;
  transform-origin: top right;
  animation: fdIn .12s ease-out;
}

@keyframes fdIn {
  from {
    transform: translateY(-6px) scale(.98);
    opacity: .2;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.filters-drawer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.filters-drawer__item .ui-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #2f3450;
  opacity: .85;
  margin-bottom: 6px;
}

.filters-drawer__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(236, 239, 246, .95);
}

.filters-drawer__hint {
  margin-top: 10px;
  font-size: 12px;
}

/* responsivo */
@media (max-width: 980px) {
  .filters-drawer__panel {
    right: auto;
    left: 0;
    transform-origin: top left;
    width: min(96vw, 620px);
  }
}

@media (max-width: 620px) {
  .filters-drawer__grid {
    grid-template-columns: 1fr;
  }
}

.btn-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  line-height: 1;
  font-size: 13px;
}

.filters-drawer>summary {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.ico-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.btn-filters span,
.btn-filters {
  line-height: 1;
}

/* =========================================================
   RESPONSIVO (DASHBOARD / TOPNAV / TABELA / MODAIS / EMAIL)
   Cole NO FINAL do styles.css
   ========================================================= */

/* evita qualquer overflow lateral acidental */
html,
body {
  overflow-x: hidden;
}

/* Container com padding melhor no mobile */
@media (max-width: 720px) {
  .container {
    padding: 12px;
  }

  .page {
    padding: 10px 0 40px;
  }

  .page-head h1 {
    font-size: 18px;
  }
}

/* TOPNAV: empilha e deixa menu utilizável */
@media (max-width: 980px) {
  .topnav__inner {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .topnav__menu {
    overflow-x: auto;
    /* permite rolar se apertar muito */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topnav__menu::-webkit-scrollbar {
    display: none;
  }

  .topnav__item {
    min-width: 150px;
    /* evita ficar micro */
    flex: 0 0 auto;
  }

  .topnav__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* AÇÕES do header da página: vira “stack” com botões full */
@media (max-width: 720px) {
  .page-head--with-actions {
    gap: 10px;
  }

  .page-head__right {
    width: 100%;
  }

  .page-head__right .btn {
    width: 100%;
    justify-content: center;
  }

  .filters-drawer {
    width: 100%;
  }

  .filters-drawer>summary {
    width: 100%;
    justify-content: center;
  }
}

/* TABELA: mantém layout desktop, mas com scroll horizontal no mobile */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  min-width: 1080px;
  /* força scroll em telas pequenas */
}

/* Ajustes de colunas que explodem */
@media (max-width: 720px) {
  col.colw-ctrl {
    width: 140px !important;
  }

  col.colw-op {
    width: 60px !important;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
}

/* MODAIS: sempre cabem e viram “1 coluna” no mobile */
@media (max-width: 720px) {
  .modal__box {
    width: min(96vw, 96vw);
    max-height: 92vh;
    overflow: hidden;
  }

  .modal__body {
    max-height: calc(92vh - 120px);
    overflow: auto;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .gm-row {
    grid-template-columns: 1fr;
  }

  .modal__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .modal__foot .btn {
    width: 100%;
    justify-content: center;
  }
}

/* EMAIL: já quebra em 1100px, mas refinamos no mobile */
@media (max-width: 720px) {
  .mail-actions {
    position: static;
    /* sticky pode ficar ruim no mobile */
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mail-actions .actions-right {
    width: 100%;
    justify-content: stretch;
  }

  .mail-actions .actions-right .btn {
    width: 100%;
  }

  .dz-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .dz-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }
}

/* Chips não estourarem */
.file-chip .file-name {
  max-width: min(280px, 60vw);
}

/* =========================
   MOBILE RESET — TOPNAV
   ========================= */
@media (max-width: 720px) {
  .topnav {
    position: sticky;
    top: 0;
  }

  .topnav__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .topnav__slot--left {
    justify-content: center;
  }

  .brand {
    justify-content: center;
  }

  .topnav__menu {
    width: 100%;
    display: flex;
    border-radius: 14px;
    overflow-x: auto;
  }

  .topnav__item {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    font-size: 12px;
  }

  .topnav__actions {
    width: 100%;
  }

  .topnav__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================
   MOBILE — PAGE HEADER
   ========================= */
@media (max-width: 720px) {
  .page-head {
    padding: 6px 0 10px;
  }

  .page-head h1 {
    font-size: 18px;
  }

  .page-head--with-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-head__right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .page-head__right .btn,
  .page-head__right summary {
    width: 100%;
    justify-content: center;
  }
}

/* =========================
   MOBILE — FILTROS FULLSCREEN
   ========================= */
@media (max-width: 720px) {
  .filters-drawer__panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    padding: 18px;
    overflow-y: auto;
    z-index: 9999;
    animation: none;
  }

  .filters-drawer__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filters-drawer__actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0;
  }
}

/* =========================
   MOBILE — EMAIL
   ========================= */
@media (max-width: 720px) {
  .mail-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mail-preview {
    order: 2;
  }

  .mail-actions {
    position: static;
    flex-direction: column;
    gap: 10px;
  }

  .mail-actions .actions-right {
    width: 100%;
    flex-direction: column;
  }

  .mail-actions .btn {
    width: 100%;
  }
}

/* =========================
   MOBILE — PADDING GLOBAL
   ========================= */
@media (max-width: 720px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page {
    padding-left: 0;
    padding-right: 0;
  }
}

/* =========================
   TOPNAV MOBILE — LOGO ESQ + SAIR DIR (MESMA LINHA)
   ========================= */
@media (max-width: 720px) {
  .topnav__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "menu  menu";
    align-items: center;
    gap: 10px;
  }

  .topnav__slot--left {
    grid-area: brand;
  }

  .topnav__actions {
    grid-area: actions;
    justify-self: end;
    width: auto;
  }

  .topnav__menu {
    grid-area: menu;
  }

  .brand {
    justify-content: flex-start;
  }

  .topnav__menu {
    width: 100%;
  }

  /* botão sair pequeno e no canto direito */
  #btnLogout {
    width: auto !important;
    height: 34px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 12px;
  }

  /* mata a regra antiga que deixava botões 100% no mobile */
  .topnav__actions .btn {
    width: auto !important;
  }
}

/* =========================
   FILTROS — HEADER COM BOTÃO FECHAR
   ========================= */
.filters-drawer__top {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.filters-drawer__title {
  font-weight: 900;
  color: #0f1428;
  font-size: 14px;
}

.filters-drawer__close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(127, 86, 217, .18);
  background: #fff;
  color: #3a356b;
  font-weight: 900;
  cursor: pointer;
}

.filters-drawer__close:hover {
  border-color: rgba(127, 86, 217, .35);
  box-shadow: var(--ring);
}

/* no mobile, mostra header e evita “colar” no topo */
@media (max-width: 720px) {
  .filters-drawer__top {
    display: flex;
    position: sticky;
    top: 0;
    background: #fff;
    padding-bottom: 10px;
    z-index: 2;
  }
}