* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f4f6f9; color: #333; font-size: 14px; }

nav { background: #1a1a2e; color: white; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
nav .brand { color: white; text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; display: flex; align-items: center; gap: 10px; }
nav .nav-logo { height: 36px; width: auto; object-fit: contain; }
nav .nav-logout { color: #aab; text-decoration: none; font-size: 13px; }
nav .nav-logout:hover { color: white; }

.login-wrap { max-width: 340px; margin: 80px auto; background: white; border-radius: 10px; padding: 36px 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.login-wrap h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; color: #1a1a2e; }
.login-wrap input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; margin-bottom: 14px; }
.login-wrap button { width: 100%; padding: 10px; background: #1a1a2e; color: white; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; }
.login-wrap button:hover { background: #2d2d5e; }
.login-error { background: #fde8e8; color: #c0392b; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }

.container { max-width: 1400px; margin: 0 auto; padding: 24px; }

@media (max-width: 768px) {
  nav { padding: 10px 16px; }
  nav .nav-logo { height: 28px; }
  nav .brand { font-size: 15px; }
  .container { padding: 16px; }

  /* Index page */
  .page-header h1 { font-size: 18px; }
  .filters { flex-direction: column; }
  .filters input, .filters select, .btn-reset { width: 100%; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .pagination { gap: 8px; }
  .pagination a { padding: 6px 12px; font-size: 13px; }

  /* Profile page */
  .profile-header { padding: 16px; }
  .profile-header h1 { font-size: 18px; }
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 14px 16px; }
  .info-table td:first-child { width: 110px; font-size: 12px; }
  .info-table td { font-size: 13px; padding: 4px 0; }
  .doc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .doc-item img { max-height: 130px; }
}

.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; font-weight: 600; }

.badge { background: #e3e8f0; color: #555; padding: 2px 10px; border-radius: 12px; font-size: 13px; }

.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 260px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.filters select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: white; }
.filters button { padding: 8px 20px; background: #1a1a2e; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.filters button:hover { background: #2d2d5e; }
.btn-reset { padding: 8px 16px; background: #f0f0f0; color: #555; text-decoration: none; border-radius: 6px; font-size: 14px; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
thead tr { background: #1a1a2e; color: white; }
th { padding: 12px 14px; text-align: left; font-weight: 500; font-size: 13px; }
td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7f9fc; }

.status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-active { background: #d4f5e2; color: #1a7a4a; }
.status-inactive { background: #fde8e8; color: #c0392b; }
.status-kyc_review_pending, .status-kyc-review-pending { background: #fff3cd; color: #856404; }
.status-unverified { background: #e8eaf6; color: #3949ab; }
.status-documents-pending, .status-documents_pending { background: #fce4d6; color: #c0550a; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }
.pagination a { padding: 6px 16px; background: white; border: 1px solid #ddd; border-radius: 6px; text-decoration: none; color: #333; }
.pagination a:hover { background: #f0f0f0; }
.pagination span { font-size: 13px; color: #666; }

.back { margin-bottom: 16px; }
.back a { color: #1a1a2e; text-decoration: none; font-size: 14px; }
.back a:hover { text-decoration: underline; }

.profile-header { background: white; padding: 20px 24px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 20px; }
.profile-header h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.pmv-id { font-size: 14px; color: #666; margin-right: 10px; }
.badge-scheme { background: #e8f4fd; color: #1565c0; padding: 2px 10px; border-radius: 12px; font-size: 12px; margin-right: 6px; }
.badge-type { background: #f3e5f5; color: #6a1b9a; padding: 2px 10px; border-radius: 12px; font-size: 12px; }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }

.card { background: white; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #1a1a2e; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }

.info-table { width: 100%; }
.info-table td { padding: 5px 0; vertical-align: top; }
.info-table td:first-child { color: #888; width: 140px; font-size: 13px; }

.docs-card { margin-top: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 8px; }
.doc-item { text-align: center; }
.doc-label { font-size: 12px; font-weight: 600; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-item img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 6px; border: 1px solid #ddd; cursor: pointer; transition: transform 0.2s; }
.doc-item img:hover { transform: scale(1.03); }
.doc-placeholder { height: 120px; background: #f4f4f4; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; border: 1px dashed #ddd; }
