/*
 * Base structure
 */

html {
  position: relative;
  min-height: 100%;
}

/* Move down content because we have a fixed navbar that is 50px tall */
body {
  padding-top: 50px;
  margin-bottom: 60px;
}

a.tip {
  text-decoration: none;
}  

a.tip:hover {
  position             : relative;
}  

a.tip span {
  display              : none
}  

a.tip:hover span {
  background: #000000;
  opacity: 0.8;
  border: none;
  border-radius: 5px 5px 5px 5px;
  font-family: calibri, verdana, arial, comic sans;
  font-size: 12pt;
  text-decoration: none;
  white-space: nowrap;
  color: #FFFFFF;
  padding: 6px 6px 6px 6px;
  margin: 10px;
  display: block;
  z-index: 50; 
  position: absolute;
  top: 10px;
}  


/*
 * Global add-ons
 */

.sub-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/*
 * Top navigation
 * Hide default border to remove 1px line.
 */
.navbar-fixed-top {
  border: 0;
}

.navbar-info {
  padding: 15px;
  color: #9d9d9d;
}

/*
 * Sidebar
 */

/* Hide for mobile, show later */
.sidebar {
  display: none;
}
@media (min-width: 768px) {
  .sidebar {
    position: fixed;
    top: 51px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
    background-color: #f5f5f5;
    border-right: 1px solid #eee;
  }
}

/* Sidebar navigation */
.nav-sidebar {
  margin-right: -21px; /* 20px padding + 1px border */
  margin-bottom: 20px;
  margin-left: -20px;
}
.nav-sidebar > li > a {
  padding-right: 20px;
  padding-left: 20px;
}
.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  color: #fff;
  background-color: #428bca;
}


/*
 * Main content
 */

 
.main {
  padding: 20px;
  /*background-color: #003366;
  color: #fff;*/
}
@media (min-width: 768px) {
  .main {
    padding-right: 40px;
    padding-left: 40px;
  }
}
.main .page-header {
  margin-top: 0;
}


/*
 * Tables
 */

.table-flag {
  height: 15px;
}

.table-status {
  height: 25px;
  
}

.table-head {
  font-weight: bold;
}

.table-center * {
  text-align: center !important;
}

/*
 * Footer
 */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 61px;
  background-color: #f5f5f5;
  padding-left: 20%;
  border-top: 1px solid #eee;
}

.footer p {
  text-align: center;
  margin-top: 10px;
}

/*
 * Theme support (light / dark)
 * Added in 2.3.7-sec1-theme1
 */
:root {
  color-scheme: light;
}

body,
.sidebar,
.footer,
.table,
.table > tbody > tr > td,
.table > tbody > tr > th,
.table > thead > tr > td,
.table > thead > tr > th,
input,
button,
select,
textarea {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.theme-toggle {
  margin: 8px 10px 0 8px;
  min-width: 102px;
}

.theme-toggle .theme-icon {
  display: inline-block;
  width: 18px;
  text-align: center;
  margin-right: 4px;
}

.modules-overview-row-even {
  background-color: #ffffff;
}

.modules-overview-row-odd {
  background-color: #f5f5f5;
}

.modules-overview-row-even:hover,
.modules-overview-row-odd:hover {
  background-color: #f5f5f5;
}

/* Dark theme */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background-color: #181a1b;
  color: #e8e6e3;
}

html[data-theme="dark"] a {
  color: #70b7ff;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
  color: #a8d3ff;
}

html[data-theme="dark"] .navbar-inverse {
  background-color: #111315;
  border-color: #2f3336;
}

html[data-theme="dark"] .navbar-inverse .navbar-brand,
html[data-theme="dark"] .navbar-info {
  color: #d7d7d7;
}

html[data-theme="dark"] .sidebar {
  background-color: #202326;
  border-right-color: #34383c;
}

html[data-theme="dark"] .nav-sidebar > li > a {
  color: #d8d8d8;
}

html[data-theme="dark"] .nav-sidebar > li > a:hover,
html[data-theme="dark"] .nav-sidebar > li > a:focus {
  background-color: #2c3135;
  color: #ffffff;
}

html[data-theme="dark"] .nav-sidebar > .active > a,
html[data-theme="dark"] .nav-sidebar > .active > a:hover,
html[data-theme="dark"] .nav-sidebar > .active > a:focus {
  background-color: #286090;
  color: #ffffff;
}

html[data-theme="dark"] .sub-header,
html[data-theme="dark"] .page-header {
  border-bottom-color: #3a3f43;
}

