/* ===================== Pro Chat Desk Mail: modern app look ===================== */
html, body, .popupmenu, .ui-dialog, input, select, textarea, button { font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif !important; }
body:not(.task-login), body:not(.task-login) #layout { background: #f3f5fa !important; color: #0f172a; }

/* left app rail: light */
#layout-menu { background: #fff !important; border-right: 1px solid #e5e7eb !important; }
#layout-menu .popover-header { background: #fff !important; }
#layout-menu #logo { filter: none !important; }
#layout-menu a, #layout-menu a:before, #taskmenu a, #taskmenu a:before { color: #64748b !important; }
#taskmenu a { border-radius: 12px; margin: 2px 8px; }
#taskmenu a:hover { background: #f1f5f9 !important; color: #4f46e5 !important; }
#taskmenu a:hover:before { color: #4f46e5 !important; }
#taskmenu a.selected, #taskmenu a.selected:before { background: #eef2ff !important; color: #4f46e5 !important; }
#taskmenu a.compose { background: linear-gradient(135deg,#6366f1,#4f46e5) !important; color: #fff !important; }
#taskmenu a.compose:before { color: #fff !important; }
#taskmenu a.theme { display: none !important; }

/* New mail button */
.pcd-newbar { padding: 14px 14px 6px; }
.pcd-new { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 14px; background: linear-gradient(135deg,#6366f1,#4f46e5); color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none !important; box-shadow: 0 10px 22px -10px rgba(79,70,229,.7); transition: transform .12s, box-shadow .12s; }
.pcd-new:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(79,70,229,.8); color: #fff !important; }

/* column headers */
#layout-sidebar > .header, #layout-list > .header, #layout-content > .header { background: #fff !important; border-bottom: 1px solid #eef0f4 !important; }
.header-title { font-weight: 700 !important; color: #0f172a !important; }
#layout-sidebar .header .header-title.username { font-size: 13px; color: #64748b !important; font-weight: 500 !important; }

/* folder list */
#layout-sidebar, #layout-list, #layout-content { background: #fff !important; }
#folderlist-content .treelist li a, #settings-menu li a { border-radius: 10px; margin: 1px 10px; color: #334155 !important; }
#folderlist-content .treelist li:hover > div > a, #folderlist-content .treelist li:hover > a, #settings-menu li:hover a { background: #f5f7fb !important; }
#folderlist-content .treelist li.selected > a, #folderlist-content .treelist li.selected > div > a, #settings-menu li.selected a { background: #eef2ff !important; color: #4338ca !important; font-weight: 600; }
#folderlist-content .treelist li.selected > a:before, #folderlist-content .treelist li.selected > div > a:before { color: #4f46e5 !important; }
#folderlist-content .treelist li, #settings-menu li { border: 0 !important; background: transparent !important; }
.treelist .unreadcount, #folderlist-content .unreadcount { background: #4f46e5 !important; color: #fff !important; border-radius: 999px !important; padding: 0 8px !important; font-weight: 600; }

/* search */
#mailsearchform input, .searchbar input { background: #f3f5fa !important; border-radius: 12px !important; border: 1px solid transparent !important; }
#mailsearchform input:focus, .searchbar input:focus { background: #fff !important; border-color: #c7d2fe !important; }

/* message list */
#messagelist tr td { border-bottom: 1px solid #f1f3f7 !important; }
#messagelist tr:hover td { background: #f8fafc; }
#messagelist tr.selected td, #messagelist tr.selected:hover td { background: #eef2ff !important; color: #1e1b4b !important; }
#messagelist tr.focused td { outline: none !important; }
#messagelist tr.unread td.subject .subject a, #messagelist tr.unread .fromto, #messagelist tr.unread .adr { color: #0f172a !important; font-weight: 700 !important; }
#messagelist td.subject { position: relative; }
#messagelist tr.unread td.subject:after { content: ""; position: absolute; left: 5px; top: 50%; width: 7px; height: 7px; margin-top: -3px; border-radius: 50%; background: #4f46e5; }
#messagelist td.pcd-has-av { padding-left: 64px !important; }
#messagelist .pcd-av { position: absolute; left: 16px; top: 50%; margin-top: -19px; }
#messagelist .date { color: #94a3b8 !important; font-size: 12px !important; }
#messagelist .subject a, #messagelist .subject span { color: #475569; }

/* avatars */
.pcd-av { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .3px; flex: none; line-height: 1; }
.pcd-av-lg { width: 46px; height: 46px; font-size: 16px; }
#message-header .pcd-av.contactphoto { width: 46px !important; height: 46px !important; border: 0 !important; border-radius: 50% !important; display: inline-flex !important; padding: 0 !important; }

/* reading pane */
#messagebody, #message-content, #message-header { background: #fff !important; }
#message-header { border-bottom: 1px solid #eef0f4 !important; padding-bottom: 12px !important; }
#message-header h2.subject { font-size: 1.35rem !important; font-weight: 700 !important; color: #0f172a !important; }
#message-header a.rcmContactAddress { color: #0f172a !important; font-weight: 600; }
#message-objects .notice, #message-objects .warning, .boxinformation, .boxwarning { border-radius: 12px !important; }

/* toolbar */
.toolbar a.button, .toolbar a.button:before { color: #475569 !important; }
.toolbar a.button { border-radius: 10px; }
.toolbar a.button:not(.disabled):hover, .toolbar a.button:not(.disabled):hover:before { color: #4f46e5 !important; background: #f1f5f9; }
.toolbar a.button.disabled, .toolbar a.button.disabled:before { color: #cbd5e1 !important; }

/* dialogs, menus, inputs */
.popover, .ui-dialog { border-radius: 14px !important; border: 1px solid #e5e7eb !important; box-shadow: 0 20px 45px -15px rgba(15,23,42,.25) !important; }
.ui-dialog .ui-dialog-titlebar { border-bottom: 1px solid #eef0f4 !important; }
.btn, button.btn, .ui-dialog .ui-dialog-buttonset .btn { border-radius: 10px !important; }
.form-control, .custom-select { border-radius: 10px !important; }

/* compose */
.recipient-input .recipient { background: #eef2ff !important; color: #3730a3 !important; border-radius: 999px !important; border: 0 !important; }
.tox-tinymce { border-radius: 12px !important; }

/* settings / contacts */
.records-table tr.selected td { background: #eef2ff !important; }

/* floating cards on big screens */
@media (min-width: 1200px) {
  #layout-sidebar, #layout-list, #layout-content { margin: 12px 0 12px 12px; border-radius: 18px; border: 1px solid #e8ebf1 !important; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -16px rgba(15,23,42,.18); overflow: hidden; }
  #layout-content { margin-right: 12px; }
}
@media (max-width: 768px) {
  .pcd-newbar { display: none; }
  #messagelist td.pcd-has-av { padding-left: 58px !important; }
  #messagelist .pcd-av { left: 12px; }
}

/* polish */
#messagelist .pcd-av, .pcd-av { color: #fff !important; font-weight: 700 !important; }
#layout-menu .special-buttons, #layout-menu .special-buttons a, #layout-menu a.logout { background: #fff !important; color: #64748b !important; }
#layout-menu a.logout:hover, #layout-menu a.logout:hover:before { color: #dc2626 !important; background: #fef2f2 !important; }
html.pcd-desk body.task-mail #taskmenu a.compose { display: none !important; }
.floating-action-buttons a.button, .floating-action-buttons a.button.compose { background: linear-gradient(135deg,#6366f1,#4f46e5) !important; color: #fff !important; box-shadow: 0 10px 22px -8px rgba(79,70,229,.7) !important; }
.btn-secondary, .btn.btn-secondary, a.btn-secondary { background: #eef2ff !important; color: #4338ca !important; border-color: #c7d2fe !important; }
.btn-secondary:before { color: #4338ca !important; }
.formbuttons a:not(.btn), #message-header a:not(.rcmContactAddress), #compose-content a:not(.btn):not(.button), .boxinformation a, .propform a:not(.btn) { color: #4f46e5 !important; }
.recipient-input.focus, .form-control.focus, .recipient-input:focus-within { border-color: #4f46e5 !important; box-shadow: 0 0 0 3px #e0e7ff !important; }
#messagebody div.pre, div.message-part div.pre { font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif !important; font-size: 14.5px !important; line-height: 1.6 !important; color: #1e293b; }
#message-header .contactphoto.pcd-photo .pcd-av { width: 46px !important; height: 46px !important; }
.btn-link, a.btn-link, .btn-link:before { color: #4f46e5 !important; }
#message-header .pcd-av.contactphoto { margin-right: 14px !important; }
@media (min-width: 1200px) { body.task-login #layout-content { margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; } }
