*{
  box-sizing:border-box;
}
body{
  margin:0;
  font-family:Arial, sans-serif;
  background:#f6f7fb;
  color:#111827;
}
.admin-shell{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:100vh;
}
.sidebar{
  background:linear-gradient(180deg,#0f172a 0%, #111827 100%);
  color:#fff;
  padding:24px 18px;
  border-right:1px solid rgba(255,255,255,.04);
}
.brand{
  font-size:22px;
  font-weight:900;
}
.brand-sub{
  margin-top:6px;
  font-size:12px;
  color:#cbd5e1;
}
.side-nav{
  margin-top:28px;
  display:grid;
  gap:10px;
}
.tab-btn{
  width:100%;
  min-height:46px;
  border:none;
  border-radius:12px;
  background:#1e293b;
  color:#fff;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  text-align:left;
  padding:0 14px;
  text-decoration:none;
  display:flex;
  align-items:center;
  transition:all .18s ease;
}
.tab-btn:hover{
  transform:translateX(2px);
  background:#25344b;
}
.tab-btn.active{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6);
  color:#fff;
}
.tab-btn.active:hover{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6);
}

.tab-toggle-btn{
  justify-content:space-between;
  background:#1e293b;
}
.tab-arrow{
  font-size:14px;
  transition:transform .2s ease;
}
.tab-arrow.open{
  transform:rotate(180deg);
}
.sub-nav{
  display:none;
  padding:6px 0 10px 12px;
}
.sub-nav.open{
  display:block;
}
.sub-tab-btn{
  display:block;
  padding:10px 14px;
  margin:4px 0;
  border-radius:10px;
  text-decoration:none;
  color:#cbd5e1;
  font-size:14px;
  background:rgba(255,255,255,0.03);
}
.sub-tab-btn:hover{
  background:rgba(255,255,255,0.08);
  color:#fff;
}
.sub-tab-btn.active{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6);
  color:#fff;
}

.main{
  padding:28px;
  background:
    radial-gradient(circle at top right, rgba(124,58,237,.05), transparent 22%),
    #f6f7fb;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:22px;
}
.topbar h1{
  margin:0;
  font-size:34px;
  letter-spacing:-.02em;
}
.topbar p{
  margin:6px 0 0;
  color:#6b7280;
}
.primary-btn{
  min-height:44px;
  padding:0 16px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,#7c3aed,#8b5cf6);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(124,58,237,.16);
}
.primary-btn:hover{
  filter:brightness(1.03);
}

.cards-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.compact-cards{
  margin-bottom:16px;
}
.stat-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.compact-cards .stat-card{
  padding:16px 18px;
  border-radius:16px;
}
.stat-label{
  display:block;
  font-size:12px;
  color:#6b7280;
  font-weight:800;
}
.stat-value{
  display:block;
  margin-top:10px;
  font-size:28px;
  font-weight:900;
}
.compact-cards .stat-value{
  font-size:24px;
}

.overview-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:18px;
}
.panel{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:20px;
  padding:18px;
  box-shadow:0 14px 36px rgba(15,23,42,.06);
}
.panel h3{
  margin:0 0 14px;
}
.mini-stats{
  display:grid;
  gap:10px;
}
.mini-stats > div{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  background:#fafafa;
}
.mini-stats span{
  color:#6b7280;
  font-size:13px;
}
.mini-stats strong{
  font-size:15px;
}

.toolbar{
  display:flex;
  gap:10px;
  margin-bottom:14px;
  flex-wrap:wrap;
}
.search-input,
select{
  min-height:44px;
  padding:0 12px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
  min-width:220px;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}

.table-wrap{
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  overflow:auto;
}
table{
  width:100%;
  border-collapse:collapse;
  min-width:900px;
  background:#fff;
}
th, td{
  text-align:left;
  padding:12px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
  font-size:13px;
}
th{
  font-size:12px;
  color:#6b7280;
  font-weight:900;
  text-transform:uppercase;
  background:#f8fafc;
  position:sticky;
  top:0;
  z-index:1;
}
tbody tr:hover{
  background:#faf7ff;
}

.tab-panel{
  display:none;
}
.tab-panel.active{
  display:block;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  min-width:74px;
  padding:2px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}
.badge.pending{
  background:#fffbeb;
  color:#b45309;
  border:1px solid #fde68a;
}
.badge.success,
.badge.paid,
.badge.active{
  background:#ecfdf5;
  color:#15803d;
  border:1px solid #bbf7d0;
}
.badge.failed,
.badge.blocked{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}
.badge.cancelled,
.badge.expired,
.badge.inactive{
  background:#f3f4f6;
  color:#4b5563;
  border:1px solid #d1d5db;
}

