/* === iCirus Full Theme for CheckMK === */
:root {
  --icirus-black: #0B0B0B;
  --icirus-dark: #111111;
  --icirus-panel: #161616;
  --icirus-gold: #c9a84c;
  --icirus-gold-dim: rgba(201,168,76,0.08);
  --icirus-border: rgba(201,168,76,0.2);
  --icirus-white: #f5f0e8;
  --icirus-muted: rgba(255,255,255,0.45);
}

/* === HIDE ALL CHECKMK BRANDING === */
a[href*="checkmk.com"],
a[href*="checkmk.org"],
a[href*="tribe29.com"] { display: none !important; }
body.login #foot { display: none !important; }
#login_window #version { display: none !important; }
#login_window .login_window_logo_link { pointer-events: none !important; cursor: default !important; }
#login_window .login_window_logo_link img { content: url('/local/themes/icirus/images/logo.png') !important; }
#side_version a { color: transparent !important; pointer-events: none !important; position: relative; }
#side_version a::after { content: 'iCirus Monitor'; color: #c9a84c; position: absolute; left: 0; top: 0; width: 100%; }
#main_menu li a[href*="checkmk"] { display: none !important; }
#main_menu li a[href*="tribe29"] { display: none !important; }

/* === GLOBAL STYLES === */
body, html { background: #0B0B0B !important; color: #f5f0e8 !important; }
body.main { background: #1c2228 !important; }
body.login { background: #0B0B0B !important; background-image: linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px) !important; background-size: 60px 60px !important; }

/* === LOGIN PAGE === */
#login_window { background: #111111 !important; border: 1px solid rgba(201,168,76,0.2) !important; border-radius: 0 !important; }
body.login #_login { background-color: #c9a84c !important; color: #0B0B0B !important; border: none !important; }
body.login #_login:hover { opacity: 0.85 !important; }
body.login input[type=text], body.login input[type=password] { background: #161616 !important; border: 1px solid rgba(201,168,76,0.2) !important; color: #f5f0e8 !important; }
body.login input:focus { border-color: #c9a84c !important; }

/* === NAVIGATION === */
body.side { background: #111111 !important; }
#check_mk_navigation { background: #111111 !important; border-right: 1px solid rgba(201,168,76,0.2) !important; }
#main_menu div.popup_trigger { border-left-color: #111111 !important; }
#main_menu div.popup_trigger.active, #main_menu div.popup_trigger:hover { border-left-color: #c9a84c !important; }
#main_menu div.popup_trigger.active { background-color: #161616 !important; }
#main_menu div.popup_trigger div.popup_menu { background-color: #111111 !important; border-right: 4px solid #c9a84c !important; }
#main_menu div.popup_trigger div.popup_menu div.navigation_bar { border-bottom-color: #1e1e1e !important; }
#main_menu div.popup_trigger div.popup_menu div.content.inner div.topic { border-right-color: #1e1e1e !important; }
#main_menu div.popup_trigger div.popup_menu div.content.inner div.topic ul a:hover { color: #c9a84c !important; }
#main_menu div.popup_trigger div.popup_menu div.content.inner div.topic li a.active { color: #c9a84c !important; }
#main_menu div.popup_trigger.active a.popup_trigger { color: #c9a84c !important; }
#side_header { background: #111111 !important; border-bottom: 1px solid rgba(201,168,76,0.2) !important; }
#check_mk_sidebar { background: #111111 !important; }
body.side div.snapin { background: #111111 !important; }

/* === TOP HEADER === */
body.main table.header { background: #111111 !important; border-bottom: 1px solid rgba(201,168,76,0.2) !important; }
div#top_heading div.titlebar { background-color: #111111 !important; }
div#top_heading table.menubar { background-color: #111111 !important; }
div#top_heading table.menubar td.shortcuts { background-color: #0B0B0B !important; }
div#top_heading table.menubar td.menues div.menucontainer { background-color: #0B0B0B !important; border-bottom-color: #0B0B0B !important; }
div#top_heading table.menubar td.menues div.menucontainer:hover { border-bottom-color: #c9a84c !important; }
div#top_heading table.menubar td.menues div.menucontainer div.menu { background-color: #111111 !important; }
div#top_heading table.menubar td.menues div.menucontainer div.menu div.topic div.entry.enabled a:hover { color: #c9a84c !important; }
div#top_heading tr#suggestions { background-color: #111111 !important; }
div#top_heading tr#suggestions td div.suggestion a { background-color: #0B0B0B !important; border-color: rgba(201,168,76,0.2) !important; }
div#top_heading tr#suggestions td div.suggestion a:hover { background-color: #1e1e1e !important; }

/* === CONTENT === */
body.main { background: #1c2228 !important; }
#main_page_content { background: #0B0B0B !important; }
#content_area { background: #0B0B0B !important; }

/* === TABLES === */
table.data { color: #f5f0e8 !important; }
table.data th { background-color: #111111 !important; color: #c9a84c !important; letter-spacing: 1px !important; }
table.data th.sort:hover { color: #f5f0e8 !important; }
tr[class*=odd] { background-color: #111111 !important; }
tr[class*=even] { background-color: #161616 !important; }
table.data tr.data:hover td { background: rgba(201,168,76,0.05) !important; }
table.groupheader { background-color: #161616 !important; }
table.data td.fillup, table.data tr td.gap { background: #111111 !important; border-color: #111111 !important; }

/* === BUTTONS === */
button, input.button { background-color: #c9a84c !important; color: #0B0B0B !important; border-color: #c9a84c !important; font-weight: 600 !important; }
button:hover, input.button:hover { opacity: 0.85 !important; }
button.hot, input.button.hot { background-color: #c9a84c !important; color: #0B0B0B !important; }

/* === FORMS === */
input[type=text], input[type=password], select, textarea { background-color: #161616 !important; border-color: rgba(201,168,76,0.2) !important; color: #f5f0e8 !important; }
input:focus, select:focus, textarea:focus { border-color: #c9a84c !important; outline: none !important; }

/* === NFORM === */
table.nform { background: #111111 !important; }
table.nform tr.heading td { background-color: #161616 !important; color: #c9a84c !important; }
table.nform hr { background-color: rgba(201,168,76,0.2) !important; }

/* === DASHBOARD === */
div.dashlet div.dashlet_inner { background-color: #111111 !important; }
div.dashlet div.dashlet_inner.background { background-color: #111111 !important; }
div.dashlet > div.title { background: #111111 !important; color: #c9a84c !important; }
div.dashlet > div.title.highlighted { background: #161616 !important; }

/* === SIDEBAR SNAPINS === */
div.snapin div.head b.heading { color: #c9a84c !important; }
div.snapin div.content { border-bottom-color: rgba(201,168,76,0.2) !important; }
div.snapin a { color: #f5f0e8 !important; }
div.snapin a:hover { color: #c9a84c !important; }

/* === POPUP MENUS === */
body.main .popup_menu { background-color: #111111 !important; border-color: rgba(201,168,76,0.2) !important; }
body.main .popup_menu a:hover { color: #c9a84c !important; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111111; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c9a84c; }

/* === LINKS === */
body.main a, body.main a:link, body.main a:visited { color: #f5f0e8 !important; }
body.main a:hover { color: #c9a84c !important; }

/* === FIX LOGIN PAGE LAYOUT === */
body.login {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
}

body.login div#login {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  right: auto !important;
  margin: auto !important;
  width: 400px !important;
  height: auto !important;
}

#login_window {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0 auto !important;
  width: 380px !important;
  padding: 40px !important;
  background: #111111 !important;
  border: 1px solid rgba(201,168,76,0.2) !important;
  border-radius: 0 !important;
}

/* === iCirus LOGO ON LOGIN === */
#login_window::before {
  content: '' !important;
  display: block !important;
  background-image: url('/local/themes/icirus/images/logo.png') !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  background-position: center !important;
  width: 100% !important;
  height: 60px !important;
  margin-bottom: 20px !important;
}

/* Hide original logo link */
#login_window .login_window_logo_link {
  display: none !important;
}

/* Style login title */
#login_window h1 {
  color: #c9a84c !important;
  font-size: 1.2rem !important;
  text-align: center !important;
  margin-bottom: 20px !important;
  letter-spacing: 0.1em !important;
}

/* Force favicon via CSS - backup method */
link[rel="icon"] { display: none !important; }
