/* ===============================
   AGENCY PORTAL — PREMIUM FRONTEND
   =============================== */

:root {
  --apc-primary: #4f46e5;
  --apc-primary-hover: #4338ca;
  --apc-bg-page: #f3f4f6;
  --apc-bg-card: #ffffff;
  --apc-text-main: #111827;
  --apc-text-muted: #6b7280;
  --apc-border-light: #e5e7eb;
  --apc-radius: 12px;
  --apc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --apc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.apc-dashboard {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--apc-text-main);
  line-height: 1.5;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- GRID SYSTEM --- */
.apc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.apc-grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {

  .apc-grid-3,
  .apc-grid-2-1 {
    grid-template-columns: 1fr;
  }
}

/* --- CARDS --- */
.apc-card {
  background: var(--apc-bg-card);
  border-radius: var(--apc-radius);
  box-shadow: var(--apc-shadow-sm);
  border: 1px solid var(--apc-border-light);
  padding: 24px;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.apc-card:hover {
  box-shadow: var(--apc-shadow-md);
  transform: translateY(-2px);
}

.apc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.apc-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* --- METRICS --- */
.apc-metric-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--apc-text-main);
}

.apc-metric-trend {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.apc-trend-up {
  color: #059669;
}

.apc-trend-down {
  color: #dc2626;
}

/* --- BUTTONS --- */
.apc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  border: none;
}

.apc-btn-primary {
  background: var(--apc-primary);
  color: white;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
}

.apc-btn-primary:hover {
  background: var(--apc-primary-hover);
  color: white;
}

.apc-btn-white {
  background: white;
  border: 1px solid var(--apc-border-light);
  color: var(--apc-text-main);
}

.apc-btn-white:hover {
  background: #f9fafb;
  color: var(--apc-text-main);
}

/* --- BADGES --- */
.apc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}

.apc-badge-blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.apc-badge-green {
  background: #ecfdf5;
  color: #047857;
}

.apc-badge-yellow {
  background: #fffbeb;
  color: #b45309;
}

.apc-badge-gray {
  background: #f3f4f6;
  color: #374151;
}

/* --- TABLES --- */
.apc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.apc-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--apc-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--apc-border-light);
}

.apc-table td {
  padding: 16px;
  border-bottom: 1px solid var(--apc-border-light);
  font-size: 14px;
}

.apc-table tr:last-child td {
  border-bottom: none;
}

.apc-table tr:hover td {
  background-color: #f9fafb;
}

/* --- GRADIENT CARD --- */
.apc-card-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
}

.apc-card-gradient .apc-card-title {
  color: white;
}

/* --- UTILS --- */
.apc-subtitle {
  color: var(--apc-text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.apc-flex-center {
  display: flex;
  align-items: center;
  gap: 8px;
}