*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  min-height: 100vh;
}

a {
  color: #1e3799;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
a:hover {
  color: #16286e;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.page-title {
  font-size: 1.5rem;
  color: #1e3799;
  font-weight: 700;
  border-left: 4px solid #eb2f06;
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}

.text-primary {
  color: #1e3799 !important;
}

.text-secondary-custom {
  color: #eb2f06 !important;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #1e3799 0%, #112059 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1050;
  transition: transform 0.25s ease-in-out;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}
.sidebar__logo i {
  font-size: 1.4rem;
  opacity: 0.9;
}
.sidebar__brand-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}
.sidebar__brand-sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar__close {
  font-size: 1.1rem;
  opacity: 0.7;
}
.sidebar__close:hover {
  opacity: 1;
}
.sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}
.sidebar__body::-webkit-scrollbar {
  width: 4px;
}
.sidebar__body::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.sidebar__section-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 700;
  padding: 0.85rem 1.1rem 0.3rem;
  margin: 0;
}
.sidebar__sub-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  padding: 0.55rem 1.1rem 0.15rem;
  margin: 0;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.1rem;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  border-radius: 0;
  transition: all 0.2s ease-in-out;
}
.sidebar__link i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.sidebar__link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: rgba(255, 255, 255, 0.3);
}
.sidebar__link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.13);
  border-left-color: #eb2f06;
  font-weight: 600;
}
.sidebar__link--logout {
  color: rgba(255, 138, 128, 0.85) !important;
}
.sidebar__link--logout:hover {
  color: #ff8a80 !important;
  background: rgba(255, 138, 128, 0.08);
  border-left-color: #ff8a80;
}
.sidebar__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0;
  flex-shrink: 0;
}
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
  display: block;
}

.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.admin-navbar .breadcrumb-item a {
  color: #1e3799;
}
.admin-navbar .breadcrumb-item a:hover {
  color: #16286e;
}
.admin-navbar .breadcrumb-item.active {
  color: #6c757d;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.admin-user__avatar {
  width: 36px;
  height: 36px;
  background: #1e3799;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.admin-user__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
}
.admin-user__role {
  font-size: 0.7rem;
  color: #6c757d;
}

.platform-balance-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e3799;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.platform-balance-btn:hover {
  background: #172b77;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(30, 55, 153, 0.35);
}
.platform-balance-btn i {
  font-size: 0.9rem;
  opacity: 0.85;
}
.platform-balance-btn span {
  opacity: 0.85;
}
.platform-balance-btn__amount {
  font-weight: 800;
  font-size: 0.88rem;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  padding: 0.05rem 0.4rem;
}

.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}
@media (max-width: 991.98px) {
  .admin-main {
    margin-left: 0;
  }
}

.content-area {
  flex: 1;
  padding: 1.5rem;
}
@media (max-width: 576px) {
  .content-area {
    padding: 1rem;
  }
}

.admin-footer {
  background: #ffffff;
  border-top: 1px solid #e9ecef;
  padding: 0.85rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: #6c757d;
}

.admin-table {
  width: 100%;
  margin-bottom: 0;
}
.admin-table th {
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.875rem;
  color: #212529;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: rgba(30, 55, 153, 0.03);
}
.admin-table .user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.admin-table .user-cell .user-avatar-sm {
  width: 32px;
  height: 32px;
  background: #1e3799;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-table .user-cell .user-name {
  font-weight: 600;
  font-size: 0.875rem;
}
.admin-table .user-cell .user-email {
  font-size: 0.75rem;
  color: #6c757d;
}
@media (max-width: 768px) {
  .admin-table thead {
    display: none;
  }
  .admin-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.5rem;
  }
  .admin-table td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border: none;
    border-bottom: 1px solid #e9ecef;
  }
  .admin-table td:last-child {
    border-bottom: none;
  }
  .admin-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    flex: 0 0 40%;
  }
}

.stat-card {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease-in-out;
  padding: 1.25rem;
  border-radius: 0.5rem;
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #212529;
  line-height: 1;
}
.stat-card__label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}
.stat-card__trend {
  font-size: 0.75rem;
  font-weight: 600;
}
.stat-card__trend.up {
  color: #28a745;
}
.stat-card__trend.down {
  color: #dc3545;
}

.data-card {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease-in-out;
  border-radius: 0.5rem;
  overflow: hidden;
}
.data-card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.data-card__header h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #212529;
}
.data-card__body {
  padding: 1.25rem;
}

