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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-container {
  background: white;
  border-radius: 16px;
  padding: 30px 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header h1 {
  font-size: 22px;
  color: #333;
  margin-bottom: 6px;
}

.auth-header p {
  color: #666;
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-btn.active {
  color: #667eea;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #667eea;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.3s;
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
}

.form-group small {
  color: #999;
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: #f5f7fa;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger {
  background: #ff4757;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-size: 13px;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 70px;
}

.app-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: none;
}

.app-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.app-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.app-header-user {
  font-size: 12px;
  opacity: 0.9;
}

.app-header-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.header-stat {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.header-stat .value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}

.header-stat .label {
  font-size: 11px;
  opacity: 0.9;
}

.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  color: #999;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.3s;
}

.nav-item .icon {
  font-size: 22px;
  margin-bottom: 3px;
}

.nav-item.active {
  color: #667eea;
}

.nav-item.active .icon {
  transform: scale(1.1);
}

.page {
  display: none;
  padding: 15px;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title .action-btn {
  font-size: 13px;
  padding: 6px 14px;
}

.banner-container {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

.banner-container.hidden {
  display: none;
}

.banner-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}

.banner-slide {
  min-width: 100%;
  aspect-ratio: 16/9;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.banner-dot.active {
  background: white;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-item {
  text-align: center;
  padding: 10px 5px;
}

.stat-item .value {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 3px;
}

.stat-item .label {
  font-size: 11px;
  color: #999;
}

.commission-rate-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 10px;
}

.rate-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rate-label {
  font-size: 12px;
  color: #999;
}

.rate-value {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}

.earnings-row {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
}

.earnings-col {
  text-align: center;
}

.earnings-col .value {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.earnings-col .label {
  font-size: 11px;
  color: #999;
  margin-top: 3px;
}

.notice-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.notice-item span {
  color: #999;
  font-size: 11px;
}

.notice-item-wrapper {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.notice-item-wrapper:last-child {
  border-bottom: none;
}

.notice-item-content {
  background: white;
  padding: 12px 0;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.notice-item-content h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.notice-item-content span {
  color: #999;
  font-size: 11px;
}

.notice-item-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #ff4757;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.unread-badge {
  background: #ff4757;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.unread-dot {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #ff4757;
  border-radius: 50%;
}

.card-header {
  display: flex;
  align-items: center;
}

.card-header.clickable {
  cursor: pointer;
}

.card-header.clickable:hover {
  background: #f9f9f9;
}

.card-arrow {
  margin-left: auto;
  font-size: 18px;
  color: #999;
}

.back-btn {
  font-size: 24px;
  margin-right: 10px;
  cursor: pointer;
  color: #667eea;
}

.withdrawals-container {
  padding: 10px;
}

.withdrawal-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.withdrawal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.withdrawal-amount {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.withdrawal-info .info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.withdrawal-info .info-label {
  color: #999;
  font-size: 13px;
}

.withdrawal-info .info-value {
  color: #333;
  font-size: 13px;
}

.top-badge {
  background: #ff9500;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.btn-warning {
  background: #ff9500;
  color: white;
  border: none;
}

.btn-warning:hover {
  background: #e68600;
}

.kefu-btn {
  position: fixed;
  right: 15px;
  bottom: 80px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s;
}

.kefu-btn:hover {
  transform: scale(1.1);
}

.kefu-btn span {
  font-size: 24px;
}

.kefu-modal-content {
  max-width: 300px;
  text-align: center;
}

.kefu-qrcode-container {
  padding: 20px;
}

.kefu-qrcode-container img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.kefu-qrcode-container p {
  color: #666;
  font-size: 14px;
}

.platform-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.platform-logo:hover {
  transform: scale(1.05);
}

.platform-logo-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.platform-header h3 {
  flex: 1;
  font-size: 16px;
  color: #333;
  margin: 0;
}

.platform-card h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-card h3::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.platform-info {
  margin-bottom: 12px;
}

.platform-info p {
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.platform-info strong {
  color: #667eea;
}

.copyable-code {
  cursor: pointer;
  transition: background 0.2s;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
}

.copyable-code:hover {
  background: #f0f2ff;
}

.copyable-code:active {
  background: #e0e4ff;
}

.platform-rules {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}

.rules-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rules-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s;
}

.rules-img:hover {
  transform: scale(1.05);
}

.platform-actions {
  display: flex;
  gap: 10px;
}

.platform-actions .btn-primary,
.platform-actions .btn-secondary {
  flex: 1;
  padding: 10px;
  text-align: center;
  text-decoration: none;
}

.team-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  padding: 0 15px;
}

.team-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.team-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

.member-card {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.member-time {
  font-size: 11px;
  color: #999;
}

.member-info {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.member-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.anchor-card {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.anchor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.anchor-id {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.anchor-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}

.anchor-count {
  font-size: 12px;
  color: #667eea;
  font-weight: 500;
}

.anchor-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.anchor-item:last-child {
  border-bottom: none;
}

.anchor-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.anchor-id {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.anchor-time {
  font-size: 11px;
  color: #999;
}

.anchor-earnings {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
}

.earnings-summary-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.earnings-summary-item {
  text-align: center;
}

.earnings-summary-item .label {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}

.earnings-summary-item .value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.earnings-summary-item .sub {
  font-size: 11px;
  color: #667eea;
  margin-top: 2px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-approved {
  background: #d4edda;
  color: #155724;
}

.status-rejected {
  background: #f8d7da;
  color: #721c24;
}

.qrcode-section {
  text-align: center;
  padding: 20px 0;
}

.qrcode-section img {
  width: 180px;
  height: 180px;
  border: 3px solid #667eea;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.qrcode-section img:hover {
  transform: scale(1.02);
}

.qrcode-section img:active {
  transform: scale(0.98);
}

.qrcode-section p {
  color: #666;
  font-size: 13px;
}

.copy-section {
  margin-top: 15px;
}

.copy-item {
  margin-bottom: 12px;
}

.copy-item label {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  display: block;
}

.copy-box {
  display: flex;
  gap: 8px;
}

.copy-box input {
  flex: 1;
  padding: 10px 12px;
  background: #f5f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
}

.btn-copy {
  padding: 10px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.material-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.material-item img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.material-item h4 {
  font-size: 12px;
  color: #333;
  margin-bottom: 3px;
}

.material-item p {
  font-size: 11px;
  color: #666;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-content.modal-lg {
  max-width: 500px;
  margin: 0 auto;
}

.scrollable-form {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 5px;
}

.scrollable-form::-webkit-scrollbar {
  width: 4px;
}

.scrollable-form::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.scrollable-form::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.scrollable-form::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.children-checkbox-container {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
}

.children-checkbox-container label {
  display: flex;
  align-items: center;
  padding: 8px;
  margin: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.children-checkbox-container label:hover {
  background: #f0f0f0;
}

.children-checkbox-container input[type="checkbox"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  font-size: 16px;
  color: #333;
}

.modal-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  background: #2c3e50;
  color: white;
  padding: 15px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  padding: 0 15px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 15px;
}

.admin-brand h2 {
  font-size: 16px;
  font-weight: 600;
}

.admin-menu {
  list-style: none;
}

.admin-menu li a {
  display: block;
  padding: 10px 15px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
}

.admin-menu li a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-menu li a.active {
  background: #667eea;
  color: white;
}

.admin-main {
  flex: 1;
  margin-left: 220px;
  background: #f5f7fa;
}

.admin-header {
  background: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header h1 {
  font-size: 18px;
  color: #333;
}

.admin-content {
  padding: 20px;
}

.dashboard-welcome {
  margin-bottom: 25px;
}

.dashboard-welcome h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 5px;
}

.dashboard-welcome p {
  color: #999;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card-users .stat-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card-new .stat-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-card-anchors .stat-icon { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.stat-card-pending .stat-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card-withdraw .stat-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card-total .stat-icon { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

.dashboard-section {
  margin-top: 20px;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.dashboard-card h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

.action-bar {
  display: flex;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #666;
  font-size: 12px;
}

.data-table td {
  color: #333;
}

@media (min-width: 769px) {
  .app-container {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 100vh;
  }
  
  .app-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 15px;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #999;
}

.download-content {
  text-align: center;
}

.download-qrcode {
  margin-bottom: 20px;
}

.download-qrcodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.download-qrcode-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.download-qrcode-img:hover {
  transform: scale(1.05);
}

.download-qrcode p {
  font-size: 13px;
  color: #666;
}

.download-link-section {
  text-align: left;
}

.download-link-section label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.platform-action-bar {
  padding: 10px 0 5px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  margin-top: 10px;
}

.platform-summary-header {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 15px;
}

.summary-item {
  text-align: center;
  color: white;
}

.summary-label {
  display: block;
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
}

.anchor-list-container {
  max-height: 60vh;
  overflow-y: auto;
}

.anchor-detail-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.anchor-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.anchor-detail-id {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.anchor-detail-earnings {
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
}

.anchor-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.detail-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
}

.detail-label {
  font-size: 12px;
  color: #666;
}

.detail-value {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.card-header.clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.card-header.clickable:active {
  background: #f5f5f5;
}

.card-arrow {
  font-size: 20px;
  color: #999;
  margin-left: auto;
}

.earnings-detail-container {
  max-height: 70vh;
  overflow-y: auto;
}

.earnings-detail-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.earnings-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.earnings-type {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.earnings-amount {
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
}

.tax-amount {
  color: #e74c3c;
  font-weight: 500;
}

.commission-box {
  margin-top: 8px;
  padding: 8px;
  background: #fff5f5;
  border-radius: 8px;
  border-left: 3px solid #ff6b6b;
}

.commission-box.income {
  background: #f0fff4;
  border-left: 3px solid #51cf66;
}

.commission-out {
  color: #ff6b6b;
  font-weight: 500;
}

.commission-in {
  color: #51cf66;
  font-weight: 500;
}

.earnings-detail-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: white;
  border-radius: 6px;
}

.info-label {
  font-size: 12px;
  color: #666;
}

.info-value {
  font-size: 12px;
  color: #333;
}

.image-preview-modal {
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.image-preview-modal .image-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  z-index: 1001;
}

.image-preview-modal #previewImage {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.stat-item.clickable {
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border-radius: 8px;
}

.stat-item.clickable:hover {
  background: #f0f0f0;
}

.stat-item.clickable:active {
  transform: scale(0.98);
}

.agents-container {
  max-height: 70vh;
  overflow-y: auto;
}

.agent-card-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.agent-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.agent-earnings {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}

.agent-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-card-info .info-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: white;
  border-radius: 6px;
}

.agent-card-info .info-label {
  font-size: 12px;
  color: #666;
}

.agent-card-info .info-value {
  font-size: 12px;
  color: #333;
}

.level-chain {
  font-size: 12px;
  color: #667eea;
  background: #f0f2ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.image-preview-box {
  margin-top: 10px;
}

.image-preview-box img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.multi-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.multi-preview-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s;
}

.multi-preview-img:hover {
  transform: scale(1.05);
}

.upload-progress {
  color: #667eea;
  font-size: 14px;
  padding: 10px;
}

.profile-info {
  padding: 10px 0;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-item .label {
  color: #666;
  font-size: 14px;
}

.profile-item .value {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.upload-error {
  color: #e74c3c;
  font-size: 14px;
  padding: 10px;
}
