﻿.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.site-nav {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}
.site-brand img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}

.site-nav-toggle {
  display: none;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.site-nav-links a:hover {
  background: var(--bg-surface2);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.site-nav-user { justify-self: end; }
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  padding: 28px 0;
}
.footer-col h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
}
.footer-col a,
.footer-col p {
  color: var(--text-secondary);
  margin: 0 0 8px;
  display: block;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-col i { margin-right: 6px; }
.footer-logo {
  max-width: 150px;
  height: 42px;
  object-fit: contain;
}
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 14px 0;
}

@media (max-width: 1023px) {
  .site-nav { grid-template-columns: auto auto 1fr; }
  .site-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 10px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .site-brand span { display: none; }
  .footer-grid { 
    grid-template-columns: 1fr !important; 
    gap: 28px !important;
    text-align: center !important;
  }
  .footer-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .footer-logo {
    margin: 0 auto 12px !important;
  }
  .footer-bottom {
    text-align: center !important;
  }
}

/* Legacy-like navbar look */
.ta-navbar {
  --bs-navbar-padding-y: 0.7rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
  margin-top: 0 !important;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}
.ta-navbar.navbar,
.ta-navbar.sticky-top {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 0 !important;
}
.ta-navbar .nav-link { color: var(--text-primary); font-size: 14px; }
.ta-navbar .nav-link:hover { color: var(--accent); }
.ta-navbar .nav-link i { width: 20px; text-align: center; }
.ta-navbar .navbar-toggler { 
  border: 1px solid var(--border-default);
  padding: 8px 12px;
}
.ta-navbar .navbar-toggler:focus { box-shadow: none; }
.ta-navbar .navbar-toggler-icon {
  background-image: none;
  width: 1.8rem;
  height: 1.8rem;
  position: relative;
}
.ta-navbar .navbar-toggler-icon::before {
  content: "\2630";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  font-size: 26px;
  line-height: 1;
}
.ta-navbar .img-navbar { width: 30px; height: 30px; object-fit: cover; }
.ta-navbar .text-white { color: var(--text-primary) !important; }
.ta-navbar .dropdown-profile .dropdown-menu {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  min-width: 100%;
  width: 100%;
  left: 0;
  right: 0;
  box-sizing: border-box;
}
.ta-navbar .dropdown-profile .nav-item.dropdown {
  position: relative;
}
.ta-navbar .dropdown-profile .dropdown-item i {
  width: 28px;
  text-align: center;
}

/* Custom Dropdown New Style Design */
.custom-profile-dropdown {
  position: relative !important;
}

.custom-dropdown-new {
  margin-top: 10px !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface) !important;
  border-radius: 12px !important;
  padding: 12px 8px !important;
  width: 280px !important; /* Fixed ideal width */
  min-width: 280px !important;
  max-width: 320px !important;
  transform: none !important;
  right: 0 !important;
  left: auto !important;
}

.custom-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 12px 12px;
}

.custom-dropdown-header img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.custom-dropdown-header .user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.custom-dropdown-header .user-meta .fullname {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.custom-dropdown-header .user-meta .balance {
  font-size: 13px;
  color: var(--text-secondary);
}

.custom-dropdown-header .user-meta .balance span {
  font-weight: 700;
  color: var(--accent);
}

.custom-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
  width: 100%;
}

.custom-dropdown-new .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 14px !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.custom-dropdown-new .dropdown-item i {
  font-size: 16px;
  color: var(--text-secondary);
  width: auto !important;
  text-align: left !important;
}

.custom-dropdown-new .dropdown-item:hover {
  background: var(--bg-hover) !important;
  color: var(--accent) !important;
}

.custom-dropdown-new .dropdown-item:hover i {
  color: var(--accent);
}

.custom-dropdown-new .dropdown-logout {
  color: #ef4444 !important;
}

.custom-dropdown-new .dropdown-logout i {
  color: #ef4444;
}

.custom-dropdown-new .dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}

.custom-dropdown-new .dropdown-logout:hover i {
  color: #ef4444;
}


.ta-navbar .nav-top-row {
  justify-content: space-between;
  gap: 12px;
}
.ta-navbar .nav-left { flex: 0 0 auto; }
.ta-navbar .nav-center {
  flex: 1 1 auto;
  justify-content: flex-start;
}
.ta-navbar .nav-right {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.ta-navbar .nav-right.navbar-nav {
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .ta-navbar .nav-top-row {
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center !important;
  }
  .ta-navbar .nav-left {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center !important;
    width: 100%;
  }
  .ta-navbar .nav-left .navbar-brand { margin-right: 8px; }
  .ta-navbar .nav-left .navbar-toggler { margin-left: auto !important; }
  .ta-navbar .nav-right {
    margin-left: auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-right: 0 !important;
  }
  .ta-navbar .nav-right.navbar-nav {
    flex-direction: row;
    margin-bottom: 0 !important;
  }
  .ta-navbar .nav-right .nav-item {
    display: flex;
    align-items: center;
    margin: 0 !important;
  }
  .ta-navbar .nav-right .nav-item > .d-flex {
    align-items: center;
  }
  .ta-navbar .dropdown-profile .nav-item { margin: 0 !important; }
  .ta-navbar .dropdown-profile .btn { white-space: nowrap; }
  .ta-navbar .guest-actions { display: none !important; }
  .ta-navbar #mainNavbar.navbar-collapse {
    flex-basis: 100%;
    width: 100%;
    order: 3;
  }
  .ta-navbar .navbar-collapse {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
  }
  .ta-navbar .navbar-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .ta-navbar .navbar-main .nav-item {
    width: 100%;
    padding: 0;
  }
  .ta-navbar .navbar-main .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: transparent;
  }
  .ta-navbar .navbar-main .nav-link:hover {
    background: var(--bg-surface2);
  }
}
