/* ===== TELEVANS MAIL - CUSTOM THEME ===== */
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Fonte global */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

body.task-login {
  background: linear-gradient(150deg, #1a1f4e 0%, #2d3480 60%, #3d4499 100%) !important;
  min-height: 100vh !important;
}

body.task-login #layout {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  width: 100% !important;
  padding: 2rem !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

body.task-login #layout-content {
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4) !important;
  padding: 2.5rem 2.2rem !important;
  max-width: 420px !important;
  width: 100% !important;
  min-height: unset !important;
  height: auto !important;
  position: relative !important;
  overflow: hidden !important;
  display: block !important;
  border-top: 4px solid #f26522 !important;
}

#login-branding {
  text-align: center !important;
  margin-bottom: 1.5rem !important;
  padding: 0 !important;
}

#logo-televans {
  max-width: 180px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 0.5rem !important;
}

.brand-tagline {
  color: #6b7280 !important;
  font-size: 0.85rem !important;
  margin: 0 !important;
}

#logo { display: none !important; }

#login-form { margin-top: 0 !important; }

body.task-login .input-group {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  margin-bottom: 0.85rem !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  background: #fff !important;
}

body.task-login .input-group:focus-within {
  border-color: #2d3480 !important;
  box-shadow: 0 0 0 3px rgba(45,52,128,0.12) !important;
}

body.task-login .input-group .input-group-prepend {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  background: #f8fafc !important;
  border: none !important;
  border-right: 1.5px solid #e2e8f0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.95rem !important;
}

body.task-login .input-group:focus-within .input-group-prepend {
  border-right-color: #2d3480 !important;
  color: #2d3480 !important;
  background: #eef2ff !important;
}

body.task-login .input-group .input-group-prepend span,
body.task-login .input-group .input-group-prepend .icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

body.task-login .input-group .form-control {
  flex: 1 !important;
  border: none !important;
  border-radius: 0 !important;
  height: 48px !important;
  padding: 0 1rem !important;
  font-size: 0.9rem !important;
  color: #1e293b !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

body.task-login .input-group .form-control::placeholder {
  color: #b0bec5 !important;
  font-weight: 400 !important;
}

body.task-login .input-group-text { display: none !important; }

body.task-login .formbuttons { margin-top: 1rem !important; }

body.task-login .formbuttons .button.mainaction,
body.task-login button[type=submit] {
  background: linear-gradient(135deg, #2d3480, #1a1f4e) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.7rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  width: 100% !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  display: block !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
}

body.task-login .formbuttons .button.mainaction:hover,
body.task-login button[type=submit]:hover {
  background: linear-gradient(135deg, #f26522, #d4541a) !important;
  box-shadow: 0 4px 15px rgba(242,101,34,0.35) !important;
  transform: translateY(-1px) !important;
}

body.task-login #login-form.propform {
  top: 0 !important;
  position: static !important;
}

#login-footer {
  text-align: center !important;
  margin-top: 1.2rem !important;
  color: #9ca3af !important;
  font-size: 0.75rem !important;
}

/* ============================================================
   APP INTERNO - ESTILOS GERAIS
   ============================================================ */

body:not(.task-login) {
  background: #edf0f9 !important;
}

/* ============================================================
   HEADER (barra do topo)
   ============================================================ */
#header {
  background: #1a1f4e !important;
  border-bottom: 3px solid #f26522 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.28) !important;
  min-height: 50px !important;
}

/* ============================================================
   TASKMENU (sidebar vertical de icones)
   ============================================================ */
#taskmenu {
  background: #141840 !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
}

#taskmenu a {
  color: rgba(255,255,255,0.5) !important;
  border-radius: 10px !important;
  margin: 3px 7px !important;
  padding: 10px 6px !important;
  transition: all 0.18s ease !important;
  border-left: none !important;
  font-size: 0.67rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
}

#taskmenu a:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}

#taskmenu a.selected,
#taskmenu a.active {
  background: rgba(242,101,34,0.16) !important;
  color: #f26522 !important;
  border-left: none !important;
  box-shadow: inset 3px 0 0 #f26522 !important;
  border-radius: 0 8px 8px 0 !important;
  margin-left: 0 !important;
  padding-left: 13px !important;
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
#layout {
  background: #edf0f9 !important;
}

#layout-list {
  background: #fff !important;
  border-right: 1px solid #e3e7f4 !important;
  box-shadow: 3px 0 14px rgba(45,52,128,0.07) !important;
}

#layout-content {
  background: #fff !important;
}

/* ============================================================
   BOTAO CRIAR EMAIL (Compose)
   ============================================================ */
