/* ZISEro — global green DARK theme for Roundcube Elastic.
   Scoped strictly to html.dark-mode → light mode is untouched.
   First pass: palette + form basics (per agreed scope). Iterative.
   Loaded globally (all tasks) by the zisero_theme plugin, AFTER Elastic's CSS.
   !important is used deliberately to win over Elastic's more specific rules. */

/* ---- base surfaces ---- */
html.dark-mode body,
html.dark-mode #layout {
  background-color:#111513 !important;
  color:#e6ebe8 !important;
}
html.dark-mode #layout-menu,
html.dark-mode .taskmenu,
html.dark-mode #taskmenu {
  background-color:#0c100e !important;
}
html.dark-mode #layout-sidebar,
html.dark-mode #layout-list,
html.dark-mode .sidebar,
html.dark-mode .listing,
html.dark-mode .scroller {
  background-color:#161b18 !important;
}
html.dark-mode #layout-content,
html.dark-mode .content,
html.dark-mode .formcontent,
html.dark-mode .box,
html.dark-mode .boxcontent,
html.dark-mode .uibox,
html.dark-mode .popupmenu,
html.dark-mode .menu {
  background-color:#1b211e !important;
}
html.dark-mode .toolbar,
html.dark-mode .header,
html.dark-mode .footer,
html.dark-mode .boxtitle,
html.dark-mode .formtitle,
html.dark-mode .pagenav {
  background-color:#1b211e !important;
  color:#f4f8f6 !important;
}

/* ---- text + borders ---- */
html.dark-mode,
html.dark-mode .listing td,
html.dark-mode p,
html.dark-mode label {
  color:#e6ebe8 !important;
}
html.dark-mode .hint,
html.dark-mode .subtitle,
html.dark-mode .voice,
html.dark-mode .help-block {
  color:#abb5af !important;
}
html.dark-mode hr,
html.dark-mode .listing tr,
html.dark-mode .listing td,
html.dark-mode table td,
html.dark-mode table th,
html.dark-mode .box,
html.dark-mode .formcontent,
html.dark-mode fieldset,
html.dark-mode .propform tr {
  border-color:#2f3a35 !important;
}

/* ---- accent: links + selection ---- */
html.dark-mode a,
html.dark-mode .btn-link,
html.dark-mode a.btn-link,
html.dark-mode .listing .subject a {
  color:#78c69a !important;
}
html.dark-mode #taskmenu a.selected,
html.dark-mode #taskmenu a:hover,
html.dark-mode .listing li.selected,
html.dark-mode .listing tr.selected,
html.dark-mode .listing li.selected > a,
html.dark-mode .selected > a,
html.dark-mode .menu a.active {
  background-color:#1a2b22 !important;
  color:#a9e0c1 !important;
}

/* ---- buttons ---- */
html.dark-mode .btn.primary,
html.dark-mode .btn-primary,
html.dark-mode button.primary,
html.dark-mode input.button.mainaction,
html.dark-mode .formbuttons .submit {
  background-color:#1f7a4d !important;
  border-color:#1f7a4d !important;
  color:#ffffff !important;
}
html.dark-mode .btn.primary:hover,
html.dark-mode .btn-primary:hover:not(:disabled) {
  background-color:#25925c !important;
  border-color:#25925c !important;
}
html.dark-mode .btn,
html.dark-mode .button,
html.dark-mode button {
  background-color:#232b27 !important;
  border-color:#323b36 !important;
  color:#e6ebe8 !important;
}

/* ---- form controls ---- */
html.dark-mode input:not([type=checkbox]):not([type=radio]),
html.dark-mode select,
html.dark-mode textarea,
html.dark-mode .form-control {
  background-color:#161b18 !important;
  color:#e6ebe8 !important;
  border-color:#323b36 !important;
}
html.dark-mode input:focus,
html.dark-mode select:focus,
html.dark-mode textarea:focus,
html.dark-mode .form-control:focus {
  border-color:#5fbf85 !important;
  box-shadow:0 0 0 2px rgba(95,191,133,.25) !important;
}
html.dark-mode *:focus-visible {
  outline-color:#5fbf85 !important;
}
/* checked checkboxes/radios accent */
html.dark-mode input[type=checkbox]:checked,
html.dark-mode input[type=radio]:checked {
  accent-color:#5fbf85 !important;
}

/* scrollbars */
html.dark-mode { scrollbar-color:#3fa968 #262e2a !important; }
html.dark-mode:not(.touch) ::-webkit-scrollbar-thumb { background-color:#3fa968 !important; }
html.dark-mode:not(.touch) ::-webkit-scrollbar-track { background-color:#262e2a !important; }
