/* =============================================================================
   AFL Plugin — Public CSS
   Design System: PlayStation 5 / Flavor Theme
   Consome as vars do tema: --color-*, --font-*, --radius-*, --shadow-*
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700;800&display=swap');

.afl-wrap,
.afl-auth-wrap,
.afl-dashboard {
  font-family: var(--font-primary, 'Barlow', sans-serif);
  color: var(--color-text-primary, #fff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Alertas ── */
.afl-alert {
  padding: 12px 16px;
  border-radius: var(--radius-base, 6px);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.afl-alert-ok  { background: rgba(0,196,154,0.10); border-color: #00C49A; color: #00C49A; }
.afl-alert-err { background: rgba(232,0,42,0.10);  border-color: #E8002A; color: #ff5577; }

/* ============================================================
   AUTH WRAP
   ============================================================ */
.afl-auth-wrap {
  position: relative;
  isolation: isolate;
  margin: 24px 0;
  /* FIX: evita overflow lateral causado pelo body { margin: auto } do tema */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.afl-auth-wrap::before,
.afl-auth-wrap::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  animation: afl-glow-drift 18s ease-in-out infinite;
}
.afl-auth-wrap::before {
  left: -80px; top: -60px;
  background: radial-gradient(circle, rgba(0,112,209,0.8), transparent 65%);
}
.afl-auth-wrap::after {
  right: -80px; bottom: -60px;
  background: radial-gradient(circle, rgba(0,168,232,0.6), transparent 65%);
  animation-delay: -7s;
}
@keyframes afl-glow-drift {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(12px,-16px) scale(1.04); }
  66%  { transform: translate(-8px,12px) scale(0.97); }
  100% { transform: translate(0,0) scale(1); }
}

/* ============================================================
   GRID AUTH
   ============================================================ */
.afl-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  /* FIX: colunas nao estouram o container */
  width: 100%;
  box-sizing: border-box;
  padding: 80px 200px 80px 200px;
}
/* FIX: filhos do grid nunca crescem alem da coluna */
.afl-auth-grid > * { min-width: 0; }

@media (max-width: 860px) { .afl-auth-grid { grid-template-columns: 1fr; padding:15px; }.afl-dashboard{padding:15px !important;} }

/* ============================================================
   CARD
   ============================================================ */
.afl-card {
  background: linear-gradient(160deg, rgba(13,26,42,0.95) 0%, rgba(8,15,28,0.98) 100%);
  border: 1px solid var(--color-border, #192D44);
  border-radius: var(--radius-lg, 10px);
  box-shadow: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.6)),
              inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  will-change: transform;
  /* FIX: card nao ultrapassa a coluna */
  box-sizing: border-box;
  width: 100%;
}
.afl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,168,232,0.25);
  box-shadow: var(--shadow-lg, 0 8px 40px rgba(0,0,0,0.7)),
              0 0 24px rgba(0,112,209,0.12),
              inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ============================================================
   FORM
   ============================================================ */
.afl-form { padding: 24px; }

