.afd-page {
  background: #f3f6fb;
  color: #1f2937;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.afd-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 18px 0 30px;
}

.afd-sidebar {
  position: sticky;
  top: 84px;
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  padding: 12px;
  height: fit-content;
}

.afd-brand {
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #172a74, #1f5ca8);
  color: #fff;
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.afd-nav-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 7px;
  padding: 9px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

.afd-nav-btn.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #172a74;
}

.afd-main section {
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.afd-head {
  background: linear-gradient(135deg, #172a74, #21a9af);
  color: #fff;
}

.afd-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.afd-kpi {
  background: #f8fbff;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  padding: 12px;
}

.afd-kpi .label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 5px;
}

.afd-kpi .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #172a74;
}

.afd-row-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.afd-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.afd-graph-placeholder {
  min-height: 170px;
  border-radius: 10px;
  border: 1px dashed #93c5fd;
  background: repeating-linear-gradient(
    0deg,
    #f8fbff,
    #f8fbff 16px,
    #eef5ff 16px,
    #eef5ff 32px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.88rem;
}

.afd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.afd-actions a,
.afd-actions button {
  border-radius: 999px;
  font-weight: 700;
}

.afd-alerts li {
  font-size: 0.86rem;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  padding: 9px;
  margin-bottom: 7px;
  list-style: none;
  background: #f8fafc;
}

.afd-table-wrap {
  overflow: auto;
}

.afd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.afd-table th,
.afd-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 8px 7px;
  white-space: nowrap;
}

.afd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.afd-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.afd-offer {
  border: 1px solid #dbe3f0;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
}

.afd-offer .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.afd-badge {
  font-size: 0.72rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 999px;
  padding: 3px 7px;
  font-weight: 700;
}

.afd-help-box {
  background: #f8fbff;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  padding: 12px;
}

.afd-link-3panel {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 0.9fr;
  gap: 12px;
}

.afd-link-panel {
  background: #f8fbff;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  padding: 12px;
}

.afd-link-panel h4 {
  font-size: 0.88rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.afd-mini-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.afd-preview-box {
  background: #0f172a;
  color: #dbeafe;
  border-radius: 9px;
  padding: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-all;
}

.afd-output-line {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.afd-output-line strong {
  color: #172a74;
}

.afd-qr-holder {
  min-height: 130px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.afd-social-share {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.afd-social-share button {
  border-radius: 999px;
  border: 1px solid #dbe3f0;
  background: #fff;
  font-size: 0.75rem;
  padding: 5px 9px;
}

@media (max-width: 1100px) {
  .afd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .afd-wrap { grid-template-columns: 1fr; }
  .afd-sidebar { position: static; }
  .afd-link-3panel { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .afd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .afd-row-2,
  .afd-grid-2 { grid-template-columns: 1fr; }
}