.pagination-bar{
  margin-top:16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.mini-btn{
  min-height:38px;
  padding:0 14px;
  border:1px solid rgba(124,58,237,.18);
  border-radius:10px;
  background:#fff;
  color:#7c3aed;
  font-weight:800;
  cursor:pointer;
  transition:all .18s ease;
}
.mini-btn:hover{
  background:#f5f3ff;
}

.details-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:16px;
}
.details-head h3{
  margin:0;
}
.details-head p{
  margin:6px 0 0;
  color:#6b7280;
}
.details-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.detail-box{
  padding:14px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:#fafafa;
}
.detail-box span{
  display:block;
  font-size:12px;
  color:#6b7280;
  font-weight:700;
}
.detail-box strong{
  display:block;
  margin-top:8px;
  font-size:15px;
}

.small-note,
small{
  color:#6b7280;
  font-size:11px;
}
.thin-table table{
  min-width:1250px;
}
.thin-table th,
.thin-table td{
  padding:11px 10px;
  font-size:12px;
  vertical-align:middle;
}
.thin-text{
  max-width:180px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.thin-table td small{
  display:inline-block;
  margin-top:3px;
  font-size:11px;
  color:#6b7280;
}

.icon-btn{
  width:28px;
  height:28px;
  border:none;
  border-radius:8px;
  background:#eef2ff;
  color:#4338ca;
  cursor:pointer;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.icon-btn:hover{
  background:#e0e7ff;
}

.action-btn-group{
  display:flex;
  align-items:center;
  gap:8px;
}
.balance-action-btn,
.history-action-btn{
  min-width:36px;
  height:32px;
  border:none;
  border-radius:9px;
  cursor:pointer;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.balance-action-btn{
  background:#eef2ff;
  color:#2563eb;
  font-size:20px;
}
.balance-action-btn:hover{
  background:#dbeafe;
}
.history-action-btn{
  background:#fff7ed;
  color:#ea580c;
  font-size:15px;
}
.history-action-btn:hover{
  background:#ffedd5;
}

.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
}
.modal-overlay.show{
  display:flex;
}
.modal-card{
  position:relative;
  width:100%;
  max-width:660px;
  background:#fff;
  border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,.18);
  padding:28px 28px 24px;
}
.modal-close{
  position:absolute;
  top:14px;
  right:16px;
  border:none;
  background:transparent;
  font-size:28px;
  color:#b6b6b6;
  cursor:pointer;
}
.modal-title{
  margin:0;
  font-size:16px;
  font-weight:500;
  color:#374151;
}
.modal-divider{
  height:1px;
  background:#e5e7eb;
  margin:18px 0 22px;
}
.modal-subtitle{
  font-size:18px;
  font-weight:500;
  color:#444;
  margin-bottom:18px;
}
.modal-user-box{
  font-size:14px;
  color:#374151;
  line-height:1.7;
  margin-bottom:18px;
}
.modal-label{
  display:block;
  font-size:14px;
  font-weight:700;
  margin-bottom:8px;
  color:#374151;
}
.modal-input{
  width:100%;
  height:48px;
  border:1px solid #cfd6df;
  border-radius:2px;
  padding:0 14px;
  font-size:16px;
  outline:none;
}
.modal-help{
  margin-top:18px;
  font-size:14px;
  color:#444;
  line-height:1.7;
}
.modal-submit-btn{
  margin-top:22px;
  min-width:140px;
  height:38px;
  border:none;
  border-radius:4px;
  background:#16a34a;
  color:#fff;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}
.modal-submit-btn:hover{
  background:#15803d;
}
.modal-msg{
  margin-top:14px;
  font-size:14px;
  font-weight:700;
}
.modal-msg.success{
  color:#15803d;
}
.modal-msg.error{
  color:#b91c1c;
}

@media (max-width:980px){
  .admin-shell{
    grid-template-columns:1fr;
  }
  .sidebar{
    padding:18px;
  }
  .cards-grid,
  .overview-grid,
  .details-grid{
    grid-template-columns:1fr;
  }
  .main{
    padding:18px;
  }
  .topbar{
    flex-direction:column;
    align-items:stretch;
  }
  .topbar h1{
    font-size:28px;
  }
}


/* ===== OWNER MOBILE POLISH START ===== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  flex-shrink: 0;
}

.main {
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f7f8ff;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 900px;
}

.thin-table table {
  min-width: 1150px;
}

.panel,
.stat-card,
.modal-card {
  min-width: 0;
  overflow: hidden;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.toolbar .search-input {
  flex: 1 1 260px;
  min-width: 0;
}

.toolbar select {
  flex: 0 1 200px;
  min-width: 0;
}

.toolbar .primary-btn {
  flex: 0 0 auto;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mobile-nav-btn {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(131, 88, 255, 0.18);
  border-radius: 14px;
  background: #fff;
  color: #20243a;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  cursor: pointer;
}

.mobile-nav-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 28, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1090;
}

#paymentsSubNav.open {
  display: block;
}

@media (max-width: 980px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(84vw, 320px);
    max-width: 320px;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 1100;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    padding-bottom: 24px;
  }

  body.owner-sidebar-open .sidebar {
    transform: translateX(0) !important;
  }

  body.owner-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 0 14px;
    margin-bottom: 8px;
  }

  .topbar > div:first-child {
    flex: 1 1 calc(100% - 58px);
    min-width: 0;
  }

  .topbar h1 {
    margin: 0 0 4px;
    font-size: 2rem;
    line-height: 1.1;
  }

  .topbar p {
    margin: 0;
  }

  .topbar .primary-btn {
    width: 100%;
  }

  .mobile-nav-btn {
    display: inline-flex;
  }

  .cards-grid,
  .overview-grid {
    grid-template-columns: 1fr !important;
  }

  .toolbar > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .toolbar .primary-btn,
  .toolbar .mini-btn {
    width: 100%;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn,
  .sub-tab-btn,
  .tab-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
  }

  .table-wrap {
    margin: 0 -2px;
    padding-bottom: 4px;
  }
}
/* ===== OWNER MOBILE POLISH END ===== */


/* ===== OWNER ADMIN FINAL MOBILE FIX ===== */
.row-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.success-btn{
  background:#ecfdf5 !important;
  color:#047857 !important;
  border:1px solid #bbf7d0 !important;
}

.danger-btn{
  background:#fef2f2 !important;
  color:#dc2626 !important;
  border:1px solid #fecaca !important;
}

.muted-text{
  color:#94a3b8;
  font-size:12px;
  font-weight:800;
}

.sidebar .brand,
.sidebar .brand-sub{
  word-break:break-word;
}

.side-nav a.tab-btn,
.side-nav button.tab-btn{
  text-decoration:none !important;
}

.side-nav a.tab-btn.active,
.side-nav button.tab-btn.active,
.side-nav .tab-btn.active{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6) !important;
  color:#fff !important;
}

@media(max-width:980px){
  .admin-shell{
    display:block !important;
    min-height:100vh !important;
  }

  .sidebar{
    position:fixed !important;
    left:0 !important;
    top:0 !important;
    bottom:0 !important;
    width:min(86vw,330px) !important;
    max-width:330px !important;
    height:100dvh !important;
    transform:translateX(-105%) !important;
    transition:transform .26s ease !important;
    z-index:9999 !important;
    overflow-y:auto !important;
    box-shadow:0 28px 80px rgba(15,23,42,.35) !important;
    border-right:1px solid rgba(255,255,255,.08) !important;
  }

  body.owner-sidebar-open .sidebar{
    transform:translateX(0) !important;
  }

  .sidebar-backdrop{
    position:fixed !important;
    inset:0 !important;
    background:rgba(15,23,42,.55) !important;
    z-index:9998 !important;
    opacity:0 !important;
    pointer-events:none !important;
    transition:opacity .22s ease !important;
  }

  body.owner-sidebar-open .sidebar-backdrop{
    opacity:1 !important;
    pointer-events:auto !important;
  }

  .main{
    width:100% !important;
    max-width:100% !important;
    padding:16px !important;
    overflow-x:hidden !important;
  }

  .topbar{
    position:relative !important;
    display:grid !important;
    grid-template-columns:54px minmax(0,1fr) !important;
    gap:12px !important;
    align-items:center !important;
    justify-items:stretch !important;
    text-align:left !important;
    padding:14px 0 16px !important;
    background:transparent !important;
    z-index:10 !important;
  }

  .topbar .mobile-nav-btn{
    grid-column:1 !important;
    grid-row:1 !important;
    justify-self:start !important;
    align-self:start !important;
    margin:0 !important;
  }

  .topbar > div{
    grid-column:2 !important;
    grid-row:1 !important;
    min-width:0 !important;
  }

  .topbar h1{
    font-size:30px !important;
    line-height:1.08 !important;
    margin:0 0 4px !important;
    text-align:left !important;
  }

  .topbar p{
    font-size:15px !important;
    line-height:1.45 !important;
    margin:0 !important;
    text-align:left !important;
  }

  .topbar > .primary-btn{
    grid-column:1 / -1 !important;
    grid-row:2 !important;
    width:100% !important;
    height:48px !important;
    justify-content:center !important;
    margin-top:4px !important;
  }

  .mobile-nav-btn{
    display:inline-flex !important;
    width:50px !important;
    height:50px !important;
    border-radius:16px !important;
    border:1px solid rgba(124,58,237,.16) !important;
    background:#fff !important;
    color:#111827 !important;
    box-shadow:0 10px 24px rgba(15,23,42,.08) !important;
    align-items:center !important;
    justify-content:center !important;
    flex-direction:column !important;
    gap:5px !important;
  }

  .mobile-nav-btn span{
    width:22px !important;
    height:3px !important;
    background:currentColor !important;
    border-radius:999px !important;
    display:block !important;
  }

  .panel{
    border-radius:20px !important;
    padding:14px !important;
    overflow:hidden !important;
  }

  .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
  }

  .cards-grid,
  .compact-cards,
  .overview-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  .stat-card{
    border-radius:20px !important;
    padding:18px !important;
  }

  .table-wrap{
    width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    border-radius:16px !important;
  }

  .table-wrap table{
    min-width:980px !important;
  }

  .thin-table table{
    min-width:1180px !important;
  }

  .pagination-bar{
    display:flex !important;
    gap:10px !important;
    align-items:center !important;
    flex-wrap:wrap !important;
  }

  .pagination-bar .mini-btn{
    min-width:72px !important;
  }
}
/* ===== END OWNER ADMIN FINAL MOBILE FIX ===== */