html[data-theme="dark"] .table {
  color: #e8e6e3;
}

html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > tbody > tr > th,
html[data-theme="dark"] .table > tfoot > tr > th,
html[data-theme="dark"] .table > thead > tr > td,
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table > tfoot > tr > td,
html[data-theme="dark"] .table-center th,
html[data-theme="dark"] .table-center td {
  border-color: #3a3f43;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #202326;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #181a1b;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] .modules-overview-row-even:hover,
html[data-theme="dark"] .modules-overview-row-odd:hover {
  background-color: #2b3034;
}

html[data-theme="dark"] .modules-overview-row-even {
  background-color: #181a1b;
}

html[data-theme="dark"] .modules-overview-row-odd {
  background-color: #202326;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .FilterField {
  background-color: #25292c;
  color: #f0f0f0;
  border-color: #4a5055;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #a7aaad;
}

html[data-theme="dark"] .FilterSubmit,
html[data-theme="dark"] .btn-default {
  background-color: #343a40;
  color: #f3f3f3;
  border-color: #565d63;
}

html[data-theme="dark"] .FilterSubmit:hover,
html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-default:focus {
  background-color: #444b51;
  color: #ffffff;
  border-color: #687078;
}

html[data-theme="dark"] .footer {
  background-color: #202326;
  border-top-color: #34383c;
  color: #c9c9c9;
}

html[data-theme="dark"] .listinglink,
html[data-theme="dark"] .peer-link {
  color: #70b7ff !important;
}

html[data-theme="dark"] a.tip:hover span {
  background-color: #050505;
  color: #ffffff;
}

@media (max-width: 767px) {
  .theme-toggle {
    margin: 8px 15px 10px 15px;
    width: calc(100% - 30px);
  }
}

/* Modern dashboard refresh - 2.3.7-sec1-theme3 */
body {
  background: #f3f6f9;
  color: #26323d;
}

.navbar-inverse {
  background: #17212b;
  border: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.navbar-inverse .navbar-brand {
  color: #fff;
  font-weight: 600;
  letter-spacing: .1px;
}

@media (min-width: 768px) {
  .sidebar {
    background: #fff;
    border-right: 1px solid #e4e9ee;
    box-shadow: 3px 0 14px rgba(31,45,61,.035);
  }
}

.nav-sidebar > li > a {
  margin: 3px 10px;
  padding: 10px 14px;
  border-radius: 7px;
  color: #52606d;
}

.nav-sidebar > li > a:hover,
.nav-sidebar > li > a:focus {
  background: #edf3f8;
  color: #1f6fae;
}

.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  background: #337ab7;
  color: #fff;
  box-shadow: 0 3px 9px rgba(51,122,183,.2);
}

.main {
  padding-top: 28px;
}

.table {
  background: #fff;
  border-radius: 8px;
}

.table > thead > tr > th,
.table > tbody > tr > th {
  border-bottom-width: 1px;
  color: #52606d;
}

.footer {
  background: #fff;
  border-top: 1px solid #e4e9ee;
}

/* Modules: responsive cards instead of nested tables */
.modules-page {
  width: 100%;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 18px;
  align-items: start;
}

.module-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(31,45,61,.07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: #cad8e5;
  box-shadow: 0 9px 24px rgba(31,45,61,.11);
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #edf1f4;
  background: #fafcfd;
}

.module-letter {
  display: flex;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #337ab7;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(51,122,183,.2);
}

.module-title-wrap {
  min-width: 0;
}

.module-title {
  overflow: hidden;
  margin: 0 0 3px;
  color: #26323d;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-count {
  color: #7b8794;
  font-size: 12px;
}

.module-card-body {
  min-height: 62px;
  padding: 10px;
}

.module-users {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 7px;
  color: #27699d;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease;
}

.module-user:hover,
.module-user:focus {
  background: #edf5fb;
  color: #174f7b;
}

.module-user-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #49a36c;
  box-shadow: 0 0 0 3px rgba(73,163,108,.12);
}

.module-empty {
  padding: 10px;
  color: #929ca5;
  font-size: 13px;
  font-style: italic;
}

html[data-theme="dark"] body {
  background: #14191e;
  color: #dce3e8;
}

html[data-theme="dark"] .navbar-inverse {
  background: #0d1217;
  box-shadow: 0 2px 14px rgba(0,0,0,.28);
}

html[data-theme="dark"] .sidebar {
  background: #192027;
  border-right-color: #2b343c;
  box-shadow: none;
}

html[data-theme="dark"] .nav-sidebar > li > a {
  color: #b9c3cc;
}

