:root {
  --brand-red: #d93d27;
  --light-bg: rgba(255, 255, 255, 0.6);
  --icon-bg: #e0f2fe;
  --icon-color: #0284c7;
  --text-dark: #111827;
  --light-address: rgba(255, 255, 255, 0.2);
  --light-grey-1: #f7f7f7;
  --light-grey-2: #eeeeee;
  --light-grey-3: #e0e0e0;
  --light-grey-4: #cccccc;
  --light-grey-5: #b3b3b3;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
}

body {
  flex: 1 0 auto;
}

.page-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
  flex-direction: row;
}

@media (min-width: 768px), (orientation: landscape) {
  body {
    background-image: url("../assets/sfpl_cfs.png");
  }
  body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: -1;
  }
  .desktopaddess {
    display: block;
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  body {
    background-image: url("../assets/mobilescreen.jpg");
  }
  .mb-botton {
    padding-bottom: 180px !important;
  }
}

header {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--brand-red);
  margin: 0;
  text-align: right;
  width: 100%;
}

@media (max-width: 991.98px) {
  header {
    padding: 0.5rem 0rem !important;
  }
  header h1 {
    font-size: 1.1rem;
  }
}

@media (max-width: 767.98px) {
  header {
    padding: 0.5rem 0rem !important;
  }
  header h1 {
    font-size: 0.9rem;
    text-align: center;
  }
}

.profile-btn {
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0;
}

.profile-btn .material-icons-outlined {
  font-size: 24px;
  color: var(--brand-red);
}

main {
  flex: 1;
  margin-left: 220px;
  padding: 1rem;
}

.section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  padding: 0.5rem;
  text-transform: uppercase;
  text-align: center;
  border-radius: 4px;
  margin-bottom: 0.2rem;
}

.card-btn {
  background-color: var(--light-bg);
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 0.6rem 0.4rem;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.card-btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
  background-color: var(--icon-bg);
  color: var(--icon-color);
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #111827;
}

.card-label .material-icons-outlined {
  font-size: 1rem;
}

/* Responsive: Mobile (up to 575px) */
@media (max-width: 575.98px) {
  .card-btn {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
    margin: 0.5rem;
  }

  .card-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    margin-bottom: 0.4rem;
  }

  .card-label {
    font-size: 0.75rem;
  }

  .card-label .material-icons-outlined {
    font-size: 0.8rem;
  }
}

/* Responsive: Tablet (576px to 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .card-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.8rem;
    margin: 0.5rem;
  }

  .card-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    margin-bottom: 0.4rem;
  }

  .card-label {
    font-size: 0.8rem;
  }

  .card-label .material-icons-outlined {
    font-size: 0.9rem;
  }
}

/* Responsive: Desktop and Larger (992px and up) */
@media (min-width: 992px) {
  .card-btn {
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
    margin: 0.5rem;
  }

  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .card-label {
    font-size: 0.9rem;
  }

  .card-label .material-icons-outlined {
    font-size: 1rem;
  }
}

footer {
  position: relative;
  width: 100%;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.8rem;
  z-index: 10;
}

footer .container {
  padding: 0.6rem 1rem;
}

@keyframes bounceInUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  60% {
    transform: translateY(-10%);
    opacity: 1;
  }
  80% {
    transform: translateY(5%);
  }
  100% {
    transform: translateY(0);
  }
}

#btnHardReload {
  position: fixed;
  right: 0.6rem !important;
  bottom: 0.5rem;
  width: 52px;
  height: 52px;
  background: var(--brand-red);
  color: #fff;
  font-size: 22px;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
  animation: bounceInUp 0.6s ease-out;
  transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out,
    box-shadow 0.3s;
}

#btnHardReload:hover {
  background-color: #a7281c;
  transform: scale(1.08);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

#btnFeedbackSticky {
  position: fixed;
  right: 0;
  transform: translateY(-50%);
  width: 30px;
  border: 2px solid #009dbc;
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  top: 50%;
  background-color: #009dbc;
}
#btnTariff {
  position: fixed;
  right: 0;
  transform: translateY(-50%);
  width: 30px;
  border: 2px solid #d93d27;
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  top: 35%;
  background-color: #d93d27;
}

#btnFeedbackSticky:hover {
  width: 40px;
  background-color: #007a99;
}

#btnFeedbackSticky .label,
#btnTariff .label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #fff;
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 14px;
  transition: transform 0.3s;
}

#btnFeedbackSticky:hover .label,
#btnTariff:hover .label {
  transform: scale(1.05);
}

#btnTariff:hover {
  width: 40px;
  background-color: #b2301f;
}