/* ===== PAYMENT SUBNAV FINAL FIX ===== */
.sidebar .sub-nav{
  display:none;
  gap:7px;
  margin:6px 0 10px;
  padding-left:10px;
}

.sidebar .sub-nav.open{
  display:grid !important;
}

.sidebar .sub-tab-btn{
  display:flex !important;
  align-items:center !important;
  min-height:38px !important;
  padding:9px 13px !important;
  border-radius:11px !important;
  text-decoration:none !important;
  color:#cbd5e1 !important;
  font-weight:800 !important;
  background:rgba(255,255,255,.04) !important;
}

.sidebar .sub-tab-btn.active,
.sidebar .sub-tab-btn:hover{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6) !important;
  color:#fff !important;
}

.sidebar .tab-toggle-btn{
  cursor:pointer !important;
  justify-content:space-between !important;
}

.sidebar .tab-arrow.open{
  transform:rotate(180deg);
}
/* ===== END PAYMENT SUBNAV FINAL FIX ===== */

/* ===== OWNER MONTHLY SUMMARY FIX ===== */
.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.month-input{
  height:44px;
  border-radius:13px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  padding:0 12px;
  color:#111827;
  font-weight:850;
  outline:none;
}

.month-input:focus{
  border-color:rgba(124,58,237,.45);
  box-shadow:0 0 0 4px rgba(124,58,237,.08);
}

