/********** Template CSS **********/
:root {
  --primary: #06a3da;
  --secondary: #34ad54;
  --light: #eef9ff;
  --dark: #091e3e;
}

* {
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

/*** Spinner ***/
.spinner {
  width: 40px;
  height: 40px;
  background: var(--primary);
  margin: 100px auto;
  -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
  animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@-webkit-keyframes sk-rotateplane {
  0% {
    -webkit-transform: perspective(120px);
  }
  50% {
    -webkit-transform: perspective(120px) rotateY(180deg);
  }
  100% {
    -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg);
  }
}

@keyframes sk-rotateplane {
  0% {
    transform: perspective(120px) rotateX(0deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
  }
  100% {
    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
  }
}

#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Heading ***/
h1,
h2,
.fw-bold {
  font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
  font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
  font-weight: 600 !important;
}

/*** Button ***/
.btn {
  font-weight: 600;
  transition: 0.5s;
}

.btn-primary,
.btn-secondary {
  color: #ffffff;
  box-shadow: inset 0 0 0 50px transparent;
}

.btn-primary:hover {
  box-shadow: inset 0 0 0 0 var(--primary);
}

.btn-secondary:hover {
  box-shadow: inset 0 0 0 0 var(--secondary);
}

.btn-square {
  width: 36px;
  height: 36px;
}

.btn-sm-square {
  width: 30px;
  height: 30px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.menu-item {
  transition: all 0.3s;
}

.menu-item a {
  color: #222222;
}

.menu-item a:hover {
  background: #ececec;
}

.menu-item a i {
  width: 30px;
}

.user {
  color: #fff;
}

.user:hover {
  color: #fff;
}

.active-user {
  background: #b5f8c7 !important;
}

.cursor-pointer {
  cursor: pointer;
}

.profile {
  background: #0066cc;
}

.menu-item .active {
  background: #f0f0f0;
}

.income {
  padding: 5px 15px;
  border-radius: 15px;
  color: #005216;
  background-color: #abf7bf;
}

.outcome {
  padding: 5px 15px;
  border-radius: 15px;
  color: #520000;
  background-color: #f7abab;
}

table th,
table td {
  vertical-align: middle;
}

.card {
  border-radius: 15px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.profile-pic {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}

.node-box {
  padding: 6px 12px;
  margin: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  background: #f9f9f9;
}
.level-tag {
  font-size: 12px;
  font-weight: bold;
  color: #555;
  margin-left: 8px;
}

.transaction {
  height: 100vh;
  overflow: auto;
}

.shajara {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  overflow: auto;
}

.node {
  position: relative;
  text-align: center;
  margin: 10px;
}

.node-box {
  display: inline-block;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 12px;
  background: rgb(226, 226, 226);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.node-box:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.children {
  display: flex;
  justify-content: center;
  margin-top: 60px;
  position: relative;
  gap: 40px;
}

/* Horizontal connector across children */
.children::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 2px;
  background: #000610;
}

/* Vertical line from parent to horizontal connector */
.node > .children::after {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: #000610;
  transform: translateX(-50%);
}

/* Vertical line per child down to its box */
.children .node::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 2px;
  height: 40px;
  background: #000610;
  transform: translateX(-50%);
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
  position: relative;
  margin-left: 25px;
  padding: 35px 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: 0.5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
  padding: 20px 0;
  color: var(--dark);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar-dark .navbar-brand h1 {
  color: #ffffff;
}

.navbar-dark .navbar-toggler {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.one-row-text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.two-rows-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
  .sticky-top.navbar-dark {
    position: relative;
    background: #ffffff;
  }

  .navbar-dark .navbar-nav .nav-link,
  .navbar-dark .navbar-nav .nav-link.show,
  .sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 10px 0;
    color: var(--dark);
  }

  .navbar-dark .navbar-brand h1 {
    color: var(--primary);
  }
}

@media (min-width: 992px) {
  .navbar-dark {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    border-bottom: 1px solid rgba(256, 256, 256, 0.1);
    z-index: 999;
  }

  .sticky-top.navbar-dark {
    position: fixed;
    background: #ffffff;
  }

  .navbar-dark .navbar-nav .nav-link::before {
    position: absolute;
    content: "";
    width: 0;
    height: 2px;
    bottom: -1px;
    left: 50%;
    background: var(--primary);
    transition: 0.5s;
  }

  .navbar-dark .navbar-nav .nav-link:hover::before,
  .navbar-dark .navbar-nav .nav-link.active::before {
    width: 100%;
    left: 0;
  }

  .navbar-dark .navbar-nav .nav-link.nav-contact::before {
    display: none;
  }

  .sticky-top.navbar-dark .navbar-brand h1 {
    color: var(--primary);
  }
}

/*** Carousel ***/
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 30, 62, 0.7);
  z-index: 1;
}

@media (max-width: 576px) {
  .carousel-caption h5 {
    font-size: 14px;
    font-weight: 500 !important;
  }

  .carousel-caption h1 {
    font-size: 30px;
    font-weight: 600 !important;
  }
}

.carousel-control-prev,
.carousel-control-next {
  width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
}

/*** Section Title ***/
.section-title::before {
  position: absolute;
  content: "";
  width: 150px;
  height: 5px;
  left: 0;
  bottom: 0;
  background: var(--primary);
  border-radius: 2px;
}

.section-title.text-center::before {
  left: 50%;
  margin-left: -75px;
}

.section-title.section-title-sm::before {
  width: 90px;
  height: 3px;
}

.section-title::after {
  position: absolute;
  content: "";
  width: 6px;
  height: 5px;
  bottom: 0px;
  background: #ffffff;
  -webkit-animation: section-title-run 5s infinite linear;
  animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
  width: 4px;
  height: 3px;
}

.section-title.text-center::after {
  -webkit-animation: section-title-run-center 5s infinite linear;
  animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
  -webkit-animation: section-title-run-sm 5s infinite linear;
  animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
  0% {
    left: 0;
  }
  50% {
    left: 145px;
  }
  100% {
    left: 0;
  }
}

@-webkit-keyframes section-title-run-center {
  0% {
    left: 50%;
    margin-left: -75px;
  }
  50% {
    left: 50%;
    margin-left: 45px;
  }
  100% {
    left: 50%;
    margin-left: -75px;
  }
}

@-webkit-keyframes section-title-run-sm {
  0% {
    left: 0;
  }
  50% {
    left: 85px;
  }
  100% {
    left: 0;
  }
}

/*** Service ***/
.service-item {
  position: relative;
  height: 300px;
  padding: 0 30px;
  transition: 0.5s;
}

.service-item .service-icon {
  margin-bottom: 30px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 2px;
  transform: rotate(-45deg);
}

.service-item .service-icon i {
  transform: rotate(45deg);
}

.service-item a.btn {
  position: absolute;
  width: 60px;
  bottom: -48px;
  left: 50%;
  margin-left: -30px;
  opacity: 0;
}

.service-item:hover a.btn {
  bottom: -24px;
  opacity: 1;
}

/*** Testimonial ***/
.testimonial-carousel .owl-dots {
  margin-top: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.testimonial-carousel .owl-dot {
  position: relative;
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  background: #dddddd;
  border-radius: 2px;
  transition: 0.5s;
}

.testimonial-carousel .owl-dot.active {
  width: 30px;
  background: var(--primary);
}

.testimonial-carousel .owl-item.center {
  position: relative;
  z-index: 1;
}

.testimonial-carousel .owl-item .testimonial-item {
  transition: 0.5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
  background: #ffffff !important;
  box-shadow: 0 0 30px #dddddd;
}

/*** Team ***/
.team-item {
  transition: 0.5s;
}

.team-social {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
}

.team-social p.btn {
  position: relative;
  bottom: -200px;
  opacity: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: justify;
  font-size: 14px;
  cursor: default;
}

.team-item:hover {
  box-shadow: 0 0 30px #dddddd;
}

.team-item:hover .team-social {
  background: rgba(9, 30, 62, 0.7);
}

.team-item:hover .team-social p.btn:first-child {
  opacity: 1;
  bottom: -175px;
  transition: 0.3s 0s;
}

.team-item .team-img {
  height: 400px;
}

.blog-item .blog-img,
.product-item .product-img {
  height: 300px;
  width: 100%;
  overflow: hidden;
}

.team-item .team-img img,
.product-item .product-img img,
.blog-item .blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.team-item:hover .team-img img,
.product-item:hover .product-img img,
.blog-item:hover .blog-img img {
  transform: scale(1.15);
}

/* Blog Modal  */
.blog-bg-modal,
.products-bg-modal {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999999;
}

.blog-modal,
.product-modal {
  width: 30%;
  height: auto;
  position: fixed;
  background-color: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
}

.blog-bg-modal .blog-img,
.products-bg-modal .product-img {
  width: 100%;
  height: 300px;
}

.blog-bg-modal img,
.products-bg-modal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button.close-blog-modal,
button.close-product-modal {
  width: 40px;
  border: none;
  position: absolute;
  right: -40px;
  top: 0;
  z-index: 9999;
}

.blog-slider-wrapper,
.products-slider-wrapper,
.team-slider-wrapper {
  overflow: hidden;
  width: 100%;
}

.blog-slider,
.products-slider,
.team-slider {
  width: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.blog-item-container,
.product-item-container,
.team-item-container {
  min-width: 33.33%;
  padding: 0 10px;
}

.previous-icon,
.team-previous-icon,
.products-previous-icon,
.next-icon,
.team-next-icon,
.products-next-icon {
  top: 50%;
  z-index: 10;
  font-size: 30px;
  transform: translate(0, -50%);
  cursor: pointer;
}

.previous-icon,
.team-previous-icon,
.products-previous-icon {
  left: -70px;
}

.next-icon,
.team-next-icon,
.products-next-icon {
  right: -70px;
}

.stars i {
  cursor: pointer;
  transition: color 0.2s;
  color: #ccc;
}

.stars i.filled {
  color: gold;
}

/*** Miscellaneous ***/
@media (min-width: 991.98px) {
  .facts {
    position: relative;
    margin-top: -75px;
    z-index: 1;
  }
}

.back-to-top {
  position: fixed;
  display: none;
  right: 45px;
  bottom: 45px;
  z-index: 99;
}

.bg-header {
  background: linear-gradient(rgba(9, 30, 62, 0.7), rgba(9, 30, 62, 0.7)),
    url(../img/bg.jpg) center center no-repeat;
  background-size: cover;
}

.link-animated a {
  transition: 0.5s;
}

.link-animated a:hover {
  padding-left: 10px;
}

.profile-mobile,
.three-bars {
  display: none;
}

@media (min-width: 767.98px) {
  .footer-about {
    margin-bottom: -75px;
  }
}

@media (max-width: 576px) {
  .blog-modal,
  .product-modal {
    width: 90%;
  }

  .blog-item-container,
  .team-item-container,
  .product-item-container {
    min-width: 100%;
  }

  .previous-icon,
  .team-previous-icon,
  .products-previous-icon {
    left: -20px;
  }

  .next-icon,
  .team-next-icon,
  .products-next-icon {
    right: -20px;
  }

  button.close-blog-modal,
  button.close-product-modal {
    top: -35px;
    right: 0;
  }

  .navbar {
    padding: 5px 10px !important;
    padding-right: 20px !important;
  }

  .navbar-brand img {
    width: 80px;
  }

  .profile-container {
    padding: 15px;
    justify-content: center;
  }

  .mobile-menu {
    height: 60px !important;
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999;
    background-color: #fff;
  }

  .top-menu {
    min-height: 60px !important;
    justify-content: space-between;
    position: relative;
    top: 0 !important;
    left: 0 !important;
    z-index: 999;
    margin: 0 !important;
    padding-right: 30px;
    background-color: #fff;
  }

  .menu-items {
    position: relative;
    top: -500%;
    z-index: 99;
    padding-right: 25px;
    border: 1px solid #e9e9ee;
    background-color: #fff;
    transition: all 0.3s;
  }

  .menu-items.show {
    top: 0;
  }

  .logo {
    width: 60px;
  }

  .cabinet-text {
    display: none !important;
  }

  .general {
    margin-top: 20px;
  }

  .general,
  .shajara,
  .transaction {
    width: 100% !important;
  }

  .profile {
    display: none !important;
  }

  .profile-mobile,
  .three-bars {
    display: block;
  }

  .shajara,
  .transaction {
    height: calc(100vh - 100px);
    margin-top: 70px !important;
  }

  .transaction .transactions-table {
    width: 100vw;
    min-width: max-content;
  }
}

/* Table umumiy style */
.transactions-table {
  width: 100%;
  background: #fff; /* oq fon */
  border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  color: #0d6efd; /* yozuv rangi ko‘k */
  font-size: 14px;
}

/* Jadval title */
.transactions-table th {
  font-weight: 600;
  background: #f8f9fa; /* juda och kulrang fon */
  color: #0d6efd; /* sarlavha ham ko‘k */
}

/* Income/outcome */
.transactions-table .income {
  color: #198754; /* yashil */
  font-weight: 600;
}
.transactions-table .outcome {
  color: #dc3545; /* qizil */
  font-weight: 600;
}

/* Pagination */
.transactions-pagination .pagination {
  margin: 0;
}

.transactions-pagination .page-link {
  color: #0d6efd; /* oddiy link ko‘k */
  border: 1px solid #dee2e6;
}

.transactions-pagination .page-item.active .page-link {
  background-color: #0d6efd; /* aktiv ko‘k */
  border-color: #0d6efd;
  color: #fff; /* oq yozuv */
}

.transactions-pagination .page-item.disabled .page-link {
  color: #6c757d; /* o‘chirilgan – kulrang */
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
}
@media (max-width: 768px) {
  .transaction .transactions-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed; /* scroll yo‘qoladi */
  }

  .transactions-table thead {
    display: none;
  }

  .transactions-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
  }

  /* th va td uchun bir xil style */
  .transactions-table tbody td,
  .transactions-table tbody th {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: none;
  }

  .transactions-table tbody td::before,
  .transactions-table tbody th::before {
    content: attr(data-label);
    font-weight: 600;
    color: #0d6efd;
  }
}