html[data-theme="dark"] .nav-sidebar > li > a:hover,
html[data-theme="dark"] .nav-sidebar > li > a:focus {
  background: #242e37;
  color: #fff;
}

html[data-theme="dark"] .nav-sidebar > .active > a,
html[data-theme="dark"] .nav-sidebar > .active > a:hover,
html[data-theme="dark"] .nav-sidebar > .active > a:focus {
  background: #286090;
  color: #fff;
}

html[data-theme="dark"] .table {
  background: #1b2229;
}

html[data-theme="dark"] .footer {
  background: #192027;
  border-top-color: #2b343c;
}

html[data-theme="dark"] .module-card {
  background: #1b2229;
  border-color: #303a43;
  box-shadow: 0 5px 18px rgba(0,0,0,.18);
}

html[data-theme="dark"] .module-card:hover {
  border-color: #46535e;
  box-shadow: 0 9px 24px rgba(0,0,0,.26);
}

html[data-theme="dark"] .module-card-header {
  background: #202830;
  border-bottom-color: #303a43;
}

html[data-theme="dark"] .module-letter {
  background: #337ab7;
}

html[data-theme="dark"] .module-title {
  color: #f0f4f7;
}

html[data-theme="dark"] .module-count,
html[data-theme="dark"] .module-empty {
  color: #94a1ac;
}

html[data-theme="dark"] .module-user {
  color: #72b7eb;
}

html[data-theme="dark"] .module-user:hover,
html[data-theme="dark"] .module-user:focus {
  background: #25323c;
  color: #a5d6f7;
}

@media (max-width: 767px) {
  .modules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .module-card {
    border-radius: 9px;
  }
}


/* Modern data sections - theme4 */
.dashboard-section {
  width: 100%;
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.section-title {
  margin: 0;
  color: #26323d;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
}

.section-subtitle {
  margin-top: 4px;
  color: #7b8794;
  font-size: 13px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #dce7f0;
  border-radius: 999px;
  background: #edf5fb;
  color: #27699d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.table-panel {
  overflow: hidden;
  border: 1px solid #e3e9ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(31,45,61,.06);
}

.table-panel .table-responsive {
  margin: 0;
  border: 0;
}

.modern-table {
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: transparent;
}

.modern-table > tbody > tr > th,
.modern-table > thead > tr > th {
  padding: 12px 10px;
  border-bottom: 1px solid #dfe7ed;
  background: #f7f9fb;
  color: #5c6975;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
  vertical-align: middle;
}

.modern-table > tbody > tr > td {
  padding: 11px 10px;
  border-top: 1px solid #edf1f4;
  color: #34414d;
  vertical-align: middle;
}

.modern-table > tbody > tr:nth-child(even) > td {
  background: #fbfcfd;
}

.modern-table.table-hover > tbody > tr:hover > td {
  background: #f0f6fb;
}

.modern-table a.pl,
.modern-table a.listinglink,
.modern-table .peer-link {
  color: #27699d;
  font-weight: 650;
  text-decoration: none;
}

.modern-table a.pl:hover,
.modern-table a.listinglink:hover,
.modern-table .peer-link:hover {
  color: #174f7b;
  text-decoration: none;
}

.modern-table .table-flag {
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}

.filter-cell {
  padding: 10px !important;
  background: #fff !important;
}

.filter-table {
  margin: 0;
}

.filter-table td {
  padding: 3px 5px;
  border: 0 !important;
  vertical-align: middle;
}

.filter-table form {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.filter-table .FilterField {
  display: inline-block;
  width: 155px;
  height: 32px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 13px;
}

.filter-table .FilterSubmit {
  height: 32px;
  border-radius: 7px;
}

.filter-table .smalllink {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 7px;
  background: #f4f6f8;
  color: #687684;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.filter-table .smalllink:hover {
  background: #e9eef2;
  color: #34414d;
}

html[data-theme="dark"] .section-title {
  color: #f0f4f7;
}

html[data-theme="dark"] .section-subtitle {
  color: #94a1ac;
}

html[data-theme="dark"] .section-badge {
  border-color: #334552;
  background: #223441;
  color: #86c5f2;
}

html[data-theme="dark"] .table-panel {
  border-color: #303a43;
  background: #1b2229;
  box-shadow: 0 5px 18px rgba(0,0,0,.18);
}

html[data-theme="dark"] .modern-table {
  background: transparent;
}

html[data-theme="dark"] .modern-table > tbody > tr > th,
html[data-theme="dark"] .modern-table > thead > tr > th {
  border-bottom-color: #35404a;
  background: #202830;
  color: #aebac4;
}

html[data-theme="dark"] .modern-table > tbody > tr > td {
  border-top-color: #2d363f;
  background: #1b2229;
  color: #d8e0e6;
}

html[data-theme="dark"] .modern-table > tbody > tr:nth-child(even) > td {
  background: #1e262e;
}

html[data-theme="dark"] .modern-table.table-hover > tbody > tr:hover > td {
  background: #26343e;
}

html[data-theme="dark"] .modern-table a.pl,
html[data-theme="dark"] .modern-table a.listinglink,
html[data-theme="dark"] .modern-table .peer-link {
  color: #72b7eb;
}

html[data-theme="dark"] .modern-table a.pl:hover,
html[data-theme="dark"] .modern-table a.listinglink:hover,
html[data-theme="dark"] .modern-table .peer-link:hover {
  color: #a5d6f7;
}

html[data-theme="dark"] .filter-cell {
  background: #1b2229 !important;
}

html[data-theme="dark"] .filter-table .smalllink {
  background: #242e37;
  color: #b9c5ce;
}

html[data-theme="dark"] .filter-table .smalllink:hover {
  background: #2c3943;
  color: #fff;
}

@media (max-width: 767px) {
  .section-heading {
    align-items: flex-start;
  }

  .section-title {
    font-size: 20px;
  }

  .table-panel {
    border-radius: 9px;
  }

  .modern-table {
    min-width: 760px;
  }

  .filter-table,
  .filter-table tbody,
  .filter-table tr,
  .filter-table td {
    display: block;
    width: 100%;
    text-align: left !important;
  }

  .filter-table td {
    padding: 4px 0;
  }

  .filter-table form {
    width: 100%;
  }

  .filter-table .FilterField {
    width: 100%;
  }
}

/* theme5: Modules detail + Reflectors */
.modules-detail-table .module-table-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eaf3fa;
  color: #226a9f;
  font-weight: 800;
  font-size: 14px;
}

.table-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3f7;
  color: #52616e;
  font-size: 12px;
  font-weight: 700;
}

