/* ========================================
   Dato Estratégico - Roundcube Branding
   Matching main site aesthetic (#080e1a)
   ======================================== */

/* --- LOGIN PAGE --- */
body.task-login {
  background: #080e1a;
  min-height: 100vh;
}

body.task-login #layout-content {
  background: #0f1724;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.04);
  max-width: 400px;
  margin: 60px auto;
  padding: 48px 40px 36px;
}

body.task-login #logo {
  display: block;
  max-width: 220px;
  height: auto;
  margin: 0 auto 36px;
}

body.task-login .input-group {
  margin-bottom: 4px;
}

body.task-login .input-group-prepend .input-group-text {
  background: transparent;
  border: none;
  color: #9AABCA;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 0 6px 2px;
}

body.task-login .form-control {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  color: #e0e4ea;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

body.task-login .form-control::placeholder {
  color: #5a6a7e;
}

body.task-login .form-control:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

body.task-login .btn-primary {
  background: #1a2a44;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  margin-top: 12px;
  cursor: pointer;
  color: #e0e4ea;
  transition: background 0.2s ease;
}

body.task-login .btn-primary:hover {
  background: #243555;
}

body.task-login #login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #5a6a7e;
  letter-spacing: 0.5px;
}

/* --- IN-APP SIDEBAR --- */
#layout-menu {
  background: #080e1a;
}

#layout-menu .popover-header #logo {
  max-width: 140px;
  height: auto;
  margin: 12px auto;
  display: block;
}

#layout-menu .popover-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#layout-menu #taskmenulink {
  color: rgba(255, 255, 255, 0.75);
}

.task-button,
#layout-menu .menu.toolbar a {
  color: #6a7a8e;
  transition: color 0.2s ease, background 0.2s ease;
}

.task-button:hover,
#layout-menu .menu.toolbar a:hover {
  color: #9AABCA;
  background: rgba(255, 255, 255, 0.04);
}

#layout-menu .menu.toolbar a.selected {
  color: #9AABCA;
  background: rgba(255, 255, 255, 0.06);
}

#layout-menu .menu.toolbar a.logout:hover {
  color: #e05a5a;
}

/* --- MAIN APP HEADERS --- */
#layout-sidebar .header,
#layout-list .header,
#layout-content .header {
  background: #0f1724;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-title {
  color: #9AABCA;
  font-weight: 500;
  font-size: 14px;
}

/* --- SIDEBAR LIST HEADER (inbox label) --- */
#layout-sidebar {
  background: #0a101e;
}

#layout-list {
  background: #0c1322;
}

#layout-content {
  background: #0f1724;
}

/* --- BUTTONS --- */
.btn-primary {
  background: #1a2a44;
  border-color: rgba(255, 255, 255, 0.08);
  color: #e0e4ea;
}

.btn-primary:hover {
  background: #243555;
  border-color: rgba(255, 255, 255, 0.12);
}

a.button.icon,
.menu a.icon {
  color: #6a7a8e;
}

a.button.icon:hover,
.menu a.icon:hover {
  color: #9AABCA;
}

/* --- LISTINGS (message list, folder list) --- */
.listing {
  color: #c8d0d8;
}

.listing li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.listing li.selected {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #9AABCA;
}

.listing li.selected > span {
  color: #e0e4ea;
}

.listing li.unread > span {
  font-weight: 600;
  color: #e0e4ea;
}

.listing li.selected.unread > span {
  color: #e0e4ea;
}

.listing thead tr td {
  background: #0c1322;
  color: #5a6a7e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- QUOTA --- */
.quota-widget .bar {
  background: rgba(255, 255, 255, 0.06);
}

.quota-widget .bar > div {
  background: #9AABCA;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* --- TASK SELECTOR (bottom of sidebar) --- */
#layout-menu .menu.toolbar a,
.task-button {
  font-size: 13px;
}

/* --- COMPOSE PAGE --- */
.task-mail.action-compose .btn-primary {
  background: #1a2a44;
  border-color: rgba(255, 255, 255, 0.08);
}

.task-mail.action-compose .btn-primary:hover {
  background: #243555;
}

/* --- SETTINGS --- */
.settings .propform {
  color: #c8d0d8;
}

.settings .propform .propfield input,
.settings .propform .propfield select,
.settings .propform .propfield textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e0e4ea;
}

.settings .propform .propfield input:focus,
.settings .propform .propfield select:focus,
.settings .propform .propfield textarea:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* --- MESSAGE DETAILS --- */
.message-part {
  color: #c8d0d8;
}

#message-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- POPUP MENUS --- */
.popupmenu,
.popover-content {
  background: #0f1724;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.popupmenu .menu.listing li {
  color: #9AABCA;
}

.popupmenu .menu.listing li:hover,
.popupmenu .menu.listing li.active {
  background: rgba(255, 255, 255, 0.04);
}

/* --- SEARCH --- */
.searchbar {
  background: #0a101e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.searchbar input,
#mailsearchform input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e0e4ea;
}

.searchbar input:focus,
#mailsearchform input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- FOOTER --- */
#layout-footer {
  color: #5a6a7e;
  font-size: 12px;
}

/* --- PAGINATION --- */
.pagenav {
  background: #0c1322;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pagenav a.button {
  color: #6a7a8e;
}

.pagenav a.button:hover {
  color: #9AABCA;
}

/* --- DARK MODE SYNC (already dark, just ensure consistency) --- */
.dark-mode body.task-login {
  background: #080e1a;
}

.dark-mode .listing thead tr td {
  color: #5a6a7e;
}
