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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.app-header {
  margin-bottom: 2rem;
}

.app-header h1 {
  font-size: 2.5rem;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.app-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

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

.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
}

.stat-value.tips {
  color: #10b981;
}

.stat-value.refunds {
  color: #ef4444;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.breakdown-panel,
.transactions-panel {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

h2 {
  color: #f8fafc;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.breakdown-item {
  background: #0f172a;
  padding: 1.25rem;
  border-radius: 0.5rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.breakdown-header > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.method-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.method-name {
  color: #f8fafc;
  font-weight: 600;
  font-size: 1rem;
}

.method-count {
  color: #94a3b8;
  font-size: 0.875rem;
}

.breakdown-bar {
  height: 8px;
  background: #334155;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.breakdown-fill {
  height: 100%;
  transition: width 0.3s;
}

.breakdown-footer {
  display: flex;
  justify-content: space-between;
}

.breakdown-amount {
  color: #10b981;
  font-weight: 700;
  font-size: 1.125rem;
}

.breakdown-percentage {
  color: #64748b;
  font-size: 0.875rem;
}

.chart-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.pie-chart {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: conic-gradient(
    #3b82f6 0deg 68.4deg,
    #10b981 68.4deg 137.4deg,
    #8b5cf6 137.4deg 185.4deg,
    #fbbf24 185.4deg 360deg
  );
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.transaction-card {
  background: #0f172a;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #334155;
  position: relative;
}

.transaction-card.refunded {
  border-color: #ef4444;
  opacity: 0.7;
}

.transaction-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.order-number {
  color: #f8fafc;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.transaction-time {
  color: #64748b;
  font-size: 0.875rem;
}

.transaction-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.payment-method {
  font-weight: 600;
  font-size: 0.9375rem;
}

.amounts {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.amount {
  color: #cbd5e1;
  font-size: 0.875rem;
}

.tip {
  color: #10b981;
  font-size: 0.75rem;
}

.transaction-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.total-label {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.total-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
}

.total-amount.refunded {
  color: #ef4444;
}

.refund-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.625rem;
  background: #ef4444;
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
}
