:root {
  --p-primary: #0984E3;
  --p-primary-light: #74B9FF;
  --p-primary-dark: #0767B5;
  --p-bg: #EDF5FF;
  --p-accent: #00B894;
}

body { background: var(--p-bg); }

.app-header { background: var(--p-bg); }

/* ===== PARENT ONBOARDING ===== */
.parent-onboarding {
  background: linear-gradient(160deg, #0984E3 0%, #74B9FF 50%, #A8D8EA 100%);
}

.parent-qr-scan {
  background: linear-gradient(160deg, #0767B5 0%, #0984E3 100%);
}

/* ===== CHILD OVERVIEW ===== */
.child-overview-card {
  background: linear-gradient(135deg, var(--p-primary) 0%, var(--p-primary-light) 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(9, 132, 227, 0.2);
  position: relative;
  overflow: hidden;
}

.child-overview-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.child-overview-card .child-avatar {
  font-size: 48px;
  margin-bottom: 12px;
}

.child-overview-card .child-name {
  font-size: 22px;
  font-weight: 900;
}

.child-overview-card .child-meta {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

.child-overview-card .child-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

.child-overview-card .stat {
  background: rgba(255,255,255,0.15);
  padding: 10px 16px;
  border-radius: 10px;
}

.child-overview-card .stat-value {
  font-size: 18px;
  font-weight: 900;
}

.child-overview-card .stat-label {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 600;
}

/* ===== APPROVAL CARDS ===== */
.approval-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--p-primary);
}

.approval-card:active { transform: scale(0.98); }

.approval-card.money { border-left-color: var(--accent); }
.approval-card.redeem { border-left-color: #FDCB6E; }
.approval-card.task { border-left-color: var(--primary); }

.approval-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.approval-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.approval-info { flex: 1; }

.approval-title {
  font-size: 15px;
  font-weight: 700;
}

.approval-meta {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.approval-amount {
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

.approval-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.approval-actions .btn { flex: 1; }

/* ===== QR CODE ===== */
.qr-display {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}

.qr-mock {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
}

.qr-mock::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 3px dashed rgba(255,255,255,0.3);
  border-radius: 12px;
}

.qr-timer {
  font-size: 32px;
  font-weight: 900;
  color: var(--p-primary);
  margin-bottom: 8px;
}

.qr-status {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== PARENT TASK CARD ===== */
.p-task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.p-task-card:active { transform: scale(0.98); }

.p-task-card .task-emoji { font-size: 32px; flex-shrink: 0; }

.p-task-card .task-info { flex: 1; min-width: 0; }

.p-task-card .task-title {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-task-card .task-meta {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== SECURITY ITEMS ===== */
.security-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.security-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.device-row:last-child { border-bottom: none; }

.device-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-icon { font-size: 24px; }

.device-name { font-size: 14px; font-weight: 700; }
.device-detail { font-size: 12px; color: var(--text-secondary); }

.device-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.device-status.active-s { background: #E8FFF5; color: var(--secondary); }
.device-status.inactive-s { background: #F5F5F5; color: var(--text-light); }

/* ===== AUDIT LOG ===== */
.audit-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.audit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.audit-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); line-height: 1.4; }
.audit-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ===== PARENT DETAIL ACTIONS ===== */
.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.detail-actions .btn { flex: 1; }

/* ===== LIMITS CONFIG ===== */
.limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.limit-row:last-child { border-bottom: none; }

.limit-label { font-size: 14px; font-weight: 700; }
.limit-value { font-size: 14px; font-weight: 800; color: var(--p-primary); }
