/* Brand palette */
:root {
  --brand-primary: #ff3e1d;           /* CTS orange */
  --brand-primary-2: #ff6a00;         /* orange gradient end */
  --brand-on-primary: #ffffff;
  --brand-border: rgba(255,62,29,0.25);
  --brand-soft: rgba(255,62,29,0.08);
  --brand-soft-2: rgba(255,106,0,0.08);
}

.menu .app-brand.demo {
  height: 74px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.menu .app-brand.demo {
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 10px;
  transition: all 0.3s ease-in-out;
}
.navbar.bg-primary {
  color: var(--brand-on-primary);
  background-color: var(--brand-primary) !important;
  background-image: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-2) 100%);
}
.menu .app-brand.demo .logo {width: 100%;display: flex;}
#dmenu-toggle {
  z-index: 99;
  background-color: var(--brand-primary);
  border: 4px solid #f3f4f6;
  position: absolute;
  left: 15rem;
  border-radius: 50%;
  color: var(--brand-on-primary);
  margin-left: 3px !important;
}
body .app-brand .layout-menu-toggle {
  border: 4px solid #f3f4f6;
  margin-left: 5px !important;
}
.menu .app-brand.demo .logo img {
  max-width: 100%;
  margin-right: 13px;
}
.menu .app-brand.demo .text {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
}
.layout-menu-collapsed:not(.layout-menu-hover) .menu .app-brand.demo .text {
  display: none;
  font-size: 0;
}
.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}
.dropdown-toggle:hover {
  background-color: rgba(255,255,255,0.12);
}
/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}
.btn i {
  margin-right: 7px;
}

.btn.btn-icon i {
    margin-right: 0;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}
div.dataTables_wrapper div.dataTables_filter, div.dataTables_wrapper div.dataTables_length {
  width: 50%;
  float: left;
}
[dir='rtl'] .rtl-only {
  display: block !important;
}
.nav-link > .avatar i {margin-top: 10px;margin-bottom: 10px;}

/* Table */
table.dataTable thead tr th {padding: 16px 16px;font-weight: bold;}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

.swal2-container {
  z-index: 20000 !important;
}


/* Datepicker */
body .datepicker td, body .datepicker th {
  width: 25px;
  height: 25px;
  padding: 4px 6px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  text-align: center;
}

body .datepicker th.dow {padding-top: 10px;}
body .datepicker-dropdown {
  padding: 8px 10px;
  -webkit-border-radius: 7px;
  -moz-border-radius: 7px;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
}
.datepicker table tr td.active.active, .datepicker table tr td.active.disabled, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled.disabled, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.disabled:hover.active, .datepicker table tr td.active.disabled:hover.disabled, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.disabled:hover:hover, .datepicker table tr td.active.disabled:hover[disabled], .datepicker table tr td.active.disabled[disabled], .datepicker table tr td.active:active, .datepicker table tr td.active:hover, .datepicker table tr td.active:hover.active, .datepicker table tr td.active:hover.disabled, .datepicker table tr td.active:hover:active, .datepicker table tr td.active:hover:hover, .datepicker table tr td.active:hover[disabled], .datepicker table tr td.active[disabled] {
  background-color: #1677ff !important;
  border: 0 !important;
  background-image: none;
}


/* ============================================================
   Navbar User Info & Station Badge
   ============================================================ */
.navbar-user-name {
  color: #ffffff;
  line-height: 1.2;
}

.navbar-user-role {
  line-height: 1.2;
}

.navbar-station-badge {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.navbar-station-badge:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
}

.navbar-station-badge i {
  font-size: 1rem;
}

/* Dropdown header user info */
.dropdown-header-user {
  min-width: 240px;
}

.dropdown-header-user .small {
  font-size: 0.75rem;
}

.tiny {
  font-size: 0.7rem !important;
}

/* ==============================================
   Sidebar Footer User Panel
   ============================================== */
.sidebar-user-panel {
  margin: 0.75rem 0.75rem 0 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--brand-border);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand-soft-2) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-user-panel .user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.sidebar-user-panel .user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  flex-shrink: 0;
}

.sidebar-user-panel .user-avatar i { font-size: 1.1rem; }

.sidebar-user-panel .user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: max-width .2s ease, opacity .2s ease, transform .2s ease;
}

.sidebar-user-panel .user-name,
.sidebar-user-panel .user-role,
.sidebar-user-panel .user-station {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-panel .user-name { font-size: .9rem; font-weight: 600; color: #2f3a48; }
.sidebar-user-panel .user-role { font-size: .75rem; color: var(--brand-primary); font-weight: 500; }
.sidebar-user-panel .user-station { font-size: .72rem; color: #8a99ab; }

/* ==============================================
   Sidebar Interactions / Animations
   ============================================== */
.layout-menu {
  display: flex;
  flex-direction: column;
  transition: width .25s ease, transform .25s ease;
}
.layout-menu .menu-inner { flex: 1 1 auto; overflow-y: auto; }
.menu .menu-item > .menu-link { transition: background-color .2s ease, color .2s ease, padding-left .2s ease; }
.menu .menu-item:hover > .menu-link { background-color: var(--brand-soft); color: #4b5b6b; }
.menu .menu-item.active > .menu-link { background-color: rgba(255,62,29,0.12); color: #2f3a48; }
.menu .menu-item .menu-toggle + .menu-sub { transition: max-height .25s ease; overflow: hidden; }
.layout-menu-hover .menu .menu-item .menu-toggle + .menu-sub { max-height: 1000px; }

/* Smooth indent on hover for habit */
.menu .menu-item > .menu-link:hover { padding-left: 1.125rem; }

/* Collapsed menu tweaks */
.layout-menu-collapsed .menu-inner { transition: padding .25s ease; }
.layout-menu-collapsed .menu .menu-item > .menu-link:hover { padding-left: .75rem; }

/* Collapsed sidebar: top user panel hidden completely unless hovered */
.layout-menu-collapsed .sidebar-user-panel {
  display: none;
}
.layout-menu-collapsed.layout-menu-hover .sidebar-user-panel {
  display: block;
  padding: .5rem;
  margin: 0.75rem 0.5rem 0 0.5rem;
}
.layout-menu-collapsed.layout-menu-hover .sidebar-user-panel .user-row {
  justify-content: center;
}
.layout-menu-collapsed.layout-menu-hover .sidebar-user-panel .user-meta {
  width: auto;
  max-width: 220px;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

html:not(.layout-menu-collapsed) .sidebar-user-panel {
  display: block;
}
html:not(.layout-menu-collapsed) .sidebar-user-panel .user-meta {
  width: auto;
  max-width: 220px;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* Page title wrapper spacing since header removed */
.page-title-wrapper { margin-bottom: .5rem; }