.btn-action {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.35rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.btn-action--view {
  background: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}
.btn-action--edit {
  background: rgba(30, 55, 153, 0.1);
  color: #1e3799;
}
.btn-action--delete {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
.btn-action--toggle {
  background: rgba(255, 193, 7, 0.1);
  color: #a07800;
}
.btn-action--pro-on {
  background: #fbbf24;
  color: #78350f;
  font-weight: 700;
}
.btn-action--pro-off {
  background: rgba(156, 163, 175, 0.15);
  color: #6b7280;
}
.btn-action:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.btn-primary-custom {
  background: #1e3799;
  border-color: #1e3799;
}
.btn-primary-custom:hover {
  background: #16286e;
  border-color: #16286e;
}

.btn-danger-custom {
  background: #eb2f06;
  border-color: #eb2f06;
}
.btn-danger-custom:hover {
  background: #b92505;
  border-color: #b92505;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  font-size: 0.875rem;
  border-color: #dee2e6;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease-in-out;
}
.form-control:focus, .form-select:focus {
  border-color: #1e3799;
  box-shadow: 0 0 0 0.15rem rgba(30, 55, 153, 0.15);
}

.form-card {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease-in-out;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.login-card {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease-in-out;
  padding: 2rem;
  border-radius: 0.75rem;
  max-width: 420px;
  width: 100%;
  border-top: 4px solid #1e3799;
}

.badge-status {
  font-size: 0.7rem;
  padding: 0.3em 0.6em;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-status--active {
  background: rgba(40, 167, 69, 0.15);
  color: #1e7e34;
}
.badge-status--inactive {
  background: rgba(108, 117, 125, 0.15);
  color: #6c757d;
}
.badge-status--sold {
  background: rgba(23, 162, 184, 0.15);
  color: #117a8b;
}
.badge-status--pending {
  background: rgba(255, 193, 7, 0.15);
  color: #876500;
}
.badge-status--admin {
  background: rgba(235, 47, 6, 0.15);
  color: #b92505;
}
.badge-status--pro {
  background: rgba(30, 55, 153, 0.15);
  color: #1e3799;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
}
.admin-pagination .page-item .page-link {
  border-radius: 0.35rem;
  border: 1px solid #dee2e6;
  color: #1e3799;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  transition: all 0.2s ease-in-out;
}
.admin-pagination .page-item .page-link:hover {
  background: #1e3799;
  color: #ffffff;
  border-color: #1e3799;
}
.admin-pagination .page-item.active .page-link {
  background: #1e3799;
  border-color: #1e3799;
  color: #ffffff;
}
.admin-pagination .page-item.disabled .page-link {
  color: #dee2e6;
  pointer-events: none;
}

.flash-messages {
  position: fixed;
  top: calc(60px + 1rem);
  right: 1rem;
  z-index: 9999;
  width: 300px;
}
.flash-messages .alert {
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

.login-panel-brand {
  flex: 0 0 42%;
  background: linear-gradient(160deg, #1e3799 0%, #0f1b4c 65%, #09112e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
.login-panel-brand::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.login-panel-brand::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(235, 47, 6, 0.08);
}
.login-panel-brand > div {
  position: relative;
  z-index: 1;
}

.login-brand-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
}

.login-flag {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.login-flag span {
  height: 5px;
  width: 42px;
  border-radius: 3px;
}
.login-flag__blue {
  background: #8397e7;
}
.login-flag__white {
  background: #ffffff;
}
.login-flag__red {
  background: #eb2f06;
}

.login-panel-form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #ffffff;
}

.login-form-box {
  width: 100%;
  max-width: 420px;
}

.login-heading {
  font-size: 1.75rem;
  font-weight: 800;
  color: #212529;
  margin-bottom: 0.25rem;
}

.login-form-box .form-control:focus {
  border-color: #1e3799;
  box-shadow: 0 0 0 0.2rem rgba(30, 55, 153, 0.15);
}

.welcome-banner {
  background: linear-gradient(135deg, #1e3799, #112059);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
}
.welcome-banner h4 {
  color: #ffffff;
  margin-bottom: 0.25rem;
}
.welcome-banner p {
  margin: 0;
}

.flag-stripe {
  display: flex;
  gap: 5px;
}
.flag-stripe span {
  height: 5px;
  width: 32px;
  border-radius: 3px;
  opacity: 0.85;
}
.flag-stripe span:nth-child(1) {
  background: #98a9eb;
}
.flag-stripe span:nth-child(2) {
  background: #ffffff;
}
.flag-stripe span:nth-child(3) {
  background: #eb2f06;
}

.stat-card {
  transition: all 0.2s ease-in-out;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}
.stat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-card__value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #212529;
  line-height: 1;
}
.stat-card__label {
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cursor-pointer {
  cursor: pointer;
}

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

.rounded-custom {
  border-radius: 0.5rem;
}

.shadow-custom {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
