/* TravelDesk 360 — Custom Roundcube Skin
   Brand: Plus Jakarta Sans, Slate-900 sidebar, Blue accent
   -------------------------------------------------------- */

/* ── Font ── */
body,
html,
input,
textarea,
select,
button,
.btn,
.form-control {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

/* ── Sidebar container (layout-menu) ── */
#layout-menu {
    background-color: #0f172a !important;
    width: 110px !important;
}

/* ── Logo área no topo do sidebar ── */
#layout-menu .popover-header {
    background-color: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
    height: auto !important;
    min-height: 58px !important;
    padding: 10px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#layout-menu .popover-header #logo {
    max-width: 94px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ── Task Menu (left navigation bar) ── */
#taskmenu {
    background-color: #0f172a !important;
    border-right: none !important;
}

#taskmenu a {
    width: 110px !important;
    font-size: 0.78rem !important;
}

#taskmenu span.inner {
    display: block !important;
    font-size: 0.78rem !important;
    padding: 0 0.2em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#taskmenu .special-buttons {
    background-color: #0f172a !important;
    border-top: 1px solid #1e293b !important;
    width: 110px !important;
}

#taskmenu a {
    color: #cbd5e1 !important;
    border-radius: 8px !important;
    margin: 2px 6px !important;
}

#taskmenu a:hover,
#taskmenu a.selected {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

#taskmenu a.active,
#taskmenu a.selected {
    background-color: #1e3a5f !important;
    color: #93c5fd !important;
}

#taskmenu a.logout {
    color: #f87171 !important;
}

#taskmenu a.logout:hover {
    background-color: #1e293b !important;
    color: #fca5a5 !important;
}

/* ── Header bar ── */
#layout-header,
#header,
.header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

/* ── Toolbar buttons ── */
.toolbar a,
.toolbar button,
.toolbar .btn {
    color: #475569 !important;
}

.toolbar a:hover,
.toolbar button:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

/* ── Primary buttons (Bootstrap .btn-primary) ── */
.btn-primary,
.button.primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.btn-primary:hover,
.button.primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.btn-primary:focus,
.btn-primary:active {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
}

/* ── Secondary/default buttons ── */
.btn-secondary,
.btn-default {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

.btn-secondary:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

/* ── Links ── */
a {
    color: #2563eb !important;
}

a:hover {
    color: #1d4ed8 !important;
}

/* ── Sidebar (folder list) ── */
#sidebar,
#folderlist-content,
.foldertree {
    background-color: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}

/* ── Message list ── */
#messagelist,
#contactlist,
#layout-list {
    background-color: #ffffff !important;
}

#messagelist .selected,
#contactlist .selected,
.listing tr.selected td {
    background-color: #eff6ff !important;
    color: #1e3a5f !important;
}

.listing tr.selected td a {
    color: #1e3a5f !important;
}

.listing tr:hover td {
    background-color: #f8fafc !important;
}

/* ── Search bar ── */
#searchbar,
.searchbar {
    background-color: #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

#searchbar .input-group-text {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

/* ── Form controls ── */
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

/* ── Unread message indicator ── */
.listing td.subject span.unread,
.listing td.subject a {
    font-weight: 600 !important;
}

/* ── Content area ── */
#layout-content,
#message-content,
.message-htmlpart {
    background-color: #ffffff !important;
}

/* ── Login page ── */
body.task-login {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%) !important;
}

body.task-login #layout {
    justify-content: center !important;
    align-items: center !important;
}

body.task-login #layout-content {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4) !important;
    padding: 0 !important;
    max-width: 420px !important;
    width: 92% !important;
    margin: auto !important;
    text-align: left !important;
    display: block !important;
    overflow: hidden !important;
}

/* Bloco de logo escuro no topo do card */
body.task-login .td360-login-logo {
    background-color: #0f172a !important;
    padding: 2rem 2rem 1.5rem !important;
    text-align: center !important;
    margin: 0 !important;
}

body.task-login #logo {
    display: block !important;
    margin: 0 auto 0.75rem auto !important;
    max-width: 220px !important;
    max-height: none !important;
    height: auto !important;
    position: static !important;
    top: auto !important;
}

/* Tagline dentro do bloco escuro */
body.task-login .td360-login-tagline {
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
    letter-spacing: 0.03em !important;
}

/* Área do formulário (branca) */
body.task-login #login-form {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1.75rem 2rem !important;
    position: static !important;
    top: auto !important;
}

body.task-login #login-footer {
    color: #64748b !important;
    font-size: 0.8rem !important;
    text-align: center !important;
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e2e8f0 !important;
}

body.task-login .form-control {
    border-color: #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.925rem !important;
}

body.task-login .formbuttons .btn,
body.task-login #login-form [type="submit"] {
    width: 100% !important;
    padding: 0.65rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    margin-top: 0.5rem !important;
}

body.task-login .formbuttons .btn:hover,
body.task-login #login-form [type="submit"]:hover {
    background-color: #1d4ed8 !important;
}

/* ── Compose window ── */
#compose-content {
    background-color: #ffffff !important;
}

/* ── Dialogs / Modals ── */
.ui-dialog {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}

.ui-dialog .ui-dialog-titlebar {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-radius: 9px 9px 0 0 !important;
    padding: 0.85rem 1rem !important;
}

.ui-dialog .ui-dialog-title {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
}

.ui-dialog .ui-button.ui-dialog-titlebar-close {
    color: #94a3b8 !important;
}

/* ── Notifications / Toasts ── */
#messagestack .notice {
    border-left: 4px solid #2563eb !important;
    background-color: #eff6ff !important;
}

#messagestack .error {
    border-left: 4px solid #ef4444 !important;
    background-color: #fef2f2 !important;
}

#messagestack .confirmation {
    border-left: 4px solid #22c55e !important;
    background-color: #f0fdf4 !important;
}

/* ── Badges / Pills ── */
.badge-primary,
.count {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* ── Folder tree counts ── */
.foldertree .branch a .unreadcount {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
}

/* ── Tabbar ── */
.tabhead,
.tabsbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.tabhead a.selected,
.tabsbar a.selected {
    border-bottom: 2px solid #2563eb !important;
    color: #2563eb !important;
}

/* ── Scrollbars (webkit) ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Responsive / Mobile ── */
@media screen and (max-width: 768px) {
    body.task-login #layout-content {
        border-radius: 0 !important;
        min-height: 100vh !important;
        max-width: 100% !important;
        box-shadow: none !important;
    }
}
