.card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20), 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow .2s ease, transform .2s ease
}

.box {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20), 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow .2s ease, transform .2s ease
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24), 0 4px 16px rgba(0, 0, 0, 0.12)
}

.box:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24), 0 4px 16px rgba(0, 0, 0, 0.12)
}

.modal-content {
  border-radius: 15px
}

.modal-window>div {
  border-radius: 15px
}

.card-header {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px
}

.card-body {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px
}

.mini-stats-table {
  border-collapse: separate;
  border-spacing: 0 8px
}

.mini-stats-table tbody tr {
  background: #fff;
  transition: filter .2s ease, transform .2s ease;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.14)) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.08))
}

.mini-stats-table tbody tr:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.10))
}

.mini-stats-table td {
  padding: 6px 10px
}

.mini-stats-table tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px
}

.mini-stats-table tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .box {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.25)
}

body[data-theme="dark"] .card:hover,
body[data-theme="dark"] .box:hover {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 4px 18px rgba(0, 0, 0, 0.35)
}

body[data-theme="dark"] .mini-stats-table tbody tr {
  background: #3a4149;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.30))
}

body[data-theme="dark"] .mini-stats-table tbody tr:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3))
}

/* navbar & sidenav shadows and sidebar menu effects */
.navbar {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow .2s ease
}

.sidenav {
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.12), 1px 0 4px rgba(0, 0, 0, 0.06)
}

.sidenav {
  height: calc(100vh - 51px);
  overflow-y: auto;
  overscroll-behavior: contain
}

.sidenav .menu {
  display: block;
  border-radius: 10px;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease
}

.sidenav .menu:hover {
  background-color: rgba(0, 0, 0, 0.06);
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12)
}

.sidenav .menu.active {
  background-color: rgba(0, 0, 0, 0.08);
  transform: translateX(2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14)
}

body[data-theme="dark"] .navbar {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.30)
}

body[data-theme="dark"] .sidenav {
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45), 2px 0 10px rgba(0, 0, 0, 0.30)
}

body[data-theme="dark"] .sidenav .menu:hover {
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.40)
}

body[data-theme="dark"] .sidenav .menu.active {
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45)
}

.table.table-hover tbody tr {
  background: #fff;
  transition: filter .2s ease, transform .2s ease
}

.table.table-hover tbody tr:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.10))
}

.table.table-hover tbody td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px
}

.table.table-hover tbody td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px
}

body[data-theme="dark"] .table.table-hover tbody tr {
  background: #3a4149
}

body[data-theme="dark"] .table.table-hover tbody tr:hover {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3))
}

.table-responsive .table {
  border-collapse: collapse;
  border: 1px solid rgba(0,0,0,0.12)
}

.table-responsive .table th,
.table-responsive .table td {
  border: 1px solid rgba(0,0,0,0.12)
}

body[data-theme="dark"] .table-responsive .table,
body[data-theme="dark"] .table-responsive .table th,
body[data-theme="dark"] .table-responsive .table td {
  border-color: rgba(255,255,255,0.18)
}

.box-group-icon {
  width: auto !important;
  padding: 5px 5px
}

.box-group-area {
  width: auto !important
}

#notify {
  z-index: 99999
}

/* session select layout */
.sidenav .session-select {
  display: flex;
  justify-content: center;
  align-items: center
}

.sidenav .session-select .session-select-wrap {
  width: 100%;
  max-width: 280px;
  margin: 0 auto
}

.sidenav .session-select .session-select-input {
  width: 100%
}

@media (max-width: 600px) {
  .sidenav .session-select .session-select-wrap {
    max-width: 100%
  }
}

/* hotspot card stats layout: side-by-side on desktop */
@media (min-width: 992px) {
  #hotspot-card .card-body {
    display: flex;
    gap: 0px;
    align-items: stretch
  }

  #hotspot-card .card-body .box.box-bordered {
    flex: 1 1 0
  }
}

/* active item marker in dropdown container */
.sidenav .dropdown-container a.active {
  font-weight: 700
}

/* box header styling */
.box.box-bordered .box-header {
  font-weight: 700;
  padding: 0px 0px 5px 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12)
}

.box-body {
  padding-top: 5px
}

body[data-theme="dark"] .box.box-bordered .box-header {
  border-bottom-color: rgba(255, 255, 255, 0.15)
}

/* clickable stat affordance */
.stat-link {
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed transparent
}

.stat-link::after {
  content: "\f105";
  font-family: "FontAwesome";
  margin-left: 6px;
  opacity: .6;
  transition: transform .15s ease, opacity .15s ease
}

.stat-link:hover {
  border-bottom-color: currentColor
}

.stat-link:hover::after {
  transform: translateX(2px);
  opacity: 1
}

.stat-link:focus {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 2px
}

body[data-theme="dark"] .stat-link:focus {
  outline-color: rgba(255, 255, 255, 0.35)
}

/* language loading overlay */
.lang-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  color: #000
}

.lang-loading .lang-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px
}

.lang-loading .fa-spin {
  font-size: 40px
}

body[data-theme="dark"] .lang-loading {
  background: rgba(0, 0, 0, 0.65);
  color: #fff
}

/* navbar right alignment */
#navbar.navbar {
  display: flex;
  align-items: center
}

#navbar.navbar .navbar-left {
  display: flex;
  align-items: center
}