a.button.compose,
.button.compose {
  background: linear-gradient(135deg, #f26522 0%, #d94f17 100%) !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 11px 16px !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.4px !important;
  box-shadow: 0 4px 14px rgba(242,101,34,0.35) !important;
  margin: 10px 8px 8px 8px !important;
  width: calc(100% - 16px) !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: none !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

a.button.compose:hover,
.button.compose:hover {
  background: linear-gradient(135deg, #ff7e3a 0%, #f26522 100%) !important;
  box-shadow: 0 6px 20px rgba(242,101,34,0.45) !important;
  transform: translateY(-2px) !important;
  color: #fff !important;
}

/* ============================================================
   LISTA DE PASTAS
   ============================================================ */
.folderlist li > a,
#mailboxlist li > a,
#layout-list .listing li > a {
  color: #374151 !important;
  padding: 9px 12px 9px 14px !important;
  border-radius: 0 9px 9px 0 !important;
  margin: 1px 8px 1px 0 !important;
  font-size: 0.84rem !important;
  font-weight: 400 !important;
  transition: background 0.14s, color 0.14s !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
}

.folderlist li > a:hover,
#mailboxlist li > a:hover,
#layout-list .listing li > a:hover {
  background: #edf0f9 !important;
  color: #2d3480 !important;
}

.folderlist li.selected > a,
#mailboxlist li.selected > a,
#layout-list .listing li.selected > a {
  background: rgba(45,52,128,0.09) !important;
  color: #2d3480 !important;
  font-weight: 600 !important;
  border-left: 3px solid #f26522 !important;
  border-radius: 0 9px 9px 0 !important;
  padding-left: 11px !important;
}

/* ============================================================
   TOOLBAR INTERNA
   ============================================================ */
#toolbar,
.toolbar {
  background: #fff !important;
  border-bottom: 1px solid #e9ecf5 !important;
  padding: 5px 10px !important;
}

.toolbar a,
#toolbar a {
  color: #64748b !important;
  border-radius: 7px !important;
  padding: 6px 10px !important;
  font-size: 0.79rem !important;
  font-weight: 500 !important;
  transition: all 0.14s !important;
  text-decoration: none !important;
}

.toolbar a:hover,
#toolbar a:hover {
  background: #edf0f9 !important;
  color: #2d3480 !important;
}

.toolbar a.selected,
.toolbar a.active,
#toolbar a.selected,
#toolbar a.active {
  background: rgba(45,52,128,0.1) !important;
  color: #2d3480 !important;
}

/* ============================================================
   LISTA DE MENSAGENS
   ============================================================ */
.messagelist {
  background: #fff !important;
  width: 100% !important;
}

.messagelist tbody tr {
  border-bottom: 1px solid #f0f3fb !important;
  cursor: pointer !important;
  transition: background 0.1s !important;
}

.messagelist tbody tr:hover {
  background: #f5f7ff !important;
}

.messagelist tbody tr.selected {
  background: rgba(45,52,128,0.07) !important;
}

.messagelist tbody tr.unread {
  background: #fafaff !important;
}

.messagelist td {
  padding: 10px 8px !important;
  vertical-align: middle !important;
}

.messagelist td.subject a,
.messagelist td.subject .subject-text {
  color: #1e293b !important;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
}

.messagelist tbody tr.unread td.subject a {
  font-weight: 700 !important;
  color: #1a1f4e !important;
}

.messagelist td.from,
.messagelist td.sender {
  color: #64748b !important;
  font-size: 0.8rem !important;
}

.messagelist td.date {
  color: #94a3b8 !important;
  font-size: 0.75rem !important;
  white-space: nowrap !important;
}

/* ============================================================
   AREA DE LEITURA DE EMAIL
   ============================================================ */
.message-header,
.message-header-headers {
  background: #fafbff !important;
  border-bottom: 1px solid #e9ecf5 !important;
  padding: 16px 20px !important;
}

.message-header .subject {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1a1f4e !important;
}

#messagetoolbar {
  background: #fff !important;
  border-bottom: 1px solid #e9ecf5 !important;
}

/* ============================================================
   BOTOES PRINCIPAIS
   ============================================================ */
.button.mainaction,
a.button.mainaction {
  background: linear-gradient(135deg, #2d3480, #1a1f4e) !important;
  color: #fff !important;
  border-radius: 8px !important;
  border: none !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
  text-decoration: none !important;
}

.button.mainaction:hover,
a.button.mainaction:hover {
  background: linear-gradient(135deg, #f26522, #d4541a) !important;
  box-shadow: 0 4px 12px rgba(242,101,34,0.35) !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   COMPOSE
   ============================================================ */
#compose-content {
  background: #fff !important;
}

#compose .header {
  background: #fafbff !important;
  border-bottom: 1px solid #e9ecf5 !important;
}

/* ============================================================
   DIALOGS / MODAIS
   ============================================================ */
.ui-dialog .ui-dialog-titlebar {
  background: linear-gradient(135deg, #2d3480, #1a1f4e) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px 8px 0 0 !important;
}

.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
  color: #fff !important;
}

/* ============================================================
   BADGES
   ============================================================ */
.count {
  background: #f26522 !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  min-width: 18px !important;
  padding: 1px 5px !important;
  line-height: 1.6 !important;
}

/* ============================================================
   SCROLLBAR GLOBAL
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #c8d0e8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
