* { box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', Arial, sans-serif; background: #f4f7fb; color: #334155; padding-bottom: 80px; }
a { text-decoration: none; }

.auth-bg { background: linear-gradient(-45deg,#0f172a,#1e293b,#0c4a6e,#0369a1); background-size: 400% 400%; animation: gradAnim 15s ease infinite; }
@keyframes gradAnim { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.auth-card { background: rgba(255,255,255,.98); border-radius: 28px; padding: 36px 28px; box-shadow: 0 25px 60px rgba(0,0,0,.3); }
.auth-logo { width: 64px; height: 64px; background: linear-gradient(135deg,#3b82f6,#1d4ed8); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; box-shadow: 0 8px 24px rgba(59,130,246,.4); }
.auth-input-group { position: relative; }
.auth-input-group i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; pointer-events: none; }
.auth-input { padding-left: 42px !important; border-radius: 12px !important; border: 1.5px solid #e2e8f0 !important; background: #f8fafc !important; font-size: 14px !important; transition: border-color .2s !important; }
.auth-input:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,.12) !important; }

.header { background: linear-gradient(135deg,#0f172a 0%,#1e40af 100%); color: #fff; padding: 28px 16px 70px; border-radius: 0 0 28px 28px; margin-bottom: -52px; box-shadow: 0 10px 30px rgba(30,64,175,.25); position: relative; overflow: hidden; }
.header::before { content:''; position:absolute; top:-40px; right:-40px; width:180px; height:180px; background:rgba(255,255,255,.04); border-radius:50%; }
.header::after { content:''; position:absolute; bottom:-60px; left:-20px; width:220px; height:220px; background:rgba(255,255,255,.03); border-radius:50%; }
.main-wrap { padding: 0 12px; position: relative; z-index: 10; max-width: 600px; margin: 0 auto; }

.balance-box { background: #fff; padding: 20px 24px; border-radius: 24px; box-shadow: 0 8px 28px rgba(0,0,0,.07); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.balance-label { font-size: 12px; color: #64748b; font-weight: 700; margin-bottom: 4px; }
.balance-amount { font-size: 28px; font-weight: 900; color: #0f172a; letter-spacing: -1px; line-height: 1; }

.card-m { background: #fff; border: none; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.05); margin-bottom: 18px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card-m:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.card-m .card-header-m { padding: 14px 18px; border-bottom: 1px solid #f1f5f9; font-weight: 800; font-size: 14px; color: #1e293b; display: flex; align-items: center; gap: 8px; }

.badge-member { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 30px; padding: 4px 12px; font-size: 11px; font-weight: 700; display: inline-block; margin-bottom: 6px; backdrop-filter: blur(8px); }

.nav-bottom { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,.08); display: flex; justify-content: space-around; padding: 8px 0 10px; z-index: 1000; border-radius: 20px 20px 0 0; }
.nav-item { text-align: center; color: #94a3b8; text-decoration: none; font-size: 11px; font-weight: 700; flex: 1; padding: 6px 0; transition: color .2s; }
.nav-item i { font-size: 20px; display: block; margin-bottom: 4px; }
.nav-item.active { color: #3b82f6; }

#loadingOverlay { display: none; position: fixed; inset: 0; background: rgba(255,255,255,.95); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
#loadingOverlay.show { display: flex; }
.loading-text { font-size: 15px; font-weight: 700; color: #1e293b; margin-top: 12px; }

.pkg-card { background: #fff; border-radius: 18px; border: 2px solid #e2e8f0; padding: 18px; cursor: pointer; transition: all .2s; position: relative; }
.pkg-card:hover { border-color: #3b82f6; box-shadow: 0 6px 20px rgba(59,130,246,.15); transform: translateY(-2px); }
.pkg-card .pkg-type { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 10px; border-radius: 30px; display: inline-block; margin-bottom: 8px; }
.pkg-card .pkg-type.ssh { background: #dcfce7; color: #166534; }
.pkg-card .pkg-type.vmess { background: #eff6ff; color: #1d4ed8; }
.pkg-card .pkg-type.vless { background: #fef3c7; color: #92400e; }
.pkg-card .pkg-type.trojan { background: #fce7f3; color: #9d174d; }
.pkg-card .pkg-name { font-weight: 800; font-size: 15px; color: #0f172a; margin-bottom: 4px; }
.pkg-card .pkg-server { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.pkg-card .pkg-price { font-size: 20px; font-weight: 900; color: #3b82f6; }
.pkg-card .pkg-dur { font-size: 11px; color: #94a3b8; font-weight: 600; }

.tab-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-nav button { padding: 7px 16px; border-radius: 30px; border: 1.5px solid #e2e8f0; background: #fff; font-weight: 700; font-size: 12px; color: #64748b; cursor: pointer; transition: all .2s; }
.tab-nav button.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }

.info-row { display: flex; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .lbl { width: 110px; flex-shrink: 0; color: #64748b; font-weight: 700; font-size: 12px; }
.info-row .val { font-weight: 700; color: #0f172a; flex: 1; word-break: break-all; }

.vpn-link-box { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; font-family: monospace; font-size: 11px; color: #334155; word-break: break-all; max-height: 120px; overflow-y: auto; position: relative; }
.btn-copy-sm { font-size: 11px; border-radius: 8px; font-weight: 700; border: 1px solid #3b82f6; color: #3b82f6; background: transparent; padding: 3px 10px; cursor: pointer; transition: all .2s; }
.btn-copy-sm:hover { background: #eff6ff; }
.btn-copy-sm.copied { background: #dcfce7; border-color: #16a34a; color: #16a34a; }

.status-badge { padding: 4px 12px; border-radius: 30px; font-size: 11px; font-weight: 700; }
.status-badge.aktif { background: #dcfce7; color: #166534; }
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.expired { background: #fee2e2; color: #991b1b; }
.status-badge.sukses { background: #dcfce7; color: #166534; }
.status-badge.batal { background: #f1f5f9; color: #64748b; }

.mut-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #f1f5f9; }
.mut-item:last-child { border-bottom: none; }
.mut-icon { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.mut-icon.in { background: #dcfce7; color: #16a34a; }
.mut-icon.out { background: #fee2e2; color: #dc2626; }
.mut-label { font-weight: 700; font-size: 13px; color: #0f172a; }
.mut-time { font-size: 11px; color: #94a3b8; }
.mut-amount { margin-left: auto; font-weight: 800; font-size: 14px; }
.mut-amount.in { color: #16a34a; }
.mut-amount.out { color: #dc2626; }

.qris-box { text-align: center; }
.qris-box img { max-width: 230px; border-radius: 16px; border: 3px solid #e2e8f0; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.qris-amount { font-size: 32px; font-weight: 900; color: #0f172a; letter-spacing: -1px; }

.spinner-pulse { width: 10px; height: 10px; background: #3b82f6; border-radius: 50%; display: inline-block; animation: pulse 1.2s ease infinite; }

@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

@keyframes popIn { 0%{transform:scale(.1);opacity:0} 60%{transform:scale(1.2);opacity:1} 100%{transform:scale(1)} }
.pop-in { animation: popIn .5s ease forwards; }

.admin-wrap { display: flex; min-height: 100vh; background: #f4f7fb; }
.admin-sidebar { width: 260px; background: #0f172a; min-height: 100vh; position: fixed; top: 0; left: 0; z-index: 200; display: flex; flex-direction: column; transition: transform .3s; }
.admin-sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 12px; }
.admin-sidebar-brand .brand-icon { width: 40px; height: 40px; background: linear-gradient(135deg,#3b82f6,#6366f1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.admin-sidebar-brand .brand-name { font-weight: 800; font-size: 17px; color: #fff; }
.admin-nav { padding: 14px 10px; flex: 1; overflow-y: auto; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #94a3b8; font-weight: 600; font-size: 13px; margin-bottom: 2px; transition: all .2s; }
.admin-nav a i { width: 20px; text-align: center; font-size: 15px; }
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.admin-nav a.active { background: rgba(59,130,246,.15); color: #60a5fa; border-left: 3px solid #3b82f6; }
.admin-nav .nav-section { font-size: 10px; font-weight: 800; color: #475569; text-transform: uppercase; letter-spacing: .1em; padding: 12px 12px 6px; }
.admin-main { margin-left: 260px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0 24px; height: 58px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.admin-content { padding: 24px; flex: 1; }
.page-title { font-size: 20px; font-weight: 800; color: #0f172a; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,.05); border: 1px solid #f1f5f9; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.admin-table { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.05); border: 1px solid #f1f5f9; }
.admin-table table { margin: 0; font-size: 13px; }
.admin-table thead th { background: #f8fafc; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 1px solid #e2e8f0; padding: 12px 16px; }
.admin-table tbody td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #f8fafc; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #fafbfc; }
.form-label { font-weight: 700; font-size: 13px; color: #374151; }
.form-control, .form-select { border-radius: 10px; border: 1.5px solid #e2e8f0; font-size: 13px; padding: 10px 14px; }
.form-control:focus, .form-select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.btn-primary { background: #3b82f6; border-color: #3b82f6; font-weight: 700; }
.btn-primary:hover { background: #2563eb; border-color: #2563eb; }
.btn-success { font-weight: 700; }
.btn-danger { font-weight: 700; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-topbar { padding: 0 14px; }
  .admin-content { padding: 14px; }
}