.protocol-code {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #e0e7ed;
  border-radius: 7px;
  background: #f7f9fb;
  color: #4f5d69;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 650;
}

.module-description,
.reflector-comment {
  color: #65727d !important;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 76px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.service-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.service-status.is-online {
  background: #eaf7ef;
  color: #27844d;
}

.service-status.is-offline {
  background: #fbeeed;
  color: #b64a43;
}

.table-empty-state {
  padding: 34px 20px;
  color: #788590;
  text-align: center;
  font-size: 14px;
}

html[data-theme="dark"] .modules-detail-table .module-table-letter {
  background: #223746;
  color: #81c4f0;
}

html[data-theme="dark"] .table-count-pill {
  background: #28343d;
  color: #c1ccd4;
}

html[data-theme="dark"] .protocol-code {
  border-color: #34414a;
  background: #222c34;
  color: #c4ced6;
}

html[data-theme="dark"] .module-description,
html[data-theme="dark"] .reflector-comment {
  color: #9fadb7 !important;
}

html[data-theme="dark"] .service-status.is-online {
  background: #203a2c;
  color: #73d39b;
}

html[data-theme="dark"] .service-status.is-offline {
  background: #402927;
  color: #ed8b84;
}

html[data-theme="dark"] .table-empty-state {
  color: #98a5af;
}

@media (max-width: 767px) {
  .modules-detail-table {
    min-width: 820px;
  }

  .reflectors-table {
    min-width: 760px;
  }
}

/* Dark-mode icon contrast: DPRS + Last Heard ear */
html[data-theme="dark"] img[src$="/sat.png"],
html[data-theme="dark"] img[src$="sat.png"],
html[data-theme="dark"] img[src$="/ear.png"],
html[data-theme="dark"] img[src$="ear.png"],
body.dark-theme img[src$="/sat.png"],
body.dark-theme img[src$="sat.png"],
body.dark-theme img[src$="/ear.png"],
body.dark-theme img[src$="ear.png"] {
    filter: invert(1) brightness(1.8);
    opacity: 0.95;
}

html[data-theme="dark"] a:hover img[src$="/sat.png"],
html[data-theme="dark"] a:hover img[src$="sat.png"],
body.dark-theme a:hover img[src$="/sat.png"],
body.dark-theme a:hover img[src$="sat.png"] {
    filter: invert(1) brightness(2.2);
    opacity: 1;
}