@media(max-width:980px){
  .topbar-actions{
    grid-column:1 / -1 !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .month-input,
  .topbar-actions .primary-btn{
    width:100% !important;
  }
}
/* ===== END OWNER MONTHLY SUMMARY FIX ===== */

/* ===== PAYMENT MONTH SEARCH BUTTON ===== */
.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.month-input{
  height:44px;
  border-radius:13px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  padding:0 12px;
  color:#111827;
  font-weight:900;
  outline:none;
}

.month-input:focus{
  border-color:rgba(124,58,237,.45);
  box-shadow:0 0 0 4px rgba(124,58,237,.08);
}

#summaryMonthSearchBtn{
  background:linear-gradient(135deg,#7c3aed,#8b5cf6);
  color:#fff;
}

@media(max-width:980px){
  .topbar-actions{
    grid-column:1 / -1 !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .topbar-actions .primary-btn,
  .month-input{
    width:100% !important;
  }
}
/* ===== END PAYMENT MONTH SEARCH BUTTON ===== */

/* ===== ADMIN PROXIES STATS + PAGINATION ===== */
.proxy-admin-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}

.proxy-admin-stat-card{
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.proxy-admin-stat-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:5px;
}

.proxy-admin-stat-card strong{
  display:block;
  color:#111827;
  font-size:24px;
  font-weight:950;
  line-height:1;
}

#proxyPageInfo{
  font-weight:900;
  color:#111827;
}

