:root {
  /* ABC Brand Colors - Professional, Clean, Trustworthy */
  --primary: #0066FF;
  --primary-light: #EBF3FF;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --text-main: #111827;
  --text-muted: #6B7280;
  --bg-app: #F9FAFB;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  
  /* Spacing & Sizing */
  --radius: 12px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
}

/* Typography */
h1 { font-size: 20px; font-weight: 700; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0; }
h3 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0; }
.text-label { font-size: 13px; color: var(--text-muted); }
.text-value { font-size: 14px; font-weight: 600; color: var(--text-main); }
.text-small { font-size: 12px; color: var(--text-muted); }

/* Layout Components */
.mobile-frame {
  width: 390px;
  margin: 40px auto;
  background: var(--bg-app);
  border: 8px solid #111;
  border-radius: 40px;
  height: 844px;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* Scrollbar hide for mobile frame */
.mobile-frame::-webkit-scrollbar { display: none; }

.container-mobile {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.top-bar {
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.back-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-main);
}

/* Card Styles */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.card-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-sm) 0;
}

.divider-bold {
  height: 2px;
  background: var(--text-main);
  margin: var(--space-sm) 0;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-md);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:disabled {
  background: #A5C9FF;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

/* Status Indicators */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-authorizing { background: var(--warning-bg); color: var(--warning); }
.status-success { background: var(--success-bg); color: var(--success); }
.status-failed { background: var(--danger-bg); color: var(--danger); }

/* Animation (Pulse for Authorizing) */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.pulse { animation: pulse 1.5s infinite; }

@keyframes spin { 
  from { transform: rotate(0deg); } 
  to { transform: rotate(360deg); } 
}
.spin { animation: spin 2s linear infinite; }

/* Helper classes for layout */
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.bg-highlight { background: var(--bg-app); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: bold; }
.font-16 { font-size: 16px; }
.font-18 { font-size: 18px; }
.font-20 { font-size: 20px; }

.auth-card-warning { border: 2px solid var(--warning); background: var(--warning-bg); }
.auth-card-success { border: 2px solid var(--success); background: var(--success-bg); }
.refund-card { background: var(--primary-light); border-color: var(--primary); }

.card-row-warning { border-bottom-color: rgba(245, 158, 11, 0.2) !important; }
.card-row-success { border-bottom-color: rgba(16, 185, 129, 0.2) !important; }
.card-row-refund { border-bottom-color: rgba(0, 102, 255, 0.1) !important; }

/* Desktop Dashboard Styles */
.desktop-wrapper {
  padding: var(--space-xl);
  max-width: 1440px;
  margin: 0 auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.kpi-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  margin: var(--space-xs) 0;
}

.kpi-trend {
  font-size: 12px;
  font-weight: 600;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.table-container {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: var(--space-md);
  background: #F9FAFB;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Exception Bars */
.exception-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.bar-bg {
  flex: 1;
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
}

/* Placeholder for Icon */
.icon-placeholder {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
