/* LinkBike Admin — modern theme overlay (AdminLTE 3) */
:root {
  --lb-brand: #49c5c5;
  --lb-brand-dark: #3aa8a8;
  --lb-sidebar: #1e293b;
  --lb-sidebar-hover: #334155;
  --lb-surface: #f1f5f9;
  --lb-card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
  --lb-radius: 12px;
}

body.lb-admin-theme {
  font-family: "Inter", "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--lb-surface);
}

body.lb-admin-theme .content-wrapper {
  background: var(--lb-surface);
}

body.lb-admin-theme .main-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, var(--lb-sidebar) 100%) !important;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.15);
}

/* Fixed sidebar: main content scrolls; nav stays in view (AdminLTE layout-fixed) */
body.lb-admin-theme.layout-fixed .main-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  z-index: 1038;
}

body.lb-admin-theme .sidebar.lb-sidebar-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 3.5rem);
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
}

body.lb-admin-theme .lb-sidebar-main {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

body.lb-admin-theme .lb-sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.35rem;
}

body.lb-admin-theme .lb-sidebar-footer .nav-link {
  border-radius: 8px;
  margin: 2px 0.5rem;
}

body.lb-admin-theme .lb-change-password-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #cbd5e1 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.lb-admin-theme .lb-change-password-link:hover {
  color: #f8fafc !important;
}

body.lb-admin-theme .brand-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1rem 0.75rem;
}

body.lb-admin-theme .brand-text {
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #f8fafc !important;
}

