*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #eff6ff;
  --success: #16a34a; --danger: #dc2626; --warning: #d97706;
  --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0;
  --gray-400: #94a3b8; --gray-600: #475569; --gray-700: #334155; --gray-900: #0f172a;
  --sidebar-w: 220px;
}
body { font-family: 'Inter', system-ui, sans-serif; color: var(--gray-900); background: var(--gray-50); }
.admin-page { display: flex; min-height: 100vh; }
.admin-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--gray-50); }
.login-box { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 20px 40px -12px rgb(0 0 0/0.12); }
.login-logo { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.login-title { font-size: 1.1rem; font-weight: 600; text-align: center; margin-bottom: 24px; color: var(--gray-600); }
.admin-sidebar { width: var(--sidebar-w); background: var(--gray-900); color: #e2e8f0; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 50; overflow-y: auto; }
.sidebar-logo { padding: 20px 16px; font-size: 1rem; font-weight: 700; border-bottom: 1px solid #1e293b; }
.sidebar-nav { padding: 12px 8px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-link { display: block; padding: 9px 12px; border-radius: 8px; color: #94a3b8; font-size: 0.88rem; font-weight: 500; text-decoration: none; transition: all .15s; }
.sidebar-link:hover, .sidebar-link.active { background: #1e293b; color: #fff; text-decoration: none; }
.sidebar-link--logout { color: #f87171; margin-top: auto; }
.sidebar-hr { border: none; border-top: 1px solid #1e293b; margin: 8px 4px; }
.sidebar-user { font-size: 0.75rem; color: #475569; padding: 4px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.admin-page-title { font-size: 1.1rem; font-weight: 700; }
.topbar-warning { background: #fef3c7; color: #92400e; font-size: 0.82rem; padding: 6px 14px; border-radius: 6px; }
.topbar-warning a { color: #92400e; font-weight: 600; }
.admin-content { padding: 28px; flex: 1; }
.admin-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; margin-top: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgb(0 0 0/0.06); border-top: 3px solid var(--gray-200); }
.stat-card--green { border-top-color: #22c55e; }
.stat-card--yellow { border-top-color: #f59e0b; }
.stat-card--red { border-top-color: #ef4444; }
.stat-card--blue { border-top-color: var(--primary); }
.stat-icon { font-size: 1.4rem; margin-bottom: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--gray-600); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgb(0 0 0/0.06); font-size: 0.87rem; }
.admin-table th { background: var(--gray-50); padding: 10px 14px; text-align: left; font-weight: 600; font-size: 0.78rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--gray-200); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table--sm th, .admin-table--sm td { padding: 7px 10px; font-size: 0.82rem; }
.table-empty { color: var(--gray-400); text-align: center; padding: 28px !important; }
.id-code { font-size: 0.78rem; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.status-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; }
.status-badge--active { background: #dcfce7; color: #166534; }
.status-badge--pending { background: #fef3c7; color: #92400e; }
.status-badge--suspended { background: #fee2e2; color: #991b1b; }
.status-badge--cancelled { background: var(--gray-100); color: var(--gray-600); }
.status-badge--deleted { background: var(--gray-100); color: var(--gray-400); }
.paket-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.paket-tag--basic { background: #eff6ff; color: #1d4ed8; }
.paket-tag--plus { background: #f0fdf4; color: #166534; }
.paket-tag--pro { background: #fdf4ff; color: #7e22ce; }
.paket-tag--vip { background: #fef9c3; color: #854d0e; }
.paket-tag--admin { background: #fee2e2; color: #991b1b; }
.paket-tag--editor { background: #eff6ff; color: #1d4ed8; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; border: none; transition: all .15s; text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn--outline:hover { background: var(--primary-light); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn--full { width: 100%; }
.btn--lg { padding: 12px 24px; font-size: 0.95rem; }
.input { padding: 9px 13px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 0.88rem; outline: none; transition: border .2s; width: 100%; font-family: inherit; background: #fff; }
.input--sm { padding: 6px 10px; font-size: 0.82rem; }
.input:focus { border-color: var(--primary); }
textarea.input { resize: vertical; }
.form-label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; font-weight: 500; color: var(--gray-700); }
.alert { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 0.87rem; }
.alert--error { background: #fee2e2; color: #991b1b; }
.alert--success { background: #dcfce7; color: #166534; }
.alert--warning { background: #fef3c7; color: #92400e; }
.order-detail { display: flex; flex-direction: column; gap: 0; }
.order-header { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgb(0 0 0/0.06); flex-wrap: wrap; gap: 12px; }
.order-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-section { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgb(0 0 0/0.06); }
.detail-section h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; }
.detail-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.87rem; }
.detail-dl dt { color: var(--gray-400); font-weight: 500; white-space: nowrap; }
.detail-dl dd { color: var(--gray-900); word-break: break-all; }
@media (max-width: 900px) {
  .admin-sidebar { width: 100%; height: auto; position: relative; flex-direction: row; }
  .admin-main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