.afl-card-head {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(25,45,68,0.8);
}
.afl-form h3.afl-title {
  margin: 0;
  font-family: var(--font-display, 'Barlow Condensed', sans-serif);
  font-weight: 700; font-size: 22px; letter-spacing: 0.4px;
  color: var(--color-text-primary, #fff);
}
.afl-form .afl-sub { margin: 0; font-size: 13px; color: var(--color-text-secondary, #8599B2); line-height: 1.5; }

/* Badge PS5 */
.afl-badge {
  display: inline-flex; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-full, 9999px);
  background: rgba(0,112,209,0.15); color: var(--color-accent, #00A8E8);
  border: 1px solid rgba(0,112,209,0.3);
}
.afl-badge-alt { background: rgba(0,168,232,0.12); color: #4dc8f0; border-color: rgba(0,168,232,0.28); }

/* Fields */
.afl-field { margin: 0 0 14px; position: relative; }

.afl-form label {
  display: block; margin: 0 0 6px;
  color: var(--color-text-secondary, #8599B2);
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
}

.afl-form input[type="text"],
.afl-form input[type="email"],
.afl-form input[type="password"] {
  /* FIX: nunca ultrapassa o card */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--color-border, #192D44);
  border-radius: var(--radius-sm, 4px);
  background: rgba(5,12,21,0.7);
  color: var(--color-text-primary, #fff);
  font-family: var(--font-primary, 'Barlow', sans-serif);
  font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.afl-form input::placeholder { color: var(--color-text-muted, #3D5470); }
.afl-form input:focus {
  outline: none;
  border-color: var(--color-border-focus, #0070D1);
  background: rgba(5,12,21,0.9);
  box-shadow: 0 0 0 3px rgba(0,112,209,0.18), 0 0 20px rgba(0,112,209,0.08);
}

/* FIX: Autocomplete — neutraliza fundo branco/amarelo injetado pelo browser */
.afl-form input:-webkit-autofill,
.afl-form input:-webkit-autofill:hover,
.afl-form input:-webkit-autofill:focus,
.afl-form input:-webkit-autofill:active {
  /* inset enorme pinta o fundo por cima do estilo nativo do browser */
  -webkit-box-shadow: 0 0 0 1000px #050C15 inset !important;
  box-shadow:         0 0 0 1000px #050C15 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  /* delay absurdo paralisa a transicao de cor do Chrome/Edge */
  transition: background-color 5000s ease-in-out 0s;
  border-color: var(--color-border, #192D44) !important;
  caret-color: #ffffff;
}
.afl-form input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #050C15 inset,
    0 0 0 3px rgba(0,112,209,0.18) !important;
  box-shadow:
    0 0 0 1000px #050C15 inset,
    0 0 0 3px rgba(0,112,209,0.18) !important;
  border-color: var(--color-border-focus, #0070D1) !important;
}

/* FIX: Toggle senha — alinhado pelo fundo do input, nao pelo topo do label */
.afl-has-toggle { position: relative; }
.afl-has-toggle .afl-toggle-pwd {
  position: absolute;
  right: 8px;
  top: auto;    /* cancela qualquer top fixo herdado */
  bottom: 4px;  /* (altura input 38px - botao 30px) / 2 = 4px */
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-xs, 2px);
  border: 1px solid var(--color-border, #192D44);
  background: rgba(5,12,21,0.6);
  color: var(--color-text-muted, #3D5470);
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.afl-has-toggle .afl-toggle-pwd:hover {
  border-color: var(--color-border-focus, #0070D1);
  color: var(--color-accent, #00A8E8);
  background: rgba(0,112,209,0.1);
}
.afl-has-toggle .afl-toggle-pwd svg path { fill: currentColor; }

/* Row */
.afl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.afl-check { display: flex; align-items: center; gap: 8px; color: var(--color-text-secondary, #8599B2); font-size: 13px; cursor: pointer; }
.afl-check input[type="checkbox"] { accent-color: var(--color-cta, #0070D1); }
.afl-link { color: var(--color-accent, #00A8E8); text-decoration: none; font-size: 13px; transition: color .12s; }
.afl-link:hover { color: var(--color-cta, #0070D1); text-decoration: underline; }

/* Grid 2 colunas */
.afl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.afl-grid-2 > * { min-width: 0; } /* FIX */
@media (max-width: 600px) { .afl-grid-2 { grid-template-columns: 1fr; } }

.afl-actions { margin-top: 8px; }

/* Botoes */
.afl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--color-border-strong, #1E3D58);
  background: rgba(13,26,42,0.9);
  color: var(--color-text-primary, #fff);
  font-family: var(--font-primary, 'Barlow', sans-serif);
  font-size: 14px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; text-decoration: none; white-space: nowrap; box-sizing: border-box;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.afl-btn:hover { transform: translateY(-1px); border-color: var(--color-border-focus, #0070D1); box-shadow: 0 6px 20px rgba(0,0,0,0.4); color: #fff; text-decoration: none; }
.afl-btn:active { transform: translateY(0); box-shadow: none; }
.afl-btn-full { width: 100%; }

.afl-btn-accent {
  background: linear-gradient(160deg, var(--color-cta, #0070D1) 0%, #0058A8 100%);
  border-color: rgba(0,112,209,0.6); color: #fff;
  position: relative; overflow: hidden;
}
.afl-btn-accent::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.afl-btn-accent:hover {
  background: linear-gradient(160deg, #0080E8 0%, var(--color-cta, #0070D1) 100%);
  border-color: rgba(0,168,232,0.5);
  box-shadow: 0 4px 24px rgba(0,112,209,0.4); color: #fff;
}
.afl-btn-ghost { background: transparent; border-color: var(--color-border, #192D44); color: var(--color-text-secondary, #8599B2); }
.afl-btn-ghost:hover { border-color: var(--color-border-strong, #1E3D58); color: var(--color-text-primary, #fff); }

.afl-btn-glow { animation: afl-btn-pulse 2.8s ease-in-out infinite; }
@keyframes afl-btn-pulse {
  0%   { box-shadow: 0 0 0 rgba(0,112,209,0); }
  50%  { box-shadow: 0 0 22px rgba(0,112,209,0.4), 0 4px 20px rgba(0,168,232,0.2); }
  100% { box-shadow: 0 0 0 rgba(0,112,209,0); }
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.afl-dashboard { padding:80px 200px 80px 200px; }
.afl-dashboard h3 { margin: 0 0 16px; font-family: var(--font-display, 'Barlow Condensed', sans-serif); font-size: 26px; font-weight: 800; letter-spacing: 0.5px; color: var(--color-text-primary, #fff); }
.afl-dashboard h4 { margin: 0 0 14px; font-family: var(--font-display, 'Barlow Condensed', sans-serif); font-size: 18px; font-weight: 700; letter-spacing: 0.4px; color: var(--color-text-primary, #fff); }

/* Link de afiliado */
.afl-linkbox {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(0,112,209,0.08); border: 1px solid rgba(0,112,209,0.25);
  border-radius: var(--radius-base, 6px); padding: 12px 14px; margin: 0 0 20px; box-sizing: border-box;
}
.afl-linkbox .afl-linkbox-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--color-accent, #00A8E8); white-space: nowrap; }
.afl-linkbox code { flex: 1; min-width: 0; word-break: break-all; color: var(--color-text-secondary, #8599B2); font-size: 13px; background: none; padding: 0; font-family: 'Courier New', monospace; }
.afl-linkbox button {
  padding: 6px 14px; border-radius: var(--radius-xs, 2px);
  border: 1px solid rgba(0,112,209,0.35); background: rgba(0,112,209,0.15);
  color: var(--color-accent, #00A8E8);
  font-family: var(--font-primary, 'Barlow', sans-serif); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.afl-linkbox button:hover { background: rgba(0,112,209,0.3); border-color: #0070D1; color: #fff; }

/* Abas */
.afl-tabs {
  display: flex; gap: 4px; margin: 0 0 20px;
  background: rgba(5,12,21,0.6); border: 1px solid var(--color-border, #192D44);
  border-radius: var(--radius-base, 6px); padding: 4px; width: fit-content; flex-wrap: wrap;
}
.afl-tab {
  background: transparent; color: var(--color-text-secondary, #8599B2); border: none;
  padding: 9px 18px; border-radius: var(--radius-sm, 4px); cursor: pointer;
  font-family: var(--font-primary, 'Barlow', sans-serif); font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  transition: background .12s, color .12s;
}
.afl-tab:hover { color: var(--color-text-primary, #fff); }
.afl-tab.active { background: var(--color-cta, #0070D1); color: #fff; box-shadow: 0 2px 12px rgba(0,112,209,0.4); }

/* KPI Cards */
.afl-dashboard .afl-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 0 0 24px; }
@media (max-width: 900px) { .afl-dashboard .afl-cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px)  { .afl-dashboard .afl-cards { grid-template-columns: 1fr 1fr; } }

.afl-dashboard .afl-card {
  background: linear-gradient(145deg, rgba(13,26,42,0.9), rgba(8,15,28,0.95));
  border: 1px solid var(--color-border, #192D44);
  border-radius: var(--radius-base, 6px); padding: 16px;
  position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.afl-dashboard .afl-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,168,232,0.25), transparent);
}
.afl-dashboard .afl-card:hover { border-color: rgba(0,112,209,0.3); transform: translateY(-2px); }

.afl-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--color-text-muted, #3D5470); margin: 0 0 8px; }
.afl-kpi-value { font-family: var(--font-display, 'Barlow Condensed', sans-serif); font-size: 24px; font-weight: 800; color: var(--color-text-primary, #fff); line-height: 1; margin: 0 0 6px; letter-spacing: 0.3px; }
.afl-kpi-desc  { font-size: 12px; color: var(--color-text-muted, #3D5470); }

.afl-kpi-icon { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--radius-xs, 2px); font-size: 13px; font-weight: 900; font-family: var(--font-display, 'Barlow Condensed', sans-serif); }
.afl-kpi-icon-approved { background: rgba(0,196,154,0.12); color: #00C49A; border: 1px solid rgba(0,196,154,0.2); }
.afl-kpi-icon-pending  { background: rgba(245,166,35,0.12); color: #F5A623; border: 1px solid rgba(245,166,35,0.2); }
.afl-kpi-icon-aov      { background: rgba(0,112,209,0.12);  color: #0070D1; border: 1px solid rgba(0,112,209,0.2); }
.afl-kpi-icon-month    { background: rgba(0,168,232,0.12);  color: #00A8E8; border: 1px solid rgba(0,168,232,0.2); }

/* ============================================================
   ULTIMAS VENDAS
   ============================================================ */
.afl-sales { margin: 0 0 24px; }
.afl-sales h4 { margin: 0 0 14px; }
.afl-sales-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media (max-width: 1000px) { .afl-sales-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px)  { .afl-sales-grid { grid-template-columns: 1fr; } }

.afl-sale {
  background: rgba(8,15,28,0.8); border: 1px solid var(--color-border, #192D44);
  border-radius: var(--radius-base, 6px); padding: 12px;
  position: relative; overflow: hidden; transition: border-color .2s, transform .2s;
}
.afl-sale::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #0070D1, #00A8E8); opacity: 0; transition: opacity .2s; }
.afl-sale:hover { border-color: rgba(0,112,209,0.3); transform: translateY(-2px); }
.afl-sale:hover::before { opacity: 1; }

.afl-sale-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.afl-sale-row:last-child { margin-bottom: 0; }
.afl-sale-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted, #3D5470); }
.afl-sale-value { font-family: var(--font-display, 'Barlow Condensed', sans-serif); font-size: 16px; font-weight: 700; color: var(--color-text-primary, #fff); }
.afl-sale-date  { font-size: 12px; color: var(--color-text-secondary, #8599B2); }
.afl-sales-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* ============================================================
   STATUS BADGES — simbolos DualSense
   ============================================================ */
.afl-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-full, 9999px); }
.afl-status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.afl-status-pending  { background: rgba(245,166,35,0.12); color: #F5A623; border: 1px solid rgba(245,166,35,0.25); }
.afl-status-pending::before  { background: #F5A623; }
.afl-status-approved { background: rgba(0,196,154,0.12);  color: #00C49A; border: 1px solid rgba(0,196,154,0.25); }
.afl-status-approved::before { background: #00C49A; }
.afl-status-paid     { background: rgba(0,112,209,0.12);  color: #0070D1; border: 1px solid rgba(0,112,209,0.25); }
.afl-status-paid::before     { background: #0070D1; }
.afl-status-void,
.afl-status-reversed,
.afl-status-rejected { background: rgba(232,0,42,0.10); color: #E8002A; border: 1px solid rgba(232,0,42,0.20); }
.afl-status-void::before,
.afl-status-reversed::before,
.afl-status-rejected::before { background: #E8002A; }

/* ============================================================
   FILTROS
   ============================================================ */
.afl-filters { background: rgba(8,15,28,0.7); border: 1px solid var(--color-border, #192D44); border-radius: var(--radius-base, 6px); padding: 16px; margin-bottom: 20px; box-sizing: border-box; }
.afl-filters-inner { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.afl-filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.afl-filters label { display: block; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--color-text-muted, #3D5470); }
.afl-filters select,
.afl-filters input[type="date"] {
  padding: 9px 12px; border: 1px solid var(--color-border, #192D44); border-radius: var(--radius-sm, 4px);
  background: rgba(5,12,21,0.8); color: var(--color-text-primary, #fff);
  font-family: var(--font-primary, 'Barlow', sans-serif); font-size: 13px;
  appearance: none; -webkit-appearance: none; box-sizing: border-box;
  transition: border-color .12s, box-shadow .12s;
}
.afl-filters select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233D5470' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.afl-filters select:focus,
.afl-filters input[type="date"]:focus { outline: none; border-color: #0070D1; box-shadow: 0 0 0 3px rgba(0,112,209,0.15); }
.afl-filters-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ============================================================
   TABELA
   ============================================================ */
.afl-table-wrap {
  overflow-x: auto; border-radius: var(--radius-base, 6px);
  border: 1px solid var(--color-border, #192D44);
  scrollbar-width: thin; scrollbar-color: #1E3D58 transparent;
}
.afl-table-wrap::-webkit-scrollbar { height: 5px; }
.afl-table-wrap::-webkit-scrollbar-track { background: transparent; }
.afl-table-wrap::-webkit-scrollbar-thumb { background: #1E3D58; border-radius: 4px; }

.afl-table { width: 100%; border-collapse: collapse; background: rgba(8,15,28,0.8); font-size: 13px; }
.afl-table th { padding: 10px 14px; border-bottom: 1px solid var(--color-border-strong, #1E3D58); text-align: left; background: rgba(5,12,21,0.9); color: var(--color-text-muted, #3D5470); font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; white-space: nowrap; }
.afl-table td { padding: 10px 14px; border-bottom: 1px solid rgba(25,45,68,0.5); color: var(--color-text-primary, #fff); vertical-align: middle; }
.afl-table tbody tr { transition: background .12s; }
.afl-table tbody tr:hover { background: rgba(0,112,209,0.05); }
.afl-table tbody tr:last-child td { border-bottom: none; }
.afl-table .afl-empty-row td { text-align: center; padding: 32px; color: var(--color-text-muted, #3D5470); font-style: italic; }

/* Paginacao */
.afl-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.afl-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: var(--radius-sm, 4px); border: 1px solid var(--color-border, #192D44);
  background: rgba(8,15,28,0.7); color: var(--color-text-secondary, #8599B2);
  font-family: var(--font-primary, 'Barlow', sans-serif); font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.afl-page-btn:hover { border-color: #0070D1; color: #fff; text-decoration: none; }
.afl-page-btn.active { background: #0070D1; border-color: #0070D1; color: #fff; box-shadow: 0 2px 10px rgba(0,112,209,0.35); }

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 700px) {
  .afl-form { padding: 16px; }
  .afl-table th, .afl-table td { padding: 8px 10px; font-size: 12px; }
  .afl-kpi-value { font-size: 20px; }
  .afl-dashboard h3 { font-size: 22px; }
}
@media (max-width: 480px) {
  .afl-tabs { width: 100%; }
  .afl-tab  { flex: 1; text-align: center; padding: 8px 10px; font-size: 12px; }
  .afl-linkbox { flex-direction: column; align-items: flex-start; }
  .afl-filters-inner { flex-direction: column; }
  .afl-filter-group { min-width: 100%; }
}