@media(max-width:980px){
  .proxy-admin-stats{
    grid-template-columns:1fr;
    gap:10px;
  }

  .proxy-admin-stat-card{
    padding:13px 14px;
  }

  .proxy-admin-stat-card strong{
    font-size:22px;
  }
}
/* ===== END ADMIN PROXIES STATS + PAGINATION ===== */

.proxy-package-cell strong{
  display:block;
  font-weight:800;
  color:#111827;
  white-space:nowrap;
}

/* ===== ADMIN PROXIES FINAL CLEAN UI ===== */
.proxies-panel{
  overflow:hidden !important;
}

.proxies-toolbar{
  display:grid !important;
  grid-template-columns:minmax(240px,1fr) 180px 150px !important;
  gap:10px !important;
  align-items:center !important;
}

.proxies-toolbar .search-input,
.proxies-toolbar select,
.proxies-toolbar .primary-btn{
  height:44px !important;
  min-width:0 !important;
}

.proxies-table-wrap{
  margin-top:12px !important;
  border-radius:16px !important;
  overflow-x:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

.admin-proxies-table{
  min-width:1180px !important;
}

.admin-proxies-table th,
.admin-proxies-table td{
  vertical-align:middle !important;
}

.proxy-package-cell strong{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:5px 10px;
  border-radius:999px;
  background:#f4edff;
  color:#7c3aed;
  border:1px solid #eadcff;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}

.proxies-pagination{
  margin-top:12px !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}

#proxyPageInfo{
  font-weight:950 !important;
  color:#111827 !important;
}

@media(max-width:980px){
  .proxies-toolbar{
    grid-template-columns:1fr !important;
  }

  .proxies-toolbar .search-input,
  .proxies-toolbar select,
  .proxies-toolbar .primary-btn{
    width:100% !important;
  }

  .admin-proxies-table{
    min-width:1120px !important;
    font-size:12px !important;
  }

  .proxies-pagination{
    justify-content:flex-start !important;
  }

  #proxyPageInfo{
    width:100% !important;
    order:-1 !important;
    font-size:14px !important;
  }
}
/* ===== END ADMIN PROXIES FINAL CLEAN UI ===== */

/* ===== RealProxy Admin System Logs Button Polish START ===== */
.owner-nav a.rp-admin-logs-link,
.sidebar a.rp-admin-logs-link,
nav a.rp-admin-logs-link,
.rp-admin-logs-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 45px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #1e293b !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.owner-nav a.rp-admin-logs-link:hover,
.sidebar a.rp-admin-logs-link:hover,
nav a.rp-admin-logs-link:hover,
.rp-admin-logs-link:hover {
  background: #26344a !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.owner-nav a.rp-admin-logs-link.active,
.sidebar a.rp-admin-logs-link.active,
nav a.rp-admin-logs-link.active,
.rp-admin-logs-link.active,
body.logs-page .rp-admin-logs-link {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
/* ===== RealProxy Admin System Logs Button Polish END ===== */

/* ===== RealProxy Admin Mobile Sidebar Fixed Left START ===== */
@media (max-width: 900px) {
  .owner-layout {
    display: grid !important;
    grid-template-columns: 245px minmax(720px, 1fr) !important;
    min-height: 100vh !important;
    width: max-content !important;
    min-width: 100vw !important;
  }

  .owner-sidebar {
    position: sticky !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 30 !important;
    width: 245px !important;
    min-width: 245px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    padding: 18px 10px !important;
  }

  .owner-main {
    min-width: 720px !important;
    padding: 16px !important;
    overflow: visible !important;
  }

  body {
    overflow-x: auto !important;
  }

  .owner-nav a,
  .owner-nav a.rp-admin-logs-link {
    width: 100% !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 11px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .owner-brand h2 {
    font-size: 20px !important;
  }

  .owner-brand small {
    font-size: 11px !important;
  }
}
/* ===== RealProxy Admin Mobile Sidebar Fixed Left END ===== */

/* ===== Override old logs fixed-left sidebar on mobile START ===== */
@media(max-width:900px){
  body.logs-page .owner-layout{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }

  body.logs-page .owner-main{
    width:100%!important;
    min-width:0!important;
    padding:14px!important;
  }

  body.logs-page .owner-sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    z-index:200000!important;
    width:min(82vw,280px)!important;
    height:100dvh!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
  }

  body.logs-page .owner-sidebar.rp-open{
    transform:translateX(0)!important;
  }
}
/* ===== Override old logs fixed-left sidebar on mobile END ===== */