@media (max-width: 767px) {
  .desktop-header {
    display: none !important;
  }
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .profile-text {
    display: none;
  }
  .mb-botton {
    padding-bottom: 40px !important;
  }
}

@media (min-width: 768px) {
  .mobile-header {
    display: none !important;
  }
  .desktop-header {
    display: flex;
    align-items: center;
  }
}

.dept-section h5 {
  color: #000;
  font-weight: bold;
}

.dept-card {
  border-right: 1px solid #000 !important;
  padding-right: 15px;
  margin-right: 15px;
  font-size: 0.8rem;
}

.dept-contact {
  margin-bottom: 2px;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.8);
  font-weight: bold !important;
}

.dept_h5 {
  font-size: 0.9rem;
  color: var(--brand-red) !important;
}

.container-fluid.addresscs.desktopaddess {
  width: 100%;
  position: relative;
  z-index: 10;
  background-color: rgba(255, 255, 255, 1);
}
@media (min-width: 768px) {
  .address-row .dept-card {
    border-right: 1px solid #ccc;
    padding-right: 15px;
    margin-right: 15px;
  }

  .address-row .dept-card:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
  }
}

a {
  color: #003366 !important;
}

.verticalline {
  padding: 1px !important;
}
.main-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: auto;
  overflow: visible; /* Allow scrolling on whole content */
}
.main-content {
  padding: 5px;
  /* background-color: rgba(255, 255, 255, 0.1); */
  background-color: transparent !important;
  flex-grow: 1;
  overflow: visible;
  height: auto;
}

/* .sidebar {
  width: 220px;
  background: #fff;
  padding-top: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  margin-left: 20px;
} */
.sidebar {
  width: 220px;
  background: #fff;
  padding-top: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  margin-left: 40px !important;
  margin-top: 80px !important;
  position: relative;
  display: block;
  height: 510px !important;
  overflow: visible;
  border-radius: 12px;
}

.nav-section {
  border-bottom: 1px solid #ddd;
}

.nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 5px 10px;
  font-weight: bold;
  background-color: #e6f3ff;
  color: #0074cc;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.section-icon {
  margin-right: 10px;
  font-size: 18px;
  color: #0074cc;
}

.title-text {
  flex: 1;
  white-space: nowrap;
  font-size: 13px !important;
}

.toggle-icon {
  font-size: 13px;
  color: #0074cc;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.nav-section.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.submenu {
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  max-height: 1000px;
  padding: 5px 0;
}

.nav-section.collapsed .submenu {
  max-height: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.nav-link i {
  margin-right: 5px;
}

.sidebar.mobile-visible {
  left: 0;
}
#sidebarBackdrop.active {
  display: block;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-track {
  background-color: transparent;
}

@media (max-width: 1080.98px) {
  .sidebar {
    margin-top: 180px !important;
  }
}
@media (max-width: 991.98px) {
  .sidebar {
    display: none !important;
    margin-top: 80px !important;
  }

  .sidebar-backdrop {
    display: none !important;
  }

  .page-wrapper,
  .main-wrapper,
  .main-content,
  footer,
  .container-fluid.addresscs.desktopaddess {
    margin-left: 0 !important;
  }

  .nav-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5px;
    font-weight: 600;
    letter-spacing: 2px;
    background-color: var(--icon-bg);
    color: var(--icon-color);
    cursor: pointer;
    position: relative;
  }

  .toggle-icon {
    position: absolute;
    right: 15px;
    font-size: 14px;
    color: var(--icon-color);
    transition: transform 0.3s ease;
  }

  .nav-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
  }

  .submenu {
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 0;
    padding: 0;
  }

  .nav-section:not(.collapsed) .submenu {
    max-height: 1000px;
    padding: 5px 0;
  }

  .horizontal-menu,
  .mobile-submenu-wrapper {
    display: block !important;
  }
}

@media (max-width: 767.98px) {
  .sidebar {
    display: none !important;
  }

  .horizontal-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 8px 10px;
    border-bottom: 1px solid #ccc;
    gap: 12px;
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    z-index: 1001;
  }

  .horizontal-menu .menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #0074cc;
    cursor: pointer;
  }

  .horizontal-menu .menu-item i {
    font-size: 20px;
  }

  .mobile-submenu-wrapper {
    margin-top: 50px;
    padding: 5px;
    display: flex !important;
    flex-direction: column;
  }

  .mobile-submenu {
    display: none;
    flex-direction: column;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
  }

  .mobile-submenu.active {
    display: flex;
  }

  .mobile-submenu a {
    padding: 5px;
    font-size: 12px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
  }

  .mobile-submenu a:last-child {
    border-bottom: none;
  }

  .sidebar-backdrop {
    display: none !important;
  }

  .page-wrapper,
  .main-wrapper,
  .main-content,
  footer,
  .container-fluid.addresscs.desktopaddess {
    margin-left: 0 !important;
  }
}