body.lb-admin-theme .user-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.lb-admin-theme .nav-sidebar .nav-link {
  border-radius: 8px;
  margin: 2px 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

body.lb-admin-theme .nav-sidebar .nav-link:not(.active):hover {
  background: var(--lb-sidebar-hover) !important;
  color: #f1f5f9 !important;
}

body.lb-admin-theme .nav-sidebar .nav-link.active,
body.lb-admin-theme .nav-primary.active {
  background: var(--lb-brand) !important;
  color: #0f172a !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(73, 197, 197, 0.35);
}

body.lb-admin-theme .nav-sidebar .nav-link.active .nav-icon,
body.lb-admin-theme .nav-primary.active .nav-icon {
  color: #0f172a !important;
}

body.lb-admin-theme .nav-sidebar .nav-header {
  color: #94a3b8 !important;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

/* Submenu: no extra indent (keeps icons visible when sidebar is collapsed) */
body.lb-admin-theme .nav-sidebar .nav-treeview {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

body.lb-admin-theme .nav-treeview > .nav-item > .nav-link {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

body.lb-admin-theme .nav-treeview > .nav-item > .nav-link .nav-icon {
  margin-left: 0;
  margin-right: 0.5rem;
  text-align: center;
  width: 1.6rem;
}

@media (min-width: 992px) {
  body.lb-admin-theme.sidebar-mini.sidebar-collapse .nav-sidebar .nav-treeview > .nav-item > .nav-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  body.lb-admin-theme.sidebar-mini.sidebar-collapse .nav-sidebar .nav-treeview > .nav-item > .nav-link .nav-icon {
    margin-right: 0 !important;
  }
}

body.lb-admin-theme .content-header {
  padding: 1.25rem 0.5rem 0.5rem;
}

body.lb-admin-theme .content-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

body.lb-admin-theme .card {
  border: none;
  border-radius: var(--lb-radius);
  box-shadow: var(--lb-card-shadow);
  margin-bottom: 1.25rem;
}

body.lb-admin-theme .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  border-radius: var(--lb-radius) var(--lb-radius) 0 0 !important;
  padding: 1rem 1.25rem;
}

body.lb-admin-theme .card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
}

body.lb-admin-theme .lb-stat-card {
  border-radius: var(--lb-radius);
  padding: 1.25rem 1.35rem;
  color: #fff;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--lb-card-shadow);
}

body.lb-admin-theme .lb-stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

body.lb-admin-theme .lb-stat-card .lb-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

body.lb-admin-theme .lb-stat-card .lb-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.35rem 0;
}

body.lb-admin-theme .lb-stat-card .lb-stat-sub {
  font-size: 0.9rem;
  opacity: 0.9;
}

body.lb-admin-theme .lb-stat-card .lb-stat-note {
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 0.88;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

body.lb-admin-theme .lb-stat-card .lb-stat-icon {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 2rem;
  opacity: 0.35;
}

body.lb-admin-theme .lb-bg-teal { background: linear-gradient(135deg, #49c5c5, #2dd4bf); }
body.lb-admin-theme .lb-bg-indigo { background: linear-gradient(135deg, #6366f1, #818cf8); }
body.lb-admin-theme .lb-bg-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #422006; }
body.lb-admin-theme .lb-bg-slate { background: linear-gradient(135deg, #475569, #64748b); }
body.lb-admin-theme .lb-bg-rose { background: linear-gradient(135deg, #e11d48, #fb7185); }
body.lb-admin-theme .lb-bg-violet { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

body.lb-admin-theme .btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 0.45rem 1rem;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

body.lb-admin-theme .btn-primary,
body.lb-admin-theme .btn-success {
  box-shadow: 0 2px 6px rgba(73, 197, 197, 0.25);
}

body.lb-admin-theme .btn:hover {
  transform: translateY(-1px);
}

body.lb-admin-theme .table {
  border-collapse: separate;
  border-spacing: 0;
}

body.lb-admin-theme .table thead th {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0 !important;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.lb-admin-theme .table tbody tr:hover {
  background: #f8fafc;
}

body.lb-admin-theme .table-bordered {
  border-radius: var(--lb-radius);
  overflow: visible;
  border: 1px solid #e2e8f0 !important;
}

/* Wide tables (e.g. packages): horizontal scroll on wrapper, not clipped table */
body.lb-admin-theme .lb-datatable-scroll,
body.lb-admin-theme .card-body > .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

body.lb-admin-theme .lb-datatable-scroll {
  border: 1px solid #e2e8f0;
  border-radius: var(--lb-radius);
}

body.lb-admin-theme .lb-datatable-scroll > .table {
  margin-bottom: 0;
  min-width: 1100px;
}

body.lb-admin-theme .dataTables_wrapper .dataTables_scroll {
  overflow-x: auto;
}

body.lb-admin-theme .dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto !important;
}

body.lb-admin-theme .dataTables_wrapper .dataTables_filter input,
body.lb-admin-theme .form-control,
body.lb-admin-theme .select2-container--default .select2-selection--single {
  border-radius: 8px !important;
  border-color: #cbd5e1 !important;
}

body.lb-admin-theme .main-header {
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.lb-admin-theme .lb-dashboard-intro {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 0;
}

body.lb-admin-theme .chart-container {
  position: relative;
  height: 280px;
}

/* Compact inline action buttons in DataTables (packages, rides, orders) */
body.lb-admin-theme .lb-table-actions,
body.lb-admin-theme .btn-group.inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

body.lb-admin-theme .lb-table-actions .btn,
body.lb-admin-theme .btn-group.inline .btn-action,
body.lb-admin-theme td .btn-action {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

body.lb-admin-theme .lb-table-actions .btn .nav-icon,
body.lb-admin-theme .btn-action .nav-icon {
  margin-right: 0.2rem;
}

/* List tables (orders, users, top-ups, etc.): higher-contrast links & action buttons */
body.lb-admin-theme {
  --lb-table-accent: #6c67af;
  --lb-table-accent-hover: #565192;
  --lb-table-accent-soft: rgba(108, 103, 175, 0.12);
}

body.lb-admin-theme .table tbody td a:not(.btn),
body.lb-admin-theme .dataTables_wrapper .table tbody td a:not(.btn) {
  color: var(--lb-table-accent) !important;
  font-weight: 600;
}

body.lb-admin-theme .table tbody td a:not(.btn):hover,
body.lb-admin-theme .dataTables_wrapper .table tbody td a:not(.btn):hover {
  color: var(--lb-table-accent-hover) !important;
  text-decoration: underline;
}

body.lb-admin-theme .table .btn-outline-success,
body.lb-admin-theme .table .btn-outline-primary,
body.lb-admin-theme .dataTables_wrapper .table .btn-outline-success,
body.lb-admin-theme .dataTables_wrapper .table .btn-outline-primary,
body.lb-admin-theme .lb-datatable-scroll .table .btn-outline-success,
body.lb-admin-theme .lb-datatable-scroll .table .btn-outline-primary,
body.lb-admin-theme .lb-table-actions .btn-outline-success,
body.lb-admin-theme .lb-table-actions .btn-outline-primary {
  color: var(--lb-table-accent) !important;
  border-color: var(--lb-table-accent) !important;
  background-color: transparent;
}

body.lb-admin-theme .table .btn-outline-success:hover,
body.lb-admin-theme .table .btn-outline-primary:hover,
body.lb-admin-theme .dataTables_wrapper .table .btn-outline-success:hover,
body.lb-admin-theme .dataTables_wrapper .table .btn-outline-primary:hover,
body.lb-admin-theme .lb-datatable-scroll .table .btn-outline-success:hover,
body.lb-admin-theme .lb-datatable-scroll .table .btn-outline-primary:hover,
body.lb-admin-theme .lb-table-actions .btn-outline-success:hover,
body.lb-admin-theme .lb-table-actions .btn-outline-primary:hover {
  color: #fff !important;
  background-color: var(--lb-table-accent) !important;
  border-color: var(--lb-table-accent) !important;
}

body.lb-admin-theme .table .btn-outline-success:focus,
body.lb-admin-theme .table .btn-outline-primary:focus,
body.lb-admin-theme .lb-table-actions .btn-outline-success:focus,
body.lb-admin-theme .lb-table-actions .btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem var(--lb-table-accent-soft);
}

body.lb-admin-theme .dataTables_wrapper .page-link {
  color: var(--lb-table-accent) !important;
}

body.lb-admin-theme .dataTables_wrapper .page-item.active .page-link {
  background-color: var(--lb-table-accent) !important;
  border-color: var(--lb-table-accent) !important;
  color: #fff !important;
}
