body.dark-mode {
  background-color: rgb(37, 37, 37);
  color: rgb(211, 211, 211);
}

app-login { display: block; min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 48%); min-height: 100vh; background: #252525; color: #e6e6e6; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 100vh; padding: 46px clamp(36px, 6vw, 100px) 42px; color: #f2f2f2; background: radial-gradient(circle at 18% 64%, #263a34 0, transparent 42%), linear-gradient(145deg, #1b2421, #171d1b 70%); }
.login-story::after { content: ''; position: absolute; width: 640px; height: 640px; right: -380px; bottom: -380px; border: 1px solid rgba(213, 246, 225, .14); border-radius: 50%; box-shadow: 0 0 0 70px rgba(213, 246, 225, .035), 0 0 0 145px rgba(213, 246, 225, .025); }
.login-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 700; letter-spacing: -.035em; }
.login-brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: #d8eee0; background: #315a46; font-size: 25px; line-height: 1; }
.login-story-center { position: relative; z-index: 1; max-width: 560px; margin: auto 0; padding: 35px 0 75px; }
.login-illustration { position: relative; width: min(100%, 430px); height: 300px; margin: 0 auto 14px; perspective: 800px; }
.login-illustration-glow { position: absolute; inset: 34px 0 0; border-radius: 50%; background: radial-gradient(circle, rgba(181, 238, 205, .2), transparent 66%); }
.login-mail-card { position: absolute; width: 290px; height: 188px; border-radius: 18px; }
.login-mail-card-back { left: 90px; top: 57px; transform: rotate(13deg); border: 1px solid rgba(211, 255, 226, .25); background: #335b4c; box-shadow: 0 24px 45px rgba(0, 0, 0, .24); }
.login-mail-card-front { left: 56px; top: 84px; display: flex; align-items: center; gap: 20px; padding: 34px; transform: rotate(-8deg); background: #343d39; box-shadow: 0 30px 60px rgba(0, 0, 0, .32); }
.login-mail-icon { display: grid; place-items: center; flex: 0 0 56px; height: 56px; border-radius: 15px; color: #c4e1d0; background: #446c56; font-size: 29px; }
.login-mail-lines { display: grid; gap: 13px; flex: 1; }
.login-mail-lines span { height: 9px; border-radius: 20px; background: #627d6c; }
.login-mail-lines span:nth-child(2) { width: 80%; }
.login-mail-lines span:nth-child(3) { width: 60%; }
.login-story-kicker { margin: 0 0 18px; color: #b0ddc4; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.login-story h2 { max-width: 550px; margin: 0; font-size: clamp(39px, 4vw, 62px); line-height: 1.08; letter-spacing: -.055em; font-weight: 600; }
.login-story-copy { max-width: 450px; margin: 23px 0 0; color: #c2dbd2; font-size: 17px; line-height: 1.65; }
.login-story-footer { position: relative; z-index: 1; color: #a9cfc0; font-size: 12px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 36px; border-left: 1px solid #333; background: #252525; }
.login-form-content { width: min(100%, 400px); }
.login-eyebrow { margin-bottom: 18px; color: #83bc99; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.login-title { margin: 0; color: #f1f1f1; font-size: clamp(38px, 4vw, 52px); font-weight: 650; line-height: 1.12; letter-spacing: -.055em; }
.login-subtitle { margin: 16px 0 42px; color: #b5bdb8; font-size: 16px; line-height: 1.55; }
.login-form { display: grid; gap: 23px; }
.login-field { position: relative; display: grid; gap: 9px; }
.login-label { color: #e2e2e2; font-size: 13px; font-weight: 700; }
.login-shell .app-login-input, body.dark-mode .login-shell .app-login-input { height: 54px; padding: 0 16px; border: 1px solid #444 !important; border-radius: 10px; outline: 0; color: #e4e4e4 !important; background: #2a2a2a !important; box-shadow: none !important; font-size: 15px; }
.login-shell .app-login-input:focus, body.dark-mode .login-shell .app-login-input:focus { border-color: #80ae91 !important; box-shadow: 0 0 0 3px rgba(128, 174, 145, .18) !important; }
.login-shell .app-login-input::placeholder { color: #929c95; }
.login-password-toggle { position: absolute; right: 13px; bottom: 14px; border: 0; color: #a2d1b3; background: transparent; font-size: 13px; font-weight: 700; }
.login-password-toggle:focus-visible, .login-submit:focus-visible { outline: 3px solid #6bbb93; outline-offset: 3px; }
.login-submit { height: 54px; margin-top: 7px; border: 0; border-radius: 10px; color: #fff; background: #356e51; font-size: 15px; font-weight: 700; box-shadow: 0 10px 20px rgba(0, 0, 0, .16); transition: background .15s, transform .15s; }
.login-submit:hover { background: #438560; }
.login-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.login-error { min-height: 25px; margin-top: 15px; color: #b23e3e; font-size: 13px; }
.login-panel-footer { margin: 60px 0 0; color: #8e9690; font-size: 12px; text-align: center; }
.login-mobile-brand { display: none; }
@media (min-width: 801px) and (max-height: 820px) { .login-story { padding-top: 24px; padding-bottom: 24px; } .login-story-center { padding-top: 8px; padding-bottom: 18px; } .login-illustration { height: 215px; margin-bottom: 0; transform: scale(.78); transform-origin: center center; } .login-story h2 { font-size: clamp(34px, 3.4vw, 47px); } .login-story-copy { margin-top: 14px; font-size: 15px; line-height: 1.45; } .login-panel { padding-top: 24px; padding-bottom: 24px; } .login-subtitle { margin-bottom: 28px; } .login-form { gap: 16px; } .login-panel-footer { margin-top: 30px; } }
@media (max-width: 800px) { .login-shell { display: block; } .login-story { display: none; } .login-panel { min-height: 100vh; padding: 32px 24px; border-left: 0; } .login-mobile-brand { display: block; width: min(100%, 400px); margin: 0 0 60px; color: #a8d4b7; font-size: 20px; font-weight: 700; letter-spacing: -.04em; } .login-panel-footer { margin-top: 50px; } }
@media (max-width: 480px) { .login-panel { justify-content: flex-start; padding: 27px 24px; } .login-mobile-brand { margin-bottom: 85px; } .login-title { font-size: 42px; } .login-subtitle { margin-bottom: 37px; } }

body.dark-mode .bg-body-tertiary {
  background-color: rgb(37, 37, 37) !important;
}

body.dark-mode .border-bottom,
body.dark-mode .card,
body.dark-mode .table,
body.dark-mode .modal-content {
  border-color: #333 !important;
}

body.dark-mode .card,
body.dark-mode .card-header,
body.dark-mode .card-body,
body.dark-mode .modal-content {
  background-color: rgb(37, 37, 37);
  color: rgb(211, 211, 211);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
  border-color: #333;
}

body.dark-mode .modal-title,
body.dark-mode .modal-body {
  color: rgb(211, 211, 211);
}

body.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
  opacity: 0.8;
}

body.dark-mode .btn-close:hover {
  opacity: 1;
}

body.dark-mode .modal-backdrop.show {
  opacity: 0.7;
}

body.dark-mode .table {
  background-color: #1a1a1a;
  color: rgb(211, 211, 211);
}

body.dark-mode .table thead th,
body.dark-mode .table tbody td {
  color: rgb(211, 211, 211);
  border-color: #333;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #2a2a2a;
  color: rgb(211, 211, 211);
  border-color: #444;
}

body.dark-mode .form-check-input {
  background-color: #3a3a3a;
  border-color: #575757;
}

body.dark-mode .form-check-input:focus {
  border-color: #6a6a6a;
  box-shadow: 0 0 0 0.2rem rgba(211, 211, 211, 0.15);
}

body.dark-mode .form-control::placeholder {
  color: #bbb;
}

body.dark-mode .app-login-input {
  background-color: #2a2a2a !important;
  color: rgb(211, 211, 211) !important;
  border-color: #444 !important;
}

body.dark-mode .app-login-input:focus {
  background-color: #2a2a2a !important;
  color: rgb(211, 211, 211) !important;
  border-color: #6a6a6a !important;
  box-shadow: 0 0 0 0.2rem rgba(211, 211, 211, 0.15);
}

body.dark-mode .app-login-input:-webkit-autofill,
body.dark-mode .app-login-input:-webkit-autofill:hover,
body.dark-mode .app-login-input:-webkit-autofill:focus,
body.dark-mode .app-login-input:-webkit-autofill:active {
  -webkit-text-fill-color: rgb(211, 211, 211) !important;
  box-shadow: 0 0 0 1000px #2a2a2a inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

body.dark-mode .link-body-emphasis {
  color: #e0e0e0 !important;
}

.top-nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.app-nav-subitem {
  padding-left: 1.25rem !important;
  font-size: 0.95rem;
}
.app-nav-inbox-submenu { width: 100%; margin: 2px 0 6px; padding-left: 1.25rem; }

.app-nav-count {
  margin-left: auto;
  font-size: 0.7rem;
  min-width: 1.6rem;
  text-align: center;
  color: #1f2937 !important;
  background-color: #e9ecef !important;
  border-color: #cfd4da !important;
}

body.dark-mode .app-nav-count {
  color: #f8f9fa !important;
  background-color: #495057 !important;
  border-color: #6c757d !important;
}

.app-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem !important;
}

.app-header-menu-btn {
  min-width: 40px;
}

.app-mobile-menu .nav-link {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.app-mobile-menu .form-control {
  width: 100%;
}

.app-mobile-search-inline .form-control {
  width: 100%;
}

@media (min-width: 768px) {
  app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 248px;
    height: 100vh;
    z-index: 1030;
    border-right: 1px solid #dee2e6;
    display: block;
  }

  app-header .app-nav-shell {
    height: 100%;
    border-bottom: 0 !important;
  }

  app-header .app-header-shell {
    height: 100%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  app-header .app-header-desktop {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start;
    gap: 0.75rem;
    height: 100%;
  }

  app-header .app-header-desktop .nav.me-auto {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-right: 0 !important;
    width: 100%;
  }

  app-header .app-header-desktop .nav-link {
    border-radius: 0.5rem;
  }

  app-header .app-header-desktop form {
    width: 100%;
    margin: 0 !important;
  }

  app-header .app-header-desktop .nav.d-none.d-md-flex {
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }

  app-header + #app {
    margin-left: 248px;
  }
}

@media (max-width: 767.98px) {
  app-header {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
  }

  app-header .app-header-shell {
    padding: 0.5rem 0.75rem;
  }

  app-header + #app {
    margin-left: 0;
  }
}

.gmail-list {
  border-radius: 12px;
  overflow: visible;
  background: #fff;
}

.gmail-toolbar {
  background: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 50;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.gmail-list-body {
  width: 100%;
}

.gmail-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
}

.gmail-row:hover {
  box-shadow: inset 0 -1px 0 #e8eaed;
  background: #f8f9fa;
}

.gmail-row.selected {
  background: #e8f0fe;
}

.gmail-row.unread {
  font-weight: 600;
  background: #fff;
}

.gmail-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 280px;
  min-width: 220px;
}

.gmail-row-center {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-row-right {
  width: 82px;
  text-align: right;
}

.gmail-checkbox {
  margin-top: 0;
}

.gmail-star {
  color: #6c757d;
  text-decoration: none;
}

.gmail-todo {
  color: #198754;
  text-decoration: none;
}

.gmail-todo.gmail-todo-active,
.gmail-todo-mark {
  color: #198754;
}

.gmail-row.unread .gmail-star,
.gmail-star .bi-star-fill {
  color: #f4b400;
}

.gmail-from {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-subject {
  color: #202124;
}

.gmail-highlight {
  background: #fff3cd;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.gmail-dash,
.gmail-snippet {
  font-weight: 400;
}

.gmail-attachment {
  margin-left: 8px;
  color: #6c757d;
}

.gmail-thread-count {
  font-size: 0.68rem;
  vertical-align: middle;
}

.gmail-date {
  color: #5f6368;
  font-size: 0.8rem;
}

.gmail-detail {
  border-radius: 12px;
  overflow: visible;
  background: #fff;
}

.gmail-detail .gmail-toolbar {
  position: sticky;
  top: 0;
  z-index: 60;
}

.gmail-detail-subject {
  font-size: 1.45rem;
  font-weight: 500;
  color: #202124;
}

.gmail-detail-meta {
  border-bottom: 1px solid #f1f3f4;
  padding-bottom: 0.85rem;
}

.gmail-detail-content {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1f1f1f;
  background: transparent;
}

.summary {
  white-space: pre-line;
}

body.dark-mode .summary {
  border-color: #333 !important;
}

.gmail-detail-attachments {
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfc;
}

.gmail-attachment-preview img {
  max-width: 100%;
  height: auto;
}

.gmail-reply {
  border: 1px solid #e8eaed;
  /* border-radius: 10px; */
  padding: 12px;
  background: #fff;
}

.gmail-reply-toolbar .btn {
  line-height: 1;
}

.gmail-reply-editor {
  min-height: 160px;
  max-height: 440px;
  overflow-y: auto;
  white-space: normal;
}

.gmail-reply-editor:focus {
  outline: none;
}

.gmail-reply-editor:empty::before {
  content: attr(data-placeholder);
  color: #6c757d;
  pointer-events: none;
}

.gmail-conversation-history {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 10px;
  background: #fafbfc;
}

.gmail-history-item + .gmail-history-item {
  margin-top: 10px;
}

.gmail-history-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.gmail-history-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1f1f1f;
}

.gmail-rich-content {
  overflow-wrap: anywhere;
}

.gmail-rich-content img {
  max-width: 100%;
  height: auto;
}

.gmail-rich-content table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.gmail-rich-content blockquote {
  border-left: 3px solid #d0d7de;
  padding-left: 10px;
  margin-left: 0;
  color: #495057;
}

.gmail-rich-content a {
  color: #0d6efd;
}

body.dark-mode .gmail-list {
  background: #1e1e1e;
}

body.dark-mode .gmail-toolbar {
  background: #232323;
  border-color: #333 !important;
}

body.dark-mode .gmail-row {
  border-bottom-color: #2e2e2e;
}

body.dark-mode .gmail-row:hover {
  background: #252525;
  box-shadow: inset 0 -1px 0 #333;
}

body.dark-mode .gmail-row.unread {
  background: #2a2a2a;
}

body.dark-mode .gmail-row.selected {
  background: #243447;
}

body.dark-mode .gmail-subject {
  color: rgb(211, 211, 211);
}

body.dark-mode .gmail-highlight {
  background: #664d03;
  color: #fff3cd;
}

body.dark-mode .gmail-detail {
  background: #1e1e1e;
}

body.dark-mode .gmail-detail-subject {
  color: rgb(211, 211, 211);
}

body.dark-mode .gmail-detail-meta {
  border-bottom-color: #2e2e2e;
}

body.dark-mode .gmail-detail-content {
  color: rgb(211, 211, 211);
}

body.dark-mode .gmail-detail-attachments {
  background: #1f1f1f;
  border-color: #333;
}

body.dark-mode .gmail-attachment-preview {
  background: transparent;
}

body.dark-mode .gmail-attachment-preview.bg-light,
body.dark-mode pre.gmail-attachment-preview {
  background: #232323 !important;
  color: rgb(211, 211, 211);
  border-color: #333 !important;
}

body.dark-mode .gmail-reply {
  background: #222;
  border-color: #333;
}

body.dark-mode .gmail-reply-editor:empty::before {
  color: #9aa0a6;
}

body.dark-mode .gmail-conversation-history {
  background: #1f1f1f;
  border-color: #333;
}

body.dark-mode .gmail-history-item {
  background: #222;
  border-color: #333;
}

body.dark-mode .gmail-history-body {
  color: rgb(211, 211, 211);
}

body.dark-mode .gmail-rich-content blockquote {
  border-left-color: #495057;
  color: #c9d1d9;
}

body.dark-mode .gmail-dash,
body.dark-mode .gmail-snippet,
body.dark-mode .gmail-date,
body.dark-mode .gmail-star,
body.dark-mode .gmail-todo,
body.dark-mode .gmail-attachment {
  color: #b7b7b7 !important;
}

body.dark-mode .gmail-row.unread .gmail-star,
body.dark-mode .gmail-star .bi-star-fill {
  color: #f4b400 !important;
}

body.dark-mode .gmail-toolbar .btn-outline-secondary,
body.dark-mode .gmail-detail .btn-outline-secondary,
body.dark-mode .gmail-conversation-history .btn-outline-secondary {
  color: rgb(211, 211, 211);
  border-color: #4f4f4f;
  background-color: transparent;
}

body.dark-mode .gmail-toolbar .btn-outline-secondary:hover,
body.dark-mode .gmail-detail .btn-outline-secondary:hover,
body.dark-mode .gmail-conversation-history .btn-outline-secondary:hover {
  color: rgb(211, 211, 211);
  border-color: #666;
  background-color: #303030;
}

body.dark-mode .gmail-toolbar .btn-outline-secondary:focus,
body.dark-mode .gmail-detail .btn-outline-secondary:focus,
body.dark-mode .gmail-conversation-history .btn-outline-secondary:focus {
  color: rgb(211, 211, 211);
  border-color: #666;
  background-color: #303030;
  box-shadow: 0 0 0 0.2rem rgba(211, 211, 211, 0.15);
}

body.dark-mode .gmail-todo.gmail-todo-active,
body.dark-mode .gmail-todo-mark {
  color: #71dd8a !important;
}

body.dark-mode .app-mobile-menu {
  border-top-color: #333 !important;
}

body.dark-mode app-header {
  border-right-color: #333 !important;
}

body.dark-mode app-header .app-nav-shell {
  border-color: #333 !important;
}

.todo-list .table td:first-child, 
.todo-list .table th:first-child {
  padding-left: 1rem;
}

.todo-list .table tbody td:last-child, 
.todo-list .table thead th:last-child {
  padding-right: 1rem;
}

body.dark-mode .todo-list {
  background: #1e1e1e;
}

body.dark-mode .todo-list .todo-toolbar {
  background: #232323;
  border-color: #333 !important;
}

body.dark-mode .todo-list .table {
  background: #1e1e1e;
  color: rgb(211, 211, 211);
}

body.dark-mode .todo-list .table thead th,
body.dark-mode .todo-list .table tbody td {
  color: rgb(211, 211, 211);
  border-color: #333;
}

body.dark-mode .todo-list .table-hover tbody tr:hover {
  background-color: #252525;
}

body.dark-mode .todo-list .text-muted {
  color: #a8a8a8 !important;
}

body.dark-mode .todo-list a {
  color: #8ab4ff;
}

body.dark-mode .todo-list .btn-link {
  color: rgb(211, 211, 211);
}

body.dark-mode .todo-list .btn-link.text-muted {
  color: #a8a8a8 !important;
}

body.dark-mode .todo-list .btn-outline-light {
  color: rgb(211, 211, 211);
  border-color: #4f4f4f;
  background-color: transparent;
}

body.dark-mode .todo-list .btn-outline-light:hover,
body.dark-mode .todo-list .btn-outline-light:focus {
  color: rgb(211, 211, 211);
  border-color: #666;
  background-color: #303030;
}

body.dark-mode .todo-list .text-bg-success.small {
  color: rgb(211, 211, 211) !important;
  background-color: #2f6f44 !important;
}

.todo-row.done .fw-semibold {
  text-decoration: line-through;
}

@media (max-width: 991.98px) {
  .gmail-row-left {
    width: 190px;
    min-width: 150px;
    gap: 8px;
  }

  .gmail-date {
    font-size: 0.72rem;
  }
}

@media (max-width: 767.98px) {
  .todo-toolbar {
    align-items: flex-start !important;
    gap: 0.4rem;
  }

  .todo-toolbar-count {
    font-size: 0.75rem;
  }

  .todo-list .table-responsive {
    overflow-x: visible;
  }

  .todo-list table,
  .todo-list tbody,
  .todo-list tr,
  .todo-list td {
    display: block;
    width: 100%;
  }

  .todo-list thead {
    display: none;
  }

  .todo-list tbody tr {
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0.75rem;
  }

  .todo-list tbody tr:last-child {
    border-bottom: 0;
  }

  .todo-list tbody td {
    border: 0 !important;
    padding: 0.25rem 0;
  }

  .todo-list tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6c757d;
    margin-bottom: 0.2rem;
  }

  .todo-list tbody td:first-child::before {
    margin-bottom: 0.3rem;
  }

  body.dark-mode .todo-list tbody tr {
    border-bottom-color: #333;
  }

  body.dark-mode .todo-list tbody td::before {
    color: #9aa0a6;
  }

  .todo-inline-edit {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.4rem !important;
  }

  .todo-inline-edit .btn {
    width: 100%;
  }

  .todo-inline-edit .form-control {
    width: 100%;
  }

  .gmail-toolbar .btn {
    padding: 0.15rem 0.45rem;
  }

  .gmail-bulk-checkbox {
    display: none;
  }

  .gmail-toolbar-count {
    display: none;
  }

  .gmail-detail-toolbar-date {
    display: none;
  }

  .gmail-row {
    gap: 8px;
    padding: 0 10px;
  }

  .gmail-row-left {
    width: 140px;
    min-width: 120px;
  }

  .gmail-from {
    max-width: 88px;
  }

  .gmail-row-right {
    width: 55px;
  }

  .gmail-dash,
  .gmail-snippet {
    display: none;
  }
}

/* Mail workspace */
body.dark-mode { margin: 0; background: #1b2025; color: #e8ebf2; }
@media (min-width: 768px) {
  body.dark-mode app-header { top: 0; left: 0; width: 290px; height: 100vh; border: 1px solid #333b43 !important; border-radius: 0; background: #1b2025; overflow: hidden; }
  body.dark-mode app-header .app-nav-shell { background: #1b2025 !important; }
  body.dark-mode app-header .app-header-shell { padding: 4px 20px 24px; }
  body.dark-mode app-header .app-header-desktop { gap: 27px; }
  body.dark-mode app-header .app-user-row { min-height: 61px; margin: 0 0 4px; padding: 0 4px !important; }
  body.dark-mode app-header .app-user-label { color: #f1f3f8; font-weight: 650; font-size: 17px; }
  body.dark-mode app-header .app-user-label i { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: #858ca5; color: #fff; font-size: 25px; }
  body.dark-mode app-header .app-header-desktop form { display: none; }
  body.dark-mode app-header .nav.me-auto { gap: 3px; }
  body.dark-mode app-header .nav-link { min-height: 41px; gap: 19px; padding: 8px 14px !important; color: #e4e8f0 !important; font-size: 15px; }
  body.dark-mode app-header .nav-link:hover, body.dark-mode app-header .nav-link.active { background: #24344c; color: #76afff !important; }
  body.dark-mode app-header .nav-link i { width: 19px; font-size: 18px; text-align: center; }
  body.dark-mode app-header .app-nav-count { margin-left: auto; padding: 3px 10px; border: 0 !important; border-radius: 12px; color: #102c56 !important; background: #70adff !important; font-size: 13px; }
  body.dark-mode app-header .app-nav-inbox-submenu { width: 100%; margin: 2px 0 6px; padding: 0 0 0 18px; }
  body.dark-mode app-header .app-nav-inbox-submenu .app-nav-subitem { min-height: 34px; padding: 6px 10px !important; color: #aeb9c8 !important; }
  body.dark-mode app-header .app-nav-inbox-submenu .app-nav-subitem.active { color: #76afff !important; }
  body.dark-mode app-header + #app { margin-left: 290px; }
}
email-container { display: block; min-width: 0; }
.mail-workspace { height: 100vh; display: flex; flex-direction: column; overflow: hidden; border-top: 1px solid #343b44; border-right: 1px solid #343b44; border-bottom: 1px solid #343b44; border-radius: 0; background: #1b2025; }
.mail-topbar { height: 62px; flex: 0 0 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 23px; border-bottom: 1px solid #363d46; }
.mail-top-title { flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; color: #f0f2f7; font-size: 21px; font-weight: 700; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.mail-top-search { position: relative; width: min(280px, 60%); height: 38px; display: flex; align-items: center; gap: 12px; margin-left: auto; padding: 0 12px; border: 1px solid #363e48; border-radius: 7px; background: #252b31; color: #cbd3e1; }
.mail-top-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #e9edf5; font-size: 16px; }
.mail-top-search input::placeholder { color: #bcc5d2; }
.mail-top-search kbd { white-space: nowrap; padding: 4px 7px; border-radius: 7px; background: #343a43; color: #ccd5e4; font: 13px inherit; }
.mail-search-suggestions { display: none; }
.mail-search-suggestions:not(:empty) { position: absolute; z-index: 30; top: calc(100% + 7px); right: 0; left: 0; display: block; max-height: 360px; overflow-y: auto; padding: 4px; border: 1px solid #465465; border-radius: 7px; background: #252d36; box-shadow: 0 14px 26px #0007; }
.mail-search-suggestion { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; color: #edf1f7; text-align: left; }
.mail-search-suggestion span, .mail-search-suggestion small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-search-suggestion span { font-size: 12px; }
.mail-search-suggestion small { color: #aab6c5; font-size: 11px; }
.mail-search-suggestion:hover, .mail-search-suggestion:focus-visible { outline: 0; background: #31465e; }
.mail-top-actions { display: flex; align-items: center; gap: 10px; }
.mail-refresh-indicator { display: inline-grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 1px solid #46515e; border-radius: 7px; background: #252d36; cursor: pointer; }
.mail-refresh-indicator:hover, .mail-refresh-indicator:focus-visible { border-color: #70adff; background: #30435b; }
.mail-refresh-indicator:focus-visible { outline: 2px solid #a6ccff; outline-offset: 2px; }
.mail-refresh-indicator svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.mail-refresh-track, .mail-refresh-progress { fill: none; stroke-width: 4; }
.mail-refresh-track { stroke: #455261; }
.mail-refresh-progress { stroke: #70adff; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.mail-settings-link, .mail-compose { display: inline-grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border-radius: 7px; font-size: 17px; line-height: 1; text-decoration: none; }
.mail-settings-link { border: 1px solid #46515e; background: #252d36; color: #cbd5e2; }
.mail-settings-link:hover { border-color: #70adff; background: #30435b; color: #fff; }
.mail-compose { border: 1px solid #4388f4; background: #4388f4; color: #fff; cursor: pointer; }
.mail-compose:hover { border-color: #6ba3fb; background: #5696f7; color: #fff; }
.mail-settings-link:focus-visible, .mail-compose:focus-visible { outline: 2px solid #a6ccff; outline-offset: 2px; }
.mail-content { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--mail-list-width, 57%)) 6px minmax(0, 1fr); }
.mail-list-pane, .mail-detail-pane { min-width: 0; min-height: 0; overflow-y: auto; }
.mail-list-pane { display: flex; flex-direction: column; overflow: hidden; }
.mail-list-content, .mail-list-pane .gmail-list { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.mail-list-pane .gmail-list-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mail-resize-handle { position: relative; z-index: 2; cursor: col-resize; background: transparent; touch-action: none; }
.mail-resize-handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: 2px; width: 1px; background: #363d46; }
.mail-resize-handle::after { content: ''; position: absolute; top: 50%; left: 2px; width: 2px; height: 36px; transform: translateY(-50%); border-radius: 2px; background: #68778a; opacity: 0; transition: opacity .15s; }
.mail-resize-handle:hover::after, .mail-resize-handle:focus-visible::after, .mail-resizing .mail-resize-handle::after { opacity: 1; }
.mail-resize-handle:focus-visible { outline: 2px solid #70adff; outline-offset: -2px; }
.mail-resizing, .mail-resizing * { cursor: col-resize !important; user-select: none !important; }
.mail-list-tabs { display: flex; flex: 0 0 63px; align-items: stretch; gap: 29px; padding: 0 23px; border-bottom: 1px solid #363d46; background: #1b2025; color: #b9c2d0; white-space: nowrap; overflow-x: auto; overflow-y: hidden; }
.mail-list-tabs span { display: flex; align-items: center; position: relative; font-size: 14px; }
.mail-list-tabs .active { color: #70adff; font-weight: 700; }
.mail-list-tabs .active::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 3px; border-radius: 3px; background: #70adff; }
body.dark-mode .mail-list-pane .gmail-list { border: 0 !important; border-radius: 0; box-shadow: none !important; background: transparent; }
.mail-list-pane .gmail-toolbar { display: none !important; }
body.dark-mode .gmail-row { min-height: 65px; gap: 14px; padding: 8px 18px; border-color: #343b43; background: transparent; }
body.dark-mode .gmail-row.unread { background: transparent; }
body.dark-mode .gmail-row.selected, body.dark-mode .gmail-row.selected.unread { background: linear-gradient(100deg,#26374d,#263246); outline: 1px solid #4870aa; outline-offset: -1px; border-radius: 0; }
body.dark-mode .gmail-row:hover { background: #273039; }
.gmail-row-left { width: 135px; min-width: 135px; gap: 10px; }
.gmail-row-center { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.gmail-row-center .gmail-subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmail-row-center .gmail-snippet { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.gmail-row-center .gmail-dash { display: none; }
.gmail-row-right { width: 55px; flex: 0 0 55px; align-self: flex-start; padding-top: 4px; }
body.dark-mode .gmail-from { max-width: 85px; color: #edf0f5; font-size: 14px; }
body.dark-mode .gmail-subject { color: #edf0f5; font-size: 14px; }
body.dark-mode .gmail-date { color: #b9c2d0 !important; font-size: 12px; white-space: nowrap; }
body.dark-mode .gmail-checkbox { width: 18px; height: 18px; flex: 0 0 18px; border: 1px solid #788393; background: transparent; }
body.dark-mode .gmail-star { color: #a6b0c0 !important; font-size: 17px; }
body.dark-mode .gmail-star.gmail-star-yellow-star, body.dark-mode .gmail-star.gmail-star-yellow-bang { color: #f5ba32 !important; }
body.dark-mode .gmail-star.gmail-star-orange-star, body.dark-mode .gmail-star.gmail-star-orange-guillemet { color: #f29a42 !important; }
body.dark-mode .gmail-star.gmail-star-red-star, body.dark-mode .gmail-star.gmail-star-red-bang { color: #ed6b73 !important; }
body.dark-mode .gmail-star.gmail-star-purple-star, body.dark-mode .gmail-star.gmail-star-purple-question { color: #bb92f3 !important; }
body.dark-mode .gmail-star.gmail-star-blue-star, body.dark-mode .gmail-star.gmail-star-blue-info { color: #70adff !important; }
body.dark-mode .gmail-star.gmail-star-green-star, body.dark-mode .gmail-star.gmail-star-green-check { color: #75c894 !important; }
body.dark-mode .gmail-todo { display: none; }
.gmail-unread-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #69a9ff; }
.mail-detail-pane { background: #1b2025; }
.mail-detail-pane > div, .mail-detail-pane .gmail-detail { height: 100%; }
body.dark-mode .mail-detail-pane .gmail-detail { border: 0 !important; border-radius: 0; box-shadow: none !important; background: transparent; }
body.dark-mode .mail-detail-pane .gmail-toolbar { min-height: 63px; padding: 9px 21px !important; border-color: #363d46 !important; background: #1b2025; }
.mail-detail-pane .gmail-toolbar .btn { width: 37px; height: 35px; padding: 0; font-size: 0; border: 0; background: transparent; }
.mail-detail-pane .gmail-toolbar .gmail-back-button { width: auto; min-width: 37px; padding: 0 5px; font-size: 12px; }
.mail-detail-pane .gmail-toolbar .btn i { margin: 0 !important; font-size: 18px; }
.mail-detail-pane .gmail-detail-toolbar-date { display: none; }
.mail-detail-pane .gmail-detail-body { padding: 20px 29px !important; }
body.dark-mode .gmail-detail-subject { color: #f0f2f7; font-size: 25px; font-weight: 700; }
body.dark-mode .gmail-detail-meta { color: #f0f2f7; }
.mail-detail-pane .gmail-detail-meta .fw-bold { font-size: 16px; }
.mail-detail-pane .gmail-detail-content { line-height: 1.6; }
body.dark-mode .mail-detail-pane .gmail-conversation-history {
  margin-top: 24px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #363e48;
  border-radius: 0;
  background: transparent;
}
.mail-detail-pane .gmail-conversation-title {
  margin-bottom: 8px !important;
  color: #9eabbc !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.dark-mode .mail-detail-pane .gmail-history-item {
  margin: 0;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #363e48;
  border-radius: 0;
  background: transparent;
}
.mail-detail-pane .gmail-history-meta { min-width: 0; }
.mail-detail-pane .gmail-history-meta .fw-semibold { color: #e8edf5; font-size: 13px; }
.mail-detail-pane .gmail-history-meta .text-muted { color: #9eabbc !important; font-size: 11px; }
body.dark-mode .mail-detail-pane .gmail-history-snippet { margin-top: 7px !important; color: #abb6c5 !important; font-size: 12px; line-height: 1.45; }
body.dark-mode .mail-detail-pane .gmail-history-body { margin-top: 12px !important; color: #dce3ee; font-size: 12px; line-height: 1.55; }
body.dark-mode .mail-detail-pane .gmail-history-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #aeb9c8;
}
body.dark-mode .mail-detail-pane .gmail-history-toggle:hover,
body.dark-mode .mail-detail-pane .gmail-history-toggle:focus-visible { border-color: #465a75; background: #29394d; color: #fff; }
.mail-empty-detail { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 13px; color: #8f9aaa; }
.mail-empty-detail i { font-size: 44px; }
@media (max-width: 1100px) { .gmail-row-left { width: 115px; min-width: 115px; gap: 8px; } body.dark-mode .gmail-from { max-width: 65px; } .mail-list-tabs { gap: 18px; } }
@media (max-width: 767.98px) { .mail-workspace { height: calc(100vh - 56px); border-radius: 0; } .mail-content { display: block; } .mail-list-pane { height: 100%; border-right: 0; } .mail-resize-handle { display: none; } .mail-detail-pane { display: none; } .mail-workspace:has(.mail-detail-pane .gmail-detail) .mail-list-pane { display: none; } .mail-workspace:has(.mail-detail-pane .gmail-detail) .mail-detail-pane { display: block; height: 100%; } .mail-topbar { height: 60px; flex-basis: 60px; gap: 12px; padding: 0 14px; } .mail-top-title { font-size: 17px; } .mail-top-search { flex: 1; width: auto; } .mail-top-search kbd { display: none; } .mail-top-actions { display: none; } .gmail-row-left { width: 115px; min-width: 115px; } }
.mail-list-tabs button { display: flex; align-items: center; position: relative; padding: 0; border: 0; background: transparent; color: #b9c2d0; font-size: 14px; white-space: nowrap; }
.mail-list-tabs button.active { color: #70adff; font-weight: 700; }
.mail-list-tabs button.active::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 3px; border-radius: 3px; background: #70adff; }

/* Denser type scale */
html { font-size: 85%; }
@media (min-width: 768px) {
  body.dark-mode app-header .app-user-label { font-size: 14px; }
  body.dark-mode app-header .app-user-label i { font-size: 21px; }
  body.dark-mode app-header .nav-link { font-size: 13px; }
  body.dark-mode app-header .nav-link i { font-size: 15px; }
  body.dark-mode app-header .app-nav-count { font-size: 11px; }
}
.mail-top-search input { font-size: 14px; }
.mail-top-search kbd { font-size: 11px; }
.mail-settings-link { font-size: 17px; }
.mail-list-tabs button { font-size: 12px; }
body.dark-mode .gmail-from, body.dark-mode .gmail-subject { font-size: 12px; }
.gmail-row-center .gmail-snippet { font-size: 11px; }
body.dark-mode .gmail-date { font-size: 10px; }
body.dark-mode .gmail-star { font-size: 14px; }
.mail-detail-pane .gmail-toolbar .btn i { font-size: 15px; }
body.dark-mode .gmail-detail-subject { font-size: 21px; }
.mail-detail-pane .gmail-detail-meta .fw-bold { font-size: 14px; }
.mail-empty-detail i { font-size: 37px; }
body.dark-mode .gmail-row { min-height: 57px; }

/* Resizable navigation sidebar */
@media (min-width: 768px) {
  body.dark-mode app-header .app-header-shell { padding-top: 12px; padding-bottom: 8px; }
  body.dark-mode app-header .app-header-desktop { position: relative; gap: 12px; flex-wrap: nowrap !important; padding-bottom: 72px; }
  .app-sidebar-brand { display: flex; align-items: center; justify-content: space-between; min-height: 46px; gap: 8px; width: 100%; }
  .app-sidebar-logo { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: #f0f3f8; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .app-sidebar-logo:hover { color: #fff; }
  .app-sidebar-logo-mark { position: relative; display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; background: #4388f4; color: white; font-size: 18px; }
  .app-sidebar-logo-mark .app-sidebar-expand-icon { display: none; }
  .app-sidebar-toggle { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #aeb9c8; font-size: 17px; cursor: pointer; }
  .app-sidebar-toggle:hover, .app-sidebar-toggle:focus-visible { background: #29394d; color: #fff; }
  body.dark-mode app-header .app-header-desktop .nav.me-auto { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
  body.dark-mode app-header .app-user-nav {
    position: fixed;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 1031;
    width: clamp(220px, var(--sidebar-width, 290px), 420px) !important;
    margin: 0;
    padding: 13px 20px 12px;
    border-right: 1px solid #363e48;
    background: #1b2025;
  }
  body.dark-mode app-header .app-user-nav::before {
    content: '';
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 1px;
    background: #414a55;
  }
  body.dark-mode app-header { width: clamp(220px, var(--sidebar-width, 290px), 420px); }
  body.dark-mode app-header + #app { margin-left: clamp(220px, var(--sidebar-width, 290px), 420px); }
  .sidebar-resize-handle { position: fixed; top: 0; bottom: 0; left: calc(clamp(220px, var(--sidebar-width, 290px), 420px) - 3px); z-index: 1040; width: 6px; cursor: col-resize; touch-action: none; }
  .sidebar-resize-handle::after { content: ''; position: absolute; top: 50%; left: 2px; width: 2px; height: 38px; transform: translateY(-50%); border-radius: 2px; background: #70adff; opacity: 0; transition: opacity .15s; }
  .sidebar-resize-handle:hover::after, .sidebar-resize-handle:focus-visible::after, .mail-resizing .sidebar-resize-handle::after { opacity: 1; }
  .sidebar-resize-handle:focus-visible { outline: 2px solid #70adff; outline-offset: -2px; }
  html.sidebar-collapsed body.dark-mode app-header { width: 72px; }
  html.sidebar-collapsed body.dark-mode app-header + #app { margin-left: 72px; }
  html.sidebar-collapsed body.dark-mode app-header .app-user-nav { width: 72px !important; padding-right: 10px; padding-left: 10px; }
  html.sidebar-collapsed body.dark-mode app-header .app-user-nav::before { right: 10px; left: 10px; }
  html.sidebar-collapsed .sidebar-resize-handle { display: none; }
  html.sidebar-collapsed body.dark-mode app-header .app-header-shell { padding-right: 10px; padding-left: 10px; }
  html.sidebar-collapsed .app-sidebar-brand { justify-content: center; }
  html.sidebar-collapsed .app-sidebar-toggle { display: none; }
  html.sidebar-collapsed .app-sidebar-logo > span:last-child,
  html.sidebar-collapsed body.dark-mode app-header .nav-link span,
  html.sidebar-collapsed body.dark-mode app-header .app-user-label span,
  html.sidebar-collapsed body.dark-mode app-header .app-user-row > button { display: none; }
  html.sidebar-collapsed .app-sidebar-logo { justify-content: center; }
  html.sidebar-collapsed .app-sidebar-logo:hover .app-sidebar-logo-icon,
  html.sidebar-collapsed .app-sidebar-logo:focus-visible .app-sidebar-logo-icon { display: none; }
  html.sidebar-collapsed .app-sidebar-logo:hover .app-sidebar-expand-icon,
  html.sidebar-collapsed .app-sidebar-logo:focus-visible .app-sidebar-expand-icon { display: inline; }
  html.sidebar-collapsed body.dark-mode app-header .nav-link { justify-content: center; gap: 0; padding-right: 0 !important; padding-left: 0 !important; }
  html.sidebar-collapsed body.dark-mode app-header .nav-link i { width: auto; }
  html.sidebar-collapsed body.dark-mode app-header .app-nav-inbox-submenu { display: none; }
  html.sidebar-collapsed body.dark-mode app-header .app-user-row { justify-content: center !important; padding: 0 !important; }
}
@media (max-width: 767.98px) { .sidebar-resize-handle { display: none; } }

/* New message in the reading pane */
.mail-detail-pane:has(.mail-compose-panel) { overflow: hidden; }
.mail-compose-panel { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; background: #1b2025; color: #edf1f7; overflow: hidden; }
.mail-compose-heading { display: flex; flex: 0 0 63px; justify-content: space-between; align-items: center; padding: 0 23px; border-bottom: 1px solid #363e48; background: #20272f; }
.mail-compose-title { display: flex; align-items: center; gap: 11px; color: #f0f2f7; font-size: 15px; }
.mail-compose-title i { color: #70adff; font-size: 18px; }
.mail-compose-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #b8c3d0; font-size: 17px; }
.mail-compose-close:hover, .mail-compose-close:focus-visible { background: #2b3949; color: white; }
.mail-compose-field { position: relative; display: flex; flex: 0 0 51px; align-items: center; gap: 12px; margin: 0 23px; border-bottom: 1px solid #363e48; color: #aab6c5; font-size: 12px; }
.mail-compose-field span { flex: 0 0 58px; }
.mail-compose-field input { flex: 1; min-width: 0; height: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: #edf1f7; font: inherit; font-size: 13px; }
.mail-compose-suggestions { display: none; }
.mail-compose-suggestions:not(:empty) { position: absolute; z-index: 20; top: 100%; right: 0; left: 70px; display: block; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid #465465; border-radius: 6px; background: #252d36; box-shadow: 0 12px 24px #0006; }
.mail-compose-suggestion { display: flex; flex-direction: column; width: 100%; gap: 2px; padding: 8px 10px; border: 0; border-radius: 4px; background: transparent; color: #edf1f7; text-align: left; font-size: 12px; }
.mail-compose-suggestion span { flex: none; padding: 0; }
.mail-compose-suggestion small { overflow: hidden; color: #aab6c5; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mail-compose-suggestion:hover, .mail-compose-suggestion:focus-visible { outline: 0; background: #31465e; }
.mail-compose-field input::placeholder, .mail-compose-editor textarea::placeholder { color: #8794a5; }
.mail-compose-field:focus-within { border-bottom-color: #70adff; }
.mail-compose-tools { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 8px; padding: 13px 23px 6px; }
.mail-compose-tool { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 1px solid #455260; border-radius: 6px; background: #252d36; color: #cbd5e2; font-size: 12px; }
.mail-compose-tool:hover, .mail-compose-tool:focus-visible { border-color: #70adff; background: #2b3b50; color: #fff; }
.mail-compose-tool.mail-compose-ai { border-color: #4778b7; color: #8bbcff; }
.mail-compose-tool:disabled { opacity: .55; cursor: wait; }
.mail-compose-editor { display: flex; flex: 1 1 auto; min-height: 120px; padding: 10px 23px 18px; }
.mail-compose-editor textarea { flex: 1; width: 100%; min-height: 0; padding: 13px 15px; border: 1px solid #3d4855; border-radius: 7px; outline: 0; resize: none; background: #222a33; color: #edf1f7; font: inherit; font-size: 13px; line-height: 1.6; }
.mail-compose-editor textarea:focus { border-color: #70adff; box-shadow: 0 0 0 2px #4778b733; }
.mail-compose-attachments { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 23px 12px; }
.mail-compose-attachment { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 7px 5px 10px; border: 1px solid #465465; border-radius: 6px; background: #283441; color: #cad8e8; font-size: 12px; }
.mail-compose-attachment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-compose-attachment button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #cad8e8; }
.mail-compose-attachment button:hover { background: #3a4b5f; color: #fff; }
.mail-compose-footer { display: flex; flex: 0 0 65px; justify-content: space-between; align-items: center; gap: 16px; padding: 0 23px; border-top: 1px solid #363e48; background: #20272f; }
.mail-compose-error { color: #ff9da4; font-size: 12px; }
.mail-compose-send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 85px; height: 36px; padding: 0 14px; border: 1px solid #4388f4; border-radius: 6px; background: #4388f4; color: white; font-size: 12px; font-weight: 700; }
.mail-compose-send:hover { border-color: #6ba3fb; background: #5696f7; }
.mail-compose-send:disabled { opacity: .65; cursor: wait; }
.mail-compose-close:focus-visible, .mail-compose-tool:focus-visible, .mail-compose-send:focus-visible { outline: 2px solid #a6ccff; outline-offset: 2px; }
@media (max-width: 767.98px) { .mail-workspace:has(.mail-detail-pane .mail-compose-panel) .mail-list-pane { display: none; } .mail-workspace:has(.mail-detail-pane .mail-compose-panel) .mail-detail-pane { display: block; height: 100%; } .mail-compose-heading { padding: 0 15px; } .mail-compose-field { margin: 0 15px; } .mail-compose-tools { padding-right: 15px; padding-left: 15px; } .mail-compose-editor { padding-right: 15px; padding-left: 15px; } .mail-compose-footer { padding: 0 15px; } }
@media (max-width: 767.98px) { .mail-top-actions { display: flex; } .mail-top-actions .mail-refresh-indicator, .mail-top-actions .mail-settings-link { display: none; } }
.app-agents-page .table,
.app-agents-page .table thead,
.app-agents-page .table tbody,
.app-agents-page .table tr,
.app-agents-page .table th,
.app-agents-page .table td {
  background-color: transparent !important;
}

.app-documents-page td,
.app-documents-page th {
  vertical-align: middle;
}

.app-documents-page .table td {
  white-space: nowrap;
}

.app-documents-page .table td:first-child,
.app-documents-page .table th:first-child {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-documents-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-documents-table-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .app-documents-page .table td,
  .app-documents-page .table th {
    white-space: normal;
  }
}
.contacts-page {
  height: calc(100dvh);
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh);
  overflow: hidden;
}

contacts-container {
  display: block;
  height: 100%;
  min-height: 0;
}

.contacts-main-row {
  display: grid;
  grid-template-columns: minmax(240px, 34%) minmax(0, 1fr);
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.contacts-main-row > :is(.contacts-list-column, .contacts-detail-panel) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.contacts-list-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.contacts-list-scroll {
  flex: 1 1 auto;
  height: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.contacts-history-panel {
  border-left: 1px solid #e9ecef;
  padding-left: 1rem;
}

.contacts-detail-panel {
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
}

.contacts-detail-view {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.contacts-detail-banner {
  flex: 0 0 auto;
  height: auto;
  border: 0 !important;
  padding: 0;
}

.contacts-detail-banner .card-body {
  padding: 0;
}

.contacts-banner-details {
  row-gap: 0.5rem;
}

.contacts-banner-chip {
  font-weight: 500;
  white-space: normal;
}

.contacts-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.card-body.contacts-history-list.d-flex.flex-column.gap-2 {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.contacts-history-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border: 0 !important;
}

.contacts-history-card .card-body {
  padding: 0;
}

@media (max-width: 1199.98px) {
  .contacts-history-panel {
    border-left: 0;
    padding-left: 0;
  }
}

body.dark-mode .contacts-list-scroll .list-group-item {
  background-color: #222;
  border-color: #333;
  color: rgb(211, 211, 211);
}

body.dark-mode .contacts-history-panel {
  border-left-color: #333;
}

body.dark-mode .contacts-detail-banner,
body.dark-mode .contacts-history-list .bg-body {
  background-color: #252525 !important;
  border-color: #333 !important;
}

body.dark-mode .contacts-banner-chip {
  background-color: #2a2a2a !important;
  border-color: #4f4f4f !important;
  color: rgb(211, 211, 211) !important;
}

body.dark-mode .contacts-list-scroll .list-group-item small {
  color: #a8a8a8 !important;
}

body.dark-mode .contacts-list-scroll .list-group-item.list-group-item-action:hover {
  background-color: #2a2a2a;
  color: rgb(211, 211, 211);
}

body.dark-mode .contacts-list-scroll .list-group-item.active {
  background-color: #303030;
  border-color: #4f4f4f;
  color: rgb(211, 211, 211);
}

/* Secondary pages share the mail workspace palette and frame. */
:is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) {
  width: 100%;
  max-width: none !important;
  min-height: 100vh;
  padding: 0 !important;
  background: #1b2025;
  color: #e8ebf2;
  overflow-x: hidden;
}
:is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > .d-flex:first-child {
  min-height: 70px;
  margin: 0 !important;
  padding: 13px 28px;
  border-bottom: 1px solid #363d46;
  background: #1d2228;
}
:is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > .d-flex:first-child h2 {
  color: #f0f2f7;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.025em;
}
:is(.app-documents-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > :not(:first-child) {
  margin-left: 28px !important;
  margin-right: 28px !important;
}
:is(.app-documents-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > :nth-child(2) {
  margin-top: 24px !important;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .card {
  background: #20262d;
  border: 1px solid #363e48 !important;
  border-radius: 9px;
  color: #e8ebf2;
  box-shadow: none !important;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .text-muted {
  color: #a9b4c3 !important;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) :is(.form-control, .form-select) {
  min-height: 40px;
  background: #252d36;
  border: 1px solid #46515e;
  border-radius: 7px;
  color: #eef1f6;
  box-shadow: none;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) :is(.form-control, .form-select):focus {
  border-color: #70adff;
  box-shadow: 0 0 0 3px rgba(112, 173, 255, .15);
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .form-control::placeholder { color: #8996a7; }
:is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .btn-primary {
  border-color: #4388f4;
  background: #4388f4;
  color: #fff;
}
:is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .btn-primary:hover {
  border-color: #5b9aff;
  background: #5b9aff;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) :is(.btn-outline-secondary, .btn-outline-primary) {
  color: #cbd5e2;
  background: #252d36;
  border-color: #46515e;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) :is(.btn-outline-secondary, .btn-outline-primary):hover {
  color: #fff;
  background: #33465e;
  border-color: #70adff;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .btn-outline-danger {
  color: #e9a1a5;
  border-color: #74505a;
  background: transparent;
}
body.dark-mode :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .btn-outline-danger:hover {
  color: #fff;
  background: #7d3d49;
}
body.dark-mode :is(.app-documents-page, .app-agents-page, .app-settings-page) .table {
  color: #e8ebf2;
  background: transparent;
  border-color: #363e48;
}
body.dark-mode :is(.app-documents-page, .app-agents-page, .app-settings-page) .table :is(th, td) {
  padding: 13px 15px;
  border-color: #363e48;
  background: transparent !important;
  color: #dce2eb;
}
body.dark-mode :is(.app-documents-page, .app-agents-page, .app-settings-page) .table thead th {
  color: #9eabbc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.dark-mode :is(.app-documents-page, .app-agents-page, .app-settings-page) .table tbody tr:hover { background: #263448; }
.app-agents-page .app-settings-tabs {
  border-bottom: 1px solid #363e48;
  gap: 20px;
  margin-bottom: 20px !important;
}
.app-agents-page > .agents-list { margin: 0 !important; border-top: 1px solid #363e48; }
.app-agents-page .agent-row { border-bottom: 1px solid #363e48; border-radius: 0; background: transparent; }
.app-agents-page .agent-row:hover { background: #253348; }
.app-agents-page .agent-row-body { padding: 16px 28px; }
.app-agents-page .agent-config-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  row-gap: 5px;
}
.app-agents-page .agent-config-row-body > :not(.agent-row-actions) { min-width: 0; grid-column: 1; }
.app-agents-page .agent-config-row-body .agent-row-actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0 !important; }
.app-agents-page .agent-row-body .fw-semibold { color: #edf1f7; font-size: 14px; }
.app-agents-page .agent-row-body .text-muted { color: #aab6c5 !important; }
.app-agents-page .agent-row-actions { justify-content: flex-end; gap: 6px !important; }
.app-agents-page .agent-status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 28px;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.app-agents-page .agent-status-label.is-enabled { color: #80d5a5; }
.app-agents-page .agent-status-label.is-disabled { color: #e9989e; }
.app-agents-page .agent-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #46515e;
  border-radius: 7px;
  background: #252d36;
  color: #cbd5e2;
  font-size: 15px;
}
.app-agents-page .agent-icon-button:hover { border-color: #70adff; background: #30435b; color: #fff; }
.app-agents-page .agent-add-button { width: 38px; height: 38px; flex-basis: 38px; border-color: #4388f4; background: #4388f4; color: #fff; }
.app-agents-page .agent-add-button:hover { border-color: #6ba3fb; background: #5696f7; }
.app-agents-page .agent-delete-button { border-color: #74505a; background: transparent; color: #e9a1a5; }
.app-agents-page .agent-delete-button:hover { border-color: #a9616c; background: #7d3d49; color: #fff; }
@media (max-width: 767.98px) {
  .app-agents-page .agent-row-body { padding: 16px; }
  .app-agents-page .agent-config-row-body { grid-template-columns: minmax(0, 1fr); }
  .app-agents-page .agent-config-row-body .agent-row-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 6px !important; }
}
body.dark-mode .app-agents-page .app-settings-tabs .nav-link {
  position: relative;
  padding: 10px 4px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #a9b4c3;
}
body.dark-mode .app-agents-page .app-settings-tabs .nav-link.active { color: #70adff; }
body.dark-mode .app-agents-page .app-settings-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #70adff;
}
.app-settings-page > .mb-2 { margin-top: 26px; }
.app-settings-page > .mb-2 h5, .app-documents-page h5, .app-agent-config-page .form-label { color: #eef1f6; }
.contacts-page .contacts-search-form { display: flex; align-items: center; gap: 12px; width: min(280px, 45%); height: 38px; margin: 0; padding: 0 12px; border: 1px solid #363e48; border-radius: 7px; background: #252b31; color: #cbd3e1; }
.contacts-page .contacts-search-form:focus-within { border-color: #70adff; box-shadow: 0 0 0 2px rgba(112, 173, 255, .16); }
body.dark-mode .contacts-page .contacts-search-form .contacts-search-input,
body.dark-mode .contacts-page .contacts-search-form .contacts-search-input:focus { flex: 1; min-width: 0; width: 100%; min-height: 0; height: 100%; padding: 0; border: 0; outline: 0; border-radius: 0; background: transparent; color: #e9edf5; font-size: 14px; box-shadow: none; }
body.dark-mode .contacts-page .contacts-search-input::placeholder { color: #bcc5d2; }
.contacts-page .contacts-search-form kbd { white-space: nowrap; padding: 4px 7px; border-radius: 7px; background: #343a43; color: #ccd5e4; font-size: 11px; }
.contacts-page > .contacts-main-row { margin: 0 !important; border-top: 1px solid #363e48; }
.contacts-page .contacts-list-column { border-right: 1px solid #363e48; }
.contacts-page .contacts-list-column > .text-muted { padding: 20px; }
.contacts-page .contacts-detail-panel { padding: 24px 28px !important; }
body.dark-mode .contacts-page .contacts-list-scroll .list-group-item {
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid #343b43;
  border-radius: 0;
  background: #1b2025;
  color: #dce2eb;
}
body.dark-mode .contacts-page .contacts-list-scroll .list-group-item:hover { background: #263448; }
body.dark-mode .contacts-page .contacts-list-scroll .list-group-item.active {
  background: #26374d;
  color: #f1f5fc;
  box-shadow: inset 3px 0 #70adff;
}
body.dark-mode .contacts-page .contacts-detail-banner,
body.dark-mode .contacts-page .contacts-history-card { border: 0 !important; background: transparent; }
body.dark-mode .contacts-page .contacts-banner-chip {
  background: #29384b !important;
  border-color: #46658e !important;
  color: #bdd8ff !important;
}
@media (max-width: 767.98px) {
  :is(.app-documents-page, .contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > .d-flex:first-child { min-height: 60px; padding: 12px 16px; }
  :is(.app-documents-page, .app-agents-page, .app-agent-config-page, .app-settings-page) > :not(:first-child) { margin-left: 16px !important; margin-right: 16px !important; }
  .contacts-page { height: auto; min-height: 100vh; overflow: visible; }
  .contacts-page .contacts-search-form { width: min(240px, 55%); }
  .contacts-page .contacts-search-form kbd { display: none; }
  .contacts-page > .contacts-main-row { display: block; overflow: visible; }
  .contacts-page .contacts-main-row > :is(.contacts-list-column, .contacts-detail-panel) { overflow: visible !important; }
  .contacts-page .contacts-list-scroll { height: auto; max-height: 36vh; }
  .contacts-page .contacts-list-column { border-right: 0; border-bottom: 1px solid #363e48; }
  .contacts-page .contacts-detail-panel { padding: 18px 16px !important; }
}

/* Keep secondary page surfaces as flat panes, like the mailbox. */
body.dark-mode :is(.contacts-page, .app-agents-page, .app-agent-config-page, .app-settings-page) .card-body {
  background: transparent !important;
  color: #e8ebf2;
}
.app-documents-page > .documents-panel {
  margin: 0 !important;
  border: 0;
  background: transparent;
}
.app-documents-page .documents-panel-body {
  padding: 22px 28px;
  background: transparent;
}
.app-documents-page .documents-panel-body > .d-flex:first-child {
  min-height: 48px;
  margin-bottom: 12px !important;
}
.app-documents-page .documents-panel-body h5 {
  font-size: 16px;
  font-weight: 650;
}
.app-documents-page .table-responsive { overflow-x: auto; }
body.dark-mode .app-documents-page .table { margin: 0; background: transparent !important; }
body.dark-mode .app-documents-page .table :is(thead, tbody, tr, th, td) { background: transparent !important; }
body.dark-mode .app-documents-page .table :is(th, td) { border-color: #363e48; }
body.dark-mode .app-documents-page .table tbody tr:hover { background: #253348 !important; }
.app-documents-page .app-documents-icon-btn { width: 38px; height: 38px; }
.app-documents-page .app-documents-table-icon-btn { width: 31px; height: 31px; }
@media (max-width: 767.98px) {
  .app-documents-page .documents-panel-body { padding: 18px 16px; }
}

/* Settings follows the flat Documents layout. */
.app-settings-page .settings-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #46515e;
  border-radius: 7px;
  background: #252d36;
  color: #cbd5e2;
  font-size: 16px;
}
.app-settings-page .settings-icon-button:hover { border-color: #70adff; background: #30435b; color: #fff; }
.app-settings-page .settings-add-button { border-color: #4388f4; background: #4388f4; color: #fff; }
.app-settings-page .settings-add-button:hover { border-color: #6ba3fb; background: #5696f7; }
.app-settings-page .settings-delete-button { color: #e9a1a5; border-color: #74505a; background: transparent; }
.app-settings-page .settings-delete-button:hover { border-color: #a9616c; background: #7d3d49; color: #fff; }
.app-settings-page .settings-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  margin: 0 !important;
  padding: 20px;
  background: rgba(5, 9, 14, .72);
}
.app-settings-page .settings-modal {
  width: min(480px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid #46515e;
  border-radius: 10px;
  background: #20262d;
  box-shadow: 0 24px 60px #0009;
}
.app-settings-page .settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #363e48;
}
.app-settings-page .settings-modal-header h5 { margin: 0; color: #eef1f6; font-size: 17px; font-weight: 700; }
.app-settings-page .settings-modal-form { display: grid; gap: 16px; padding: 20px; }
.app-settings-page .settings-form-field { min-width: 0; }
.app-settings-page .settings-form-field .form-label { margin-bottom: 7px; color: #b9c5d4; font-size: 12px; font-weight: 650; }
.app-settings-page .settings-modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.app-settings-page .settings-modal-actions .btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; }
.app-settings-page .settings-modal-actions .btn-primary { border-color: #4388f4; background: #4388f4; color: #fff; }
.app-settings-page > .settings-panel,
.app-settings-page > .settings-list-heading,
.app-settings-page > .settings-filter-list,
.app-settings-page > .settings-empty {
  margin: 0 !important;
  background: transparent;
}
.app-settings-page .settings-panel-body {
  padding: 22px 28px 28px;
  border-bottom: 1px solid #363e48;
}
.app-settings-page .settings-panel-body h5 {
  margin: 0 0 20px;
  color: #eef1f6;
  font-size: 16px;
  font-weight: 650;
}
.app-settings-page .settings-panel-body .form-label {
  color: #b9c5d4;
  font-size: 12px;
  font-weight: 650;
}
.app-settings-page .settings-list-heading {
  padding: 22px 28px 12px;
}
.app-settings-page .settings-list-heading h5 {
  color: #eef1f6;
  font-size: 16px;
  font-weight: 650;
}
.app-settings-page .settings-filter-row {
  border-top: 1px solid #363e48;
  background: transparent;
}
.app-settings-page .settings-filter-row:last-child { border-bottom: 1px solid #363e48; }
.app-settings-page .settings-filter-row:hover { background: #253348; }
.app-settings-page .settings-filter-row-body {
  min-height: 68px;
  padding: 14px 28px;
}
.app-settings-page .settings-empty { padding: 14px 28px; }
@media (max-width: 767.98px) {
  .app-settings-page .settings-panel-body { padding: 18px 16px 24px; }
  .app-settings-page .settings-list-heading { padding: 20px 16px 10px; }
  .app-settings-page .settings-filter-row-body { padding: 14px 16px; }
  .app-settings-page .settings-empty { padding: 14px 16px; }
}

/* Contacts uses flat list and detail panes. */
body.dark-mode .contacts-page .contacts-detail-banner { background: transparent !important; }
.contacts-page .contacts-detail-view,
.contacts-page .contacts-detail-banner,
.contacts-page .contacts-history-card,
.contacts-page .contacts-edit-form {
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.contacts-page .contacts-banner-body,
.contacts-page .contacts-edit-body { padding: 0; }
.contacts-page .contacts-detail-banner { padding-bottom: 18px; }
.contacts-page .contacts-edit-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #4388f4;
  border-radius: 7px;
  background: #4388f4;
  color: #fff;
  font-size: 15px;
}
.contacts-page .contacts-edit-button:hover { border-color: #6ba3fb; background: #5696f7; color: #fff; }
.contacts-page .contacts-detail-field { color: #dce3ed; font-size: 12px; line-height: 1.5; }
.contacts-page .contacts-detail-field-label { color: #9eabbc; font-weight: 650; }
.contacts-page .contacts-detail-banner h4 {
  color: #f0f2f7;
  font-size: 20px;
  font-weight: 700;
}
.contacts-page .contacts-history-card { border-top: 1px solid #363e48 !important; padding-top: 18px; }
.contacts-page .contacts-history-list h6 {
  margin-bottom: 8px !important;
  color: #9eabbc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.contacts-page .contacts-interaction-row {
  padding: 14px 0;
  border-bottom: 1px solid #363e48;
  background: transparent;
}
.contacts-page .contacts-interaction-row .fw-semibold { color: #e8edf5; font-size: 13px; }
.contacts-page .contacts-interaction-row .text-muted { color: #9eabbc !important; font-size: 11px; }
.contacts-page .contacts-interaction-row .small.mt-1 { color: #c4cdd9; font-size: 12px; line-height: 1.5; }
.contacts-page .contacts-interaction-type {
  padding: 3px 7px;
  border: 1px solid #46515e;
  border-radius: 5px;
  color: #aeb9c8;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  text-transform: capitalize;
}
.contacts-page .contacts-interaction-type.is-meeting { border-color: #3d6699; color: #8bbcff; }
.contacts-page .contacts-edit-form h5 { color: #eef1f6; font-size: 16px; }
.contacts-page .contacts-edit-form .form-label { color: #b9c5d4; font-size: 12px; font-weight: 650; }
.contacts-page .contacts-list-scroll .list-group-item:first-child { border-top: 0; }

/* Todo uses the same header and table treatment as Documents. */
body.dark-mode .todo-page {
  display: block;
  width: 100%;
  min-height: 100vh;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: #1b2025;
  color: #e8ebf2;
  box-shadow: none;
}
body.dark-mode .todo-page .todo-toolbar {
  min-height: 70px;
  padding: 13px 28px;
  border-bottom: 1px solid #363d46;
  background: #1d2228;
}
.todo-page .todo-toolbar h2 {
  color: #f0f2f7;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.025em;
}
body.dark-mode .todo-page .todo-toolbar-count { color: #a9b4c3 !important; }
.todo-page .todo-table-wrap { padding: 22px 28px; }
body.dark-mode .todo-page .table { background: transparent; color: #e8ebf2; border-color: #363e48; }
body.dark-mode .todo-page .table :is(thead, tbody, tr, th, td) { background: transparent !important; }
body.dark-mode .todo-page .table :is(th, td) { padding: 13px 15px; border-color: #363e48; color: #dce2eb; }
body.dark-mode .todo-page .table thead th {
  color: #9eabbc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.dark-mode .todo-page .table tbody tr:hover { background: #253348 !important; }
body.dark-mode .todo-page .text-muted { color: #a9b4c3 !important; }
body.dark-mode .todo-page .btn-outline-secondary {
  color: #cbd5e2;
  border-color: #46515e;
  background: #252d36;
}
body.dark-mode .todo-page .btn-outline-secondary:hover { border-color: #70adff; background: #33465e; color: #fff; }
body.dark-mode .todo-page .btn-outline-danger { color: #e9a1a5; border-color: #74505a; background: transparent; }
body.dark-mode .todo-page .btn-outline-danger:hover { color: #fff; background: #7d3d49; }
body.dark-mode .todo-page .btn-outline-success { color: #93d7b2; border-color: #426d56; background: transparent; }
@media (max-width: 767.98px) {
  body.dark-mode .todo-page .todo-toolbar { min-height: 60px; padding: 12px 16px; }
  .todo-page .todo-table-wrap { padding: 12px 16px; }
  body.dark-mode .todo-page .table tbody tr { border-color: #363e48; }
  body.dark-mode .todo-page .table tbody td { padding: 8px 0; }
}

/* Reply composer belongs to the reading pane, not a separate dark card. */
body.dark-mode .gmail-detail .gmail-reply {
  margin-top: 24px !important;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid #363e48;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.gmail-detail .gmail-reply > .d-flex:first-child { margin-bottom: 14px !important; }
.gmail-detail .gmail-reply > .form-label {
  margin-bottom: 10px !important;
  color: #eef1f6;
  font-size: 14px;
  font-weight: 650 !important;
}
body.dark-mode .gmail-detail .gmail-reply > .d-flex:first-child .btn {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #46515e;
  border-radius: 7px;
  background: #252d36;
  color: #cbd5e2;
}
body.dark-mode .gmail-detail .gmail-reply > .d-flex:first-child .btn-outline-primary {
  border-color: #3d6699;
  background: #22334a;
  color: #8bbcff;
}
body.dark-mode .gmail-detail .gmail-reply > .d-flex:first-child .btn:hover {
  border-color: #70adff;
  color: #fff;
}
.gmail-detail .gmail-reply-toolbar { gap: 5px !important; margin-bottom: 9px !important; }
body.dark-mode .gmail-detail .gmail-reply-toolbar .btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #aeb9c8;
}
body.dark-mode .gmail-detail .gmail-reply-toolbar .btn:hover,
body.dark-mode .gmail-detail .gmail-reply-toolbar .btn:focus-visible {
  border-color: #465a75;
  background: #29394d;
  color: #eaf2ff;
}
body.dark-mode .gmail-detail .gmail-reply-editor {
  min-height: 140px;
  max-height: 320px;
  padding: 12px 14px;
  border: 1px solid #46515e;
  border-radius: 7px;
  background: #252d36;
  color: #eef1f6;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: none;
}
body.dark-mode .gmail-detail .gmail-reply-editor:focus {
  outline: none;
  border-color: #70adff;
  box-shadow: 0 0 0 2px rgba(112, 173, 255, .16);
}
body.dark-mode .gmail-detail .gmail-reply-editor:empty::before { color: #8e9aaa; }
body.dark-mode .gmail-detail .gmail-reply > .d-flex.mt-2 { margin-top: 12px !important; }
body.dark-mode .gmail-detail .gmail-reply > .d-flex.mt-2 .btn-primary {
  min-width: 72px;
  padding: 7px 16px;
  border-color: #4388f4;
  border-radius: 7px;
  background: #4388f4;
  color: white;
  font-weight: 650;
}
body.dark-mode .gmail-detail .gmail-reply > .d-flex.mt-2 .btn-outline-secondary {
  padding: 7px 12px;
  border-color: transparent;
  background: transparent;
  color: #b8c3d2;
}
body.dark-mode .gmail-detail .gmail-reply > .d-flex.mt-2 .btn-outline-secondary:hover { color: #fff; background: #29394d; }
body.dark-mode .gmail-detail .gmail-reply .border.rounded {
  border-color: #3b4652 !important;
  border-radius: 6px !important;
  background: #242d36;
}

/* Harness preferences share the email workspace controls. */
harness-settings { display:block; }
.harness-settings { margin:0 28px 24px; padding:20px; border:0; border-radius:0; background:transparent; color:#edf0f5; }
.harness-title, .harness-server { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.harness-settings h3 { margin:0 0 6px; font-size:18px; }
.harness-settings h4 { margin:0 0 6px; font-size:15px; }
.harness-settings p, .harness-settings small { color:#aab6c5; font-size:13px; line-height:1.5; }
.harness-settings p { margin:4px 0 14px; }
.harness-tabs { display:flex; gap:8px; margin:12px 0 0; overflow-x:auto; border-bottom:1px solid #363e48; }
.harness-tabs button { flex-shrink:0; padding:10px 12px; background:transparent; border:0; border-bottom:2px solid transparent; color:#aab6c5; font-size:14px; }
.harness-tabs button[aria-pressed=true] { color:#70adff; border-bottom-color:#70adff; }
.harness-panel { padding:20px 0; }
.harness-panel[hidden] { display:none; }
.harness-settings label { display:block; margin:0 0 7px; font-size:13px; font-weight:500; }
.harness-settings textarea, .harness-settings input:not([type=checkbox]) { display:block; width:100%; padding:10px 12px; margin:0 0 14px; border:1px solid #46515e; border-radius:7px; background:#252d36; color:#edf0f5; font-family:inherit; font-size:14px; line-height:1.5; }
.harness-settings textarea { resize:vertical; min-height:100px; font-size:14px; line-height:1.5; }
.harness-settings input[type=number] { max-width:240px; }
.harness-settings input[type=checkbox] { flex:none; width:16px; height:16px; accent-color:#4388f4; }
.harness-settings .harness-check { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.harness-secondary, .harness-save { padding:8px 12px; border:1px solid #46515e; border-radius:7px; background:#252d36; color:#edf0f5; font-size:13px; }
.harness-save { background:#4388f4; border-color:#4388f4; }
.harness-settings button:disabled { opacity:.5; }
.harness-settings button:hover:not(:disabled) { border-color:#70adff; }
.harness-settings :is(button,input,textarea):focus-visible { outline:2px solid #70adff; outline-offset:2px; }
.harness-skill { margin:12px 0; padding:16px; border:1px solid #363e48; border-radius:7px; }
.harness-skill .harness-title { margin-bottom:12px; }
.harness-server { padding:14px; margin-bottom:14px; border:1px solid #363e48; border-radius:7px; }
.harness-server p { margin:0; }
.harness-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.harness-settings .harness-tool { display:flex; align-items:flex-start; gap:10px; padding:12px; margin:0; border:1px solid #363e48; border-radius:7px; }
.harness-tool span { min-width:0; }
.harness-tool strong { display:block; font:12px ui-monospace,monospace; overflow-wrap:anywhere; }
.harness-tool small { display:block; margin-top:6px; font-weight:400; font-size:12px; }
.harness-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding-top:16px; border-top:1px solid #363e48; }
.harness-actions [role=status] { color:#aab6c5; font-size:13px; }
.harness-actions .harness-error { color:#ed6b73; }
@media(max-width:700px) { .harness-settings { margin:0 12px 20px; padding:14px; } .harness-tools { grid-template-columns:1fr; } .harness-title, .harness-server { flex-wrap:wrap; } }

.app-settings-page .harness-settings { margin:0 0 24px; padding:0; }
.harness-tabs { margin-top:0; gap:20px; }
.harness-tabs button { padding:10px 4px 13px; }
.harness-actions[hidden] { display:none; }
.harness-tool-option { display:flex!important; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid #363e48; }
.harness-tool-option strong, .harness-tool-option small { display:block; }
.harness-tool-option small { margin-top:5px; font-weight:400; }
.harness-tool-option input { margin-top:3px; }
.harness-tool-option:last-of-type { margin-bottom:20px; }
.app-settings-page .harness-filters .settings-list-heading { padding:0 0 16px; }
.app-settings-page .harness-filters .settings-empty { padding:14px 0; }

.app-settings-page .harness-agents .app-agents-page { margin:0; padding:0!important; width:100%; max-width:none; }
.app-settings-page .harness-agents .app-agents-page > :not(:first-child) { margin-left:0!important; margin-right:0!important; }
.app-settings-page .harness-agents .app-agents-page > .d-flex:first-child { min-height:0; padding:0 0 16px; }

.harness-server-list { display:grid; gap:12px; }
.harness-server-entry { border-bottom:1px solid #363e48; }
.harness-server-entry > summary { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 0; cursor:pointer; }
.harness-server-entry > summary strong, .harness-server-entry > summary small { display:block; overflow-wrap:anywhere; }
.harness-server-entry > summary small { color:#aab6c5; margin-top:4px; }
.harness-server-entry > summary > span:first-child { min-width:0; }
.harness-server-body { padding:8px 0 20px; }
.harness-server-body input:not([type=checkbox]) { display:block; width:100%; }

.email-agent-dialog { width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid #d8e0e9; border-radius:10px; color:#26364f; background:#fff; }
.email-agent-dialog[open] { display:flex; flex-direction:column; }
.email-agent-dialog::backdrop { background:#0008; }
.email-agent-dialog > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:20px 24px; border-bottom:1px solid #363d4640; flex-shrink:0; }
.email-agent-dialog h2 { margin:0; font-size:20px; }
.email-agent-dialog header p { margin:6px 0 0; font-size:13px; overflow-wrap:anywhere; }
.email-agent-close { border:0!important; padding:0 6px!important; background:transparent!important; font-size:24px; }
.email-agent-scroll { overflow-y:auto; min-height:0; padding:20px 24px; }
.email-agent-dialog > form { padding:16px 24px; border-top:1px solid #363d4640; flex-shrink:0; }
.email-agent-dialog textarea { display:block; width:100%; margin-top:8px; padding:10px; border:1px solid #637083; border-radius:6px; resize:vertical; max-height:140px; background:transparent; color:inherit; }
.email-agent-dialog footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:12px; }
.email-agent-dialog button { padding:8px 12px; border:1px solid #4388f4; border-radius:6px; background:#4388f4; color:#fff; cursor:pointer; }
.email-agent-dialog button:disabled { opacity:.55; cursor:default; }
.email-agent-dialog [data-actions] section { padding:14px 0; border-bottom:1px solid #63708350; }
.email-agent-dialog [data-actions] p { margin:0 0 8px; white-space:pre-wrap; }
.email-agent-dialog [data-answer] { white-space:pre-wrap; }
.email-agent-dialog [data-error]:empty { display:none; }
.email-agent-dialog [data-error] { color:#e9828e; padding:16px 18px; margin:16px 0; border:1px solid #a94e5b; border-radius:8px; background:#a72d3d12; font-size:14px; line-height:1.6; overflow-wrap:anywhere; white-space:pre-wrap; }
.email-agent-dialog .chat-run-history { width:100%; margin:0 0 18px; }
.email-agent-dialog .chat-run-copy strong, .email-agent-dialog .chat-step-copy strong { color:inherit; }
body.dark-mode .email-agent-dialog { background:#1b2025; color:#edf0f5; border-color:#363d46; color-scheme:dark; }
body.dark-mode .email-agent-dialog .chat-steps, body.dark-mode .email-agent-dialog .chat-step-details pre { background:#252d36; color:#edf0f5; border-color:#363d46; }
body.dark-mode .email-agent-dialog .chat-step-marker { background:#252d36!important; }
@media(max-width:600px) { .email-agent-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); } .email-agent-dialog > header,.email-agent-dialog > form,.email-agent-scroll { padding:14px; } .email-agent-dialog footer { flex-wrap:wrap; } }

.contact-avatar { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; flex:0 0 40px; border-radius:50%; object-fit:cover; background:#304b70; color:#fff; font-size:14px; font-weight:600; vertical-align:middle; }
.contact-avatar-detail { width:64px; height:64px; flex-basis:64px; font-size:22px; }
.contact-avatar-list { float:left; margin-right:12px; }
.contact-avatar-email { float:left; width:48px; height:48px; margin:0 12px 8px 0; }
.gmail-detail-meta::after { content:''; display:block; clear:both; }