#navbar.navbar .navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center
}

#navbar.navbar .navbar-right,
#navbar.navbar .navbar-right * {
  color: #fff
}

@media (max-width: 600px) {
  #navbar.navbar #cpage {
    display: none !important
  }
}

/* ============================================
   RESELLER PAGES STYLING
   ============================================ */
/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem
}

.table-responsive>.table {
  margin-bottom: 0
}

/* Reseller summary stats grid */
.reseller-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px
}

@media (max-width: 600px) {
  .reseller-stats {
    grid-template-columns: repeat(2, 1fr)
  }
}

.reseller-stats .stat-box {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
  transition: transform .2s ease, box-shadow .2s ease
}

.reseller-stats .stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14)
}

.reseller-stats .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px
}

.reseller-stats .stat-label {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px
}

.reseller-stats .stat-box.success .stat-value {
  color: #28a745
}

.reseller-stats .stat-box.warning .stat-value {
  color: #ffc107
}

.reseller-stats .stat-box.danger .stat-value {
  color: #dc3545
}

.reseller-stats .stat-box.info .stat-value {
  color: #17a2b8
}

/* Prevent table cell wrapping on mobile; allow horizontal scroll */
@media (max-width: 600px) {
  .table-responsive .table th,
  .table-responsive .table td {
    white-space: nowrap;
  }
}

body[data-theme="dark"] .reseller-stats .stat-box {
  background: #3a4149;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35)
}

.alert {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere
}

body[data-theme="dark"] .reseller-stats .stat-box:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45)
}

/* Reseller form styling */
.reseller-form .form-group {
  margin-bottom: 12px
}

.reseller-form .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.875rem
}

.reseller-form .form-control {
  width: 100%;
  border-radius: 8px
}

/* Mobile: stack form layout */
@media (max-width: 600px) {
  .reseller-form .table td {
    display: block;
    width: 100%;
    padding: 4px 0
  }

  .reseller-form .table td:first-child {
    font-weight: 600;
    padding-top: 12px
  }

  .reseller-form .table tr {
    border-bottom: none
  }

  .reseller-form .btn {
    width: 100%;
    margin-top: 8px
  }
}

/* Card sections spacing */
.reseller-section {
  margin-top: 16px
}

.reseller-section .card-header h4 {
  margin: 0;
  font-size: 1rem
}

/* Collapsible card for history tables on mobile */
@media (max-width: 600px) {
  .reseller-section .card-body {
    padding: 10px
  }

  .reseller-section .table td,
  .reseller-section .table th {
    font-size: 0.8rem;
    padding: 6px 4px
  }
}

/* Alert improvements */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: none
}

.alert-success {
  background: rgba(40, 167, 69, 0.15);
  color: #155724
}

.alert-warning {
  background: rgba(255, 193, 7, 0.2);
  color: #856404
}

.alert-danger {
  background: rgba(220, 53, 69, 0.15);
  color: #721c24
}

.alert-info {
  background: rgba(23, 162, 184, 0.15);
  color: #0c5460
}

body[data-theme="dark"] .alert-success {
  background: rgba(40, 167, 69, 0.25);
  color: #7dcea0
}

body[data-theme="dark"] .alert-warning {
  background: rgba(255, 193, 7, 0.25);
  color: #f4d03f
}

body[data-theme="dark"] .alert-danger {
  background: rgba(220, 53, 69, 0.25);
  color: #f5b7b1
}

body[data-theme="dark"] .alert-info {
  background: rgba(23, 162, 184, 0.25);
  color: #76d7ea
}

/* Checkbox/session list styling */
.session-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.session-checkbox-list label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s ease
}

.session-checkbox-list label:hover {
  background: rgba(0, 0, 0, 0.1)
}

.session-checkbox-list input[type="checkbox"] {
  margin: 0
}

body[data-theme="dark"] .session-checkbox-list label {
  background: rgba(255, 255, 255, 0.08)
}

body[data-theme="dark"] .session-checkbox-list label:hover {
  background: rgba(255, 255, 255, 0.14)
}

/* Action buttons row */
.reseller-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px
}

.reseller-actions .btn {
  flex: 1 1 auto;
  min-width: 120px
}

@media (max-width: 600px) {
  .reseller-actions {
    flex-direction: column
  }

  .reseller-actions .btn {
    width: 100%
  }
}

/* Reseller credit bar */
.reseller-card .bg-grey {
  background: rgba(115, 129, 143, 0.15);
  border: 1px solid rgba(115, 129, 143, 0.3);
  border-radius: 6px;
  height: 22px
}

.reseller-card .prog-active {
  background-color: #4dbd74;
  color: #fff;
  height: 22px;
  line-height: 22px;
  border-radius: 6px;
  transition: width .3s ease
}

.reseller-card .prog-active .mr-l-5 {
  font-weight: 600
}

/* Batch Progress UI */
.batch-metrics {
  margin-bottom: 15px;
  font-size: 12px;
  font-family: monospace;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  color: #333;
  text-align: center;
}

.batch-log {
  max-height: 200px; 
  overflow-y: auto; 
  font-family: monospace; 
  font-size: 12px;
}

body[data-theme="dark"] .batch-metrics {
  background: #2f353a;
  color: #e4e7ea;
  border-color: #4e555b;
}