@media (min-width: 992px) {
  .horizontal-menu,
  .mobile-submenu-wrapper {
    display: none !important;
  }

  .sidebar {
    width: 220px;
    transition: none;
    display: block !important;
  }

  .sidebar .nav-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 5px 10px;
    background-color: #e6f3ff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0074cc;
    cursor: pointer;
  }

  .sidebar .nav-link span {
    display: inline;
    margin-left: 8px;
  }

  .sidebar .nav-link {
    justify-content: flex-start;
  }

  .toggle-icon {
    position: absolute;
    right: 15px;
    font-size: 13px;
    color: #0074cc;
    transition: transform 0.3s ease;
  }

  .nav-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
  }

  .submenu {
    overflow: visible;
    max-height: none;
    padding: 5px 0;
  }

  .nav-section.collapsed .submenu {
    display: block;
    max-height: none;
    padding: 5px 0;
  }
}

.horizontal-menu {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping to avoid scroll */
  justify-content: space-around;
  align-items: center;
  background-color: #ffffff;
  padding: 8px 10px;
  border-bottom: 1px solid #ccc;
}

.horizontal-menu .menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: #0074cc;
  cursor: pointer;
  padding: 6px 8px;
  min-width: auto;
  flex: 1 1 auto;
  text-align: center;
}

.horizontal-menu .menu-item i {
  font-size: 18px;
  margin-bottom: 2px;
}

.mobile-submenu-wrapper {
  padding: 0 3px;
  margin-top: 3px;
}

.submenu-container {
  margin-bottom: 0px;
}

.mobile-submenu {
  display: none;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  padding: 3px 0;
}

.mobile-submenu a {
  padding: 4px 6px;
  font-size: 12px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.mobile-submenu a:last-child {
  border-bottom: none;
}

.mobile-submenu.active {
  display: flex;
}

@media (max-width: 991.98px) {
  .horizontal-menu {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #ccc;
    padding: 8px 10px;
    position: sticky;
    top: 52px;
    gap: 8px;
    white-space: nowrap;
  }

  .horizontal-menu .menu-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    min-width: max-content;
    color: #0074cc;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    text-align: center;
  }

  .horizontal-menu .menu-item i {
    font-size: 18px;
    margin: 0;
    line-height: 1;
  }

  .mobile-submenu-wrapper {
    padding: 5px;
    background: #f9f9f9;
  }

  .mobile-submenu {
    display: none;
    flex-direction: column;
    padding: 4px 0;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    border-radius: 5px;
    background: #fff;
  }

  .mobile-submenu.active {
    display: flex;
  }

  .mobile-submenu a {
    padding: 4px 6px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 12px;
  }

  .mobile-submenu a:last-child {
    border-bottom: none;
  }
}

@media (min-width: 992px) {
  .horizontal-menu,
  .mobile-submenu-wrapper {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .dropdown-menu {
    position: absolute !important;
    z-index: 1065 !important;
  }
}

.profile-icon-square {
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background-color: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-icon-square .material-icons-outlined {
  font-size: 24px;
  color: #333;
}

@media (max-width: 767.98px) {
  .mobile-dropdown .dropdown-item {
    font-size: 14px;
    padding: 8px 12px;
  }

  .mobile-dropdown .material-icons-outlined {
    font-size: 20px;
    margin-right: 8px;
    vertical-align: middle;
  }

  .mobile-dropdown hr.dropdown-divider {
    margin: 4px 0;
  }
}
@media (max-width: 767.98px) {
  .container-fluid.addresscs.desktopaddess {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 15px;
    background-color: #fff;
  }

  .container-fluid.addresscs.desktopaddess .address-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .container-fluid.addresscs.desktopaddess .dept-card {
    border-right: none;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .container-fluid.addresscs.desktopaddess .dept-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

.brandlogo {
  padding: 0.3rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brandlogo img {
  height: 36px;
  max-width: 100%;
  object-fit: contain;
}

/* Mobile (≤576px) */
@media (max-width: 576px) {
  .brandlogo img {
    height: 28px;
  }
}

/* Tablet (≥577px and ≤768px) */
@media (min-width: 577px) and (max-width: 768px) {
  .brandlogo img {
    height: 32px;
  }
}

/* Large screen (≥1200px) */
@media (min-width: 1200px) {
  .brandlogo img {
    height: 40px;
  }
}
